@fluentui/react-card 9.0.0-beta.3 → 9.0.0-beta.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (164) hide show
  1. package/CHANGELOG.json +353 -1
  2. package/CHANGELOG.md +76 -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 +45 -47
  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 +1 -1
  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 +5 -3
  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 +7 -7
  37. package/lib/components/Card/renderCard.js.map +1 -1
  38. package/lib/components/Card/useCard.d.ts +3 -3
  39. package/lib/components/Card/useCard.js +16 -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 +131 -25
  43. package/lib/components/Card/useCardStyles.js.map +1 -1
  44. package/lib/components/CardFooter/CardFooter.js +7 -7
  45. package/lib/components/CardFooter/CardFooter.js.map +1 -1
  46. package/lib/components/CardFooter/CardFooter.types.d.ts +3 -3
  47. package/lib/components/CardFooter/CardFooter.types.js.map +1 -1
  48. package/lib/components/CardFooter/index.js.map +1 -1
  49. package/lib/components/CardFooter/renderCardFooter.d.ts +1 -1
  50. package/lib/components/CardFooter/renderCardFooter.js +8 -8
  51. package/lib/components/CardFooter/renderCardFooter.js.map +1 -1
  52. package/lib/components/CardFooter/useCardFooter.d.ts +4 -8
  53. package/lib/components/CardFooter/useCardFooter.js +10 -13
  54. package/lib/components/CardFooter/useCardFooter.js.map +1 -1
  55. package/lib/components/CardFooter/useCardFooterStyles.d.ts +2 -1
  56. package/lib/components/CardFooter/useCardFooterStyles.js +9 -7
  57. package/lib/components/CardFooter/useCardFooterStyles.js.map +1 -1
  58. package/lib/components/CardHeader/CardHeader.js +7 -7
  59. package/lib/components/CardHeader/CardHeader.js.map +1 -1
  60. package/lib/components/CardHeader/CardHeader.types.d.ts +8 -8
  61. package/lib/components/CardHeader/CardHeader.types.js.map +1 -1
  62. package/lib/components/CardHeader/index.js.map +1 -1
  63. package/lib/components/CardHeader/renderCardHeader.d.ts +1 -1
  64. package/lib/components/CardHeader/renderCardHeader.js +12 -8
  65. package/lib/components/CardHeader/renderCardHeader.js.map +1 -1
  66. package/lib/components/CardHeader/useCardHeader.d.ts +4 -5
  67. package/lib/components/CardHeader/useCardHeader.js +14 -13
  68. package/lib/components/CardHeader/useCardHeader.js.map +1 -1
  69. package/lib/components/CardHeader/useCardHeaderStyles.d.ts +2 -1
  70. package/lib/components/CardHeader/useCardHeaderStyles.js +9 -7
  71. package/lib/components/CardHeader/useCardHeaderStyles.js.map +1 -1
  72. package/lib/components/CardPreview/CardPreview.js +7 -7
  73. package/lib/components/CardPreview/CardPreview.js.map +1 -1
  74. package/lib/components/CardPreview/CardPreview.types.d.ts +3 -3
  75. package/lib/components/CardPreview/CardPreview.types.js.map +1 -1
  76. package/lib/components/CardPreview/index.js.map +1 -1
  77. package/lib/components/CardPreview/renderCardPreview.d.ts +1 -1
  78. package/lib/components/CardPreview/renderCardPreview.js +8 -8
  79. package/lib/components/CardPreview/renderCardPreview.js.map +1 -1
  80. package/lib/components/CardPreview/useCardPreview.d.ts +4 -8
  81. package/lib/components/CardPreview/useCardPreview.js +10 -13
  82. package/lib/components/CardPreview/useCardPreview.js.map +1 -1
  83. package/lib/components/CardPreview/useCardPreviewStyles.d.ts +2 -1
  84. package/lib/components/CardPreview/useCardPreviewStyles.js +7 -10
  85. package/lib/components/CardPreview/useCardPreviewStyles.js.map +1 -1
  86. package/lib/index.js.map +1 -1
  87. package/lib-commonjs/Card.js +1 -1
  88. package/lib-commonjs/Card.js.map +1 -1
  89. package/lib-commonjs/CardFooter.js +1 -1
  90. package/lib-commonjs/CardFooter.js.map +1 -1
  91. package/lib-commonjs/CardHeader.js +1 -1
  92. package/lib-commonjs/CardHeader.js.map +1 -1
  93. package/lib-commonjs/CardPreview.js +1 -1
  94. package/lib-commonjs/CardPreview.js.map +1 -1
  95. package/lib-commonjs/components/Card/Card.d.ts +1 -1
  96. package/lib-commonjs/components/Card/Card.js +9 -9
  97. package/lib-commonjs/components/Card/Card.js.map +1 -1
  98. package/lib-commonjs/components/Card/Card.types.d.ts +5 -3
  99. package/lib-commonjs/components/Card/Card.types.js.map +1 -1
  100. package/lib-commonjs/components/Card/index.js +1 -1
  101. package/lib-commonjs/components/Card/index.js.map +1 -1
  102. package/lib-commonjs/components/Card/renderCard.d.ts +1 -1
  103. package/lib-commonjs/components/Card/renderCard.js +11 -12
  104. package/lib-commonjs/components/Card/renderCard.js.map +1 -1
  105. package/lib-commonjs/components/Card/useCard.d.ts +3 -3
  106. package/lib-commonjs/components/Card/useCard.js +19 -15
  107. package/lib-commonjs/components/Card/useCard.js.map +1 -1
  108. package/lib-commonjs/components/Card/useCardStyles.d.ts +2 -1
  109. package/lib-commonjs/components/Card/useCardStyles.js +136 -28
  110. package/lib-commonjs/components/Card/useCardStyles.js.map +1 -1
  111. package/lib-commonjs/components/CardFooter/CardFooter.js +8 -8
  112. package/lib-commonjs/components/CardFooter/CardFooter.js.map +1 -1
  113. package/lib-commonjs/components/CardFooter/CardFooter.types.d.ts +3 -3
  114. package/lib-commonjs/components/CardFooter/CardFooter.types.js.map +1 -1
  115. package/lib-commonjs/components/CardFooter/index.js +1 -1
  116. package/lib-commonjs/components/CardFooter/index.js.map +1 -1
  117. package/lib-commonjs/components/CardFooter/renderCardFooter.d.ts +1 -1
  118. package/lib-commonjs/components/CardFooter/renderCardFooter.js +12 -14
  119. package/lib-commonjs/components/CardFooter/renderCardFooter.js.map +1 -1
  120. package/lib-commonjs/components/CardFooter/useCardFooter.d.ts +4 -8
  121. package/lib-commonjs/components/CardFooter/useCardFooter.js +14 -18
  122. package/lib-commonjs/components/CardFooter/useCardFooter.js.map +1 -1
  123. package/lib-commonjs/components/CardFooter/useCardFooterStyles.d.ts +2 -1
  124. package/lib-commonjs/components/CardFooter/useCardFooterStyles.js +13 -11
  125. package/lib-commonjs/components/CardFooter/useCardFooterStyles.js.map +1 -1
  126. package/lib-commonjs/components/CardHeader/CardHeader.js +8 -8
  127. package/lib-commonjs/components/CardHeader/CardHeader.js.map +1 -1
  128. package/lib-commonjs/components/CardHeader/CardHeader.types.d.ts +8 -8
  129. package/lib-commonjs/components/CardHeader/CardHeader.types.js.map +1 -1
  130. package/lib-commonjs/components/CardHeader/index.js +1 -1
  131. package/lib-commonjs/components/CardHeader/index.js.map +1 -1
  132. package/lib-commonjs/components/CardHeader/renderCardHeader.d.ts +1 -1
  133. package/lib-commonjs/components/CardHeader/renderCardHeader.js +16 -14
  134. package/lib-commonjs/components/CardHeader/renderCardHeader.js.map +1 -1
  135. package/lib-commonjs/components/CardHeader/useCardHeader.d.ts +4 -5
  136. package/lib-commonjs/components/CardHeader/useCardHeader.js +19 -19
  137. package/lib-commonjs/components/CardHeader/useCardHeader.js.map +1 -1
  138. package/lib-commonjs/components/CardHeader/useCardHeaderStyles.d.ts +2 -1
  139. package/lib-commonjs/components/CardHeader/useCardHeaderStyles.js +14 -12
  140. package/lib-commonjs/components/CardHeader/useCardHeaderStyles.js.map +1 -1
  141. package/lib-commonjs/components/CardPreview/CardPreview.js +8 -8
  142. package/lib-commonjs/components/CardPreview/CardPreview.js.map +1 -1
  143. package/lib-commonjs/components/CardPreview/CardPreview.types.d.ts +3 -3
  144. package/lib-commonjs/components/CardPreview/CardPreview.types.js.map +1 -1
  145. package/lib-commonjs/components/CardPreview/index.js +1 -1
  146. package/lib-commonjs/components/CardPreview/index.js.map +1 -1
  147. package/lib-commonjs/components/CardPreview/renderCardPreview.d.ts +1 -1
  148. package/lib-commonjs/components/CardPreview/renderCardPreview.js +12 -14
  149. package/lib-commonjs/components/CardPreview/renderCardPreview.js.map +1 -1
  150. package/lib-commonjs/components/CardPreview/useCardPreview.d.ts +4 -8
  151. package/lib-commonjs/components/CardPreview/useCardPreview.js +14 -18
  152. package/lib-commonjs/components/CardPreview/useCardPreview.js.map +1 -1
  153. package/lib-commonjs/components/CardPreview/useCardPreviewStyles.d.ts +2 -1
  154. package/lib-commonjs/components/CardPreview/useCardPreviewStyles.js +11 -14
  155. package/lib-commonjs/components/CardPreview/useCardPreviewStyles.js.map +1 -1
  156. package/lib-commonjs/index.js +1 -1
  157. package/lib-commonjs/index.js.map +1 -1
  158. package/package.json +11 -13
  159. package/lib/common/isConformant.d.ts +0 -4
  160. package/lib/common/isConformant.js +0 -11
  161. package/lib/common/isConformant.js.map +0 -1
  162. package/lib-commonjs/common/isConformant.d.ts +0 -4
  163. package/lib-commonjs/common/isConformant.js +0 -22
  164. package/lib-commonjs/common/isConformant.js.map +0 -1
