@fluentui/web-components 3.0.0-alpha.5 → 3.0.0-alpha.6
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 +16 -1
- package/CHANGELOG.md +11 -2
- package/dist/dts/index.d.ts +1 -0
- package/dist/dts/switch/define.d.ts +1 -0
- package/dist/dts/switch/index.d.ts +5 -0
- package/dist/dts/switch/switch.d.ts +13 -0
- package/dist/dts/switch/switch.definition.d.ts +9 -0
- package/dist/dts/switch/switch.options.d.ts +15 -0
- package/dist/dts/switch/switch.styles.d.ts +1 -0
- package/dist/dts/switch/switch.template.d.ts +3 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/switch/define.js +4 -0
- package/dist/esm/switch/define.js.map +1 -0
- package/dist/esm/switch/index.js +6 -0
- package/dist/esm/switch/index.js.map +1 -0
- package/dist/esm/switch/switch.definition.js +17 -0
- package/dist/esm/switch/switch.definition.js.map +1 -0
- package/dist/esm/switch/switch.js +9 -0
- package/dist/esm/switch/switch.js.map +1 -0
- package/dist/esm/switch/switch.options.js +10 -0
- package/dist/esm/switch/switch.options.js.map +1 -0
- package/dist/esm/switch/switch.styles.js +114 -0
- package/dist/esm/switch/switch.styles.js.map +1 -0
- package/dist/esm/switch/switch.template.js +5 -0
- package/dist/esm/switch/switch.template.js.map +1 -0
- package/dist/fluent-web-components.api.json +228 -0
- package/dist/web-components.d.ts +42 -0
- package/dist/web-components.js +620 -29
- package/dist/web-components.min.js +118 -115
- package/docs/api-report.md +25 -0
- package/package.json +5 -1
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,22 @@
|
|
|
2
2
|
"name": "@fluentui/web-components",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Fri, 24 Feb 2023 04:20:26 GMT",
|
|
6
|
+
"tag": "@fluentui/web-components_v3.0.0-alpha.6",
|
|
7
|
+
"version": "3.0.0-alpha.6",
|
|
8
|
+
"comments": {
|
|
9
|
+
"prerelease": [
|
|
10
|
+
{
|
|
11
|
+
"author": "brianbrady@microsoft.com",
|
|
12
|
+
"package": "@fluentui/web-components",
|
|
13
|
+
"commit": "2de60aec984eb2802da76c6c67849da358c0db49",
|
|
14
|
+
"comment": "feat(switch): Add switch web component"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Wed, 22 Feb 2023 04:22:43 GMT",
|
|
6
21
|
"tag": "@fluentui/web-components_v3.0.0-alpha.5",
|
|
7
22
|
"version": "3.0.0-alpha.5",
|
|
8
23
|
"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 Fri, 24 Feb 2023 04:20:26 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [3.0.0-alpha.6](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v3.0.0-alpha.6)
|
|
8
|
+
|
|
9
|
+
Fri, 24 Feb 2023 04:20:26 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v3.0.0-alpha.5..@fluentui/web-components_v3.0.0-alpha.6)
|
|
11
|
+
|
|
12
|
+
### Changes
|
|
13
|
+
|
|
14
|
+
- feat(switch): Add switch web component ([PR #26517](https://github.com/microsoft/fluentui/pull/26517) by brianbrady@microsoft.com)
|
|
15
|
+
|
|
7
16
|
## [3.0.0-alpha.5](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v3.0.0-alpha.5)
|
|
8
17
|
|
|
9
|
-
Wed, 22 Feb 2023 04:22:
|
|
18
|
+
Wed, 22 Feb 2023 04:22:43 GMT
|
|
10
19
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v3.0.0-alpha.4..@fluentui/web-components_v3.0.0-alpha.5)
|
|
11
20
|
|
|
12
21
|
### Changes
|
package/dist/dts/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FASTSwitch } from '@microsoft/fast-foundation';
|
|
2
|
+
import { SwitchLabelPosition } from './switch.options.js';
|
|
3
|
+
export declare class Switch extends FASTSwitch {
|
|
4
|
+
/**
|
|
5
|
+
* The label position of the switch
|
|
6
|
+
*
|
|
7
|
+
* @public
|
|
8
|
+
* @default 'after'
|
|
9
|
+
* @remarks
|
|
10
|
+
* HTML Attribute: labelposition
|
|
11
|
+
*/
|
|
12
|
+
labelPosition: SwitchLabelPosition | undefined;
|
|
13
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ValuesOf } from '@microsoft/fast-foundation';
|
|
2
|
+
/**
|
|
3
|
+
* SwitchLabelPosition Constants
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export declare const SwitchLabelPosition: {
|
|
7
|
+
readonly above: "above";
|
|
8
|
+
readonly after: "after";
|
|
9
|
+
readonly before: "before";
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Applies label position
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
15
|
+
export declare type SwitchLabelPosition = ValuesOf<typeof SwitchLabelPosition>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("@microsoft/fast-element").ElementStyles;
|
package/dist/esm/index.js
CHANGED
|
@@ -4,6 +4,7 @@ export * from './badge/index.js';
|
|
|
4
4
|
export * from './counter-badge/index.js';
|
|
5
5
|
export * from './progress-bar/index.js';
|
|
6
6
|
export * from './spinner/index.js';
|
|
7
|
+
export * from './switch/index.js';
|
|
7
8
|
export * from './text/index.js';
|
|
8
9
|
export * from './theme/index.js';
|
|
9
10
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define.js","sourceRoot":"","sources":["../../../src/switch/define.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,UAAU,CAAC,MAAM,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from './switch.js';
|
|
2
|
+
export * from './switch.options.js';
|
|
3
|
+
export { definition } from './switch.definition.js';
|
|
4
|
+
export { styles as switchStyles } from './switch.styles.js';
|
|
5
|
+
export { template as switchTemplate } from './switch.template.js';
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/switch/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FluentDesignSystem } from '../fluent-design-system.js';
|
|
2
|
+
import { Switch } from './switch.js';
|
|
3
|
+
import { template } from './switch.template.js';
|
|
4
|
+
import { styles } from './switch.styles.js';
|
|
5
|
+
/**
|
|
6
|
+
* The Fluent Switch Element.
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
|
+
* @remarks
|
|
10
|
+
* HTML Element: \<fluent-switch\>
|
|
11
|
+
*/
|
|
12
|
+
export const definition = Switch.compose({
|
|
13
|
+
name: `${FluentDesignSystem.prefix}-switch`,
|
|
14
|
+
template,
|
|
15
|
+
styles,
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=switch.definition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch.definition.js","sourceRoot":"","sources":["../../../src/switch/switch.definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC;IACvC,IAAI,EAAE,GAAG,kBAAkB,CAAC,MAAM,SAAS;IAC3C,QAAQ;IACR,MAAM;CACP,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { attr } from '@microsoft/fast-element';
|
|
3
|
+
import { FASTSwitch } from '@microsoft/fast-foundation';
|
|
4
|
+
export class Switch extends FASTSwitch {
|
|
5
|
+
}
|
|
6
|
+
__decorate([
|
|
7
|
+
attr({ attribute: 'label-position' })
|
|
8
|
+
], Switch.prototype, "labelPosition", void 0);
|
|
9
|
+
//# sourceMappingURL=switch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch.js","sourceRoot":"","sources":["../../../src/switch/switch.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAGxD,MAAM,OAAO,MAAO,SAAQ,UAAU;CAWrC;AADC;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;6CACgB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch.options.js","sourceRoot":"","sources":["../../../src/switch/switch.options.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;CACR,CAAC"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { css } from '@microsoft/fast-element';
|
|
2
|
+
import { display } from '@microsoft/fast-foundation';
|
|
3
|
+
import { borderRadiusCircular, colorCompoundBrandBackground, colorCompoundBrandBackgroundHover, colorCompoundBrandBackgroundPressed, colorNeutralBackgroundDisabled, colorNeutralForeground1, colorNeutralForeground3, colorNeutralForeground3Hover, colorNeutralForeground3Pressed, colorNeutralForegroundDisabled, colorNeutralForegroundInverted, colorNeutralForegroundInvertedHover, colorNeutralForegroundInvertedPressed, colorNeutralStrokeAccessible, colorNeutralStrokeAccessibleHover, colorNeutralStrokeAccessiblePressed, colorNeutralStrokeDisabled, colorTransparentBackground, curveEasyEase, durationNormal, fontFamilyBase, fontSizeBase300, fontWeightRegular, lineHeightBase300, spacingHorizontalS, spacingHorizontalXS, spacingHorizontalXXS, spacingVerticalS, spacingVerticalXS, } from '../theme/design-tokens.js';
|
|
4
|
+
export const styles = css `
|
|
5
|
+
${display('inline-flex')}
|
|
6
|
+
|
|
7
|
+
:host {
|
|
8
|
+
align-items: center;
|
|
9
|
+
flex-direction: row-reverse;
|
|
10
|
+
outline: none;
|
|
11
|
+
user-select: none;
|
|
12
|
+
}
|
|
13
|
+
:host([label-position='before']) {
|
|
14
|
+
flex-direction: row;
|
|
15
|
+
}
|
|
16
|
+
:host([label-position='above']) {
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
align-items: flex-start;
|
|
19
|
+
}
|
|
20
|
+
:host([disabled]) .label,
|
|
21
|
+
:host([readonly]) .label,
|
|
22
|
+
:host([readonly]) .switch,
|
|
23
|
+
:host([disabled]) .switch {
|
|
24
|
+
cursor: not-allowed;
|
|
25
|
+
}
|
|
26
|
+
.label {
|
|
27
|
+
position: relative;
|
|
28
|
+
color: ${colorNeutralForeground1};
|
|
29
|
+
line-height: ${lineHeightBase300};
|
|
30
|
+
font-size: ${fontSizeBase300};
|
|
31
|
+
font-weight: ${fontWeightRegular};
|
|
32
|
+
font-family: ${fontFamilyBase};
|
|
33
|
+
padding: ${spacingVerticalXS} ${spacingHorizontalXS};
|
|
34
|
+
cursor: pointer;
|
|
35
|
+
}
|
|
36
|
+
.label__hidden {
|
|
37
|
+
display: none;
|
|
38
|
+
}
|
|
39
|
+
.switch {
|
|
40
|
+
display: flex;
|
|
41
|
+
align-items: center;
|
|
42
|
+
padding: 0 ${spacingHorizontalXXS};
|
|
43
|
+
box-sizing: border-box;
|
|
44
|
+
width: 40px;
|
|
45
|
+
height: 20px;
|
|
46
|
+
background-color: ${colorTransparentBackground};
|
|
47
|
+
border: 1px solid ${colorNeutralStrokeAccessible};
|
|
48
|
+
border-radius: ${borderRadiusCircular};
|
|
49
|
+
outline: none;
|
|
50
|
+
cursor: pointer;
|
|
51
|
+
margin: ${spacingVerticalS} ${spacingHorizontalS};
|
|
52
|
+
}
|
|
53
|
+
:host(:hover) .switch {
|
|
54
|
+
background: none;
|
|
55
|
+
border-color: ${colorNeutralStrokeAccessibleHover};
|
|
56
|
+
}
|
|
57
|
+
:host(:active) .switch {
|
|
58
|
+
border-color: ${colorNeutralStrokeAccessiblePressed};
|
|
59
|
+
}
|
|
60
|
+
:host([disabled]) .switch,
|
|
61
|
+
:host([readonly]) .switch {
|
|
62
|
+
border: 1px solid ${colorNeutralStrokeDisabled};
|
|
63
|
+
background-color: none;
|
|
64
|
+
pointer: default;
|
|
65
|
+
}
|
|
66
|
+
:host([aria-checked='true']) .switch {
|
|
67
|
+
background: ${colorCompoundBrandBackground};
|
|
68
|
+
}
|
|
69
|
+
:host([aria-checked='true']:hover) .switch {
|
|
70
|
+
background: ${colorCompoundBrandBackgroundHover};
|
|
71
|
+
border-color: ${colorCompoundBrandBackgroundHover};
|
|
72
|
+
}
|
|
73
|
+
:host([aria-checked='true']:active) .switch {
|
|
74
|
+
background: ${colorCompoundBrandBackgroundPressed};
|
|
75
|
+
border-color: ${colorCompoundBrandBackgroundPressed};
|
|
76
|
+
}
|
|
77
|
+
:host([aria-checked='true'][disabled]) .switch {
|
|
78
|
+
background: ${colorNeutralBackgroundDisabled};
|
|
79
|
+
border-color: ${colorNeutralStrokeDisabled};
|
|
80
|
+
}
|
|
81
|
+
.checked-indicator {
|
|
82
|
+
height: 14px;
|
|
83
|
+
width: 14px;
|
|
84
|
+
border-radius: 50%;
|
|
85
|
+
background-color: ${colorNeutralForeground3};
|
|
86
|
+
transition-duration: ${durationNormal};
|
|
87
|
+
transition-timing-function: ${curveEasyEase};
|
|
88
|
+
transition-property: transform;
|
|
89
|
+
}
|
|
90
|
+
:host([aria-checked='true']) .checked-indicator {
|
|
91
|
+
background-color: ${colorNeutralForegroundInverted};
|
|
92
|
+
transform: translateX(20px);
|
|
93
|
+
}
|
|
94
|
+
:host([aria-checked='true']:hover) .checked-indicator {
|
|
95
|
+
background: ${colorNeutralForegroundInvertedHover};
|
|
96
|
+
}
|
|
97
|
+
:host([aria-checked='true']:active) .checked-indicator {
|
|
98
|
+
background: ${colorNeutralForegroundInvertedPressed};
|
|
99
|
+
}
|
|
100
|
+
:host(:hover) .checked-indicator {
|
|
101
|
+
background-color: ${colorNeutralForeground3Hover};
|
|
102
|
+
}
|
|
103
|
+
:host(:active) .checked-indicator {
|
|
104
|
+
background-color: ${colorNeutralForeground3Pressed};
|
|
105
|
+
}
|
|
106
|
+
:host([disabled]) .checked-indicator,
|
|
107
|
+
:host([readonly]) .checked-indicator {
|
|
108
|
+
background: ${colorNeutralForegroundDisabled};
|
|
109
|
+
}
|
|
110
|
+
:host([aria-checked='true'][disabled]) .checked-indicator {
|
|
111
|
+
background: ${colorNeutralForegroundDisabled};
|
|
112
|
+
}
|
|
113
|
+
`;
|
|
114
|
+
//# sourceMappingURL=switch.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch.styles.js","sourceRoot":"","sources":["../../../src/switch/switch.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EACL,oBAAoB,EACpB,4BAA4B,EAC5B,iCAAiC,EACjC,mCAAmC,EACnC,8BAA8B,EAC9B,uBAAuB,EACvB,uBAAuB,EACvB,4BAA4B,EAC5B,8BAA8B,EAC9B,8BAA8B,EAC9B,8BAA8B,EAC9B,mCAAmC,EACnC,qCAAqC,EACrC,4BAA4B,EAC5B,iCAAiC,EACjC,mCAAmC,EACnC,0BAA0B,EAC1B,0BAA0B,EAC1B,aAAa,EACb,cAAc,EACd,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,2BAA2B,CAAC;AAEnC,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;IACrB,OAAO,CAAC,aAAa,CAAC;;;;;;;;;;;;;;;;;;;;;;;aAuBb,uBAAuB;mBACjB,iBAAiB;iBACnB,eAAe;mBACb,iBAAiB;mBACjB,cAAc;eAClB,iBAAiB,IAAI,mBAAmB;;;;;;;;;iBAStC,oBAAoB;;;;wBAIb,0BAA0B;wBAC1B,4BAA4B;qBAC/B,oBAAoB;;;cAG3B,gBAAgB,IAAI,kBAAkB;;;;oBAIhC,iCAAiC;;;oBAGjC,mCAAmC;;;;wBAI/B,0BAA0B;;;;;kBAKhC,4BAA4B;;;kBAG5B,iCAAiC;oBAC/B,iCAAiC;;;kBAGnC,mCAAmC;oBACjC,mCAAmC;;;kBAGrC,8BAA8B;oBAC5B,0BAA0B;;;;;;wBAMtB,uBAAuB;2BACpB,cAAc;kCACP,aAAa;;;;wBAIvB,8BAA8B;;;;kBAIpC,mCAAmC;;;kBAGnC,qCAAqC;;;wBAG/B,4BAA4B;;;wBAG5B,8BAA8B;;;;kBAIpC,8BAA8B;;;kBAG9B,8BAA8B;;CAE/C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch.template.js","sourceRoot":"","sources":["../../../src/switch/switch.template.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAG5D,MAAM,CAAC,MAAM,QAAQ,GAAgC,cAAc,CAAC;IAClE,MAAM,EAAE,kEAAkE;CAC3E,CAAC,CAAC"}
|
|
@@ -11242,6 +11242,46 @@
|
|
|
11242
11242
|
"endIndex": 4
|
|
11243
11243
|
}
|
|
11244
11244
|
},
|
|
11245
|
+
{
|
|
11246
|
+
"kind": "Variable",
|
|
11247
|
+
"canonicalReference": "@fluentui/web-components!definition:var",
|
|
11248
|
+
"docComment": "/**\n * The Fluent Switch Element.\n *\n * @remarks\n *\n * HTML Element: \\<fluent-switch\\>\n *\n * @public\n */\n",
|
|
11249
|
+
"excerptTokens": [
|
|
11250
|
+
{
|
|
11251
|
+
"kind": "Content",
|
|
11252
|
+
"text": "definition: "
|
|
11253
|
+
},
|
|
11254
|
+
{
|
|
11255
|
+
"kind": "Content",
|
|
11256
|
+
"text": "import(\"@microsoft/fast-element\")."
|
|
11257
|
+
},
|
|
11258
|
+
{
|
|
11259
|
+
"kind": "Reference",
|
|
11260
|
+
"text": "FASTElementDefinition",
|
|
11261
|
+
"canonicalReference": "@microsoft/fast-element!FASTElementDefinition:class"
|
|
11262
|
+
},
|
|
11263
|
+
{
|
|
11264
|
+
"kind": "Content",
|
|
11265
|
+
"text": "<typeof "
|
|
11266
|
+
},
|
|
11267
|
+
{
|
|
11268
|
+
"kind": "Reference",
|
|
11269
|
+
"text": "Switch",
|
|
11270
|
+
"canonicalReference": "@fluentui/web-components!Switch:class"
|
|
11271
|
+
},
|
|
11272
|
+
{
|
|
11273
|
+
"kind": "Content",
|
|
11274
|
+
"text": ">"
|
|
11275
|
+
}
|
|
11276
|
+
],
|
|
11277
|
+
"isReadonly": true,
|
|
11278
|
+
"releaseTag": "Public",
|
|
11279
|
+
"name": "definition",
|
|
11280
|
+
"variableTypeTokenRange": {
|
|
11281
|
+
"startIndex": 1,
|
|
11282
|
+
"endIndex": 6
|
|
11283
|
+
}
|
|
11284
|
+
},
|
|
11245
11285
|
{
|
|
11246
11286
|
"kind": "Variable",
|
|
11247
11287
|
"canonicalReference": "@fluentui/web-components!durationFast:var",
|
|
@@ -14230,6 +14270,194 @@
|
|
|
14230
14270
|
"endIndex": 4
|
|
14231
14271
|
}
|
|
14232
14272
|
},
|
|
14273
|
+
{
|
|
14274
|
+
"kind": "Class",
|
|
14275
|
+
"canonicalReference": "@fluentui/web-components!Switch:class",
|
|
14276
|
+
"docComment": "",
|
|
14277
|
+
"excerptTokens": [
|
|
14278
|
+
{
|
|
14279
|
+
"kind": "Content",
|
|
14280
|
+
"text": "export declare class Switch extends "
|
|
14281
|
+
},
|
|
14282
|
+
{
|
|
14283
|
+
"kind": "Reference",
|
|
14284
|
+
"text": "FASTSwitch",
|
|
14285
|
+
"canonicalReference": "@microsoft/fast-foundation!FASTSwitch:class"
|
|
14286
|
+
},
|
|
14287
|
+
{
|
|
14288
|
+
"kind": "Content",
|
|
14289
|
+
"text": " "
|
|
14290
|
+
}
|
|
14291
|
+
],
|
|
14292
|
+
"releaseTag": "Public",
|
|
14293
|
+
"name": "Switch",
|
|
14294
|
+
"preserveMemberOrder": false,
|
|
14295
|
+
"members": [
|
|
14296
|
+
{
|
|
14297
|
+
"kind": "Property",
|
|
14298
|
+
"canonicalReference": "@fluentui/web-components!Switch#labelPosition:member",
|
|
14299
|
+
"docComment": "/**\n * The label position of the switch\n *\n * @default 'after'\n *\n * @remarks\n *\n * HTML Attribute: labelposition\n *\n * @public\n */\n",
|
|
14300
|
+
"excerptTokens": [
|
|
14301
|
+
{
|
|
14302
|
+
"kind": "Content",
|
|
14303
|
+
"text": "labelPosition: "
|
|
14304
|
+
},
|
|
14305
|
+
{
|
|
14306
|
+
"kind": "Reference",
|
|
14307
|
+
"text": "SwitchLabelPosition",
|
|
14308
|
+
"canonicalReference": "@fluentui/web-components!SwitchLabelPosition:type"
|
|
14309
|
+
},
|
|
14310
|
+
{
|
|
14311
|
+
"kind": "Content",
|
|
14312
|
+
"text": " | undefined"
|
|
14313
|
+
},
|
|
14314
|
+
{
|
|
14315
|
+
"kind": "Content",
|
|
14316
|
+
"text": ";"
|
|
14317
|
+
}
|
|
14318
|
+
],
|
|
14319
|
+
"isReadonly": false,
|
|
14320
|
+
"isOptional": false,
|
|
14321
|
+
"releaseTag": "Public",
|
|
14322
|
+
"name": "labelPosition",
|
|
14323
|
+
"propertyTypeTokenRange": {
|
|
14324
|
+
"startIndex": 1,
|
|
14325
|
+
"endIndex": 3
|
|
14326
|
+
},
|
|
14327
|
+
"isStatic": false,
|
|
14328
|
+
"isProtected": false
|
|
14329
|
+
}
|
|
14330
|
+
],
|
|
14331
|
+
"extendsTokenRange": {
|
|
14332
|
+
"startIndex": 1,
|
|
14333
|
+
"endIndex": 2
|
|
14334
|
+
},
|
|
14335
|
+
"implementsTokenRanges": []
|
|
14336
|
+
},
|
|
14337
|
+
{
|
|
14338
|
+
"kind": "TypeAlias",
|
|
14339
|
+
"canonicalReference": "@fluentui/web-components!SwitchLabelPosition:type",
|
|
14340
|
+
"docComment": "/**\n * Applies label position\n *\n * @public\n */\n",
|
|
14341
|
+
"excerptTokens": [
|
|
14342
|
+
{
|
|
14343
|
+
"kind": "Content",
|
|
14344
|
+
"text": "export declare type SwitchLabelPosition = "
|
|
14345
|
+
},
|
|
14346
|
+
{
|
|
14347
|
+
"kind": "Reference",
|
|
14348
|
+
"text": "ValuesOf",
|
|
14349
|
+
"canonicalReference": "@microsoft/fast-foundation!ValuesOf:type"
|
|
14350
|
+
},
|
|
14351
|
+
{
|
|
14352
|
+
"kind": "Content",
|
|
14353
|
+
"text": "<typeof "
|
|
14354
|
+
},
|
|
14355
|
+
{
|
|
14356
|
+
"kind": "Reference",
|
|
14357
|
+
"text": "SwitchLabelPosition",
|
|
14358
|
+
"canonicalReference": "@fluentui/web-components!SwitchLabelPosition:var"
|
|
14359
|
+
},
|
|
14360
|
+
{
|
|
14361
|
+
"kind": "Content",
|
|
14362
|
+
"text": ">"
|
|
14363
|
+
},
|
|
14364
|
+
{
|
|
14365
|
+
"kind": "Content",
|
|
14366
|
+
"text": ";"
|
|
14367
|
+
}
|
|
14368
|
+
],
|
|
14369
|
+
"releaseTag": "Public",
|
|
14370
|
+
"name": "SwitchLabelPosition",
|
|
14371
|
+
"typeTokenRange": {
|
|
14372
|
+
"startIndex": 1,
|
|
14373
|
+
"endIndex": 5
|
|
14374
|
+
}
|
|
14375
|
+
},
|
|
14376
|
+
{
|
|
14377
|
+
"kind": "Variable",
|
|
14378
|
+
"canonicalReference": "@fluentui/web-components!SwitchLabelPosition:var",
|
|
14379
|
+
"docComment": "/**\n * SwitchLabelPosition Constants\n *\n * @public\n */\n",
|
|
14380
|
+
"excerptTokens": [
|
|
14381
|
+
{
|
|
14382
|
+
"kind": "Content",
|
|
14383
|
+
"text": "SwitchLabelPosition: "
|
|
14384
|
+
},
|
|
14385
|
+
{
|
|
14386
|
+
"kind": "Content",
|
|
14387
|
+
"text": "{\n readonly above: \"above\";\n readonly after: \"after\";\n readonly before: \"before\";\n}"
|
|
14388
|
+
}
|
|
14389
|
+
],
|
|
14390
|
+
"isReadonly": true,
|
|
14391
|
+
"releaseTag": "Public",
|
|
14392
|
+
"name": "SwitchLabelPosition",
|
|
14393
|
+
"variableTypeTokenRange": {
|
|
14394
|
+
"startIndex": 1,
|
|
14395
|
+
"endIndex": 2
|
|
14396
|
+
}
|
|
14397
|
+
},
|
|
14398
|
+
{
|
|
14399
|
+
"kind": "Variable",
|
|
14400
|
+
"canonicalReference": "@fluentui/web-components!switchStyles:var",
|
|
14401
|
+
"docComment": "",
|
|
14402
|
+
"excerptTokens": [
|
|
14403
|
+
{
|
|
14404
|
+
"kind": "Content",
|
|
14405
|
+
"text": "styles: "
|
|
14406
|
+
},
|
|
14407
|
+
{
|
|
14408
|
+
"kind": "Content",
|
|
14409
|
+
"text": "import(\"@microsoft/fast-element\")."
|
|
14410
|
+
},
|
|
14411
|
+
{
|
|
14412
|
+
"kind": "Reference",
|
|
14413
|
+
"text": "ElementStyles",
|
|
14414
|
+
"canonicalReference": "@microsoft/fast-element!ElementStyles:class"
|
|
14415
|
+
}
|
|
14416
|
+
],
|
|
14417
|
+
"isReadonly": true,
|
|
14418
|
+
"releaseTag": "Public",
|
|
14419
|
+
"name": "switchStyles",
|
|
14420
|
+
"variableTypeTokenRange": {
|
|
14421
|
+
"startIndex": 1,
|
|
14422
|
+
"endIndex": 3
|
|
14423
|
+
}
|
|
14424
|
+
},
|
|
14425
|
+
{
|
|
14426
|
+
"kind": "Variable",
|
|
14427
|
+
"canonicalReference": "@fluentui/web-components!switchTemplate:var",
|
|
14428
|
+
"docComment": "",
|
|
14429
|
+
"excerptTokens": [
|
|
14430
|
+
{
|
|
14431
|
+
"kind": "Content",
|
|
14432
|
+
"text": "template: "
|
|
14433
|
+
},
|
|
14434
|
+
{
|
|
14435
|
+
"kind": "Reference",
|
|
14436
|
+
"text": "ElementViewTemplate",
|
|
14437
|
+
"canonicalReference": "@microsoft/fast-element!ElementViewTemplate:interface"
|
|
14438
|
+
},
|
|
14439
|
+
{
|
|
14440
|
+
"kind": "Content",
|
|
14441
|
+
"text": "<"
|
|
14442
|
+
},
|
|
14443
|
+
{
|
|
14444
|
+
"kind": "Reference",
|
|
14445
|
+
"text": "Switch",
|
|
14446
|
+
"canonicalReference": "@fluentui/web-components!Switch:class"
|
|
14447
|
+
},
|
|
14448
|
+
{
|
|
14449
|
+
"kind": "Content",
|
|
14450
|
+
"text": ">"
|
|
14451
|
+
}
|
|
14452
|
+
],
|
|
14453
|
+
"isReadonly": true,
|
|
14454
|
+
"releaseTag": "Public",
|
|
14455
|
+
"name": "switchTemplate",
|
|
14456
|
+
"variableTypeTokenRange": {
|
|
14457
|
+
"startIndex": 1,
|
|
14458
|
+
"endIndex": 5
|
|
14459
|
+
}
|
|
14460
|
+
},
|
|
14233
14461
|
{
|
|
14234
14462
|
"kind": "Class",
|
|
14235
14463
|
"canonicalReference": "@fluentui/web-components!Text_2:class",
|
package/dist/web-components.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { FASTElement } from '@microsoft/fast-element';
|
|
|
7
7
|
import { FASTElementDefinition } from '@microsoft/fast-element';
|
|
8
8
|
import { FASTProgress } from '@microsoft/fast-foundation';
|
|
9
9
|
import { FASTProgressRing } from '@microsoft/fast-foundation';
|
|
10
|
+
import { FASTSwitch } from '@microsoft/fast-foundation';
|
|
10
11
|
import { StartEnd } from '@microsoft/fast-foundation';
|
|
11
12
|
import { StartEndOptions } from '@microsoft/fast-foundation';
|
|
12
13
|
import { StaticallyComposableHTML } from '@microsoft/fast-foundation';
|
|
@@ -1063,6 +1064,15 @@ export declare const curveEasyEaseMax: CSSDesignToken<string>;
|
|
|
1063
1064
|
|
|
1064
1065
|
export declare const curveLinear: CSSDesignToken<string>;
|
|
1065
1066
|
|
|
1067
|
+
/**
|
|
1068
|
+
* The Fluent Switch Element.
|
|
1069
|
+
*
|
|
1070
|
+
* @public
|
|
1071
|
+
* @remarks
|
|
1072
|
+
* HTML Element: \<fluent-switch\>
|
|
1073
|
+
*/
|
|
1074
|
+
export declare const definition: FASTElementDefinition<typeof Switch>;
|
|
1075
|
+
|
|
1066
1076
|
export declare const durationFast: CSSDesignToken<string>;
|
|
1067
1077
|
|
|
1068
1078
|
export declare const durationFaster: CSSDesignToken<string>;
|
|
@@ -1380,6 +1390,38 @@ export declare const strokeWidthThickest: CSSDesignToken<string>;
|
|
|
1380
1390
|
|
|
1381
1391
|
export declare const strokeWidthThin: CSSDesignToken<string>;
|
|
1382
1392
|
|
|
1393
|
+
export declare class Switch extends FASTSwitch {
|
|
1394
|
+
/**
|
|
1395
|
+
* The label position of the switch
|
|
1396
|
+
*
|
|
1397
|
+
* @public
|
|
1398
|
+
* @default 'after'
|
|
1399
|
+
* @remarks
|
|
1400
|
+
* HTML Attribute: labelposition
|
|
1401
|
+
*/
|
|
1402
|
+
labelPosition: SwitchLabelPosition | undefined;
|
|
1403
|
+
}
|
|
1404
|
+
|
|
1405
|
+
/**
|
|
1406
|
+
* SwitchLabelPosition Constants
|
|
1407
|
+
* @public
|
|
1408
|
+
*/
|
|
1409
|
+
export declare const SwitchLabelPosition: {
|
|
1410
|
+
readonly above: "above";
|
|
1411
|
+
readonly after: "after";
|
|
1412
|
+
readonly before: "before";
|
|
1413
|
+
};
|
|
1414
|
+
|
|
1415
|
+
/**
|
|
1416
|
+
* Applies label position
|
|
1417
|
+
* @public
|
|
1418
|
+
*/
|
|
1419
|
+
export declare type SwitchLabelPosition = ValuesOf<typeof SwitchLabelPosition>;
|
|
1420
|
+
|
|
1421
|
+
export declare const switchStyles: ElementStyles;
|
|
1422
|
+
|
|
1423
|
+
export declare const switchTemplate: ElementViewTemplate<Switch>;
|
|
1424
|
+
|
|
1383
1425
|
/**
|
|
1384
1426
|
* The base class used for constructing a fluent-text custom element
|
|
1385
1427
|
* @public
|