@fluentui/react-card 9.0.0-beta.3 → 9.0.0-beta.31
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 +1473 -1
- package/CHANGELOG.md +422 -31
- package/README.md +68 -4
- package/dist/index.d.ts +286 -0
- package/lib/Card.js.map +1 -1
- package/lib/CardFooter.js.map +1 -1
- package/lib/CardHeader.js.map +1 -1
- package/lib/CardPreview.js.map +1 -1
- package/lib/components/Card/Card.js +8 -8
- package/lib/components/Card/Card.js.map +1 -1
- package/lib/components/Card/Card.types.js.map +1 -1
- package/lib/components/Card/index.js.map +1 -1
- package/lib/components/Card/renderCard.js +8 -8
- package/lib/components/Card/renderCard.js.map +1 -1
- package/lib/components/Card/useCard.js +31 -11
- package/lib/components/Card/useCard.js.map +1 -1
- package/lib/components/Card/useCardStyles.js +221 -25
- package/lib/components/Card/useCardStyles.js.map +1 -1
- package/lib/components/CardFooter/CardFooter.js +7 -7
- package/lib/components/CardFooter/CardFooter.js.map +1 -1
- package/lib/components/CardFooter/CardFooter.types.js.map +1 -1
- package/lib/components/CardFooter/index.js.map +1 -1
- package/lib/components/CardFooter/renderCardFooter.js +9 -9
- package/lib/components/CardFooter/renderCardFooter.js.map +1 -1
- package/lib/components/CardFooter/useCardFooter.js +10 -13
- package/lib/components/CardFooter/useCardFooter.js.map +1 -1
- package/lib/components/CardFooter/useCardFooterStyles.js +16 -10
- package/lib/components/CardFooter/useCardFooterStyles.js.map +1 -1
- package/lib/components/CardHeader/CardHeader.js +7 -7
- package/lib/components/CardHeader/CardHeader.js.map +1 -1
- package/lib/components/CardHeader/CardHeader.types.js.map +1 -1
- package/lib/components/CardHeader/index.js.map +1 -1
- package/lib/components/CardHeader/renderCardHeader.js +12 -9
- package/lib/components/CardHeader/renderCardHeader.js.map +1 -1
- package/lib/components/CardHeader/useCardHeader.js +16 -23
- package/lib/components/CardHeader/useCardHeader.js.map +1 -1
- package/lib/components/CardHeader/useCardHeaderStyles.js +54 -32
- package/lib/components/CardHeader/useCardHeaderStyles.js.map +1 -1
- package/lib/components/CardPreview/CardPreview.js +7 -7
- package/lib/components/CardPreview/CardPreview.js.map +1 -1
- package/lib/components/CardPreview/CardPreview.types.js.map +1 -1
- package/lib/components/CardPreview/index.js.map +1 -1
- package/lib/components/CardPreview/renderCardPreview.js +9 -9
- package/lib/components/CardPreview/renderCardPreview.js.map +1 -1
- package/lib/components/CardPreview/useCardPreview.js +10 -13
- package/lib/components/CardPreview/useCardPreview.js.map +1 -1
- package/lib/components/CardPreview/useCardPreviewStyles.js +17 -15
- package/lib/components/CardPreview/useCardPreviewStyles.js.map +1 -1
- package/lib/index.js +4 -4
- package/lib/index.js.map +1 -1
- package/lib-commonjs/Card.js +1 -1
- package/lib-commonjs/Card.js.map +1 -1
- package/lib-commonjs/CardFooter.js +1 -1
- package/lib-commonjs/CardFooter.js.map +1 -1
- package/lib-commonjs/CardHeader.js +1 -1
- package/lib-commonjs/CardHeader.js.map +1 -1
- package/lib-commonjs/CardPreview.js +1 -1
- package/lib-commonjs/CardPreview.js.map +1 -1
- package/lib-commonjs/components/Card/Card.js +9 -9
- package/lib-commonjs/components/Card/Card.js.map +1 -1
- package/lib-commonjs/components/Card/Card.types.js.map +1 -1
- package/lib-commonjs/components/Card/index.js +1 -1
- package/lib-commonjs/components/Card/index.js.map +1 -1
- package/lib-commonjs/components/Card/renderCard.js +12 -13
- package/lib-commonjs/components/Card/renderCard.js.map +1 -1
- package/lib-commonjs/components/Card/useCard.js +34 -15
- package/lib-commonjs/components/Card/useCard.js.map +1 -1
- package/lib-commonjs/components/Card/useCardStyles.js +228 -27
- package/lib-commonjs/components/Card/useCardStyles.js.map +1 -1
- package/lib-commonjs/components/CardFooter/CardFooter.js +8 -8
- package/lib-commonjs/components/CardFooter/CardFooter.js.map +1 -1
- package/lib-commonjs/components/CardFooter/CardFooter.types.js.map +1 -1
- package/lib-commonjs/components/CardFooter/index.js +1 -1
- package/lib-commonjs/components/CardFooter/index.js.map +1 -1
- package/lib-commonjs/components/CardFooter/renderCardFooter.js +13 -15
- package/lib-commonjs/components/CardFooter/renderCardFooter.js.map +1 -1
- package/lib-commonjs/components/CardFooter/useCardFooter.js +14 -18
- package/lib-commonjs/components/CardFooter/useCardFooter.js.map +1 -1
- package/lib-commonjs/components/CardFooter/useCardFooterStyles.js +18 -12
- package/lib-commonjs/components/CardFooter/useCardFooterStyles.js.map +1 -1
- package/lib-commonjs/components/CardHeader/CardHeader.js +8 -8
- package/lib-commonjs/components/CardHeader/CardHeader.js.map +1 -1
- package/lib-commonjs/components/CardHeader/CardHeader.types.js.map +1 -1
- package/lib-commonjs/components/CardHeader/index.js +1 -1
- package/lib-commonjs/components/CardHeader/index.js.map +1 -1
- package/lib-commonjs/components/CardHeader/renderCardHeader.js +16 -15
- package/lib-commonjs/components/CardHeader/renderCardHeader.js.map +1 -1
- package/lib-commonjs/components/CardHeader/useCardHeader.js +20 -29
- package/lib-commonjs/components/CardHeader/useCardHeader.js.map +1 -1
- package/lib-commonjs/components/CardHeader/useCardHeaderStyles.js +56 -34
- package/lib-commonjs/components/CardHeader/useCardHeaderStyles.js.map +1 -1
- package/lib-commonjs/components/CardPreview/CardPreview.js +8 -8
- package/lib-commonjs/components/CardPreview/CardPreview.js.map +1 -1
- package/lib-commonjs/components/CardPreview/CardPreview.types.js.map +1 -1
- package/lib-commonjs/components/CardPreview/index.js +1 -1
- package/lib-commonjs/components/CardPreview/index.js.map +1 -1
- package/lib-commonjs/components/CardPreview/renderCardPreview.js +13 -15
- package/lib-commonjs/components/CardPreview/renderCardPreview.js.map +1 -1
- package/lib-commonjs/components/CardPreview/useCardPreview.js +14 -18
- package/lib-commonjs/components/CardPreview/useCardPreview.js.map +1 -1
- package/lib-commonjs/components/CardPreview/useCardPreviewStyles.js +19 -17
- package/lib-commonjs/components/CardPreview/useCardPreviewStyles.js.map +1 -1
- package/lib-commonjs/index.js +140 -5
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +27 -29
- package/assets/ai_deck_template.png +0 -0
- package/assets/avatar_elvia.svg +0 -9
- package/assets/avatar_mauricio.svg +0 -9
- package/assets/doc_template.png +0 -0
- package/assets/powerpoint_logo.svg +0 -9
- package/assets/sales_template.png +0 -0
- package/assets/word_logo.svg +0 -9
- package/dist/react-card.d.ts +0 -188
- package/lib/Card.d.ts +0 -1
- package/lib/CardFooter.d.ts +0 -1
- package/lib/CardHeader.d.ts +0 -1
- package/lib/CardPreview.d.ts +0 -1
- package/lib/common/isConformant.d.ts +0 -4
- package/lib/common/isConformant.js +0 -11
- package/lib/common/isConformant.js.map +0 -1
- package/lib/components/Card/Card.d.ts +0 -6
- package/lib/components/Card/Card.types.d.ts +0 -13
- package/lib/components/Card/index.d.ts +0 -5
- package/lib/components/Card/renderCard.d.ts +0 -5
- package/lib/components/Card/useCard.d.ts +0 -12
- package/lib/components/Card/useCardStyles.d.ts +0 -5
- package/lib/components/CardFooter/CardFooter.d.ts +0 -6
- package/lib/components/CardFooter/CardFooter.types.d.ts +0 -13
- package/lib/components/CardFooter/index.d.ts +0 -5
- package/lib/components/CardFooter/renderCardFooter.d.ts +0 -5
- package/lib/components/CardFooter/useCardFooter.d.ts +0 -16
- package/lib/components/CardFooter/useCardFooterStyles.d.ts +0 -5
- package/lib/components/CardHeader/CardHeader.d.ts +0 -6
- package/lib/components/CardHeader/CardHeader.types.d.ts +0 -17
- package/lib/components/CardHeader/index.d.ts +0 -5
- package/lib/components/CardHeader/renderCardHeader.d.ts +0 -5
- package/lib/components/CardHeader/useCardHeader.d.ts +0 -13
- package/lib/components/CardHeader/useCardHeaderStyles.d.ts +0 -5
- package/lib/components/CardPreview/CardPreview.d.ts +0 -6
- package/lib/components/CardPreview/CardPreview.types.d.ts +0 -13
- package/lib/components/CardPreview/index.d.ts +0 -5
- package/lib/components/CardPreview/renderCardPreview.d.ts +0 -5
- package/lib/components/CardPreview/useCardPreview.d.ts +0 -16
- package/lib/components/CardPreview/useCardPreviewStyles.d.ts +0 -5
- package/lib/index.d.ts +0 -4
- package/lib/tsdoc-metadata.json +0 -11
- package/lib-commonjs/Card.d.ts +0 -1
- package/lib-commonjs/CardFooter.d.ts +0 -1
- package/lib-commonjs/CardHeader.d.ts +0 -1
- package/lib-commonjs/CardPreview.d.ts +0 -1
- package/lib-commonjs/common/isConformant.d.ts +0 -4
- package/lib-commonjs/common/isConformant.js +0 -22
- package/lib-commonjs/common/isConformant.js.map +0 -1
- package/lib-commonjs/components/Card/Card.d.ts +0 -6
- package/lib-commonjs/components/Card/Card.types.d.ts +0 -13
- package/lib-commonjs/components/Card/index.d.ts +0 -5
- package/lib-commonjs/components/Card/renderCard.d.ts +0 -5
- package/lib-commonjs/components/Card/useCard.d.ts +0 -12
- package/lib-commonjs/components/Card/useCardStyles.d.ts +0 -5
- package/lib-commonjs/components/CardFooter/CardFooter.d.ts +0 -6
- package/lib-commonjs/components/CardFooter/CardFooter.types.d.ts +0 -13
- package/lib-commonjs/components/CardFooter/index.d.ts +0 -5
- package/lib-commonjs/components/CardFooter/renderCardFooter.d.ts +0 -5
- package/lib-commonjs/components/CardFooter/useCardFooter.d.ts +0 -16
- package/lib-commonjs/components/CardFooter/useCardFooterStyles.d.ts +0 -5
- package/lib-commonjs/components/CardHeader/CardHeader.d.ts +0 -6
- package/lib-commonjs/components/CardHeader/CardHeader.types.d.ts +0 -17
- package/lib-commonjs/components/CardHeader/index.d.ts +0 -5
- package/lib-commonjs/components/CardHeader/renderCardHeader.d.ts +0 -5
- package/lib-commonjs/components/CardHeader/useCardHeader.d.ts +0 -13
- package/lib-commonjs/components/CardHeader/useCardHeaderStyles.d.ts +0 -5
- package/lib-commonjs/components/CardPreview/CardPreview.d.ts +0 -6
- package/lib-commonjs/components/CardPreview/CardPreview.types.d.ts +0 -13
- package/lib-commonjs/components/CardPreview/index.d.ts +0 -5
- package/lib-commonjs/components/CardPreview/renderCardPreview.d.ts +0 -5
- package/lib-commonjs/components/CardPreview/useCardPreview.d.ts +0 -16
- package/lib-commonjs/components/CardPreview/useCardPreviewStyles.d.ts +0 -5
- package/lib-commonjs/index.d.ts +0 -4
@@ -1,44 +1,240 @@
|
|
1
|
-
import { __styles, mergeClasses } from '@
|
1
|
+
import { shorthands, __styles, mergeClasses } from '@griffel/react';
|
2
|
+
import { tokens } from '@fluentui/react-theme';
|
3
|
+
import { cardPreviewClassNames } from '../CardPreview/useCardPreviewStyles';
|
4
|
+
import { cardHeaderClassNames } from '../CardHeader/useCardHeaderStyles';
|
5
|
+
import { cardFooterClassNames } from '../CardFooter/useCardFooterStyles';
|
6
|
+
import { createFocusOutlineStyle } from '@fluentui/react-tabster';
|
2
7
|
/**
|
3
|
-
*
|
8
|
+
* Static CSS class names used internally for the component slots.
|
4
9
|
*/
|
5
10
|
|
6
|
-
|
11
|
+
export const cardClassNames = {
|
12
|
+
root: 'fui-Card'
|
13
|
+
};
|
14
|
+
/**
|
15
|
+
* CSS variable names used internally for uniform styling in Card.
|
16
|
+
*/
|
17
|
+
|
18
|
+
export const cardCSSVars = {
|
19
|
+
cardSizeVar: '--fui-Card--size',
|
20
|
+
cardBorderRadiusVar: '--fui-Card--border-radius'
|
21
|
+
};
|
22
|
+
|
23
|
+
const useStyles = /*#__PURE__*/__styles({
|
7
24
|
"root": {
|
8
25
|
"mc9l5x": "f22iagw",
|
9
|
-
"
|
10
|
-
"
|
11
|
-
"
|
26
|
+
"qhf8xq": "f10pi13n",
|
27
|
+
"B68tc82": "f1p9o1ba",
|
28
|
+
"Bmxbyg5": "f1sil6mw",
|
12
29
|
"sj55zd": "f19n0e5",
|
13
|
-
"
|
14
|
-
"
|
15
|
-
"
|
16
|
-
"
|
17
|
-
"
|
18
|
-
"
|
19
|
-
"
|
20
|
-
"
|
21
|
-
"
|
22
|
-
"
|
23
|
-
|
24
|
-
|
30
|
+
"E3zdtr": "f1mdlcz9",
|
31
|
+
"bn5sak": "frwkxtg",
|
32
|
+
"Eqx8gd": ["f1n6gb5g", "f15yvnhg"],
|
33
|
+
"B1piin3": ["f15yvnhg", "f1n6gb5g"],
|
34
|
+
"By385i5": "fo72kxq",
|
35
|
+
"Bsft5z2": "f13zj6fq",
|
36
|
+
"B80jsxd": "f1nwj1ja",
|
37
|
+
"Bm2nyyq": "f8rth92",
|
38
|
+
"Barhvk9": ["flthirb", "ftkbnf5"],
|
39
|
+
"Bw17bha": "f1lh990p",
|
40
|
+
"vfts7": ["ftkbnf5", "flthirb"],
|
41
|
+
"xrcqlc": "f6czdpx",
|
42
|
+
"Ihftqj": ["f13hvwk3", "f1en4csx"],
|
43
|
+
"Bcgy8vk": "f1i1u9k0",
|
44
|
+
"Bhxzhr1": ["f1en4csx", "f13hvwk3"],
|
45
|
+
"B3778ie": ["f1qnomq5", "f2fl922"],
|
46
|
+
"d9w3h3": ["f2fl922", "f1qnomq5"],
|
47
|
+
"Bl18szs": ["f1anhtl", "f1n2zcl3"],
|
48
|
+
"B4j8arr": ["f1n2zcl3", "f1anhtl"],
|
49
|
+
"Bbmb7ep": ["fifeqxg", "f899z7z"],
|
50
|
+
"Beyfa6y": ["f899z7z", "fifeqxg"],
|
51
|
+
"B7oj6ja": ["f4h3tyx", "f18ur2pz"],
|
52
|
+
"Btl43ni": ["f18ur2pz", "f4h3tyx"],
|
53
|
+
"z8tnut": "f1lplnzb",
|
54
|
+
"z189sj": ["f10m5gbb", "f1k04kkk"],
|
55
|
+
"Byoj8tv": "fhftqfp",
|
56
|
+
"uwmqm3": ["f1k04kkk", "f10m5gbb"],
|
57
|
+
"i8kkvl": "fxsr4vj",
|
58
|
+
"Belr9w4": "fcvsdzp",
|
59
|
+
"B2jhnfs": "f16v3d5c",
|
60
|
+
"wiictr": "f1su8t2g",
|
61
|
+
"Brovlpu": "ftqa4ok",
|
62
|
+
"B486eqv": "f2hkw1w",
|
63
|
+
"B8q5s1w": "f8hki3x",
|
64
|
+
"Bci5o5g": ["f1d2448m", "ffh67wi"],
|
65
|
+
"n8qw10": "f1bjia2o",
|
66
|
+
"Bdrgwmp": ["ffh67wi", "f1d2448m"],
|
67
|
+
"Bm4h7ae": "f15bsgw9",
|
68
|
+
"B7ys5i9": "f14e48fq",
|
69
|
+
"Busjfv9": "f18yb2kv",
|
70
|
+
"Bhk32uz": "fd6o370",
|
71
|
+
"Bf4ptjt": "fh1cnn4",
|
72
|
+
"kclons": ["fy7oxxb", "f184ne2d"],
|
73
|
+
"Bhdgwq3": "fpukqih",
|
74
|
+
"Blkhhs4": ["f184ne2d", "fy7oxxb"],
|
75
|
+
"Bqtpl0w": "f99gebs",
|
76
|
+
"clg4pj": ["f13b0oaq", "f8t2bz6"],
|
77
|
+
"hgwjuy": "f1jvq617",
|
78
|
+
"Bonggc9": ["f8t2bz6", "f13b0oaq"],
|
79
|
+
"B1tsrr9": ["f11unbnk", "fbd201q"],
|
80
|
+
"Dah5zi": ["fbd201q", "f11unbnk"],
|
81
|
+
"Bkh64rk": ["f12nqxso", "f1uguk4w"],
|
82
|
+
"qqdqy8": ["f1uguk4w", "f12nqxso"],
|
83
|
+
"B6dhp37": "f1dvezut",
|
84
|
+
"i03rao": ["fd0oaoj", "f1cwg4i8"],
|
85
|
+
"Boxcth7": "fjvm52t",
|
86
|
+
"Bsom6fd": ["f1cwg4i8", "fd0oaoj"],
|
87
|
+
"J0r882": "f3l4wcz",
|
88
|
+
"Bjwuhne": "f6j2biq",
|
89
|
+
"Ghsupd": ["fdzzmfx", "fduh8kh"],
|
90
|
+
"Bule8hv": ["fduh8kh", "fdzzmfx"]
|
91
|
+
},
|
92
|
+
"orientationHorizontal": {
|
93
|
+
"Beiy3e4": "f1063pyq",
|
94
|
+
"Bt984gj": "f122n59",
|
95
|
+
"Bnoktp0": "fpfyeui",
|
96
|
+
"Idhjb2": "fwi74qw",
|
97
|
+
"Bsdbyht": ["f1yfsbdm", "f1vk4t4a"]
|
98
|
+
},
|
99
|
+
"orientationVertical": {
|
100
|
+
"Beiy3e4": "f1vx9l62",
|
101
|
+
"Bt4kzjz": ["fobhde4", "fx5r7kn"],
|
102
|
+
"B1ou843": ["fx5r7kn", "fobhde4"],
|
103
|
+
"ydhu1d": "frl7skw"
|
104
|
+
},
|
105
|
+
"sizeSmall": {
|
106
|
+
"B7balbw": "f1pi9uxy",
|
107
|
+
"B1h88n7": "f1h1zgly"
|
108
|
+
},
|
109
|
+
"sizeMedium": {
|
110
|
+
"B7balbw": "frsmuga",
|
111
|
+
"B1h88n7": "fuldkky"
|
112
|
+
},
|
113
|
+
"sizeLarge": {
|
114
|
+
"B7balbw": "f1qua4xo",
|
115
|
+
"B1h88n7": "fimkt6v"
|
116
|
+
},
|
117
|
+
"interactiveNoOutline": {
|
118
|
+
"Be0v6ae": "ftr40te",
|
119
|
+
"B5kxglz": ["fcsoo7g", "f1rl4q8i"],
|
120
|
+
"B3pwyw6": "fbb4roj",
|
121
|
+
"Bymgtzf": ["f1rl4q8i", "fcsoo7g"],
|
122
|
+
"dmfk": "fd4vwcp",
|
123
|
+
"B4ofi8": ["f1crelnc", "fup9tr0"],
|
124
|
+
"jgq6uv": "f12d33p4",
|
125
|
+
"Baxewws": ["fup9tr0", "f1crelnc"]
|
126
|
+
},
|
127
|
+
"filledInteractive": {
|
25
128
|
"Bceei9c": "f1k6fduh",
|
129
|
+
"De3pzq": "fxugw4r",
|
130
|
+
"E5pizo": "f1whvlc6",
|
131
|
+
"B0n5ga8": "f16gxe2i",
|
132
|
+
"s924m2": ["fpgykix", "fzybk4o"],
|
133
|
+
"B1q35kw": "f1osi826",
|
134
|
+
"Gp14am": ["fzybk4o", "fpgykix"],
|
26
135
|
"Jwef8y": "f1knas48",
|
136
|
+
"Bvxd0ez": "f1m145df",
|
27
137
|
"ecr2s2": "fb40n2d"
|
138
|
+
},
|
139
|
+
"filled": {
|
140
|
+
"De3pzq": "fxugw4r",
|
141
|
+
"E5pizo": "f1whvlc6",
|
142
|
+
"B0n5ga8": "f16gxe2i",
|
143
|
+
"s924m2": ["fpgykix", "fzybk4o"],
|
144
|
+
"B1q35kw": "f1osi826",
|
145
|
+
"Gp14am": ["fzybk4o", "fpgykix"]
|
146
|
+
},
|
147
|
+
"filledAlternativeInteractive": {
|
148
|
+
"Bceei9c": "f1k6fduh",
|
149
|
+
"De3pzq": "f1dmdbja",
|
150
|
+
"E5pizo": "f1whvlc6",
|
151
|
+
"B0n5ga8": "f16gxe2i",
|
152
|
+
"s924m2": ["fpgykix", "fzybk4o"],
|
153
|
+
"B1q35kw": "f1osi826",
|
154
|
+
"Gp14am": ["fzybk4o", "fpgykix"],
|
155
|
+
"Jwef8y": "f1uvynv3",
|
156
|
+
"Bvxd0ez": "f1m145df",
|
157
|
+
"ecr2s2": "f1yhgkbh"
|
158
|
+
},
|
159
|
+
"filledAlternative": {
|
160
|
+
"De3pzq": "f1dmdbja",
|
161
|
+
"E5pizo": "f1whvlc6",
|
162
|
+
"B0n5ga8": "f16gxe2i",
|
163
|
+
"s924m2": ["fpgykix", "fzybk4o"],
|
164
|
+
"B1q35kw": "f1osi826",
|
165
|
+
"Gp14am": ["fzybk4o", "fpgykix"]
|
166
|
+
},
|
167
|
+
"outlineInteractive": {
|
168
|
+
"Bceei9c": "f1k6fduh",
|
169
|
+
"De3pzq": "f1c21dwh",
|
170
|
+
"E5pizo": "f1couhl3",
|
171
|
+
"B0n5ga8": "ft83z1f",
|
172
|
+
"s924m2": ["f1g4150c", "f192dr6e"],
|
173
|
+
"B1q35kw": "f1qnawh6",
|
174
|
+
"Gp14am": ["f192dr6e", "f1g4150c"],
|
175
|
+
"Jwef8y": "fjxutwb",
|
176
|
+
"Be0v6ae": "f1llr77y",
|
177
|
+
"B5kxglz": ["fzk0khw", "fjj8tog"],
|
178
|
+
"B3pwyw6": "fb1u8ub",
|
179
|
+
"Bymgtzf": ["fjj8tog", "fzk0khw"],
|
180
|
+
"ecr2s2": "fophhak",
|
181
|
+
"dmfk": "f1uohb70",
|
182
|
+
"B4ofi8": ["f1jm7v1n", "f1bus3rq"],
|
183
|
+
"jgq6uv": "f1fbu7rr",
|
184
|
+
"Baxewws": ["f1bus3rq", "f1jm7v1n"]
|
185
|
+
},
|
186
|
+
"outline": {
|
187
|
+
"De3pzq": "f1c21dwh",
|
188
|
+
"E5pizo": "f1couhl3",
|
189
|
+
"B0n5ga8": "ft83z1f",
|
190
|
+
"s924m2": ["f1g4150c", "f192dr6e"],
|
191
|
+
"B1q35kw": "f1qnawh6",
|
192
|
+
"Gp14am": ["f192dr6e", "f1g4150c"]
|
193
|
+
},
|
194
|
+
"subtleInteractive": {
|
195
|
+
"Bceei9c": "f1k6fduh",
|
196
|
+
"De3pzq": "fhovq9v",
|
197
|
+
"E5pizo": "f1couhl3",
|
198
|
+
"B0n5ga8": "f16gxe2i",
|
199
|
+
"s924m2": ["fpgykix", "fzybk4o"],
|
200
|
+
"B1q35kw": "f1osi826",
|
201
|
+
"Gp14am": ["fzybk4o", "fpgykix"],
|
202
|
+
"Jwef8y": "f1t94bn6",
|
203
|
+
"ecr2s2": "f1wfn5kd"
|
204
|
+
},
|
205
|
+
"subtle": {
|
206
|
+
"De3pzq": "fhovq9v",
|
207
|
+
"E5pizo": "f1couhl3",
|
208
|
+
"B0n5ga8": "f16gxe2i",
|
209
|
+
"s924m2": ["fpgykix", "fzybk4o"],
|
210
|
+
"B1q35kw": "f1osi826",
|
211
|
+
"Gp14am": ["fzybk4o", "fpgykix"]
|
28
212
|
}
|
29
213
|
}, {
|
30
|
-
"d": [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".
|
31
|
-
"
|
32
|
-
"
|
214
|
+
"d": [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f10pi13n{position:relative;}", ".f1p9o1ba{overflow-x:hidden;}", ".f1sil6mw{overflow-y:hidden;}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".f1mdlcz9::after{position:absolute;}", ".frwkxtg::after{top:0;}", ".f1n6gb5g::after{left:0;}", ".f15yvnhg::after{right:0;}", ".fo72kxq::after{bottom:0;}", ".f13zj6fq::after{content:\"\";}", ".f1nwj1ja::after{pointer-events:none;}", ".f8rth92::after{border-top-style:solid;}", ".flthirb::after{border-right-style:solid;}", ".ftkbnf5::after{border-left-style:solid;}", ".f1lh990p::after{border-bottom-style:solid;}", ".f6czdpx::after{border-top-width:var(--strokeWidthThin);}", ".f13hvwk3::after{border-right-width:var(--strokeWidthThin);}", ".f1en4csx::after{border-left-width:var(--strokeWidthThin);}", ".f1i1u9k0::after{border-bottom-width:var(--strokeWidthThin);}", ".f1qnomq5::after{border-bottom-right-radius:var(--fui-Card--border-radius);}", ".f2fl922::after{border-bottom-left-radius:var(--fui-Card--border-radius);}", ".f1anhtl::after{border-top-right-radius:var(--fui-Card--border-radius);}", ".f1n2zcl3::after{border-top-left-radius:var(--fui-Card--border-radius);}", ".fifeqxg{border-bottom-right-radius:var(--fui-Card--border-radius);}", ".f899z7z{border-bottom-left-radius:var(--fui-Card--border-radius);}", ".f4h3tyx{border-top-right-radius:var(--fui-Card--border-radius);}", ".f18ur2pz{border-top-left-radius:var(--fui-Card--border-radius);}", ".f1lplnzb{padding-top:var(--fui-Card--size);}", ".f10m5gbb{padding-right:var(--fui-Card--size);}", ".f1k04kkk{padding-left:var(--fui-Card--size);}", ".fhftqfp{padding-bottom:var(--fui-Card--size);}", ".fxsr4vj{-webkit-column-gap:var(--fui-Card--size);column-gap:var(--fui-Card--size);}", ".fcvsdzp{row-gap:var(--fui-Card--size);}", ".f16v3d5c>.fui-CardHeader,.f16v3d5c>.fui-CardFooter{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;}", ".f1su8t2g>:not(.fui-CardPreview):not(.fui-CardHeader):not(.fui-CardFooter){-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".f8hki3x[data-fui-focus-visible]{border-top-color:transparent;}", ".f1d2448m[data-fui-focus-visible]{border-right-color:transparent;}", ".ffh67wi[data-fui-focus-visible]{border-left-color:transparent;}", ".f1bjia2o[data-fui-focus-visible]{border-bottom-color:transparent;}", ".f15bsgw9[data-fui-focus-visible]::after{content:\"\";}", ".f14e48fq[data-fui-focus-visible]::after{position:absolute;}", ".f18yb2kv[data-fui-focus-visible]::after{pointer-events:none;}", ".fd6o370[data-fui-focus-visible]::after{z-index:1;}", ".fh1cnn4[data-fui-focus-visible]::after{border-top-style:solid;}", ".fy7oxxb[data-fui-focus-visible]::after{border-right-style:solid;}", ".f184ne2d[data-fui-focus-visible]::after{border-left-style:solid;}", ".fpukqih[data-fui-focus-visible]::after{border-bottom-style:solid;}", ".f99gebs[data-fui-focus-visible]::after{border-top-width:var(--strokeWidthThick);}", ".f13b0oaq[data-fui-focus-visible]::after{border-right-width:var(--strokeWidthThick);}", ".f8t2bz6[data-fui-focus-visible]::after{border-left-width:var(--strokeWidthThick);}", ".f1jvq617[data-fui-focus-visible]::after{border-bottom-width:var(--strokeWidthThick);}", ".f11unbnk[data-fui-focus-visible]::after{border-bottom-right-radius:var(--fui-Card--border-radius);}", ".fbd201q[data-fui-focus-visible]::after{border-bottom-left-radius:var(--fui-Card--border-radius);}", ".f12nqxso[data-fui-focus-visible]::after{border-top-right-radius:var(--fui-Card--border-radius);}", ".f1uguk4w[data-fui-focus-visible]::after{border-top-left-radius:var(--fui-Card--border-radius);}", ".f1dvezut[data-fui-focus-visible]::after{border-top-color:var(--colorStrokeFocus2);}", ".fd0oaoj[data-fui-focus-visible]::after{border-right-color:var(--colorStrokeFocus2);}", ".f1cwg4i8[data-fui-focus-visible]::after{border-left-color:var(--colorStrokeFocus2);}", ".fjvm52t[data-fui-focus-visible]::after{border-bottom-color:var(--colorStrokeFocus2);}", ".f3l4wcz[data-fui-focus-visible]::after{top:-var(--strokeWidthThick);}", ".f6j2biq[data-fui-focus-visible]::after{bottom:-var(--strokeWidthThick);}", ".fdzzmfx[data-fui-focus-visible]::after{left:-var(--strokeWidthThick);}", ".fduh8kh[data-fui-focus-visible]::after{right:-var(--strokeWidthThick);}", ".f1063pyq{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".fpfyeui>.fui-CardPreview{margin-top:calc(var(--fui-Card--size) * -1);}", ".fwi74qw>.fui-CardPreview{margin-bottom:calc(var(--fui-Card--size) * -1);}", ".f1yfsbdm>:not([aria-hidden=\"true\"]):first-of-type.fui-CardPreview{margin-left:calc(var(--fui-Card--size) * -1);}", ".f1vk4t4a>:not([aria-hidden=\"true\"]):first-of-type.fui-CardPreview{margin-right:calc(var(--fui-Card--size) * -1);}", ".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}", ".fobhde4>.fui-CardPreview{margin-left:calc(var(--fui-Card--size) * -1);}", ".fx5r7kn>.fui-CardPreview{margin-right:calc(var(--fui-Card--size) * -1);}", ".frl7skw>:not([aria-hidden=\"true\"]):first-of-type.fui-CardPreview{margin-top:calc(var(--fui-Card--size) * -1);}", ".f1pi9uxy{--fui-Card--size:8px;}", ".f1h1zgly{--fui-Card--border-radius:var(--borderRadiusSmall);}", ".frsmuga{--fui-Card--size:12px;}", ".fuldkky{--fui-Card--border-radius:var(--borderRadiusMedium);}", ".f1qua4xo{--fui-Card--size:16px;}", ".fimkt6v{--fui-Card--border-radius:var(--borderRadiusLarge);}", ".f1k6fduh{cursor:pointer;}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", ".f1whvlc6{box-shadow:var(--shadow4);}", ".f16gxe2i::after{border-top-color:var(--colorTransparentStroke);}", ".fpgykix::after{border-right-color:var(--colorTransparentStroke);}", ".fzybk4o::after{border-left-color:var(--colorTransparentStroke);}", ".f1osi826::after{border-bottom-color:var(--colorTransparentStroke);}", ".f1dmdbja{background-color:var(--colorNeutralBackground2);}", ".f1c21dwh{background-color:var(--colorTransparentBackground);}", ".f1couhl3{box-shadow:none;}", ".ft83z1f::after{border-top-color:var(--colorNeutralStroke1);}", ".f1g4150c::after{border-right-color:var(--colorNeutralStroke1);}", ".f192dr6e::after{border-left-color:var(--colorNeutralStroke1);}", ".f1qnawh6::after{border-bottom-color:var(--colorNeutralStroke1);}", ".fhovq9v{background-color:var(--colorSubtleBackground);}"],
|
215
|
+
"f": [".ftqa4ok:focus{outline-style:none;}"],
|
216
|
+
"i": [".f2hkw1w:focus-visible{outline-style:none;}"],
|
217
|
+
"h": [".ftr40te:hover::after{border-top-color:var(--colorTransparentStrokeInteractive);}", ".fcsoo7g:hover::after{border-right-color:var(--colorTransparentStrokeInteractive);}", ".f1rl4q8i:hover::after{border-left-color:var(--colorTransparentStrokeInteractive);}", ".fbb4roj:hover::after{border-bottom-color:var(--colorTransparentStrokeInteractive);}", ".f1knas48:hover{background-color:var(--colorNeutralBackground1Hover);}", ".f1m145df:hover{box-shadow:var(--shadow8);}", ".f1uvynv3:hover{background-color:var(--colorNeutralBackground2Hover);}", ".fjxutwb:hover{background-color:var(--colorTransparentBackgroundHover);}", ".f1llr77y:hover::after{border-top-color:var(--colorNeutralStroke1Hover);}", ".fzk0khw:hover::after{border-right-color:var(--colorNeutralStroke1Hover);}", ".fjj8tog:hover::after{border-left-color:var(--colorNeutralStroke1Hover);}", ".fb1u8ub:hover::after{border-bottom-color:var(--colorNeutralStroke1Hover);}", ".f1t94bn6:hover{background-color:var(--colorSubtleBackgroundHover);}"],
|
218
|
+
"a": [".fd4vwcp:active::after{border-top-color:var(--colorTransparentStrokeInteractive);}", ".f1crelnc:active::after{border-right-color:var(--colorTransparentStrokeInteractive);}", ".fup9tr0:active::after{border-left-color:var(--colorTransparentStrokeInteractive);}", ".f12d33p4:active::after{border-bottom-color:var(--colorTransparentStrokeInteractive);}", ".fb40n2d:active{background-color:var(--colorNeutralBackground1Pressed);}", ".f1yhgkbh:active{background-color:var(--colorNeutralBackground2Pressed);}", ".fophhak:active{background-color:var(--colorTransparentBackgroundPressed);}", ".f1uohb70:active::after{border-top-color:var(--colorNeutralStroke1Pressed);}", ".f1jm7v1n:active::after{border-right-color:var(--colorNeutralStroke1Pressed);}", ".f1bus3rq:active::after{border-left-color:var(--colorNeutralStroke1Pressed);}", ".f1fbu7rr:active::after{border-bottom-color:var(--colorNeutralStroke1Pressed);}", ".f1wfn5kd:active{background-color:var(--colorSubtleBackgroundPressed);}"]
|
33
219
|
});
|
34
220
|
/**
|
35
|
-
* Apply styling to the Card slots based on the state
|
221
|
+
* Apply styling to the Card slots based on the state.
|
36
222
|
*/
|
37
223
|
|
38
224
|
|
39
|
-
export
|
40
|
-
|
41
|
-
|
225
|
+
export const useCardStyles_unstable = state => {
|
226
|
+
const styles = useStyles();
|
227
|
+
const orientationMap = {
|
228
|
+
horizontal: styles.orientationHorizontal,
|
229
|
+
vertical: styles.orientationVertical
|
230
|
+
};
|
231
|
+
const sizeMap = {
|
232
|
+
small: styles.sizeSmall,
|
233
|
+
medium: styles.sizeMedium,
|
234
|
+
large: styles.sizeLarge
|
235
|
+
};
|
236
|
+
const interactive = state.root.onClick || state.root.onMouseUp || state.root.onMouseDown || state.root.onPointerUp || state.root.onPointerDown || state.root.onTouchStart || state.root.onTouchEnd;
|
237
|
+
state.root.className = mergeClasses(cardClassNames.root, styles.root, orientationMap[state.orientation], sizeMap[state.size], state.appearance === 'filled' && styles.filled, state.appearance === 'filled-alternative' && styles.filledAlternative, state.appearance === 'outline' && styles.outline, state.appearance === 'subtle' && styles.subtle, interactive && state.appearance === 'filled' && styles.filledInteractive, interactive && state.appearance === 'filled-alternative' && styles.filledAlternativeInteractive, interactive && state.appearance === 'outline' && styles.outlineInteractive, interactive && state.appearance === 'subtle' && styles.subtleInteractive, interactive && state.appearance !== 'outline' && styles.interactiveNoOutline, state.root.className);
|
42
238
|
return state;
|
43
239
|
};
|
44
240
|
//# sourceMappingURL=useCardStyles.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Card/useCardStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,QAAyC,6BAAzC;AAGA;;AAEG;;AACH,IAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAqCA;;AAEG;;;AACH,OAAO,IAAM,aAAa,GAAG,UAAC,KAAD,EAAiB;AAC5C,MAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CACjC,MAAM,CAAC,IAD0B,EAEjC,CAAC,KAAK,CAAC,IAAN,CAAW,OAAX,IACC,KAAK,CAAC,IAAN,CAAW,SADZ,IAEC,KAAK,CAAC,IAAN,CAAW,WAFZ,IAGC,KAAK,CAAC,IAAN,CAAW,WAHZ,IAIC,KAAK,CAAC,IAAN,CAAW,aAJZ,IAKC,KAAK,CAAC,IAAN,CAAW,YALZ,IAMC,KAAK,CAAC,IAAN,CAAW,UANb,KAOE,MAAM,CAAC,WATwB,EAUjC,KAAK,CAAC,IAAN,CAAW,SAVsB,CAAnC;AAaA,SAAO,KAAP;AACD,CAhBM","sourceRoot":""}
|
1
|
+
{"version":3,"sources":["packages/react-components/react-card/src/components/Card/useCardStyles.ts"],"names":[],"mappings":"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","sourcesContent":["import { shorthands, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { cardPreviewClassNames } from '../CardPreview/useCardPreviewStyles';\nimport { cardHeaderClassNames } from '../CardHeader/useCardHeaderStyles';\nimport { cardFooterClassNames } from '../CardFooter/useCardFooterStyles';\nimport type { CardSlots, CardState } from './Card.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\n\n/**\n * Static CSS class names used internally for the component slots.\n */\nexport const cardClassNames: SlotClassNames<CardSlots> = {\n root: 'fui-Card',\n};\n\n/**\n * CSS variable names used internally for uniform styling in Card.\n */\nexport const cardCSSVars = {\n cardSizeVar: '--fui-Card--size',\n cardBorderRadiusVar: '--fui-Card--border-radius',\n};\n\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n position: 'relative',\n ...shorthands.overflow('hidden'),\n color: tokens.colorNeutralForeground1,\n\n // Border setting using after pseudo element to allow CardPreview to render behind it.\n '::after': {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n content: '\"\"',\n pointerEvents: 'none',\n\n ...shorthands.borderStyle('solid'),\n ...shorthands.borderWidth(tokens.strokeWidthThin),\n ...shorthands.borderRadius(`var(${cardCSSVars.cardBorderRadiusVar})`),\n },\n\n ...shorthands.borderRadius(`var(${cardCSSVars.cardBorderRadiusVar})`),\n ...shorthands.padding(`var(${cardCSSVars.cardSizeVar})`),\n ...shorthands.gap(`var(${cardCSSVars.cardSizeVar})`),\n\n // Prevents CardHeader and CardFooter from shrinking.\n [`> .${cardHeaderClassNames.root}, > .${cardFooterClassNames.root}`]: {\n flexShrink: 0,\n },\n // Allows non-card components to grow to fill the available space.\n [`> :not(.${cardPreviewClassNames.root}):not(.${cardHeaderClassNames.root}):not(.${cardFooterClassNames.root})`]: {\n flexGrow: 1,\n },\n\n ...createFocusOutlineStyle({\n style: {\n outlineRadius: `var(${cardCSSVars.cardBorderRadiusVar})`,\n outlineWidth: tokens.strokeWidthThick,\n },\n selector: 'focus',\n }),\n },\n\n orientationHorizontal: {\n flexDirection: 'row',\n alignItems: 'center',\n\n // Remove vertical padding to keep CardPreview content flush with Card's borders.\n [`> .${cardPreviewClassNames.root}`]: {\n marginTop: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`,\n marginBottom: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`,\n },\n // Due to Tabster's \"Groupper\" focus functionality, hidden elements are injected before and after Card's content.\n // As such, the code below targets a CardPreview, when it's the first element.\n // Since this is on horizontal cards, the left padding is removed to keep the content flush with the border.\n [`> :not([aria-hidden=\"true\"]):first-of-type.${cardPreviewClassNames.root}`]: {\n marginLeft: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`,\n },\n },\n orientationVertical: {\n flexDirection: 'column',\n\n // Remove lateral padding to keep CardPreview content flush with Card's borders.\n [`> .${cardPreviewClassNames.root}`]: {\n marginLeft: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`,\n marginRight: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`,\n },\n // Due to Tabster's \"Groupper\" focus functionality, hidden elements are injected before and after Card's content.\n // As such, the code below targets a CardPreview, when it's the first element.\n // Since this is on vertical cards, the top padding is removed to keep the content flush with the border.\n [`> :not([aria-hidden=\"true\"]):first-of-type.${cardPreviewClassNames.root}`]: {\n marginTop: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`,\n },\n },\n\n sizeSmall: {\n [cardCSSVars.cardSizeVar]: '8px',\n [cardCSSVars.cardBorderRadiusVar]: tokens.borderRadiusSmall,\n },\n sizeMedium: {\n [cardCSSVars.cardSizeVar]: '12px',\n [cardCSSVars.cardBorderRadiusVar]: tokens.borderRadiusMedium,\n },\n sizeLarge: {\n [cardCSSVars.cardSizeVar]: '16px',\n [cardCSSVars.cardBorderRadiusVar]: tokens.borderRadiusLarge,\n },\n\n interactiveNoOutline: {\n ':hover::after': {\n ...shorthands.borderColor(tokens.colorTransparentStrokeInteractive),\n },\n ':active::after': {\n ...shorthands.borderColor(tokens.colorTransparentStrokeInteractive),\n },\n },\n\n filledInteractive: {\n cursor: 'pointer',\n backgroundColor: tokens.colorNeutralBackground1,\n boxShadow: tokens.shadow4,\n\n '::after': {\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n },\n\n ':hover': {\n backgroundColor: tokens.colorNeutralBackground1Hover,\n boxShadow: tokens.shadow8,\n },\n ':active': {\n backgroundColor: tokens.colorNeutralBackground1Pressed,\n },\n },\n filled: {\n backgroundColor: tokens.colorNeutralBackground1,\n boxShadow: tokens.shadow4,\n\n '::after': {\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n },\n },\n filledAlternativeInteractive: {\n cursor: 'pointer',\n backgroundColor: tokens.colorNeutralBackground2,\n boxShadow: tokens.shadow4,\n\n '::after': {\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n },\n\n ':hover': {\n backgroundColor: tokens.colorNeutralBackground2Hover,\n boxShadow: tokens.shadow8,\n },\n ':active': {\n backgroundColor: tokens.colorNeutralBackground2Pressed,\n },\n },\n filledAlternative: {\n backgroundColor: tokens.colorNeutralBackground2,\n boxShadow: tokens.shadow4,\n\n '::after': {\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n },\n },\n outlineInteractive: {\n cursor: 'pointer',\n backgroundColor: tokens.colorTransparentBackground,\n boxShadow: 'none',\n\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1),\n },\n\n ':hover': {\n backgroundColor: tokens.colorTransparentBackgroundHover,\n\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Hover),\n },\n },\n ':active': {\n backgroundColor: tokens.colorTransparentBackgroundPressed,\n\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Pressed),\n },\n },\n },\n outline: {\n backgroundColor: tokens.colorTransparentBackground,\n boxShadow: 'none',\n\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1),\n },\n },\n subtleInteractive: {\n cursor: 'pointer',\n backgroundColor: tokens.colorSubtleBackground,\n boxShadow: 'none',\n\n '::after': {\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n },\n\n ':hover': {\n backgroundColor: tokens.colorSubtleBackgroundHover,\n },\n ':active': {\n backgroundColor: tokens.colorSubtleBackgroundPressed,\n },\n },\n subtle: {\n backgroundColor: tokens.colorSubtleBackground,\n boxShadow: 'none',\n\n '::after': {\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n },\n },\n});\n\n/**\n * Apply styling to the Card slots based on the state.\n */\nexport const useCardStyles_unstable = (state: CardState): CardState => {\n const styles = useStyles();\n\n const orientationMap = {\n horizontal: styles.orientationHorizontal,\n vertical: styles.orientationVertical,\n } as const;\n\n const sizeMap = {\n small: styles.sizeSmall,\n medium: styles.sizeMedium,\n large: styles.sizeLarge,\n } as const;\n\n const interactive =\n state.root.onClick ||\n state.root.onMouseUp ||\n state.root.onMouseDown ||\n state.root.onPointerUp ||\n state.root.onPointerDown ||\n state.root.onTouchStart ||\n state.root.onTouchEnd;\n\n state.root.className = mergeClasses(\n cardClassNames.root,\n styles.root,\n orientationMap[state.orientation],\n sizeMap[state.size],\n state.appearance === 'filled' && styles.filled,\n state.appearance === 'filled-alternative' && styles.filledAlternative,\n state.appearance === 'outline' && styles.outline,\n state.appearance === 'subtle' && styles.subtle,\n interactive && state.appearance === 'filled' && styles.filledInteractive,\n interactive && state.appearance === 'filled-alternative' && styles.filledAlternativeInteractive,\n interactive && state.appearance === 'outline' && styles.outlineInteractive,\n interactive && state.appearance === 'subtle' && styles.subtleInteractive,\n interactive && state.appearance !== 'outline' && styles.interactiveNoOutline,\n state.root.className,\n );\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
@@ -1,15 +1,15 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
2
|
+
import { useCardFooter_unstable } from './useCardFooter';
|
3
|
+
import { renderCardFooter_unstable } from './renderCardFooter';
|
4
|
+
import { useCardFooterStyles_unstable } from './useCardFooterStyles';
|
5
5
|
/**
|
6
6
|
* Component to render Button actions in a Card component.
|
7
7
|
*/
|
8
8
|
|
9
|
-
export
|
10
|
-
|
11
|
-
|
12
|
-
return
|
9
|
+
export const CardFooter = /*#__PURE__*/React.forwardRef((props, ref) => {
|
10
|
+
const state = useCardFooter_unstable(props, ref);
|
11
|
+
useCardFooterStyles_unstable(state);
|
12
|
+
return renderCardFooter_unstable(state);
|
13
13
|
});
|
14
14
|
CardFooter.displayName = 'CardFooter';
|
15
15
|
//# sourceMappingURL=CardFooter.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["packages/react-components/react-card/src/components/CardFooter/CardFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,sBAAT,QAAuC,iBAAvC;AACA,SAAS,yBAAT,QAA0C,oBAA1C;AACA,SAAS,4BAAT,QAA6C,uBAA7C;AAIA;;AAEG;;AACH,OAAO,MAAM,UAAU,gBAAyC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAC9F,MAAM,KAAK,GAAG,sBAAsB,CAAC,KAAD,EAAQ,GAAR,CAApC;EAEA,4BAA4B,CAAC,KAAD,CAA5B;EACA,OAAO,yBAAyB,CAAC,KAAD,CAAhC;AACD,CAL+D,CAAzD;AAOP,UAAU,CAAC,WAAX,GAAyB,YAAzB","sourcesContent":["import * as React from 'react';\nimport { useCardFooter_unstable } from './useCardFooter';\nimport { renderCardFooter_unstable } from './renderCardFooter';\nimport { useCardFooterStyles_unstable } from './useCardFooterStyles';\nimport type { CardFooterProps } from './CardFooter.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * Component to render Button actions in a Card component.\n */\nexport const CardFooter: ForwardRefComponent<CardFooterProps> = React.forwardRef((props, ref) => {\n const state = useCardFooter_unstable(props, ref);\n\n useCardFooterStyles_unstable(state);\n return renderCardFooter_unstable(state);\n});\n\nCardFooter.displayName = 'CardFooter';\n"],"sourceRoot":"../src/"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CardFooter.types.js","sourceRoot":"","sources":["
|
1
|
+
{"version":3,"file":"CardFooter.types.js","sourceRoot":"../src/","sources":["packages/react-components/react-card/src/components/CardFooter/CardFooter.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\n/**\n * Slots available in the CardFooter component.\n */\nexport type CardFooterSlots = {\n /**\n * Root element of the component.\n */\n root: Slot<'div'>;\n\n /**\n * Container that renders on the far end of the footer, used for action buttons.\n */\n action?: Slot<'div'>;\n};\n\n/**\n * CardFooter component props.\n */\nexport type CardFooterProps = ComponentProps<CardFooterSlots>;\n\n/**\n * State used in rendering CardFooter.\n */\nexport type CardFooterState = ComponentState<CardFooterSlots>;\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["packages/react-components/react-card/src/components/CardFooter/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC","sourcesContent":["export * from './CardFooter';\nexport * from './CardFooter.types';\nexport * from './renderCardFooter';\nexport * from './useCardFooter';\nexport * from './useCardFooterStyles';\n"]}
|
@@ -1,16 +1,16 @@
|
|
1
|
-
import { __assign } from "tslib";
|
2
1
|
import * as React from 'react';
|
3
2
|
import { getSlots } from '@fluentui/react-utilities';
|
4
|
-
import { cardFooterShorthandProps } from './useCardFooter';
|
5
3
|
/**
|
6
|
-
* Render the final JSX of CardFooter
|
4
|
+
* Render the final JSX of CardFooter.
|
7
5
|
*/
|
8
6
|
|
9
|
-
export
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
return /*#__PURE__*/React.createElement(slots.root,
|
7
|
+
export const renderCardFooter_unstable = state => {
|
8
|
+
const {
|
9
|
+
slots,
|
10
|
+
slotProps
|
11
|
+
} = getSlots(state);
|
12
|
+
return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
|
13
|
+
}, slotProps.root.children, slots.action && /*#__PURE__*/React.createElement(slots.action, { ...slotProps.action
|
14
|
+
}));
|
15
15
|
};
|
16
16
|
//# sourceMappingURL=renderCardFooter.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["packages/react-components/react-card/src/components/CardFooter/renderCardFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,yBAAyB,GAAI,KAAD,IAA2B;EAClE,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAAkB,KAAlB,CAArC;EAEA,oBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,EACG,SAAS,CAAC,IAAV,CAAe,QADlB,EAEG,KAAK,CAAC,MAAN,iBAAgB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,MAAP,EAAa,EAAA,GAAK,SAAS,CAAC;EAAf,CAAb,CAFnB,CADF;AAMD,CATM","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { CardFooterSlots, CardFooterState } from './CardFooter.types';\n\n/**\n * Render the final JSX of CardFooter.\n */\nexport const renderCardFooter_unstable = (state: CardFooterState) => {\n const { slots, slotProps } = getSlots<CardFooterSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {slotProps.root.children}\n {slots.action && <slots.action {...slotProps.action} />}\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
|
@@ -1,30 +1,27 @@
|
|
1
|
-
import { __assign } from "tslib";
|
2
1
|
import { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';
|
3
|
-
/**
|
4
|
-
* Array of all shorthand properties listed in CardFooterShorthandProps
|
5
|
-
*/
|
6
|
-
|
7
|
-
export var cardFooterShorthandProps = ['root', 'action'];
|
8
2
|
/**
|
9
3
|
* Create the state required to render CardFooter.
|
10
4
|
*
|
11
|
-
* The returned state can be modified with hooks such as
|
12
|
-
* before being passed to
|
5
|
+
* The returned state can be modified with hooks such as useCardFooterStyles_unstable,
|
6
|
+
* before being passed to renderCardFooter_unstable.
|
13
7
|
*
|
14
8
|
* @param props - props from this instance of CardFooter
|
15
9
|
* @param ref - reference to root HTMLElement of CardFooter
|
16
10
|
*/
|
17
11
|
|
18
|
-
export
|
19
|
-
|
12
|
+
export const useCardFooter_unstable = (props, ref) => {
|
13
|
+
const {
|
14
|
+
action
|
15
|
+
} = props;
|
20
16
|
return {
|
21
17
|
components: {
|
22
18
|
root: 'div',
|
23
19
|
action: 'div'
|
24
20
|
},
|
25
|
-
root: getNativeElementProps('div',
|
26
|
-
ref
|
27
|
-
|
21
|
+
root: getNativeElementProps('div', {
|
22
|
+
ref,
|
23
|
+
...props
|
24
|
+
}),
|
28
25
|
action: resolveShorthand(action)
|
29
26
|
};
|
30
27
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["packages/react-components/react-card/src/components/CardFooter/useCardFooter.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,EAAgC,gBAAhC,QAAwD,2BAAxD;AAGA;;;;;;;;AAQG;;AACH,OAAO,MAAM,sBAAsB,GAAG,CAAC,KAAD,EAAyB,GAAzB,KAAyE;EAC7G,MAAM;IAAE;EAAF,IAAa,KAAnB;EAEA,OAAO;IACL,UAAU,EAAE;MACV,IAAI,EAAE,KADI;MAEV,MAAM,EAAE;IAFE,CADP;IAML,IAAI,EAAE,qBAAqB,CAAC,KAAD,EAAQ;MACjC,GADiC;MAEjC,GAAG;IAF8B,CAAR,CANtB;IAUL,MAAM,EAAE,gBAAgB,CAAC,MAAD;EAVnB,CAAP;AAYD,CAfM","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';\nimport type { CardFooterProps, CardFooterState } from './CardFooter.types';\n\n/**\n * Create the state required to render CardFooter.\n *\n * The returned state can be modified with hooks such as useCardFooterStyles_unstable,\n * before being passed to renderCardFooter_unstable.\n *\n * @param props - props from this instance of CardFooter\n * @param ref - reference to root HTMLElement of CardFooter\n */\nexport const useCardFooter_unstable = (props: CardFooterProps, ref: React.Ref<HTMLElement>): CardFooterState => {\n const { action } = props;\n\n return {\n components: {\n root: 'div',\n action: 'div',\n },\n\n root: getNativeElementProps('div', {\n ref,\n ...props,\n }),\n action: resolveShorthand(action),\n };\n};\n"],"sourceRoot":"../src/"}
|
@@ -1,31 +1,37 @@
|
|
1
|
-
import { __styles, mergeClasses } from '@
|
1
|
+
import { __styles, mergeClasses, shorthands } from '@griffel/react';
|
2
2
|
/**
|
3
|
-
*
|
3
|
+
* Static CSS class names used internally for the component slots.
|
4
4
|
*/
|
5
5
|
|
6
|
-
|
6
|
+
export const cardFooterClassNames = {
|
7
|
+
root: 'fui-CardFooter',
|
8
|
+
action: 'fui-CardFooter__action'
|
9
|
+
};
|
10
|
+
|
11
|
+
const useStyles = /*#__PURE__*/__styles({
|
7
12
|
"root": {
|
8
13
|
"mc9l5x": "f22iagw",
|
9
14
|
"Beiy3e4": "f1063pyq",
|
10
|
-
"
|
15
|
+
"i8kkvl": "f4akndk",
|
16
|
+
"Belr9w4": "fe5j3v"
|
11
17
|
},
|
12
18
|
"action": {
|
13
19
|
"Frg6f3": ["fcgxt0o", "f1ujusj6"]
|
14
20
|
}
|
15
21
|
}, {
|
16
|
-
"d": [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f1063pyq{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;}", ".
|
22
|
+
"d": [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f1063pyq{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;}", ".f4akndk{-webkit-column-gap:12px;column-gap:12px;}", ".fe5j3v{row-gap:12px;}", ".fcgxt0o{margin-left:auto;}", ".f1ujusj6{margin-right:auto;}"]
|
17
23
|
});
|
18
24
|
/**
|
19
|
-
* Apply styling to the CardFooter slots based on the state
|
25
|
+
* Apply styling to the CardFooter slots based on the state.
|
20
26
|
*/
|
21
27
|
|
22
28
|
|
23
|
-
export
|
24
|
-
|
25
|
-
state.root.className = mergeClasses(styles.root, state.root.className);
|
29
|
+
export const useCardFooterStyles_unstable = state => {
|
30
|
+
const styles = useStyles();
|
31
|
+
state.root.className = mergeClasses(cardFooterClassNames.root, styles.root, state.root.className);
|
26
32
|
|
27
33
|
if (state.action) {
|
28
|
-
state.action.className = mergeClasses(styles.action, state.action.className);
|
34
|
+
state.action.className = mergeClasses(cardFooterClassNames.action, styles.action, state.action.className);
|
29
35
|
}
|
30
36
|
|
31
37
|
return state;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["packages/react-components/react-card/src/components/CardFooter/useCardFooterStyles.ts"],"names":[],"mappings":"AACA,mBAAqB,YAArB,EAAmC,UAAnC,QAAqD,gBAArD;AAGA;;AAEG;;AACH,OAAO,MAAM,oBAAoB,GAAoC;EACnE,IAAI,EAAE,gBAD6D;EAEnE,MAAM,EAAE;AAF2D,CAA9D;;AAKP,MAAM,SAAS,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAlB;AAWA;;AAEG;;;AACH,OAAO,MAAM,4BAA4B,GAAI,KAAD,IAA4C;EACtF,MAAM,MAAM,GAAG,SAAS,EAAxB;EACA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,oBAAoB,CAAC,IAAtB,EAA4B,MAAM,CAAC,IAAnC,EAAyC,KAAK,CAAC,IAAN,CAAW,SAApD,CAAnC;;EAEA,IAAI,KAAK,CAAC,MAAV,EAAkB;IAChB,KAAK,CAAC,MAAN,CAAa,SAAb,GAAyB,YAAY,CAAC,oBAAoB,CAAC,MAAtB,EAA8B,MAAM,CAAC,MAArC,EAA6C,KAAK,CAAC,MAAN,CAAa,SAA1D,CAArC;EACD;;EAED,OAAO,KAAP;AACD,CATM","sourcesContent":["import type { SlotClassNames } from '@fluentui/react-utilities';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { CardFooterSlots, CardFooterState } from './CardFooter.types';\n\n/**\n * Static CSS class names used internally for the component slots.\n */\nexport const cardFooterClassNames: SlotClassNames<CardFooterSlots> = {\n root: 'fui-CardFooter',\n action: 'fui-CardFooter__action',\n};\n\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n flexDirection: 'row',\n ...shorthands.gap('12px'),\n },\n action: {\n marginLeft: 'auto',\n },\n});\n\n/**\n * Apply styling to the CardFooter slots based on the state.\n */\nexport const useCardFooterStyles_unstable = (state: CardFooterState): CardFooterState => {\n const styles = useStyles();\n state.root.className = mergeClasses(cardFooterClassNames.root, styles.root, state.root.className);\n\n if (state.action) {\n state.action.className = mergeClasses(cardFooterClassNames.action, styles.action, state.action.className);\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
@@ -1,15 +1,15 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
2
|
+
import { useCardHeader_unstable } from './useCardHeader';
|
3
|
+
import { renderCardHeader_unstable } from './renderCardHeader';
|
4
|
+
import { useCardHeaderStyles_unstable } from './useCardHeaderStyles';
|
5
5
|
/**
|
6
6
|
* Component to render an image, text and an action in a Card component.
|
7
7
|
*/
|
8
8
|
|
9
|
-
export
|
10
|
-
|
11
|
-
|
12
|
-
return
|
9
|
+
export const CardHeader = /*#__PURE__*/React.forwardRef((props, ref) => {
|
10
|
+
const state = useCardHeader_unstable(props, ref);
|
11
|
+
useCardHeaderStyles_unstable(state);
|
12
|
+
return renderCardHeader_unstable(state);
|
13
13
|
});
|
14
14
|
CardHeader.displayName = 'CardHeader';
|
15
15
|
//# sourceMappingURL=CardHeader.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["packages/react-components/react-card/src/components/CardHeader/CardHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,sBAAT,QAAuC,iBAAvC;AACA,SAAS,yBAAT,QAA0C,oBAA1C;AACA,SAAS,4BAAT,QAA6C,uBAA7C;AAIA;;AAEG;;AACH,OAAO,MAAM,UAAU,gBAAyC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAC9F,MAAM,KAAK,GAAG,sBAAsB,CAAC,KAAD,EAAQ,GAAR,CAApC;EAEA,4BAA4B,CAAC,KAAD,CAA5B;EACA,OAAO,yBAAyB,CAAC,KAAD,CAAhC;AACD,CAL+D,CAAzD;AAOP,UAAU,CAAC,WAAX,GAAyB,YAAzB","sourcesContent":["import * as React from 'react';\nimport { useCardHeader_unstable } from './useCardHeader';\nimport { renderCardHeader_unstable } from './renderCardHeader';\nimport { useCardHeaderStyles_unstable } from './useCardHeaderStyles';\nimport type { CardHeaderProps } from './CardHeader.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * Component to render an image, text and an action in a Card component.\n */\nexport const CardHeader: ForwardRefComponent<CardHeaderProps> = React.forwardRef((props, ref) => {\n const state = useCardHeader_unstable(props, ref);\n\n useCardHeaderStyles_unstable(state);\n return renderCardHeader_unstable(state);\n});\n\nCardHeader.displayName = 'CardHeader';\n"],"sourceRoot":"../src/"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CardHeader.types.js","sourceRoot":"","sources":["
|
1
|
+
{"version":3,"file":"CardHeader.types.js","sourceRoot":"../src/","sources":["packages/react-components/react-card/src/components/CardHeader/CardHeader.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\n/**\n * Slots available in the CardHeader component.\n */\nexport type CardHeaderSlots = {\n /**\n * Root element of the component.\n */\n root: Slot<'div'>;\n\n /**\n * Element used to render an image or avatar related to the card.\n */\n image: Slot<'div', 'img'>;\n\n /**\n * Element used to render the main header title.\n */\n header: Slot<'span'>;\n\n /**\n * Element used to render short descriptions related to the title.\n */\n description: Slot<'span'>;\n\n /**\n * Container that renders on the far end of the footer, used for action buttons.\n */\n action?: Slot<'div'>;\n};\n\n/**\n * CardHeader component props.\n */\nexport type CardHeaderProps = ComponentProps<Partial<CardHeaderSlots>>;\n\n/**\n * State used in rendering CardHeader.\n */\nexport type CardHeaderState = ComponentState<CardHeaderSlots>;\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["packages/react-components/react-card/src/components/CardHeader/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC","sourcesContent":["export * from './CardHeader';\nexport * from './CardHeader.types';\nexport * from './renderCardHeader';\nexport * from './useCardHeader';\nexport * from './useCardHeaderStyles';\n"]}
|
@@ -1,16 +1,19 @@
|
|
1
|
-
import { __assign } from "tslib";
|
2
1
|
import * as React from 'react';
|
3
2
|
import { getSlots } from '@fluentui/react-utilities';
|
4
|
-
import { cardHeaderShorthandProps } from './useCardHeader';
|
5
3
|
/**
|
6
|
-
* Render the final JSX of CardHeader
|
4
|
+
* Render the final JSX of CardHeader.
|
7
5
|
*/
|
8
6
|
|
9
|
-
export
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
return /*#__PURE__*/React.createElement(slots.root,
|
7
|
+
export const renderCardHeader_unstable = state => {
|
8
|
+
const {
|
9
|
+
slots,
|
10
|
+
slotProps
|
11
|
+
} = getSlots(state);
|
12
|
+
return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
|
13
|
+
}, slots.image && /*#__PURE__*/React.createElement(slots.image, { ...slotProps.image
|
14
|
+
}), /*#__PURE__*/React.createElement(slots.header, { ...slotProps.header
|
15
|
+
}), slots.description && /*#__PURE__*/React.createElement(slots.description, { ...slotProps.description
|
16
|
+
}), slots.action && /*#__PURE__*/React.createElement(slots.action, { ...slotProps.action
|
17
|
+
}));
|
15
18
|
};
|
16
19
|
//# sourceMappingURL=renderCardHeader.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["packages/react-components/react-card/src/components/CardHeader/renderCardHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,yBAAyB,GAAI,KAAD,IAA2B;EAClE,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAAkB,KAAlB,CAArC;EAEA,oBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,EACG,KAAK,CAAC,KAAN,iBAAe,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;EAAf,CAAZ,CADlB,eAEE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,MAAP,EAAa,EAAA,GAAK,SAAS,CAAC;EAAf,CAAb,CAFF,EAGG,KAAK,CAAC,WAAN,iBAAqB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,WAAP,EAAkB,EAAA,GAAK,SAAS,CAAC;EAAf,CAAlB,CAHxB,EAIG,KAAK,CAAC,MAAN,iBAAgB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,MAAP,EAAa,EAAA,GAAK,SAAS,CAAC;EAAf,CAAb,CAJnB,CADF;AAQD,CAXM","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { CardHeaderSlots, CardHeaderState } from './CardHeader.types';\n\n/**\n * Render the final JSX of CardHeader.\n */\nexport const renderCardHeader_unstable = (state: CardHeaderState) => {\n const { slots, slotProps } = getSlots<CardHeaderSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {slots.image && <slots.image {...slotProps.image} />}\n <slots.header {...slotProps.header} />\n {slots.description && <slots.description {...slotProps.description} />}\n {slots.action && <slots.action {...slotProps.action} />}\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
|