@@ -1,34 +1,35 @@
1
1
  import type { ComponentProps } from '@fluentui/react-utilities';
2
2
  import type { ComponentState } from '@fluentui/react-utilities';
3
3
  import type { ForwardRefComponent } from '@fluentui/react-utilities';
4
- import type { IntrinsicShorthandProps } from '@fluentui/react-utilities';
5
4
  import * as React_2 from 'react';
5
+ import type { Slot } from '@fluentui/react-utilities';
6
6
 
7
7
  /**
8
- * Component to provide scaffolding for hosting actions and content for a single topic within a card sized object.
8
+ * A card provides scaffolding for hosting actions and content for a single topic.
9
9
  */
10
10
  export declare const Card: ForwardRefComponent<CardProps>;
11
11
 
12
- export declare type CardCommons = {};
12
+ export declare const cardClassName = "fui-Card";
13
+
14
+ export declare type CardCommons = {
15
+ appearance: 'filled' | 'filled-alternative' | 'outline' | 'subtle';
16
+ };
13
17
 
14
18
  /**
15
19
  * Component to render Button actions in a Card component.
16
20
  */
17
21
  export declare const CardFooter: ForwardRefComponent<CardFooterProps>;
18
22
 
23
+ export declare const cardFooterClassName = "fui-CardFooter";
24
+
19
25
  /**
20
26
  * CardFooter props
21
27
  */
