@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 CHANGED
@@ -2,7 +2,60 @@
2
2
  "name": "@fluentui/web-components",
3
3
  "entries": [
4
4
  {
5
- "date": "Thu, 14 Oct 2021 00:10:48 GMT",
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 Thu, 14 Oct 2021 00:10:48 GMT and should not be manually modified.
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:10:48 GMT
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
@@ -53,6 +53,7 @@ declare const _default: {
53
53
  control: {
54
54
  type: string;
55
55
  };
56
+ defaultValue: number;
56
57
  };
57
58
  size: {
58
59
  control: {
@@ -4,6 +4,7 @@ declare const _default: {
4
4
  argTypes: {
5
5
  appearance: {
6
6
  options: string[];
7
+ defaultValue: string;
7
8
  control: {
8
9
  type: string;
9
10
  };
@@ -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="#">Anchor</fluent-anchor>
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 { STORY_RENDERED } from '@storybook/core-events';
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(STORY_RENDERED, (name) => {
10
- if (name.toLowerCase().startsWith('components-anchored-region')) {
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="neutral">Text</fluent-badge>`,
24
+ code: `<fluent-badge appearance="accent">Text</fluent-badge>`,
25
25
  },
26
26
  },
27
27
  };
@@ -5,7 +5,7 @@ export default {
5
5
  };
6
6
  export const Card = () => CardTemplate;
7
7
  const example = `
8
- <fluent-card>Card Content</fluent-card>
8
+ <fluent-card>Card content in default slot</fluent-card>
9
9
  `;
10
10
  Card.parameters = {
11
11
  docs: {
@@ -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>Checkbox</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 { STORY_RENDERED } from '@storybook/core-events';
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(STORY_RENDERED, (name) => {
43
- if (name.toLowerCase().startsWith('components-data-grid')) {
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="numbers">
29
+ <fluent-radio-group name="fruits" >
29
30
  <label style="color: --var(neutral-foreground-rest)" slot="label"> Numbers </label>
30
- <fluent-radio value="one">One</fluent-radio>
31
- <fluent-radio value="two">Two</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&#8451; </fluent-slider-label>
18
18
  <fluent-slider-label position="10"> 10&#8451; </fluent-slider-label>
@@ -24,7 +24,12 @@ Slider.args = {
24
24
  orientation: 'horizontal',
25
25
  };
26
26
  const example = `
27
- <fluent-slider></fluent-slider>
27
+ <fluent-slider min="0" max="100" step="10" orientation="horizontal" style="width:80%;">
28
+ <fluent-slider-label position="0"> 0&#8451; </fluent-slider-label>
29
+ <fluent-slider-label position="10"> 10&#8451; </fluent-slider-label>
30
+ <fluent-slider-label position="90"> 90&#8451; </fluent-slider-label>
31
+ <fluent-slider-label position="100"> 100&#8451; </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
- ></fluent-switch>
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></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: 'vertical',
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
- defaultValue: 'outlined',
8
- options: ['filled', 'outlined'],
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 selected>Daisy</fluent-tree-item>
52
- <fluent-tree-item>Sunflower</fluent-tree-item>
53
- <fluent-tree-item>Rose</fluent-tree-item>
54
- <fluent-divider></fluent-divider>
55
- <fluent-tree-item>Petunia</fluent-tree-item>
56
- <fluent-tree-item>Tulip</fluent-tree-item>
57
- </fluent-tree-view>
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: {