@fluentui/react-card 9.0.0-alpha.8 → 9.0.0-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/CHANGELOG.json +919 -1
  2. package/CHANGELOG.md +259 -2
  3. package/README.md +3 -1
  4. package/Spec.md +523 -0
  5. package/assets/Card.png +0 -0
  6. package/assets/CardHeader.png +0 -0
  7. package/assets/CardPreview.png +0 -0
  8. package/assets/context-interaction-keyboard.png +0 -0
  9. package/assets/context-interaction-mouse.png +0 -0
  10. package/assets/context-narrator.png +0 -0
  11. package/assets/disabled-narrator.png +0 -0
  12. package/assets/disabled.png +0 -0
  13. package/assets/interactive-interaction-keyboard.png +0 -0
  14. package/assets/interactive-interaction-mouse.png +0 -0
  15. package/assets/interactive-narrator.png +0 -0
  16. package/assets/non-interactive-interaction-keyboard.png +0 -0
  17. package/assets/non-interactive-interaction-mouse.png +0 -0
  18. package/assets/non-interactive-narrator.png +0 -0
  19. package/assets/non-interactive-selectable-interaction-keyboard.png +0 -0
  20. package/assets/non-interactive-selectable-interaction-mouse.png +0 -0
  21. package/assets/selectable-interaction-keyboard.png +0 -0
  22. package/assets/selectable-interaction-mouse.png +0 -0
  23. package/assets/selectable-narrator.png +0 -0
  24. package/dist/react-card.d.ts +67 -142
  25. package/lib/Card.js.map +1 -1
  26. package/lib/CardFooter.js.map +1 -1
  27. package/lib/CardHeader.js.map +1 -1
  28. package/lib/CardPreview.js.map +1 -1
  29. package/lib/components/Card/Card.d.ts +3 -3
  30. package/lib/components/Card/Card.js +8 -8
  31. package/lib/components/Card/Card.js.map +1 -1
  32. package/lib/components/Card/Card.types.d.ts +9 -18
  33. package/lib/components/Card/Card.types.js.map +1 -1
  34. package/lib/components/Card/index.js.map +1 -1
  35. package/lib/components/Card/renderCard.d.ts +1 -1
  36. package/lib/components/Card/renderCard.js +8 -8
  37. package/lib/components/Card/renderCard.js.map +1 -1
  38. package/lib/components/Card/useCard.d.ts +3 -4
  39. package/lib/components/Card/useCard.js +23 -11
  40. package/lib/components/Card/useCard.js.map +1 -1
  41. package/lib/components/Card/useCardStyles.d.ts +2 -1
  42. package/lib/components/Card/useCardStyles.js +133 -24
  43. package/lib/components/Card/useCardStyles.js.map +1 -1
  44. package/lib/components/CardFooter/CardFooter.d.ts +2 -2
  45. package/lib/components/CardFooter/CardFooter.js +7 -7
  46. package/lib/components/CardFooter/CardFooter.js.map +1 -1
  47. package/lib/components/CardFooter/CardFooter.types.d.ts +8 -23
  48. package/lib/components/CardFooter/CardFooter.types.js.map +1 -1
  49. package/lib/components/CardFooter/index.js.map +1 -1
  50. package/lib/components/CardFooter/renderCardFooter.d.ts +1 -1
  51. package/lib/components/CardFooter/renderCardFooter.js +9 -9
  52. package/lib/components/CardFooter/renderCardFooter.js.map +1 -1
  53. package/lib/components/CardFooter/useCardFooter.d.ts +4 -9
  54. package/lib/components/CardFooter/useCardFooter.js +18 -17
  55. package/lib/components/CardFooter/useCardFooter.js.map +1 -1
  56. package/lib/components/CardFooter/useCardFooterStyles.d.ts +2 -1
  57. package/lib/components/CardFooter/useCardFooterStyles.js +9 -7
  58. package/lib/components/CardFooter/useCardFooterStyles.js.map +1 -1
  59. package/lib/components/CardHeader/CardHeader.d.ts +2 -2
  60. package/lib/components/CardHeader/CardHeader.js +7 -7
  61. package/lib/components/CardHeader/CardHeader.js.map +1 -1
  62. package/lib/components/CardHeader/CardHeader.types.d.ts +12 -39
  63. package/lib/components/CardHeader/CardHeader.types.js.map +1 -1
  64. package/lib/components/CardHeader/index.js.map +1 -1
  65. package/lib/components/CardHeader/renderCardHeader.d.ts +1 -1
  66. package/lib/components/CardHeader/renderCardHeader.js +13 -9
  67. package/lib/components/CardHeader/renderCardHeader.js.map +1 -1
  68. package/lib/components/CardHeader/useCardHeader.d.ts +4 -9
  69. package/lib/components/CardHeader/useCardHeader.js +35 -32
  70. package/lib/components/CardHeader/useCardHeader.js.map +1 -1
  71. package/lib/components/CardHeader/useCardHeaderStyles.d.ts +2 -1
  72. package/lib/components/CardHeader/useCardHeaderStyles.js +9 -7
  73. package/lib/components/CardHeader/useCardHeaderStyles.js.map +1 -1
  74. package/lib/components/CardPreview/CardPreview.d.ts +2 -2
  75. package/lib/components/CardPreview/CardPreview.js +7 -7
  76. package/lib/components/CardPreview/CardPreview.js.map +1 -1
  77. package/lib/components/CardPreview/CardPreview.types.d.ts +8 -23
  78. package/lib/components/CardPreview/CardPreview.types.js.map +1 -1
  79. package/lib/components/CardPreview/index.js.map +1 -1
  80. package/lib/components/CardPreview/renderCardPreview.d.ts +1 -1
  81. package/lib/components/CardPreview/renderCardPreview.js +9 -9
  82. package/lib/components/CardPreview/renderCardPreview.js.map +1 -1
  83. package/lib/components/CardPreview/useCardPreview.d.ts +4 -9
  84. package/lib/components/CardPreview/useCardPreview.js +18 -20
  85. package/lib/components/CardPreview/useCardPreview.js.map +1 -1
  86. package/lib/components/CardPreview/useCardPreviewStyles.d.ts +2 -1
  87. package/lib/components/CardPreview/useCardPreviewStyles.js +7 -10
  88. package/lib/components/CardPreview/useCardPreviewStyles.js.map +1 -1
  89. package/lib/index.js.map +1 -1
  90. package/lib-commonjs/Card.js +1 -1
  91. package/lib-commonjs/Card.js.map +1 -1
  92. package/lib-commonjs/CardFooter.js +1 -1
  93. package/lib-commonjs/CardFooter.js.map +1 -1
  94. package/lib-commonjs/CardHeader.js +1 -1
  95. package/lib-commonjs/CardHeader.js.map +1 -1
  96. package/lib-commonjs/CardPreview.js +1 -1
  97. package/lib-commonjs/CardPreview.js.map +1 -1
  98. package/lib-commonjs/components/Card/Card.d.ts +3 -3
  99. package/lib-commonjs/components/Card/Card.js +9 -9
  100. package/lib-commonjs/components/Card/Card.js.map +1 -1
  101. package/lib-commonjs/components/Card/Card.types.d.ts +9 -18
  102. package/lib-commonjs/components/Card/Card.types.js.map +1 -1
  103. package/lib-commonjs/components/Card/index.js +1 -1
  104. package/lib-commonjs/components/Card/index.js.map +1 -1
  105. package/lib-commonjs/components/Card/renderCard.d.ts +1 -1
  106. package/lib-commonjs/components/Card/renderCard.js +11 -12
  107. package/lib-commonjs/components/Card/renderCard.js.map +1 -1
  108. package/lib-commonjs/components/Card/useCard.d.ts +3 -4
  109. package/lib-commonjs/components/Card/useCard.js +26 -13
  110. package/lib-commonjs/components/Card/useCard.js.map +1 -1
  111. package/lib-commonjs/components/Card/useCardStyles.d.ts +2 -1
  112. package/lib-commonjs/components/Card/useCardStyles.js +138 -27
  113. package/lib-commonjs/components/Card/useCardStyles.js.map +1 -1
  114. package/lib-commonjs/components/CardFooter/CardFooter.d.ts +2 -2
  115. package/lib-commonjs/components/CardFooter/CardFooter.js +8 -8
  116. package/lib-commonjs/components/CardFooter/CardFooter.js.map +1 -1
  117. package/lib-commonjs/components/CardFooter/CardFooter.types.d.ts +8 -23
  118. package/lib-commonjs/components/CardFooter/CardFooter.types.js.map +1 -1
  119. package/lib-commonjs/components/CardFooter/index.js +1 -1
  120. package/lib-commonjs/components/CardFooter/index.js.map +1 -1
  121. package/lib-commonjs/components/CardFooter/renderCardFooter.d.ts +1 -1
  122. package/lib-commonjs/components/CardFooter/renderCardFooter.js +12 -14
  123. package/lib-commonjs/components/CardFooter/renderCardFooter.js.map +1 -1
  124. package/lib-commonjs/components/CardFooter/useCardFooter.d.ts +4 -9
  125. package/lib-commonjs/components/CardFooter/useCardFooter.js +21 -20
  126. package/lib-commonjs/components/CardFooter/useCardFooter.js.map +1 -1
  127. package/lib-commonjs/components/CardFooter/useCardFooterStyles.d.ts +2 -1
  128. package/lib-commonjs/components/CardFooter/useCardFooterStyles.js +13 -11
  129. package/lib-commonjs/components/CardFooter/useCardFooterStyles.js.map +1 -1
  130. package/lib-commonjs/components/CardHeader/CardHeader.d.ts +2 -2
  131. package/lib-commonjs/components/CardHeader/CardHeader.js +8 -8
  132. package/lib-commonjs/components/CardHeader/CardHeader.js.map +1 -1
  133. package/lib-commonjs/components/CardHeader/CardHeader.types.d.ts +12 -39
  134. package/lib-commonjs/components/CardHeader/CardHeader.types.js.map +1 -1
  135. package/lib-commonjs/components/CardHeader/index.js +1 -1
  136. package/lib-commonjs/components/CardHeader/index.js.map +1 -1
  137. package/lib-commonjs/components/CardHeader/renderCardHeader.d.ts +1 -1
  138. package/lib-commonjs/components/CardHeader/renderCardHeader.js +16 -14
  139. package/lib-commonjs/components/CardHeader/renderCardHeader.js.map +1 -1
  140. package/lib-commonjs/components/CardHeader/useCardHeader.d.ts +4 -9
  141. package/lib-commonjs/components/CardHeader/useCardHeader.js +39 -36
  142. package/lib-commonjs/components/CardHeader/useCardHeader.js.map +1 -1
  143. package/lib-commonjs/components/CardHeader/useCardHeaderStyles.d.ts +2 -1
  144. package/lib-commonjs/components/CardHeader/useCardHeaderStyles.js +14 -12
  145. package/lib-commonjs/components/CardHeader/useCardHeaderStyles.js.map +1 -1
  146. package/lib-commonjs/components/CardPreview/CardPreview.d.ts +2 -2
  147. package/lib-commonjs/components/CardPreview/CardPreview.js +8 -8
  148. package/lib-commonjs/components/CardPreview/CardPreview.js.map +1 -1
  149. package/lib-commonjs/components/CardPreview/CardPreview.types.d.ts +8 -23
  150. package/lib-commonjs/components/CardPreview/CardPreview.types.js.map +1 -1
  151. package/lib-commonjs/components/CardPreview/index.js +1 -1
  152. package/lib-commonjs/components/CardPreview/index.js.map +1 -1
  153. package/lib-commonjs/components/CardPreview/renderCardPreview.d.ts +1 -1
  154. package/lib-commonjs/components/CardPreview/renderCardPreview.js +12 -14
  155. package/lib-commonjs/components/CardPreview/renderCardPreview.js.map +1 -1
  156. package/lib-commonjs/components/CardPreview/useCardPreview.d.ts +4 -9
  157. package/lib-commonjs/components/CardPreview/useCardPreview.js +21 -23
  158. package/lib-commonjs/components/CardPreview/useCardPreview.js.map +1 -1
  159. package/lib-commonjs/components/CardPreview/useCardPreviewStyles.d.ts +2 -1
  160. package/lib-commonjs/components/CardPreview/useCardPreviewStyles.js +11 -14
  161. package/lib-commonjs/components/CardPreview/useCardPreviewStyles.js.map +1 -1
  162. package/lib-commonjs/index.js +1 -1
  163. package/lib-commonjs/index.js.map +1 -1
  164. package/package.json +20 -12
  165. package/lib/common/isConformant.d.ts +0 -4
  166. package/lib/common/isConformant.js +0 -11
  167. package/lib/common/isConformant.js.map +0 -1
  168. package/lib-commonjs/common/isConformant.d.ts +0 -4
  169. package/lib-commonjs/common/isConformant.js +0 -22
  170. package/lib-commonjs/common/isConformant.js.map +0 -1
