@fluentui/web-components 2.5.6 → 2.5.7
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 +31 -1
- package/CHANGELOG.md +11 -2
- package/dist/dts/combobox/combobox.stories.d.ts +5 -0
- package/dist/dts/custom-elements.d.ts +3 -35
- package/dist/dts/number-field/index.d.ts +1 -1
- package/dist/dts/number-field/number-field.styles.d.ts +1 -2
- package/dist/dts/search/index.d.ts +1 -1
- package/dist/dts/search/search.styles.d.ts +2 -3
- package/dist/dts/select/index.d.ts +1 -1
- package/dist/dts/select/select.styles.d.ts +11 -3
- package/dist/dts/styles/patterns/button.styles.d.ts +12 -6
- package/dist/dts/styles/patterns/input.styles.d.ts +13 -5
- package/dist/dts/text-area/index.d.ts +2 -18
- package/dist/dts/text-area/text-area.stories.d.ts +1 -17
- package/dist/dts/text-area/text-area.styles.d.ts +1 -2
- package/dist/dts/text-field/index.d.ts +2 -18
- package/dist/dts/text-field/text-field.stories.d.ts +1 -17
- package/dist/dts/text-field/text-field.styles.d.ts +1 -2
- package/dist/esm/anchor/anchor.styles.js +3 -10
- package/dist/esm/button/button.styles.js +14 -39
- package/dist/esm/combobox/combobox.stories.js +7 -2
- package/dist/esm/combobox/combobox.styles.js +22 -32
- package/dist/esm/number-field/number-field.styles.js +5 -16
- package/dist/esm/search/search.styles.js +8 -11
- package/dist/esm/select/select.stories.js +2 -2
- package/dist/esm/select/select.styles.js +35 -100
- package/dist/esm/styles/patterns/button.styles.js +190 -149
- package/dist/esm/styles/patterns/input.styles.js +112 -93
- package/dist/esm/text-area/text-area.styles.js +5 -11
- package/dist/esm/text-field/text-field.styles.js +5 -11
- package/dist/fluent-web-components.api.json +127 -397
- package/dist/web-components.d.ts +39 -90
- package/dist/web-components.js +99 -100
- package/dist/web-components.min.js +93 -123
- package/docs/api-report.md +38 -99
- package/karma.conf.js +3 -8
- package/package.json +27 -40
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,37 @@
|
|
|
2
2
|
"name": "@fluentui/web-components",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Fri, 21 Oct 2022 07:43:28 GMT",
|
|
6
|
+
"tag": "@fluentui/web-components_v2.5.7",
|
|
7
|
+
"version": "2.5.7",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "47367562+bheston@users.noreply.github.com",
|
|
12
|
+
"package": "@fluentui/web-components",
|
|
13
|
+
"commit": "b63fc36cbcbe821d2e53d7924a3cc5aedb6a33a2",
|
|
14
|
+
"comment": "Cleaned up shared styles for button and input for improved reuse and color updates"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Mon, 10 Oct 2022 07:38:23 GMT",
|
|
21
|
+
"tag": "@fluentui/web-components_v2.5.6",
|
|
22
|
+
"version": "2.5.6",
|
|
23
|
+
"comments": {
|
|
24
|
+
"none": [
|
|
25
|
+
{
|
|
26
|
+
"author": "martinhochel@microsoft.com",
|
|
27
|
+
"package": "@fluentui/web-components",
|
|
28
|
+
"commit": "337a32b1a4f2e82235e193e115666aee659c650c",
|
|
29
|
+
"comment": "chore: migrate to webpack5 and apply single version policy"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"date": "Mon, 19 Sep 2022 07:47:29 GMT",
|
|
6
36
|
"tag": "@fluentui/web-components_v2.5.6",
|
|
7
37
|
"version": "2.5.6",
|
|
8
38
|
"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, 21 Oct 2022 07:43:28 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [2.5.7](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v2.5.7)
|
|
8
|
+
|
|
9
|
+
Fri, 21 Oct 2022 07:43:28 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v2.5.6..@fluentui/web-components_v2.5.7)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- Cleaned up shared styles for button and input for improved reuse and color updates ([PR #24929](https://github.com/microsoft/fluentui/pull/24929) by 47367562+bheston@users.noreply.github.com)
|
|
15
|
+
|
|
7
16
|
## [2.5.6](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v2.5.6)
|
|
8
17
|
|
|
9
|
-
Mon, 19 Sep 2022 07:
|
|
18
|
+
Mon, 19 Sep 2022 07:47:29 GMT
|
|
10
19
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v2.5.5..@fluentui/web-components_v2.5.6)
|
|
11
20
|
|
|
12
21
|
### Patches
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Accordion, AnchoredRegion, Breadcrumb, DataGrid, Dialog, Divider, ListboxOption, RadioGroup, Skeleton, SliderLabel, Tabs,
|
|
1
|
+
import type { Accordion, AnchoredRegion, Breadcrumb, DataGrid, Dialog, Divider, ListboxOption, RadioGroup, Skeleton, SliderLabel, Tabs, TreeView } from '@microsoft/fast-foundation';
|
|
2
2
|
/**
|
|
3
3
|
* Export all custom element definitions
|
|
4
4
|
*/
|
|
@@ -93,40 +93,8 @@ export declare const allComponents: {
|
|
|
93
93
|
fluentTabs: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<import("@microsoft/fast-foundation").FoundationElementDefinition> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<import("@microsoft/fast-foundation").FoundationElementDefinition, typeof Tabs>;
|
|
94
94
|
fluentTab: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<import("@microsoft/fast-foundation").FoundationElementDefinition> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<import("@microsoft/fast-foundation").FoundationElementDefinition, typeof import("@microsoft/fast-foundation").Tab>;
|
|
95
95
|
fluentTabPanel: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<import("@microsoft/fast-foundation").FoundationElementDefinition> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<import("@microsoft/fast-foundation").FoundationElementDefinition, typeof import("@microsoft/fast-foundation").TabPanel>;
|
|
96
|
-
fluentTextArea: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<
|
|
97
|
-
|
|
98
|
-
baseClass: typeof TextArea;
|
|
99
|
-
template: import("@microsoft/fast-foundation").FoundationElementTemplate<import("@microsoft/fast-element").ViewTemplate<TextArea, any>, import("@microsoft/fast-foundation").FoundationElementDefinition>;
|
|
100
|
-
styles: (context: any, definition: any) => import("@microsoft/fast-element").ElementStyles;
|
|
101
|
-
shadowOptions: {
|
|
102
|
-
delegatesFocus: true;
|
|
103
|
-
};
|
|
104
|
-
}> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<{
|
|
105
|
-
baseName: string;
|
|
106
|
-
baseClass: typeof TextArea;
|
|
107
|
-
template: import("@microsoft/fast-foundation").FoundationElementTemplate<import("@microsoft/fast-element").ViewTemplate<TextArea, any>, import("@microsoft/fast-foundation").FoundationElementDefinition>;
|
|
108
|
-
styles: (context: any, definition: any) => import("@microsoft/fast-element").ElementStyles;
|
|
109
|
-
shadowOptions: {
|
|
110
|
-
delegatesFocus: true;
|
|
111
|
-
};
|
|
112
|
-
}, typeof import("./text-area/index").TextArea>;
|
|
113
|
-
fluentTextField: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<{
|
|
114
|
-
baseName: string;
|
|
115
|
-
baseClass: typeof TextField;
|
|
116
|
-
template: import("@microsoft/fast-foundation").FoundationElementTemplate<import("@microsoft/fast-element").ViewTemplate<TextField, any>, import("@microsoft/fast-foundation").TextFieldOptions>;
|
|
117
|
-
styles: (context: any, definition: any) => import("@microsoft/fast-element").ElementStyles;
|
|
118
|
-
shadowOptions: {
|
|
119
|
-
delegatesFocus: true;
|
|
120
|
-
};
|
|
121
|
-
}> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<{
|
|
122
|
-
baseName: string;
|
|
123
|
-
baseClass: typeof TextField;
|
|
124
|
-
template: import("@microsoft/fast-foundation").FoundationElementTemplate<import("@microsoft/fast-element").ViewTemplate<TextField, any>, import("@microsoft/fast-foundation").TextFieldOptions>;
|
|
125
|
-
styles: (context: any, definition: any) => import("@microsoft/fast-element").ElementStyles;
|
|
126
|
-
shadowOptions: {
|
|
127
|
-
delegatesFocus: true;
|
|
128
|
-
};
|
|
129
|
-
}, typeof import("./text-field/index").TextField>;
|
|
96
|
+
fluentTextArea: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<import("@microsoft/fast-foundation").FoundationElementDefinition> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<import("@microsoft/fast-foundation").FoundationElementDefinition, typeof import("./text-area/index").TextArea>;
|
|
97
|
+
fluentTextField: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<import("@microsoft/fast-foundation").FoundationElementDefinition> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<import("@microsoft/fast-foundation").FoundationElementDefinition, typeof import("./text-field/index").TextField>;
|
|
130
98
|
fluentToolbar: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<import("@microsoft/fast-foundation").FoundationElementDefinition> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<import("@microsoft/fast-foundation").FoundationElementDefinition, typeof import("./toolbar/index").Toolbar>;
|
|
131
99
|
fluentTooltip: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<import("@microsoft/fast-foundation").FoundationElementDefinition> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<import("@microsoft/fast-foundation").FoundationElementDefinition, typeof import("./tooltip/index").Tooltip>;
|
|
132
100
|
fluentTreeView: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<import("@microsoft/fast-foundation").FoundationElementDefinition> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<import("@microsoft/fast-foundation").FoundationElementDefinition, typeof TreeView>;
|
|
@@ -26,7 +26,7 @@ export declare class NumberField extends FoundationNumberField {
|
|
|
26
26
|
* Styles for NumberField
|
|
27
27
|
* @public
|
|
28
28
|
*/
|
|
29
|
-
export declare const numberFieldStyles: (context:
|
|
29
|
+
export declare const numberFieldStyles: (context: import("@microsoft/fast-foundation").ElementDefinitionContext, definition: NumberFieldOptions) => import("@microsoft/fast-element").ElementStyles;
|
|
30
30
|
/**
|
|
31
31
|
* The Fluent Number Field Custom Element. Implements {@link @microsoft/fast-foundation#NumberField},
|
|
32
32
|
* {@link @microsoft/fast-foundation#numberFieldTemplate}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { ElementStyles } from '@microsoft/fast-element';
|
|
2
2
|
import { ElementDefinitionContext, NumberFieldOptions } from '@microsoft/fast-foundation';
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const numberFieldStyles: (context: any, definition: any) => ElementStyles;
|
|
3
|
+
export declare const numberFieldStyles: (context: ElementDefinitionContext, definition: NumberFieldOptions) => ElementStyles;
|
|
@@ -35,4 +35,4 @@ export * from './search.template';
|
|
|
35
35
|
* Styles for Search
|
|
36
36
|
* @public
|
|
37
37
|
*/
|
|
38
|
-
export declare const searchStyles: (context:
|
|
38
|
+
export declare const searchStyles: (context: import("@microsoft/fast-foundation").ElementDefinitionContext, definition: SearchOptions) => import("@microsoft/fast-element").ElementStyles;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { ElementStyles } from '@microsoft/fast-element';
|
|
2
|
-
import { ElementDefinitionContext,
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const searchStyles: (context: any, definition: any) => ElementStyles;
|
|
2
|
+
import { ElementDefinitionContext, SearchOptions } from '@microsoft/fast-foundation';
|
|
3
|
+
export declare const searchStyles: (context: ElementDefinitionContext, definition: SearchOptions) => ElementStyles;
|
|
@@ -41,4 +41,4 @@ export declare const fluentSelect: (overrideDefinition?: import("@microsoft/fast
|
|
|
41
41
|
* Styles for Select
|
|
42
42
|
* @public
|
|
43
43
|
*/
|
|
44
|
-
export declare const selectStyles: (context:
|
|
44
|
+
export declare const selectStyles: (context: import("@microsoft/fast-foundation").ElementDefinitionContext, definition: SelectOptions) => import("@microsoft/fast-element").ElementStyles;
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { ElementStyles } from '@microsoft/fast-element';
|
|
2
2
|
import { ElementDefinitionContext, SelectOptions } from '@microsoft/fast-foundation';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
/**
|
|
4
|
+
* The base styles for a select and combobox, without `appearance` visual differences.
|
|
5
|
+
*
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare const baseSelectStyles: (context: ElementDefinitionContext, definition: SelectOptions) => ElementStyles;
|
|
9
|
+
/**
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export declare const baseSelectForcedColorStyles: (context: ElementDefinitionContext, definition: SelectOptions) => ElementStyles;
|
|
13
|
+
export declare const selectStyles: (context: ElementDefinitionContext, definition: SelectOptions) => ElementStyles;
|
|
@@ -1,25 +1,31 @@
|
|
|
1
1
|
import { ElementDefinitionContext, FoundationElementDefinition } from '@microsoft/fast-foundation';
|
|
2
2
|
/**
|
|
3
|
+
* The base styles for button controls, without `appearance` visual differences.
|
|
4
|
+
*
|
|
3
5
|
* @internal
|
|
4
6
|
*/
|
|
5
|
-
export declare const baseButtonStyles: (context: ElementDefinitionContext, definition: FoundationElementDefinition, interactivitySelector
|
|
7
|
+
export declare const baseButtonStyles: (context: ElementDefinitionContext, definition: FoundationElementDefinition, interactivitySelector: string, nonInteractivitySelector?: string) => import("@microsoft/fast-element").ElementStyles;
|
|
6
8
|
/**
|
|
7
9
|
* @internal
|
|
8
10
|
*/
|
|
9
|
-
export declare const
|
|
11
|
+
export declare const NeutralButtonStyles: (context: ElementDefinitionContext, definition: FoundationElementDefinition, interactivitySelector: string, nonInteractivitySelector?: string) => import("@microsoft/fast-element").ElementStyles;
|
|
10
12
|
/**
|
|
11
13
|
* @internal
|
|
12
14
|
*/
|
|
13
|
-
export declare const
|
|
15
|
+
export declare const AccentButtonStyles: (context: ElementDefinitionContext, definition: FoundationElementDefinition, interactivitySelector: string, nonInteractivitySelector?: string) => import("@microsoft/fast-element").ElementStyles;
|
|
14
16
|
/**
|
|
15
17
|
* @internal
|
|
16
18
|
*/
|
|
17
|
-
export declare const
|
|
19
|
+
export declare const HypertextStyles: (context: ElementDefinitionContext, definition: FoundationElementDefinition, interactivitySelector: string, nonInteractivitySelector?: string) => import("@microsoft/fast-element").ElementStyles;
|
|
18
20
|
/**
|
|
19
21
|
* @internal
|
|
20
22
|
*/
|
|
21
|
-
export declare const
|
|
23
|
+
export declare const LightweightButtonStyles: (context: ElementDefinitionContext, definition: FoundationElementDefinition, interactivitySelector: string, nonInteractivitySelector?: string) => import("@microsoft/fast-element").ElementStyles;
|
|
22
24
|
/**
|
|
23
25
|
* @internal
|
|
24
26
|
*/
|
|
25
|
-
export declare const
|
|
27
|
+
export declare const OutlineButtonStyles: (context: ElementDefinitionContext, definition: FoundationElementDefinition, interactivitySelector: string, nonInteractivitySelector?: string) => import("@microsoft/fast-element").ElementStyles;
|
|
28
|
+
/**
|
|
29
|
+
* @internal
|
|
30
|
+
*/
|
|
31
|
+
export declare const StealthButtonStyles: (context: ElementDefinitionContext, definition: FoundationElementDefinition, interactivitySelector: string, nonInteractivitySelector?: string) => import("@microsoft/fast-element").ElementStyles;
|
|
@@ -1,22 +1,30 @@
|
|
|
1
1
|
import { ElementStyles } from '@microsoft/fast-element';
|
|
2
2
|
import { ElementDefinitionContext, FoundationElementDefinition } from '@microsoft/fast-foundation';
|
|
3
3
|
/**
|
|
4
|
+
* The base styles for input controls, without `appearance` visual differences.
|
|
5
|
+
*
|
|
4
6
|
* @internal
|
|
5
7
|
*/
|
|
6
|
-
export declare const
|
|
8
|
+
export declare const baseInputStyles: (context: ElementDefinitionContext, definition: FoundationElementDefinition, logicalControlSelector: string) => ElementStyles;
|
|
7
9
|
/**
|
|
10
|
+
* The styles for active and focus interactions for input controls.
|
|
11
|
+
*
|
|
8
12
|
* @internal
|
|
9
13
|
*/
|
|
10
|
-
export declare const inputStateStyles: (context: ElementDefinitionContext, definition: FoundationElementDefinition,
|
|
14
|
+
export declare const inputStateStyles: (context: ElementDefinitionContext, definition: FoundationElementDefinition, logicalControlSelector: string) => ElementStyles;
|
|
11
15
|
/**
|
|
16
|
+
* The visual styles for inputs with `appearance='outline'`.
|
|
17
|
+
*
|
|
12
18
|
* @internal
|
|
13
19
|
*/
|
|
14
|
-
export declare const
|
|
20
|
+
export declare const inputOutlineStyles: (context: ElementDefinitionContext, definition: FoundationElementDefinition, logicalControlSelector: string, interactivitySelector?: string) => ElementStyles;
|
|
15
21
|
/**
|
|
22
|
+
* The visual styles for inputs with `appearance='filled'`.
|
|
23
|
+
*
|
|
16
24
|
* @internal
|
|
17
25
|
*/
|
|
18
|
-
export declare const
|
|
26
|
+
export declare const inputFilledStyles: (context: ElementDefinitionContext, definition: FoundationElementDefinition, logicalControlSelector: string, interactivitySelector?: string) => ElementStyles;
|
|
19
27
|
/**
|
|
20
28
|
* @internal
|
|
21
29
|
*/
|
|
22
|
-
export declare const
|
|
30
|
+
export declare const inputForcedColorStyles: (context: ElementDefinitionContext, definition: FoundationElementDefinition, logicalControlSelector: string, interactivitySelector?: string) => ElementStyles;
|
|
@@ -37,25 +37,9 @@ export declare class TextArea extends FoundationTextArea {
|
|
|
37
37
|
*
|
|
38
38
|
* {@link https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/delegatesFocus | delegatesFocus}
|
|
39
39
|
*/
|
|
40
|
-
export declare const fluentTextArea: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<
|
|
41
|
-
baseName: string;
|
|
42
|
-
baseClass: typeof FoundationTextArea;
|
|
43
|
-
template: import("@microsoft/fast-foundation").FoundationElementTemplate<import("@microsoft/fast-element").ViewTemplate<FoundationTextArea, any>, import("@microsoft/fast-foundation").FoundationElementDefinition>;
|
|
44
|
-
styles: (context: any, definition: any) => import("@microsoft/fast-element").ElementStyles;
|
|
45
|
-
shadowOptions: {
|
|
46
|
-
delegatesFocus: true;
|
|
47
|
-
};
|
|
48
|
-
}> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<{
|
|
49
|
-
baseName: string;
|
|
50
|
-
baseClass: typeof FoundationTextArea;
|
|
51
|
-
template: import("@microsoft/fast-foundation").FoundationElementTemplate<import("@microsoft/fast-element").ViewTemplate<FoundationTextArea, any>, import("@microsoft/fast-foundation").FoundationElementDefinition>;
|
|
52
|
-
styles: (context: any, definition: any) => import("@microsoft/fast-element").ElementStyles;
|
|
53
|
-
shadowOptions: {
|
|
54
|
-
delegatesFocus: true;
|
|
55
|
-
};
|
|
56
|
-
}, typeof TextArea>;
|
|
40
|
+
export declare const fluentTextArea: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<import("@microsoft/fast-foundation").FoundationElementDefinition> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<import("@microsoft/fast-foundation").FoundationElementDefinition, typeof TextArea>;
|
|
57
41
|
/**
|
|
58
42
|
* Styles for TextArea
|
|
59
43
|
* @public
|
|
60
44
|
*/
|
|
61
|
-
export declare const textAreaStyles: (context:
|
|
45
|
+
export declare const textAreaStyles: (context: import("@microsoft/fast-foundation").ElementDefinitionContext, definition: import("@microsoft/fast-foundation").FoundationElementDefinition) => import("@microsoft/fast-element").ElementStyles;
|
|
@@ -1,22 +1,6 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
title: string;
|
|
3
|
-
component: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<
|
|
4
|
-
baseName: string;
|
|
5
|
-
baseClass: typeof import("@microsoft/fast-foundation").TextArea;
|
|
6
|
-
template: import("@microsoft/fast-foundation").FoundationElementTemplate<import("@microsoft/fast-element").ViewTemplate<import("@microsoft/fast-foundation").TextArea, any>, import("@microsoft/fast-foundation").FoundationElementDefinition>;
|
|
7
|
-
styles: (context: any, definition: any) => import("@microsoft/fast-element").ElementStyles;
|
|
8
|
-
shadowOptions: {
|
|
9
|
-
delegatesFocus: true;
|
|
10
|
-
};
|
|
11
|
-
}> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<{
|
|
12
|
-
baseName: string;
|
|
13
|
-
baseClass: typeof import("@microsoft/fast-foundation").TextArea;
|
|
14
|
-
template: import("@microsoft/fast-foundation").FoundationElementTemplate<import("@microsoft/fast-element").ViewTemplate<import("@microsoft/fast-foundation").TextArea, any>, import("@microsoft/fast-foundation").FoundationElementDefinition>;
|
|
15
|
-
styles: (context: any, definition: any) => import("@microsoft/fast-element").ElementStyles;
|
|
16
|
-
shadowOptions: {
|
|
17
|
-
delegatesFocus: true;
|
|
18
|
-
};
|
|
19
|
-
}, typeof import("./index").TextArea>;
|
|
3
|
+
component: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<import("@microsoft/fast-foundation").FoundationElementDefinition> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<import("@microsoft/fast-foundation").FoundationElementDefinition, typeof import("./index").TextArea>;
|
|
20
4
|
argTypes: {
|
|
21
5
|
appearance: {
|
|
22
6
|
defaultValue: string;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { ElementStyles } from '@microsoft/fast-element';
|
|
2
2
|
import { ElementDefinitionContext, FoundationElementDefinition } from '@microsoft/fast-foundation';
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const textAreaStyles: (context: any, definition: any) => ElementStyles;
|
|
3
|
+
export declare const textAreaStyles: (context: ElementDefinitionContext, definition: FoundationElementDefinition) => ElementStyles;
|
|
@@ -37,25 +37,9 @@ export declare class TextField extends FoundationTextField {
|
|
|
37
37
|
*
|
|
38
38
|
* {@link https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/delegatesFocus | delegatesFocus}
|
|
39
39
|
*/
|
|
40
|
-
export declare const fluentTextField: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<
|
|
41
|
-
baseName: string;
|
|
42
|
-
baseClass: typeof FoundationTextField;
|
|
43
|
-
template: import("@microsoft/fast-foundation").FoundationElementTemplate<import("@microsoft/fast-element").ViewTemplate<FoundationTextField, any>, import("@microsoft/fast-foundation").TextFieldOptions>;
|
|
44
|
-
styles: (context: any, definition: any) => import("@microsoft/fast-element").ElementStyles;
|
|
45
|
-
shadowOptions: {
|
|
46
|
-
delegatesFocus: true;
|
|
47
|
-
};
|
|
48
|
-
}> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<{
|
|
49
|
-
baseName: string;
|
|
50
|
-
baseClass: typeof FoundationTextField;
|
|
51
|
-
template: import("@microsoft/fast-foundation").FoundationElementTemplate<import("@microsoft/fast-element").ViewTemplate<FoundationTextField, any>, import("@microsoft/fast-foundation").TextFieldOptions>;
|
|
52
|
-
styles: (context: any, definition: any) => import("@microsoft/fast-element").ElementStyles;
|
|
53
|
-
shadowOptions: {
|
|
54
|
-
delegatesFocus: true;
|
|
55
|
-
};
|
|
56
|
-
}, typeof TextField>;
|
|
40
|
+
export declare const fluentTextField: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<import("@microsoft/fast-foundation").FoundationElementDefinition> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<import("@microsoft/fast-foundation").FoundationElementDefinition, typeof TextField>;
|
|
57
41
|
/**
|
|
58
42
|
* Styles for TextField
|
|
59
43
|
* @public
|
|
60
44
|
*/
|
|
61
|
-
export declare const textFieldStyles: (context:
|
|
45
|
+
export declare const textFieldStyles: (context: import("@microsoft/fast-foundation").ElementDefinitionContext, definition: import("@microsoft/fast-foundation").FoundationElementDefinition) => import("@microsoft/fast-element").ElementStyles;
|
|
@@ -1,22 +1,6 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
title: string;
|
|
3
|
-
component: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<
|
|
4
|
-
baseName: string;
|
|
5
|
-
baseClass: typeof import("@microsoft/fast-foundation").TextField;
|
|
6
|
-
template: import("@microsoft/fast-foundation").FoundationElementTemplate<import("@microsoft/fast-element").ViewTemplate<import("@microsoft/fast-foundation").TextField, any>, import("@microsoft/fast-foundation").TextFieldOptions>;
|
|
7
|
-
styles: (context: any, definition: any) => import("@microsoft/fast-element").ElementStyles;
|
|
8
|
-
shadowOptions: {
|
|
9
|
-
delegatesFocus: true;
|
|
10
|
-
};
|
|
11
|
-
}> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<{
|
|
12
|
-
baseName: string;
|
|
13
|
-
baseClass: typeof import("@microsoft/fast-foundation").TextField;
|
|
14
|
-
template: import("@microsoft/fast-foundation").FoundationElementTemplate<import("@microsoft/fast-element").ViewTemplate<import("@microsoft/fast-foundation").TextField, any>, import("@microsoft/fast-foundation").TextFieldOptions>;
|
|
15
|
-
styles: (context: any, definition: any) => import("@microsoft/fast-element").ElementStyles;
|
|
16
|
-
shadowOptions: {
|
|
17
|
-
delegatesFocus: true;
|
|
18
|
-
};
|
|
19
|
-
}, typeof import("./index").TextField>;
|
|
3
|
+
component: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<import("@microsoft/fast-foundation").FoundationElementDefinition> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<import("@microsoft/fast-foundation").FoundationElementDefinition, typeof import("./index").TextField>;
|
|
20
4
|
argTypes: {
|
|
21
5
|
appearance: {
|
|
22
6
|
options: string[];
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { ElementStyles } from '@microsoft/fast-element';
|
|
2
2
|
import { ElementDefinitionContext, FoundationElementDefinition } from '@microsoft/fast-foundation';
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const textFieldStyles: (context: any, definition: any) => ElementStyles;
|
|
3
|
+
export declare const textFieldStyles: (context: ElementDefinitionContext, definition: FoundationElementDefinition) => ElementStyles;
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AccentButtonStyles, baseButtonStyles, HypertextStyles, LightweightButtonStyles, OutlineButtonStyles, StealthButtonStyles, } from '../styles/';
|
|
1
|
+
import { AccentButtonStyles, baseButtonStyles, HypertextStyles, LightweightButtonStyles, NeutralButtonStyles, OutlineButtonStyles, StealthButtonStyles, } from '../styles/';
|
|
3
2
|
import { appearanceBehavior } from '../utilities/behaviors';
|
|
4
3
|
const interactivitySelector = '[href]';
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
:host .control:not([href]) {
|
|
8
|
-
cursor: default;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
${baseButtonStyles(context, definition, interactivitySelector, nonInteractivitySelector)}
|
|
12
|
-
`.withBehaviors(appearanceBehavior('accent', AccentButtonStyles(context, definition, interactivitySelector, nonInteractivitySelector)), appearanceBehavior('hypertext', HypertextStyles(context, definition, interactivitySelector, nonInteractivitySelector)), appearanceBehavior('lightweight', LightweightButtonStyles(context, definition, interactivitySelector, nonInteractivitySelector)), appearanceBehavior('outline', OutlineButtonStyles(context, definition, interactivitySelector, nonInteractivitySelector)), appearanceBehavior('stealth', StealthButtonStyles(context, definition, interactivitySelector, nonInteractivitySelector)));
|
|
4
|
+
export const anchorStyles = (context, definition) => baseButtonStyles(context, definition, interactivitySelector)
|
|
5
|
+
.withBehaviors(appearanceBehavior('neutral', NeutralButtonStyles(context, definition, interactivitySelector)), appearanceBehavior('accent', AccentButtonStyles(context, definition, interactivitySelector)), appearanceBehavior('hypertext', HypertextStyles(context, definition, interactivitySelector)), appearanceBehavior('lightweight', LightweightButtonStyles(context, definition, interactivitySelector)), appearanceBehavior('outline', OutlineButtonStyles(context, definition, interactivitySelector)), appearanceBehavior('stealth', StealthButtonStyles(context, definition, interactivitySelector)));
|
|
@@ -1,49 +1,24 @@
|
|
|
1
1
|
import { css } from '@microsoft/fast-element';
|
|
2
|
-
import { disabledCursor,
|
|
3
|
-
import {
|
|
4
|
-
import { AccentButtonStyles, baseButtonStyles, LightweightButtonStyles, OutlineButtonStyles, StealthButtonStyles, } from '../styles/';
|
|
2
|
+
import { disabledCursor, } from '@microsoft/fast-foundation';
|
|
3
|
+
import { AccentButtonStyles, baseButtonStyles, LightweightButtonStyles, NeutralButtonStyles, OutlineButtonStyles, StealthButtonStyles, } from '../styles/';
|
|
5
4
|
import { appearanceBehavior } from '../utilities/behaviors';
|
|
6
5
|
import { disabledOpacity } from '../design-tokens';
|
|
7
6
|
const interactivitySelector = ':not([disabled])';
|
|
8
7
|
const nonInteractivitySelector = '[disabled]';
|
|
9
8
|
export const buttonStyles = (context, definition) => css `
|
|
10
|
-
:host(
|
|
11
|
-
|
|
9
|
+
:host(${interactivitySelector}) .control {
|
|
10
|
+
cursor: pointer;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
:host(${nonInteractivitySelector}) .control {
|
|
12
14
|
cursor: ${disabledCursor};
|
|
13
15
|
}
|
|
14
16
|
|
|
17
|
+
@media (forced-colors: none) {
|
|
18
|
+
:host(${nonInteractivitySelector}) .control {
|
|
19
|
+
opacity: ${disabledOpacity};
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
15
23
|
${baseButtonStyles(context, definition, interactivitySelector, nonInteractivitySelector)}
|
|
16
|
-
`.withBehaviors(
|
|
17
|
-
:host([disabled]) {
|
|
18
|
-
opacity: 1;
|
|
19
|
-
}
|
|
20
|
-
:host([disabled]) .control {
|
|
21
|
-
border-color: ${SystemColors.GrayText};
|
|
22
|
-
color: ${SystemColors.GrayText};
|
|
23
|
-
fill: currentcolor;
|
|
24
|
-
}
|
|
25
|
-
`), appearanceBehavior('accent', css `
|
|
26
|
-
${AccentButtonStyles(context, definition, interactivitySelector, nonInteractivitySelector)},
|
|
27
|
-
`.withBehaviors(forcedColorsStylesheetBehavior(css `
|
|
28
|
-
:host([disabled]) .control {
|
|
29
|
-
background: ${SystemColors.ButtonFace};
|
|
30
|
-
}
|
|
31
|
-
`))), appearanceBehavior('lightweight', css `
|
|
32
|
-
${LightweightButtonStyles(context, definition, interactivitySelector, nonInteractivitySelector)},
|
|
33
|
-
`.withBehaviors(forcedColorsStylesheetBehavior(css `
|
|
34
|
-
:host([disabled]) .control {
|
|
35
|
-
border-color: ${SystemColors.ButtonFace};
|
|
36
|
-
}
|
|
37
|
-
`))), appearanceBehavior('outline', css `
|
|
38
|
-
${OutlineButtonStyles(context, definition, interactivitySelector, nonInteractivitySelector)}
|
|
39
|
-
`.withBehaviors(forcedColorsStylesheetBehavior(css `
|
|
40
|
-
:host([disabled]) .control {
|
|
41
|
-
border-color: ${SystemColors.GrayText};
|
|
42
|
-
}
|
|
43
|
-
`))), appearanceBehavior('stealth', css `
|
|
44
|
-
${StealthButtonStyles(context, definition, interactivitySelector, nonInteractivitySelector)}
|
|
45
|
-
`.withBehaviors(forcedColorsStylesheetBehavior(css `
|
|
46
|
-
:host([disabled]) .control {
|
|
47
|
-
border-color: ${SystemColors.ButtonFace};
|
|
48
|
-
}
|
|
49
|
-
`))));
|
|
24
|
+
`.withBehaviors(appearanceBehavior('neutral', NeutralButtonStyles(context, definition, interactivitySelector, nonInteractivitySelector)), appearanceBehavior('accent', AccentButtonStyles(context, definition, interactivitySelector, nonInteractivitySelector)), appearanceBehavior('lightweight', LightweightButtonStyles(context, definition, interactivitySelector, nonInteractivitySelector)), appearanceBehavior('outline', OutlineButtonStyles(context, definition, interactivitySelector, nonInteractivitySelector)), appearanceBehavior('stealth', StealthButtonStyles(context, definition, interactivitySelector, nonInteractivitySelector)));
|
|
@@ -7,6 +7,9 @@ export default {
|
|
|
7
7
|
options: ['filled', 'outline'],
|
|
8
8
|
control: { type: 'radio' },
|
|
9
9
|
},
|
|
10
|
+
disabled: {
|
|
11
|
+
control: { type: 'boolean' },
|
|
12
|
+
},
|
|
10
13
|
autocomplete: {
|
|
11
14
|
options: ['inline', 'list', 'none', 'both'],
|
|
12
15
|
control: { type: 'radio' },
|
|
@@ -20,7 +23,7 @@ export default {
|
|
|
20
23
|
},
|
|
21
24
|
},
|
|
22
25
|
};
|
|
23
|
-
const ComboboxTemplate = ({ appearance, autocomplete, position, required }) => `
|
|
26
|
+
const ComboboxTemplate = ({ appearance, disabled, autocomplete, position, required }) => `
|
|
24
27
|
<style>
|
|
25
28
|
div.docs-story>div:first-child {
|
|
26
29
|
height: 32em !important;
|
|
@@ -28,7 +31,8 @@ const ComboboxTemplate = ({ appearance, autocomplete, position, required }) => `
|
|
|
28
31
|
</style>
|
|
29
32
|
<fluent-combobox
|
|
30
33
|
${appearance ? `appearance="${appearance}"` : ''}
|
|
31
|
-
${
|
|
34
|
+
${disabled ? 'disabled' : ''}
|
|
35
|
+
${autocomplete ? `autocomplete="${autocomplete}"` : ''}
|
|
32
36
|
${required ? 'required' : ''}
|
|
33
37
|
${position ? `position="${position}"` : ''}
|
|
34
38
|
style="margin-bottom: 500px;"
|
|
@@ -52,6 +56,7 @@ export const Combobox = ComboboxTemplate.bind({});
|
|
|
52
56
|
Combobox.args = {
|
|
53
57
|
value: 'Christopher Eccleston',
|
|
54
58
|
appearance: 'outline',
|
|
59
|
+
disabled: false,
|
|
55
60
|
};
|
|
56
61
|
const example = `
|
|
57
62
|
<fluent-combobox>
|
|
@@ -1,50 +1,40 @@
|
|
|
1
1
|
import { css } from '@microsoft/fast-element';
|
|
2
|
-
import { disabledCursor } from '@microsoft/fast-foundation';
|
|
3
|
-
import {
|
|
2
|
+
import { disabledCursor, forcedColorsStylesheetBehavior } from '@microsoft/fast-foundation';
|
|
3
|
+
import { baseSelectStyles } from '../select/select.styles';
|
|
4
4
|
import { appearanceBehavior } from '../utilities/behaviors';
|
|
5
|
-
import {
|
|
5
|
+
import { strokeWidth } from '../design-tokens';
|
|
6
6
|
import { typeRampBase } from '../styles/patterns/type-ramp';
|
|
7
|
+
import { inputFilledStyles, inputForcedColorStyles, inputOutlineStyles, inputStateStyles } from '../styles';
|
|
8
|
+
const logicalControlSelector = '.control';
|
|
9
|
+
const interactivitySelector = ':not([disabled]):not([open])';
|
|
7
10
|
export const comboboxStyles = (context, definition) => css `
|
|
8
|
-
${
|
|
11
|
+
${baseSelectStyles(context, definition)}
|
|
9
12
|
|
|
10
|
-
|
|
11
|
-
background: padding-box linear-gradient(${neutralFillInputRest}, ${neutralFillInputRest}),
|
|
12
|
-
border-box ${neutralStrokeInputRest};
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
:host(:not([disabled]):not([open]):hover) {
|
|
16
|
-
background: padding-box linear-gradient(${neutralFillInputHover}, ${neutralFillInputHover}),
|
|
17
|
-
border-box ${neutralStrokeInputHover};
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
:host(:not([disabled]):not([open]):active) {
|
|
21
|
-
background: padding-box linear-gradient(${neutralFillInputActive}, ${neutralFillInputActive}),
|
|
22
|
-
border-box ${neutralStrokeInputActive};
|
|
23
|
-
}
|
|
13
|
+
${inputStateStyles(context, definition, logicalControlSelector)}
|
|
24
14
|
|
|
25
15
|
:host(:empty) .listbox {
|
|
26
|
-
|
|
16
|
+
display: none;
|
|
27
17
|
}
|
|
28
18
|
|
|
29
19
|
:host([disabled]) *,
|
|
30
20
|
:host([disabled]) {
|
|
31
|
-
|
|
32
|
-
|
|
21
|
+
cursor: ${disabledCursor};
|
|
22
|
+
user-select: none;
|
|
33
23
|
}
|
|
34
24
|
|
|
35
25
|
:host(:active) .selected-value {
|
|
36
|
-
|
|
26
|
+
user-select: none;
|
|
37
27
|
}
|
|
38
28
|
|
|
39
29
|
.selected-value {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
30
|
+
-webkit-appearance: none;
|
|
31
|
+
background: transparent;
|
|
32
|
+
border: none;
|
|
33
|
+
color: inherit;
|
|
34
|
+
${typeRampBase}
|
|
35
|
+
height: calc(100% - ${strokeWidth} * 1px));
|
|
36
|
+
margin: auto 0;
|
|
37
|
+
width: 100%;
|
|
38
|
+
outline: none;
|
|
49
39
|
}
|
|
50
|
-
`.withBehaviors(appearanceBehavior('filled',
|
|
40
|
+
`.withBehaviors(appearanceBehavior('outline', inputOutlineStyles(context, definition, logicalControlSelector, interactivitySelector)), appearanceBehavior('filled', inputFilledStyles(context, definition, logicalControlSelector, interactivitySelector)), forcedColorsStylesheetBehavior(inputForcedColorStyles(context, definition, logicalControlSelector, interactivitySelector)));
|
|
@@ -1,20 +1,15 @@
|
|
|
1
1
|
import { css } from '@microsoft/fast-element';
|
|
2
2
|
import { display, forcedColorsStylesheetBehavior, } from '@microsoft/fast-foundation';
|
|
3
|
-
import {
|
|
4
|
-
import { inputFilledForcedColorStyles, inputFilledStyles, inputForcedColorStyles, inputStateStyles, inputStyles, } from '../styles/index';
|
|
3
|
+
import { baseInputStyles, inputFilledStyles, inputForcedColorStyles, inputOutlineStyles, inputStateStyles, } from '../styles/index';
|
|
5
4
|
import { appearanceBehavior } from '../utilities/behaviors';
|
|
6
5
|
import { designUnit } from '../design-tokens';
|
|
7
|
-
|
|
8
|
-
${inputFilledStyles(context, definition, '.root')}
|
|
9
|
-
`.withBehaviors(forcedColorsStylesheetBehavior(css `
|
|
10
|
-
${inputFilledForcedColorStyles(context, definition, '.root')}
|
|
11
|
-
`));
|
|
6
|
+
const logicalControlSelector = '.root';
|
|
12
7
|
export const numberFieldStyles = (context, definition) => css `
|
|
13
8
|
${display('inline-block')}
|
|
14
9
|
|
|
15
|
-
${
|
|
10
|
+
${baseInputStyles(context, definition, logicalControlSelector)}
|
|
16
11
|
|
|
17
|
-
${inputStateStyles(context, definition,
|
|
12
|
+
${inputStateStyles(context, definition, logicalControlSelector)}
|
|
18
13
|
|
|
19
14
|
.root {
|
|
20
15
|
display: flex;
|
|
@@ -73,10 +68,4 @@ export const numberFieldStyles = (context, definition) => css `
|
|
|
73
68
|
.step-up {
|
|
74
69
|
padding-top: 3px;
|
|
75
70
|
}
|
|
76
|
-
`.withBehaviors(appearanceBehavior('filled',
|
|
77
|
-
${inputForcedColorStyles(context, definition, '.root')}
|
|
78
|
-
.step-up,
|
|
79
|
-
.step-down {
|
|
80
|
-
fill: ${SystemColors.FieldText};
|
|
81
|
-
}
|
|
82
|
-
`));
|
|
71
|
+
`.withBehaviors(appearanceBehavior('outline', inputOutlineStyles(context, definition, logicalControlSelector)), appearanceBehavior('filled', inputFilledStyles(context, definition, logicalControlSelector)), forcedColorsStylesheetBehavior(inputForcedColorStyles(context, definition, logicalControlSelector)));
|