@fluentui/web-components 3.0.0-beta.28 → 3.0.0-beta.29
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/anchor-button/anchor-button.d.ts +36 -34
- package/dist/dts/index-rollup.d.ts +1 -0
- package/dist/dts/index.d.ts +2 -2
- package/dist/dts/link/define.d.ts +1 -0
- package/dist/dts/link/index.d.ts +4 -0
- package/dist/dts/link/link.bench.d.ts +3 -0
- package/dist/dts/link/link.d.ts +33 -0
- package/dist/dts/link/link.definition.d.ts +7 -0
- package/dist/dts/link/link.options.d.ts +52 -0
- package/dist/dts/link/link.styles.d.ts +1 -0
- package/dist/dts/link/link.template.d.ts +12 -0
- package/dist/esm/anchor-button/anchor-button.js +26 -21
- package/dist/esm/anchor-button/anchor-button.js.map +1 -1
- package/dist/esm/index-rollup.js +1 -0
- package/dist/esm/index-rollup.js.map +1 -1
- package/dist/esm/index.js +2 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/link/define.js +4 -0
- package/dist/esm/link/define.js.map +1 -0
- package/dist/esm/link/index.js +5 -0
- package/dist/esm/link/index.js.map +1 -0
- package/dist/esm/link/link.bench.js +11 -0
- package/dist/esm/link/link.bench.js.map +1 -0
- package/dist/esm/link/link.definition.js +15 -0
- package/dist/esm/link/link.definition.js.map +1 -0
- package/dist/esm/link/link.js +36 -0
- package/dist/esm/link/link.js.map +1 -0
- package/dist/esm/link/link.options.js +21 -0
- package/dist/esm/link/link.options.js.map +1 -0
- package/dist/esm/link/link.styles.js +67 -0
- package/dist/esm/link/link.styles.js.map +1 -0
- package/dist/esm/link/link.template.js +22 -0
- package/dist/esm/link/link.template.js.map +1 -0
- package/dist/esm/theme/set-theme.js +8 -3
- package/dist/esm/theme/set-theme.js.map +1 -1
- package/dist/web-components.d.ts +211 -136
- package/dist/web-components.js +330 -281
- package/dist/web-components.min.js +232 -228
- package/package.json +6 -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 Thu, 13 Jun 2024 04:06:30 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [3.0.0-beta.29](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v3.0.0-beta.29)
|
|
8
|
+
|
|
9
|
+
Thu, 13 Jun 2024 04:06:30 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v3.0.0-beta.28..@fluentui/web-components_v3.0.0-beta.29)
|
|
11
|
+
|
|
12
|
+
### Changes
|
|
13
|
+
|
|
14
|
+
- refactor setTheme() to reduce code duplication ([PR #31679](https://github.com/microsoft/fluentui/pull/31679) by machi@microsoft.com)
|
|
15
|
+
- add link as a new web component ([PR #31676](https://github.com/microsoft/fluentui/pull/31676) by 13071055+chrisdholt@users.noreply.github.com)
|
|
16
|
+
|
|
7
17
|
## [3.0.0-beta.28](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v3.0.0-beta.28)
|
|
8
18
|
|
|
9
|
-
Wed, 12 Jun 2024 04:06:
|
|
19
|
+
Wed, 12 Jun 2024 04:06:09 GMT
|
|
10
20
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v3.0.0-beta.27..@fluentui/web-components_v3.0.0-beta.28)
|
|
11
21
|
|
|
12
22
|
### Changes
|
|
@@ -19,7 +19,7 @@ export type AnchorOptions = StartEndOptions<AnchorButton>;
|
|
|
19
19
|
*
|
|
20
20
|
* @public
|
|
21
21
|
*/
|
|
22
|
-
export declare class
|
|
22
|
+
export declare class BaseAnchor extends FASTElement {
|
|
23
23
|
/**
|
|
24
24
|
* The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
|
|
25
25
|
*
|
|
@@ -104,6 +104,41 @@ export declare class AnchorButton extends FASTElement {
|
|
|
104
104
|
* HTML Attribute: `type`
|
|
105
105
|
*/
|
|
106
106
|
type?: string;
|
|
107
|
+
constructor();
|
|
108
|
+
connectedCallback(): void;
|
|
109
|
+
disconnectedCallback(): void;
|
|
110
|
+
/**
|
|
111
|
+
* Handles changes to observable properties
|
|
112
|
+
* @internal
|
|
113
|
+
* @param source - the source of the change
|
|
114
|
+
* @param propertyName - the property name being changed
|
|
115
|
+
*/
|
|
116
|
+
handleChange(source: any, propertyName: string): void;
|
|
117
|
+
/**
|
|
118
|
+
* Handles the anchor click event.
|
|
119
|
+
*
|
|
120
|
+
* @param e - The event object
|
|
121
|
+
* @internal
|
|
122
|
+
*/
|
|
123
|
+
clickHandler(): boolean;
|
|
124
|
+
/**
|
|
125
|
+
* Handles keypress events for the anchor.
|
|
126
|
+
*
|
|
127
|
+
* @param e - the keyboard event
|
|
128
|
+
* @returns - the return value of the click handler
|
|
129
|
+
* @public
|
|
130
|
+
*/
|
|
131
|
+
keypressHandler(e: KeyboardEvent): boolean | void;
|
|
132
|
+
/**
|
|
133
|
+
* A method for updating proxy attributes when attributes have changed
|
|
134
|
+
* @internal
|
|
135
|
+
* @param attribute - an attribute to set/remove
|
|
136
|
+
* @param value - the value of the attribute
|
|
137
|
+
*/
|
|
138
|
+
private handleProxyAttributeChange;
|
|
139
|
+
private createProxyElement;
|
|
140
|
+
}
|
|
141
|
+
export declare class AnchorButton extends BaseAnchor {
|
|
107
142
|
/**
|
|
108
143
|
* The appearance the anchor button should have.
|
|
109
144
|
*
|
|
@@ -136,39 +171,6 @@ export declare class AnchorButton extends FASTElement {
|
|
|
136
171
|
* HTML Attribute: `icon-only`
|
|
137
172
|
*/
|
|
138
173
|
iconOnly: boolean;
|
|
139
|
-
constructor();
|
|
140
|
-
connectedCallback(): void;
|
|
141
|
-
disconnectedCallback(): void;
|
|
142
|
-
/**
|
|
143
|
-
* Handles changes to observable properties
|
|
144
|
-
* @internal
|
|
145
|
-
* @param source
|
|
146
|
-
* @param propertyName
|
|
147
|
-
*/
|
|
148
|
-
handleChange(source: any, propertyName: string): void;
|
|
149
|
-
/**
|
|
150
|
-
* Handles the anchor click event.
|
|
151
|
-
*
|
|
152
|
-
* @param e - The event object
|
|
153
|
-
* @internal
|
|
154
|
-
*/
|
|
155
|
-
clickHandler(): boolean;
|
|
156
|
-
/**
|
|
157
|
-
* Handles keypress events for the anchor.
|
|
158
|
-
*
|
|
159
|
-
* @param e - the keyboard event
|
|
160
|
-
* @returns - the return value of the click handler
|
|
161
|
-
* @public
|
|
162
|
-
*/
|
|
163
|
-
keypressHandler(e: KeyboardEvent): boolean | void;
|
|
164
|
-
/**
|
|
165
|
-
* A method for updating proxy attributes when attributes have changed
|
|
166
|
-
* @internal
|
|
167
|
-
* @param attribute
|
|
168
|
-
* @param value
|
|
169
|
-
*/
|
|
170
|
-
private handleProxyAttributeChange;
|
|
171
|
-
private createProxyElement;
|
|
172
174
|
}
|
|
173
175
|
/**
|
|
174
176
|
* Mark internal because exporting class and interface of the same name
|
package/dist/dts/index.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
export { AccordionItem, accordionItemDefinition, AccordionItemExpandIconPosition, AccordionItemSize, accordionItemStyles, accordionItemTemplate, } from './accordion-item/index.js';
|
|
2
2
|
export type { AccordionItemOptions } from './accordion-item/index.js';
|
|
3
3
|
export { Accordion, accordionDefinition, AccordionExpandMode, accordionStyles, accordionTemplate, } from './accordion/index.js';
|
|
4
|
-
export {
|
|
5
|
-
export type { AnchorButtonOptions } from './anchor-button/index.js';
|
|
4
|
+
export { Link, LinkAppearance, LinkDefinition, LinkTemplate, LinkTarget } from './link/index.js';
|
|
6
5
|
export { Avatar, AvatarActive, AvatarAppearance, AvatarColor, AvatarDefinition, AvatarNamedColor, AvatarShape, AvatarSize, AvatarStyles, AvatarTemplate, } from './avatar/index.js';
|
|
7
6
|
export { Badge, BadgeAppearance, BadgeColor, BadgeDefinition, BadgeShape, BadgeSize, BadgeStyles, BadgeTemplate, } from './badge/index.js';
|
|
8
7
|
export { Button, ButtonAppearance, ButtonDefinition, ButtonFormTarget, ButtonShape, ButtonSize, ButtonStyles, ButtonTemplate, ButtonType, } from './button/index.js';
|
|
@@ -19,6 +18,7 @@ export type { SlottableInput } from './field/index.js';
|
|
|
19
18
|
export { FluentDesignSystem } from './fluent-design-system.js';
|
|
20
19
|
export { Image, ImageDefinition, ImageFit, ImageShape, ImageStyles, ImageTemplate } from './image/index.js';
|
|
21
20
|
export { Label, LabelDefinition, LabelSize, LabelStyles, LabelTemplate, LabelWeight } from './label/index.js';
|
|
21
|
+
export { AnchorButton, AnchorButtonAppearance, AnchorButtonDefinition, AnchorButtonShape, AnchorButtonSize, AnchorButtonTemplate, AnchorTarget, } from './anchor-button/index.js';
|
|
22
22
|
export { MenuButton, MenuButtonAppearance, MenuButtonDefinition, MenuButtonShape, MenuButtonSize, MenuButtonStyles, MenuButtonTemplate, } from './menu-button/index.js';
|
|
23
23
|
export type { MenuButtonOptions } from './menu-button/index.js';
|
|
24
24
|
export { MenuItem, MenuItemDefinition, MenuItemRole, MenuItemStyles, MenuItemTemplate, roleForMenuItem, } from './menu-item/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { BaseAnchor } from '../anchor-button/anchor-button.js';
|
|
2
|
+
import { type LinkAppearance } from './link.options.js';
|
|
3
|
+
/**
|
|
4
|
+
* An Anchor Custom HTML Element.
|
|
5
|
+
* Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element }.
|
|
6
|
+
*
|
|
7
|
+
* @slot start - Content which can be provided before the link content
|
|
8
|
+
* @slot end - Content which can be provided after the link content
|
|
9
|
+
* @slot - The default slot for link content
|
|
10
|
+
*
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
export declare class Link extends BaseAnchor {
|
|
14
|
+
/**
|
|
15
|
+
* The appearance the link should have.
|
|
16
|
+
*
|
|
17
|
+
* @public
|
|
18
|
+
* @remarks
|
|
19
|
+
* HTML Attribute: `appearance`
|
|
20
|
+
*/
|
|
21
|
+
appearance?: LinkAppearance | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* The link is inline with text
|
|
24
|
+
* In chromium browsers, if the link is contained within a semantic
|
|
25
|
+
* text element (`h1`, `h2`, `h3`, `h4`, `h5`, `h6`, `p`) or `fluent-text`,
|
|
26
|
+
* `:host-context()` ensures inline links are styled appropriately.
|
|
27
|
+
*
|
|
28
|
+
* @public
|
|
29
|
+
* @remarks
|
|
30
|
+
* HTML Attribute: `inline`
|
|
31
|
+
*/
|
|
32
|
+
inline: boolean;
|
|
33
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { AnchorTarget } from '../anchor-button/anchor-button.options.js';
|
|
2
|
+
import type { ValuesOf } from '../utils/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Link Appearance constants
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export declare const LinkAppearance: {
|
|
8
|
+
readonly subtle: "subtle";
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* An Link can be subtle or the default appearance
|
|
12
|
+
* @public
|
|
13
|
+
*/
|
|
14
|
+
export type LinkAppearance = ValuesOf<typeof LinkAppearance>;
|
|
15
|
+
/**
|
|
16
|
+
* Link target values.
|
|
17
|
+
*
|
|
18
|
+
* @public
|
|
19
|
+
*/
|
|
20
|
+
export declare const LinkTarget: {
|
|
21
|
+
readonly _self: "_self";
|
|
22
|
+
readonly _blank: "_blank";
|
|
23
|
+
readonly _parent: "_parent";
|
|
24
|
+
readonly _top: "_top";
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Type for link target values.
|
|
28
|
+
*
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
export type LinkTarget = ValuesOf<typeof AnchorTarget>;
|
|
32
|
+
/**
|
|
33
|
+
* Reflected link attributes.
|
|
34
|
+
*
|
|
35
|
+
* @public
|
|
36
|
+
*/
|
|
37
|
+
export declare const LinkAttributes: {
|
|
38
|
+
readonly download: "download";
|
|
39
|
+
readonly href: "href";
|
|
40
|
+
readonly hreflang: "hreflang";
|
|
41
|
+
readonly ping: "ping";
|
|
42
|
+
readonly referrerpolicy: "referrerpolicy";
|
|
43
|
+
readonly rel: "rel";
|
|
44
|
+
readonly target: "target";
|
|
45
|
+
readonly type: "type";
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Type for link attributes.
|
|
49
|
+
*
|
|
50
|
+
* @public
|
|
51
|
+
*/
|
|
52
|
+
export type LinkAttributes = ValuesOf<typeof LinkAttributes>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("@microsoft/fast-element").ElementStyles;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ElementViewTemplate, ViewTemplate } from '@microsoft/fast-element';
|
|
2
|
+
import type { Link } from './link.js';
|
|
3
|
+
/**
|
|
4
|
+
* The template for the Link component.
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export declare function anchorTemplate<T extends Link>(): ViewTemplate<T>;
|
|
8
|
+
/**
|
|
9
|
+
* The template for the Link component.
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export declare const template: ElementViewTemplate<Link>;
|
|
@@ -16,7 +16,7 @@ import { AnchorAttributes, } from './anchor-button.options.js';
|
|
|
16
16
|
*
|
|
17
17
|
* @public
|
|
18
18
|
*/
|
|
19
|
-
export class
|
|
19
|
+
export class BaseAnchor extends FASTElement {
|
|
20
20
|
constructor() {
|
|
21
21
|
super();
|
|
22
22
|
/**
|
|
@@ -30,14 +30,6 @@ export class AnchorButton extends FASTElement {
|
|
|
30
30
|
* @internal
|
|
31
31
|
*/
|
|
32
32
|
this.internalProxyAnchor = this.createProxyElement();
|
|
33
|
-
/**
|
|
34
|
-
* The anchor button has an icon only, no text content
|
|
35
|
-
*
|
|
36
|
-
* @public
|
|
37
|
-
* @remarks
|
|
38
|
-
* HTML Attribute: `icon-only`
|
|
39
|
-
*/
|
|
40
|
-
this.iconOnly = false;
|
|
41
33
|
this.elementInternals.role = 'link';
|
|
42
34
|
}
|
|
43
35
|
connectedCallback() {
|
|
@@ -55,8 +47,8 @@ export class AnchorButton extends FASTElement {
|
|
|
55
47
|
/**
|
|
56
48
|
* Handles changes to observable properties
|
|
57
49
|
* @internal
|
|
58
|
-
* @param source
|
|
59
|
-
* @param propertyName
|
|
50
|
+
* @param source - the source of the change
|
|
51
|
+
* @param propertyName - the property name being changed
|
|
60
52
|
*/
|
|
61
53
|
handleChange(source, propertyName) {
|
|
62
54
|
var _a;
|
|
@@ -94,8 +86,8 @@ export class AnchorButton extends FASTElement {
|
|
|
94
86
|
/**
|
|
95
87
|
* A method for updating proxy attributes when attributes have changed
|
|
96
88
|
* @internal
|
|
97
|
-
* @param attribute
|
|
98
|
-
* @param value
|
|
89
|
+
* @param attribute - an attribute to set/remove
|
|
90
|
+
* @param value - the value of the attribute
|
|
99
91
|
*/
|
|
100
92
|
handleProxyAttributeChange(attribute, value) {
|
|
101
93
|
if (value) {
|
|
@@ -114,28 +106,41 @@ export class AnchorButton extends FASTElement {
|
|
|
114
106
|
}
|
|
115
107
|
__decorate([
|
|
116
108
|
attr
|
|
117
|
-
],
|
|
109
|
+
], BaseAnchor.prototype, "download", void 0);
|
|
118
110
|
__decorate([
|
|
119
111
|
attr
|
|
120
|
-
],
|
|
112
|
+
], BaseAnchor.prototype, "href", void 0);
|
|
121
113
|
__decorate([
|
|
122
114
|
attr
|
|
123
|
-
],
|
|
115
|
+
], BaseAnchor.prototype, "hreflang", void 0);
|
|
124
116
|
__decorate([
|
|
125
117
|
attr
|
|
126
|
-
],
|
|
118
|
+
], BaseAnchor.prototype, "ping", void 0);
|
|
127
119
|
__decorate([
|
|
128
120
|
attr
|
|
129
|
-
],
|
|
121
|
+
], BaseAnchor.prototype, "referrerpolicy", void 0);
|
|
130
122
|
__decorate([
|
|
131
123
|
attr
|
|
132
|
-
],
|
|
124
|
+
], BaseAnchor.prototype, "rel", void 0);
|
|
133
125
|
__decorate([
|
|
134
126
|
attr
|
|
135
|
-
],
|
|
127
|
+
], BaseAnchor.prototype, "target", void 0);
|
|
136
128
|
__decorate([
|
|
137
129
|
attr
|
|
138
|
-
],
|
|
130
|
+
], BaseAnchor.prototype, "type", void 0);
|
|
131
|
+
export class AnchorButton extends BaseAnchor {
|
|
132
|
+
constructor() {
|
|
133
|
+
super(...arguments);
|
|
134
|
+
/**
|
|
135
|
+
* The anchor button has an icon only, no text content
|
|
136
|
+
*
|
|
137
|
+
* @public
|
|
138
|
+
* @remarks
|
|
139
|
+
* HTML Attribute: `icon-only`
|
|
140
|
+
*/
|
|
141
|
+
this.iconOnly = false;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
139
144
|
__decorate([
|
|
140
145
|
attr
|
|
141
146
|
], AnchorButton.prototype, "appearance", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anchor-button.js","sourceRoot":"","sources":["../../../src/anchor-button/anchor-button.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EACL,gBAAgB,GAKjB,MAAM,4BAA4B,CAAC;AAQpC;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"anchor-button.js","sourceRoot":"","sources":["../../../src/anchor-button/anchor-button.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EA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;AAUvD;IADC,IAAI;2CACwC;AAU7C;IADC,IAAI;0CAC0B;AAU/B;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;8CACjB;AAWnC,WAAW,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC"}
|
package/dist/esm/index-rollup.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-rollup.js","sourceRoot":"","sources":["../../src/index-rollup.ts"],"names":[],"mappings":"AAAA,OAAO,4BAA4B,CAAC;AACpC,OAAO,uBAAuB,CAAC;AAC/B,OAAO,2BAA2B,CAAC;AACnC,OAAO,oBAAoB,CAAC;AAC5B,OAAO,mBAAmB,CAAC;AAC3B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,sBAAsB,CAAC;AAC9B,OAAO,6BAA6B,CAAC;AACrC,OAAO,2BAA2B,CAAC;AACnC,OAAO,oBAAoB,CAAC;AAC5B,OAAO,yBAAyB,CAAC;AACjC,OAAO,qBAAqB,CAAC;AAC7B,OAAO,mBAAmB,CAAC;AAC3B,OAAO,mBAAmB,CAAC;AAC3B,OAAO,mBAAmB,CAAC;AAC3B,OAAO,yBAAyB,CAAC;AACjC,OAAO,uBAAuB,CAAC;AAC/B,OAAO,uBAAuB,CAAC;AAC/B,OAAO,kBAAkB,CAAC;AAC1B,OAAO,0BAA0B,CAAC;AAClC,OAAO,yBAAyB,CAAC;AACjC,OAAO,mBAAmB,CAAC;AAC3B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,qBAAqB,CAAC;AAC7B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,uBAAuB,CAAC;AAC/B,OAAO,iBAAiB,CAAC;AACzB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,wBAAwB,CAAC;AAChC,OAAO,kBAAkB,CAAC;AAC1B,OAAO,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index-rollup.js","sourceRoot":"","sources":["../../src/index-rollup.ts"],"names":[],"mappings":"AAAA,OAAO,4BAA4B,CAAC;AACpC,OAAO,uBAAuB,CAAC;AAC/B,OAAO,2BAA2B,CAAC;AACnC,OAAO,oBAAoB,CAAC;AAC5B,OAAO,mBAAmB,CAAC;AAC3B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,sBAAsB,CAAC;AAC9B,OAAO,6BAA6B,CAAC;AACrC,OAAO,2BAA2B,CAAC;AACnC,OAAO,oBAAoB,CAAC;AAC5B,OAAO,yBAAyB,CAAC;AACjC,OAAO,qBAAqB,CAAC;AAC7B,OAAO,mBAAmB,CAAC;AAC3B,OAAO,mBAAmB,CAAC;AAC3B,OAAO,mBAAmB,CAAC;AAC3B,OAAO,kBAAkB,CAAC;AAC1B,OAAO,yBAAyB,CAAC;AACjC,OAAO,uBAAuB,CAAC;AAC/B,OAAO,uBAAuB,CAAC;AAC/B,OAAO,kBAAkB,CAAC;AAC1B,OAAO,0BAA0B,CAAC;AAClC,OAAO,yBAAyB,CAAC;AACjC,OAAO,mBAAmB,CAAC;AAC3B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,qBAAqB,CAAC;AAC7B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,uBAAuB,CAAC;AAC/B,OAAO,iBAAiB,CAAC;AACzB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,wBAAwB,CAAC;AAChC,OAAO,kBAAkB,CAAC;AAC1B,OAAO,2BAA2B,CAAC"}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { AccordionItem, accordionItemDefinition, AccordionItemExpandIconPosition, AccordionItemSize, accordionItemStyles, accordionItemTemplate, } from './accordion-item/index.js';
|
|
2
2
|
export { Accordion, accordionDefinition, AccordionExpandMode, accordionStyles, accordionTemplate, } from './accordion/index.js';
|
|
3
|
-
export {
|
|
3
|
+
export { Link, LinkAppearance, LinkDefinition, LinkTemplate, LinkTarget } from './link/index.js';
|
|
4
4
|
export { Avatar, AvatarActive, AvatarAppearance, AvatarColor, AvatarDefinition, AvatarNamedColor, AvatarShape, AvatarSize, AvatarStyles, AvatarTemplate, } from './avatar/index.js';
|
|
5
5
|
export { Badge, BadgeAppearance, BadgeColor, BadgeDefinition, BadgeShape, BadgeSize, BadgeStyles, BadgeTemplate, } from './badge/index.js';
|
|
6
6
|
export { Button, ButtonAppearance, ButtonDefinition, ButtonFormTarget, ButtonShape, ButtonSize, ButtonStyles, ButtonTemplate, ButtonType, } from './button/index.js';
|
|
@@ -14,6 +14,7 @@ export { Field, FieldLabelPosition, ValidationFlags, FieldDefinition, FieldStyle
|
|
|
14
14
|
export { FluentDesignSystem } from './fluent-design-system.js';
|
|
15
15
|
export { Image, ImageDefinition, ImageFit, ImageShape, ImageStyles, ImageTemplate } from './image/index.js';
|
|
16
16
|
export { Label, LabelDefinition, LabelSize, LabelStyles, LabelTemplate, LabelWeight } from './label/index.js';
|
|
17
|
+
export { AnchorButton, AnchorButtonAppearance, AnchorButtonDefinition, AnchorButtonShape, AnchorButtonSize, AnchorButtonTemplate, AnchorTarget, } from './anchor-button/index.js';
|
|
17
18
|
export { MenuButton, MenuButtonAppearance, MenuButtonDefinition, MenuButtonShape, MenuButtonSize, MenuButtonStyles, MenuButtonTemplate, } from './menu-button/index.js';
|
|
18
19
|
export { MenuItem, MenuItemDefinition, MenuItemRole, MenuItemStyles, MenuItemTemplate, roleForMenuItem, } from './menu-item/index.js';
|
|
19
20
|
export { MenuList, MenuListDefinition, MenuListStyles, MenuListTemplate } from './menu-list/index.js';
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,uBAAuB,EACvB,+BAA+B,EAC/B,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,SAAS,EACT,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,EACf,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,uBAAuB,EACvB,+BAA+B,EAC/B,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,SAAS,EACT,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,EACf,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,cAAc,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACjG,OAAO,EACL,MAAM,EACN,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,YAAY,EACZ,cAAc,GACf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,KAAK,EACL,eAAe,EACf,UAAU,EACV,eAAe,EACf,UAAU,EACV,SAAS,EACT,WAAW,EACX,aAAa,GACd,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,MAAM,EACN,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,YAAY,EACZ,cAAc,EACd,UAAU,GACX,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,QAAQ,EACR,kBAAkB,EAClB,aAAa,EACb,YAAY,EACZ,cAAc,EACd,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,cAAc,EACd,wBAAwB,EACxB,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,YAAY,EACZ,sBAAsB,EACtB,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EACjB,gB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AgB,CAAC;AAE5E,OAAO,EACL,IAAI,EACJ,cAAc,EACd,cAAc,EACd,eAAe,EACf,QAAQ,EACR,UAAU,EACV,YAAY,GACb,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,SAAS,EACT,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,eAAe,EACf,iBAAiB,EACjB,aAAa,GACd,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,IAAI,EACJ,SAAS,EACT,cAAc,EACd,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,UAAU,GACX,MAAM,iBAAiB,CAAC;AACzB,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EACL,YAAY,EACZ,sBAAsB,EACtB,sBAAsB,EACtB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,0BAA0B,EAC1B,8BAA8B,EAC9B,2BAA2B,EAC3B,kBAAkB,EAClB,4BAA4B,GAC7B,MAAM,sDAAsD,CAAC;AAE9D,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define.js","sourceRoot":"","sources":["../../../src/link/define.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,UAAU,CAAC,MAAM,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/link/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FluentDesignSystem } from '../fluent-design-system.js';
|
|
2
|
+
import { definition } from './link.definition.js';
|
|
3
|
+
definition.define(FluentDesignSystem.registry);
|
|
4
|
+
const itemRenderer = () => {
|
|
5
|
+
const btn = document.createElement('fluent-link');
|
|
6
|
+
btn.appendChild(document.createTextNode('Link'));
|
|
7
|
+
return btn;
|
|
8
|
+
};
|
|
9
|
+
export default itemRenderer;
|
|
10
|
+
export { tests } from '../utils/benchmark-wrapper.js';
|
|
11
|
+
//# sourceMappingURL=link.bench.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link.bench.js","sourceRoot":"","sources":["../../../src/link/link.bench.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,UAAU,CAAC,MAAM,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;AAE/C,MAAM,YAAY,GAAG,GAAG,EAAE;IACxB,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;IAClD,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;IACjD,OAAO,GAAG,CAAC;AACb,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC;AAC5B,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FluentDesignSystem } from '../fluent-design-system.js';
|
|
2
|
+
import { Link } from './link.js';
|
|
3
|
+
import { styles } from './link.styles.js';
|
|
4
|
+
import { template } from './link.template.js';
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
* @remarks
|
|
8
|
+
* HTML Element: \<fluent-link\>
|
|
9
|
+
*/
|
|
10
|
+
export const definition = Link.compose({
|
|
11
|
+
name: `${FluentDesignSystem.prefix}-link`,
|
|
12
|
+
template,
|
|
13
|
+
styles,
|
|
14
|
+
});
|
|
15
|
+
//# sourceMappingURL=link.definition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link.definition.js","sourceRoot":"","sources":["../../../src/link/link.definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC;IACrC,IAAI,EAAE,GAAG,kBAAkB,CAAC,MAAM,OAAO;IACzC,QAAQ;IACR,MAAM;CACP,CAAC,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { attr } from '@microsoft/fast-element';
|
|
3
|
+
import { BaseAnchor } from '../anchor-button/anchor-button.js';
|
|
4
|
+
/**
|
|
5
|
+
* An Anchor Custom HTML Element.
|
|
6
|
+
* Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element }.
|
|
7
|
+
*
|
|
8
|
+
* @slot start - Content which can be provided before the link content
|
|
9
|
+
* @slot end - Content which can be provided after the link content
|
|
10
|
+
* @slot - The default slot for link content
|
|
11
|
+
*
|
|
12
|
+
* @public
|
|
13
|
+
*/
|
|
14
|
+
export class Link extends BaseAnchor {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments);
|
|
17
|
+
/**
|
|
18
|
+
* The link is inline with text
|
|
19
|
+
* In chromium browsers, if the link is contained within a semantic
|
|
20
|
+
* text element (`h1`, `h2`, `h3`, `h4`, `h5`, `h6`, `p`) or `fluent-text`,
|
|
21
|
+
* `:host-context()` ensures inline links are styled appropriately.
|
|
22
|
+
*
|
|
23
|
+
* @public
|
|
24
|
+
* @remarks
|
|
25
|
+
* HTML Attribute: `inline`
|
|
26
|
+
*/
|
|
27
|
+
this.inline = false;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
__decorate([
|
|
31
|
+
attr
|
|
32
|
+
], Link.prototype, "appearance", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
attr({ mode: 'boolean' })
|
|
35
|
+
], Link.prototype, "inline", void 0);
|
|
36
|
+
//# sourceMappingURL=link.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link.js","sourceRoot":"","sources":["../../../src/link/link.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAG/D;;;;;;;;;GASG;AACH,MAAM,OAAO,IAAK,SAAQ,UAAU;IAApC;;QAWE;;;;;;;;;WASG;QAEI,WAAM,GAAY,KAAK,CAAC;IACjC,CAAC;CAAA;AAdC;IADC,IAAI;wCAC0C;AAa/C;IADC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;oCACK"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AnchorAttributes, AnchorTarget } from '../anchor-button/anchor-button.options.js';
|
|
2
|
+
/**
|
|
3
|
+
* Link Appearance constants
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export const LinkAppearance = {
|
|
7
|
+
subtle: 'subtle',
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Link target values.
|
|
11
|
+
*
|
|
12
|
+
* @public
|
|
13
|
+
*/
|
|
14
|
+
export const LinkTarget = AnchorTarget;
|
|
15
|
+
/**
|
|
16
|
+
* Reflected link attributes.
|
|
17
|
+
*
|
|
18
|
+
* @public
|
|
19
|
+
*/
|
|
20
|
+
export const LinkAttributes = AnchorAttributes;
|
|
21
|
+
//# sourceMappingURL=link.options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link.options.js","sourceRoot":"","sources":["../../../src/link/link.options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AAG3F;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,MAAM,EAAE,QAAQ;CACR,CAAC;AAQX;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,YAAY,CAAC;AASvC;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { css } from '@microsoft/fast-element';
|
|
2
|
+
import { display, forcedColorsStylesheetBehavior } from '../utils/index.js';
|
|
3
|
+
import { colorBrandForegroundLink, colorBrandForegroundLinkHover, colorBrandForegroundLinkPressed, colorNeutralForeground2Link, colorNeutralForeground2LinkHover, colorNeutralForeground2LinkPressed, fontFamilyBase, fontSizeBase300, fontWeightRegular, strokeWidthThin, } from '../theme/design-tokens.js';
|
|
4
|
+
export const styles = css `
|
|
5
|
+
${display('inline')}
|
|
6
|
+
|
|
7
|
+
:host {
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
background-color: transparent;
|
|
10
|
+
color: ${colorBrandForegroundLink};
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
font-family: ${fontFamilyBase};
|
|
13
|
+
font-size: ${fontSizeBase300};
|
|
14
|
+
font-weight: ${fontWeightRegular};
|
|
15
|
+
margin: 0;
|
|
16
|
+
padding: 0;
|
|
17
|
+
overflow: inherit;
|
|
18
|
+
text-align: left;
|
|
19
|
+
text-decoration: none;
|
|
20
|
+
text-decoration-thinkness: ${strokeWidthThin};
|
|
21
|
+
text-overflow: inherit;
|
|
22
|
+
user-select: text;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
:host(:is(:hover, :focus-visible)) {
|
|
26
|
+
outline: none;
|
|
27
|
+
text-decoration-line: underline;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@media (hover: hover) {
|
|
31
|
+
:host(:hover) {
|
|
32
|
+
color: ${colorBrandForegroundLinkHover};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
:host(:active) {
|
|
36
|
+
color: ${colorBrandForegroundLinkPressed};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:host([appearance='subtle']:hover) {
|
|
40
|
+
color: ${colorNeutralForeground2LinkHover};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
:host([appearance='subtle']:active) {
|
|
44
|
+
color: ${colorNeutralForeground2LinkPressed};
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
:host([appearance='subtle']) {
|
|
49
|
+
color: ${colorNeutralForeground2Link};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
:host-context(:is(h1, h2, h3, h4, h5, h6, p, fluent-text)),
|
|
53
|
+
:host([inline]) {
|
|
54
|
+
font: inherit;
|
|
55
|
+
text-decoration: underline;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
:host(:not([href])) {
|
|
59
|
+
color: inherit;
|
|
60
|
+
text-decoration: none;
|
|
61
|
+
}
|
|
62
|
+
`.withBehaviors(forcedColorsStylesheetBehavior(css `
|
|
63
|
+
:host {
|
|
64
|
+
color: LinkText;
|
|
65
|
+
}
|
|
66
|
+
`));
|
|
67
|
+
//# sourceMappingURL=link.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link.styles.js","sourceRoot":"","sources":["../../../src/link/link.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,8BAA8B,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EACL,wBAAwB,EACxB,6BAA6B,EAC7B,+BAA+B,EAC/B,2BAA2B,EAC3B,gCAAgC,EAChC,kCAAkC,EAClC,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,eAAe,GAChB,MAAM,2BAA2B,CAAC;AAEnC,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;IACrB,OAAO,CAAC,QAAQ,CAAC;;;;;aAKR,wBAAwB;;mBAElB,cAAc;iBAChB,eAAe;mBACb,iBAAiB;;;;;;iCAMH,eAAe;;;;;;;;;;;;eAYjC,6BAA6B;;;;eAI7B,+BAA+B;;;;eAI/B,gCAAgC;;;;eAIhC,kCAAkC;;;;;aAKpC,2BAA2B;;;;;;;;;;;;;CAavC,CAAC,aAAa,CACb,8BAA8B,CAAC,GAAG,CAAA;;;;GAIjC,CAAC,CACH,CAAC"}
|