@@ -1,41 +1,150 @@
1
- import { __styles, mergeClasses } from '@fluentui/react-make-styles';
1
+ import { shorthands, __styles, mergeClasses } from '@griffel/react';
2
+ import { tokens } from '@fluentui/react-theme';
3
+ import { cardPreviewClassName } from '../CardPreview/index';
4
+ export const cardClassName = 'fui-Card';
2
5
  /**
3
6
  * Styles for the root slot
4
7
  */
5
8
 
6
- var useStyles = /*#__PURE__*/__styles({
9
+ const useStyles = /*#__PURE__*/__styles({
7
10
  "root": {
8
- "mc9l5x": "f22iagw",
9
- "Beiy3e4": "f1vx9l62",
10
- "Bpg54ce": "f1a3p1vp",
11
- "E5pizo": ["f1eroye8", "f1m1elsp"],
12
- "sj55zd": "f16th3vw",
13
- "De3pzq": "fpnz0vo",
14
- "z8tnut": "f1kcqot9",
15
- "z189sj": ["f11qrl6u", "fjlbh76"],
16
- "Byoj8tv": "fpe6lb7",
17
- "uwmqm3": ["fjlbh76", "f11qrl6u"],
18
- "rmohyg": "fsbu5mz",
19
- "Dimara": "fnpfh4l"
20
- },
21
- "interactive": {
11
+ "mc9l5x": "ftgm304",
12
+ "B68tc82": "f1p9o1ba",
13
+ "Bmxbyg5": "f1sil6mw",
14
+ "sj55zd": "f19n0e5",
15
+ "icvyot": "fzkkow9",
16
+ "vrafjx": ["fcdblym", "fjik90z"],
17
+ "oivjwe": "fg706s2",
18
+ "wvpqe5": ["fjik90z", "fcdblym"],
19
+ "B4j52fo": "f192inf7",
20
+ "Bekrc4i": ["f5tn483", "f1ojsxk5"],
21
+ "Bn0qgzm": "f1vxd6vx",
22
+ "ibv6hh": ["f1ojsxk5", "f5tn483"],
23
+ "Bbmb7ep": ["f1aa9q02", "f16jpd5f"],
24
+ "Beyfa6y": ["f16jpd5f", "f1aa9q02"],
25
+ "B7oj6ja": ["f1jar5jt", "fyu767a"],
26
+ "Btl43ni": ["fyu767a", "f1jar5jt"],
27
+ "Ecqjvq": "f70or3y",
28
+ "B39syqp": ["f1s27jks", "f1x7x6se"],
29
+ "m3o775": "f1q2lvbs",
30
+ "I0kkcn": ["f1x7x6se", "f1s27jks"]
31
+ },
32
+ "filledInteractive": {
33
+ "Bceei9c": "f1k6fduh",
34
+ "De3pzq": "fxugw4r",
35
+ "g2u3we": "fghlq4f",
36
+ "h3c5rm": ["f1gn591s", "fjscplz"],
37
+ "B9xav0g": "fb073pr",
38
+ "zhjwy3": ["fjscplz", "f1gn591s"],
39
+ "E5pizo": "f1whvlc6",
40
+ "Jwef8y": "f1knas48",
41
+ "Bgoe8wy": "fpa59ij",
42
+ "Bwzppfd": ["f1rhln42", "f1l1ogpg"],
43
+ "oetu4i": "fz67qlh",
44
+ "gg5e9n": ["f1l1ogpg", "f1rhln42"],
45
+ "Bvxd0ez": "f1m145df",
46
+ "ecr2s2": "fb40n2d",
47
+ "B6oc9vd": "f7cshhm",
48
+ "ak43y8": ["f1bzyac8", "f131p3c2"],
49
+ "wmxk5l": "f1bazisv",
50
+ "B50zh58": ["f131p3c2", "f1bzyac8"]
51
+ },
52
+ "filled": {
53
+ "De3pzq": "fxugw4r",
54
+ "g2u3we": "fghlq4f",
55
+ "h3c5rm": ["f1gn591s", "fjscplz"],
56
+ "B9xav0g": "fb073pr",
57
+ "zhjwy3": ["fjscplz", "f1gn591s"],
58
+ "E5pizo": "f1whvlc6"
59
+ },
60
+ "filledAlternativeInteractive": {
22
61
  "Bceei9c": "f1k6fduh",
23
- "Jwef8y": "fg5k6t1",
24
- "ecr2s2": "fesicau"
62
+ "De3pzq": "f1dmdbja",
63
+ "g2u3we": "fghlq4f",
64
+ "h3c5rm": ["f1gn591s", "fjscplz"],
65
+ "B9xav0g": "fb073pr",
66
+ "zhjwy3": ["fjscplz", "f1gn591s"],
67
+ "E5pizo": "f1whvlc6",
68
+ "Jwef8y": "f1uvynv3",
69
+ "Bgoe8wy": "fpa59ij",
70
+ "Bwzppfd": ["f1rhln42", "f1l1ogpg"],
71
+ "oetu4i": "fz67qlh",
72
+ "gg5e9n": ["f1l1ogpg", "f1rhln42"],
73
+ "Bvxd0ez": "f1m145df",
74
+ "ecr2s2": "f1yhgkbh",
75
+ "B6oc9vd": "f7cshhm",
76
+ "ak43y8": ["f1bzyac8", "f131p3c2"],
77
+ "wmxk5l": "f1bazisv",
78
+ "B50zh58": ["f131p3c2", "f1bzyac8"]
79
+ },
80
+ "filledAlternative": {
81
+ "De3pzq": "f1dmdbja",
82
+ "g2u3we": "fghlq4f",
83
+ "h3c5rm": ["f1gn591s", "fjscplz"],
84
+ "B9xav0g": "fb073pr",
85
+ "zhjwy3": ["fjscplz", "f1gn591s"],
86
+ "E5pizo": "f1whvlc6"
87
+ },
88
+ "outlineInteractive": {
89
+ "Bceei9c": "f1k6fduh",
90
+ "De3pzq": "f1c21dwh",
91
+ "g2u3we": "fj3muxo",
92
+ "h3c5rm": ["f1akhkt", "f1lxtadh"],
93
+ "B9xav0g": "f1aperda",
94
+ "zhjwy3": ["f1lxtadh", "f1akhkt"],
95
+ "E5pizo": "f1couhl3",
96
+ "Jwef8y": "fjxutwb",
97
+ "Bgoe8wy": "fvcxoqz",
98
+ "Bwzppfd": ["f1ub3y4t", "f1m52nbi"],
99
+ "oetu4i": "f1xlaoq0",
100
+ "gg5e9n": ["f1m52nbi", "f1ub3y4t"],
101
+ "ecr2s2": "fophhak",
102
+ "B6oc9vd": "fvs00aa",
103
+ "ak43y8": ["f1assf6x", "f4ruux4"],
104
+ "wmxk5l": "fumykes",
105
+ "B50zh58": ["f4ruux4", "f1assf6x"]
106
+ },
107
+ "outline": {
108
+ "De3pzq": "f1c21dwh",
109
+ "g2u3we": "fj3muxo",
110
+ "h3c5rm": ["f1akhkt", "f1lxtadh"],
111
+ "B9xav0g": "f1aperda",
112
+ "zhjwy3": ["f1lxtadh", "f1akhkt"],
113
+ "E5pizo": "f1couhl3"
114
+ },
115
+ "subtleInteractive": {
116
+ "Bceei9c": "f1k6fduh",
117
+ "De3pzq": "fhovq9v",
118
+ "g2u3we": "fghlq4f",
119
+ "h3c5rm": ["f1gn591s", "fjscplz"],
120
+ "B9xav0g": "fb073pr",
121
+ "zhjwy3": ["fjscplz", "f1gn591s"],
122
+ "E5pizo": "f1couhl3",
123
+ "Jwef8y": "f1t94bn6",
124
+ "ecr2s2": "f1wfn5kd"
125
+ },
126
+ "subtle": {
127
+ "De3pzq": "fhovq9v",
128
+ "g2u3we": "fghlq4f",
129
+ "h3c5rm": ["f1gn591s", "fjscplz"],
130
+ "B9xav0g": "fb073pr",
131
+ "zhjwy3": ["fjscplz", "f1gn591s"],
132
+ "E5pizo": "f1couhl3"
25
133
  }
26
134
  }, {
27
- "d": [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}", ".f1a3p1vp{overflow:hidden;}", ".f1eroye8{box-shadow:var(--alias-shadow-shadow4);}", ".f1m1elsp{box-shadow:var(--alias-shadow-shadow-4);}", ".f16th3vw{color:var(--alias-color-neutral-neutralForeground1);}", ".fpnz0vo{background-color:var(--alias-color-neutral-neutralBackground1);}", ".f1kcqot9{padding-top:12px;}", ".f11qrl6u{padding-right:12px;}", ".fjlbh76{padding-left:12px;}", ".fpe6lb7{padding-bottom:12px;}", ".fsbu5mz{gap:12px;}", ".fnpfh4l{border-radius:var(--global-borderRadius-medium);}", ".f1k6fduh{cursor:pointer;}"],
28
- "h": [".fg5k6t1:hover{background-color:var(--alias-color-neutral-neutralBackground1Hover);}"],
29
- "a": [".fesicau:active{background-color:var(--alias-color-neutral-neutralBackground1Pressed);}"]
135
+ "d": [".ftgm304{display:block;}", ".f1p9o1ba{overflow-x:hidden;}", ".f1sil6mw{overflow-y:hidden;}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".fzkkow9{border-top-style:solid;}", ".fcdblym{border-right-style:solid;}", ".fjik90z{border-left-style:solid;}", ".fg706s2{border-bottom-style:solid;}", ".f192inf7{border-top-width:var(--strokeWidthThin);}", ".f5tn483{border-right-width:var(--strokeWidthThin);}", ".f1ojsxk5{border-left-width:var(--strokeWidthThin);}", ".f1vxd6vx{border-bottom-width:var(--strokeWidthThin);}", ".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}", ".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}", ".f70or3y>*:not(.fui-CardPreview){margin-top:12px;}", ".f1s27jks>*:not(.fui-CardPreview){margin-right:12px;}", ".f1x7x6se>*:not(.fui-CardPreview){margin-left:12px;}", ".f1q2lvbs>*:not(.fui-CardPreview){margin-bottom:12px;}", ".f1k6fduh{cursor:pointer;}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", ".fghlq4f{border-top-color:var(--colorTransparentStroke);}", ".f1gn591s{border-right-color:var(--colorTransparentStroke);}", ".fjscplz{border-left-color:var(--colorTransparentStroke);}", ".fb073pr{border-bottom-color:var(--colorTransparentStroke);}", ".f1whvlc6{box-shadow:var(--shadow4);}", ".f1dmdbja{background-color:var(--colorNeutralBackground2);}", ".f1c21dwh{background-color:var(--colorTransparentBackground);}", ".fj3muxo{border-top-color:var(--colorNeutralStroke1);}", ".f1akhkt{border-right-color:var(--colorNeutralStroke1);}", ".f1lxtadh{border-left-color:var(--colorNeutralStroke1);}", ".f1aperda{border-bottom-color:var(--colorNeutralStroke1);}", ".f1couhl3{box-shadow:none;}", ".fhovq9v{background-color:var(--colorSubtleBackground);}"],
136
+ "h": [".f1knas48:hover{background-color:var(--colorNeutralBackground1Hover);}", ".fpa59ij:hover{border-top-color:var(--colorTransparentStrokeInteractive);}", ".f1rhln42:hover{border-right-color:var(--colorTransparentStrokeInteractive);}", ".f1l1ogpg:hover{border-left-color:var(--colorTransparentStrokeInteractive);}", ".fz67qlh:hover{border-bottom-color:var(--colorTransparentStrokeInteractive);}", ".f1m145df:hover{box-shadow:var(--shadow8);}", ".f1uvynv3:hover{background-color:var(--colorNeutralBackground2Hover);}", ".fjxutwb:hover{background-color:var(--colorTransparentBackgroundHover);}", ".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);}", ".f1t94bn6:hover{background-color:var(--colorSubtleBackgroundHover);}"],
137
+ "a": [".fb40n2d:active{background-color:var(--colorNeutralBackground1Pressed);}", ".f7cshhm:active{border-top-color:var(--colorTransparentStrokeInteractive);}", ".f1bzyac8:active{border-right-color:var(--colorTransparentStrokeInteractive);}", ".f131p3c2:active{border-left-color:var(--colorTransparentStrokeInteractive);}", ".f1bazisv:active{border-bottom-color:var(--colorTransparentStrokeInteractive);}", ".f1yhgkbh:active{background-color:var(--colorNeutralBackground2Pressed);}", ".fophhak:active{background-color:var(--colorTransparentBackgroundPressed);}", ".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);}", ".f1wfn5kd:active{background-color:var(--colorSubtleBackgroundPressed);}"]
30
138
  });
31
139
  /**
32
140
  * Apply styling to the Card slots based on the state
33
141
  */
34
142
 
35
143
 
36
- export var useCardStyles = function (state) {
37
- var styles = useStyles();
38
- state.className = mergeClasses(styles.root, (state.onClick || state.onMouseUp || state.onMouseDown || state.onPointerUp || state.onPointerDown || state.onTouchStart || state.onTouchEnd) && styles.interactive, state.className);
144
+ export const useCardStyles_unstable = state => {
145
+ const styles = useStyles();
146
+ const interactive = state.root.onClick || state.root.onMouseUp || state.root.onMouseDown || state.root.onPointerUp || state.root.onPointerDown || state.root.onTouchStart || state.root.onTouchEnd;
147
+ state.root.className = mergeClasses(cardClassName, styles.root, 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, state.root.className);
39
148
  return state;
40
149
  };
41
150
  //# 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,EAAlB;AA6BA;;AAEG;;;AACH,OAAO,IAAM,aAAa,GAAG,UAAC,KAAD,EAAiB;AAC5C,MAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,SAAN,GAAkB,YAAY,CAC5B,MAAM,CAAC,IADqB,EAE5B,CAAC,KAAK,CAAC,OAAN,IACC,KAAK,CAAC,SADP,IAEC,KAAK,CAAC,WAFP,IAGC,KAAK,CAAC,WAHP,IAIC,KAAK,CAAC,aAJP,IAKC,KAAK,CAAC,YALP,IAMC,KAAK,CAAC,UANR,KAOE,MAAM,CAAC,WATmB,EAU5B,KAAK,CAAC,SAVsB,CAA9B;AAaA,SAAO,KAAP;AACD,CAhBM","sourceRoot":""}
1
+ {"version":3,"sources":["components/Card/useCardStyles.ts"],"names":[],"mappings":"AAAA,SAAS,UAAT,YAAiC,YAAjC,QAAqD,gBAArD;AACA,SAAS,MAAT,QAAuB,uBAAvB;AACA,SAAS,oBAAT,QAAqC,sBAArC;AAGA,OAAO,MAAM,aAAa,GAAG,UAAtB;AAEP;;AAEG;;AACH,MAAM,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;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;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;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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAoGA;;AAEG;;;AACH,OAAO,MAAM,sBAAsB,GAAI,KAAD,IAAgC;AACpE,QAAM,MAAM,GAAG,SAAS,EAAxB;AAEA,QAAM,WAAW,GACf,KAAK,CAAC,IAAN,CAAW,OAAX,IACA,KAAK,CAAC,IAAN,CAAW,SADX,IAEA,KAAK,CAAC,IAAN,CAAW,WAFX,IAGA,KAAK,CAAC,IAAN,CAAW,WAHX,IAIA,KAAK,CAAC,IAAN,CAAW,aAJX,IAKA,KAAK,CAAC,IAAN,CAAW,YALX,IAMA,KAAK,CAAC,IAAN,CAAW,UAPb;AASA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CACjC,aADiC,EAEjC,MAAM,CAAC,IAF0B,EAGjC,KAAK,CAAC,UAAN,KAAqB,QAArB,IAAiC,MAAM,CAAC,MAHP,EAIjC,KAAK,CAAC,UAAN,KAAqB,oBAArB,IAA6C,MAAM,CAAC,iBAJnB,EAKjC,KAAK,CAAC,UAAN,KAAqB,SAArB,IAAkC,MAAM,CAAC,OALR,EAMjC,KAAK,CAAC,UAAN,KAAqB,QAArB,IAAiC,MAAM,CAAC,MANP,EAOjC,WAAW,IAAI,KAAK,CAAC,UAAN,KAAqB,QAApC,IAAgD,MAAM,CAAC,iBAPtB,EAQjC,WAAW,IAAI,KAAK,CAAC,UAAN,KAAqB,oBAApC,IAA4D,MAAM,CAAC,4BARlC,EASjC,WAAW,IAAI,KAAK,CAAC,UAAN,KAAqB,SAApC,IAAiD,MAAM,CAAC,kBATvB,EAUjC,WAAW,IAAI,KAAK,CAAC,UAAN,KAAqB,QAApC,IAAgD,MAAM,CAAC,iBAVtB,EAWjC,KAAK,CAAC,IAAN,CAAW,SAXsB,CAAnC;AAcA,SAAO,KAAP;AACD,CA3BM","sourcesContent":["import { shorthands, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { cardPreviewClassName } from '../CardPreview/index';\nimport type { CardState } from './Card.types';\n\nexport const cardClassName = 'fui-Card';\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'block',\n ...shorthands.overflow('hidden'),\n\n color: tokens.colorNeutralForeground1,\n ...shorthands.borderStyle('solid'),\n ...shorthands.borderWidth(tokens.strokeWidthThin),\n\n // Size: medium\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n\n [`> *:not(.${cardPreviewClassName})`]: {\n // Size: medium\n ...shorthands.margin('12px'),\n },\n },\n\n filledInteractive: {\n cursor: 'pointer',\n backgroundColor: tokens.colorNeutralBackground1,\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n boxShadow: tokens.shadow4,\n\n ':hover': {\n backgroundColor: tokens.colorNeutralBackground1Hover,\n ...shorthands.borderColor(tokens.colorTransparentStrokeInteractive),\n boxShadow: tokens.shadow8,\n },\n ':active': {\n backgroundColor: tokens.colorNeutralBackground1Pressed,\n ...shorthands.borderColor(tokens.colorTransparentStrokeInteractive),\n },\n },\n filled: {\n backgroundColor: tokens.colorNeutralBackground1,\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n boxShadow: tokens.shadow4,\n },\n filledAlternativeInteractive: {\n cursor: 'pointer',\n backgroundColor: tokens.colorNeutralBackground2,\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n boxShadow: tokens.shadow4,\n\n ':hover': {\n backgroundColor: tokens.colorNeutralBackground2Hover,\n ...shorthands.borderColor(tokens.colorTransparentStrokeInteractive),\n boxShadow: tokens.shadow8,\n },\n ':active': {\n backgroundColor: tokens.colorNeutralBackground2Pressed,\n ...shorthands.borderColor(tokens.colorTransparentStrokeInteractive),\n },\n },\n filledAlternative: {\n backgroundColor: tokens.colorNeutralBackground2,\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n boxShadow: tokens.shadow4,\n },\n outlineInteractive: {\n cursor: 'pointer',\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor(tokens.colorNeutralStroke1),\n boxShadow: 'none',\n\n ':hover': {\n backgroundColor: tokens.colorTransparentBackgroundHover,\n ...shorthands.borderColor(tokens.colorNeutralStroke1Hover),\n },\n ':active': {\n backgroundColor: tokens.colorTransparentBackgroundPressed,\n ...shorthands.borderColor(tokens.colorNeutralStroke1Pressed),\n },\n },\n outline: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor(tokens.colorNeutralStroke1),\n boxShadow: 'none',\n },\n subtleInteractive: {\n cursor: 'pointer',\n backgroundColor: tokens.colorSubtleBackground,\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n boxShadow: 'none',\n\n ':hover': {\n backgroundColor: tokens.colorSubtleBackgroundHover,\n },\n ':active': {\n backgroundColor: tokens.colorSubtleBackgroundPressed,\n },\n },\n subtle: {\n backgroundColor: tokens.colorSubtleBackground,\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n boxShadow: 'none',\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 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 cardClassName,\n styles.root,\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 state.root.className,\n );\n\n return state;\n};\n"],"sourceRoot":"../src/"}
@@ -1,6 +1,6 @@
1
- import * as React from 'react';
2
1
  import type { CardFooterProps } from './CardFooter.types';
2
+ import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
3
  /**
4
4
  * Component to render Button actions in a Card component.
5
5
  */
6
- export declare const CardFooter: React.ForwardRefExoticComponent<CardFooterProps & React.RefAttributes<HTMLElement>>;
6
+ export declare const CardFooter: ForwardRefComponent<CardFooterProps>;
@@ -1,15 +1,15 @@
1
1
  import * as React from 'react';
2
- import { useCardFooter } from './useCardFooter';
3
- import { renderCardFooter } from './renderCardFooter';
4
- import { useCardFooterStyles } from './useCardFooterStyles';
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 var CardFooter = /*#__PURE__*/React.forwardRef(function (props, ref) {
10
- var state = useCardFooter(props, ref);
11
- useCardFooterStyles(state);
12
- return renderCardFooter(state);
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":["../../../src/components/CardFooter/CardFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,aAAT,QAA8B,iBAA9B;AACA,SAAS,gBAAT,QAAiC,oBAAjC;AACA,SAAS,mBAAT,QAAoC,uBAApC;AAGA;;AAEG;;AACH,OAAO,IAAM,UAAU,gBAAG,KAAK,CAAC,UAAN,CAA+C,UAAC,KAAD,EAAQ,GAAR,EAAW;AAClF,MAAM,KAAK,GAAG,aAAa,CAAC,KAAD,EAAQ,GAAR,CAA3B;AAEA,EAAA,mBAAmB,CAAC,KAAD,CAAnB;AACA,SAAO,gBAAgB,CAAC,KAAD,CAAvB;AACD,CALyB,CAAnB;AAOP,UAAU,CAAC,WAAX,GAAyB,YAAzB","sourceRoot":""}
1
+ {"version":3,"sources":["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;AAC9F,QAAM,KAAK,GAAG,sBAAsB,CAAC,KAAD,EAAQ,GAAR,CAApC;AAEA,EAAA,4BAA4B,CAAC,KAAD,CAA5B;AACA,SAAO,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,28 +1,13 @@
1
- import * as React from 'react';
2
- import type { ComponentPropsCompat, ComponentStateCompat, ShorthandPropsCompat } from '@fluentui/react-utilities';
1
+ import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
2
+ export declare type CardFooterSlots = {
3
+ root: Slot<'div'>;
4
+ action?: Slot<'div'>;
5
+ };
3
6
  /**
4
- * CardFooter Props
7
+ * CardFooter props
5
8
  */
6
- export interface CardFooterProps extends ComponentPropsCompat, React.HTMLAttributes<HTMLElement> {
7
- /**
8
- * Actions slot
9
- */
10
- action?: ShorthandPropsCompat<React.HTMLAttributes<HTMLElement>>;
11
- }
12
- /**
13
- * Names of the shorthand properties in CardFooterProps
14
- */
15
- export declare type CardFooterShorthandProps = 'action';
16
- /**
17
- * Names of CardFooterProps that have a default value in useCardFooter
18
- */
19
- export declare type CardFooterDefaultedProps = never;
9
+ export declare type CardFooterProps = ComponentProps<CardFooterSlots>;
20
10
  /**
21
11
  * State used in rendering CardFooter
22
12
  */
23
- export interface CardFooterState extends ComponentStateCompat<CardFooterProps, CardFooterShorthandProps, CardFooterDefaultedProps> {
24
- /**
25
- * Ref to the root element
26
- */
27
- ref: React.Ref<HTMLElement>;
28
- }
13
+ export declare type CardFooterState = ComponentState<CardFooterSlots>;
@@ -1 +1 @@
1
- {"version":3,"file":"CardFooter.types.js","sourceRoot":"","sources":["../../../src/components/CardFooter/CardFooter.types.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"CardFooter.types.js","sourceRoot":"../src/","sources":["components/CardFooter/CardFooter.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type CardFooterSlots = {\n root: Slot<'div'>;\n action?: Slot<'div'>;\n};\n\n/**\n * CardFooter 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":["../../../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"}
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["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"]}
@@ -2,4 +2,4 @@ import type { CardFooterState } from './CardFooter.types';
2
2
  /**
3
3
  * Render the final JSX of CardFooter
4
4
  */
5
- export declare const renderCardFooter: (state: CardFooterState) => JSX.Element;
5
+ export declare const renderCardFooter_unstable: (state: CardFooterState) => JSX.Element;
@@ -1,16 +1,16 @@
1
- import { __assign } from "tslib";
2
1
  import * as React from 'react';
3
- import { getSlotsCompat } from '@fluentui/react-utilities';
4
- import { cardFooterShorthandProps } from './useCardFooter';
2
+ import { getSlots } from '@fluentui/react-utilities';
5
3
  /**
6
4
  * Render the final JSX of CardFooter
7
5
  */
8
6
 
9
- export var renderCardFooter = function (state) {
10
- var _a = getSlotsCompat(state, cardFooterShorthandProps),
11
- slots = _a.slots,
12
- slotProps = _a.slotProps;
13
-
14
- return /*#__PURE__*/React.createElement(slots.root, __assign({}, slotProps.root), state.children, /*#__PURE__*/React.createElement(slots.action, __assign({}, slotProps.action)));
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":["../../../src/components/CardFooter/renderCardFooter.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,cAAT,QAA+B,2BAA/B;AACA,SAAS,wBAAT,QAAyC,iBAAzC;AAGA;;AAEG;;AACH,OAAO,IAAM,gBAAgB,GAAG,UAAC,KAAD,EAAuB;AAC/C,MAAA,EAAA,GAAuB,cAAc,CAAC,KAAD,EAAQ,wBAAR,CAArC;AAAA,MAAE,KAAK,GAAA,EAAA,CAAA,KAAP;AAAA,MAAS,SAAS,GAAA,EAAA,CAAA,SAAlB;;AAEN,sBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,EACG,KAAK,CAAC,QADT,eAEE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,MAAP,EAAa,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,MAAf,CAAb,CAFF,CADF;AAMD,CATM","sourceRoot":""}
1
+ {"version":3,"sources":["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;AAClE,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAkB,KAAlB,CAArC;AAEA,sBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,EACG,SAAS,CAAC,IAAV,CAAe,QADlB,EAEG,KAAK,CAAC,MAAN,iBAAgB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,MAAP,EAAa,EAAA,GAAK,SAAS,CAAC;AAAf,GAAb,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,17 +1,12 @@
1
1
  import * as React from 'react';
2
- import type { CardFooterProps, CardFooterShorthandProps, CardFooterState } from './CardFooter.types';
3
- /**
4
- * Array of all shorthand properties listed in CardFooterShorthandProps
5
- */
6
- export declare const cardFooterShorthandProps: CardFooterShorthandProps[];
2
+ import type { CardFooterProps, CardFooterState } from './CardFooter.types';
7
3
  /**
8
4
  * Create the state required to render CardFooter.
9
5
  *
10
- * The returned state can be modified with hooks such as useCardFooterStyles,
11
- * before being passed to renderCardFooter.
6
+ * The returned state can be modified with hooks such as useCardFooterStyles_unstable,
7
+ * before being passed to renderCardFooter_unstable.
12
8
  *
13
9
  * @param props - props from this instance of CardFooter
14
10
  * @param ref - reference to root HTMLElement of CardFooter
15
- * @param defaultProps - (optional) default prop values provided by the implementing type
16
11
  */
17
- export declare const useCardFooter: (props: CardFooterProps, ref: React.Ref<HTMLElement>, defaultProps?: CardFooterProps | undefined) => CardFooterState;
12
+ export declare const useCardFooter_unstable: (props: CardFooterProps, ref: React.Ref<HTMLElement>) => CardFooterState;
@@ -1,27 +1,28 @@
1
- import { makeMergeProps, resolveShorthandProps } from '@fluentui/react-utilities';
2
- /**
3
- * Array of all shorthand properties listed in CardFooterShorthandProps
4
- */
5
-
6
- export var cardFooterShorthandProps = ['action'];
7
- var mergeProps = /*#__PURE__*/makeMergeProps({
8
- deepMerge: cardFooterShorthandProps
9
- });
1
+ import { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';
10
2
  /**
11
3
  * Create the state required to render CardFooter.
12
4
  *
13
- * The returned state can be modified with hooks such as useCardFooterStyles,
14
- * before being passed to renderCardFooter.
5
+ * The returned state can be modified with hooks such as useCardFooterStyles_unstable,
6
+ * before being passed to renderCardFooter_unstable.
15
7
  *
16
8
  * @param props - props from this instance of CardFooter
17
9
  * @param ref - reference to root HTMLElement of CardFooter
18
- * @param defaultProps - (optional) default prop values provided by the implementing type
19
10
  */
20
11
 
21
- export var useCardFooter = function (props, ref, defaultProps) {
22
- var state = mergeProps({
23
- ref: ref
24
- }, defaultProps && resolveShorthandProps(defaultProps, cardFooterShorthandProps), resolveShorthandProps(props, cardFooterShorthandProps));
25
- return state;
12
+ export const useCardFooter_unstable = (props, ref) => {
13
+ const {
14
+ action
15
+ } = props;
16
+ return {
17
+ components: {
18
+ root: 'div',
19
+ action: 'div'
20
+ },
21
+ root: getNativeElementProps('div', {
22
+ ref,
23
+ ...props
24
+ }),
25
+ action: resolveShorthand(action)
26
+ };
26
27
  };
27
28
  //# sourceMappingURL=useCardFooter.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/CardFooter/useCardFooter.ts"],"names":[],"mappings":"AACA,SAAS,cAAT,EAAyB,qBAAzB,QAAsD,2BAAtD;AAGA;;AAEG;;AACH,OAAO,IAAM,wBAAwB,GAA+B,CAAC,QAAD,CAA7D;AAEP,IAAM,UAAU,gBAAG,cAAc,CAAkB;AAAE,EAAA,SAAS,EAAE;AAAb,CAAlB,CAAjC;AAEA;;;;;;;;;AASG;;AACH,OAAO,IAAM,aAAa,GAAG,UAC3B,KAD2B,EAE3B,GAF2B,EAG3B,YAH2B,EAGG;AAE9B,MAAM,KAAK,GAAG,UAAU,CACtB;AACE,IAAA,GAAG,EAAA;AADL,GADsB,EAItB,YAAY,IAAI,qBAAqB,CAAC,YAAD,EAAe,wBAAf,CAJf,EAKtB,qBAAqB,CAAC,KAAD,EAAQ,wBAAR,CALC,CAAxB;AAQA,SAAO,KAAP;AACD,CAdM","sourceRoot":""}
1
+ {"version":3,"sources":["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;AAC7G,QAAM;AAAE,IAAA;AAAF,MAAa,KAAnB;AAEA,SAAO;AACL,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE,KADI;AAEV,MAAA,MAAM,EAAE;AAFE,KADP;AAML,IAAA,IAAI,EAAE,qBAAqB,CAAC,KAAD,EAAQ;AACjC,MAAA,GADiC;AAEjC,SAAG;AAF8B,KAAR,CANtB;AAUL,IAAA,MAAM,EAAE,gBAAgB,CAAC,MAAD;AAVnB,GAAP;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,5 +1,6 @@
1
1
  import type { CardFooterState } from './CardFooter.types';
2
+ export declare const cardFooterClassName = "fui-CardFooter";
2
3
  /**
3
4
  * Apply styling to the CardFooter slots based on the state
4
5
  */
5
- export declare const useCardFooterStyles: (state: CardFooterState) => CardFooterState;
6
+ export declare const useCardFooterStyles_unstable: (state: CardFooterState) => CardFooterState;
@@ -1,28 +1,30 @@
1
- import { __styles, mergeClasses } from '@fluentui/react-make-styles';
1
+ import { __styles, mergeClasses, shorthands } from '@griffel/react';
2
+ export const cardFooterClassName = 'fui-CardFooter';
2
3
  /**
3
4
  * Styles for the root slot
4
5
  */
5
6
 
6
- var useStyles = /*#__PURE__*/__styles({
7
+ const useStyles = /*#__PURE__*/__styles({
7
8
  "root": {
8
9
  "mc9l5x": "f22iagw",
9
10
  "Beiy3e4": "f1063pyq",
10
- "rmohyg": "fsbu5mz"
11
+ "i8kkvl": "f4akndk",
12
+ "Belr9w4": "fe5j3v"
11
13
  },
12
14
  "action": {
13
15
  "Frg6f3": ["fcgxt0o", "f1ujusj6"]
14
16
  }
15
17
  }, {
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;}", ".fsbu5mz{gap:12px;}", ".fcgxt0o{margin-left:auto;}", ".f1ujusj6{margin-right:auto;}"]
18
+ "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
19
  });
18
20
  /**
19
21
  * Apply styling to the CardFooter slots based on the state
20
22
  */
21
23
 
22
24
 
23
- export var useCardFooterStyles = function (state) {
24
- var styles = useStyles();
25
- state.className = mergeClasses(styles.root, state.className);
25
+ export const useCardFooterStyles_unstable = state => {
26
+ const styles = useStyles();
27
+ state.root.className = mergeClasses(cardFooterClassName, styles.root, state.root.className);
26
28
 
27
29
  if (state.action) {
28
30
  state.action.className = mergeClasses(styles.action, state.action.className);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/CardFooter/useCardFooterStyles.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,EAAlB;AAWA;;AAEG;;;AACH,OAAO,IAAM,mBAAmB,GAAG,UAAC,KAAD,EAAuB;AACxD,MAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,SAAN,GAAkB,YAAY,CAAC,MAAM,CAAC,IAAR,EAAc,KAAK,CAAC,SAApB,CAA9B;;AAEA,MAAI,KAAK,CAAC,MAAV,EAAkB;AAChB,IAAA,KAAK,CAAC,MAAN,CAAa,SAAb,GAAyB,YAAY,CAAC,MAAM,CAAC,MAAR,EAAgB,KAAK,CAAC,MAAN,CAAa,SAA7B,CAArC;AACD;;AAED,SAAO,KAAP;AACD,CATM","sourceRoot":""}
1
+ {"version":3,"sources":["components/CardFooter/useCardFooterStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,EAAmC,UAAnC,QAAqD,gBAArD;AAGA,OAAO,MAAM,mBAAmB,GAAG,gBAA5B;AAEP;;AAEG;;AACH,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAWA;;AAEG;;;AACH,OAAO,MAAM,4BAA4B,GAAI,KAAD,IAA4C;AACtF,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,mBAAD,EAAsB,MAAM,CAAC,IAA7B,EAAmC,KAAK,CAAC,IAAN,CAAW,SAA9C,CAAnC;;AAEA,MAAI,KAAK,CAAC,MAAV,EAAkB;AAChB,IAAA,KAAK,CAAC,MAAN,CAAa,SAAb,GAAyB,YAAY,CAAC,MAAM,CAAC,MAAR,EAAgB,KAAK,CAAC,MAAN,CAAa,SAA7B,CAArC;AACD;;AAED,SAAO,KAAP;AACD,CATM","sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { CardFooterState } from './CardFooter.types';\n\nexport const cardFooterClassName = 'fui-CardFooter';\n\n/**\n * Styles for the root slot\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(cardFooterClassName, styles.root, state.root.className);\n\n if (state.action) {\n state.action.className = mergeClasses(styles.action, state.action.className);\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
@@ -1,6 +1,6 @@
1
- import * as React from 'react';
2
1
  import type { CardHeaderProps } from './CardHeader.types';
2
+ import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
3
  /**
4
4
  * Component to render an image, text and an action in a Card component.
5
5
  */
6
- export declare const CardHeader: React.ForwardRefExoticComponent<CardHeaderProps & React.RefAttributes<HTMLElement>>;
6
+ export declare const CardHeader: ForwardRefComponent<CardHeaderProps>;
@@ -1,15 +1,15 @@
1
1
  import * as React from 'react';
2
- import { useCardHeader } from './useCardHeader';
3
- import { renderCardHeader } from './renderCardHeader';
4
- import { useCardHeaderStyles } from './useCardHeaderStyles';
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 var CardHeader = /*#__PURE__*/React.forwardRef(function (props, ref) {
10
- var state = useCardHeader(props, ref);
11
- useCardHeaderStyles(state);
12
- return renderCardHeader(state);
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":["../../../src/components/CardHeader/CardHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,aAAT,QAA8B,iBAA9B;AACA,SAAS,gBAAT,QAAiC,oBAAjC;AACA,SAAS,mBAAT,QAAoC,uBAApC;AAGA;;AAEG;;AACH,OAAO,IAAM,UAAU,gBAAG,KAAK,CAAC,UAAN,CAA+C,UAAC,KAAD,EAAQ,GAAR,EAAW;AAClF,MAAM,KAAK,GAAG,aAAa,CAAC,KAAD,EAAQ,GAAR,CAA3B;AAEA,EAAA,mBAAmB,CAAC,KAAD,CAAnB;AACA,SAAO,gBAAgB,CAAC,KAAD,CAAvB;AACD,CALyB,CAAnB;AAOP,UAAU,CAAC,WAAX,GAAyB,YAAzB","sourceRoot":""}
1
+ {"version":3,"sources":["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;AAC9F,QAAM,KAAK,GAAG,sBAAsB,CAAC,KAAD,EAAQ,GAAR,CAApC;AAEA,EAAA,4BAA4B,CAAC,KAAD,CAA5B;AACA,SAAO,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,44 +1,17 @@
1
- import * as React from 'react';
2
- import type { ComponentPropsCompat, ComponentStateCompat, ShorthandPropsCompat } from '@fluentui/react-utilities';
1
+ import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
2
+ export declare type CardHeaderSlots = {
3
+ root: Slot<'div'>;
4
+ image: Slot<'div'>;
5
+ content?: Slot<'div'>;
6
+ header: Slot<'span'>;
7
+ description: Slot<'span'>;
8
+ action?: Slot<'div'>;
9
+ };
3
10
  /**
4
- * CardHeader Props
11
+ * CardHeader props
5
12
  */
6
- export interface CardHeaderProps extends ComponentPropsCompat, React.HTMLAttributes<HTMLElement> {
7
- /**
8
- * Image slot
9
- */
10
- image: ShorthandPropsCompat<React.ImgHTMLAttributes<HTMLImageElement>>;
11
- /**
12
- * Content slot, wrapper of the header and description slots
13
- */
14
- content?: ShorthandPropsCompat<React.HTMLAttributes<HTMLElement>>;
15
- /**
16
- * Header title slot
17
- */
18
- header: ShorthandPropsCompat<React.HTMLAttributes<HTMLElement>>;
19
- /**
20
- * Description slot
21
- */
22
- description: ShorthandPropsCompat<React.HTMLAttributes<HTMLElement>>;
23
- /**
24
- * Actions slot
25
- */
26
- action?: ShorthandPropsCompat<React.HTMLAttributes<HTMLElement>>;
27
- }
28
- /**
29
- * Names of the shorthand properties in CardHeaderProps
30
- */
31
- export declare type CardHeaderShorthandProps = 'image' | 'content' | 'header' | 'description' | 'action';
32
- /**
33
- * Names of CardHeaderProps that have a default value in useCardHeader
34
- */
35
- export declare type CardHeaderDefaultedProps = never;
13
+ export declare type CardHeaderProps = ComponentProps<Partial<CardHeaderSlots>>;
36
14
  /**
37
15
  * State used in rendering CardHeader
38
16
  */
39
- export interface CardHeaderState extends ComponentStateCompat<CardHeaderProps, CardHeaderShorthandProps> {
40
- /**
41
- * Ref to the root element
42
- */
43
- ref: React.Ref<HTMLElement>;
44
- }
17
+ export declare type CardHeaderState = ComponentState<CardHeaderSlots>;
@@ -1 +1 @@
1
- {"version":3,"file":"CardHeader.types.js","sourceRoot":"","sources":["../../../src/components/CardHeader/CardHeader.types.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"CardHeader.types.js","sourceRoot":"../src/","sources":["components/CardHeader/CardHeader.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type CardHeaderSlots = {\n root: Slot<'div'>;\n image: Slot<'div'>;\n content?: Slot<'div'>;\n header: Slot<'span'>;\n description: Slot<'span'>;\n action?: Slot<'div'>;\n};\n\n/**\n * CardHeader 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":["../../../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"}
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["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"]}
@@ -2,4 +2,4 @@ import type { CardHeaderState } from './CardHeader.types';
2
2
  /**
3
3
  * Render the final JSX of CardHeader
4
4
  */
5
- export declare const renderCardHeader: (state: CardHeaderState) => JSX.Element;
5
+ export declare const renderCardHeader_unstable: (state: CardHeaderState) => JSX.Element;