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

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 (77) hide show
  1. package/CHANGELOG.json +28 -1
  2. package/CHANGELOG.md +13 -2
  3. package/dist/dts/avatar/avatar.d.ts +97 -0
  4. package/dist/dts/avatar/avatar.definition.d.ts +9 -0
  5. package/dist/dts/avatar/avatar.options.d.ts +142 -0
  6. package/dist/dts/avatar/avatar.styles.d.ts +4 -0
  7. package/dist/dts/avatar/avatar.template.d.ts +8 -0
  8. package/dist/dts/avatar/define.d.ts +1 -0
  9. package/dist/dts/avatar/index.d.ts +5 -0
  10. package/dist/dts/divider/define.d.ts +1 -0
  11. package/dist/dts/divider/divider.d.ts +31 -0
  12. package/dist/dts/divider/divider.definition.d.ts +9 -0
  13. package/dist/dts/divider/divider.options.d.ts +40 -0
  14. package/dist/dts/divider/divider.styles.d.ts +4 -0
  15. package/dist/dts/divider/divider.template.d.ts +7 -0
  16. package/dist/dts/divider/index.d.ts +5 -0
  17. package/dist/dts/image/define.d.ts +1 -0
  18. package/dist/dts/image/image.d.ts +48 -0
  19. package/dist/dts/image/image.definition.d.ts +9 -0
  20. package/dist/dts/image/image.options.d.ts +27 -0
  21. package/dist/dts/image/image.styles.d.ts +5 -0
  22. package/dist/dts/image/image.template.d.ts +7 -0
  23. package/dist/dts/image/index.d.ts +5 -0
  24. package/dist/dts/index.d.ts +3 -0
  25. package/dist/dts/utils/get-initials.d.ts +18 -0
  26. package/dist/esm/avatar/avatar.definition.js +17 -0
  27. package/dist/esm/avatar/avatar.definition.js.map +1 -0
  28. package/dist/esm/avatar/avatar.js +92 -0
  29. package/dist/esm/avatar/avatar.js.map +1 -0
  30. package/dist/esm/avatar/avatar.options.js +87 -0
  31. package/dist/esm/avatar/avatar.options.js.map +1 -0
  32. package/dist/esm/avatar/avatar.styles.js +476 -0
  33. package/dist/esm/avatar/avatar.styles.js.map +1 -0
  34. package/dist/esm/avatar/avatar.template.js +28 -0
  35. package/dist/esm/avatar/avatar.template.js.map +1 -0
  36. package/dist/esm/avatar/define.js +4 -0
  37. package/dist/esm/avatar/define.js.map +1 -0
  38. package/dist/esm/avatar/index.js +6 -0
  39. package/dist/esm/avatar/index.js.map +1 -0
  40. package/dist/esm/divider/define.js +4 -0
  41. package/dist/esm/divider/define.js.map +1 -0
  42. package/dist/esm/divider/divider.definition.js +17 -0
  43. package/dist/esm/divider/divider.definition.js.map +1 -0
  44. package/dist/esm/divider/divider.js +21 -0
  45. package/dist/esm/divider/divider.js.map +1 -0
  46. package/dist/esm/divider/divider.options.js +31 -0
  47. package/dist/esm/divider/divider.options.js.map +1 -0
  48. package/dist/esm/divider/divider.styles.js +111 -0
  49. package/dist/esm/divider/divider.styles.js.map +1 -0
  50. package/dist/esm/divider/divider.template.js +7 -0
  51. package/dist/esm/divider/divider.template.js.map +1 -0
  52. package/dist/esm/divider/index.js +6 -0
  53. package/dist/esm/divider/index.js.map +1 -0
  54. package/dist/esm/image/define.js +4 -0
  55. package/dist/esm/image/define.js.map +1 -0
  56. package/dist/esm/image/image.definition.js +17 -0
  57. package/dist/esm/image/image.definition.js.map +1 -0
  58. package/dist/esm/image/image.js +24 -0
  59. package/dist/esm/image/image.js.map +1 -0
  60. package/dist/esm/image/image.options.js +21 -0
  61. package/dist/esm/image/image.options.js.map +1 -0
  62. package/dist/esm/image/image.styles.js +52 -0
  63. package/dist/esm/image/image.styles.js.map +1 -0
  64. package/dist/esm/image/image.template.js +7 -0
  65. package/dist/esm/image/image.template.js.map +1 -0
  66. package/dist/esm/image/index.js +6 -0
  67. package/dist/esm/image/index.js.map +1 -0
  68. package/dist/esm/index.js +3 -0
  69. package/dist/esm/index.js.map +1 -1
  70. package/dist/esm/utils/get-initials.js +83 -0
  71. package/dist/esm/utils/get-initials.js.map +1 -0
  72. package/dist/fluent-web-components.api.json +3379 -1847
  73. package/dist/web-components.d.ts +454 -0
  74. package/dist/web-components.js +494 -19
  75. package/dist/web-components.min.js +123 -118
  76. package/docs/api-report.md +237 -0
  77. package/package.json +13 -1
