@fluentui/web-components 1.6.3 → 2.1.0

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 (170) 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/color/palette.d.ts +43 -1
  7. package/dist/dts/color/recipes/contrast-and-delta-swatch-set.d.ts +11 -0
  8. package/dist/dts/color/recipes/contrast-swatch.d.ts +12 -0
  9. package/dist/dts/color/recipes/delta-swatch-set.d.ts +36 -0
  10. package/dist/dts/color/recipes/{neutral-divider.d.ts → delta-swatch.d.ts} +3 -2
  11. package/dist/dts/color/recipes/focus-stroke.d.ts +2 -2
  12. package/dist/dts/color/recipes/foreground-on-accent.d.ts +6 -0
  13. package/dist/dts/color/recipes/gradient-shadow-stroke.d.ts +7 -0
  14. package/dist/dts/color/recipes/gradient-swatch.d.ts +36 -0
  15. package/dist/dts/color/recipes/neutral-layer-1.d.ts +4 -0
  16. package/dist/dts/color/recipes/neutral-layer-2.d.ts +1 -5
  17. package/dist/dts/color/recipes/neutral-layer-3.d.ts +1 -1
  18. package/dist/dts/color/recipes/neutral-layer-4.d.ts +1 -1
  19. package/dist/dts/color/recipes/neutral-layer-floating.d.ts +1 -1
  20. package/dist/dts/color/recipes/underline-stroke.d.ts +7 -0
  21. package/dist/dts/color/swatch.d.ts +7 -0
  22. package/dist/dts/color/utilities/base-layer-luminance.d.ts +2 -2
  23. package/dist/dts/combobox/index.d.ts +1 -2
  24. package/dist/dts/custom-elements.d.ts +4 -2
  25. package/dist/dts/data-grid/data-grid-row.styles.d.ts +1 -1
  26. package/dist/dts/data-grid/index.d.ts +1 -1
  27. package/dist/dts/design-system-provider/index.d.ts +14 -29
  28. package/dist/dts/design-tokens.d.ts +198 -82
  29. package/dist/dts/menu/index.d.ts +11 -6
  30. package/dist/dts/menu/menu.stories.d.ts +1 -1
  31. package/dist/dts/select/index.d.ts +1 -1
  32. package/dist/dts/select/select.stories.d.ts +8 -0
  33. package/dist/dts/select/select.styles.d.ts +1 -0
  34. package/dist/dts/skeleton/skeleton.stories.d.ts +1 -0
  35. package/dist/dts/styles/elevation.d.ts +44 -5
  36. package/dist/dts/styles/patterns/button.styles.d.ts +7 -6
  37. package/dist/dts/styles/patterns/index.d.ts +1 -1
  38. package/dist/dts/styles/patterns/input.styles.d.ts +22 -0
  39. package/dist/dts/text-area/text-area.stories.d.ts +1 -1
  40. package/dist/dts/tree-view/tree-view.stories.d.ts +0 -5
  41. package/dist/esm/accordion/accordion-item/accordion-item.styles.js +54 -17
  42. package/dist/esm/accordion/accordion-item/index.js +4 -22
  43. package/dist/esm/accordion/accordion.styles.js +4 -4
  44. package/dist/esm/anchor/anchor.stories.js +2 -2
  45. package/dist/esm/anchor/anchor.styles.js +8 -2
  46. package/dist/esm/badge/badge.styles.js +10 -2
  47. package/dist/esm/breadcrumb-item/breadcrumb-item.styles.js +44 -53
  48. package/dist/esm/breadcrumb-item/index.js +2 -4
  49. package/dist/esm/button/button.stories.js +1 -1
  50. package/dist/esm/button/button.styles.js +21 -71
  51. package/dist/esm/calendar/calendar.stories.js +115 -0
  52. package/dist/esm/calendar/calendar.styles.js +133 -0
  53. package/dist/esm/calendar/index.js +31 -0
  54. package/dist/esm/card/card.stories.js +14 -0
  55. package/dist/esm/card/card.styles.js +23 -32
  56. package/dist/esm/card/index.js +1 -1
  57. package/dist/esm/checkbox/checkbox.styles.js +58 -51
  58. package/dist/esm/checkbox/index.js +5 -13
  59. package/dist/esm/color/palette.js +174 -12
  60. package/dist/esm/color/recipes/contrast-and-delta-swatch-set.js +28 -0
  61. package/dist/esm/color/recipes/contrast-swatch.js +12 -0
  62. package/dist/esm/color/recipes/delta-swatch-set.js +53 -0
  63. package/dist/esm/color/recipes/{neutral-divider.js → delta-swatch.js} +3 -2
  64. package/dist/esm/color/recipes/focus-stroke.js +4 -3
  65. package/dist/esm/color/recipes/foreground-on-accent.js +14 -0
  66. package/dist/esm/color/recipes/gradient-shadow-stroke.js +54 -0
  67. package/dist/esm/color/recipes/gradient-swatch.js +36 -0
  68. package/dist/esm/color/recipes/neutral-layer-1.js +7 -1
  69. package/dist/esm/color/recipes/neutral-layer-2.js +3 -9
  70. package/dist/esm/color/recipes/neutral-layer-3.js +3 -3
  71. package/dist/esm/color/recipes/neutral-layer-4.js +3 -3
  72. package/dist/esm/color/recipes/neutral-layer-floating.js +3 -4
  73. package/dist/esm/color/recipes/underline-stroke.js +31 -0
  74. package/dist/esm/color/swatch.js +22 -2
  75. package/dist/esm/color/utilities/base-layer-luminance.js +2 -2
  76. package/dist/esm/combobox/combobox.stories.js +1 -0
  77. package/dist/esm/combobox/index.js +6 -9
  78. package/dist/esm/custom-elements.js +3 -1
  79. package/dist/esm/data-grid/data-grid-cell.styles.js +4 -4
  80. package/dist/esm/data-grid/data-grid-row.styles.js +3 -3
  81. package/dist/esm/design-system-provider/design-system-provider.vscode.definition.json +17 -9
  82. package/dist/esm/design-system-provider/index.js +24 -39
  83. package/dist/esm/design-tokens.js +303 -217
  84. package/dist/esm/dialog/dialog.styles.js +2 -3
  85. package/dist/esm/divider/divider.styles.js +1 -2
  86. package/dist/esm/flipper/flipper.styles.js +28 -65
  87. package/dist/esm/flipper/index.js +4 -8
  88. package/dist/esm/listbox/listbox.styles.js +8 -29
  89. package/dist/esm/listbox-option/listbox-option.styles.js +52 -35
  90. package/dist/esm/menu/index.js +16 -6
  91. package/dist/esm/menu/menu.stories.js +16 -2
  92. package/dist/esm/menu/menu.styles.js +38 -27
  93. package/dist/esm/menu-item/index.js +6 -33
  94. package/dist/esm/menu-item/menu-item.stories.js +1 -1
  95. package/dist/esm/menu-item/menu-item.styles.js +58 -84
  96. package/dist/esm/number-field/index.js +7 -3
  97. package/dist/esm/number-field/number-field.styles.js +30 -175
  98. package/dist/esm/progress/progress/index.js +1 -1
  99. package/dist/esm/progress/progress/progress.styles.js +13 -18
  100. package/dist/esm/progress/progress-ring/progress-ring.styles.js +65 -69
  101. package/dist/esm/radio/index.js +3 -1
  102. package/dist/esm/radio/radio.stories.js +3 -2
  103. package/dist/esm/radio/radio.styles.js +52 -42
  104. package/dist/esm/radio-group/radio-group.styles.js +0 -2
  105. package/dist/esm/select/index.js +6 -9
  106. package/dist/esm/select/select.stories.js +10 -2
  107. package/dist/esm/select/select.styles.js +100 -124
  108. package/dist/esm/select/select.vscode.definition.json +3 -0
  109. package/dist/esm/skeleton/skeleton.stories.js +3 -2
  110. package/dist/esm/skeleton/skeleton.styles.js +11 -6
  111. package/dist/esm/slider/slider.styles.js +54 -14
  112. package/dist/esm/slider-label/slider-label.styles.js +5 -6
  113. package/dist/esm/styles/direction.js +1 -1
  114. package/dist/esm/styles/elevation.js +54 -5
  115. package/dist/esm/styles/patterns/button.styles.js +274 -294
  116. package/dist/esm/styles/patterns/index.js +1 -1
  117. package/dist/esm/styles/patterns/input.styles.js +218 -0
  118. package/dist/esm/switch/index.js +3 -1
  119. package/dist/esm/switch/switch.stories.js +3 -3
  120. package/dist/esm/switch/switch.styles.js +79 -60
  121. package/dist/esm/tabs/tab/tab.styles.js +11 -14
  122. package/dist/esm/tabs/tabs.styles.js +9 -8
  123. package/dist/esm/text-area/text-area.stories.js +2 -2
  124. package/dist/esm/text-area/text-area.styles.js +16 -96
  125. package/dist/esm/text-field/text-field.stories.js +1 -1
  126. package/dist/esm/text-field/text-field.styles.js +16 -144
  127. package/dist/esm/toolbar/index.js +1 -0
  128. package/dist/esm/toolbar/toolbar.styles.js +56 -56
  129. package/dist/esm/tooltip/index.js +2 -4
  130. package/dist/esm/tooltip/tooltip.styles.js +14 -14
  131. package/dist/esm/tree-item/index.js +2 -8
  132. package/dist/esm/tree-item/tree-item.styles.js +45 -80
  133. package/dist/esm/tree-view/tree-view.stories.js +23 -11
  134. package/dist/fluent-web-components.api.json +4900 -2353
  135. package/dist/web-components.d.ts +397 -100
  136. package/dist/web-components.js +2240 -2175
  137. package/dist/web-components.min.js +158 -128
  138. package/docs/api-report.md +338 -80
  139. package/package.json +2 -5
  140. package/public/switches.ts +13 -14
  141. package/dist/dts/color/recipes/accent-fill.d.ts +0 -7
  142. package/dist/dts/color/recipes/accent-foreground.d.ts +0 -7
  143. package/dist/dts/color/recipes/neutral-fill-contrast.d.ts +0 -7
  144. package/dist/dts/color/recipes/neutral-fill-input.d.ts +0 -7
  145. package/dist/dts/color/recipes/neutral-fill-inverse.d.ts +0 -7
  146. package/dist/dts/color/recipes/neutral-fill-layer.d.ts +0 -6
  147. package/dist/dts/color/recipes/neutral-fill-stealth.d.ts +0 -7
  148. package/dist/dts/color/recipes/neutral-fill.d.ts +0 -14
  149. package/dist/dts/color/recipes/neutral-foreground-hint.d.ts +0 -10
  150. package/dist/dts/color/recipes/neutral-foreground.d.ts +0 -6
  151. package/dist/dts/color/recipes/neutral-layer-card-container.d.ts +0 -6
  152. package/dist/dts/color/recipes/neutral-stroke-strong.d.ts +0 -7
  153. package/dist/dts/color/recipes/neutral-stroke.d.ts +0 -7
  154. package/dist/dts/styles/patterns/input.d.ts +0 -4
  155. package/dist/dts/utilities/math.d.ts +0 -24
  156. package/dist/esm/color/recipes/accent-fill.js +0 -18
  157. package/dist/esm/color/recipes/accent-foreground.js +0 -31
  158. package/dist/esm/color/recipes/neutral-fill-contrast.js +0 -26
  159. package/dist/esm/color/recipes/neutral-fill-input.js +0 -14
  160. package/dist/esm/color/recipes/neutral-fill-inverse.js +0 -26
  161. package/dist/esm/color/recipes/neutral-fill-layer.js +0 -7
  162. package/dist/esm/color/recipes/neutral-fill-stealth.js +0 -14
  163. package/dist/esm/color/recipes/neutral-fill.js +0 -21
  164. package/dist/esm/color/recipes/neutral-foreground-hint.js +0 -10
  165. package/dist/esm/color/recipes/neutral-foreground.js +0 -6
  166. package/dist/esm/color/recipes/neutral-layer-card-container.js +0 -9
  167. package/dist/esm/color/recipes/neutral-stroke-strong.js +0 -15
  168. package/dist/esm/color/recipes/neutral-stroke.js +0 -18
  169. package/dist/esm/styles/patterns/input.js +0 -31
  170. package/dist/esm/utilities/math.js +0 -49