22
28
  export declare type CardFooterProps = ComponentProps<CardFooterSlots>;
23
29
 
24
- /**
25
- * Array of all shorthand properties listed in CardFooterShorthandProps
26
- */
27
- export declare const cardFooterShorthandProps: Array<keyof CardFooterSlots>;
28
-
29
30
  export declare type CardFooterSlots = {
30
- root: IntrinsicShorthandProps<'div'>;
31
- action?: IntrinsicShorthandProps<'div'>;
31
+ root: Slot<'div'>;
32
+ action?: Slot<'div'>;
32
33
  };
33
34
 
34
35
  /**
@@ -41,20 +42,20 @@ export declare type CardFooterState = ComponentState<CardFooterSlots>;
41
42
  */
42
43
  export declare const CardHeader: ForwardRefComponent<CardHeaderProps>;
43
44
 
45
+ export declare const cardHeaderClassName = "fui-CardHeader";
46
+
44
47
  /**
45
48
  * CardHeader props
46
49
  */
47
- export declare type CardHeaderProps = ComponentProps<CardHeaderSlots>;
48
-
49
- export declare const cardHeaderShorthandProps: Array<keyof CardHeaderSlots>;
50
+ export declare type CardHeaderProps = ComponentProps<Partial<CardHeaderSlots>>;
50
51
 
51
52
  export declare type CardHeaderSlots = {
52
- root: IntrinsicShorthandProps<'div'>;
53
- image: IntrinsicShorthandProps<'div'>;
54
- content?: IntrinsicShorthandProps<'div'>;
55
- header: IntrinsicShorthandProps<'span'>;
56
- description: IntrinsicShorthandProps<'span'>;
57
- action?: IntrinsicShorthandProps<'div'>;
53
+ root: Slot<'div'>;
54
+ image: Slot<'div'>;
55
+ content?: Slot<'div'>;
56
+ header: Slot<'span'>;
57
+ description: Slot<'span'>;
58
+ action?: Slot<'div'>;
58
59
  };