@@ -0,0 +1,92 @@
1
+ import { __decorate } from "tslib";
2
+ import { attr, FASTElement, nullableNumberConverter } from '@microsoft/fast-element';
3
+ import { getInitials } from '../utils/get-initials.js';
4
+ import { AvatarColor, AvatarNamedColor, } from './avatar.options.js';
5
+ /**
6
+ * The base class used for constructing a fluent-avatar custom element
7
+ * @public
8
+ */
9
+ export class Avatar extends FASTElement {
10
+ constructor() {
11
+ super(...arguments);
12
+ /**
13
+ * The color when displaying either an icon or initials.
14
+ * * neutral (default): gray
15
+ * * brand: color from the brand palette
16
+ * * colorful: picks a color from a set of pre-defined colors, based on a hash of the name (or colorId if provided)
17
+ * * [AvatarNamedColor]: a specific color from the theme
18
+ *
19
+ * @public
20
+ * @remarks
21
+ * HTML Attribute: color
22
+ */
23
+ this.color = 'neutral';
24
+ }
25
+ /**
26
+ * Sets the data-color attribute used for the visual presentation
27
+ * @internal
28
+ */
29
+ generateColor() {
30
+ var _a, _b;
31
+ if (!this.color) {
32
+ return;
33
+ }
34
+ return this.color === AvatarColor.colorful
35
+ ? Avatar.colors[getHashCode((_b = (_a = this.colorId) !== null && _a !== void 0 ? _a : this.name) !== null && _b !== void 0 ? _b : '') % Avatar.colors.length]
36
+ : this.color;
37
+ }
38
+ /**
39
+ * Generates and sets the initials for the template
40
+ * @internal
41
+ */
42
+ generateInitials() {
43
+ var _a, _b;
44
+ if (!this.name && !this.initials) {
45
+ return;
46
+ }
47
+ // size can be undefined since we default it in CSS only
48
+ const size = (_a = this.size) !== null && _a !== void 0 ? _a : 32;
49
+ return ((_b = this.initials) !== null && _b !== void 0 ? _b : getInitials(this.name, window.getComputedStyle(this).direction === 'rtl', {
50
+ firstInitialOnly: size <= 16,
51
+ }));
52
+ }
53
+ }
54
+ /**
55
+ * An array of the available Avatar named colors
56
+ */
57
+ Avatar.colors = Object.values(AvatarNamedColor);
58
+ __decorate([
59
+ attr
60
+ ], Avatar.prototype, "name", void 0);
61
+ __decorate([
62
+ attr
63
+ ], Avatar.prototype, "initials", void 0);
64
+ __decorate([
65
+ attr({ converter: nullableNumberConverter })
66
+ ], Avatar.prototype, "size", void 0);
67
+ __decorate([
68
+ attr
69
+ ], Avatar.prototype, "shape", void 0);
70
+ __decorate([
71
+ attr
72
+ ], Avatar.prototype, "active", void 0);
73
+ __decorate([
74
+ attr
75
+ ], Avatar.prototype, "appearance", void 0);
76
+ __decorate([
77
+ attr
78
+ ], Avatar.prototype, "color", void 0);
79
+ __decorate([
80
+ attr({ attribute: 'color-id' })
81
+ ], Avatar.prototype, "colorId", void 0);
82
+ // copied from React avatar
83
+ const getHashCode = (str) => {
84
+ let hashCode = 0;
85
+ for (let len = str.length - 1; len >= 0; len--) {
86
+ const ch = str.charCodeAt(len);
87
+ const shift = len % 8;
88
+ hashCode ^= (ch << shift) + (ch >> (8 - shift)); // eslint-disable-line no-bitwise
89
+ }
90
+ return hashCode;
91
+ };
92
+ //# sourceMappingURL=avatar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"avatar.js","sourceRoot":"","sources":["../../../src/avatar/avatar.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AACrF,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAGL,WAAW,EACX,gBAAgB,GAGjB,MAAM,qBAAqB,CAAC;AAE7B;;;GAGG;AACH,MAAM,OAAO,MAAO,SAAQ,WAAW;IAAvC;;QAuEE;;;;;;;;;;WAUG;QAEI,UAAK,GAAiB,SAAS,CAAC;IA+CzC,CAAC;IAtCC;;;OAGG;IACI,aAAa;;QAClB,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;YACf,OAAO;SACR;QAED,OAAO,IAAI,CAAC,KAAK,KAAK,WAAW,CAAC,QAAQ;YACxC,CAAC,CAAE,MAAM,CA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AG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QAC/B,MAAM,KAAK,GAAG,GAAG,GAAG,CAAC,CAAC;QACtB,QAAQ,IAAI,CAAC,EAAE,IAAI,KAAK,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,iCAAiC;KACnF;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC"}
@@ -0,0 +1,87 @@
1
+ /**
2
+ * The Avatar "active" state
3
+ */
4
+ export const AvatarActive = {
5
+ active: 'active',
6
+ inactive: 'inactive',
7
+ };
8
+ /**
9
+ * The Avatar Shape
10
+ */
11
+ export const AvatarShape = {
12
+ circular: 'circular',
13
+ square: 'square',
14
+ };
15
+ /**
16
+ * The Avatar Appearance when "active"
17
+ */
18
+ export const AvatarAppearance = {
19
+ ring: 'ring',
20
+ shadow: 'shadow',
21
+ ringShadow: 'ring-shadow',
22
+ };
23
+ /**
24
+ * A specific named color for the Avatar
25
+ */
26
+ export const AvatarNamedColor = {
27
+ darkRed: 'dark-red',
28
+ cranberry: 'cranberry',
29
+ red: 'red',
30
+ pumpkin: 'pumpkin',
31
+ peach: 'peach',
32
+ marigold: 'marigold',
33
+ gold: 'gold',
34
+ brass: 'brass',
35
+ brown: 'brown',
36
+ forest: 'forest',
37
+ seafoam: 'seafoam',
38
+ darkGreen: 'dark-green',
39
+ lightTeal: 'light-teal',
40
+ teal: 'teal',
41
+ steel: 'steel',
42
+ blue: 'blue',
43
+ royalBlue: 'royal-blue',
44
+ cornflower: 'cornflower',
45
+ navy: 'navy',
46
+ lavender: 'lavender',
47
+ purple: 'purple',
48
+ grape: 'grape',
49
+ lilac: 'lilac',
50
+ pink: 'pink',
51
+ magenta: 'magenta',
52
+ plum: 'plum',
53
+ beige: 'beige',
54
+ mink: 'mink',
55
+ platinum: 'platinum',
56
+ anchor: 'anchor',
57
+ };
58
+ /**
59
+ * Supported Avatar colors
60
+ */
61
+ export const AvatarColor = {
62
+ neutral: 'neutral',
63
+ brand: 'brand',
64
+ colorful: 'colorful',
65
+ ...AvatarNamedColor,
66
+ };
67
+ /**
68
+ * The Avatar Sizes
69
+ * @public
70
+ */
71
+ export const AvatarSize = {
72
+ _16: 16,
73
+ _20: 20,
74
+ _24: 24,
75
+ _28: 28,
76
+ _32: 32,
77
+ _36: 36,
78
+ _40: 40,
79
+ _48: 48,
80
+ _56: 56,
81
+ _64: 64,
82
+ _72: 72,
83
+ _96: 96,
84
+ _120: 120,
85
+ _128: 128,
86
+ };
87
+ //# sourceMappingURL=avatar.options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"avatar.options.js","sourceRoot":"","sources":["../../../src/avatar/avatar.options.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,UAAU;CACZ,CAAC;AAOX;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,QAAQ,EAAE,UAAU;IACpB,MAAM,EAAE,QAAQ;CACR,CAAC;AAOX;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,QAAQ;IAChB,UAAU,EAAE,aAAa;CACjB,CAAC;AAOX;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,OAAO,EAAE,UAAU;IACnB,SAAS,EAAE,WAAW;IACtB,GAAG,EAAE,KAAK;IACV,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,UAAU;IACpB,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,YAAY;IACvB,SAAS,EAAE,YAAY;IACvB,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;IACZ,SAAS,EAAE,YAAY;IACvB,UAAU,EAAE,YAAY;IACxB,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,UAAU;IACpB,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,UAAU;IACpB,MAAM,EAAE,QAAQ;CACR,CAAC;AAQX;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,UAAU;IACpB,GAAG,gBAAgB;CACX,CAAC;AAOX;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,GAAG,EAAE,EAAE;IACP,GAAG,EAAE,EAAE;IACP,GAAG,EAAE,EAAE;IACP,GAAG,EAAE,EAAE;IACP,GAAG,EAAE,EAAE;IACP,GAAG,EAAE,EAAE;IACP,GAAG,EAAE,EAAE;IACP,GAAG,EAAE,EAAE;IACP,GAAG,EAAE,EAAE;IACP,GAAG,EAAE,EAAE;IACP,GAAG,EAAE,EAAE;IACP,GAAG,EAAE,EAAE;IACP,IAAI,EAAE,GAAG;IACT,IAAI,EAAE,GAAG;CACD,CAAC"}
@@ -0,0 +1,476 @@
1
+ import { css } from '@microsoft/fast-element';
2
+ import { display } from '@microsoft/fast-foundation';
3
+ import { borderRadiusCircular, borderRadiusLarge, borderRadiusMedium, borderRadiusSmall, borderRadiusXLarge, colorBrandBackgroundStatic, colorNeutralBackground1, colorNeutralBackground6, colorNeutralForeground3, colorNeutralForegroundStaticInverted, colorPaletteAnchorBackground2, colorPaletteAnchorForeground2, colorPaletteBeigeBackground2, colorPaletteBeigeForeground2, colorPaletteBlueBackground2, colorPaletteBlueForeground2, colorPaletteBrassBackground2, colorPaletteBrassForeground2, colorPaletteBrownBackground2, colorPaletteBrownForeground2, colorPaletteCornflowerBackground2, colorPaletteCornflowerForeground2, colorPaletteCranberryBackground2, colorPaletteCranberryForeground2, colorPaletteDarkGreenBackground2, colorPaletteDarkGreenForeground2, colorPaletteDarkRedBackground2, colorPaletteDarkRedForeground2, colorPaletteForestBackground2, colorPaletteForestForeground2, colorPaletteGoldBackground2, colorPaletteGoldForeground2, colorPaletteGrapeBackground2, colorPaletteGrapeForeground2, colorPaletteLavenderBackground2, colorPaletteLavenderForeground2, colorPaletteLightTealBackground2, colorPaletteLightTealForeground2, colorPaletteLilacBackground2, colorPaletteLilacForeground2, colorPaletteMagentaBackground2, colorPaletteMagentaForeground2, colorPaletteMarigoldBackground2, colorPaletteMarigoldForeground2, colorPaletteMinkBackground2, colorPaletteMinkForeground2, colorPaletteNavyBackground2, colorPaletteNavyForeground2, colorPalettePeachBackground2, colorPalettePeachForeground2, colorPalettePinkBackground2, colorPalettePinkForeground2, colorPalettePlatinumBackground2, colorPalettePlatinumForeground2, colorPalettePlumBackground2, colorPalettePlumForeground2, colorPalettePumpkinBackground2, colorPalettePumpkinForeground2, colorPalettePurpleBackground2, colorPalettePurpleForeground2, colorPaletteRedBackground2, colorPaletteRedForeground2, colorPaletteRoyalBlueBackground2, colorPaletteRoyalBlueForeground2, colorPaletteSeafoamBackground2, colorPaletteSeafoamForeground2, colorPaletteSteelBackground2, colorPaletteSteelForeground2, colorPaletteTealBackground2, colorPaletteTealForeground2, curveAccelerateMax, curveAccelerateMid, curveAccelerateMin, curveDecelerateMax, curveDecelerateMid, curveDecelerateMin, curveEasyEase, curveEasyEaseMax, curveLinear, durationFaster, durationSlower, durationUltraSlow, fontFamilyBase, fontSizeBase100, fontSizeBase200, fontSizeBase300, fontSizeBase400, fontSizeBase500, fontSizeBase600, fontWeightRegular, fontWeightSemibold, shadow16, shadow28, shadow4, shadow8, strokeWidthThick, strokeWidthThicker, strokeWidthThickest, strokeWidthThin, } from '../theme/design-tokens.js';
4
+ const animations = {
5
+ fastOutSlowInMax: curveDecelerateMax,
6
+ fastOutSlowInMid: curveDecelerateMid,
7
+ fastOutSlowInMin: curveDecelerateMin,
8
+ slowOutFastInMax: curveAccelerateMax,
9
+ slowOutFastInMid: curveAccelerateMid,
10
+ slowOutFastInMin: curveAccelerateMin,
11
+ fastEase: curveEasyEaseMax,
12
+ normalEase: curveEasyEase,
13
+ nullEasing: curveLinear,
14
+ };
15
+ /** Avatar styles
16
+ * @public
17
+ */
18
+ export const styles = css `
19
+ ${display('inline-flex')} :host {
20
+ position: relative;
21
+ align-items: center;
22
+ justify-content: center;
23
+ flex-shrink: 0;
24
+ width: 32px;
25
+ height: 32px;
26
+ font-family: ${fontFamilyBase};
27
+ font-weight: ${fontWeightSemibold};
28
+ font-size: ${fontSizeBase300};
29
+ border-radius: ${borderRadiusCircular};
30
+ color: ${colorNeutralForeground3};
31
+ background-color: ${colorNeutralBackground6};
32
+ }
33
+
34
+ .default-icon,
35
+ ::slotted(svg) {
36
+ width: 20px;
37
+ height: 20px;
38
+ font-size: 20px;
39
+ }
40
+
41
+ ::slotted(img) {
42
+ box-sizing: border-box;
43
+ width: 100%;
44
+ height: 100%;
45
+ border-radius: ${borderRadiusCircular};
46
+ }
47
+
48
+ ::slotted([slot='badge']) {
49
+ position: absolute;
50
+ bottom: 0;
51
+ right: 0;
52
+ box-shadow: 0 0 0 ${strokeWidthThin} ${colorNeutralBackground1};
53
+ }
54
+
55
+ :host([size='64']) ::slotted([slot='badge']),
56
+ :host([size='72']) ::slotted([slot='badge']),
57
+ :host([size='96']) ::slotted([slot='badge']),
58
+ :host([size='120']) ::slotted([slot='badge']),
59
+ :host([size='128']) ::slotted([slot='badge']) {
60
+ box-shadow: 0 0 0 ${strokeWidthThick} ${colorNeutralBackground1};
61
+ }
62
+
63
+ :host([size='16']),
64
+ :host([size='20']),
65
+ :host([size='24']) {
66
+ font-size: ${fontSizeBase100};
67
+ font-weight: ${fontWeightRegular};
68
+ }
69
+
70
+ :host([size='16']) {
71
+ width: 16px;
72
+ height: 16px;
73
+ }
74
+
75
+ :host([size='20']) {
76
+ width: 20px;
77
+ height: 20px;
78
+ }
79
+
80
+ :host([size='24']) {
81
+ width: 24px;
82
+ height: 24px;
83
+ }
84
+
85
+ :host([size='16']) .default-icon,
86
+ :host([size='16']) ::slotted(svg) {
87
+ width: 12px;
88
+ height: 12px;
89
+ font-size: 12px;
90
+ }
91
+
92
+ :host([size='20']) .default-icon,
93
+ :host([size='24']) .default-icon,
94
+ :host([size='20']) ::slotted(svg),
95
+ :host([size='24']) ::slotted(svg) {
96
+ width: 16px;
97
+ height: 16px;
98
+ font-size: 16px;
99
+ }
100
+
101
+ :host([size='28']) {
102
+ width: 28px;
103
+ height: 28px;
104
+ font-size: ${fontSizeBase200};
105
+ }
106
+
107
+ :host([size='36']) {
108
+ width: 36px;
109
+ height: 36px;
110
+ }
111
+
112
+ :host([size='40']) {
113
+ width: 40px;
114
+ height: 40px;
115
+ }
116
+
117
+ :host([size='48']),
118
+ :host([size='56']) {
119
+ font-size: ${fontSizeBase400};
120
+ }
121
+
122
+ :host([size='48']) {
123
+ width: 48px;
124
+ height: 48px;
125
+ }
126
+
127
+ :host([size='48']) .default-icon,
128
+ :host([size='48']) ::slotted(svg) {
129
+ width: 24px;
130
+ height: 24px;
131
+ font-size: 24px;
132
+ }
133
+
134
+ :host([size='56']) {
135
+ width: 56px;
136
+ height: 56px;
137
+ }
138
+
139
+ :host([size='56']) .default-icon,
140
+ :host([size='56']) ::slotted(svg) {
141
+ width: 28px;
142
+ height: 28px;
143
+ font-size: 28px;
144
+ }
145
+
146
+ :host([size='64']),
147
+ :host([size='72']),
148
+ :host([size='96']) {
149
+ font-size: ${fontSizeBase500};
150
+ }
151
+
152
+ :host([size='64']) .default-icon,
153
+ :host([size='72']) .default-icon,
154
+ :host([size='64']) ::slotted(svg),
155
+ :host([size='72']) ::slotted(svg) {
156
+ width: 32px;
157
+ height: 32px;
158
+ font-size: 32px;
159
+ }
160
+
161
+ :host([size='64']) {
162
+ width: 64px;
163
+ height: 64px;
164
+ }
165
+
166
+ :host([size='72']) {
167
+ width: 72px;
168
+ height: 72px;
169
+ }
170
+
171
+ :host([size='96']) {
172
+ width: 96px;
173
+ height: 96px;
174
+ }
175
+
176
+ :host([size='96']) .default-icon,
177
+ :host([size='120']) .default-icon,
178
+ :host([size='128']) .default-icon,
179
+ :host([size='96']) ::slotted(svg),
180
+ :host([size='120']) ::slotted(svg),
181
+ :host([size='128']) ::slotted(svg) {
182
+ width: 48px;
183
+ height: 48px;
184
+ font-size: 48px;
185
+ }
186
+
187
+ :host([size='120']),
188
+ :host([size='128']) {
189
+ font-size: ${fontSizeBase600};
190
+ }
191
+
192
+ :host([size='120']) {
193
+ width: 120px;
194
+ height: 120px;
195
+ }
196
+
197
+ :host([size='128']) {
198
+ width: 128px;
199
+ height: 128px;
200
+ }
201
+
202
+ :host([shape='square']) {
203
+ border-radius: ${borderRadiusMedium};
204
+ }
205
+
206
+ :host([shape='square'][size='20']),
207
+ :host([shape='square'][size='24']) {
208
+ border-radius: ${borderRadiusSmall};
209
+ }
210
+
211
+ :host([shape='square'][size='56']),
212
+ :host([shape='square'][size='64']),
213
+ :host([shape='square'][size='72']) {
214
+ border-radius: ${borderRadiusLarge};
215
+ }
216
+ :host([shape='square'][size='96']),
217
+ :host([shape='square'][size='120']),
218
+ :host([shape='square'][size='128']) {
219
+ border-radius: ${borderRadiusXLarge};
220
+ }
221
+
222
+ :host([data-color='brand']) {
223
+ color: ${colorNeutralForegroundStaticInverted};
224
+ background-color: ${colorBrandBackgroundStatic};
225
+ }
226
+
227
+ :host([data-color='dark-red']) {
228
+ color: ${colorPaletteDarkRedForeground2};
229
+ background-color: ${colorPaletteDarkRedBackground2};
230
+ }
231
+
232
+ :host([data-color='cranberry']) {
233
+ color: ${colorPaletteCranberryForeground2};
234
+ background-color: ${colorPaletteCranberryBackground2};
235
+ }
236
+
237
+ :host([data-color='red']) {
238
+ color: ${colorPaletteRedForeground2};
239
+ background-color: ${colorPaletteRedBackground2};
240
+ }
241
+
242
+ :host([data-color='pumpkin']) {
243
+ color: ${colorPalettePumpkinForeground2};
244
+ background-color: ${colorPalettePumpkinBackground2};
245
+ }
246
+
247
+ :host([data-color='peach']) {
248
+ color: ${colorPalettePeachForeground2};
249
+ background-color: ${colorPalettePeachBackground2};
250
+ }
251
+
252
+ :host([data-color='marigold']) {
253
+ color: ${colorPaletteMarigoldForeground2};
254
+ background-color: ${colorPaletteMarigoldBackground2};
255
+ }
256
+
257
+ :host([data-color='gold']) {
258
+ color: ${colorPaletteGoldForeground2};
259
+ background-color: ${colorPaletteGoldBackground2};
260
+ }
261
+
262
+ :host([data-color='brass']) {
263
+ color: ${colorPaletteBrassForeground2};
264
+ background-color: ${colorPaletteBrassBackground2};
265
+ }
266
+
267
+ :host([data-color='brown']) {
268
+ color: ${colorPaletteBrownForeground2};
269
+ background-color: ${colorPaletteBrownBackground2};
270
+ }
271
+
272
+ :host([data-color='forest']) {
273
+ color: ${colorPaletteForestForeground2};
274
+ background-color: ${colorPaletteForestBackground2};
275
+ }
276
+
277
+ :host([data-color='seafoam']) {
278
+ color: ${colorPaletteSeafoamForeground2};
279
+ background-color: ${colorPaletteSeafoamBackground2};
280
+ }
281
+
282
+ :host([data-color='dark-green']) {
283
+ color: ${colorPaletteDarkGreenForeground2};
284
+ background-color: ${colorPaletteDarkGreenBackground2};
285
+ }
286
+
287
+ :host([data-color='light-teal']) {
288
+ color: ${colorPaletteLightTealForeground2};
289
+ background-color: ${colorPaletteLightTealBackground2};
290
+ }
291
+
292
+ :host([data-color='teal']) {
293
+ color: ${colorPaletteTealForeground2};
294
+ background-color: ${colorPaletteTealBackground2};
295
+ }
296
+
297
+ :host([data-color='steel']) {
298
+ color: ${colorPaletteSteelForeground2};
299
+ background-color: ${colorPaletteSteelBackground2};
300
+ }
301
+
302
+ :host([data-color='blue']) {
303
+ color: ${colorPaletteBlueForeground2};
304
+ background-color: ${colorPaletteBlueBackground2};
305
+ }
306
+
307
+ :host([data-color='royal-blue']) {
308
+ color: ${colorPaletteRoyalBlueForeground2};
309
+ background-color: ${colorPaletteRoyalBlueBackground2};
310
+ }
311
+
312
+ :host([data-color='cornflower']) {
313
+ color: ${colorPaletteCornflowerForeground2};
314
+ background-color: ${colorPaletteCornflowerBackground2};
315
+ }
316
+
317
+ :host([data-color='navy']) {
318
+ color: ${colorPaletteNavyForeground2};
319
+ background-color: ${colorPaletteNavyBackground2};
320
+ }
321
+
322
+ :host([data-color='lavender']) {
323
+ color: ${colorPaletteLavenderForeground2};
324
+ background-color: ${colorPaletteLavenderBackground2};
325
+ }
326
+
327
+ :host([data-color='purple']) {
328
+ color: ${colorPalettePurpleForeground2};
329
+ background-color: ${colorPalettePurpleBackground2};
330
+ }
331
+
332
+ :host([data-color='grape']) {
333
+ color: ${colorPaletteGrapeForeground2};
334
+ background-color: ${colorPaletteGrapeBackground2};
335
+ }
336
+
337
+ :host([data-color='lilac']) {
338
+ color: ${colorPaletteLilacForeground2};
339
+ background-color: ${colorPaletteLilacBackground2};
340
+ }
341
+
342
+ :host([data-color='pink']) {
343
+ color: ${colorPalettePinkForeground2};
344
+ background-color: ${colorPalettePinkBackground2};
345
+ }
346
+
347
+ :host([data-color='magenta']) {
348
+ color: ${colorPaletteMagentaForeground2};
349
+ background-color: ${colorPaletteMagentaBackground2};
350
+ }
351
+
352
+ :host([data-color='plum']) {
353
+ color: ${colorPalettePlumForeground2};
354
+ background-color: ${colorPalettePlumBackground2};
355
+ }
356
+
357
+ :host([data-color='beige']) {
358
+ color: ${colorPaletteBeigeForeground2};
359
+ background-color: ${colorPaletteBeigeBackground2};
360
+ }
361
+
362
+ :host([data-color='mink']) {
363
+ color: ${colorPaletteMinkForeground2};
364
+ background-color: ${colorPaletteMinkBackground2};
365
+ }
366
+
367
+ :host([data-color='platinum']) {
368
+ color: ${colorPalettePlatinumForeground2};
369
+ background-color: ${colorPalettePlatinumBackground2};
370
+ }
371
+
372
+ :host([data-color='anchor']) {
373
+ color: ${colorPaletteAnchorForeground2};
374
+ background-color: ${colorPaletteAnchorBackground2};
375
+ }
376
+
377
+ :host([active]) {
378
+ /* Work-around for text pixel snapping at the end of the animation */
379
+ transform: perspective(1px);
380
+ transition-property: transform, opacity;
381
+ transition-duration: ${durationUltraSlow}, ${durationFaster};
382
+ transition-delay: ${animations.fastEase}, ${animations.nullEasing};
383
+ }
384
+
385
+ :host([active])::before {
386
+ content: '';
387
+ position: absolute;
388
+ top: 0;
389
+ left: 0;
390
+ bottom: 0;
391
+ right: 0;
392
+ border-radius: inherit;
393
+ transition-property: margin, opacity;
394
+ transition-duration: ${durationUltraSlow}, ${durationSlower};
395
+ transition-delay: ${animations.fastEase}, ${animations.nullEasing};
396
+ }
397
+ :host([active])::before {
398
+ box-shadow: ${shadow8};
399
+ border-style: solid;
400
+ border-color: ${colorBrandBackgroundStatic};
401
+ }
402
+
403
+ :host([active][appearance='shadow'])::before {
404
+ border-style: none;
405
+ border-color: none;
406
+ }
407
+
408
+ :host([active]:not([appearance='shadow']))::before {
409
+ margin: calc(-2 * ${strokeWidthThick});
410
+ border-width: ${strokeWidthThick};
411
+ }
412
+
413
+ :host([size='56'][active]:not([appearance='shadow']))::before,
414
+ :host([size='64'][active]:not([appearance='shadow']))::before {
415
+ margin: calc(-2 * ${strokeWidthThicker});
416
+ border-width: ${strokeWidthThicker};
417
+ }
418
+
419
+ :host([size='72'][active]:not([appearance='shadow']))::before,
420
+ :host([size='96'][active]:not([appearance='shadow']))::before,
421
+ :host([size='120'][active]:not([appearance='shadow']))::before,
422
+ :host([size='128'][active]:not([appearance='shadow']))::before {
423
+ margin: calc(-2 * ${strokeWidthThickest});
424
+ border-width: ${strokeWidthThickest};
425
+ }
426
+
427
+ :host([size='20'][active][appearance])::before,
428
+ :host([size='24'][active][appearance])::before,
429
+ :host([size='28'][active][appearance])::before {
430
+ box-shadow: ${shadow4};
431
+ }
432
+
433
+ :host([size='56'][active][appearance])::before,
434
+ :host([size='64'][active][appearance])::before {
435
+ box-shadow: ${shadow16};
436
+ }
437
+
438
+ :host([size='72'][active][appearance])::before,
439
+ :host([size='96'][active][appearance])::before,
440
+ :host([size='120'][active][appearance])::before,
441
+ :host([size='128'][active][appearance])::before {
442
+ box-shadow: ${shadow28};
443
+ }
444
+
445
+ :host([active][appearance='ring'])::before {
446
+ box-shadow: none;
447
+ }
448
+
449
+ :host([active='inactive']) {
450
+ opacity: 0.8;
451
+ transform: scale(0.875);
452
+ transition-property: transform, opacity;
453
+ transition-duration: ${durationUltraSlow}, ${durationFaster};
454
+ transition-delay: ${animations.fastOutSlowInMin}, ${animations.nullEasing};
455
+ }
456
+
457
+ :host([active='inactive'])::before {
458
+ margin: 0;
459
+ opacity: 0;
460
+ transition-property: margin, opacity;
461
+ transition-duration: ${durationUltraSlow}, ${durationSlower};
462
+ transition-delay: ${animations.fastOutSlowInMin}, ${animations.nullEasing};
463
+ }
464
+
465
+ @media screen and (prefers-reduced-motion: reduce) {
466
+ :host([active]) {
467
+ transition-duration: 0.01ms;
468
+ }
469
+
470
+ :host([active])::before {
471
+ transition-duration: 0.01ms;
472
+ transition-delay: 0.01ms;
473
+ }
474
+ }
475
+ `;
476
+ //# sourceMappingURL=avatar.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"avatar.styles.js","sourceRoot":"","sources":["../../../src/avatar/avatar.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,0BAA0B,EAC1B,uBAAuB,EACvB,uBAAuB,EACvB,uBAAuB,EACvB,oCAAoC,EACpC,6BAA6B,EAC7B,6BAA6B,EAC7B,4BAA4B,EAC5B,4BAA4B,EAC5B,2BA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