@fluentui/web-components 3.0.0-beta.45 → 3.0.0-beta.47
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 +21 -2
- package/dist/dts/anchor-button/anchor-button.d.ts +6 -0
- package/dist/dts/button/button.d.ts +65 -57
- package/dist/dts/button/index.d.ts +1 -1
- package/dist/dts/divider/divider.d.ts +28 -20
- package/dist/dts/divider/index.d.ts +1 -1
- package/dist/dts/index.d.ts +2 -2
- package/dist/esm/anchor-button/anchor-button.js +6 -0
- package/dist/esm/anchor-button/anchor-button.js.map +1 -1
- package/dist/esm/button/button.js +90 -79
- package/dist/esm/button/button.js.map +1 -1
- package/dist/esm/button/index.js +1 -1
- package/dist/esm/button/index.js.map +1 -1
- package/dist/esm/divider/divider.js +56 -45
- package/dist/esm/divider/divider.js.map +1 -1
- package/dist/esm/divider/index.js +1 -1
- package/dist/esm/divider/index.js.map +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/spinner/spinner.styles.js +117 -42
- package/dist/esm/spinner/spinner.styles.js.map +1 -1
- package/dist/esm/spinner/spinner.template.js +13 -5
- package/dist/esm/spinner/spinner.template.js.map +1 -1
- package/dist/web-components.d.ts +391 -367
- package/dist/web-components.js +119 -108
- package/dist/web-components.min.js +205 -204
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,31 @@
|
|
|
1
1
|
# Change Log - @fluentui/web-components
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Tue, 23 Jul 2024 04:06:54 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [3.0.0-beta.47](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v3.0.0-beta.47)
|
|
8
|
+
|
|
9
|
+
Tue, 23 Jul 2024 04:06:54 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v3.0.0-beta.46..@fluentui/web-components_v3.0.0-beta.47)
|
|
11
|
+
|
|
12
|
+
### Changes
|
|
13
|
+
|
|
14
|
+
- fix: move spinner animation off of main thread ([PR #32056](https://github.com/microsoft/fluentui/pull/32056) by rupertdavid@microsoft.com)
|
|
15
|
+
- chore: create divider base class to abstract style specfic api ([PR #32065](https://github.com/microsoft/fluentui/pull/32065) by jes@microsoft.com)
|
|
16
|
+
|
|
17
|
+
## [3.0.0-beta.46](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v3.0.0-beta.46)
|
|
18
|
+
|
|
19
|
+
Fri, 19 Jul 2024 04:08:32 GMT
|
|
20
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v3.0.0-beta.45..@fluentui/web-components_v3.0.0-beta.46)
|
|
21
|
+
|
|
22
|
+
### Changes
|
|
23
|
+
|
|
24
|
+
- chore: [button] move style related api out of base class ([PR #32049](https://github.com/microsoft/fluentui/pull/32049) by jes@microsoft.com)
|
|
25
|
+
|
|
7
26
|
## [3.0.0-beta.45](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v3.0.0-beta.45)
|
|
8
27
|
|
|
9
|
-
Thu, 18 Jul 2024 04:06:
|
|
28
|
+
Thu, 18 Jul 2024 04:06:50 GMT
|
|
10
29
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v3.0.0-beta.44..@fluentui/web-components_v3.0.0-beta.45)
|
|
11
30
|
|
|
12
31
|
### Changes
|
|
@@ -149,6 +149,12 @@ export declare class BaseAnchor extends FASTElement {
|
|
|
149
149
|
private handleProxyAttributeChange;
|
|
150
150
|
private createProxyElement;
|
|
151
151
|
}
|
|
152
|
+
/**
|
|
153
|
+
* An Anchor Custom HTML Element.
|
|
154
|
+
* Based on BaseAnchor and includes style and layout specific attributes
|
|
155
|
+
*
|
|
156
|
+
* @public
|
|
157
|
+
*/
|
|
152
158
|
export declare class AnchorButton extends BaseAnchor {
|
|
153
159
|
/**
|
|
154
160
|
* The appearance the anchor button should have.
|
|
@@ -13,21 +13,7 @@ import { ButtonType } from './button.options.js';
|
|
|
13
13
|
*
|
|
14
14
|
* @public
|
|
15
15
|
*/
|
|
16
|
-
export declare class
|
|
17
|
-
/**
|
|
18
|
-
* Indicates the styled appearance of the button.
|
|
19
|
-
*
|
|
20
|
-
* @public
|
|
21
|
-
* @remarks
|
|
22
|
-
* HTML Attribute: `appearance`
|
|
23
|
-
*/
|
|
24
|
-
appearance?: ButtonAppearance;
|
|
25
|
-
/**
|
|
26
|
-
* Handles changes to appearance attribute custom states
|
|
27
|
-
* @param prev - the previous state
|
|
28
|
-
* @param next - the next state
|
|
29
|
-
*/
|
|
30
|
-
appearanceChanged(prev: ButtonAppearance | undefined, next: ButtonAppearance | undefined): void;
|
|
16
|
+
export declare class BaseButton extends FASTElement {
|
|
31
17
|
/**
|
|
32
18
|
* Indicates the button should be focused when the page is loaded.
|
|
33
19
|
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#autofocus | `autofocus`} attribute
|
|
@@ -161,20 +147,6 @@ export declare class Button extends FASTElement {
|
|
|
161
147
|
* HTML Attribute: `formtarget`
|
|
162
148
|
*/
|
|
163
149
|
formTarget?: ButtonFormTarget;
|
|
164
|
-
/**
|
|
165
|
-
* Indicates that the button should only display as an icon with no text content.
|
|
166
|
-
*
|
|
167
|
-
* @public
|
|
168
|
-
* @remarks
|
|
169
|
-
* HTML Attribute: `icon-only`
|
|
170
|
-
*/
|
|
171
|
-
iconOnly: boolean;
|
|
172
|
-
/**
|
|
173
|
-
* Handles changes to icon only custom states
|
|
174
|
-
* @param prev - the previous state
|
|
175
|
-
* @param next - the next state
|
|
176
|
-
*/
|
|
177
|
-
iconOnlyChanged(prev: boolean, next: boolean): void;
|
|
178
150
|
/**
|
|
179
151
|
* A reference to all associated label elements.
|
|
180
152
|
*
|
|
@@ -190,34 +162,6 @@ export declare class Button extends FASTElement {
|
|
|
190
162
|
* HTML Attribute: `name`
|
|
191
163
|
*/
|
|
192
164
|
name?: string;
|
|
193
|
-
/**
|
|
194
|
-
* The shape of the button.
|
|
195
|
-
*
|
|
196
|
-
* @public
|
|
197
|
-
* @remarks
|
|
198
|
-
* HTML Attribute: `shape`
|
|
199
|
-
*/
|
|
200
|
-
shape?: ButtonShape;
|
|
201
|
-
/**
|
|
202
|
-
* Handles changes to shape attribute custom states
|
|
203
|
-
* @param prev - the previous state
|
|
204
|
-
* @param next - the next state
|
|
205
|
-
*/
|
|
206
|
-
shapeChanged(prev: ButtonShape | undefined, next: ButtonShape | undefined): void;
|
|
207
|
-
/**
|
|
208
|
-
* The size of the button.
|
|
209
|
-
*
|
|
210
|
-
* @public
|
|
211
|
-
* @remarks
|
|
212
|
-
* HTML Attribute: `size`
|
|
213
|
-
*/
|
|
214
|
-
size?: ButtonSize;
|
|
215
|
-
/**
|
|
216
|
-
* Handles changes to size attribute custom states
|
|
217
|
-
* @param prev - the previous state
|
|
218
|
-
* @param next - the next state
|
|
219
|
-
*/
|
|
220
|
-
sizeChanged(prev: ButtonSize | undefined, next: ButtonSize | undefined): void;
|
|
221
165
|
/**
|
|
222
166
|
* The button type.
|
|
223
167
|
* @see The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#type | `type`} attribute
|
|
@@ -298,6 +242,70 @@ export declare class Button extends FASTElement {
|
|
|
298
242
|
*/
|
|
299
243
|
private submitForm;
|
|
300
244
|
}
|
|
245
|
+
/**
|
|
246
|
+
* A Button Custom HTML Element.
|
|
247
|
+
* Based on BaseButton and includes style and layout specific attributes
|
|
248
|
+
*
|
|
249
|
+
* @public
|
|
250
|
+
*/
|
|
251
|
+
export declare class Button extends BaseButton {
|
|
252
|
+
/**
|
|
253
|
+
* Indicates the styled appearance of the button.
|
|
254
|
+
*
|
|
255
|
+
* @public
|
|
256
|
+
* @remarks
|
|
257
|
+
* HTML Attribute: `appearance`
|
|
258
|
+
*/
|
|
259
|
+
appearance?: ButtonAppearance;
|
|
260
|
+
/**
|
|
261
|
+
* Handles changes to appearance attribute custom states
|
|
262
|
+
* @param prev - the previous state
|
|
263
|
+
* @param next - the next state
|
|
264
|
+
*/
|
|
265
|
+
appearanceChanged(prev: ButtonAppearance | undefined, next: ButtonAppearance | undefined): void;
|
|
266
|
+
/**
|
|
267
|
+
* The shape of the button.
|
|
268
|
+
*
|
|
269
|
+
* @public
|
|
270
|
+
* @remarks
|
|
271
|
+
* HTML Attribute: `shape`
|
|
272
|
+
*/
|
|
273
|
+
shape?: ButtonShape;
|
|
274
|
+
/**
|
|
275
|
+
* Handles changes to shape attribute custom states
|
|
276
|
+
* @param prev - the previous state
|
|
277
|
+
* @param next - the next state
|
|
278
|
+
*/
|
|
279
|
+
shapeChanged(prev: ButtonShape | undefined, next: ButtonShape | undefined): void;
|
|
280
|
+
/**
|
|
281
|
+
* The size of the button.
|
|
282
|
+
*
|
|
283
|
+
* @public
|
|
284
|
+
* @remarks
|
|
285
|
+
* HTML Attribute: `size`
|
|
286
|
+
*/
|
|
287
|
+
size?: ButtonSize;
|
|
288
|
+
/**
|
|
289
|
+
* Handles changes to size attribute custom states
|
|
290
|
+
* @param prev - the previous state
|
|
291
|
+
* @param next - the next state
|
|
292
|
+
*/
|
|
293
|
+
sizeChanged(prev: ButtonSize | undefined, next: ButtonSize | undefined): void;
|
|
294
|
+
/**
|
|
295
|
+
* Indicates that the button should only display as an icon with no text content.
|
|
296
|
+
*
|
|
297
|
+
* @public
|
|
298
|
+
* @remarks
|
|
299
|
+
* HTML Attribute: `icon-only`
|
|
300
|
+
*/
|
|
301
|
+
iconOnly: boolean;
|
|
302
|
+
/**
|
|
303
|
+
* Handles changes to icon only custom states
|
|
304
|
+
* @param prev - the previous state
|
|
305
|
+
* @param next - the next state
|
|
306
|
+
*/
|
|
307
|
+
iconOnlyChanged(prev: boolean, next: boolean): void;
|
|
308
|
+
}
|
|
301
309
|
/**
|
|
302
310
|
* @internal
|
|
303
311
|
* @privateRemarks
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { definition as ButtonDefinition } from './button.definition.js';
|
|
2
|
-
export { Button } from './button.js';
|
|
2
|
+
export { BaseButton, Button } from './button.js';
|
|
3
3
|
export { ButtonAppearance, ButtonFormTarget, ButtonShape, ButtonSize, ButtonType } from './button.options.js';
|
|
4
4
|
export type { ButtonOptions } from './button.options.js';
|
|
5
5
|
export { styles as ButtonStyles } from './button.styles.js';
|
|
@@ -2,11 +2,11 @@ import { FASTElement } from '@microsoft/fast-element';
|
|
|
2
2
|
import { DividerAlignContent, DividerAppearance, DividerOrientation, DividerRole } from './divider.options.js';
|
|
3
3
|
/**
|
|
4
4
|
* A Divider Custom HTML Element.
|
|
5
|
-
*
|
|
6
|
-
* @remarks
|
|
7
5
|
* 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.
|
|
6
|
+
*
|
|
7
|
+
* @public
|
|
8
8
|
*/
|
|
9
|
-
export declare class
|
|
9
|
+
export declare class BaseDivider extends FASTElement {
|
|
10
10
|
/**
|
|
11
11
|
* The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
|
|
12
12
|
*
|
|
@@ -29,6 +29,31 @@ export declare class Divider extends FASTElement {
|
|
|
29
29
|
* HTML Attribute: orientation
|
|
30
30
|
*/
|
|
31
31
|
orientation?: DividerOrientation;
|
|
32
|
+
connectedCallback(): void;
|
|
33
|
+
/**
|
|
34
|
+
* Sets the element's internal role when the role attribute changes.
|
|
35
|
+
*
|
|
36
|
+
* @param previous - the previous role value
|
|
37
|
+
* @param next - the current role value
|
|
38
|
+
* @internal
|
|
39
|
+
*/
|
|
40
|
+
roleChanged(previous: string | null, next: string | null): void;
|
|
41
|
+
/**
|
|
42
|
+
* Sets the element's internal orientation when the orientation attribute changes.
|
|
43
|
+
*
|
|
44
|
+
* @param previous - the previous orientation value
|
|
45
|
+
* @param next - the current orientation value
|
|
46
|
+
* @internal
|
|
47
|
+
*/
|
|
48
|
+
orientationChanged(previous: string | null, next: string | null): void;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* A Divider Custom HTML Element.
|
|
52
|
+
* Based on BaseDivider and includes style and layout specific attributes
|
|
53
|
+
*
|
|
54
|
+
* @public
|
|
55
|
+
*/
|
|
56
|
+
export declare class Divider extends BaseDivider {
|
|
32
57
|
/**
|
|
33
58
|
* @public
|
|
34
59
|
* @remarks
|
|
@@ -65,21 +90,4 @@ export declare class Divider extends FASTElement {
|
|
|
65
90
|
* @param next - the next state
|
|
66
91
|
*/
|
|
67
92
|
insetChanged(prev: boolean, next: boolean): void;
|
|
68
|
-
connectedCallback(): void;
|
|
69
|
-
/**
|
|
70
|
-
* Sets the element's internal role when the role attribute changes.
|
|
71
|
-
*
|
|
72
|
-
* @param previous - the previous role value
|
|
73
|
-
* @param next - the current role value
|
|
74
|
-
* @internal
|
|
75
|
-
*/
|
|
76
|
-
roleChanged(previous: string | null, next: string | null): void;
|
|
77
|
-
/**
|
|
78
|
-
* Sets the element's internal orientation when the orientation attribute changes.
|
|
79
|
-
*
|
|
80
|
-
* @param previous - the previous orientation value
|
|
81
|
-
* @param next - the current orientation value
|
|
82
|
-
* @internal
|
|
83
|
-
*/
|
|
84
|
-
orientationChanged(previous: string | null, next: string | null): void;
|
|
85
93
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Divider } from './divider.js';
|
|
1
|
+
export { BaseDivider, Divider } from './divider.js';
|
|
2
2
|
export { DividerAlignContent, DividerAppearance, DividerOrientation, DividerRole } from './divider.options.js';
|
|
3
3
|
export { definition as DividerDefinition } from './divider.definition.js';
|
|
4
4
|
export { template as DividerTemplate } from './divider.template.js';
|
package/dist/dts/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export { Accordion, accordionDefinition, AccordionExpandMode, accordionStyles, a
|
|
|
4
4
|
export { Link, LinkAppearance, LinkDefinition, LinkTemplate, LinkTarget } from './link/index.js';
|
|
5
5
|
export { Avatar, AvatarActive, AvatarAppearance, AvatarColor, AvatarDefinition, AvatarNamedColor, AvatarShape, AvatarSize, AvatarStyles, AvatarTemplate, } from './avatar/index.js';
|
|
6
6
|
export { Badge, BadgeAppearance, BadgeColor, BadgeDefinition, BadgeShape, BadgeSize, BadgeStyles, BadgeTemplate, } from './badge/index.js';
|
|
7
|
-
export { Button, ButtonAppearance, ButtonDefinition, ButtonFormTarget, ButtonShape, ButtonSize, ButtonStyles, ButtonTemplate, ButtonType, } from './button/index.js';
|
|
7
|
+
export { BaseButton, Button, ButtonAppearance, ButtonDefinition, ButtonFormTarget, ButtonShape, ButtonSize, ButtonStyles, ButtonTemplate, ButtonType, } from './button/index.js';
|
|
8
8
|
export type { ButtonOptions } from './button/index.js';
|
|
9
9
|
export { Checkbox, CheckboxDefinition, CheckboxShape, CheckboxSize, CheckboxStyles, CheckboxTemplate, } from './checkbox/index.js';
|
|
10
10
|
export type { CheckboxOptions } from './checkbox/index.js';
|
|
@@ -12,7 +12,7 @@ export { CompoundButton, CompoundButtonAppearance, CompoundButtonDefinition, Com
|
|
|
12
12
|
export { CounterBadge, CounterBadgeAppearance, CounterBadgeColor, CounterBadgeDefinition, CounterBadgeShape, CounterBadgeSize, CounterBadgeStyles, CounterBadgeTemplate, } from './counter-badge/index.js';
|
|
13
13
|
export { Dialog, DialogType, DialogDefinition, DialogTemplate, DialogStyles } from './dialog/index.js';
|
|
14
14
|
export { DialogBody, DialogBodyDefinition, DialogBodyTemplate, DialogBodyStyles } from './dialog-body/index.js';
|
|
15
|
-
export { Divider, DividerAlignContent, DividerAppearance, DividerDefinition, DividerOrientation, DividerRole, DividerStyles, DividerTemplate, } from './divider/index.js';
|
|
15
|
+
export { BaseDivider, Divider, DividerAlignContent, DividerAppearance, DividerDefinition, DividerOrientation, DividerRole, DividerStyles, DividerTemplate, } from './divider/index.js';
|
|
16
16
|
export { Drawer, DrawerDefinition, DrawerPosition, DrawerSize, DrawerType, DrawerTemplate, DrawerStyles, } from './drawer/index.js';
|
|
17
17
|
export { DrawerBody, DrawerBodyDefinition, DrawerBodyTemplate, DrawerBodyStyles } from './drawer-body/index.js';
|
|
18
18
|
export { Field, FieldLabelPosition, ValidationFlags, FieldDefinition, FieldStyles, FieldTemplate, } from './field/index.js';
|
|
@@ -149,6 +149,12 @@ __decorate([
|
|
|
149
149
|
__decorate([
|
|
150
150
|
attr
|
|
151
151
|
], BaseAnchor.prototype, "type", void 0);
|
|
152
|
+
/**
|
|
153
|
+
* An Anchor Custom HTML Element.
|
|
154
|
+
* Based on BaseAnchor and includes style and layout specific attributes
|
|
155
|
+
*
|
|
156
|
+
* @public
|
|
157
|
+
*/
|
|
152
158
|
export class AnchorButton extends BaseAnchor {
|
|
153
159
|
constructor() {
|
|
154
160
|
super(...arguments);
|
|
@@ -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,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EACL,gBAAgB,GAKjB,MAAM,4BAA4B,CAAC;AAQpC;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,UAAW,SAAQ,WAAW;IA6GzC;QACE,KAAK,EAAE,CAAC;QA7GV;;;WAGG;QACc,UAAK,GAAG,SAAS,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAE7D;;;;WAIG;QACI,qBAAgB,GAAqB,IAAI,CAAC,eAAe,EAAE,CAAC;QAEnE;;;WAGG;QACK,wBAAmB,GAAsB,IAAI,CAAC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} from './button.options.js';
|
|
|
16
16
|
*
|
|
17
17
|
* @public
|
|
18
18
|
*/
|
|
19
|
-
class
|
|
20
|
-
/**
|
|
21
|
-
* Handles changes to appearance attribute custom states
|
|
22
|
-
* @param prev - the previous state
|
|
23
|
-
* @param next - the next state
|
|
24
|
-
*/
|
|
25
|
-
appearanceChanged(prev, next) {
|
|
26
|
-
if (prev) {
|
|
27
|
-
toggleState(this.elementInternals, `${prev}`, false);
|
|
28
|
-
}
|
|
29
|
-
if (next) {
|
|
30
|
-
toggleState(this.elementInternals, `${next}`, true);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
19
|
+
class BaseButton extends FASTElement {
|
|
33
20
|
/**
|
|
34
21
|
* Sets the element's internal disabled state when the element is focusable while disabled.
|
|
35
22
|
*
|
|
@@ -50,14 +37,6 @@ class Button extends FASTElement {
|
|
|
50
37
|
get form() {
|
|
51
38
|
return this.elementInternals.form;
|
|
52
39
|
}
|
|
53
|
-
/**
|
|
54
|
-
* Handles changes to icon only custom states
|
|
55
|
-
* @param prev - the previous state
|
|
56
|
-
* @param next - the next state
|
|
57
|
-
*/
|
|
58
|
-
iconOnlyChanged(prev, next) {
|
|
59
|
-
toggleState(this.elementInternals, 'icon', next);
|
|
60
|
-
}
|
|
61
40
|
/**
|
|
62
41
|
* A reference to all associated label elements.
|
|
63
42
|
*
|
|
@@ -66,32 +45,6 @@ class Button extends FASTElement {
|
|
|
66
45
|
get labels() {
|
|
67
46
|
return Object.freeze(Array.from(this.elementInternals.labels));
|
|
68
47
|
}
|
|
69
|
-
/**
|
|
70
|
-
* Handles changes to shape attribute custom states
|
|
71
|
-
* @param prev - the previous state
|
|
72
|
-
* @param next - the next state
|
|
73
|
-
*/
|
|
74
|
-
shapeChanged(prev, next) {
|
|
75
|
-
if (prev) {
|
|
76
|
-
toggleState(this.elementInternals, `${prev}`, false);
|
|
77
|
-
}
|
|
78
|
-
if (next) {
|
|
79
|
-
toggleState(this.elementInternals, `${next}`, true);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Handles changes to size attribute custom states
|
|
84
|
-
* @param prev - the previous state
|
|
85
|
-
* @param next - the next state
|
|
86
|
-
*/
|
|
87
|
-
sizeChanged(prev, next) {
|
|
88
|
-
if (prev) {
|
|
89
|
-
toggleState(this.elementInternals, `${prev}`, false);
|
|
90
|
-
}
|
|
91
|
-
if (next) {
|
|
92
|
-
toggleState(this.elementInternals, `${next}`, true);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
48
|
/**
|
|
96
49
|
* Removes the form submission fallback control when the type changes.
|
|
97
50
|
*
|
|
@@ -148,14 +101,6 @@ class Button extends FASTElement {
|
|
|
148
101
|
* @internal
|
|
149
102
|
*/
|
|
150
103
|
this.elementInternals = this.attachInternals();
|
|
151
|
-
/**
|
|
152
|
-
* Indicates that the button should only display as an icon with no text content.
|
|
153
|
-
*
|
|
154
|
-
* @public
|
|
155
|
-
* @remarks
|
|
156
|
-
* HTML Attribute: `icon-only`
|
|
157
|
-
*/
|
|
158
|
-
this.iconOnly = false;
|
|
159
104
|
this.elementInternals.role = 'button';
|
|
160
105
|
}
|
|
161
106
|
/**
|
|
@@ -299,61 +244,127 @@ class Button extends FASTElement {
|
|
|
299
244
|
*
|
|
300
245
|
* @public
|
|
301
246
|
*/
|
|
302
|
-
|
|
303
|
-
__decorate([
|
|
304
|
-
attr
|
|
305
|
-
], Button.prototype, "appearance", void 0);
|
|
247
|
+
BaseButton.formAssociated = true;
|
|
306
248
|
__decorate([
|
|
307
249
|
attr({ mode: 'boolean' })
|
|
308
|
-
],
|
|
250
|
+
], BaseButton.prototype, "autofocus", void 0);
|
|
309
251
|
__decorate([
|
|
310
252
|
observable
|
|
311
|
-
],
|
|
253
|
+
], BaseButton.prototype, "defaultSlottedContent", void 0);
|
|
312
254
|
__decorate([
|
|
313
255
|
attr({ mode: 'boolean' })
|
|
314
|
-
],
|
|
256
|
+
], BaseButton.prototype, "disabled", void 0);
|
|
315
257
|
__decorate([
|
|
316
258
|
attr({ attribute: 'disabled-focusable', mode: 'boolean' })
|
|
317
|
-
],
|
|
259
|
+
], BaseButton.prototype, "disabledFocusable", void 0);
|
|
318
260
|
__decorate([
|
|
319
261
|
attr({ attribute: 'tabindex', mode: 'fromView', converter: nullableNumberConverter })
|
|
320
|
-
],
|
|
262
|
+
], BaseButton.prototype, "tabIndex", void 0);
|
|
321
263
|
__decorate([
|
|
322
264
|
attr({ attribute: 'formaction' })
|
|
323
|
-
],
|
|
265
|
+
], BaseButton.prototype, "formAction", void 0);
|
|
324
266
|
__decorate([
|
|
325
267
|
attr({ attribute: 'form' })
|
|
326
|
-
],
|
|
268
|
+
], BaseButton.prototype, "formAttribute", void 0);
|
|
327
269
|
__decorate([
|
|
328
270
|
attr({ attribute: 'formenctype' })
|
|
329
|
-
],
|
|
271
|
+
], BaseButton.prototype, "formEnctype", void 0);
|
|
330
272
|
__decorate([
|
|
331
273
|
attr({ attribute: 'formmethod' })
|
|
332
|
-
],
|
|
274
|
+
], BaseButton.prototype, "formMethod", void 0);
|
|
333
275
|
__decorate([
|
|
334
276
|
attr({ attribute: 'formnovalidate', mode: 'boolean' })
|
|
335
|
-
],
|
|
277
|
+
], BaseButton.prototype, "formNoValidate", void 0);
|
|
336
278
|
__decorate([
|
|
337
279
|
attr({ attribute: 'formtarget' })
|
|
338
|
-
],
|
|
280
|
+
], BaseButton.prototype, "formTarget", void 0);
|
|
339
281
|
__decorate([
|
|
340
|
-
attr
|
|
341
|
-
],
|
|
282
|
+
attr
|
|
283
|
+
], BaseButton.prototype, "name", void 0);
|
|
342
284
|
__decorate([
|
|
343
285
|
attr
|
|
344
|
-
],
|
|
286
|
+
], BaseButton.prototype, "type", void 0);
|
|
345
287
|
__decorate([
|
|
346
288
|
attr
|
|
347
|
-
],
|
|
289
|
+
], BaseButton.prototype, "value", void 0);
|
|
290
|
+
export { BaseButton };
|
|
291
|
+
/**
|
|
292
|
+
* A Button Custom HTML Element.
|
|
293
|
+
* Based on BaseButton and includes style and layout specific attributes
|
|
294
|
+
*
|
|
295
|
+
* @public
|
|
296
|
+
*/
|
|
297
|
+
export class Button extends BaseButton {
|
|
298
|
+
constructor() {
|
|
299
|
+
super(...arguments);
|
|
300
|
+
/**
|
|
301
|
+
* Indicates that the button should only display as an icon with no text content.
|
|
302
|
+
*
|
|
303
|
+
* @public
|
|
304
|
+
* @remarks
|
|
305
|
+
* HTML Attribute: `icon-only`
|
|
306
|
+
*/
|
|
307
|
+
this.iconOnly = false;
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* Handles changes to appearance attribute custom states
|
|
311
|
+
* @param prev - the previous state
|
|
312
|
+
* @param next - the next state
|
|
313
|
+
*/
|
|
314
|
+
appearanceChanged(prev, next) {
|
|
315
|
+
if (prev) {
|
|
316
|
+
toggleState(this.elementInternals, `${prev}`, false);
|
|
317
|
+
}
|
|
318
|
+
if (next) {
|
|
319
|
+
toggleState(this.elementInternals, `${next}`, true);
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Handles changes to shape attribute custom states
|
|
324
|
+
* @param prev - the previous state
|
|
325
|
+
* @param next - the next state
|
|
326
|
+
*/
|
|
327
|
+
shapeChanged(prev, next) {
|
|
328
|
+
if (prev) {
|
|
329
|
+
toggleState(this.elementInternals, `${prev}`, false);
|
|
330
|
+
}
|
|
331
|
+
if (next) {
|
|
332
|
+
toggleState(this.elementInternals, `${next}`, true);
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* Handles changes to size attribute custom states
|
|
337
|
+
* @param prev - the previous state
|
|
338
|
+
* @param next - the next state
|
|
339
|
+
*/
|
|
340
|
+
sizeChanged(prev, next) {
|
|
341
|
+
if (prev) {
|
|
342
|
+
toggleState(this.elementInternals, `${prev}`, false);
|
|
343
|
+
}
|
|
344
|
+
if (next) {
|
|
345
|
+
toggleState(this.elementInternals, `${next}`, true);
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* Handles changes to icon only custom states
|
|
350
|
+
* @param prev - the previous state
|
|
351
|
+
* @param next - the next state
|
|
352
|
+
*/
|
|
353
|
+
iconOnlyChanged(prev, next) {
|
|
354
|
+
toggleState(this.elementInternals, 'icon', next);
|
|
355
|
+
}
|
|
356
|
+
}
|
|
348
357
|
__decorate([
|
|
349
358
|
attr
|
|
350
|
-
], Button.prototype, "
|
|
359
|
+
], Button.prototype, "appearance", void 0);
|
|
351
360
|
__decorate([
|
|
352
361
|
attr
|
|
353
|
-
], Button.prototype, "
|
|
362
|
+
], Button.prototype, "shape", void 0);
|
|
354
363
|
__decorate([
|
|
355
364
|
attr
|
|
356
|
-
], Button.prototype, "
|
|
357
|
-
|
|
365
|
+
], Button.prototype, "size", void 0);
|
|
366
|
+
__decorate([
|
|
367
|
+
attr({ attribute: 'icon-only', mode: 'boolean' })
|
|
368
|
+
], Button.prototype, "iconOnly", void 0);
|
|
358
369
|
applyMixins(Button, StartEnd);
|
|
359
370
|
//# sourceMappingURL=button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../../src/button/button.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,uBAAuB,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACjG,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAE5D,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD;;;;;;;;;;GAUG;AACH,MAAa,
|
|
1
|
+
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../../src/button/button.ts"],"names":[],"mappings":";AAAA,OAAO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CACgC;AAwB9B;IADN,IAAI;qCACsB;AAwBpB;IADN,IAAI;oCACoB;AAwBlB;IADN,IAAI,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;wCACjB;AAoBnC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC"}
|
package/dist/esm/button/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { definition as ButtonDefinition } from './button.definition.js';
|
|
2
|
-
export { Button } from './button.js';
|
|
2
|
+
export { BaseButton, Button } from './button.js';
|
|
3
3
|
export { ButtonAppearance, ButtonFormTarget, ButtonShape, ButtonSize, ButtonType } from './button.options.js';
|
|
4
4
|
export { styles as ButtonStyles } from './button.styles.js';
|
|
5
5
|
export { template as ButtonTemplate } from './button.template.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAE9G,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAC"}
|