@fluentui/web-components 2.0.0 → 2.1.1

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.
Files changed (47) hide show
  1. package/CHANGELOG.json +103 -1
  2. package/CHANGELOG.md +40 -2
  3. package/dist/dts/calendar/calendar.stories.d.ts +86 -0
  4. package/dist/dts/calendar/calendar.styles.d.ts +7 -0
  5. package/dist/dts/calendar/index.d.ts +18 -0
  6. package/dist/dts/custom-elements.d.ts +3 -1
  7. package/dist/dts/text-area/text-area.stories.d.ts +1 -1
  8. package/dist/esm/anchor/anchor.stories.js +2 -2
  9. package/dist/esm/breadcrumb-item/breadcrumb-item.styles.js +14 -0
  10. package/dist/esm/button/button.styles.js +31 -1
  11. package/dist/esm/calendar/calendar.stories.js +115 -0
  12. package/dist/esm/calendar/calendar.styles.js +133 -0
  13. package/dist/esm/calendar/index.js +31 -0
  14. package/dist/esm/card/card.styles.js +1 -2
  15. package/dist/esm/checkbox/checkbox.styles.js +17 -27
  16. package/dist/esm/custom-elements.js +3 -1
  17. package/dist/esm/divider/divider.styles.js +1 -2
  18. package/dist/esm/flipper/flipper.styles.js +5 -18
  19. package/dist/esm/listbox/listbox.styles.js +7 -28
  20. package/dist/esm/listbox-option/listbox-option.styles.js +10 -7
  21. package/dist/esm/menu/menu.styles.js +16 -3
  22. package/dist/esm/menu-item/menu-item.styles.js +17 -19
  23. package/dist/esm/number-field/number-field.styles.js +5 -0
  24. package/dist/esm/progress/progress/progress.styles.js +3 -10
  25. package/dist/esm/progress/progress-ring/progress-ring.styles.js +5 -8
  26. package/dist/esm/radio/radio.styles.js +14 -18
  27. package/dist/esm/radio-group/radio-group.styles.js +0 -2
  28. package/dist/esm/select/select.styles.js +52 -55
  29. package/dist/esm/skeleton/skeleton.styles.js +7 -2
  30. package/dist/esm/slider/slider.styles.js +6 -2
  31. package/dist/esm/styles/patterns/button.styles.js +61 -63
  32. package/dist/esm/styles/patterns/input.styles.js +13 -25
  33. package/dist/esm/switch/switch.stories.js +1 -2
  34. package/dist/esm/switch/switch.styles.js +21 -20
  35. package/dist/esm/tabs/tab/tab.styles.js +4 -3
  36. package/dist/esm/tabs/tabs.stories.js +56 -2
  37. package/dist/esm/tabs/tabs.styles.js +1 -1
  38. package/dist/esm/text-area/text-area.stories.js +2 -2
  39. package/dist/esm/tree-item/tree-item.styles.js +20 -11
  40. package/dist/esm/tree-view/tree-view.stories.js +39 -22
  41. package/dist/fluent-web-components.api.json +131 -2
  42. package/dist/web-components.d.ts +12 -0
  43. package/dist/web-components.js +973 -352
  44. package/dist/web-components.min.js +147 -135
  45. package/docs/api-report.md +12 -7
  46. package/package.json +2 -5
  47. package/public/switches.ts +14 -14
@@ -16,6 +16,7 @@ import { Breadcrumb } from '@microsoft/fast-foundation';
16
16
  import { BreadcrumbItem } from '@microsoft/fast-foundation';
17
17
  import { BreadcrumbItemOptions } from '@microsoft/fast-foundation';
18
18
  import { Button as Button_2 } from '@microsoft/fast-foundation';
19
+ import { CalendarOptions } from '@microsoft/fast-foundation';
19
20
  import { Card as Card_2 } from '@microsoft/fast-foundation';
20
21
  import { CheckboxOptions } from '@microsoft/fast-foundation';
21
22
  import { Combobox as Combobox_2 } from '@microsoft/fast-foundation';