@@ -0,0 +1,36 @@
1
+ import { ColorRGBA64, rgbToRelativeLuminance } from '@microsoft/fast-colors';
2
+ import { contrast } from '../utilities/relative-luminance';
3
+ /**
4
+ * An implementation of {@link Swatch} that produces a gradient.
5
+ * This assumes a subtle gradient such that `relativeLuminance` is still meaningful,
6
+ * either with consistent luminance across the steps or a small edge of larger change.
7
+ * @internal
8
+ */
9
+ export class GradientSwatchRGB {
10
+ /**
11
+ *
12
+ * @param red Red channel expressed as a number between 0 and 1
13
+ * @param green Green channel expressed as a number between 0 and 1
14
+ * @param blue Blue channel expressed as a number between 0 and 1
15
+ */
16
+ constructor(red, green, blue, cssGradient) {
17
+ this.toColorString = () => this.cssGradient;
18
+ this.contrast = contrast.bind(null, this);
19
+ this.createCSS = this.toColorString;
20
+ this.color = new ColorRGBA64(red, green, blue);
21
+ this.cssGradient = cssGradient;
22
+ this.relativeLuminance = rgbToRelativeLuminance(this.color);
23
+ this.r = red;
24
+ this.g = green;
25
+ this.b = blue;
26
+ }
27
+ /**
28
+ * Creates a GradientSwatch from a base color and gradient definition
29
+ * @param obj The base color object, used for relative luminance
30
+ * @param cssGradient The actual gradient to be rendered
31
+ * @returns New GradientSwatch object
32
+ */
33
+ static fromObject(obj, cssGradient) {
34
+ return new GradientSwatchRGB(obj.r, obj.g, obj.b, cssGradient);
35
+ }
36
+ }
@@ -1,7 +1,13 @@
1
1
  import { baseLayerLuminanceSwatch } from '../utilities/base-layer-luminance';