59
60
 
60
61
  /**
@@ -67,19 +68,16 @@ export declare type CardHeaderState = ComponentState<CardHeaderSlots>;
67
68
  */
68
69
  export declare const CardPreview: ForwardRefComponent<CardPreviewProps>;
69
70
 
71
+ export declare const cardPreviewClassName = "fui-CardPreview";
72
+
70
73
  /**
71
74
  * CardPreview props
72
75
  */
73
76
  export declare type CardPreviewProps = ComponentProps<CardPreviewSlots>;
74
77
 
75
- /**
76
- * Array of all shorthand properties listed in CardPreviewShorthandProps
77
- */
78
- export declare const cardPreviewShorthandProps: Array<keyof CardPreviewSlots>;
79
-
80
78
  export declare type CardPreviewSlots = {
81
- root: IntrinsicShorthandProps<'div'>;
82
- logo?: IntrinsicShorthandProps<'div'>;
79
+ root: Slot<'div'>;
80
+ logo?: Slot<'div'>;
83
81
  };
84
82
 
85
83
  /**
@@ -93,7 +91,7 @@ export declare type CardPreviewState = ComponentState<CardPreviewSlots>;
93
91
  export declare type CardProps = ComponentProps<CardSlots> & Partial<CardCommons>;
94
92
 
95
93
  export declare type CardSlots = {
96
- root: IntrinsicShorthandProps<'div'>;
94
+ root: Slot<'div'>;
97
95
  };
98
96
 
99
97
  /**
@@ -104,85 +102,85 @@ export declare type CardState = ComponentState<CardSlots> & CardCommons;
104
102
  /**
105
103
  * Render the final JSX of Card
106
104
  */
107
- export declare const renderCard: (state: CardState) => JSX.Element;
105
+ export declare const renderCard_unstable: (state: CardState) => JSX.Element;
108
106
 
109
107
  /**
110
108
  * Render the final JSX of CardFooter
111
109
  */
112
- export declare const renderCardFooter: (state: CardFooterState) => JSX.Element;
110
+ export declare const renderCardFooter_unstable: (state: CardFooterState) => JSX.Element;
113
111
 
114
112
  /**
115
113
  * Render the final JSX of CardHeader
116
114
  */
117
- export declare const renderCardHeader: (state: CardHeaderState) => JSX.Element;
115
+ export declare const renderCardHeader_unstable: (state: CardHeaderState) => JSX.Element;
118
116
 
119
117
  /**
120
118
  * Render the final JSX of CardPreview
121
119
  */
122
- export declare const renderCardPreview: (state: CardPreviewState) => JSX.Element;
120
+ export declare const renderCardPreview_unstable: (state: CardPreviewState) => JSX.Element;
123
121
 
124
122
  /**
125
123
  * Create the state required to render Card.
126
124
  *
127
- * The returned state can be modified with hooks such as useCardStyles,
128
- * before being passed to renderCard.
125
+ * The returned state can be modified with hooks such as useCardStyles_unstable,
126
+ * before being passed to renderCard_unstable.
129
127
  *
130
128
  * @param props - props from this instance of Card
131
129
  * @param ref - reference to root HTMLElement of Card
132
130
  */
133
- export declare const useCard: (props: CardProps, ref: React_2.Ref<HTMLElement>) => CardState;
131
+ export declare const useCard_unstable: (props: CardProps, ref: React_2.Ref<HTMLElement>) => CardState;
134
132
 
135
133
  /**
136
134
  * Create the state required to render CardFooter.
137
135
  *
138
- * The returned state can be modified with hooks such as useCardFooterStyles,
139
- * before being passed to renderCardFooter.
136
+ * The returned state can be modified with hooks such as useCardFooterStyles_unstable,
137
+ * before being passed to renderCardFooter_unstable.
140
138
  *
141
139
  * @param props - props from this instance of CardFooter
142
140
  * @param ref - reference to root HTMLElement of CardFooter
143
141
  */
144
- export declare const useCardFooter: (props: CardFooterProps, ref: React_2.Ref<HTMLElement>) => CardFooterState;
142
+ export declare const useCardFooter_unstable: (props: CardFooterProps, ref: React_2.Ref<HTMLElement>) => CardFooterState;
145
143
 
146
144
  /**
147
145
  * Apply styling to the CardFooter slots based on the state
148
146
  */