@@ -181,6 +182,7 @@ export const allComponents: {
181
182
  fluentBreadcrumb: (overrideDefinition?: OverrideFoundationElementDefinition<FoundationElementDefinition> | undefined) => FoundationElementRegistry<FoundationElementDefinition, Breadcrumb>;
182
183
  fluentBreadcrumbItem: (overrideDefinition?: OverrideFoundationElementDefinition<BreadcrumbItemOptions> | undefined) => FoundationElementRegistry<BreadcrumbItemOptions, Constructable<FoundationElement>>;
183
184
  fluentButton: (overrideDefinition?: OverrideFoundationElementDefinition<FoundationElementDefinition> | undefined) => FoundationElementRegistry<FoundationElementDefinition, Button>;
185
+ fluentCalendar: (overrideDefinition?: OverrideFoundationElementDefinition<CalendarOptions> | undefined) => FoundationElementRegistry<CalendarOptions, Constructable<FoundationElement>>;
184
186
  fluentCard: (overrideDefinition?: OverrideFoundationElementDefinition<FoundationElementDefinition> | undefined) => FoundationElementRegistry<FoundationElementDefinition, Card>;
185
187
  fluentCheckbox: (overrideDefinition?: OverrideFoundationElementDefinition<CheckboxOptions> | undefined) => FoundationElementRegistry<CheckboxOptions, Constructable<FoundationElement>>;
186
188
  fluentCombobox: (overrideDefinition?: OverrideFoundationElementDefinition<ComboboxOptions> | undefined) => FoundationElementRegistry<ComboboxOptions, Constructable<FoundationElement>>;
@@ -576,6 +578,9 @@ export const fluentBreadcrumbItem: (overrideDefinition?: OverrideFoundationEleme
576
578
  // @public
577
579
  export const fluentButton: (overrideDefinition?: OverrideFoundationElementDefinition<FoundationElementDefinition> | undefined) => FoundationElementRegistry<FoundationElementDefinition, typeof Button>;
578
580
 
581
+ // @public
582
+ export const fluentCalendar: (overrideDefinition?: OverrideFoundationElementDefinition<CalendarOptions> | undefined) => FoundationElementRegistry<CalendarOptions, Constructable<FoundationElement>>;
583
+
579
584
  // @public
580
585
  export const fluentCard: (overrideDefinition?: OverrideFoundationElementDefinition<FoundationElementDefinition> | undefined) => FoundationElementRegistry<FoundationElementDefinition, typeof Card>;
581
586
 
@@ -1623,13 +1628,13 @@ export const typeRampPlus6LineHeight: CSSDesignToken<string>;
1623
1628
  //
1624
1629
  // dist/dts/color/palette.d.ts:70:5 - (ae-forgotten-export) The symbol "create" needs to be exported by the entry point index.d.ts
1625
1630
  // dist/dts/color/palette.d.ts:71:5 - (ae-forgotten-export) The symbol "from" needs to be exported by the entry point index.d.ts
1626
- // dist/dts/custom-elements.d.ts:49:5 - (ae-incompatible-release-tags) The symbol "fluentAnchor" is marked as @public, but its signature references "Anchor" which is marked as @internal
1627
- // dist/dts/custom-elements.d.ts:51:5 - (ae-incompatible-release-tags) The symbol "fluentBadge" is marked as @public, but its signature references "Badge" which is marked as @internal
1628
- // dist/dts/custom-elements.d.ts:54:5 - (ae-incompatible-release-tags) The symbol "fluentButton" is marked as @public, but its signature references "Button" which is marked as @internal
1629
- // dist/dts/custom-elements.d.ts:91:5 - (ae-incompatible-release-tags) The symbol "fluentTextArea" is marked as @public, but its signature references "TextArea" which is marked as @internal
1630
- // dist/dts/custom-elements.d.ts:92:5 - (ae-incompatible-release-tags) The symbol "fluentTextField" is marked as @public, but its signature references "TextField" which is marked as @internal
1631
- // dist/dts/custom-elements.d.ts:93:5 - (ae-incompatible-release-tags) The symbol "fluentToolbar" is marked as @public, but its signature references "Toolbar" which is marked as @internal
1632
- // dist/dts/custom-elements.d.ts:94:5 - (ae-incompatible-release-tags) The symbol "fluentTooltip" is marked as @public, but its signature references "Tooltip" which is marked as @internal
1631
+ // dist/dts/custom-elements.d.ts:50:5 - (ae-incompatible-release-tags) The symbol "fluentAnchor" is marked as @public, but its signature references "Anchor" which is marked as @internal
1632
+ // dist/dts/custom-elements.d.ts:52:5 - (ae-incompatible-release-tags) The symbol "fluentBadge" is marked as @public, but its signature references "Badge" which is marked as @internal
1633
+ // dist/dts/custom-elements.d.ts:55:5 - (ae-incompatible-release-tags) The symbol "fluentButton" is marked as @public, but its signature references "Button" which is marked as @internal
1634
+ // dist/dts/custom-elements.d.ts:93:5 - (ae-incompatible-release-tags) The symbol "fluentTextArea" is marked as @public, but its signature references "TextArea" which is marked as @internal
1635
+ // dist/dts/custom-elements.d.ts:94:5 - (ae-incompatible-release-tags) The symbol "fluentTextField" is marked as @public, but its signature references "TextField" which is marked as @internal
1636
+ // dist/dts/custom-elements.d.ts:95:5 - (ae-incompatible-release-tags) The symbol "fluentToolbar" is marked as @public, but its signature references "Toolbar" which is marked as @internal
1637
+ // dist/dts/custom-elements.d.ts:96:5 - (ae-incompatible-release-tags) The symbol "fluentTooltip" is marked as @public, but its signature references "Tooltip" which is marked as @internal
1633
1638
 
1634
1639
  // (No @packageDocumentation comment for this package)
1635
1640
 
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@fluentui/web-components",
3
3
  "description": "A library of Fluent Web Components",
4
4
  "sideEffects": false,
5
- "version": "2.0.0",
5
+ "version": "2.1.1",
6
6
  "author": {
7
7
  "name": "Microsoft",
8
8
  "url": "https://discord.gg/FcSNfg4"
@@ -18,9 +18,6 @@
18
18
  "main": "dist/esm/index.js",
19
19
  "types": "dist/web-components.d.ts",
20
20
  "unpkg": "dist/web-components.min.js",
21
- "beachball": {
22
- "disallowedChangeTypes": []
23
- },
24
21
  "scripts": {
25
22
  "clean": "node ./build/clean.js dist",
26
23
  "doc": "api-extractor run --local",
@@ -92,7 +89,7 @@
92
89
  "dependencies": {
93
90
  "@microsoft/fast-colors": "^5.1.0",
94
91
  "@microsoft/fast-element": "^1.6.0",
95
- "@microsoft/fast-foundation": "^2.23.0",
92
+ "@microsoft/fast-foundation": "^2.24.0",
96
93
  "@microsoft/fast-web-utilities": "^5.0.0",
97
94
  "tslib": "^1.13.0"
98
95
  }
@@ -1,24 +1,24 @@
1
- import { fillColor, StandardLuminance, SwatchRGB } from '../src/index';
1
+ import { Direction } from '@microsoft/fast-web-utilities';
2
+ import { baseLayerLuminance, direction, StandardLuminance } from '../src/index';
3
+
2
4
  export function toggleBgMode() {
3
- const bgChecked = document.getElementById('luminance-switch')!.classList.contains('checked');
5
+ const storyContainer = document.querySelector<HTMLElement>('.docs-story')!;
6
+ const bgChecked = this.checked;
4
7
  if (bgChecked) {
5
- fillColor.setValueFor(
6
- document.body,
7
- SwatchRGB.create(StandardLuminance.LightMode, StandardLuminance.LightMode, StandardLuminance.LightMode),
8
- );
8
+ baseLayerLuminance.setValueFor(storyContainer, StandardLuminance.DarkMode);
9
9
  } else {
10
- fillColor.setValueFor(
11
- document.body,
12
- SwatchRGB.create(StandardLuminance.DarkMode, StandardLuminance.DarkMode, StandardLuminance.DarkMode),
13
- );
10
+ baseLayerLuminance.setValueFor(storyContainer, StandardLuminance.LightMode);
14
11
  }
15
12
  }
16
13
 
17
14
  export function toggleLtr() {
18
- const ltrChecked = document.getElementById('direction-switch')!.classList.contains('checked');
19
- if (ltrChecked) {
20
- document.querySelector<HTMLElement>('.docs-story')!.setAttribute('style', 'direction:ltr;');
15
+ const storyContainer = document.querySelector<HTMLElement>('.docs-story')!;
16
+ const dirChecked = this.checked;
17
+ if (dirChecked) {
18
+ storyContainer.style.direction = 'rtl';
19
+ direction.setValueFor(storyContainer, Direction.rtl);
21
20
  } else {
22
- document.querySelector<HTMLElement>('.docs-story')!.setAttribute('style', 'direction:rtl;');
21
+ storyContainer.style.direction = 'ltr';
22
+ direction.setValueFor(storyContainer, Direction.ltr);
23
23
  }
24
24
  }