@fluentui/react-avatar 9.0.1 → 9.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +212 -1
- package/CHANGELOG.md +50 -2
- package/MIGRATION-AvatarGroup.md +35 -0
- package/README-AvatarGroup.md +39 -0
- package/README.md +16 -11
- package/SPEC.md +1 -135
- package/dist/index.d.ts +49 -1
- package/lib/AvatarGroupOverflow.js +2 -0
- package/lib/AvatarGroupOverflow.js.map +1 -0
- package/lib/components/Avatar/useAvatarStyles.js +25 -3
- package/lib/components/Avatar/useAvatarStyles.js.map +1 -1
- package/lib/components/AvatarGroup/AvatarGroup.types.js.map +1 -1
- package/lib/components/AvatarGroup/renderAvatarGroup.js +4 -3
- package/lib/components/AvatarGroup/renderAvatarGroup.js.map +1 -1
- package/lib/components/AvatarGroup/useAvatarGroup.js +10 -11
- package/lib/components/AvatarGroup/useAvatarGroup.js.map +1 -1
- package/lib/components/AvatarGroup/useAvatarGroupStyles.js +54 -45
- package/lib/components/AvatarGroup/useAvatarGroupStyles.js.map +1 -1
- package/lib/components/AvatarGroupOverflow/AvatarGroupOverflow.js +15 -0
- package/lib/components/AvatarGroupOverflow/AvatarGroupOverflow.js.map +1 -0
- package/lib/components/AvatarGroupOverflow/AvatarGroupOverflow.types.js +2 -0
- package/lib/components/AvatarGroupOverflow/AvatarGroupOverflow.types.js.map +1 -0
- package/lib/components/AvatarGroupOverflow/index.js +6 -0
- package/lib/components/AvatarGroupOverflow/index.js.map +1 -0
- package/lib/components/AvatarGroupOverflow/renderAvatarGroupOverflow.js +16 -0
- package/lib/components/AvatarGroupOverflow/renderAvatarGroupOverflow.js.map +1 -0
- package/lib/components/AvatarGroupOverflow/useAvatarGroupOverflow.js +27 -0
- package/lib/components/AvatarGroupOverflow/useAvatarGroupOverflow.js.map +1 -0
- package/lib/components/AvatarGroupOverflow/useAvatarGroupOverflowStyles.js +27 -0
- package/lib/components/AvatarGroupOverflow/useAvatarGroupOverflowStyles.js.map +1 -0
- package/lib/contexts/AvatarGroupContext.js +1 -0
- package/lib/contexts/AvatarGroupContext.js.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib-commonjs/AvatarGroupOverflow.js +10 -0
- package/lib-commonjs/AvatarGroupOverflow.js.map +1 -0
- package/lib-commonjs/components/Avatar/useAvatarStyles.js +25 -3
- package/lib-commonjs/components/Avatar/useAvatarStyles.js.map +1 -1
- package/lib-commonjs/components/AvatarGroup/renderAvatarGroup.js +4 -3
- package/lib-commonjs/components/AvatarGroup/renderAvatarGroup.js.map +1 -1
- package/lib-commonjs/components/AvatarGroup/useAvatarGroup.js +10 -12
- package/lib-commonjs/components/AvatarGroup/useAvatarGroup.js.map +1 -1
- package/lib-commonjs/components/AvatarGroup/useAvatarGroupStyles.js +54 -45
- package/lib-commonjs/components/AvatarGroup/useAvatarGroupStyles.js.map +1 -1
- package/lib-commonjs/components/AvatarGroupOverflow/AvatarGroupOverflow.js +26 -0
- package/lib-commonjs/components/AvatarGroupOverflow/AvatarGroupOverflow.js.map +1 -0
- package/lib-commonjs/components/AvatarGroupOverflow/AvatarGroupOverflow.types.js +6 -0
- package/lib-commonjs/components/AvatarGroupOverflow/AvatarGroupOverflow.types.js.map +1 -0
- package/lib-commonjs/components/AvatarGroupOverflow/index.js +18 -0
- package/lib-commonjs/components/AvatarGroupOverflow/index.js.map +1 -0
- package/lib-commonjs/components/AvatarGroupOverflow/renderAvatarGroupOverflow.js +27 -0
- package/lib-commonjs/components/AvatarGroupOverflow/renderAvatarGroupOverflow.js.map +1 -0
- package/lib-commonjs/components/AvatarGroupOverflow/useAvatarGroupOverflow.js +37 -0
- package/lib-commonjs/components/AvatarGroupOverflow/useAvatarGroupOverflow.js.map +1 -0
- package/lib-commonjs/components/AvatarGroupOverflow/useAvatarGroupOverflowStyles.js +37 -0
- package/lib-commonjs/components/AvatarGroupOverflow/useAvatarGroupOverflowStyles.js.map +1 -0
- package/lib-commonjs/contexts/AvatarGroupContext.js +1 -0
- package/lib-commonjs/contexts/AvatarGroupContext.js.map +1 -1
- package/lib-commonjs/index.js +4 -0
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +12 -11
|
@@ -18,7 +18,8 @@ const AvatarGroupItem_1 = /*#__PURE__*/require("../../AvatarGroupItem");
|
|
|
18
18
|
exports.avatarGroupClassNames = {
|
|
19
19
|
root: 'fui-AvatarGroup',
|
|
20
20
|
overflowContent: 'fui-AvatarGroup__overflowContent',
|
|
21
|
-
overflowButton: 'fui-AvatarGroup__overflowButton'
|
|
21
|
+
overflowButton: 'fui-AvatarGroup__overflowButton',
|
|
22
|
+
overflowSurface: 'fui-AvatarGroup__overflowSurface'
|
|
22
23
|
};
|
|
23
24
|
/**
|
|
24
25
|
* Styles for the root slot.
|
|
@@ -31,24 +32,31 @@ const useStyles = /*#__PURE__*/react_1.__styles({
|
|
|
31
32
|
},
|
|
32
33
|
"pie": {
|
|
33
34
|
"Bgl5zvf": "f1uz6ud1",
|
|
35
|
+
"De3pzq": "f1ganh6p",
|
|
34
36
|
"Bsw6fvg": "fe2ae1k"
|
|
35
37
|
},
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"
|
|
44
|
-
"
|
|
38
|
+
"overflowSurface": {
|
|
39
|
+
"z8tnut": "f1g0x7ka",
|
|
40
|
+
"z189sj": ["fhxju0i", "f1cnd47f"],
|
|
41
|
+
"Byoj8tv": "f1qch9an",
|
|
42
|
+
"uwmqm3": ["f1cnd47f", "fhxju0i"]
|
|
43
|
+
},
|
|
44
|
+
"overflowContent": {
|
|
45
|
+
"Bxyxcbc": "fopcw2o",
|
|
46
|
+
"sshi5w": "f1n5o1gx",
|
|
47
|
+
"B68tc82": "f1p9o1ba",
|
|
48
|
+
"Bmxbyg5": "fqkkaap",
|
|
49
|
+
"z8tnut": "f17mpqex",
|
|
50
|
+
"z189sj": ["f1vdfbxk", "f1f5gg8d"],
|
|
51
|
+
"Byoj8tv": "fdvome7",
|
|
52
|
+
"uwmqm3": ["f1f5gg8d", "f1vdfbxk"],
|
|
53
|
+
"a9b677": "f13dwy2t"
|
|
45
54
|
}
|
|
46
55
|
}, {
|
|
47
|
-
"d": [".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".f10pi13n{position:relative;}", ".f1uz6ud1{-webkit-clip-path:circle(50%);clip-path:circle(50%);}", "
|
|
56
|
+
"d": [".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".f10pi13n{position:relative;}", ".f1uz6ud1{-webkit-clip-path:circle(50%);clip-path:circle(50%);}", ".f1ganh6p{background-color:var(--colorTransparentStroke);}", ".f1g0x7ka{padding-top:0;}", ".fhxju0i{padding-right:0;}", ".f1cnd47f{padding-left:0;}", ".f1qch9an{padding-bottom:0;}", ".fopcw2o{max-height:220px;}", ".f1n5o1gx{min-height:80px;}", ".f1p9o1ba{overflow-x:hidden;}", ".fqkkaap{overflow-y:scroll;}", ".f17mpqex{padding-top:var(--spacingHorizontalS);}", ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}", ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}", ".fdvome7{padding-bottom:var(--spacingHorizontalS);}", ".f13dwy2t{width:220px;}"],
|
|
48
57
|
"m": [["@media (forced-colors: active){.fe2ae1k{background-color:CanvasText;}}", {
|
|
49
58
|
"m": "(forced-colors: active)"
|
|
50
|
-
}]]
|
|
51
|
-
"f": [".ftqa4ok:focus{outline-style:none;}"]
|
|
59
|
+
}]]
|
|
52
60
|
});
|
|
53
61
|
/**
|
|
54
62
|
* Styles for overflow button slot.
|
|
@@ -87,13 +95,30 @@ const useOverflowButtonStyles = /*#__PURE__*/react_1.__styles({
|
|
|
87
95
|
},
|
|
88
96
|
"focusIndicator": {
|
|
89
97
|
"Brovlpu": "ftqa4ok",
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"
|
|
98
|
+
"B486eqv": "f2hkw1w",
|
|
99
|
+
"Bvjrn4i": "fvvvjju",
|
|
100
|
+
"Bfjx6ro": ["f1j42xvt", "ftiyk5j"],
|
|
101
|
+
"vkx7if": "f3za06g",
|
|
102
|
+
"Bhdpb9s": ["ftiyk5j", "f1j42xvt"],
|
|
103
|
+
"H7go31": "flnhq9f",
|
|
104
|
+
"ns4vmj": "f149st4k",
|
|
105
|
+
"me5axj": "f1tn340u"
|
|
106
|
+
},
|
|
107
|
+
"pieFocusIndicator": {
|
|
108
|
+
"Brovlpu": "ftqa4ok",
|
|
109
|
+
"B486eqv": "f2hkw1w",
|
|
110
|
+
"B7vjy6w": "f16bl5ra",
|
|
111
|
+
"k9s1gq": ["fdi6dq0", "f1tjf6rm"],
|
|
112
|
+
"hhz4md": "fexdhnp",
|
|
113
|
+
"B282cnq": ["f1tjf6rm", "fdi6dq0"],
|
|
114
|
+
"Bhrp7kx": "frdu0z4",
|
|
115
|
+
"jt52do": ["ftyr16m", "f6wv3wq"],
|
|
116
|
+
"qyg4kl": "fmjz5p8",
|
|
117
|
+
"aw8gdl": ["f6wv3wq", "ftyr16m"],
|
|
118
|
+
"Bvjrn4i": "ftvba00",
|
|
119
|
+
"Bfjx6ro": ["fqg29le", "f1io5jdi"],
|
|
120
|
+
"vkx7if": "fak3yh7",
|
|
121
|
+
"Bhdpb9s": ["f1io5jdi", "fqg29le"]
|
|
97
122
|
},
|
|
98
123
|
"states": {
|
|
99
124
|
"Bi91k9c": "feu1g3u",
|
|
@@ -199,7 +224,7 @@ const useOverflowButtonStyles = /*#__PURE__*/react_1.__styles({
|
|
|
199
224
|
"ibv6hh": ["f1g0iy8l", "figl7jc"]
|
|
200
225
|
}
|
|
201
226
|
}, {
|
|
202
|
-
"d": [".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".f10pi13n{position:relative;}", ".fi64zpg{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;}", ".f4d9j23{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", ".fj3muxo{border-top-color:var(--colorNeutralStroke1);}", ".f1akhkt{border-right-color:var(--colorNeutralStroke1);}", ".f1lxtadh{border-left-color:var(--colorNeutralStroke1);}", ".f1aperda{border-bottom-color:var(--colorNeutralStroke1);}", ".f8fbkgy{border-bottom-right-radius:var(--borderRadiusCircular);}", ".f1nfllo7{border-bottom-left-radius:var(--borderRadiusCircular);}", ".f1djnp8u{border-top-right-radius:var(--borderRadiusCircular);}", ".f1s8kh49{border-top-left-radius:var(--borderRadiusCircular);}", ".fzkkow9{border-top-style:solid;}", ".fcdblym{border-right-style:solid;}", ".fjik90z{border-left-style:solid;}", ".fg706s2{border-bottom-style:solid;}", ".f1g0x7ka{padding-top:0;}", ".fhxju0i{padding-right:0;}", ".f1cnd47f{padding-left:0;}", ".f1qch9an{padding-bottom:0;}", "
|
|
227
|
+
"d": [".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".f10pi13n{position:relative;}", ".fi64zpg{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;}", ".f4d9j23{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", ".fj3muxo{border-top-color:var(--colorNeutralStroke1);}", ".f1akhkt{border-right-color:var(--colorNeutralStroke1);}", ".f1lxtadh{border-left-color:var(--colorNeutralStroke1);}", ".f1aperda{border-bottom-color:var(--colorNeutralStroke1);}", ".f8fbkgy{border-bottom-right-radius:var(--borderRadiusCircular);}", ".f1nfllo7{border-bottom-left-radius:var(--borderRadiusCircular);}", ".f1djnp8u{border-top-right-radius:var(--borderRadiusCircular);}", ".f1s8kh49{border-top-left-radius:var(--borderRadiusCircular);}", ".fzkkow9{border-top-style:solid;}", ".fcdblym{border-right-style:solid;}", ".fjik90z{border-left-style:solid;}", ".fg706s2{border-bottom-style:solid;}", ".f1g0x7ka{padding-top:0;}", ".fhxju0i{padding-right:0;}", ".f1cnd47f{padding-left:0;}", ".f1qch9an{padding-bottom:0;}", ".fui-FluentProvider .fvvvjju.fui-focus-visible{border-top-color:transparent;}", ".fui-FluentProvider .f1j42xvt.fui-focus-visible{border-right-color:transparent;}", ".fui-FluentProvider .ftiyk5j.fui-focus-visible{border-left-color:transparent;}", ".fui-FluentProvider .f3za06g.fui-focus-visible{border-bottom-color:transparent;}", ".fui-FluentProvider .flnhq9f.fui-focus-visible{outline-color:var(--colorStrokeFocus2);}", ".fui-FluentProvider .f149st4k.fui-focus-visible{outline-width:var(--strokeWidthThick);}", ".fui-FluentProvider .f1tn340u.fui-focus-visible{outline-style:solid;}", ".fui-FluentProvider .f16bl5ra.fui-focus-visible{border-top-width:var(--strokeWidthThick);}", ".fui-FluentProvider .fdi6dq0.fui-focus-visible{border-right-width:var(--strokeWidthThick);}", ".fui-FluentProvider .f1tjf6rm.fui-focus-visible{border-left-width:var(--strokeWidthThick);}", ".fui-FluentProvider .fexdhnp.fui-focus-visible{border-bottom-width:var(--strokeWidthThick);}", ".fui-FluentProvider .frdu0z4.fui-focus-visible{border-top-style:solid;}", ".fui-FluentProvider .ftyr16m.fui-focus-visible{border-right-style:solid;}", ".fui-FluentProvider .f6wv3wq.fui-focus-visible{border-left-style:solid;}", ".fui-FluentProvider .fmjz5p8.fui-focus-visible{border-bottom-style:solid;}", ".fui-FluentProvider .ftvba00.fui-focus-visible{border-top-color:var(--colorStrokeFocus2);}", ".fui-FluentProvider .fqg29le.fui-focus-visible{border-right-color:var(--colorStrokeFocus2);}", ".fui-FluentProvider .f1io5jdi.fui-focus-visible{border-left-color:var(--colorStrokeFocus2);}", ".fui-FluentProvider .fak3yh7.fui-focus-visible{border-bottom-color:var(--colorStrokeFocus2);}", ".f1c21dwh{background-color:var(--colorTransparentBackground);}", ".fghlq4f{border-top-color:var(--colorTransparentStroke);}", ".f1gn591s{border-right-color:var(--colorTransparentStroke);}", ".fjscplz{border-left-color:var(--colorTransparentStroke);}", ".fb073pr{border-bottom-color:var(--colorTransparentStroke);}", ".f44pa96{color:transparent;}", ".f1ugzwwg{font-size:12px;}", ".f4ybsrx{font-size:16px;}", ".fe5j1ua{font-size:20px;}", ".f1rt2boy{font-size:24px;}", ".f24l1pt{font-size:28px;}", ".ffl51b{font-size:32px;}", ".f18m8u13{font-size:48px;}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".f13mqy1h{font-size:var(--fontSizeBase100);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".fcpl73t{line-height:var(--lineHeightBase100);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".fod5ikn{font-size:var(--fontSizeBase400);}", ".faaz57k{line-height:var(--lineHeightBase400);}", ".f1pp30po{font-size:var(--fontSizeBase500);}", ".f106mvju{line-height:var(--lineHeightBase500);}", ".f1x0m3f5{font-size:var(--fontSizeBase600);}", ".fb86gi6{line-height:var(--lineHeightBase600);}", ".f192inf7{border-top-width:var(--strokeWidthThin);}", ".f5tn483{border-right-width:var(--strokeWidthThin);}", ".f1ojsxk5{border-left-width:var(--strokeWidthThin);}", ".f1vxd6vx{border-bottom-width:var(--strokeWidthThin);}", ".f18zi460{border-top-width:var(--strokeWidthThick);}", ".f1wpluaz{border-right-width:var(--strokeWidthThick);}", ".fsfsuhs{border-left-width:var(--strokeWidthThick);}", ".fmklw6v{border-bottom-width:var(--strokeWidthThick);}", ".fgx37oo{border-top-width:var(--strokeWidthThicker);}", ".f130t4y6{border-right-width:var(--strokeWidthThicker);}", ".f1efpmoh{border-left-width:var(--strokeWidthThicker);}", ".fv51ejd{border-bottom-width:var(--strokeWidthThicker);}", ".fwn6jck{border-top-width:var(--strokeWidthThickest);}", ".figl7jc{border-right-width:var(--strokeWidthThickest);}", ".f1g0iy8l{border-left-width:var(--strokeWidthThickest);}", ".f1b8shu7{border-bottom-width:var(--strokeWidthThickest);}"],
|
|
203
228
|
"m": [["@media (forced-colors: active){.fw33nwi{border-top-color:CanvasText;}}", {
|
|
204
229
|
"m": "(forced-colors: active)"
|
|
205
230
|
}], ["@media (forced-colors: active){.f1ptkjjm{border-right-color:CanvasText;}.fmzzjfk{border-left-color:CanvasText;}}", {
|
|
@@ -210,29 +235,10 @@ const useOverflowButtonStyles = /*#__PURE__*/react_1.__styles({
|
|
|
210
235
|
"m": "(forced-colors: active)"
|
|
211
236
|
}]],
|
|
212
237
|
"f": [".ftqa4ok:focus{outline-style:none;}"],
|
|
238
|
+
"i": [".f2hkw1w:focus-visible{outline-style:none;}"],
|
|
213
239
|
"h": [".feu1g3u:hover{color:var(--colorNeutralForeground1Hover);}", ".f1knas48:hover{background-color:var(--colorNeutralBackground1Hover);}", ".fvcxoqz:hover{border-top-color:var(--colorNeutralStroke1Hover);}", ".f1ub3y4t:hover{border-right-color:var(--colorNeutralStroke1Hover);}", ".f1m52nbi:hover{border-left-color:var(--colorNeutralStroke1Hover);}", ".f1xlaoq0:hover{border-bottom-color:var(--colorNeutralStroke1Hover);}"],
|
|
214
240
|
"a": [".f1g4hkjv:active{color:var(--colorNeutralForeground1Pressed);}", ".fb40n2d:active{background-color:var(--colorNeutralBackground1Pressed);}", ".fvs00aa:active{border-top-color:var(--colorNeutralStroke1Pressed);}", ".f1assf6x:active{border-right-color:var(--colorNeutralStroke1Pressed);}", ".f4ruux4:active{border-left-color:var(--colorNeutralStroke1Pressed);}", ".fumykes:active{border-bottom-color:var(--colorNeutralStroke1Pressed);}"]
|
|
215
241
|
});
|
|
216
|
-
/**
|
|
217
|
-
* Styles for overflow list slot.
|
|
218
|
-
*/
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
const useOverflowContentStyles = /*#__PURE__*/react_1.__styles({
|
|
222
|
-
"base": {
|
|
223
|
-
"Bxyxcbc": "fopcw2o",
|
|
224
|
-
"sshi5w": "f1n5o1gx",
|
|
225
|
-
"B68tc82": "f1p9o1ba",
|
|
226
|
-
"Bmxbyg5": "fqkkaap",
|
|
227
|
-
"z8tnut": "f17mpqex",
|
|
228
|
-
"z189sj": ["f1vdfbxk", "f1f5gg8d"],
|
|
229
|
-
"Byoj8tv": "fdvome7",
|
|
230
|
-
"uwmqm3": ["f1f5gg8d", "f1vdfbxk"],
|
|
231
|
-
"a9b677": "f13dwy2t"
|
|
232
|
-
}
|
|
233
|
-
}, {
|
|
234
|
-
"d": [".fopcw2o{max-height:220px;}", ".f1n5o1gx{min-height:80px;}", ".f1p9o1ba{overflow-x:hidden;}", ".fqkkaap{overflow-y:scroll;}", ".f17mpqex{padding-top:var(--spacingHorizontalS);}", ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}", ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}", ".fdvome7{padding-bottom:var(--spacingHorizontalS);}", ".f13dwy2t{width:220px;}"]
|
|
235
|
-
});
|
|
236
242
|
/**
|
|
237
243
|
* Apply styling to the AvatarGroup slots based on the state
|
|
238
244
|
*/
|
|
@@ -246,13 +252,16 @@ const useAvatarGroupStyles_unstable = state => {
|
|
|
246
252
|
} = state;
|
|
247
253
|
const styles = useStyles();
|
|
248
254
|
const sizeStyles = useAvatarStyles_1.useSizeStyles();
|
|
249
|
-
const overflowContentStyles = useOverflowContentStyles();
|
|
250
255
|
const overflowButtonStyles = useOverflowButtonStyles();
|
|
251
256
|
const groupChildClassName = AvatarGroupItem_1.useGroupChildClassName(layout, size, true);
|
|
252
|
-
state.root.className = react_1.mergeClasses(exports.avatarGroupClassNames.root, styles.base, layout === 'pie' && styles.pie, layout === 'pie' && sizeStyles[size],
|
|
257
|
+
state.root.className = react_1.mergeClasses(exports.avatarGroupClassNames.root, styles.base, layout === 'pie' && styles.pie, layout === 'pie' && sizeStyles[size], state.root.className);
|
|
253
258
|
|
|
254
259
|
if (state.overflowContent) {
|
|
255
|
-
state.overflowContent.className = react_1.mergeClasses(exports.avatarGroupClassNames.overflowContent,
|
|
260
|
+
state.overflowContent.className = react_1.mergeClasses(exports.avatarGroupClassNames.overflowContent, styles.overflowContent, state.overflowContent.className);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
if (state.overflowSurface) {
|
|
264
|
+
state.overflowSurface.className = react_1.mergeClasses(exports.avatarGroupClassNames.overflowSurface, styles.overflowSurface, state.overflowSurface.className);
|
|
256
265
|
}
|
|
257
266
|
|
|
258
267
|
const overflowButtonClasses = [];
|
|
@@ -300,7 +309,7 @@ const useAvatarGroupStyles_unstable = state => {
|
|
|
300
309
|
}
|
|
301
310
|
|
|
302
311
|
if (state.overflowButton) {
|
|
303
|
-
state.overflowButton.className = react_1.mergeClasses(exports.avatarGroupClassNames.overflowButton, sizeStyles[size], overflowButtonStyles.base, ...overflowButtonClasses, layout !== 'pie' && overflowButtonStyles.states, layout !== 'pie' && overflowButtonStyles.focusIndicator, layout === 'pie' && overflowButtonStyles.pie, groupChildClassName, state.overflowButton.className);
|
|
312
|
+
state.overflowButton.className = react_1.mergeClasses(exports.avatarGroupClassNames.overflowButton, sizeStyles[size], overflowButtonStyles.base, ...overflowButtonClasses, layout !== 'pie' && overflowButtonStyles.states, layout !== 'pie' && overflowButtonStyles.focusIndicator, layout === 'pie' && overflowButtonStyles.pieFocusIndicator, layout === 'pie' && overflowButtonStyles.pie, groupChildClassName, state.overflowButton.className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,oBAAoB,CAAC,GAPV,EAQ/B,mBAR+B,EAS/B,KAAK,CAAC,cAAN,CAAqB,SATU,CAAjC;EAWD;;EAED,OAAO,KAAP;AACD,CArFM;;AAAM,OAAA,CAAA,6BAAA,GAA6B,6BAA7B","sourcesContent":["import { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { useSizeStyles } from '../Avatar/useAvatarStyles';\nimport type { AvatarGroupSlots, AvatarGroupState } from './AvatarGroup.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { useGroupChildClassName } from '../../AvatarGroupItem';\n\nexport const avatarGroupClassNames: SlotClassNames<AvatarGroupSlots> = {\n root: 'fui-AvatarGroup',\n overflowContent: 'fui-AvatarGroup__overflowContent',\n overflowButton: 'fui-AvatarGroup__overflowButton',\n};\n\n/**\n * Styles for the root slot.\n */\nconst useStyles = makeStyles({\n base: {\n display: 'inline-flex',\n position: 'relative',\n },\n pie: {\n clipPath: 'circle(50%)',\n '@media (forced-colors: active)': {\n backgroundColor: 'CanvasText',\n },\n },\n focusIndicator: createCustomFocusIndicatorStyle(\n {\n ...shorthands.borderColor('transparent'),\n outlineColor: tokens.colorStrokeFocus2,\n outlineWidth: tokens.strokeWidthThick,\n outlineStyle: 'solid',\n },\n { selector: 'focus-within' },\n ),\n});\n\n/**\n * Styles for overflow button slot.\n */\nconst useOverflowButtonStyles = makeStyles({\n base: {\n display: 'inline-flex',\n position: 'relative',\n flexShrink: 0,\n justifyContent: 'center',\n alignItems: 'center',\n color: tokens.colorNeutralForeground1,\n backgroundColor: tokens.colorNeutralBackground1,\n ...shorthands.borderColor(tokens.colorNeutralStroke1),\n ...shorthands.borderRadius(tokens.borderRadiusCircular),\n ...shorthands.borderStyle('solid'),\n ...shorthands.padding(0),\n\n // match color to Avatar's outline color\n '@media (forced-colors: active)': {\n ...shorthands.borderColor('CanvasText'),\n },\n },\n\n // These styles match the default button styles\n focusIndicator: createCustomFocusIndicatorStyle({\n ...shorthands.borderColor('transparent'),\n outlineColor: tokens.colorStrokeFocus2,\n outlineWidth: tokens.strokeWidthThick,\n outlineStyle: 'solid',\n }),\n\n states: {\n ':hover': {\n color: tokens.colorNeutralForeground1Hover,\n backgroundColor: tokens.colorNeutralBackground1Hover,\n ...shorthands.borderColor(tokens.colorNeutralStroke1Hover),\n },\n ':active': {\n color: tokens.colorNeutralForeground1Pressed,\n backgroundColor: tokens.colorNeutralBackground1Pressed,\n ...shorthands.borderColor(tokens.colorNeutralStroke1Pressed),\n },\n },\n\n pie: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n color: 'transparent',\n },\n\n icon12: { fontSize: '12px' },\n icon16: { fontSize: '16px' },\n icon20: { fontSize: '20px' },\n icon24: { fontSize: '24px' },\n icon28: { fontSize: '28px' },\n icon32: { fontSize: '32px' },\n icon48: { fontSize: '48px' },\n caption2Strong: { ...typographyStyles.caption2Strong },\n caption1Strong: { ...typographyStyles.caption1Strong },\n body1Strong: { ...typographyStyles.body1Strong },\n subtitle2: { ...typographyStyles.subtitle2 },\n subtitle1: { ...typographyStyles.subtitle1 },\n title3: { ...typographyStyles.title3 },\n borderThin: { ...shorthands.borderWidth(tokens.strokeWidthThin) },\n borderThick: { ...shorthands.borderWidth(tokens.strokeWidthThick) },\n borderThicker: { ...shorthands.borderWidth(tokens.strokeWidthThicker) },\n borderThickest: { ...shorthands.borderWidth(tokens.strokeWidthThickest) },\n});\n\n/**\n * Styles for overflow list slot.\n */\nconst useOverflowContentStyles = makeStyles({\n base: {\n maxHeight: '220px',\n minHeight: '80px',\n ...shorthands.overflow('hidden', 'scroll'),\n ...shorthands.padding(tokens.spacingHorizontalS),\n width: '220px',\n },\n});\n\n/**\n * Apply styling to the AvatarGroup slots based on the state\n */\nexport const useAvatarGroupStyles_unstable = (state: AvatarGroupState): AvatarGroupState => {\n const { layout, overflowIndicator, size } = state;\n const styles = useStyles();\n const sizeStyles = useSizeStyles();\n const overflowContentStyles = useOverflowContentStyles();\n const overflowButtonStyles = useOverflowButtonStyles();\n\n const groupChildClassName = useGroupChildClassName(layout, size, true);\n\n state.root.className = mergeClasses(\n avatarGroupClassNames.root,\n styles.base,\n layout === 'pie' && styles.pie,\n layout === 'pie' && sizeStyles[size],\n layout === 'pie' && styles.focusIndicator,\n state.root.className,\n );\n\n if (state.overflowContent) {\n state.overflowContent.className = mergeClasses(\n avatarGroupClassNames.overflowContent,\n overflowContentStyles.base,\n state.overflowContent.className,\n );\n }\n\n const overflowButtonClasses = [];\n\n if (size < 36) {\n overflowButtonClasses.push(overflowButtonStyles.borderThin);\n } else if (size < 56) {\n overflowButtonClasses.push(overflowButtonStyles.borderThick);\n } else if (size < 72) {\n overflowButtonClasses.push(overflowButtonStyles.borderThicker);\n } else {\n overflowButtonClasses.push(overflowButtonStyles.borderThickest);\n }\n\n if (overflowIndicator === 'count') {\n if (size <= 24) {\n overflowButtonClasses.push(overflowButtonStyles.caption2Strong);\n } else if (size <= 28) {\n overflowButtonClasses.push(overflowButtonStyles.caption1Strong);\n } else if (size <= 40) {\n overflowButtonClasses.push(overflowButtonStyles.body1Strong);\n } else if (size <= 56) {\n overflowButtonClasses.push(overflowButtonStyles.subtitle2);\n } else if (size <= 96) {\n overflowButtonClasses.push(overflowButtonStyles.subtitle1);\n } else {\n overflowButtonClasses.push(overflowButtonStyles.title3);\n }\n } else {\n if (size <= 16) {\n overflowButtonClasses.push(overflowButtonStyles.icon12);\n } else if (size <= 24) {\n overflowButtonClasses.push(overflowButtonStyles.icon16);\n } else if (size <= 40) {\n overflowButtonClasses.push(overflowButtonStyles.icon20);\n } else if (size <= 48) {\n overflowButtonClasses.push(overflowButtonStyles.icon24);\n } else if (size <= 56) {\n overflowButtonClasses.push(overflowButtonStyles.icon28);\n } else if (size <= 72) {\n overflowButtonClasses.push(overflowButtonStyles.icon32);\n } else {\n overflowButtonClasses.push(overflowButtonStyles.icon48);\n }\n }\n\n if (state.overflowButton) {\n state.overflowButton.className = mergeClasses(\n avatarGroupClassNames.overflowButton,\n sizeStyles[size],\n overflowButtonStyles.base,\n ...overflowButtonClasses,\n layout !== 'pie' && overflowButtonStyles.states,\n layout !== 'pie' && overflowButtonStyles.focusIndicator,\n layout === 'pie' && overflowButtonStyles.pie,\n groupChildClassName,\n state.overflowButton.className,\n );\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
|
1
|
+
{"version":3,"sources":["components/AvatarGroup/useAvatarGroupStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAGA,MAAA,iBAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAEa,OAAA,CAAA,qBAAA,GAA0D;EACrE,IAAI,EAAE,iBAD+D;EAErE,eAAe,EAAE,kCAFoD;EAGrE,cAAc,EAAE,iCAHqD;EAIrE,eAAe,EAAE;AAJoD,CAA1D;AAOb;;AAEG;;AACH,MAAM,SAAS,gBAAG,OAAA,SAAA;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;EAAA;IAAA;EAAA;AAAA,EAAlB;AAwBA;;AAEG;;;AACH,MAAM,uBAAuB,gBAAG,OAAA,SAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IA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B,oBAAoB,CAAC,MAAhD;IACD;EACF;;EAED,IAAI,KAAK,CAAC,cAAV,EAA0B;IACxB,KAAK,CAAC,cAAN,CAAqB,SAArB,GAAiC,OAAA,CAAA,YAAA,CAC/B,OAAA,CAAA,qBAAA,CAAsB,cADS,EAE/B,UAAU,CAAC,IAAD,CAFqB,EAG/B,oBAAoB,CAAC,IAHU,EAI/B,GAAG,qBAJ4B,EAK/B,MAAM,KAAK,KAAX,IAAoB,oBAAoB,CAAC,MALV,EAM/B,MAAM,KAAK,KAAX,IAAoB,oBAAoB,CAAC,cANV,EAO/B,MAAM,KAAK,KAAX,IAAoB,oBAAoB,CAAC,iBAPV,EAQ/B,MAAM,KAAK,KAAX,IAAoB,oBAAoB,CAAC,GARV,EAS/B,mBAT+B,EAU/B,KAAK,CAAC,cAAN,CAAqB,SAVU,CAAjC;EAYD;;EAED,OAAO,KAAP;AACD,CA5FM;;AAAM,OAAA,CAAA,6BAAA,GAA6B,6BAA7B","sourcesContent":["import { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { useSizeStyles } from '../Avatar/useAvatarStyles';\nimport type { AvatarGroupSlots, AvatarGroupState } from './AvatarGroup.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { useGroupChildClassName } from '../../AvatarGroupItem';\n\nexport const avatarGroupClassNames: SlotClassNames<AvatarGroupSlots> = {\n root: 'fui-AvatarGroup',\n overflowContent: 'fui-AvatarGroup__overflowContent',\n overflowButton: 'fui-AvatarGroup__overflowButton',\n overflowSurface: 'fui-AvatarGroup__overflowSurface',\n};\n\n/**\n * Styles for the root slot.\n */\nconst useStyles = makeStyles({\n base: {\n display: 'inline-flex',\n position: 'relative',\n },\n pie: {\n clipPath: 'circle(50%)',\n backgroundColor: tokens.colorTransparentStroke,\n '@media (forced-colors: active)': {\n backgroundColor: 'CanvasText',\n },\n },\n overflowSurface: {\n ...shorthands.padding(0),\n },\n overflowContent: {\n maxHeight: '220px',\n minHeight: '80px',\n ...shorthands.overflow('hidden', 'scroll'),\n ...shorthands.padding(tokens.spacingHorizontalS),\n width: '220px',\n },\n});\n\n/**\n * Styles for overflow button slot.\n */\nconst useOverflowButtonStyles = makeStyles({\n base: {\n display: 'inline-flex',\n position: 'relative',\n flexShrink: 0,\n justifyContent: 'center',\n alignItems: 'center',\n color: tokens.colorNeutralForeground1,\n backgroundColor: tokens.colorNeutralBackground1,\n ...shorthands.borderColor(tokens.colorNeutralStroke1),\n ...shorthands.borderRadius(tokens.borderRadiusCircular),\n ...shorthands.borderStyle('solid'),\n ...shorthands.padding(0),\n\n // match color to Avatar's outline color\n '@media (forced-colors: active)': {\n ...shorthands.borderColor('CanvasText'),\n },\n },\n\n // These styles match the default button styles\n focusIndicator: createCustomFocusIndicatorStyle({\n ...shorthands.borderColor('transparent'),\n outlineColor: tokens.colorStrokeFocus2,\n outlineWidth: tokens.strokeWidthThick,\n outlineStyle: 'solid',\n }),\n\n // This custom focus indicator is required for the pie layout due to the clip-path applied to the root\n pieFocusIndicator: createCustomFocusIndicatorStyle({\n ...shorthands.border(tokens.strokeWidthThick, 'solid', tokens.colorStrokeFocus2),\n }),\n\n states: {\n ':hover': {\n color: tokens.colorNeutralForeground1Hover,\n backgroundColor: tokens.colorNeutralBackground1Hover,\n ...shorthands.borderColor(tokens.colorNeutralStroke1Hover),\n },\n ':active': {\n color: tokens.colorNeutralForeground1Pressed,\n backgroundColor: tokens.colorNeutralBackground1Pressed,\n ...shorthands.borderColor(tokens.colorNeutralStroke1Pressed),\n },\n },\n\n pie: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n color: 'transparent',\n },\n\n icon12: { fontSize: '12px' },\n icon16: { fontSize: '16px' },\n icon20: { fontSize: '20px' },\n icon24: { fontSize: '24px' },\n icon28: { fontSize: '28px' },\n icon32: { fontSize: '32px' },\n icon48: { fontSize: '48px' },\n caption2Strong: { ...typographyStyles.caption2Strong },\n caption1Strong: { ...typographyStyles.caption1Strong },\n body1Strong: { ...typographyStyles.body1Strong },\n subtitle2: { ...typographyStyles.subtitle2 },\n subtitle1: { ...typographyStyles.subtitle1 },\n title3: { ...typographyStyles.title3 },\n borderThin: { ...shorthands.borderWidth(tokens.strokeWidthThin) },\n borderThick: { ...shorthands.borderWidth(tokens.strokeWidthThick) },\n borderThicker: { ...shorthands.borderWidth(tokens.strokeWidthThicker) },\n borderThickest: { ...shorthands.borderWidth(tokens.strokeWidthThickest) },\n});\n\n/**\n * Apply styling to the AvatarGroup slots based on the state\n */\nexport const useAvatarGroupStyles_unstable = (state: AvatarGroupState): AvatarGroupState => {\n const { layout, overflowIndicator, size } = state;\n const styles = useStyles();\n const sizeStyles = useSizeStyles();\n const overflowButtonStyles = useOverflowButtonStyles();\n\n const groupChildClassName = useGroupChildClassName(layout, size, true);\n\n state.root.className = mergeClasses(\n avatarGroupClassNames.root,\n styles.base,\n layout === 'pie' && styles.pie,\n layout === 'pie' && sizeStyles[size],\n state.root.className,\n );\n\n if (state.overflowContent) {\n state.overflowContent.className = mergeClasses(\n avatarGroupClassNames.overflowContent,\n styles.overflowContent,\n state.overflowContent.className,\n );\n }\n\n if (state.overflowSurface) {\n state.overflowSurface.className = mergeClasses(\n avatarGroupClassNames.overflowSurface,\n styles.overflowSurface,\n state.overflowSurface.className,\n );\n }\n\n const overflowButtonClasses = [];\n\n if (size < 36) {\n overflowButtonClasses.push(overflowButtonStyles.borderThin);\n } else if (size < 56) {\n overflowButtonClasses.push(overflowButtonStyles.borderThick);\n } else if (size < 72) {\n overflowButtonClasses.push(overflowButtonStyles.borderThicker);\n } else {\n overflowButtonClasses.push(overflowButtonStyles.borderThickest);\n }\n\n if (overflowIndicator === 'count') {\n if (size <= 24) {\n overflowButtonClasses.push(overflowButtonStyles.caption2Strong);\n } else if (size <= 28) {\n overflowButtonClasses.push(overflowButtonStyles.caption1Strong);\n } else if (size <= 40) {\n overflowButtonClasses.push(overflowButtonStyles.body1Strong);\n } else if (size <= 56) {\n overflowButtonClasses.push(overflowButtonStyles.subtitle2);\n } else if (size <= 96) {\n overflowButtonClasses.push(overflowButtonStyles.subtitle1);\n } else {\n overflowButtonClasses.push(overflowButtonStyles.title3);\n }\n } else {\n if (size <= 16) {\n overflowButtonClasses.push(overflowButtonStyles.icon12);\n } else if (size <= 24) {\n overflowButtonClasses.push(overflowButtonStyles.icon16);\n } else if (size <= 40) {\n overflowButtonClasses.push(overflowButtonStyles.icon20);\n } else if (size <= 48) {\n overflowButtonClasses.push(overflowButtonStyles.icon24);\n } else if (size <= 56) {\n overflowButtonClasses.push(overflowButtonStyles.icon28);\n } else if (size <= 72) {\n overflowButtonClasses.push(overflowButtonStyles.icon32);\n } else {\n overflowButtonClasses.push(overflowButtonStyles.icon48);\n }\n }\n\n if (state.overflowButton) {\n state.overflowButton.className = mergeClasses(\n avatarGroupClassNames.overflowButton,\n sizeStyles[size],\n overflowButtonStyles.base,\n ...overflowButtonClasses,\n layout !== 'pie' && overflowButtonStyles.states,\n layout !== 'pie' && overflowButtonStyles.focusIndicator,\n layout === 'pie' && overflowButtonStyles.pieFocusIndicator,\n layout === 'pie' && overflowButtonStyles.pie,\n groupChildClassName,\n state.overflowButton.className,\n );\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.AvatarGroupOverflow = void 0;
|
|
7
|
+
|
|
8
|
+
const React = /*#__PURE__*/require("react");
|
|
9
|
+
|
|
10
|
+
const useAvatarGroupOverflow_1 = /*#__PURE__*/require("./useAvatarGroupOverflow");
|
|
11
|
+
|
|
12
|
+
const renderAvatarGroupOverflow_1 = /*#__PURE__*/require("./renderAvatarGroupOverflow");
|
|
13
|
+
|
|
14
|
+
const useAvatarGroupOverflowStyles_1 = /*#__PURE__*/require("./useAvatarGroupOverflowStyles");
|
|
15
|
+
/**
|
|
16
|
+
* AvatarGroupOverflow component - TODO: add more docs
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
exports.AvatarGroupOverflow = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
21
|
+
const state = useAvatarGroupOverflow_1.useAvatarGroupOverflow_unstable(props, ref);
|
|
22
|
+
useAvatarGroupOverflowStyles_1.useAvatarGroupOverflowStyles_unstable(state);
|
|
23
|
+
return renderAvatarGroupOverflow_1.renderAvatarGroupOverflow_unstable(state);
|
|
24
|
+
});
|
|
25
|
+
exports.AvatarGroupOverflow.displayName = 'AvatarGroupOverflow';
|
|
26
|
+
//# sourceMappingURL=AvatarGroupOverflow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/AvatarGroupOverflow/AvatarGroupOverflow.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,wBAAA,gBAAA,OAAA,CAAA,0BAAA,CAAA;;AACA,MAAA,2BAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AACA,MAAA,8BAAA,gBAAA,OAAA,CAAA,gCAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,mBAAA,gBAAqE,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAChH,MAAM,KAAK,GAAG,wBAAA,CAAA,+BAAA,CAAgC,KAAhC,EAAuC,GAAvC,CAAd;EAEA,8BAAA,CAAA,qCAAA,CAAsC,KAAtC;EACA,OAAO,2BAAA,CAAA,kCAAA,CAAmC,KAAnC,CAAP;AACD,CALiF,CAArE;AAOb,OAAA,CAAA,mBAAA,CAAoB,WAApB,GAAkC,qBAAlC","sourcesContent":["import * as React from 'react';\nimport { useAvatarGroupOverflow_unstable } from './useAvatarGroupOverflow';\nimport { renderAvatarGroupOverflow_unstable } from './renderAvatarGroupOverflow';\nimport { useAvatarGroupOverflowStyles_unstable } from './useAvatarGroupOverflowStyles';\nimport type { AvatarGroupOverflowProps } from './AvatarGroupOverflow.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * AvatarGroupOverflow component - TODO: add more docs\n */\nexport const AvatarGroupOverflow: ForwardRefComponent<AvatarGroupOverflowProps> = React.forwardRef((props, ref) => {\n const state = useAvatarGroupOverflow_unstable(props, ref);\n\n useAvatarGroupOverflowStyles_unstable(state);\n return renderAvatarGroupOverflow_unstable(state);\n});\n\nAvatarGroupOverflow.displayName = 'AvatarGroupOverflow';\n"],"sourceRoot":"../src/"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/AvatarGroupOverflow/AvatarGroupOverflow.types.ts"],"names":[],"mappings":";;;;IAeA","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type AvatarGroupOverflowSlots = {\n root: Slot<'div'>;\n};\n\n/**\n * AvatarGroupOverflow Props\n */\nexport type AvatarGroupOverflowProps = ComponentProps<AvatarGroupOverflowSlots> & {};\n\n/**\n * State used in rendering AvatarGroupOverflow\n */\nexport type AvatarGroupOverflowState = ComponentState<AvatarGroupOverflowSlots>;\n// & Required<Pick<AvatarGroupOverflowProps, 'propName'>>\n"],"sourceRoot":"../src/"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
const tslib_1 = /*#__PURE__*/require("tslib");
|
|
8
|
+
|
|
9
|
+
tslib_1.__exportStar(require("./AvatarGroupOverflow"), exports);
|
|
10
|
+
|
|
11
|
+
tslib_1.__exportStar(require("./AvatarGroupOverflow.types"), exports);
|
|
12
|
+
|
|
13
|
+
tslib_1.__exportStar(require("./renderAvatarGroupOverflow"), exports);
|
|
14
|
+
|
|
15
|
+
tslib_1.__exportStar(require("./useAvatarGroupOverflow"), exports);
|
|
16
|
+
|
|
17
|
+
tslib_1.__exportStar(require("./useAvatarGroupOverflowStyles"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/AvatarGroupOverflow/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,uBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,6BAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,6BAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,0BAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,gCAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './AvatarGroupOverflow';\nexport * from './AvatarGroupOverflow.types';\nexport * from './renderAvatarGroupOverflow';\nexport * from './useAvatarGroupOverflow';\nexport * from './useAvatarGroupOverflowStyles';\n"],"sourceRoot":"../src/"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.renderAvatarGroupOverflow_unstable = void 0;
|
|
7
|
+
|
|
8
|
+
const React = /*#__PURE__*/require("react");
|
|
9
|
+
|
|
10
|
+
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
|
11
|
+
/**
|
|
12
|
+
* Render the final JSX of AvatarGroupOverflow
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
const renderAvatarGroupOverflow_unstable = state => {
|
|
17
|
+
const {
|
|
18
|
+
slots,
|
|
19
|
+
slotProps
|
|
20
|
+
} = react_utilities_1.getSlots(state); // TODO Add additional slots in the appropriate place
|
|
21
|
+
|
|
22
|
+
return React.createElement(slots.root, { ...slotProps.root
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
exports.renderAvatarGroupOverflow_unstable = renderAvatarGroupOverflow_unstable;
|
|
27
|
+
//# sourceMappingURL=renderAvatarGroupOverflow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/AvatarGroupOverflow/renderAvatarGroupOverflow.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,kCAAkC,GAAI,KAAD,IAAoC;EACpF,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,iBAAA,CAAA,QAAA,CAAmC,KAAnC,CAA7B,CADoF,CAGpF;;EACA,OAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CAAP;AACD,CALM;;AAAM,OAAA,CAAA,kCAAA,GAAkC,kCAAlC","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { AvatarGroupOverflowState, AvatarGroupOverflowSlots } from './AvatarGroupOverflow.types';\n\n/**\n * Render the final JSX of AvatarGroupOverflow\n */\nexport const renderAvatarGroupOverflow_unstable = (state: AvatarGroupOverflowState) => {\n const { slots, slotProps } = getSlots<AvatarGroupOverflowSlots>(state);\n\n // TODO Add additional slots in the appropriate place\n return <slots.root {...slotProps.root} />;\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useAvatarGroupOverflow_unstable = void 0;
|
|
7
|
+
|
|
8
|
+
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
|
9
|
+
/**
|
|
10
|
+
* Create the state required to render AvatarGroupOverflow.
|
|
11
|
+
*
|
|
12
|
+
* The returned state can be modified with hooks such as useAvatarGroupOverflowStyles_unstable,
|
|
13
|
+
* before being passed to renderAvatarGroupOverflow_unstable.
|
|
14
|
+
*
|
|
15
|
+
* @param props - props from this instance of AvatarGroupOverflow
|
|
16
|
+
* @param ref - reference to root HTMLElement of AvatarGroupOverflow
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
const useAvatarGroupOverflow_unstable = (props, ref) => {
|
|
21
|
+
return {
|
|
22
|
+
// TODO add appropriate props/defaults
|
|
23
|
+
components: {
|
|
24
|
+
// TODO add each slot's element type or component
|
|
25
|
+
root: 'div'
|
|
26
|
+
},
|
|
27
|
+
// TODO add appropriate slots, for example:
|
|
28
|
+
// mySlot: resolveShorthand(props.mySlot),
|
|
29
|
+
root: react_utilities_1.getNativeElementProps('div', {
|
|
30
|
+
ref,
|
|
31
|
+
...props
|
|
32
|
+
})
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
exports.useAvatarGroupOverflow_unstable = useAvatarGroupOverflow_unstable;
|
|
37
|
+
//# sourceMappingURL=useAvatarGroupOverflow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/AvatarGroupOverflow/useAvatarGroupOverflow.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;;;;;;;AAQG;;;AACI,MAAM,+BAA+B,GAAG,CAC7C,KAD6C,EAE7C,GAF6C,KAGjB;EAC5B,OAAO;IACL;IACA,UAAU,EAAE;MACV;MACA,IAAI,EAAE;IAFI,CAFP;IAML;IACA;IACA,IAAI,EAAE,iBAAA,CAAA,qBAAA,CAAsB,KAAtB,EAA6B;MACjC,GADiC;MAEjC,GAAG;IAF8B,CAA7B;EARD,CAAP;AAaD,CAjBM;;AAAM,OAAA,CAAA,+BAAA,GAA+B,+BAA/B","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { AvatarGroupOverflowProps, AvatarGroupOverflowState } from './AvatarGroupOverflow.types';\n\n/**\n * Create the state required to render AvatarGroupOverflow.\n *\n * The returned state can be modified with hooks such as useAvatarGroupOverflowStyles_unstable,\n * before being passed to renderAvatarGroupOverflow_unstable.\n *\n * @param props - props from this instance of AvatarGroupOverflow\n * @param ref - reference to root HTMLElement of AvatarGroupOverflow\n */\nexport const useAvatarGroupOverflow_unstable = (\n props: AvatarGroupOverflowProps,\n ref: React.Ref<HTMLElement>,\n): AvatarGroupOverflowState => {\n return {\n // TODO add appropriate props/defaults\n components: {\n // TODO add each slot's element type or component\n root: 'div',\n },\n // TODO add appropriate slots, for example:\n // mySlot: resolveShorthand(props.mySlot),\n root: getNativeElementProps('div', {\n ref,\n ...props,\n }),\n };\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useAvatarGroupOverflowStyles_unstable = exports.avatarGroupOverflowClassNames = exports.avatarGroupOverflowClassName = void 0;
|
|
7
|
+
|
|
8
|
+
const react_1 = /*#__PURE__*/require("@griffel/react");
|
|
9
|
+
|
|
10
|
+
exports.avatarGroupOverflowClassName = 'fui-AvatarGroupOverflow';
|
|
11
|
+
exports.avatarGroupOverflowClassNames = {
|
|
12
|
+
root: 'fui-AvatarGroupOverflow' // TODO: add class names for all slots on AvatarGroupOverflowSlots.
|
|
13
|
+
// Should be of the form `<slotName>: 'fui-AvatarGroupOverflow__<slotName>`
|
|
14
|
+
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Styles for the root slot
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
const useStyles = /*#__PURE__*/react_1.__styles({
|
|
21
|
+
"root": {}
|
|
22
|
+
}, {});
|
|
23
|
+
/**
|
|
24
|
+
* Apply styling to the AvatarGroupOverflow slots based on the state
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
const useAvatarGroupOverflowStyles_unstable = state => {
|
|
29
|
+
const styles = useStyles();
|
|
30
|
+
state.root.className = react_1.mergeClasses(exports.avatarGroupOverflowClassName, styles.root, state.root.className); // TODO Add class names to slots, for example:
|
|
31
|
+
// state.mySlot.className = mergeClasses(styles.mySlot, state.mySlot.className);
|
|
32
|
+
|
|
33
|
+
return state;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
exports.useAvatarGroupOverflowStyles_unstable = useAvatarGroupOverflowStyles_unstable;
|
|
37
|
+
//# sourceMappingURL=useAvatarGroupOverflowStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/AvatarGroupOverflow/useAvatarGroupOverflowStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AAIa,OAAA,CAAA,4BAAA,GAA+B,yBAA/B;AACA,OAAA,CAAA,6BAAA,GAA0E;EACrF,IAAI,EAAE,yBAD+E,CAErF;EACA;;AAHqF,CAA1E;AAMb;;AAEG;;AACH,MAAM,SAAS,gBAAG,OAAA,SAAA;EAAA;AAAA,MAAlB;AAQA;;AAEG;;;AACI,MAAM,qCAAqC,GAAI,KAAD,IAA8D;EACjH,MAAM,MAAM,GAAG,SAAS,EAAxB;EACA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CAAa,OAAA,CAAA,4BAAb,EAA2C,MAAM,CAAC,IAAlD,EAAwD,KAAK,CAAC,IAAN,CAAW,SAAnE,CAAvB,CAFiH,CAIjH;EACA;;EAEA,OAAO,KAAP;AACD,CARM;;AAAM,OAAA,CAAA,qCAAA,GAAqC,qCAArC","sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport type { AvatarGroupOverflowSlots, AvatarGroupOverflowState } from './AvatarGroupOverflow.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const avatarGroupOverflowClassName = 'fui-AvatarGroupOverflow';\nexport const avatarGroupOverflowClassNames: SlotClassNames<AvatarGroupOverflowSlots> = {\n root: 'fui-AvatarGroupOverflow',\n // TODO: add class names for all slots on AvatarGroupOverflowSlots.\n // Should be of the form `<slotName>: 'fui-AvatarGroupOverflow__<slotName>`\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n // TODO Add default styles for the root element\n },\n\n // TODO add additional classes for different states and/or slots\n});\n\n/**\n * Apply styling to the AvatarGroupOverflow slots based on the state\n */\nexport const useAvatarGroupOverflowStyles_unstable = (state: AvatarGroupOverflowState): AvatarGroupOverflowState => {\n const styles = useStyles();\n state.root.className = mergeClasses(avatarGroupOverflowClassName, styles.root, state.root.className);\n\n // TODO Add class names to slots, for example:\n // state.mySlot.className = mergeClasses(styles.mySlot, state.mySlot.className);\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -9,6 +9,7 @@ const react_context_selector_1 = /*#__PURE__*/require("@fluentui/react-context-s
|
|
|
9
9
|
/**
|
|
10
10
|
* AvatarGroupContext is provided by AvatarGroup, and is consumed by Avatar to determine default values of some props.
|
|
11
11
|
*/
|
|
12
|
+
// eslint-disable-next-line @fluentui/no-context-default-value
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
exports.AvatarGroupContext = /*#__PURE__*/react_context_selector_1.createContext({});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["contexts/AvatarGroupContext.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,wBAAA,gBAAA,OAAA,CAAA,kCAAA,CAAA;AAIA;;AAEG;;;
|
|
1
|
+
{"version":3,"sources":["contexts/AvatarGroupContext.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,wBAAA,gBAAA,OAAA,CAAA,kCAAA,CAAA;AAIA;;AAEG;AACH;;;AACa,OAAA,CAAA,kBAAA,gBAAuD,wBAAA,CAAA,aAAA,CAAc,EAAd,CAAvD","sourcesContent":["import { createContext } from '@fluentui/react-context-selector';\nimport type { Context } from '@fluentui/react-context-selector';\nimport type { AvatarGroupContextValue } from './AvatarGroupContext.types';\n\n/**\n * AvatarGroupContext is provided by AvatarGroup, and is consumed by Avatar to determine default values of some props.\n */\n// eslint-disable-next-line @fluentui/no-context-default-value\nexport const AvatarGroupContext: Context<AvatarGroupContextValue> = createContext({});\n"],"sourceRoot":"../src/"}
|
package/lib-commonjs/index.js
CHANGED
|
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.useAvatarGroupItem_unstable = exports.useAvatarGroupItemStyles_unstable = exports.renderAvatarGroupItem_unstable = exports.avatarGroupItemClassNames = exports.AvatarGroupItem = exports.useAvatarGroup_unstable = exports.useAvatarGroupStyles_unstable = exports.renderAvatarGroup_unstable = exports.avatarGroupClassNames = exports.AvatarGroup = exports.getInitials = exports.useAvatar_unstable = exports.useAvatarStyles_unstable = exports.renderAvatar_unstable = exports.avatarClassNames = exports.Avatar = void 0;
|
|
7
7
|
|
|
8
|
+
const tslib_1 = /*#__PURE__*/require("tslib");
|
|
9
|
+
|
|
8
10
|
var Avatar_1 = /*#__PURE__*/require("./Avatar");
|
|
9
11
|
|
|
10
12
|
Object.defineProperty(exports, "Avatar", {
|
|
@@ -112,4 +114,6 @@ Object.defineProperty(exports, "useAvatarGroupItem_unstable", {
|
|
|
112
114
|
return AvatarGroupItem_1.useAvatarGroupItem_unstable;
|
|
113
115
|
}
|
|
114
116
|
});
|
|
117
|
+
|
|
118
|
+
tslib_1.__exportStar(require("./AvatarGroupOverflow"), exports);
|
|
115
119
|
//#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AAA;EAA8B;AAA9B,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,mCAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,iBAAA,CAAA,iCAAA;EAAiC;AAAjC,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,6BAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,iBAAA,CAAA,2BAAA;EAA2B;AAA3B,CAAA;;AAGF,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,uBAAA,CAAA,EAAA,OAAA","sourcesContent":["export {\n Avatar,\n avatarClassNames,\n renderAvatar_unstable,\n useAvatarStyles_unstable,\n useAvatar_unstable,\n} from './Avatar';\nexport type { AvatarNamedColor, AvatarProps, AvatarSlots, AvatarState, AvatarSizes } from './Avatar';\nexport { getInitials } from './utils/index';\nexport {\n AvatarGroup,\n avatarGroupClassNames,\n renderAvatarGroup_unstable,\n useAvatarGroupStyles_unstable,\n useAvatarGroup_unstable,\n} from './AvatarGroup';\nexport type { AvatarGroupProps, AvatarGroupSlots, AvatarGroupState } from './AvatarGroup';\nexport {\n AvatarGroupItem,\n avatarGroupItemClassNames,\n renderAvatarGroupItem_unstable,\n useAvatarGroupItemStyles_unstable,\n useAvatarGroupItem_unstable,\n} from './AvatarGroupItem';\nexport type { AvatarGroupItemProps, AvatarGroupItemSlots, AvatarGroupItemState } from './AvatarGroupItem';\nexport * from './AvatarGroupOverflow';\n"],"sourceRoot":"../src/"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-avatar",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.4",
|
|
4
4
|
"description": "React components for building Microsoft web experiences.",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -28,21 +28,21 @@
|
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@fluentui/eslint-plugin": "*",
|
|
30
30
|
"@fluentui/react-conformance": "*",
|
|
31
|
-
"@fluentui/react-conformance-griffel": "9.0.0-beta.
|
|
31
|
+
"@fluentui/react-conformance-griffel": "9.0.0-beta.12",
|
|
32
32
|
"@fluentui/scripts": "^1.0.0",
|
|
33
33
|
"es6-weak-map": "^2.0.2"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@fluentui/react-badge": "^9.0.
|
|
37
|
-
"@fluentui/react-context-selector": "^9.0.
|
|
38
|
-
"@fluentui/react-icons": "^2.0.
|
|
39
|
-
"@fluentui/react-popover": "^9.0.
|
|
36
|
+
"@fluentui/react-badge": "^9.0.4",
|
|
37
|
+
"@fluentui/react-context-selector": "^9.0.2",
|
|
38
|
+
"@fluentui/react-icons": "^2.0.175",
|
|
39
|
+
"@fluentui/react-popover": "^9.0.4",
|
|
40
40
|
"@fluentui/react-shared-contexts": "^9.0.0",
|
|
41
|
-
"@fluentui/react-tabster": "^9.0
|
|
41
|
+
"@fluentui/react-tabster": "^9.1.0",
|
|
42
42
|
"@fluentui/react-theme": "^9.0.0",
|
|
43
|
-
"@fluentui/react-tooltip": "^9.0.
|
|
44
|
-
"@fluentui/react-utilities": "^9.0.
|
|
45
|
-
"@griffel/react": "^1.2.
|
|
43
|
+
"@fluentui/react-tooltip": "^9.0.4",
|
|
44
|
+
"@fluentui/react-utilities": "^9.0.2",
|
|
45
|
+
"@griffel/react": "^1.2.3",
|
|
46
46
|
"tslib": "^2.1.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
@@ -54,7 +54,8 @@
|
|
|
54
54
|
},
|
|
55
55
|
"beachball": {
|
|
56
56
|
"disallowedChangeTypes": [
|
|
57
|
-
"major"
|
|
57
|
+
"major",
|
|
58
|
+
"prerelease"
|
|
58
59
|
]
|
|
59
60
|
},
|
|
60
61
|
"exports": {
|