@fluentui/web-components 1.6.2 → 1.6.3
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 +54 -1
- package/CHANGELOG.md +11 -2
- package/dist/dts/number-field/number-field.stories.d.ts +1 -0
- package/dist/dts/text-area/text-area.stories.d.ts +1 -0
- package/dist/dts/text-field/text-field.stories.d.ts +1 -1
- package/dist/esm/anchor/anchor.stories.js +4 -3
- package/dist/esm/anchored-region/anchored-region.stories.js +3 -3
- package/dist/esm/badge/badge.stories.js +2 -2
- package/dist/esm/card/card.stories.js +1 -1
- package/dist/esm/checkbox/checkbox.stories.js +2 -2
- package/dist/esm/combobox/combobox.stories.js +5 -0
- package/dist/esm/data-grid/data-grid.stories.js +3 -3
- package/dist/esm/number-field/number-field.stories.js +2 -1
- package/dist/esm/radio-group/radio-group.stories.js +5 -3
- package/dist/esm/slider/slider.stories.js +8 -3
- package/dist/esm/switch/switch.stories.js +10 -2
- package/dist/esm/tabs/tabs.stories.js +2 -2
- package/dist/esm/text-area/text-area.stories.js +3 -2
- package/dist/esm/text-field/text-field.stories.js +3 -3
- package/dist/esm/tree-view/tree-view.stories.js +30 -8
- package/dist/web-components.js +582 -423
- package/dist/web-components.min.js +126 -126
- package/package.json +5 -4
- package/public/switches.ts +1 -1
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,60 @@
|
|
|
2
2
|
"name": "@fluentui/web-components",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Fri, 22 Oct 2021 19:29:44 GMT",
|
|
6
|
+
"tag": "@fluentui/web-components_v1.6.3",
|
|
7
|
+
"version": "1.6.3",
|
|
8
|
+
"comments": {
|
|
9
|
+
"none": [
|
|
10
|
+
{
|
|
11
|
+
"author": "brookdozer@gmail.com",
|
|
12
|
+
"package": "@fluentui/web-components",
|
|
13
|
+
"comment": "Web-components Storybook content updates",
|
|
14
|
+
"commit": "ed06ea1fabb97a1ee5ee4f73cf2eaac169dc69be"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"patch": [
|
|
18
|
+
{
|
|
19
|
+
"author": "chhol@microsoft.com",
|
|
20
|
+
"package": "@fluentui/web-components",
|
|
21
|
+
"comment": "update foundation package and react documentation",
|
|
22
|
+
"commit": "ed06ea1fabb97a1ee5ee4f73cf2eaac169dc69be"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"date": "Thu, 21 Oct 2021 07:28:35 GMT",
|
|
29
|
+
"tag": "@fluentui/web-components_v1.6.2",
|
|
30
|
+
"version": "1.6.2",
|
|
31
|
+
"comments": {
|
|
32
|
+
"none": [
|
|
33
|
+
{
|
|
34
|
+
"author": "elcraig@microsoft.com",
|
|
35
|
+
"package": "@fluentui/web-components",
|
|
36
|
+
"comment": "Fix web-components storybook",
|
|
37
|
+
"commit": "619163b3e099a775a2486a21e0187cec86b2b7c2"
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"date": "Tue, 19 Oct 2021 07:38:09 GMT",
|
|
44
|
+
"tag": "@fluentui/web-components_v1.6.2",
|
|
45
|
+
"version": "1.6.2",
|
|
46
|
+
"comments": {
|
|
47
|
+
"none": [
|
|
48
|
+
{
|
|
49
|
+
"author": "elcraig@microsoft.com",
|
|
50
|
+
"package": "@fluentui/web-components",
|
|
51
|
+
"comment": "Move storybook/html dev dep back to web-components and update scripts",
|
|
52
|
+
"commit": "ed3a8350b8d760cdef9323bb5646012888c75afd"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"date": "Thu, 14 Oct 2021 00:11:22 GMT",
|
|
6
59
|
"tag": "@fluentui/web-components_v1.6.2",
|
|
7
60
|
"version": "1.6.2",
|
|
8
61
|
"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, 22 Oct 2021 19:29:44 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [1.6.3](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v1.6.3)
|
|
8
|
+
|
|
9
|
+
Fri, 22 Oct 2021 19:29:44 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v1.6.2..@fluentui/web-components_v1.6.3)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- update foundation package and react documentation ([PR #20316](https://github.com/microsoft/fluentui/pull/20316) by chhol@microsoft.com)
|
|
15
|
+
|
|
7
16
|
## [1.6.2](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v1.6.2)
|
|
8
17
|
|
|
9
|
-
Thu, 14 Oct 2021 00:
|
|
18
|
+
Thu, 14 Oct 2021 00:11:22 GMT
|
|
10
19
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v1.6.1..@fluentui/web-components_v1.6.2)
|
|
11
20
|
|
|
12
21
|
### Patches
|
|
@@ -3,8 +3,8 @@ declare const _default: {
|
|
|
3
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(".").TextField>;
|
|
4
4
|
argTypes: {
|
|
5
5
|
appearance: {
|
|
6
|
-
defaultValue: string;
|
|
7
6
|
options: string[];
|
|
7
|
+
defaultValue: string;
|
|
8
8
|
control: {
|
|
9
9
|
type: string;
|
|
10
10
|
};
|
|
@@ -10,15 +10,16 @@ export default {
|
|
|
10
10
|
},
|
|
11
11
|
};
|
|
12
12
|
const AnchorTemplate = ({ appearance, label }) => `
|
|
13
|
-
<fluent-anchor
|
|
13
|
+
<fluent-anchor
|
|
14
14
|
${appearance ? `appearance="${appearance}"` : ''}
|
|
15
|
-
|
|
15
|
+
href="https://bing.com" target="_blank"
|
|
16
|
+
>
|
|
16
17
|
${label}
|
|
17
18
|
</fluent-anchor>
|
|
18
19
|
`;
|
|
19
20
|
export const Anchor = AnchorTemplate.bind({});
|
|
20
21
|
const example = `
|
|
21
|
-
<fluent-anchor href="
|
|
22
|
+
<fluent-anchor href="https://bing.com" target="_blank" appearance="neutral">Anchor</fluent-anchor>
|
|
22
23
|
`;
|
|
23
24
|
Anchor.args = {
|
|
24
25
|
label: 'Anchor',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DOCS_RENDERED } from '@storybook/core-events';
|
|
2
2
|
import addons from '@storybook/addons';
|
|
3
3
|
import { Direction, RtlScrollConverter } from '@microsoft/fast-web-utilities';
|
|
4
4
|
import { AnchoredRegion } from '@microsoft/fast-foundation';
|
|
@@ -6,8 +6,8 @@ import AnchoreRegionTemplate from './fixtures/base.html';
|
|
|
6
6
|
import './index';
|
|
7
7
|
let scalingViewportPreviousXValue = 250;
|
|
8
8
|
let scalingViewportPreviousYValue = 250;
|
|
9
|
-
addons.getChannel().addListener(
|
|
10
|
-
if (name.toLowerCase().
|
|
9
|
+
addons.getChannel().addListener(DOCS_RENDERED, (name) => {
|
|
10
|
+
if (name.toLowerCase().includes('anchored region')) {
|
|
11
11
|
scrollViewports();
|
|
12
12
|
setButtonActions();
|
|
13
13
|
const scalingViewportUpdate = document.getElementById('viewport-scaling-update');
|
|
@@ -10,7 +10,7 @@ export default {
|
|
|
10
10
|
},
|
|
11
11
|
};
|
|
12
12
|
const BadgeTemplate = ({ appearance, label }) => `
|
|
13
|
-
<fluent-badge
|
|
13
|
+
<fluent-badge
|
|
14
14
|
${appearance ? `appearance="${appearance}"` : ''}
|
|
15
15
|
>${label}</fluent-badge>`;
|
|
16
16
|
export const Badge = BadgeTemplate.bind({});
|
|
@@ -21,7 +21,7 @@ Badge.args = {
|
|
|
21
21
|
Badge.parameters = {
|
|
22
22
|
docs: {
|
|
23
23
|
source: {
|
|
24
|
-
code: `<fluent-badge appearance="
|
|
24
|
+
code: `<fluent-badge appearance="accent">Text</fluent-badge>`,
|
|
25
25
|
},
|
|
26
26
|
},
|
|
27
27
|
};
|
|
@@ -26,13 +26,13 @@ const CheckboxTemplate = ({ checked, disabled, label, required }) => `<fluent-ch
|
|
|
26
26
|
>${label}</fluent-checkbox>`;
|
|
27
27
|
export const Checkbox = CheckboxTemplate.bind({});
|
|
28
28
|
Checkbox.args = {
|
|
29
|
-
label: 'Label',
|
|
29
|
+
label: 'Label string',
|
|
30
30
|
checked: false,
|
|
31
31
|
disabled: false,
|
|
32
32
|
required: false,
|
|
33
33
|
};
|
|
34
34
|
const example = `
|
|
35
|
-
<fluent-checkbox>
|
|
35
|
+
<fluent-checkbox>Label string</fluent-checkbox>
|
|
36
36
|
`;
|
|
37
37
|
Checkbox.parameters = {
|
|
38
38
|
docs: {
|
|
@@ -21,6 +21,11 @@ export default {
|
|
|
21
21
|
},
|
|
22
22
|
};
|
|
23
23
|
const ComboboxTemplate = ({ appearance, autocomplete, position, required }) => `
|
|
24
|
+
<style>
|
|
25
|
+
div.docs-story>div:first-child {
|
|
26
|
+
height: 32em !important;
|
|
27
|
+
}
|
|
28
|
+
</style>
|
|
24
29
|
<fluent-combobox
|
|
25
30
|
${appearance ? `appearance="${appearance}"` : ''}
|
|
26
31
|
${appearance ? `autocomplete="${autocomplete}"` : ''}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { html } from '@microsoft/fast-element';
|
|
2
2
|
import { GenerateHeaderOptions } from '@microsoft/fast-foundation/dist/esm/data-grid/data-grid.options';
|
|
3
3
|
import addons from '@storybook/addons';
|
|
4
|
-
import {
|
|
4
|
+
import { DOCS_RENDERED } from '@storybook/core-events';
|
|
5
5
|
import DataGridTemplate from './fixtures/base.html';
|
|
6
6
|
import './index';
|
|
7
7
|
/* eslint-disable @typescript-eslint/ban-types */
|
|
@@ -39,8 +39,8 @@ const customHeaderCellItemTemplate = html `
|
|
|
39
39
|
:columnDefinition="${x => x}"
|
|
40
40
|
></fast-data-grid-header-cell>
|
|
41
41
|
`;
|
|
42
|
-
addons.getChannel().addListener(
|
|
43
|
-
if (name.toLowerCase().
|
|
42
|
+
addons.getChannel().addListener(DOCS_RENDERED, (name) => {
|
|
43
|
+
if (name.toLowerCase().includes('components/data grid')) {
|
|
44
44
|
defaultGridElement = document.getElementById('defaultGrid');
|
|
45
45
|
reset();
|
|
46
46
|
const defaultGridRow = document.getElementById('defaultGridRow');
|
|
@@ -34,6 +34,7 @@ export default {
|
|
|
34
34
|
},
|
|
35
35
|
step: {
|
|
36
36
|
control: { type: 'number' },
|
|
37
|
+
defaultValue: 1,
|
|
37
38
|
},
|
|
38
39
|
size: {
|
|
39
40
|
control: { type: 'number' },
|
|
@@ -71,7 +72,7 @@ NumberField.args = {
|
|
|
71
72
|
required: false,
|
|
72
73
|
};
|
|
73
74
|
const example = `
|
|
74
|
-
<fluent-number-field></fluent-number-field>
|
|
75
|
+
<fluent-number-field appearance="outline" ></fluent-number-field>
|
|
75
76
|
`;
|
|
76
77
|
NumberField.parameters = {
|
|
77
78
|
docs: {
|
|
@@ -18,6 +18,7 @@ const RadioGroupTemplate = ({ disabled, required }) => `
|
|
|
18
18
|
>
|
|
19
19
|
<fluent-radio>Apples</fluent-radio>
|
|
20
20
|
<fluent-radio>Bananas</fluent-radio>
|
|
21
|
+
<fluent-radio>Tomatoes</fluent-radio>
|
|
21
22
|
</fluent-radio-group>`;
|
|
22
23
|
export const RadioGroup = RadioGroupTemplate.bind({});
|
|
23
24
|
RadioGroup.args = {
|
|
@@ -25,10 +26,11 @@ RadioGroup.args = {
|
|
|
25
26
|
required: false,
|
|
26
27
|
};
|
|
27
28
|
const example = `
|
|
28
|
-
<fluent-radio-group name="
|
|
29
|
+
<fluent-radio-group name="fruits" >
|
|
29
30
|
<label style="color: --var(neutral-foreground-rest)" slot="label"> Numbers </label>
|
|
30
|
-
<fluent-radio
|
|
31
|
-
<fluent-radio
|
|
31
|
+
<fluent-radio>Apples</fluent-radio>
|
|
32
|
+
<fluent-radio>Bananas</fluent-radio>
|
|
33
|
+
<fluent-radio>Bananas</fluent-radio>
|
|
32
34
|
</fluent-radio-group>
|
|
33
35
|
`;
|
|
34
36
|
RadioGroup.parameters = {
|
|
@@ -10,9 +10,9 @@ export default {
|
|
|
10
10
|
},
|
|
11
11
|
};
|
|
12
12
|
const SliderTemplate = ({ orientation }) => `
|
|
13
|
-
<fluent-slider
|
|
13
|
+
<fluent-slider
|
|
14
14
|
${orientation ? `orientation="${orientation}"` : ''}
|
|
15
|
-
min="0" max="100" step="10"
|
|
15
|
+
min="0" max="100" step="10" style="width:80%;"
|
|
16
16
|
>
|
|
17
17
|
<fluent-slider-label position="0"> 0℃ </fluent-slider-label>
|
|
18
18
|
<fluent-slider-label position="10"> 10℃ </fluent-slider-label>
|
|
@@ -24,7 +24,12 @@ Slider.args = {
|
|
|
24
24
|
orientation: 'horizontal',
|
|
25
25
|
};
|
|
26
26
|
const example = `
|
|
27
|
-
<fluent-slider
|
|
27
|
+
<fluent-slider min="0" max="100" step="10" orientation="horizontal" style="width:80%;">
|
|
28
|
+
<fluent-slider-label position="0"> 0℃ </fluent-slider-label>
|
|
29
|
+
<fluent-slider-label position="10"> 10℃ </fluent-slider-label>
|
|
30
|
+
<fluent-slider-label position="90"> 90℃ </fluent-slider-label>
|
|
31
|
+
<fluent-slider-label position="100"> 100℃ </fluent-slider-label>
|
|
32
|
+
</fluent-slider>
|
|
28
33
|
`;
|
|
29
34
|
Slider.parameters = {
|
|
30
35
|
docs: {
|
|
@@ -15,7 +15,11 @@ const SwitchTemplate = ({ checked, disabled }) => `
|
|
|
15
15
|
<fluent-switch
|
|
16
16
|
${checked ? 'checked' : ''}
|
|
17
17
|
${disabled ? 'disabled' : ''}
|
|
18
|
-
|
|
18
|
+
>
|
|
19
|
+
<span slot="checked-message">On</span>
|
|
20
|
+
<span slot="unchecked-message">Off</span>
|
|
21
|
+
<label for="direction-switch">Captions:</label>
|
|
22
|
+
</fluent-switch>
|
|
19
23
|
`;
|
|
20
24
|
export const Switch = SwitchTemplate.bind({});
|
|
21
25
|
Switch.args = {
|
|
@@ -23,7 +27,11 @@ Switch.args = {
|
|
|
23
27
|
disabled: false,
|
|
24
28
|
};
|
|
25
29
|
const example = `
|
|
26
|
-
<fluent-switch
|
|
30
|
+
<fluent-switch>
|
|
31
|
+
<span slot="checked-message">On</span>
|
|
32
|
+
<span slot="unchecked-message">Off</span>
|
|
33
|
+
<label for="direction-switch">Captions:</label>
|
|
34
|
+
</fluent-switch>
|
|
27
35
|
`;
|
|
28
36
|
Switch.parameters = {
|
|
29
37
|
docs: {
|
|
@@ -29,10 +29,10 @@ export const Tabs = TabsTemplate.bind({});
|
|
|
29
29
|
Tabs.args = {
|
|
30
30
|
activeId: 'TabTwo',
|
|
31
31
|
activeIndicator: true,
|
|
32
|
-
orientation: '
|
|
32
|
+
orientation: 'horizontal',
|
|
33
33
|
};
|
|
34
34
|
const example = `
|
|
35
|
-
<fluent-tabs id="myTab" activeId="TabTwo">
|
|
35
|
+
<fluent-tabs id="myTab" activeId="TabTwo" orientation="horizontal">
|
|
36
36
|
<fluent-tab id="TabOne">Tab one</fluent-tab>
|
|
37
37
|
<fluent-tab id="TabTwo">Tab two</fluent-tab>
|
|
38
38
|
<fluent-tab id="TabThree">Tab three</fluent-tab>
|
|
@@ -4,7 +4,8 @@ export default {
|
|
|
4
4
|
component: fluentTextArea,
|
|
5
5
|
argTypes: {
|
|
6
6
|
appearance: {
|
|
7
|
-
options: ['filled'],
|
|
7
|
+
options: ['filled', 'outline'],
|
|
8
|
+
defaultValue: 'outline',
|
|
8
9
|
control: { type: 'radio' },
|
|
9
10
|
},
|
|
10
11
|
autoFocus: {
|
|
@@ -44,7 +45,7 @@ TextArea.args = {
|
|
|
44
45
|
required: false,
|
|
45
46
|
};
|
|
46
47
|
const example = `
|
|
47
|
-
<fluent-text-area></fluent-text-area>
|
|
48
|
+
<fluent-text-area appearance="outline"></fluent-text-area>
|
|
48
49
|
`;
|
|
49
50
|
TextArea.parameters = {
|
|
50
51
|
docs: {
|
|
@@ -4,8 +4,8 @@ export default {
|
|
|
4
4
|
component: fluentTextField,
|
|
5
5
|
argTypes: {
|
|
6
6
|
appearance: {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
options: ['filled', 'outline'],
|
|
8
|
+
defaultValue: 'outline',
|
|
9
9
|
control: { type: 'radio' },
|
|
10
10
|
},
|
|
11
11
|
autoFocus: {
|
|
@@ -77,7 +77,7 @@ TextField.args = {
|
|
|
77
77
|
required: false,
|
|
78
78
|
};
|
|
79
79
|
const example = `
|
|
80
|
-
<fluent-text-field></fluent-text-field>
|
|
80
|
+
<fluent-text-field appearance="outline"></fluent-text-field>
|
|
81
81
|
`;
|
|
82
82
|
TextField.parameters = {
|
|
83
83
|
docs: {
|
|
@@ -12,6 +12,11 @@ export default {
|
|
|
12
12
|
},
|
|
13
13
|
};
|
|
14
14
|
const TreeViewTemplate = ({ disabled, renderCollapsedNodes }) => `
|
|
15
|
+
<style>
|
|
16
|
+
div.docs-story>div:first-child {
|
|
17
|
+
height: 22em !important;
|
|
18
|
+
}
|
|
19
|
+
</style>
|
|
15
20
|
<fluent-tree-view
|
|
16
21
|
${disabled ? 'disabled' : ''}
|
|
17
22
|
${renderCollapsedNodes ? `render-collapsed-nodes="${renderCollapsedNodes}` : ''}
|
|
@@ -48,14 +53,31 @@ TreeView.args = {
|
|
|
48
53
|
};
|
|
49
54
|
const example = `
|
|
50
55
|
<fluent-tree-view>
|
|
51
|
-
<fluent-tree-item
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
</fluent-tree-
|
|
58
|
-
|
|
56
|
+
<fluent-tree-item>
|
|
57
|
+
Root item 1
|
|
58
|
+
<fluent-tree-item>
|
|
59
|
+
Flowers
|
|
60
|
+
<fluent-tree-item disabled>Daisy</fluent-tree-item>
|
|
61
|
+
<fluent-tree-item>Sunflower</fluent-tree-item>
|
|
62
|
+
<fluent-tree-item>Rose</fluent-tree-item>
|
|
63
|
+
</fluent-tree-item>
|
|
64
|
+
<fluent-tree-item>Nested item 2</fluent-tree-item>
|
|
65
|
+
<fluent-tree-item>Nested item 3</fluent-tree-item>
|
|
66
|
+
</fluent-tree-item>
|
|
67
|
+
<fluent-tree-item>
|
|
68
|
+
Root item 2
|
|
69
|
+
<fluent-divider></fluent-divider>
|
|
70
|
+
<fluent-tree-item>
|
|
71
|
+
Flowers
|
|
72
|
+
<fluent-tree-item disabled>Daisy</fluent-tree-item>
|
|
73
|
+
<fluent-tree-item>Sunflower</fluent-tree-item>
|
|
74
|
+
<fluent-tree-item>Rose</fluent-tree-item>
|
|
75
|
+
</fluent-tree-item>
|
|
76
|
+
<fluent-tree-item>Nested item 2</fluent-tree-item>
|
|
77
|
+
<fluent-tree-item>Nested item 3</fluent-tree-item>
|
|
78
|
+
</fluent-tree-item>
|
|
79
|
+
<fluent-tree-item> Root item 3 - Leaf Erikson </fluent-tree-item>
|
|
80
|
+
</fluent-tree-view>`;
|
|
59
81
|
TreeView.parameters = {
|
|
60
82
|
docs: {
|
|
61
83
|
source: {
|