2
+ /**
3
+ * @internal
4
+ */
5
+ export function neutralLayer1Index(palette, baseLayerLuminance) {
6
+ return palette.closestIndexOf(baseLayerLuminanceSwatch(baseLayerLuminance));
7
+ }
2
8
  /**
3
9
  * @internal
4
10
  */
5
11
  export function neutralLayer1(palette, baseLayerLuminance) {
6
- return palette.get(palette.closestIndexOf(baseLayerLuminanceSwatch(baseLayerLuminance)));
12
+ return palette.get(neutralLayer1Index(palette, baseLayerLuminance));
7
13
  }
@@ -1,13 +1,7 @@
1
- import { baseLayerLuminanceSwatch } from '../utilities/base-layer-luminance';
1
+ import { neutralLayer1Index } from './neutral-layer-1';
2
2
  /**
3
3
  * @internal
4
4
  */
5
- export function neutralLayer2Index(palette, luminance, layerDelta, fillRestDelta, fillHoverDelta, fillActiveDelta) {
6
- return Math.max(palette.closestIndexOf(baseLayerLuminanceSwatch(luminance)) + layerDelta, fillRestDelta, fillHoverDelta, fillActiveDelta);
7
- }
8
- /**
9
- * @internal
10
- */
11
- export function neutralLayer2(palette, luminance, layerDelta, fillRestDelta, fillHoverDelta, fillActiveDelta) {
12
- return palette.get(neutralLayer2Index(palette, luminance, layerDelta, fillRestDelta, fillHoverDelta, fillActiveDelta));
5
+ export function neutralLayer2(palette, baseLayerLuminance, layerDelta) {
6
+ return palette.get(neutralLayer1Index(palette, baseLayerLuminance) + layerDelta * -1);
13
7
  }
@@ -1,7 +1,7 @@
1
- import { neutralLayer2Index } from './neutral-layer-2';
1
+ import { neutralLayer1Index } from './neutral-layer-1';
2
2
  /**
3
3
  * @internal
4
4
  */
5
- export function neutralLayer3(palette, luminance, layerDelta, fillRestDelta, fillHoverDelta, fillActiveDelta) {
6
- return palette.get(neutralLayer2Index(palette, luminance, layerDelta, fillRestDelta, fillHoverDelta, fillActiveDelta) + layerDelta);
5
+ export function neutralLayer3(palette, baseLayerLuminance, layerDelta) {
6
+ return palette.get(neutralLayer1Index(palette, baseLayerLuminance) + layerDelta * -1 * 2);
7
7
  }
@@ -1,7 +1,7 @@
1
- import { neutralLayer2Index } from './neutral-layer-2';
1
+ import { neutralLayer1Index } from './neutral-layer-1';
2
2
  /**
3
3
  * @internal
4
4
  */
5
- export function neutralLayer4(palette, luminance, layerDelta, fillRestDelta, fillHoverDelta, fillActiveDelta) {
6
- return palette.get(neutralLayer2Index(palette, luminance, layerDelta, fillRestDelta, fillHoverDelta, fillActiveDelta) + layerDelta * 2);
5
+ export function neutralLayer4(palette, baseLayerLuminance, layerDelta) {
6
+ return palette.get(neutralLayer1Index(palette, baseLayerLuminance) + layerDelta * -1 * 3);
7
7
  }
@@ -1,8 +1,7 @@
1
- import { baseLayerLuminanceSwatch } from '../utilities/base-layer-luminance';
1
+ import { neutralLayer1Index } from './neutral-layer-1';
2
2
  /**
3
3
  * @internal
4
4
  */
5
- export function neutralLayerFloating(palette, relativeLuminance, layerDelta) {
6
- const cardIndex = palette.closestIndexOf(baseLayerLuminanceSwatch(relativeLuminance)) - layerDelta;
7
- return palette.get(cardIndex - layerDelta);
5
+ export function neutralLayerFloating(palette, baseLayerLuminance, layerDelta) {
6
+ return palette.get(neutralLayer1Index(palette, baseLayerLuminance) + layerDelta);
8
7
  }
@@ -0,0 +1,31 @@
1
+ import { directionByIsDark } from '../utilities/direction-by-is-dark';
2
+ import { GradientSwatchRGB } from './gradient-swatch';
3
+ /**
4
+ * @internal
5
+ */
6
+ export function underlineStroke(palette, reference, restDelta, hoverDelta, activeDelta, focusDelta, shadowDelta, width) {
7
+ const referenceIndex = palette.closestIndexOf(reference);
8
+ const direction = directionByIsDark(reference);
9
+ const restIndex = referenceIndex + direction * restDelta;
10
+ const hoverIndex = restIndex + direction * (hoverDelta - restDelta);
11
+ const activeIndex = restIndex + direction * (activeDelta - restDelta);
12
+ const focusIndex = restIndex + direction * (focusDelta - restDelta);
13
+ const midPosition = `calc(100% - ${width})`;
14
+ function gradientHelper(index, applyShadow) {
15
+ const color = palette.get(index);
16
+ if (applyShadow) {
17
+ const underlineColor = palette.get(index + direction * shadowDelta);
18
+ const g = `linear-gradient(${color.toColorString()} ${midPosition}, ${underlineColor.toColorString()} ${midPosition}, ${underlineColor.toColorString()})`;
19
+ return GradientSwatchRGB.fromObject(color, g);
20
+ }
21
+ else {
22
+ return color;
23
+ }
24
+ }
25
+ return {
26
+ rest: gradientHelper(restIndex, true),
27
+ hover: gradientHelper(hoverIndex, true),
28
+ active: gradientHelper(activeIndex, false),
29
+ focus: gradientHelper(focusIndex, true),
30
+ };
31
+ }
@@ -10,8 +10,28 @@ export const SwatchRGB = Object.freeze({
10
10
  },
11
11
  });
12
12
  /**
13
- * A RGB implementation of {@link Swatch}
14
- * @public
13
+ * Runtime test for an objects conformance with the SwatchRGB interface.
14
+ * @internal
15
+ */
16
+ export function isSwatchRGB(value) {
17
+ const test = {
18
+ r: 0,
19
+ g: 0,
20
+ b: 0,
21
+ toColorString: () => '',
22
+ contrast: () => 0,
23
+ relativeLuminance: 0,
24
+ };
25
+ for (const key in test) {
26
+ if (typeof test[key] !== typeof value[key]) {
27
+ return false;
28
+ }
29
+ }
30
+ return true;
31
+ }
32
+ /**
33
+ * An RGB implementation of {@link Swatch}
34
+ * @internal
15
35
  */
16
36
  class SwatchRGBImpl extends ColorRGBA64 {
17
37
  /**
@@ -9,6 +9,6 @@ export function baseLayerLuminanceSwatch(luminance) {
9
9
  */
10
10
  export var StandardLuminance;
11
11
  (function (StandardLuminance) {
12
- StandardLuminance[StandardLuminance["LightMode"] = 1] = "LightMode";
13
- StandardLuminance[StandardLuminance["DarkMode"] = 0.23] = "DarkMode";
12
+ StandardLuminance[StandardLuminance["LightMode"] = 0.98] = "LightMode";
13
+ StandardLuminance[StandardLuminance["DarkMode"] = 0.15] = "DarkMode";
14
14
  })(StandardLuminance || (StandardLuminance = {}));
@@ -31,6 +31,7 @@ const ComboboxTemplate = ({ appearance, autocomplete, position, required }) => `
31
31
  ${appearance ? `autocomplete="${autocomplete}"` : ''}
32
32
  ${required ? 'required' : ''}
33
33
  ${position ? `position="${position}"` : ''}
34
+ style="margin-bottom: 500px;"
34
35
  >
35
36
  <fluent-option>Please Please Me</fluent-option>
36
37
  <fluent-option>With The Beatles</fluent-option>
@@ -1,6 +1,7 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { attr } from '@microsoft/fast-element';
3
3
  import { Combobox as FoundationCombobox, comboboxTemplate as template, } from '@microsoft/fast-foundation';
4
+ import { fillColor, neutralLayerFloating } from '../design-tokens';
4
5
  import { comboboxStyles as styles } from './combobox.styles';
5
6
  /**
6
7
  * The Fluent combobox class
@@ -24,6 +25,9 @@ export class Combobox extends FoundationCombobox {
24
25
  if (!this.appearance) {
25
26
  this.appearance = 'outline';
26
27
  }
28
+ if (this.listbox) {
29
+ fillColor.setValueFor(this.listbox, neutralLayerFloating);
30
+ }
27
31
  }
28
32
  }
29
33
  __decorate([
@@ -44,15 +48,8 @@ export const fluentCombobox = Combobox.compose({
44
48
  template,
45
49
  styles,
46
50
  indicator: `
47
- <svg
48
- class="select-indicator"
49
- part="select-indicator"
50
- viewBox="0 0 12 7"
51
- xmlns="http://www.w3.org/2000/svg"
52
- >
53
- <path
54
- d="M11.85.65c.2.2.2.5 0 .7L6.4 6.84a.55.55 0 01-.78 0L.14 1.35a.5.5 0 11.71-.7L6 5.8 11.15.65c.2-.2.5-.2.7 0z"
55
- />
51
+ <svg width="12" height="12" xmlns="http://www.w3.org/2000/svg">
52
+ <path d="M2.15 4.65c.2-.2.5-.2.7 0L6 7.79l3.15-3.14a.5.5 0 11.7.7l-3.5 3.5a.5.5 0 01-.7 0l-3.5-3.5a.5.5 0 010-.7z"/>
56
53
  </svg>
57
54
  `,
58
55
  });
@@ -5,6 +5,7 @@ import { fluentBadge } from './badge/index';
5
5
  import { fluentBreadcrumb } from './breadcrumb/index';
6
6
  import { fluentBreadcrumbItem } from './breadcrumb-item/index';
7
7
  import { fluentButton } from './button/index';
8
+ import { fluentCalendar } from './calendar/index';
8
9
  import { fluentCard } from './card/index';
9
10
  import { fluentCheckbox } from './checkbox/index';
10
11
  import { fluentCombobox } from './combobox/index';
@@ -34,7 +35,7 @@ import { fluentToolbar } from './toolbar/index';
34
35
  import { fluentTooltip } from './tooltip/index';
35
36
  import { fluentTreeView } from './tree-view/index';
36
37
  import { fluentTreeItem } from './tree-item/index';
37
- export { fluentAccordion, fluentAccordionItem, fluentAnchor, fluentAnchoredRegion, fluentBadge, fluentBreadcrumb, fluentBreadcrumbItem, fluentButton, fluentCard, fluentCheckbox, fluentCombobox, fluentDataGrid, fluentDataGridCell, fluentDataGridRow, fluentDesignSystemProvider, fluentDialog, fluentDivider, fluentFlipper, fluentHorizontalScroll, fluentListbox, fluentOption, fluentMenu, fluentMenuItem, fluentNumberField, fluentProgress, fluentProgressRing, fluentRadio, fluentRadioGroup, fluentSelect, fluentSkeleton, fluentSlider, fluentSliderLabel, fluentSwitch, fluentTabs, fluentTab, fluentTabPanel, fluentTextArea, fluentTextField, fluentToolbar, fluentTooltip, fluentTreeView, fluentTreeItem, };
38
+ export { fluentAccordion, fluentAccordionItem, fluentAnchor, fluentAnchoredRegion, fluentBadge, fluentBreadcrumb, fluentBreadcrumbItem, fluentButton, fluentCard, fluentCalendar, fluentCheckbox, fluentCombobox, fluentDataGrid, fluentDataGridCell, fluentDataGridRow, fluentDesignSystemProvider, fluentDialog, fluentDivider, fluentFlipper, fluentHorizontalScroll, fluentListbox, fluentOption, fluentMenu, fluentMenuItem, fluentNumberField, fluentProgress, fluentProgressRing, fluentRadio, fluentRadioGroup, fluentSelect, fluentSkeleton, fluentSlider, fluentSliderLabel, fluentSwitch, fluentTabs, fluentTab, fluentTabPanel, fluentTextArea, fluentTextField, fluentToolbar, fluentTooltip, fluentTreeView, fluentTreeItem, };
38
39
  /**
39
40
  * All Fluent UI Web Components
40
41
  * @public
@@ -48,6 +49,7 @@ export const allComponents = {
48
49
  fluentBreadcrumb,
49
50
  fluentBreadcrumbItem,
50
51
  fluentButton,
52
+ fluentCalendar,
51
53
  fluentCard,
52
54
  fluentCheckbox,
53
55
  fluentCombobox,
@@ -1,7 +1,7 @@
1
1
  import { css } from '@microsoft/fast-element';
2
2
  import { SystemColors } from '@microsoft/fast-web-utilities';
3
3
  import { focusVisible, forcedColorsStylesheetBehavior, } from '@microsoft/fast-foundation';
4
- import { bodyFont, controlCornerRadius, designUnit, focusStrokeOuter, neutralForegroundRest, strokeWidth, typeRampBaseFontSize, typeRampBaseLineHeight, } from '../design-tokens';
4
+ import { bodyFont, controlCornerRadius, designUnit, focusStrokeOuter, focusStrokeWidth, neutralForegroundRest, typeRampBaseFontSize, typeRampBaseLineHeight, } from '../design-tokens';
5
5
  export const dataGridCellStyles = (context, definition) => css `
6
6
  :host {
7
7
  padding: calc(${designUnit} * 1px) calc(${designUnit} * 3px);
@@ -11,8 +11,9 @@ export const dataGridCellStyles = (context, definition) => css `
11
11
  font-size: ${typeRampBaseFontSize};
12
12
  line-height: ${typeRampBaseLineHeight};
13
13
  font-weight: 400;
14
- border: transparent calc(${strokeWidth} * 1px) solid;
14
+ border: transparent calc(${focusStrokeWidth} * 1px) solid;
15
15
  overflow: hidden;
16
+ outline: none;
16
17
  white-space: nowrap;
17
18
  border-radius: calc(${controlCornerRadius} * 1px);
18
19
  }
@@ -22,8 +23,7 @@ export const dataGridCellStyles = (context, definition) => css `
22
23
  }
23
24
 
24
25
  :host(:${focusVisible}) {
25
- border: ${focusStrokeOuter} calc(${strokeWidth} * 1px) solid;
26
- color: ${neutralForegroundRest};
26
+ border-color: ${focusStrokeOuter};
27
27
  }
28
28
  `.withBehaviors(forcedColorsStylesheetBehavior(css `
29
29
  :host {
@@ -1,7 +1,7 @@
1
1
  import { css } from '@microsoft/fast-element';
2
2
  import { forcedColorsStylesheetBehavior, } from '@microsoft/fast-foundation';
3
- import { neutralFillRest, neutralStrokeDividerRest, strokeWidth } from '../design-tokens';
4
- export const dataGridRowStyles = (context, defintion) => css `
3
+ import { fillColor, neutralStrokeDividerRest, strokeWidth } from '../design-tokens';
4
+ export const dataGridRowStyles = (context, definition) => css `
5
5
  :host {
6
6
  display: grid;
7
7
  padding: 1px 0;
@@ -14,7 +14,7 @@ export const dataGridRowStyles = (context, defintion) => css `
14
14
  }
15
15
 
16
16
  :host(.sticky-header) {
17
- background: ${neutralFillRest};
17
+ background: ${fillColor};
18
18
  position: sticky;
19
19
  top: 0;
20
20
  }
@@ -30,6 +30,14 @@
30
30
  "default": "#0078D4",
31
31
  "required": false
32
32
  },
33
+ {
34
+ "name": "neutral-base-color",
35
+ "title": "Neutral base color",
36
+ "description": "The neutral palette base color",
37
+ "type": "string",
38
+ "default": "#808080",
39
+ "required": false
40
+ },
33
41
  {
34
42
  "name": "density",
35
43
  "title": "Density",
@@ -86,6 +94,14 @@
86
94
  "default": 4,
87
95
  "required": false
88
96
  },
97
+ {
98
+ "name": "layer-corner-radius",
99
+ "title": "Layer Corner radius",
100
+ "description": "The corner radius value for layer components",
101
+ "type": "number",
102
+ "default": 8,
103
+ "required": false
104
+ },
89
105
  {
90
106
  "name": "stroke-width",
91
107
  "title": "Stroke width",
@@ -110,14 +126,6 @@
110
126
  "default": 0.3,
111
127
  "required": false
112
128
  },
113
- {
114
- "name": "neutral-base-color",
115
- "title": "Neutral base color",
116
- "description": "The neutral palette base color",
117
- "type": "string",
118
- "default": "#808080",
119
- "required": false
120
- },
121
129
  {
122
130
  "name": "type-ramp-minus-2-font-size",
123
131
  "title": "Font size (-2)",
@@ -417,7 +425,7 @@
417
425
  "title": "Base layer luminance",
418
426
  "description": "When set to a number between 0 and 1, this values controls the output of layer and card recipes",
419
427
  "type": "number",
420
- "default": 1,
428
+ "default": 0.98,
421
429
  "required": false
422
430
  },
423
431
  {
@@ -1,11 +1,10 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { parseColorHexRGB } from '@microsoft/fast-colors';
3
- import { attr, css, html, nullableNumberConverter, Observable, observable, } from '@microsoft/fast-element';
3
+ import { attr, css, html, nullableNumberConverter, Observable } from '@microsoft/fast-element';
4
4
  import { display, forcedColorsStylesheetBehavior, FoundationElement, } from '@microsoft/fast-foundation';
5
5
  import { SystemColors } from '@microsoft/fast-web-utilities';
6
- import { PaletteRGB } from '../color/palette';
7
6
  import { SwatchRGB } from '../color/swatch';
8
- import { accentFillActiveDelta, accentFillFocusDelta, accentFillHoverDelta, accentFillRestDelta, accentForegroundActiveDelta, accentForegroundFocusDelta, accentForegroundHoverDelta, accentForegroundRestDelta, accentPalette, baseHeightMultiplier, baseHorizontalSpacingMultiplier, baseLayerLuminance, controlCornerRadius, density, designUnit, direction, disabledOpacity, fillColor, focusStrokeWidth, neutralFillActiveDelta, neutralFillFocusDelta, neutralFillHoverDelta, neutralFillInputActiveDelta, neutralFillInputFocusDelta, neutralFillInputHoverDelta, neutralFillInputRestDelta, neutralFillLayerRestDelta, neutralFillRestDelta, neutralFillStealthActiveDelta, neutralFillStealthFocusDelta, neutralFillStealthHoverDelta, neutralFillStealthRestDelta, neutralFillStrongActiveDelta, neutralFillStrongFocusDelta, neutralFillStrongHoverDelta, neutralForegroundRest, neutralPalette, neutralStrokeActiveDelta, neutralStrokeDividerRestDelta, neutralStrokeFocusDelta, neutralStrokeHoverDelta, neutralStrokeRestDelta, strokeWidth, typeRampBaseFontSize, typeRampBaseLineHeight, typeRampMinus1FontSize, typeRampMinus1LineHeight, typeRampMinus2FontSize, typeRampMinus2LineHeight, typeRampPlus1FontSize, typeRampPlus1LineHeight, typeRampPlus2FontSize, typeRampPlus2LineHeight, typeRampPlus3FontSize, typeRampPlus3LineHeight, typeRampPlus4FontSize, typeRampPlus4LineHeight, typeRampPlus5FontSize, typeRampPlus5LineHeight, typeRampPlus6FontSize, typeRampPlus6LineHeight, } from '../design-tokens';
7
+ import { accentBaseColor, accentFillActiveDelta, accentFillFocusDelta, accentFillHoverDelta, accentFillRestDelta, accentForegroundActiveDelta, accentForegroundFocusDelta, accentForegroundHoverDelta, accentForegroundRestDelta, baseHeightMultiplier, baseHorizontalSpacingMultiplier, baseLayerLuminance, controlCornerRadius, density, designUnit, direction, disabledOpacity, fillColor, focusStrokeWidth, layerCornerRadius, neutralBaseColor, neutralFillActiveDelta, neutralFillFocusDelta, neutralFillHoverDelta, neutralFillInputActiveDelta, neutralFillInputFocusDelta, neutralFillInputHoverDelta, neutralFillInputRestDelta, neutralFillLayerRestDelta, neutralFillRestDelta, neutralFillStealthActiveDelta, neutralFillStealthFocusDelta, neutralFillStealthHoverDelta, neutralFillStealthRestDelta, neutralFillStrongActiveDelta, neutralFillStrongFocusDelta, neutralFillStrongHoverDelta, neutralForegroundRest, neutralStrokeActiveDelta, neutralStrokeDividerRestDelta, neutralStrokeFocusDelta, neutralStrokeHoverDelta, neutralStrokeRestDelta, strokeWidth, typeRampBaseFontSize, typeRampBaseLineHeight, typeRampMinus1FontSize, typeRampMinus1LineHeight, typeRampMinus2FontSize, typeRampMinus2LineHeight, typeRampPlus1FontSize, typeRampPlus1LineHeight, typeRampPlus2FontSize, typeRampPlus2LineHeight, typeRampPlus3FontSize, typeRampPlus3LineHeight, typeRampPlus4FontSize, typeRampPlus4LineHeight, typeRampPlus5FontSize, typeRampPlus5LineHeight, typeRampPlus6FontSize, typeRampPlus6LineHeight, } from '../design-tokens';
9
8
  /**
10
9
  * A {@link ValueConverter} that converts to and from `Swatch` values.
11
10
  * @remarks
@@ -69,42 +68,26 @@ export class DesignSystemProvider extends FoundationElement {
69
68
  * HTML boolean attribute: no-paint
70
69
  */
71
70
  this.noPaint = false;
72
- // If fillColor changes or is removed, we need to
71
+ // If fillColor or baseLayerLuminance change, we need to
73
72
  // re-evaluate whether we should have paint styles applied
74
- Observable.getNotifier(this).subscribe({
73
+ const subscriber = {
75
74
  handleChange: this.noPaintChanged.bind(this),
76
- }, 'fillColor');
75
+ };
76
+ Observable.getNotifier(this).subscribe(subscriber, 'fillColor');
77
+ Observable.getNotifier(this).subscribe(subscriber, 'baseLayerLuminance');
78
+ }
79
+ connectedCallback() {
80
+ super.connectedCallback();
81
+ this.noPaintChanged();
77
82
  }
78
83
  noPaintChanged() {
79
- if (!this.noPaint && this.fillColor !== void 0) {
84
+ if (!this.noPaint && (this.fillColor !== void 0 || this.baseLayerLuminance)) {
80
85
  this.$fastController.addStyles(backgroundStyles);
81
86
  }
82
87
  else {
83
88
  this.$fastController.removeStyles(backgroundStyles);
84
89
  }
85
90
  }
86
- /**
87
- * @internal
88
- */
89
- accentBaseColorChanged(prev, next) {
90
- if (next !== undefined && next !== null) {
91
- accentPalette.setValueFor(this, PaletteRGB.create(next));
92
- }
93
- else {
94
- accentPalette.deleteValueFor(this);
95
- }
96
- }
97
- /**
98
- * @internal
99
- */
100
- neutralBaseColorChanged(prev, next) {
101
- if (next !== undefined && next !== null) {
102
- neutralPalette.setValueFor(this, PaletteRGB.create(next));
103
- }
104
- else {
105
- neutralPalette.deleteValueFor(this);
106
- }
107
- }
108
91
  }
109
92
  __decorate([
110
93
  attr({ attribute: 'no-paint', mode: 'boolean' })
@@ -113,6 +96,7 @@ __decorate([
113
96
  attr({
114
97
  attribute: 'fill-color',
115
98
  converter: swatchConverter,
99
+ mode: 'fromView',
116
100
  }),
117
101
  designToken(fillColor)
118
102
  ], DesignSystemProvider.prototype, "fillColor", void 0);
@@ -121,23 +105,17 @@ __decorate([
121
105
  attribute: 'accent-base-color',
122
106
  converter: swatchConverter,
123
107
  mode: 'fromView',
124
- })
108
+ }),
109
+ designToken(accentBaseColor)
125
110
  ], DesignSystemProvider.prototype, "accentBaseColor", void 0);
126
111
  __decorate([
127
112
  attr({
128
113
  attribute: 'neutral-base-color',
129
114
  converter: swatchConverter,
130
115
  mode: 'fromView',
131
- })
116
+ }),
117
+ designToken(neutralBaseColor)
132
118
  ], DesignSystemProvider.prototype, "neutralBaseColor", void 0);
133
- __decorate([
134
- observable,
135
- designToken(neutralPalette)
136
- ], DesignSystemProvider.prototype, "neutralPalette", void 0);
137
- __decorate([
138
- observable,
139
- designToken(accentPalette)
140
- ], DesignSystemProvider.prototype, "accentPalette", void 0);
141
119
  __decorate([
142
120
  attr({
143
121
  converter: nullableNumberConverter,
@@ -178,6 +156,13 @@ __decorate([
178
156
  }),
179
157
  designToken(controlCornerRadius)
180
158
  ], DesignSystemProvider.prototype, "controlCornerRadius", void 0);
159
+ __decorate([
160
+ attr({
161
+ attribute: 'layer-corner-radius',
162
+ converter: nullableNumberConverter,
163
+ }),
164
+ designToken(layerCornerRadius)
165
+ ], DesignSystemProvider.prototype, "layerCornerRadius", void 0);
181
166
  __decorate([
182
167
  attr({
183
168
  attribute: 'stroke-width',