@fluentui/web-components 3.0.0-alpha.6 → 3.0.0-alpha.8

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 (95) hide show
  1. package/CHANGELOG.json +51 -1
  2. package/CHANGELOG.md +22 -2
  3. package/dist/dts/accordion-item/accordion-item.d.ts +2 -2
  4. package/dist/dts/avatar/avatar.d.ts +97 -0
  5. package/dist/dts/avatar/avatar.definition.d.ts +9 -0
  6. package/dist/dts/avatar/avatar.options.d.ts +142 -0
  7. package/dist/dts/avatar/avatar.styles.d.ts +4 -0
  8. package/dist/dts/avatar/avatar.template.d.ts +8 -0
  9. package/dist/dts/avatar/define.d.ts +1 -0
  10. package/dist/dts/avatar/index.d.ts +5 -0
  11. package/dist/dts/badge/badge.d.ts +2 -2
  12. package/dist/dts/counter-badge/counter-badge.d.ts +4 -4
  13. package/dist/dts/divider/define.d.ts +1 -0
  14. package/dist/dts/divider/divider.d.ts +31 -0
  15. package/dist/dts/divider/divider.definition.d.ts +9 -0
  16. package/dist/dts/divider/divider.options.d.ts +40 -0
  17. package/dist/dts/divider/divider.styles.d.ts +4 -0
  18. package/dist/dts/divider/divider.template.d.ts +7 -0
  19. package/dist/dts/divider/index.d.ts +5 -0
  20. package/dist/dts/image/define.d.ts +1 -0
  21. package/dist/dts/image/image.d.ts +48 -0
  22. package/dist/dts/image/image.definition.d.ts +9 -0
  23. package/dist/dts/image/image.options.d.ts +27 -0
  24. package/dist/dts/image/image.styles.d.ts +5 -0
  25. package/dist/dts/image/image.template.d.ts +7 -0
  26. package/dist/dts/image/index.d.ts +5 -0
  27. package/dist/dts/index.d.ts +3 -0
  28. package/dist/dts/progress-bar/progress-bar.d.ts +2 -2
  29. package/dist/dts/spinner/spinner.d.ts +2 -2
  30. package/dist/dts/text/text.d.ts +4 -4
  31. package/dist/dts/theme/design-tokens.d.ts +5 -0
  32. package/dist/dts/utils/get-initials.d.ts +18 -0
  33. package/dist/esm/accordion-item/accordion-item.js.map +1 -1
  34. package/dist/esm/avatar/avatar.definition.js +17 -0
  35. package/dist/esm/avatar/avatar.definition.js.map +1 -0
  36. package/dist/esm/avatar/avatar.js +92 -0
  37. package/dist/esm/avatar/avatar.js.map +1 -0
  38. package/dist/esm/avatar/avatar.options.js +87 -0
  39. package/dist/esm/avatar/avatar.options.js.map +1 -0
  40. package/dist/esm/avatar/avatar.styles.js +476 -0
  41. package/dist/esm/avatar/avatar.styles.js.map +1 -0
  42. package/dist/esm/avatar/avatar.template.js +28 -0
  43. package/dist/esm/avatar/avatar.template.js.map +1 -0
  44. package/dist/esm/avatar/define.js +4 -0
  45. package/dist/esm/avatar/define.js.map +1 -0
  46. package/dist/esm/avatar/index.js +6 -0
  47. package/dist/esm/avatar/index.js.map +1 -0
  48. package/dist/esm/badge/badge.js.map +1 -1
  49. package/dist/esm/counter-badge/counter-badge.js.map +1 -1
  50. package/dist/esm/counter-badge/counter-badge.template.js.map +1 -1
  51. package/dist/esm/divider/define.js +4 -0
  52. package/dist/esm/divider/define.js.map +1 -0
  53. package/dist/esm/divider/divider.definition.js +17 -0
  54. package/dist/esm/divider/divider.definition.js.map +1 -0
  55. package/dist/esm/divider/divider.js +21 -0
  56. package/dist/esm/divider/divider.js.map +1 -0
  57. package/dist/esm/divider/divider.options.js +31 -0
  58. package/dist/esm/divider/divider.options.js.map +1 -0
  59. package/dist/esm/divider/divider.styles.js +111 -0
  60. package/dist/esm/divider/divider.styles.js.map +1 -0
  61. package/dist/esm/divider/divider.template.js +7 -0
  62. package/dist/esm/divider/divider.template.js.map +1 -0
  63. package/dist/esm/divider/index.js +6 -0
  64. package/dist/esm/divider/index.js.map +1 -0
  65. package/dist/esm/image/define.js +4 -0
  66. package/dist/esm/image/define.js.map +1 -0
  67. package/dist/esm/image/image.definition.js +17 -0
  68. package/dist/esm/image/image.definition.js.map +1 -0
  69. package/dist/esm/image/image.js +24 -0
  70. package/dist/esm/image/image.js.map +1 -0
  71. package/dist/esm/image/image.options.js +21 -0
  72. package/dist/esm/image/image.options.js.map +1 -0
  73. package/dist/esm/image/image.styles.js +52 -0
  74. package/dist/esm/image/image.styles.js.map +1 -0
  75. package/dist/esm/image/image.template.js +7 -0
  76. package/dist/esm/image/image.template.js.map +1 -0
  77. package/dist/esm/image/index.js +6 -0
  78. package/dist/esm/image/index.js.map +1 -0
  79. package/dist/esm/index.js +3 -0
  80. package/dist/esm/index.js.map +1 -1
  81. package/dist/esm/progress-bar/progress-bar.js +10 -0
  82. package/dist/esm/progress-bar/progress-bar.js.map +1 -1
  83. package/dist/esm/spinner/spinner.js.map +1 -1
  84. package/dist/esm/text/text.js.map +1 -1
  85. package/dist/esm/theme/design-tokens.js +5 -0
  86. package/dist/esm/theme/design-tokens.js.map +1 -1
  87. package/dist/esm/theme/set-theme.js.map +1 -1
  88. package/dist/esm/utils/get-initials.js +83 -0
  89. package/dist/esm/utils/get-initials.js.map +1 -0
  90. package/dist/fluent-web-components.api.json +3550 -1863
  91. package/dist/web-components.d.ts +480 -16
  92. package/dist/web-components.js +516 -20
  93. package/dist/web-components.min.js +123 -118
  94. package/docs/api-report.md +268 -16
  95. package/package.json +13 -1
