@fluentui/web-components 3.0.0-beta.26 → 3.0.0-beta.27
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.md +12 -2
- package/dist/dts/divider/divider.d.ts +24 -1
- package/dist/esm/dialog-body/dialog-body.template.js +1 -1
- package/dist/esm/dialog-body/dialog-body.template.js.map +1 -1
- package/dist/esm/divider/divider.js +38 -13
- package/dist/esm/divider/divider.js.map +1 -1
- package/dist/esm/divider/divider.template.js +1 -9
- package/dist/esm/divider/divider.template.js.map +1 -1
- package/dist/web-components.d.ts +24 -1
- package/dist/web-components.js +42 -4
- package/dist/web-components.min.js +99 -99
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,22 @@
|
|
|
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 Jun 2024 04:06:16 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [3.0.0-beta.27](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v3.0.0-beta.27)
|
|
8
|
+
|
|
9
|
+
Tue, 11 Jun 2024 04:06:16 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v3.0.0-beta.26..@fluentui/web-components_v3.0.0-beta.27)
|
|
11
|
+
|
|
12
|
+
### Changes
|
|
13
|
+
|
|
14
|
+
- feat: update divider to leverage ElementInternals ([PR #31627](https://github.com/microsoft/fluentui/pull/31627) by 13071055+chrisdholt@users.noreply.github.com)
|
|
15
|
+
- fix: show default title action in dialog-body for modal dialogs ([PR #31648](https://github.com/microsoft/fluentui/pull/31648) by 13071055+chrisdholt@users.noreply.github.com)
|
|
16
|
+
|
|
7
17
|
## [3.0.0-beta.26](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v3.0.0-beta.26)
|
|
8
18
|
|
|
9
|
-
Mon, 10 Jun 2024 04:07:
|
|
19
|
+
Mon, 10 Jun 2024 04:07:58 GMT
|
|
10
20
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v3.0.0-beta.25..@fluentui/web-components_v3.0.0-beta.26)
|
|
11
21
|
|
|
12
22
|
### Changes
|
|
@@ -7,6 +7,12 @@ import { DividerAlignContent, DividerAppearance, DividerOrientation, DividerRole
|
|
|
7
7
|
* A divider groups sections of content to create visual rhythm and hierarchy. Use dividers along with spacing and headers to organize content in your layout.
|
|
8
8
|
*/
|
|
9
9
|
export declare class Divider extends FASTElement {
|
|
10
|
+
/**
|
|
11
|
+
* The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
|
|
12
|
+
*
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
elementInternals: ElementInternals;
|
|
10
16
|
/**
|
|
11
17
|
* The role of the element.
|
|
12
18
|
*
|
|
@@ -22,7 +28,7 @@ export declare class Divider extends FASTElement {
|
|
|
22
28
|
* @remarks
|
|
23
29
|
* HTML Attribute: orientation
|
|
24
30
|
*/
|
|
25
|
-
orientation
|
|
31
|
+
orientation?: DividerOrientation;
|
|
26
32
|
/**
|
|
27
33
|
* @public
|
|
28
34
|
* @remarks
|
|
@@ -41,4 +47,21 @@ export declare class Divider extends FASTElement {
|
|
|
41
47
|
* Adds padding to the beginning and end of the divider.
|
|
42
48
|
*/
|
|
43
49
|
inset?: boolean;
|
|
50
|
+
connectedCallback(): void;
|
|
51
|
+
/**
|
|
52
|
+
* Sets the element's internal role when the role attribute changes.
|
|
53
|
+
*
|
|
54
|
+
* @param previous - the previous role value
|
|
55
|
+
* @param next - the current role value
|
|
56
|
+
* @internal
|
|
57
|
+
*/
|
|
58
|
+
roleChanged(previous: string | null, next: string | null): void;
|
|
59
|
+
/**
|
|
60
|
+
* Sets the element's internal orientation when the orientation attribute changes.
|
|
61
|
+
*
|
|
62
|
+
* @param previous - the previous orientation value
|
|
63
|
+
* @param next - the current orientation value
|
|
64
|
+
* @internal
|
|
65
|
+
*/
|
|
66
|
+
orientationChanged(previous: string | null, next: string | null): void;
|
|
44
67
|
}
|
|
@@ -23,7 +23,7 @@ export const template = html `
|
|
|
23
23
|
<slot name="title"></slot>
|
|
24
24
|
<slot name="title-action">
|
|
25
25
|
<fluent-button
|
|
26
|
-
?hidden=${x => { var _a; return x.noTitleAction || ((_a = x.parentNode) === null || _a === void 0 ? void 0 : _a.type)
|
|
26
|
+
?hidden=${x => { var _a; return x.noTitleAction || ((_a = x.parentNode) === null || _a === void 0 ? void 0 : _a.type) === DialogType.alert; }}
|
|
27
27
|
tabindex="0"
|
|
28
28
|
part="title-action"
|
|
29
29
|
class="title-action"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-body.template.js","sourceRoot":"","sources":["../../../src/dialog-body/dialog-body.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,IAAI,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAEzD,MAAM,kBAAkB,GAAG,IAAI,CAAC,OAAO,CAAC;;;;;;;;;;;;;SAa/B,CAAC,CAAC;AAEX;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAwB,IAAI,CAAA;;;;;kBAK/B,CAAC,CAAC,EAAE,WAAC,OAAA,CAAC,CAAC,aAAa,IAAI,CAAA,MAAA,CAAC,CAAC,UAAU,0CAAE,IAAI,MAAK,UAAU,CAAC,
|
|
1
|
+
{"version":3,"file":"dialog-body.template.js","sourceRoot":"","sources":["../../../src/dialog-body/dialog-body.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,IAAI,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAEzD,MAAM,kBAAkB,GAAG,IAAI,CAAC,OAAO,CAAC;;;;;;;;;;;;;SAa/B,CAAC,CAAC;AAEX;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAwB,IAAI,CAAA;;;;;kBAK/B,CAAC,CAAC,EAAE,WAAC,OAAA,CAAC,CAAC,aAAa,IAAI,CAAA,MAAA,CAAC,CAAC,UAAU,0CAAE,IAAI,MAAK,UAAU,CAAC,KAAK,CAAA,EAAA;;;;;;iBAMhE,CAAC,CAAC,EAAE,WAAC,OAAA,MAAA,CAAC,CAAC,UAAU,0CAAE,IAAI,EAAE,CAAA,EAAA;UAChC,GAAG,CAAC,oBAAoB,CAAC;;UAEzB,kBAAkB;;;;;;CAM3B,CAAC"}
|
|
@@ -11,21 +11,46 @@ export class Divider extends FASTElement {
|
|
|
11
11
|
constructor() {
|
|
12
12
|
super(...arguments);
|
|
13
13
|
/**
|
|
14
|
-
* The
|
|
14
|
+
* The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
|
|
15
15
|
*
|
|
16
|
-
* @
|
|
17
|
-
* @remarks
|
|
18
|
-
* HTML Attribute: role
|
|
16
|
+
* @internal
|
|
19
17
|
*/
|
|
20
|
-
this.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
18
|
+
this.elementInternals = this.attachInternals();
|
|
19
|
+
}
|
|
20
|
+
connectedCallback() {
|
|
21
|
+
var _a, _b;
|
|
22
|
+
super.connectedCallback();
|
|
23
|
+
this.elementInternals.role = (_a = this.role) !== null && _a !== void 0 ? _a : DividerRole.separator;
|
|
24
|
+
if (this.role !== DividerRole.presentation) {
|
|
25
|
+
this.elementInternals.ariaOrientation = (_b = this.orientation) !== null && _b !== void 0 ? _b : DividerOrientation.horizontal;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Sets the element's internal role when the role attribute changes.
|
|
30
|
+
*
|
|
31
|
+
* @param previous - the previous role value
|
|
32
|
+
* @param next - the current role value
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
35
|
+
roleChanged(previous, next) {
|
|
36
|
+
if (this.$fastController.isConnected) {
|
|
37
|
+
this.elementInternals.role = `${next !== null && next !== void 0 ? next : DividerRole.separator}`;
|
|
38
|
+
}
|
|
39
|
+
if (next === DividerRole.presentation) {
|
|
40
|
+
this.elementInternals.ariaOrientation = null;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Sets the element's internal orientation when the orientation attribute changes.
|
|
45
|
+
*
|
|
46
|
+
* @param previous - the previous orientation value
|
|
47
|
+
* @param next - the current orientation value
|
|
48
|
+
* @internal
|
|
49
|
+
*/
|
|
50
|
+
orientationChanged(previous, next) {
|
|
51
|
+
if (this.$fastController.isConnected) {
|
|
52
|
+
this.elementInternals.ariaOrientation = this.role !== DividerRole.presentation ? next : null;
|
|
53
|
+
}
|
|
29
54
|
}
|
|
30
55
|
}
|
|
31
56
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"divider.js","sourceRoot":"","sources":["../../../src/divider/divider.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAA0C,kBAAkB,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAE/G;;;;;GAKG;AACH,MAAM,OAAO,OAAQ,SAAQ,WAAW;IAAxC;;QACE
|
|
1
|
+
{"version":3,"file":"divider.js","sourceRoot":"","sources":["../../../src/divider/divider.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAA0C,kBAAkB,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAE/G;;;;;GAKG;AACH,MAAM,OAAO,OAAQ,SAAQ,WAAW;IAAxC;;QACE;;;;WAIG;QACI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|
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
import { html } from '@microsoft/fast-element';
|
|
2
|
-
import { DividerRole } from './divider.options.js';
|
|
3
2
|
export function dividerTemplate() {
|
|
4
|
-
return html
|
|
5
|
-
<template
|
|
6
|
-
role="${x => x.role}"
|
|
7
|
-
aria-orientation="${x => (x.role !== DividerRole.presentation ? x.orientation : void 0)}"
|
|
8
|
-
>
|
|
9
|
-
<slot></slot>
|
|
10
|
-
</template>
|
|
11
|
-
`;
|
|
3
|
+
return html `<slot></slot>`;
|
|
12
4
|
}
|
|
13
5
|
/**
|
|
14
6
|
* Template for the Divider component
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"divider.template.js","sourceRoot":"","sources":["../../../src/divider/divider.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,IAAI,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"divider.template.js","sourceRoot":"","sources":["../../../src/divider/divider.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAGpE,MAAM,UAAU,eAAe;IAC7B,OAAO,IAAI,CAAG,eAAe,CAAC;AAChC,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAiC,eAAe,EAAE,CAAC"}
|
package/dist/web-components.d.ts
CHANGED
|
@@ -4566,6 +4566,12 @@ export declare function display(displayValue: CSSDisplayPropertyValue): string;
|
|
|
4566
4566
|
* A divider groups sections of content to create visual rhythm and hierarchy. Use dividers along with spacing and headers to organize content in your layout.
|
|
4567
4567
|
*/
|
|
4568
4568
|
export declare class Divider extends FASTElement {
|
|
4569
|
+
/**
|
|
4570
|
+
* The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
|
|
4571
|
+
*
|
|
4572
|
+
* @internal
|
|
4573
|
+
*/
|
|
4574
|
+
elementInternals: ElementInternals;
|
|
4569
4575
|
/**
|
|
4570
4576
|
* The role of the element.
|
|
4571
4577
|
*
|
|
@@ -4581,7 +4587,7 @@ export declare class Divider extends FASTElement {
|
|
|
4581
4587
|
* @remarks
|
|
4582
4588
|
* HTML Attribute: orientation
|
|
4583
4589
|
*/
|
|
4584
|
-
orientation
|
|
4590
|
+
orientation?: DividerOrientation;
|
|
4585
4591
|
/**
|
|
4586
4592
|
* @public
|
|
4587
4593
|
* @remarks
|
|
@@ -4600,6 +4606,23 @@ export declare class Divider extends FASTElement {
|
|
|
4600
4606
|
* Adds padding to the beginning and end of the divider.
|
|
4601
4607
|
*/
|
|
4602
4608
|
inset?: boolean;
|
|
4609
|
+
connectedCallback(): void;
|
|
4610
|
+
/**
|
|
4611
|
+
* Sets the element's internal role when the role attribute changes.
|
|
4612
|
+
*
|
|
4613
|
+
* @param previous - the previous role value
|
|
4614
|
+
* @param next - the current role value
|
|
4615
|
+
* @internal
|
|
4616
|
+
*/
|
|
4617
|
+
roleChanged(previous: string | null, next: string | null): void;
|
|
4618
|
+
/**
|
|
4619
|
+
* Sets the element's internal orientation when the orientation attribute changes.
|
|
4620
|
+
*
|
|
4621
|
+
* @param previous - the previous orientation value
|
|
4622
|
+
* @param next - the current orientation value
|
|
4623
|
+
* @internal
|
|
4624
|
+
*/
|
|
4625
|
+
orientationChanged(previous: string | null, next: string | null): void;
|
|
4603
4626
|
}
|
|
4604
4627
|
|
|
4605
4628
|
/**
|
package/dist/web-components.js
CHANGED
|
@@ -5775,7 +5775,7 @@ const dismissed16Regular = html.partial(`
|
|
|
5775
5775
|
fill="currentColor"
|
|
5776
5776
|
></path>
|
|
5777
5777
|
</svg>`);
|
|
5778
|
-
const template$k = html`<div class="title" part="title"><slot name="title"></slot><slot name="title-action"><fluent-button ?hidden=${x => x.noTitleAction || x.parentNode?.type
|
|
5778
|
+
const template$k = html`<div class="title" part="title"><slot name="title"></slot><slot name="title-action"><fluent-button ?hidden=${x => x.noTitleAction || x.parentNode?.type === DialogType.alert} tabindex="0" part="title-action" class="title-action" appearance="transparent" icon-only @click=${x => x.parentNode?.hide()} ${ref("defaultTitleAction")}>${dismissed16Regular}</fluent-button></slot></div><div class="content" part="content"><slot></slot></div><div class="actions" part="actions"><slot name="action"></slot></div>`;
|
|
5779
5779
|
|
|
5780
5780
|
const styles$j = css`
|
|
5781
5781
|
${display("grid")}
|
|
@@ -5813,8 +5813,46 @@ var __decorateClass$h = (decorators, target, key, kind) => {
|
|
|
5813
5813
|
class Divider extends FASTElement {
|
|
5814
5814
|
constructor() {
|
|
5815
5815
|
super(...arguments);
|
|
5816
|
-
|
|
5817
|
-
|
|
5816
|
+
/**
|
|
5817
|
+
* The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
|
|
5818
|
+
*
|
|
5819
|
+
* @internal
|
|
5820
|
+
*/
|
|
5821
|
+
this.elementInternals = this.attachInternals();
|
|
5822
|
+
}
|
|
5823
|
+
connectedCallback() {
|
|
5824
|
+
super.connectedCallback();
|
|
5825
|
+
this.elementInternals.role = this.role ?? DividerRole.separator;
|
|
5826
|
+
if (this.role !== DividerRole.presentation) {
|
|
5827
|
+
this.elementInternals.ariaOrientation = this.orientation ?? DividerOrientation.horizontal;
|
|
5828
|
+
}
|
|
5829
|
+
}
|
|
5830
|
+
/**
|
|
5831
|
+
* Sets the element's internal role when the role attribute changes.
|
|
5832
|
+
*
|
|
5833
|
+
* @param previous - the previous role value
|
|
5834
|
+
* @param next - the current role value
|
|
5835
|
+
* @internal
|
|
5836
|
+
*/
|
|
5837
|
+
roleChanged(previous, next) {
|
|
5838
|
+
if (this.$fastController.isConnected) {
|
|
5839
|
+
this.elementInternals.role = `${next ?? DividerRole.separator}`;
|
|
5840
|
+
}
|
|
5841
|
+
if (next === DividerRole.presentation) {
|
|
5842
|
+
this.elementInternals.ariaOrientation = null;
|
|
5843
|
+
}
|
|
5844
|
+
}
|
|
5845
|
+
/**
|
|
5846
|
+
* Sets the element's internal orientation when the orientation attribute changes.
|
|
5847
|
+
*
|
|
5848
|
+
* @param previous - the previous orientation value
|
|
5849
|
+
* @param next - the current orientation value
|
|
5850
|
+
* @internal
|
|
5851
|
+
*/
|
|
5852
|
+
orientationChanged(previous, next) {
|
|
5853
|
+
if (this.$fastController.isConnected) {
|
|
5854
|
+
this.elementInternals.ariaOrientation = this.role !== DividerRole.presentation ? next : null;
|
|
5855
|
+
}
|
|
5818
5856
|
}
|
|
5819
5857
|
}
|
|
5820
5858
|
__decorateClass$h([attr], Divider.prototype, "role", 2);
|
|
@@ -5828,7 +5866,7 @@ __decorateClass$h([attr({
|
|
|
5828
5866
|
})], Divider.prototype, "inset", 2);
|
|
5829
5867
|
|
|
5830
5868
|
function dividerTemplate() {
|
|
5831
|
-
return html`<
|
|
5869
|
+
return html`<slot></slot>`;
|
|
5832
5870
|
}
|
|
5833
5871
|
const template$j = dividerTemplate();
|
|
5834
5872
|
|