149
- export declare const useCardFooterStyles: (state: CardFooterState) => CardFooterState;
147
+ export declare const useCardFooterStyles_unstable: (state: CardFooterState) => CardFooterState;
150
148
 
151
149
  /**
152
150
  * Create the state required to render CardHeader.
153
151
  *
154
- * The returned state can be modified with hooks such as useCardHeaderStyles,
155
- * before being passed to renderCardHeader.
152
+ * The returned state can be modified with hooks such as useCardHeaderStyles_unstable,
153
+ * before being passed to renderCardHeader_unstable.
156
154
  *
157
155
  * @param props - props from this instance of CardHeader
158
156
  * @param ref - reference to root HTMLElement of CardHeader
159
157
  */
160
- export declare const useCardHeader: (props: CardHeaderProps, ref: React_2.Ref<HTMLElement>) => CardHeaderState;
158
+ export declare const useCardHeader_unstable: (props: CardHeaderProps, ref: React_2.Ref<HTMLElement>) => CardHeaderState;
161
159
 
162
160
  /**
163
161
  * Apply styling to the CardHeader slots based on the state
164
162
  */
165
- export declare const useCardHeaderStyles: (state: CardHeaderState) => CardHeaderState;
163
+ export declare const useCardHeaderStyles_unstable: (state: CardHeaderState) => CardHeaderState;
166
164
 
167
165
  /**
168
166
  * Create the state required to render CardPreview.
169
167
  *
170
- * The returned state can be modified with hooks such as useCardPreviewStyles,
171
- * before being passed to renderCardPreview.
168
+ * The returned state can be modified with hooks such as useCardPreviewStyles_unstable,
169
+ * before being passed to renderCardPreview_unstable.
172
170
  *
173
171
  * @param props - props from this instance of CardPreview
174
172
  * @param ref - reference to root HTMLElement of CardPreview
175
173
  */
176
- export declare const useCardPreview: (props: CardPreviewProps, ref: React_2.Ref<HTMLElement>) => CardPreviewState;
174
+ export declare const useCardPreview_unstable: (props: CardPreviewProps, ref: React_2.Ref<HTMLElement>) => CardPreviewState;
177
175
 
178
176
  /**
179
177
  * Apply styling to the CardPreview slots based on the state
180
178
  */
181
- export declare const useCardPreviewStyles: (state: CardPreviewState) => CardPreviewState;
179
+ export declare const useCardPreviewStyles_unstable: (state: CardPreviewState) => CardPreviewState;
182
180
 
183
181
  /**
184
182
  * Apply styling to the Card slots based on the state
185
183
  */
186
- export declare const useCardStyles: (state: CardState) => CardState;
184
+ export declare const useCardStyles_unstable: (state: CardState) => CardState;
187
185
 
188
186
  export { }
