@fluentui/web-components 3.0.0-alpha.24 → 3.0.0-alpha.26
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/checkbox/checkbox.d.ts +35 -0
- package/dist/dts/checkbox/checkbox.definition.d.ts +9 -0
- package/dist/dts/checkbox/checkbox.options.d.ts +28 -0
- package/dist/dts/checkbox/checkbox.styles.d.ts +5 -0
- package/dist/dts/checkbox/checkbox.template.d.ts +7 -0
- package/dist/dts/checkbox/define.d.ts +1 -0
- package/dist/dts/checkbox/index.d.ts +5 -0
- package/dist/dts/index.d.ts +1 -0
- package/dist/dts/theme/index.d.ts +1 -1
- package/dist/dts/theme/set-theme.d.ts +2 -0
- package/dist/esm/checkbox/checkbox.definition.js +17 -0
- package/dist/esm/checkbox/checkbox.definition.js.map +1 -0
- package/dist/esm/checkbox/checkbox.js +19 -0
- package/dist/esm/checkbox/checkbox.js.map +1 -0
- package/dist/esm/checkbox/checkbox.options.js +25 -0
- package/dist/esm/checkbox/checkbox.options.js.map +1 -0
- package/dist/esm/checkbox/checkbox.styles.js +164 -0
- package/dist/esm/checkbox/checkbox.styles.js.map +1 -0
- package/dist/esm/checkbox/checkbox.template.js +27 -0
- package/dist/esm/checkbox/checkbox.template.js.map +1 -0
- package/dist/esm/checkbox/define.js +4 -0
- package/dist/esm/checkbox/define.js.map +1 -0
- package/dist/esm/checkbox/index.js +6 -0
- package/dist/esm/checkbox/index.js.map +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/theme/index.js +1 -1
- package/dist/esm/theme/index.js.map +1 -1
- package/dist/esm/theme/set-theme.js +5 -0
- package/dist/esm/theme/set-theme.js.map +1 -1
- package/dist/esm/toggle-button/toggle-button.js +3 -0
- package/dist/esm/toggle-button/toggle-button.js.map +1 -1
- package/dist/fluent-web-components.api.json +446 -0
- package/dist/web-components.d.ts +91 -0
- package/dist/web-components.js +206 -35
- package/dist/web-components.min.js +167 -165
- package/docs/api-report.md +47 -0
- package/package.json +5 -1
- package/CHANGELOG.json +0 -3243
- package/dist/tsdoc-metadata.json +0 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,31 @@
|
|
|
1
1
|
# Change Log - @fluentui/web-components
|
|
2
2
|
|
|
3
|
-
This log was last generated on Mon,
|
|
3
|
+
This log was last generated on Mon, 07 Aug 2023 04:17:02 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [3.0.0-alpha.26](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v3.0.0-alpha.26)
|
|
8
|
+
|
|
9
|
+
Mon, 07 Aug 2023 04:17:02 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v3.0.0-alpha.25..@fluentui/web-components_v3.0.0-alpha.26)
|
|
11
|
+
|
|
12
|
+
### Changes
|
|
13
|
+
|
|
14
|
+
- feat: Add support for scoped theming ([PR #28441](https://github.com/microsoft/fluentui/pull/28441) by miroslav.stastny@microsoft.com)
|
|
15
|
+
|
|
16
|
+
## [3.0.0-alpha.25](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v3.0.0-alpha.25)
|
|
17
|
+
|
|
18
|
+
Wed, 19 Jul 2023 04:18:54 GMT
|
|
19
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v3.0.0-alpha.24..@fluentui/web-components_v3.0.0-alpha.25)
|
|
20
|
+
|
|
21
|
+
### Changes
|
|
22
|
+
|
|
23
|
+
- fix(web-components): check if component is connected before calling setAttribute in attribute changed callback ([PR #28500](https://github.com/microsoft/fluentui/pull/28500) by chhol@microsoft.com)
|
|
24
|
+
- feat(checkbox): Add checkbox web component ([PR #27450](https://github.com/microsoft/fluentui/pull/27450) by brianbrady@microsoft.com)
|
|
25
|
+
|
|
7
26
|
## [3.0.0-alpha.24](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v3.0.0-alpha.24)
|
|
8
27
|
|
|
9
|
-
Mon, 12 Jun 2023 04:17:
|
|
28
|
+
Mon, 12 Jun 2023 04:17:30 GMT
|
|
10
29
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v3.0.0-alpha.23..@fluentui/web-components_v3.0.0-alpha.24)
|
|
11
30
|
|
|
12
31
|
### Changes
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { FASTCheckbox } from '@microsoft/fast-foundation';
|
|
2
|
+
import { CheckboxLabelPosition, CheckboxShape, CheckboxSize } from './checkbox.options.js';
|
|
3
|
+
/**
|
|
4
|
+
* The base class used for constucting a fluent checkbox custom element
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export declare class Checkbox extends FASTCheckbox {
|
|
8
|
+
/**
|
|
9
|
+
* Sets shape of the checkbox.
|
|
10
|
+
*
|
|
11
|
+
* @public
|
|
12
|
+
* @default 'square'
|
|
13
|
+
* @remarks
|
|
14
|
+
* HTML Attribute: shape
|
|
15
|
+
*/
|
|
16
|
+
shape?: CheckboxShape;
|
|
17
|
+
/**
|
|
18
|
+
* Sets size of the checkbox.
|
|
19
|
+
*
|
|
20
|
+
* @public
|
|
21
|
+
* @default 'medium'
|
|
22
|
+
* @remarks
|
|
23
|
+
* HTML Attribute: size
|
|
24
|
+
*/
|
|
25
|
+
size?: CheckboxSize;
|
|
26
|
+
/**
|
|
27
|
+
* Sets position of the label relative to the input
|
|
28
|
+
*
|
|
29
|
+
* @public
|
|
30
|
+
* @default 'after'
|
|
31
|
+
* @remarks
|
|
32
|
+
* HTML Attribute: label-position
|
|
33
|
+
*/
|
|
34
|
+
labelPosition?: CheckboxLabelPosition;
|
|
35
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ValuesOf } from '@microsoft/fast-foundation';
|
|
2
|
+
/**
|
|
3
|
+
* Checkbox shape
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export declare const CheckboxShape: {
|
|
7
|
+
readonly circular: "circular";
|
|
8
|
+
readonly square: "square";
|
|
9
|
+
};
|
|
10
|
+
export declare type CheckboxShape = ValuesOf<typeof CheckboxShape>;
|
|
11
|
+
/**
|
|
12
|
+
* Checkbox size
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
15
|
+
export declare const CheckboxSize: {
|
|
16
|
+
readonly medium: "medium";
|
|
17
|
+
readonly large: "large";
|
|
18
|
+
};
|
|
19
|
+
export declare type CheckboxSize = ValuesOf<typeof CheckboxSize>;
|
|
20
|
+
/**
|
|
21
|
+
* Checkbox label position
|
|
22
|
+
* @public
|
|
23
|
+
*/
|
|
24
|
+
export declare const CheckboxLabelPosition: {
|
|
25
|
+
readonly before: "before";
|
|
26
|
+
readonly after: "after";
|
|
27
|
+
};
|
|
28
|
+
export declare type CheckboxLabelPosition = ValuesOf<typeof CheckboxLabelPosition>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * from './checkbox.js';
|
|
2
|
+
export * from './checkbox.options.js';
|
|
3
|
+
export { definition as CheckboxDefinition } from './checkbox.definition.js';
|
|
4
|
+
export { template as CheckboxTemplate } from './checkbox.template.js';
|
|
5
|
+
export { styles as CheckboxStyles } from './checkbox.styles.js';
|
package/dist/dts/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * from './anchor-button/index.js';
|
|
|
4
4
|
export * from './avatar/index.js';
|
|
5
5
|
export * from './badge/index.js';
|
|
6
6
|
export * from './button/index.js';
|
|
7
|
+
export * from './checkbox/index.js';
|
|
7
8
|
export * from './compound-button/index.js';
|
|
8
9
|
export * from './counter-badge/index.js';
|
|
9
10
|
export * from './divider/index.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from './design-tokens.js';
|
|
2
|
-
export { setTheme } from './set-theme.js';
|
|
2
|
+
export { setTheme, setThemeFor } from './set-theme.js';
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { Theme } from '@fluentui/tokens';
|
|
2
|
+
import { FASTElement } from '@microsoft/fast-element';
|
|
2
3
|
/**
|
|
3
4
|
* Sets the theme tokens on defaultNode.
|
|
4
5
|
* @param theme Flat object of theme token values.
|
|
5
6
|
*/
|
|
6
7
|
export declare const setTheme: (theme: Theme) => void;
|
|
8
|
+
export declare const setThemeFor: (element: FASTElement, theme: Theme) => void;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FluentDesignSystem } from '../fluent-design-system.js';
|
|
2
|
+
import { Checkbox } from './checkbox.js';
|
|
3
|
+
import { template } from './checkbox.template.js';
|
|
4
|
+
import { styles } from './checkbox.styles.js';
|
|
5
|
+
/**
|
|
6
|
+
* The Fluent Checkbox Element
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
|
+
* @remarks
|
|
10
|
+
* HTML Element: \<fluent-checkbox\>
|
|
11
|
+
*/
|
|
12
|
+
export const definition = Checkbox.compose({
|
|
13
|
+
name: `${FluentDesignSystem.prefix}-checkbox`,
|
|
14
|
+
template,
|
|
15
|
+
styles,
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=checkbox.definition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.definition.js","sourceRoot":"","sources":["../../../src/checkbox/checkbox.definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,OAAO,CAAC;IACzC,IAAI,EAAE,GAAG,kBAAkB,CAAC,MAAM,WAAW;IAC7C,QAAQ;IACR,MAAM;CACP,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { attr } from '@microsoft/fast-element';
|
|
3
|
+
import { FASTCheckbox } from '@microsoft/fast-foundation';
|
|
4
|
+
/**
|
|
5
|
+
* The base class used for constucting a fluent checkbox custom element
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export class Checkbox extends FASTCheckbox {
|
|
9
|
+
}
|
|
10
|
+
__decorate([
|
|
11
|
+
attr
|
|
12
|
+
], Checkbox.prototype, "shape", void 0);
|
|
13
|
+
__decorate([
|
|
14
|
+
attr
|
|
15
|
+
], Checkbox.prototype, "size", void 0);
|
|
16
|
+
__decorate([
|
|
17
|
+
attr({ attribute: 'label-position' })
|
|
18
|
+
], Checkbox.prototype, "labelPosition", void 0);
|
|
19
|
+
//# sourceMappingURL=checkbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.js","sourceRoot":"","sources":["../../../src/checkbox/checkbox.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAG1D;;;GAGG;AACH,MAAM,OAAO,QAAS,SAAQ,YAAY;CAiCzC;AAvBC;IADC,IAAI;uCACwB;AAW7B;IADC,IAAI;sCACsB;AAW3B;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;+CACO"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checkbox shape
|
|
3
|
+
* @public
|
|
4
|
+
*/
|
|
5
|
+
export const CheckboxShape = {
|
|
6
|
+
circular: 'circular',
|
|
7
|
+
square: 'square',
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Checkbox size
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
export const CheckboxSize = {
|
|
14
|
+
medium: 'medium',
|
|
15
|
+
large: 'large',
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Checkbox label position
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
21
|
+
export const CheckboxLabelPosition = {
|
|
22
|
+
before: 'before',
|
|
23
|
+
after: 'after',
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=checkbox.options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.options.js","sourceRoot":"","sources":["../../../src/checkbox/checkbox.options.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,QAAQ,EAAE,UAAU;IACpB,MAAM,EAAE,QAAQ;CACR,CAAC;AAIX;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;CACN,CAAC;AAIX;;;GAGG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;CACN,CAAC"}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { css } from '@microsoft/fast-element';
|
|
2
|
+
import { display } from '@microsoft/fast-foundation';
|
|
3
|
+
import { borderRadiusCircular, borderRadiusMedium, borderRadiusSmall, colorCompoundBrandBackground, colorCompoundBrandBackgroundHover, colorCompoundBrandBackgroundPressed, colorCompoundBrandForeground1, colorCompoundBrandForeground1Hover, colorCompoundBrandForeground1Pressed, colorCompoundBrandStroke, colorCompoundBrandStrokeHover, colorCompoundBrandStrokePressed, colorNeutralForeground1, colorNeutralForeground2, colorNeutralForeground3, colorNeutralForegroundDisabled, colorNeutralForegroundInverted, colorNeutralStrokeAccessible, colorNeutralStrokeAccessibleHover, colorNeutralStrokeAccessiblePressed, colorNeutralStrokeDisabled, colorStrokeFocus1, colorStrokeFocus2, colorTransparentBackgroundHover, fontFamilyBase, fontSizeBase300, lineHeightBase300, spacingHorizontalS, spacingHorizontalXS, spacingVerticalS, strokeWidthThin, } from '../theme/design-tokens.js';
|
|
4
|
+
/** Checkbox styles
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export const styles = css `
|
|
9
|
+
${display('inline-flex')}
|
|
10
|
+
:host {
|
|
11
|
+
align-items: center;
|
|
12
|
+
outline: none;
|
|
13
|
+
user-select: none;
|
|
14
|
+
vertical-align: middle;
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
font-family: ${fontFamilyBase};
|
|
17
|
+
font-size: ${fontSizeBase300};
|
|
18
|
+
line-height: ${lineHeightBase300};
|
|
19
|
+
color: ${colorNeutralForeground3};
|
|
20
|
+
position: relative;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:host(:focus-visible)::after {
|
|
24
|
+
content: '';
|
|
25
|
+
position: absolute;
|
|
26
|
+
inset: 0px;
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
border-radius: ${borderRadiusMedium};
|
|
29
|
+
outline: none;
|
|
30
|
+
border: 2px solid ${colorStrokeFocus1};
|
|
31
|
+
box-shadow: inset 0 0 0 1px ${colorStrokeFocus2};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.control {
|
|
35
|
+
position: relative;
|
|
36
|
+
box-sizing: border-box;
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-shrink: 0;
|
|
39
|
+
align-items: center;
|
|
40
|
+
justify-content: center;
|
|
41
|
+
overflow: hidden;
|
|
42
|
+
margin: ${spacingVerticalS} ${spacingHorizontalS};
|
|
43
|
+
fill: currentcolor;
|
|
44
|
+
height: 16px;
|
|
45
|
+
width: 16px;
|
|
46
|
+
border: ${strokeWidthThin} solid ${colorNeutralStrokeAccessible};
|
|
47
|
+
border-radius: ${borderRadiusSmall};
|
|
48
|
+
outline: none;
|
|
49
|
+
}
|
|
50
|
+
.label {
|
|
51
|
+
align-self: center;
|
|
52
|
+
cursor: inherit;
|
|
53
|
+
padding-inline: ${spacingHorizontalS};
|
|
54
|
+
padding-bottom: ${spacingVerticalS};
|
|
55
|
+
padding-top: ${spacingVerticalS};
|
|
56
|
+
}
|
|
57
|
+
.label__hidden {
|
|
58
|
+
display: none;
|
|
59
|
+
visibility: hidden;
|
|
60
|
+
}
|
|
61
|
+
.checked-indicator {
|
|
62
|
+
display: flex;
|
|
63
|
+
align-items: center;
|
|
64
|
+
justify-content: center;
|
|
65
|
+
color: ${colorNeutralForegroundInverted};
|
|
66
|
+
font-size: 12px;
|
|
67
|
+
margin: auto;
|
|
68
|
+
opacity: 0;
|
|
69
|
+
}
|
|
70
|
+
.indeterminate-indicator {
|
|
71
|
+
position: absolute;
|
|
72
|
+
width: 8px;
|
|
73
|
+
height: 8px;
|
|
74
|
+
border-radius: ${borderRadiusSmall};
|
|
75
|
+
background-color: ${colorCompoundBrandForeground1};
|
|
76
|
+
opacity: 0;
|
|
77
|
+
}
|
|
78
|
+
:host(:hover) {
|
|
79
|
+
color: ${colorNeutralForeground2};
|
|
80
|
+
}
|
|
81
|
+
:host(:hover) .control {
|
|
82
|
+
border-color: ${colorNeutralStrokeAccessibleHover};
|
|
83
|
+
}
|
|
84
|
+
:host(:hover) .indeterminate-indicator {
|
|
85
|
+
background-color: ${colorCompoundBrandForeground1Hover};
|
|
86
|
+
}
|
|
87
|
+
:host(:active) .control {
|
|
88
|
+
border-color: ${colorNeutralStrokeAccessiblePressed};
|
|
89
|
+
}
|
|
90
|
+
:host(:active) .indeterminate-indicator {
|
|
91
|
+
background-color: ${colorCompoundBrandForeground1Pressed};
|
|
92
|
+
}
|
|
93
|
+
:host([aria-checked='true']),
|
|
94
|
+
:host([aria-checked='mixed']),
|
|
95
|
+
:host(:active) {
|
|
96
|
+
color: ${colorNeutralForeground1};
|
|
97
|
+
}
|
|
98
|
+
:host([aria-checked='true']) .control {
|
|
99
|
+
background-color: ${colorCompoundBrandBackground};
|
|
100
|
+
}
|
|
101
|
+
:host([aria-checked='true']:hover) .control {
|
|
102
|
+
border-color: ${colorCompoundBrandStrokeHover};
|
|
103
|
+
background-color: ${colorCompoundBrandBackgroundHover};
|
|
104
|
+
}
|
|
105
|
+
:host([aria-checked='true']:active) .control {
|
|
106
|
+
background-color: ${colorCompoundBrandBackgroundPressed};
|
|
107
|
+
}
|
|
108
|
+
:host([aria-checked='mixed']:hover) .control {
|
|
109
|
+
border-color: ${colorCompoundBrandStrokeHover};
|
|
110
|
+
}
|
|
111
|
+
:host([aria-checked='true']) .checked-indicator,
|
|
112
|
+
:host([aria-checked='mixed']) .indeterminate-indicator {
|
|
113
|
+
opacity: 1;
|
|
114
|
+
}
|
|
115
|
+
:host([aria-checked='true']) .control,
|
|
116
|
+
:host([aria-checked='mixed']) .control {
|
|
117
|
+
border-color: ${colorCompoundBrandStroke};
|
|
118
|
+
}
|
|
119
|
+
:host([aria-checked='mixed']:active) .control,
|
|
120
|
+
:host([aria-checked='true']:active) .control {
|
|
121
|
+
border-color: ${colorCompoundBrandStrokePressed};
|
|
122
|
+
}
|
|
123
|
+
:host([label-position='before']) {
|
|
124
|
+
flex-direction: row-reverse;
|
|
125
|
+
}
|
|
126
|
+
:host([label-position='before']) .label {
|
|
127
|
+
padding-inline: ${spacingHorizontalS} ${spacingHorizontalXS};
|
|
128
|
+
padding-top: ${spacingVerticalS};
|
|
129
|
+
padding-bottom: ${spacingVerticalS};
|
|
130
|
+
}
|
|
131
|
+
:host([size='large']) .control {
|
|
132
|
+
width: 20px;
|
|
133
|
+
height: 20px;
|
|
134
|
+
}
|
|
135
|
+
:host([size='large']) .checked-indicator {
|
|
136
|
+
font-size: 16px;
|
|
137
|
+
height: 20px;
|
|
138
|
+
}
|
|
139
|
+
:host([aria-checked='mixed'][size='large']) .indeterminate-indicator {
|
|
140
|
+
height: 10px;
|
|
141
|
+
width: 10px;
|
|
142
|
+
}
|
|
143
|
+
:host([shape='circular']) .control,
|
|
144
|
+
:host([shape='circular']) .indeterminate-indicator {
|
|
145
|
+
border-radius: ${borderRadiusCircular};
|
|
146
|
+
}
|
|
147
|
+
:host([disabled]) .control,
|
|
148
|
+
:host([aria-checked='mixed'][disabled]) .control,
|
|
149
|
+
:host([aria-checked='true'][disabled]) .control {
|
|
150
|
+
background-color: ${colorTransparentBackgroundHover};
|
|
151
|
+
border-color: ${colorNeutralStrokeDisabled};
|
|
152
|
+
}
|
|
153
|
+
:host([aria-checked='true'][disabled]) .checked-indicator,
|
|
154
|
+
:host([disabled]) ::slotted([slot='start']),
|
|
155
|
+
:host([disabled]) .label,
|
|
156
|
+
:host([aria-checked='mixed'][disabled]) .label,
|
|
157
|
+
:host([aria-checked='true'][disabled]) .label {
|
|
158
|
+
color: ${colorNeutralForegroundDisabled};
|
|
159
|
+
}
|
|
160
|
+
:host([disabled]) .indeterminate-indicator {
|
|
161
|
+
background-color: ${colorNeutralForegroundDisabled};
|
|
162
|
+
}
|
|
163
|
+
`;
|
|
164
|
+
//# sourceMappingURL=checkbox.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.styles.js","sourceRoot":"","sources":["../../../src/checkbox/checkbox.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,kBAAkB,EAClB,iBAAiB,EACjB,4BAA4B,EAC5B,iCAAiC,EACjC,mCAAmC,EACnC,6BAA6B,EAC7B,kCAAkC,EAClC,oCAAoC,EACpC,wBAAwB,EACxB,6BAA6B,EAC7B,+BAA+B,EAC/B,uBAAuB,EACvB,uBAAuB,EACvB,uBAAuB,EACvB,8BAA8B,EAC9B,8BAA8B,EAC9B,4BAA4B,EAC5B,iCAAiC,EACjC,mCAAmC,EACnC,0BAA0B,EAC1B,iBAAiB,EACjB,iBAAiB,EACjB,+BAA+B,EAC/B,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,GAChB,MAAM,2BAA2B,CAAC;AAEnC;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;IACrB,OAAO,CAAC,aAAa,CAAC;;;;;;;mBAOP,cAAc;iBAChB,eAAe;mBACb,iBAAiB;aACvB,uBAAuB;;;;;;;;;qBASf,kBAAkB;;wBAEf,iBAAiB;kCACP,iBAAiB;;;;;;;;;;;cAWrC,gBAAgB,IAAI,kBAAkB;;;;cAItC,eAAe,UAAU,4BAA4B;qBAC9C,iBAAiB;;;;;;sBAMhB,kBAAkB;sBAClB,gBAAgB;mBACnB,gBAAgB;;;;;;;;;;aAUtB,8BAA8B;;;;;;;;;qBAStB,iBAAiB;wBACd,6BAA6B;;;;aAIxC,uBAAuB;;;oBAGhB,iCAAiC;;;wBAG7B,kCAAkC;;;oBAGtC,mCAAmC;;;wBAG/B,oCAAoC;;;;;aAK/C,uBAAuB;;;wBAGZ,4BAA4B;;;oBAGhC,6BAA6B;wBACzB,iCAAiC;;;wBAGjC,mCAAmC;;;oBAGvC,6BAA6B;;;;;;;;oBAQ7B,wBAAwB;;;;oBAIxB,+BAA+B;;;;;;sBAM7B,kBAAkB,IAAI,mBAAmB;mBAC5C,gBAAgB;sBACb,gBAAgB;;;;;;;;;;;;;;;;qBAgBjB,oBAAoB;;;;;wBAKjB,+BAA+B;oBACnC,0BAA0B;;;;;;;aAOjC,8BAA8B;;;wBAGnB,8BAA8B;;CAErD,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { html } from '@microsoft/fast-element';
|
|
2
|
+
import { checkboxTemplate } from '@microsoft/fast-foundation';
|
|
3
|
+
const checkedIndicator = html.partial(`
|
|
4
|
+
<div class="checked-indicator">
|
|
5
|
+
<svg fill="currentColor"
|
|
6
|
+
aria-hidden="true"
|
|
7
|
+
width="1em"
|
|
8
|
+
height="1em"
|
|
9
|
+
viewBox="0 0 12 12"
|
|
10
|
+
xmlns="http://www.w3.org/2000/svg">
|
|
11
|
+
<path d="M9.76 3.2c.3.29.32.76.04 1.06l-4.25 4.5a.75.75 0 0 1-1.08.02L2.22 6.53a.75.75 0 0 1 1.06-1.06l1.7 1.7L8.7 3.24a.75.75 0 0 1 1.06-.04Z" fill="currentColor">
|
|
12
|
+
</path>
|
|
13
|
+
</svg>
|
|
14
|
+
</div>
|
|
15
|
+
`);
|
|
16
|
+
const indeterminateIndicator = html.partial(`
|
|
17
|
+
<div class="indeterminate-indicator"></div>
|
|
18
|
+
`);
|
|
19
|
+
/**
|
|
20
|
+
* Template for the Checkbox component
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
23
|
+
export const template = checkboxTemplate({
|
|
24
|
+
checkedIndicator: checkedIndicator,
|
|
25
|
+
indeterminateIndicator: indeterminateIndicator,
|
|
26
|
+
});
|
|
27
|
+
//# sourceMappingURL=checkbox.template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.template.js","sourceRoot":"","sources":["../../../src/checkbox/checkbox.template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,IAAI,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAI9D,MAAM,gBAAgB,GAAG,IAAI,CAAC,OAAO,CAAC;;;;;;;;;;;;CAYrC,CAAC,CAAC;AAEH,MAAM,sBAAsB,GAAG,IAAI,CAAC,OAAO,CAAC;;CAE3C,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAkC,gBAAgB,CAAC;IACtE,gBAAgB,EAAE,gBAAgB;IAClC,sBAAsB,EAAE,sBAAsB;CAC/C,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define.js","sourceRoot":"","sources":["../../../src/checkbox/define.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,UAAU,CAAC,MAAM,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from './checkbox.js';
|
|
2
|
+
export * from './checkbox.options.js';
|
|
3
|
+
export { definition as CheckboxDefinition } from './checkbox.definition.js';
|
|
4
|
+
export { template as CheckboxTemplate } from './checkbox.template.js';
|
|
5
|
+
export { styles as CheckboxStyles } from './checkbox.styles.js';
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/checkbox/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,UAAU,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC5E,OAAO,EAAE,QAAQ,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAC"}
|
package/dist/esm/index.js
CHANGED
|
@@ -4,6 +4,7 @@ export * from './anchor-button/index.js';
|
|
|
4
4
|
export * from './avatar/index.js';
|
|
5
5
|
export * from './badge/index.js';
|
|
6
6
|
export * from './button/index.js';
|
|
7
|
+
export * from './checkbox/index.js';
|
|
7
8
|
export * from './compound-button/index.js';
|
|
8
9
|
export * from './counter-badge/index.js';
|
|
9
10
|
export * from './divider/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,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,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AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AAEzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC"}
|
package/dist/esm/theme/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/theme/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/theme/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -9,4 +9,9 @@ export const setTheme = (theme) => {
|
|
|
9
9
|
tokens[t].withDefault(theme[t]);
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
|
+
export const setThemeFor = (element, theme) => {
|
|
13
|
+
for (const t of tokenNames) {
|
|
14
|
+
tokens[t].setValueFor(element, theme[t]);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
12
17
|
//# sourceMappingURL=set-theme.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"set-theme.js","sourceRoot":"","sources":["../../../src/theme/set-theme.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"set-theme.js","sourceRoot":"","sources":["../../../src/theme/set-theme.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,MAAM,oBAAoB,CAAC;AAE7C,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAoB,CAAC;AAE1D;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAAY,EAAE,EAAE;IACvC,KAAK,MAAM,CAAC,IAAI,UAAU,EAAE;QAC1B,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAW,CAAC,CAAC;KAC3C;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,OAAoB,EAAE,KAAY,EAAE,EAAE;IAChE,KAAK,MAAM,CAAC,IAAI,UAAU,EAAE;QAC1B,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAW,CAAC,CAAC;KACpD;AACH,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle-button.js","sourceRoot":"","sources":["../../../src/toggle-button/toggle-button.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C;;;GAGG;AACH,MAAM,OAAO,YAAa,SAAQ,MAAM;
|
|
1
|
+
{"version":3,"file":"toggle-button.js","sourceRoot":"","sources":["../../../src/toggle-button/toggle-button.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C;;;GAGG;AACH,MAAM,OAAO,YAAa,SAAQ,MAAM;IAwEtC;QACE,KAAK,EAAE,CAAC;QAxEV;;;;WAIG;QACO,iBAAY,GAAY,KAAK,CAAC;QAExC;;;;;;;WAOG;QAEI,qBAAgB,GAAY,KAAK,CAAC;QAMlC,mBAAc,GAAY,KAAK,CAAC;QAWvC;;;;WAIG;QAEI,YAAO,GAAY,KAAK,CAAC;QAmBhC;;;;;;WAMG;QAEI,mBAAc,GAAY,KAAK,CAAC;QAyBvC;;WAEG;QACO,4BA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