@@ -5,10 +5,13 @@
5
5
  ```ts
6
6
 
7
7
  import { CSSDesignToken } from '@microsoft/fast-foundation';
8
+ import { DividerOrientation } from '@microsoft/fast-foundation';
9
+ import { DividerRole } from '@microsoft/fast-foundation';
8
10
  import { ElementStyles } from '@microsoft/fast-element';
9
11
  import { ElementViewTemplate } from '@microsoft/fast-element';
10
12
  import { FASTAccordion } from '@microsoft/fast-foundation';
11
13
  import { FASTAccordionItem } from '@microsoft/fast-foundation';
14
+ import { FASTDivider } from '@microsoft/fast-foundation';
12
15
  import { FASTElement } from '@microsoft/fast-element';
13
16
  import { FASTElementDefinition } from '@microsoft/fast-element';
14
17
  import { FASTProgress } from '@microsoft/fast-foundation';
@@ -34,9 +37,9 @@ export class AccordionItem extends FASTAccordionItem {
34
37
  // @public
35
38
  block: boolean;
36
39
  // @public
37
- expandIconPosition: AccordionItemExpandIconPosition;
40
+ expandIconPosition?: AccordionItemExpandIconPosition;
38
41
  // @public
39
- size: AccordionItemSize;
42
+ size?: AccordionItemSize;
40
43
  }
41
44
 
42
45
  // Warning: (ae-incompatible-release-tags) The symbol "definition" is marked as @public, but its signature references "AccordionItem" which is marked as @internal
@@ -78,14 +81,166 @@ export const accordionStyles: ElementStyles;
78
81
  // @public (undocumented)
79
82
  export const accordionTemplate: ElementViewTemplate<Accordion>;
80
83
 
84
+ // @public
85
+ export class Avatar extends FASTElement {
86
+ active?: AvatarActive | undefined;
87
+ appearance?: AvatarAppearance | undefined;
88
+ color?: AvatarColor;
89
+ colorId?: AvatarNamedColor | undefined;
90
+ static colors: ("anchor" | "dark-red" | "cranberry" | "red" | "pumpkin" | "peach" | "marigold" | "gold" | "brass" | "brown" | "forest" | "seafoam" | "dark-green" | "light-teal" | "teal" | "steel" | "blue" | "royal-blue" | "cornflower" | "navy" | "lavender" | "purple" | "grape" | "lilac" | "pink" | "magenta" | "plum" | "beige" | "mink" | "platinum")[];
91
+ // @internal
92
+ generateColor(): AvatarColor | void;
93
+ // @internal
94
+ generateInitials(): string | void;
95
+ initials?: string | undefined;
96
+ name?: string | undefined;
97
+ shape?: AvatarShape | undefined;
98
+ size?: AvatarSize | undefined;
99
+ }
100
+
101
+ // @public
102
+ export const AvatarActive: {
103
+ readonly active: "active";
104
+ readonly inactive: "inactive";
105
+ };
106
+
107
+ // @public
108
+ export type AvatarActive = ValuesOf<typeof AvatarActive>;
109
+
110
+ // @public
111
+ export const AvatarAppearance: {
112
+ readonly ring: "ring";
113
+ readonly shadow: "shadow";
114
+ readonly ringShadow: "ring-shadow";
115
+ };
116
+
117
+ // @public
118
+ export type AvatarAppearance = ValuesOf<typeof AvatarAppearance>;
119
+
120
+ // @public
121
+ export const AvatarColor: {
122
+ readonly darkRed: "dark-red";
123
+ readonly cranberry: "cranberry";
124
+ readonly red: "red";
125
+ readonly pumpkin: "pumpkin";
126
+ readonly peach: "peach";
127
+ readonly marigold: "marigold";
128
+ readonly gold: "gold";
129
+ readonly brass: "brass";
130
+ readonly brown: "brown";
131
+ readonly forest: "forest";
132
+ readonly seafoam: "seafoam";
133
+ readonly darkGreen: "dark-green";
134
+ readonly lightTeal: "light-teal";
135
+ readonly teal: "teal";
136
+ readonly steel: "steel";
137
+ readonly blue: "blue";
138
+ readonly royalBlue: "royal-blue";
139
+ readonly cornflower: "cornflower";
140
+ readonly navy: "navy";
141
+ readonly lavender: "lavender";
142
+ readonly purple: "purple";
143
+ readonly grape: "grape";
144
+ readonly lilac: "lilac";
145
+ readonly pink: "pink";
146
+ readonly magenta: "magenta";
147
+ readonly plum: "plum";
148
+ readonly beige: "beige";
149
+ readonly mink: "mink";
150
+ readonly platinum: "platinum";
151
+ readonly anchor: "anchor";
152
+ readonly neutral: "neutral";
153
+ readonly brand: "brand";
154
+ readonly colorful: "colorful";
155
+ };
156
+
157
+ // @public
158
+ export type AvatarColor = ValuesOf<typeof AvatarColor>;
159
+
160
+ // @public
161
+ export const AvatarDefinition: FASTElementDefinition<typeof Avatar>;
162
+
163
+ // @public
164
+ export const AvatarNamedColor: {
165
+ readonly darkRed: "dark-red";
166
+ readonly cranberry: "cranberry";
167
+ readonly red: "red";
168
+ readonly pumpkin: "pumpkin";
169
+ readonly peach: "peach";
170
+ readonly marigold: "marigold";
171
+ readonly gold: "gold";
172
+ readonly brass: "brass";
173
+ readonly brown: "brown";
174
+ readonly forest: "forest";
175
+ readonly seafoam: "seafoam";
176
+ readonly darkGreen: "dark-green";
177
+ readonly lightTeal: "light-teal";
178
+ readonly teal: "teal";
179
+ readonly steel: "steel";
180
+ readonly blue: "blue";
181
+ readonly royalBlue: "royal-blue";
182
+ readonly cornflower: "cornflower";
183
+ readonly navy: "navy";
184
+ readonly lavender: "lavender";
185
+ readonly purple: "purple";
186
+ readonly grape: "grape";
187
+ readonly lilac: "lilac";
188
+ readonly pink: "pink";
189
+ readonly magenta: "magenta";
190
+ readonly plum: "plum";
191
+ readonly beige: "beige";
192
+ readonly mink: "mink";
193
+ readonly platinum: "platinum";
194
+ readonly anchor: "anchor";
195
+ };
196
+
197
+ // @public
198
+ export type AvatarNamedColor = ValuesOf<typeof AvatarNamedColor>;
199
+
200
+ // @public
201
+ export const AvatarShape: {
202
+ readonly circular: "circular";
203
+ readonly square: "square";
204
+ };
205
+
206
+ // @public
207
+ export type AvatarShape = ValuesOf<typeof AvatarShape>;
208
+
209
+ // @public
210
+ export const AvatarSize: {
211
+ readonly _16: 16;
212
+ readonly _20: 20;
213
+ readonly _24: 24;
214
+ readonly _28: 28;
215
+ readonly _32: 32;
216
+ readonly _36: 36;
217
+ readonly _40: 40;
218
+ readonly _48: 48;
219
+ readonly _56: 56;
220
+ readonly _64: 64;
221
+ readonly _72: 72;
222
+ readonly _96: 96;
223
+ readonly _120: 120;
224
+ readonly _128: 128;
225
+ };
226
+
227
+ // @public
228
+ export type AvatarSize = ValuesOf<typeof AvatarSize>;
229
+
230
+ // @public
231
+ export const AvatarStyles: ElementStyles;
232
+
233
+ // @public (undocumented)
234
+ export const AvatarTemplate: ElementViewTemplate<Avatar>;
235
+
81
236
  // Warning: (ae-internal-mixed-release-tag) Mixed release tags are not allowed for "Badge" because one of its declarations is marked as @internal
82
237
  //
83
238
  // @public
84
239
  export class Badge extends FASTElement {
85
240
  appearance: BadgeAppearance;
86
241
  color: BadgeColor;
87
- shape: BadgeShape;
88
- size: BadgeSize;
242
+ shape?: BadgeShape;
243
+ size?: BadgeSize;
89
244
  }
90
245
 
91
246
  // @internal
@@ -493,9 +648,15 @@ export const colorNeutralShadowKeyLighter: CSSDesignToken<string>;
493
648
  // @public (undocumented)
494
649
  export const colorNeutralStencil1: CSSDesignToken<string>;
495
650
 
651
+ // @public (undocumented)
652
+ export const colorNeutralStencil1Alpha: CSSDesignToken<string>;
653
+
496
654
  // @public (undocumented)
497
655
  export const colorNeutralStencil2: CSSDesignToken<string>;
498
656
 
657
+ // @public (undocumented)
658
+ export const colorNeutralStencil2Alpha: CSSDesignToken<string>;
659
+
499
660
  // @public (undocumented)
500
661
  export const colorNeutralStroke1: CSSDesignToken<string>;
501
662
 
@@ -736,6 +897,9 @@ export const colorPaletteGreenForeground2: CSSDesignToken<string>;
736
897
  // @public (undocumented)
737
898
  export const colorPaletteGreenForeground3: CSSDesignToken<string>;
738
899
 
900
+ // @public (undocumented)
901
+ export const colorPaletteGreenForegroundInverted: CSSDesignToken<string>;
902
+
739
903
  // @public (undocumented)
740
904
  export const colorPaletteLavenderBackground2: CSSDesignToken<string>;
741
905
 
@@ -925,6 +1089,9 @@ export const colorPaletteRedForeground2: CSSDesignToken<string>;
925
1089
  // @public (undocumented)
926
1090
  export const colorPaletteRedForeground3: CSSDesignToken<string>;
927
1091
 
1092
+ // @public (undocumented)
1093
+ export const colorPaletteRedForegroundInverted: CSSDesignToken<string>;
1094
+
928
1095
  // @public (undocumented)
929
1096
  export const colorPaletteRoyalBlueBackground2: CSSDesignToken<string>;
930
1097
 
@@ -988,6 +1155,9 @@ export const colorPaletteYellowForeground2: CSSDesignToken<string>;
988
1155
  // @public (undocumented)
989
1156
  export const colorPaletteYellowForeground3: CSSDesignToken<string>;
990
1157
 
1158
+ // @public (undocumented)
1159
+ export const colorPaletteYellowForegroundInverted: CSSDesignToken<string>;
1160
+
991
1161
  // @public (undocumented)
992
1162
  export const colorScrollbarOverlay: CSSDesignToken<string>;
993
1163
 
@@ -1055,8 +1225,8 @@ export const colorTransparentStrokeInteractive: CSSDesignToken<string>;
1055
1225
  //
1056
1226
  // @public
1057
1227
  export class CounterBadge extends FASTElement {
1058
- appearance: CounterBadgeAppearance;
1059
- color: CounterBadgeColor;
1228
+ appearance?: CounterBadgeAppearance;
1229
+ color?: CounterBadgeColor;
1060
1230
  count: number;
1061
1231
  // (undocumented)
1062
1232
  protected countChanged(): void;
@@ -1066,9 +1236,9 @@ export class CounterBadge extends FASTElement {
1066
1236
  protected overflowCountChanged(): void;
1067
1237
  // @internal
1068
1238
  setCount(): string | void;
1069
- shape: CounterBadgeShape;
1239
+ shape?: CounterBadgeShape;
1070
1240
  showZero: boolean;
1071
- size: CounterBadgeSize;
1241
+ size?: CounterBadgeSize;
1072
1242
  }
1073
1243
 
1074
1244
  // @internal
@@ -1165,6 +1335,47 @@ export const curveLinear: CSSDesignToken<string>;
1165
1335
  // @public
1166
1336
  export const definition: FASTElementDefinition<typeof Switch>;
1167
1337
 
1338
+ // @public
1339
+ export class Divider extends FASTDivider {
1340
+ alignContent?: DividerAlignContent;
1341
+ appearance?: DividerAppearance;
1342
+ inset?: boolean;
1343
+ }
1344
+
1345
+ // @public
1346
+ export const DividerAlignContent: {
1347
+ readonly center: "center";
1348
+ readonly start: "start";
1349
+ readonly end: "end";
1350
+ };
1351
+
1352
+ // @public
1353
+ export type DividerAlignContent = ValuesOf<typeof DividerAlignContent>;
1354
+
1355
+ // @public
1356
+ export const DividerAppearance: {
1357
+ readonly strong: "strong";
1358
+ readonly brand: "brand";
1359
+ readonly subtle: "subtle";
1360
+ readonly default: "default";
1361
+ };
1362
+
1363
+ // @public
1364
+ export type DividerAppearance = ValuesOf<typeof DividerAppearance>;
1365
+
1366
+ // @public
1367
+ export const DividerDefinition: FASTElementDefinition<typeof Divider>;
1368
+
1369
+ export { DividerOrientation }
1370
+
1371
+ export { DividerRole }
1372
+
1373
+ // @public
1374
+ export const DividerStyles: ElementStyles;
1375
+
1376
+ // @public
1377
+ export const DividerTemplate: ElementViewTemplate<Divider>;
1378
+
1168
1379
  // @public (undocumented)
1169
1380
  export const durationFast: CSSDesignToken<string>;
1170
1381
 
@@ -1237,6 +1448,47 @@ export const fontWeightRegular: CSSDesignToken<string>;
1237
1448
  // @public (undocumented)
1238
1449
  export const fontWeightSemibold: CSSDesignToken<string>;
1239
1450
 
1451
+ // @public
1452
+ class Image_2 extends FASTElement {
1453
+ block?: boolean;
1454
+ bordered?: boolean;
1455
+ fit?: ImageFit;
1456
+ shadow?: boolean;
1457
+ shape?: ImageShape;
1458
+ }
1459
+ export { Image_2 as Image }
1460
+
1461
+ // @public
1462
+ export const ImageDefinition: FASTElementDefinition<typeof Image_2>;
1463
+
1464
+ // @public
1465
+ export const ImageFit: {
1466
+ readonly none: "none";
1467
+ readonly center: "center";
1468
+ readonly contain: "contain";
1469
+ readonly cover: "cover";
1470
+ readonly default: "default";
1471
+ };
1472
+
1473
+ // @public
1474
+ export type ImageFit = ValuesOf<typeof ImageFit>;
1475
+
1476
+ // @public
1477
+ export const ImageShape: {
1478
+ readonly circular: "circular";
1479
+ readonly rounded: "rounded";
1480
+ readonly square: "square";
1481
+ };
1482
+
1483
+ // @public (undocumented)
1484
+ export type ImageShape = ValuesOf<typeof ImageShape>;
1485
+
1486
+ // @public
1487
+ export const ImageStyles: ElementStyles;
1488
+
1489
+ // @public
1490
+ export const ImageTemplate: ElementViewTemplate<Image_2>;
1491
+
1240
1492
  // @public (undocumented)
1241
1493
  export const lineHeightBase100: CSSDesignToken<string>;
1242
1494
 
@@ -1269,8 +1521,8 @@ export const lineHeightHero900: CSSDesignToken<string>;
1269
1521
 
1270
1522
  // @public
1271
1523
  class ProgressBar_2 extends FASTProgress {
1272
- shape: ProgressBarShape;
1273
- thickness: ProgressBarThickness;
1524
+ shape?: ProgressBarShape;
1525
+ thickness?: ProgressBarThickness;
1274
1526
  validationState: ProgressBarValidationState | null;
1275
1527
  }
1276
1528
  export { ProgressBar_2 as ProgressBar }
@@ -1419,8 +1671,8 @@ export const spacingVerticalXXXL: CSSDesignToken<string>;
1419
1671
 
1420
1672
  // @public
1421
1673
  export class Spinner extends FASTProgressRing {
1422
- appearance: SpinnerAppearance;
1423
- size: SpinnerSize;
1674
+ appearance?: SpinnerAppearance;
1675
+ size?: SpinnerSize;
1424
1676
  }
1425
1677
 
1426
1678
  // @public
@@ -1490,16 +1742,16 @@ export const switchTemplate: ElementViewTemplate<Switch>;
1490
1742
 
1491
1743
  // @public
1492
1744
  class Text_2 extends FASTElement {
1493
- align: TextAlign;
1745
+ align?: TextAlign;
1494
1746
  block: boolean;
1495
- font: TextFont;
1747
+ font?: TextFont;
1496
1748
  italic: boolean;
1497
1749
  nowrap: boolean;
1498
- size: TextSize;
1750
+ size?: TextSize;
1499
1751
  strikethrough: boolean;
1500
1752
  truncate: boolean;
1501
1753
  underline: boolean;
1502
- weight: TextWeight;
1754
+ weight?: TextWeight;
1503
1755
  }
1504
1756
  export { Text_2 as Text }
1505
1757
 
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": "3.0.0-alpha.6",
5
+ "version": "3.0.0-alpha.8",
6
6
  "author": {
7
7
  "name": "Microsoft",
8
8
  "url": "https://discord.gg/FcSNfg4"
@@ -32,6 +32,10 @@
32
32
  "types": "./dist/esm/accordion-item/define.d.ts",
33
33
  "default": "./dist/esm/accordion-item/define.js"
34
34
  },
35
+ "./avatar": {
36
+ "types": "./dist/esm/avatar/define.d.ts",
37
+ "default": "./dist/esm/avatar/define.js"
38
+ },
35
39
  "./badge": {
36
40
  "types": "./dist/esm/badge/define.d.ts",
37
41
  "default": "./dist/esm/badge/define.js"
@@ -40,6 +44,14 @@
40
44
  "types": "./dist/esm/counter-badge/define.d.ts",
41
45
  "default": "./dist/esm/counter-badge/define.js"
42
46
  },
47
+ "./divider": {
48
+ "types": "./dist/esm/divider/define.d.ts",
49
+ "default": "./dist/esm/divider/define.js"
50
+ },
51
+ "./image": {
52
+ "types": "./dist/esm/image/define.d.ts",
53
+ "default": "./dist/esm/image/define.js"
54
+ },
43
55
  "./text": {
44
56
  "types": "./dist/esm/text/define.d.ts",
45
57
  "default": "./dist/esm/text/define.js"