package/lib/Card.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Card.js","sourceRoot":"","sources":["../src/Card.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC"}
1
+ {"version":3,"file":"Card.js","sourceRoot":"../src/","sources":["Card.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC","sourcesContent":["export * from './components/Card/index';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"CardFooter.js","sourceRoot":"","sources":["../src/CardFooter.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC"}
1
+ {"version":3,"file":"CardFooter.js","sourceRoot":"../src/","sources":["CardFooter.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC","sourcesContent":["export * from './components/CardFooter/index';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"CardHeader.js","sourceRoot":"","sources":["../src/CardHeader.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC"}
1
+ {"version":3,"file":"CardHeader.js","sourceRoot":"../src/","sources":["CardHeader.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC","sourcesContent":["export * from './components/CardHeader/index';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"CardPreview.js","sourceRoot":"","sources":["../src/CardPreview.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC"}
1
+ {"version":3,"file":"CardPreview.js","sourceRoot":"../src/","sources":["CardPreview.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC","sourcesContent":["export * from './components/CardPreview/index';\n"]}
@@ -1,6 +1,6 @@
1
1
  import type { CardProps } from './Card.types';
2
2
  import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
3
  /**
4
- * Component to provide scaffolding for hosting actions and content for a single topic within a card sized object.
4
+ * A card provides scaffolding for hosting actions and content for a single topic.
5
5
  */
6
6
  export declare const Card: ForwardRefComponent<CardProps>;
@@ -1,15 +1,15 @@
1
1
  import * as React from 'react';
2
- import { useCard } from './useCard';
3
- import { renderCard } from './renderCard';
4
- import { useCardStyles } from './useCardStyles';
2
+ import { useCard_unstable } from './useCard';
3
+ import { renderCard_unstable } from './renderCard';
4
+ import { useCardStyles_unstable } from './useCardStyles';
5
5
  /**
6
- * Component to provide scaffolding for hosting actions and content for a single topic within a card sized object.
6
+ * A card provides scaffolding for hosting actions and content for a single topic.
7
7
  */
8
8
 
9
- export var Card = /*#__PURE__*/React.forwardRef(function (props, ref) {
10
- var state = useCard(props, ref);
11
- useCardStyles(state);
12
- return renderCard(state);
9
+ export const Card = /*#__PURE__*/React.forwardRef((props, ref) => {
10
+ const state = useCard_unstable(props, ref);
11
+ useCardStyles_unstable(state);
12
+ return renderCard_unstable(state);
13
13
  });
14
14
  Card.displayName = 'Card';
15
15
  //# sourceMappingURL=Card.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Card/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,OAAT,QAAwB,WAAxB;AACA,SAAS,UAAT,QAA2B,cAA3B;AACA,SAAS,aAAT,QAA8B,iBAA9B;AAIA;;AAEG;;AACH,OAAO,IAAM,IAAI,gBAAmC,KAAK,CAAC,UAAN,CAAiB,UAAC,KAAD,EAAQ,GAAR,EAAW;AAC9E,MAAM,KAAK,GAAG,OAAO,CAAC,KAAD,EAAQ,GAAR,CAArB;AAEA,EAAA,aAAa,CAAC,KAAD,CAAb;AACA,SAAO,UAAU,CAAC,KAAD,CAAjB;AACD,CALmD,CAA7C;AAOP,IAAI,CAAC,WAAL,GAAmB,MAAnB","sourceRoot":""}
1
+ {"version":3,"sources":["components/Card/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,gBAAT,QAAiC,WAAjC;AACA,SAAS,mBAAT,QAAoC,cAApC;AACA,SAAS,sBAAT,QAAuC,iBAAvC;AAIA;;AAEG;;AACH,OAAO,MAAM,IAAI,gBAAmC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AAClF,QAAM,KAAK,GAAG,gBAAgB,CAAC,KAAD,EAAQ,GAAR,CAA9B;AAEA,EAAA,sBAAsB,CAAC,KAAD,CAAtB;AACA,SAAO,mBAAmB,CAAC,KAAD,CAA1B;AACD,CALmD,CAA7C;AAOP,IAAI,CAAC,WAAL,GAAmB,MAAnB","sourcesContent":["import * as React from 'react';\nimport { useCard_unstable } from './useCard';\nimport { renderCard_unstable } from './renderCard';\nimport { useCardStyles_unstable } from './useCardStyles';\nimport type { CardProps } from './Card.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * A card provides scaffolding for hosting actions and content for a single topic.\n */\nexport const Card: ForwardRefComponent<CardProps> = React.forwardRef((props, ref) => {\n const state = useCard_unstable(props, ref);\n\n useCardStyles_unstable(state);\n return renderCard_unstable(state);\n});\n\nCard.displayName = 'Card';\n"],"sourceRoot":"../src/"}
@@ -1,8 +1,10 @@
1
- import type { ComponentProps, ComponentState, IntrinsicShorthandProps } from '@fluentui/react-utilities';
1
+ import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
2
2
  export declare type CardSlots = {
3
- root: IntrinsicShorthandProps<'div'>;
3
+ root: Slot<'div'>;
4
+ };
5
+ export declare type CardCommons = {
6
+ appearance: 'filled' | 'filled-alternative' | 'outline' | 'subtle';
4
7
  };
5
- export declare type CardCommons = {};
6
8
  /**
7
9
  * Card Props
8
10
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Card.types.js","sourceRoot":"","sources":["../../../src/components/Card/Card.types.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"Card.types.js","sourceRoot":"../src/","sources":["components/Card/Card.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type CardSlots = {\n root: Slot<'div'>;\n};\n\nexport type CardCommons = {\n appearance: 'filled' | 'filled-alternative' | 'outline' | 'subtle';\n};\n\n/**\n * Card Props\n */\nexport type CardProps = ComponentProps<CardSlots> & Partial<CardCommons>;\n\n/**\n * State used in rendering Card\n */\nexport type CardState = ComponentState<CardSlots> & CardCommons;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Card/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/Card/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC","sourcesContent":["export * from './Card';\nexport * from './Card.types';\nexport * from './renderCard';\nexport * from './useCard';\nexport * from './useCardStyles';\n"]}
@@ -2,4 +2,4 @@ import type { CardState } from './Card.types';
2
2
  /**
3
3
  * Render the final JSX of Card
4
4
  */
5
- export declare const renderCard: (state: CardState) => JSX.Element;
5
+ export declare const renderCard_unstable: (state: CardState) => JSX.Element;
@@ -1,15 +1,15 @@
1
- import { __assign } from "tslib";
2
1
  import * as React from 'react';
3
2
  import { getSlots } from '@fluentui/react-utilities';
4
3
  /**
5
4
  * Render the final JSX of Card
6
5
  */
7
6
 
8
- export var renderCard = function (state) {
9
- var _a = getSlots(state),
10
- slots = _a.slots,
11
- slotProps = _a.slotProps;
12
-
13
- return /*#__PURE__*/React.createElement(slots.root, __assign({}, slotProps.root));
7
+ export const renderCard_unstable = state => {
8
+ const {
9
+ slots,
10
+ slotProps
11
+ } = getSlots(state);
12
+ return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
13
+ });
14
14
  };
15
15
  //# sourceMappingURL=renderCard.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Card/renderCard.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,IAAM,UAAU,GAAG,UAAC,KAAD,EAAiB;AACnC,MAAA,EAAA,GAAuB,QAAQ,CAAY,KAAZ,CAA/B;AAAA,MAAE,KAAK,GAAA,EAAA,CAAA,KAAP;AAAA,MAAS,SAAS,GAAA,EAAA,CAAA,SAAlB;;AAEN,sBAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,CAAP;AACD,CAJM","sourceRoot":""}
1
+ {"version":3,"sources":["components/Card/renderCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,mBAAmB,GAAI,KAAD,IAAqB;AACtD,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAY,KAAZ,CAArC;AAEA,sBAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CAAP;AACD,CAJM","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { CardSlots, CardState } from './Card.types';\n\n/**\n * Render the final JSX of Card\n */\nexport const renderCard_unstable = (state: CardState) => {\n const { slots, slotProps } = getSlots<CardSlots>(state);\n\n return <slots.root {...slotProps.root} />;\n};\n"],"sourceRoot":"../src/"}
@@ -3,10 +3,10 @@ import type { CardProps, CardState } from './Card.types';
3
3
  /**
4
4
  * Create the state required to render Card.
5
5
  *
6
- * The returned state can be modified with hooks such as useCardStyles,
7
- * before being passed to renderCard.
6
+ * The returned state can be modified with hooks such as useCardStyles_unstable,
7
+ * before being passed to renderCard_unstable.
8
8
  *
9
9
  * @param props - props from this instance of Card
10
10
  * @param ref - reference to root HTMLElement of Card
11
11
  */
12
- export declare const useCard: (props: CardProps, ref: React.Ref<HTMLElement>) => CardState;
12
+ export declare const useCard_unstable: (props: CardProps, ref: React.Ref<HTMLElement>) => CardState;
@@ -1,28 +1,33 @@
1
- import { __assign } from "tslib";
2
1
  import { getNativeElementProps } from '@fluentui/react-utilities';
3
- import { useFocusableGroup, FocusableGroupTabBehavior } from '@fluentui/react-tabster';
2
+ import { useFocusableGroup } from '@fluentui/react-tabster';
4
3
  /**
5
4
  * Create the state required to render Card.
6
5
  *
7
- * The returned state can be modified with hooks such as useCardStyles,
8
- * before being passed to renderCard.
6
+ * The returned state can be modified with hooks such as useCardStyles_unstable,
7
+ * before being passed to renderCard_unstable.
9
8
  *
10
9
  * @param props - props from this instance of Card
11
10
  * @param ref - reference to root HTMLElement of Card
12
11
  */
13
12
 
14
- export var useCard = function (props, ref) {
15
- var groupperAttrs = useFocusableGroup({
16
- tabBehavior: FocusableGroupTabBehavior.LimitedTrapFocus
13
+ export const useCard_unstable = (props, ref) => {
14
+ const groupperAttrs = useFocusableGroup({
15
+ tabBehavior: 'limitedTrapFocus'
17
16
  });
17
+ const {
18
+ appearance = 'filled'
19
+ } = props;
18
20
  return {
21
+ appearance,
19
22
  components: {
20
23
  root: 'div'
21
24
  },
22
- root: getNativeElementProps(props.as || 'div', __assign(__assign({
23
- ref: ref,
24
- role: 'group'
25
- }, groupperAttrs), props))
25
+ root: getNativeElementProps(props.as || 'div', {
26
+ ref,
27
+ role: 'group',
28
+ ...groupperAttrs,
29
+ ...props
30
+ })
26
31
  };
27
32
  };
28
33
  //# sourceMappingURL=useCard.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Card/useCard.ts"],"names":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["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { CardProps, CardState } from './Card.types';\nimport { useFocusableGroup } from '@fluentui/react-tabster';\n\n/**\n * Create the state required to render Card.\n *\n * The returned state can be modified with hooks such as useCardStyles_unstable,\n * before being passed to renderCard_unstable.\n *\n * @param props - props from this instance of Card\n * @param ref - reference to root HTMLElement of Card\n */\nexport const useCard_unstable = (props: CardProps, ref: React.Ref<HTMLElement>): CardState => {\n const groupperAttrs = useFocusableGroup({\n tabBehavior: 'limitedTrapFocus',\n });\n\n const { appearance = 'filled' } = props;\n return {\n appearance,\n\n components: { root: 'div' },\n root: getNativeElementProps(props.as || 'div', {\n ref,\n role: 'group',\n ...groupperAttrs,\n ...props,\n }),\n };\n};\n"],"sourceRoot":"../src/"}
@@ -1,5 +1,6 @@
1
1
  import type { CardState } from './Card.types';
2
+ export declare const cardClassName = "fui-Card";
2
3
  /**
3
4
  * Apply styling to the Card slots based on the state
4
5
  */
5
- export declare const useCardStyles: (state: CardState) => CardState;
6
+ export declare const useCardStyles_unstable: (state: CardState) => CardState;
@@ -1,44 +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": ["f1whvlc6", "fzb35q0"],
11
+ "mc9l5x": "ftgm304",
12
+ "B68tc82": "f1p9o1ba",
13
+ "Bmxbyg5": "f1sil6mw",
12
14
  "sj55zd": "f19n0e5",
13
- "De3pzq": "fxugw4r",
14
- "z8tnut": "f1kcqot9",
15
- "z189sj": ["f11qrl6u", "fjlbh76"],
16
- "Byoj8tv": "fpe6lb7",
17
- "uwmqm3": ["fjlbh76", "f11qrl6u"],
18
- "rmohyg": "fsbu5mz",
19
- "Dimara": "ft85np5",
20
- "Beromem": ["f1kp1iwg", "f1819hsr"],
21
- "tyvvez": ["f1819hsr", "f1kp1iwg"],
22
- "kr49nh": "fthnjpr"
23
- },
24
- "interactive": {
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": {
25
33
  "Bceei9c": "f1k6fduh",
34
+ "De3pzq": "fxugw4r",
35
+ "g2u3we": "fghlq4f",
36
+ "h3c5rm": ["f1gn591s", "fjscplz"],
37
+ "B9xav0g": "fb073pr",
38
+ "zhjwy3": ["fjscplz", "f1gn591s"],
39
+ "E5pizo": "f1whvlc6",
26
40
  "Jwef8y": "f1knas48",
27
- "ecr2s2": "fb40n2d"
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": {
61
+ "Bceei9c": "f1k6fduh",
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"
28
133
  }
29
134
  }, {
30
- "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;}", ".f1whvlc6{box-shadow:var(--shadow4);}", ".fzb35q0{box-shadow:var(--shadow-4);}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", ".f1kcqot9{padding-top:12px;}", ".f11qrl6u{padding-right:12px;}", ".fjlbh76{padding-left:12px;}", ".fpe6lb7{padding-bottom:12px;}", ".fsbu5mz{gap:12px;}", ".ft85np5{border-radius:var(--borderRadiusMedium);}", ".f1kp1iwg>.fluentui-react-card-preview{margin-left:-12px;}", ".f1819hsr>.fluentui-react-card-preview{margin-right:-12px;}", ".fthnjpr>.fluentui-react-card-preview:first-child{margin-top:-12px;}", ".f1k6fduh{cursor:pointer;}"],
31
- "h": [".f1knas48:hover{background-color:var(--colorNeutralBackground1Hover);}"],
32
- "a": [".fb40n2d:active{background-color:var(--colorNeutralBackground1Pressed);}"]
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);}"]
33
138
  });
34
139
  /**
35
140
  * Apply styling to the Card slots based on the state
36
141
  */
37
142
 
38
143
 
39
- export var useCardStyles = function (state) {
40
- var styles = useStyles();
41
- state.root.className = mergeClasses(styles.root, (state.root.onClick || state.root.onMouseUp || state.root.onMouseDown || state.root.onPointerUp || state.root.onPointerDown || state.root.onTouchStart || state.root.onTouchEnd) && styles.interactive, state.root.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);
42
148
  return state;
43
149
  };
44
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,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AAC,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/"}