@fluentui/react-card 9.0.0-beta.2 → 9.0.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +359 -1
- package/CHANGELOG.md +77 -2
- package/README.md +3 -1
- package/Spec.md +523 -0
- package/assets/Card.png +0 -0
- package/assets/CardHeader.png +0 -0
- package/assets/CardPreview.png +0 -0
- package/assets/context-interaction-keyboard.png +0 -0
- package/assets/context-interaction-mouse.png +0 -0
- package/assets/context-narrator.png +0 -0
- package/assets/disabled-narrator.png +0 -0
- package/assets/disabled.png +0 -0
- package/assets/interactive-interaction-keyboard.png +0 -0
- package/assets/interactive-interaction-mouse.png +0 -0
- package/assets/interactive-narrator.png +0 -0
- package/assets/non-interactive-interaction-keyboard.png +0 -0
- package/assets/non-interactive-interaction-mouse.png +0 -0
- package/assets/non-interactive-narrator.png +0 -0
- package/assets/non-interactive-selectable-interaction-keyboard.png +0 -0
- package/assets/non-interactive-selectable-interaction-mouse.png +0 -0
- package/assets/selectable-interaction-keyboard.png +0 -0
- package/assets/selectable-interaction-mouse.png +0 -0
- package/assets/selectable-narrator.png +0 -0
- package/dist/react-card.d.ts +43 -49
- package/lib/components/Card/Card.d.ts +1 -1
- package/lib/components/Card/Card.js +8 -8
- package/lib/components/Card/Card.js.map +1 -1
- package/lib/components/Card/Card.types.d.ts +4 -5
- package/lib/components/Card/renderCard.d.ts +1 -1
- package/lib/components/Card/renderCard.js +7 -7
- package/lib/components/Card/renderCard.js.map +1 -1
- package/lib/components/Card/useCard.d.ts +3 -3
- package/lib/components/Card/useCard.js +12 -11
- package/lib/components/Card/useCard.js.map +1 -1
- package/lib/components/Card/useCardStyles.d.ts +2 -1
- package/lib/components/Card/useCardStyles.js +21 -13
- package/lib/components/Card/useCardStyles.js.map +1 -1
- package/lib/components/CardFooter/CardFooter.js +7 -7
- package/lib/components/CardFooter/CardFooter.js.map +1 -1
- package/lib/components/CardFooter/CardFooter.types.d.ts +3 -3
- package/lib/components/CardFooter/renderCardFooter.d.ts +1 -1
- package/lib/components/CardFooter/renderCardFooter.js +8 -8
- package/lib/components/CardFooter/renderCardFooter.js.map +1 -1
- package/lib/components/CardFooter/useCardFooter.d.ts +4 -8
- package/lib/components/CardFooter/useCardFooter.js +10 -13
- package/lib/components/CardFooter/useCardFooter.js.map +1 -1
- package/lib/components/CardFooter/useCardFooterStyles.d.ts +2 -1
- package/lib/components/CardFooter/useCardFooterStyles.js +9 -7
- package/lib/components/CardFooter/useCardFooterStyles.js.map +1 -1
- package/lib/components/CardHeader/CardHeader.js +7 -7
- package/lib/components/CardHeader/CardHeader.js.map +1 -1
- package/lib/components/CardHeader/CardHeader.types.d.ts +8 -8
- package/lib/components/CardHeader/renderCardHeader.d.ts +1 -1
- package/lib/components/CardHeader/renderCardHeader.js +12 -8
- package/lib/components/CardHeader/renderCardHeader.js.map +1 -1
- package/lib/components/CardHeader/useCardHeader.d.ts +4 -5
- package/lib/components/CardHeader/useCardHeader.js +14 -13
- package/lib/components/CardHeader/useCardHeader.js.map +1 -1
- package/lib/components/CardHeader/useCardHeaderStyles.d.ts +2 -1
- package/lib/components/CardHeader/useCardHeaderStyles.js +9 -7
- package/lib/components/CardHeader/useCardHeaderStyles.js.map +1 -1
- package/lib/components/CardPreview/CardPreview.js +7 -7
- package/lib/components/CardPreview/CardPreview.js.map +1 -1
- package/lib/components/CardPreview/CardPreview.types.d.ts +3 -3
- package/lib/components/CardPreview/renderCardPreview.d.ts +1 -1
- package/lib/components/CardPreview/renderCardPreview.js +8 -8
- package/lib/components/CardPreview/renderCardPreview.js.map +1 -1
- package/lib/components/CardPreview/useCardPreview.d.ts +4 -8
- package/lib/components/CardPreview/useCardPreview.js +10 -13
- package/lib/components/CardPreview/useCardPreview.js.map +1 -1
- package/lib/components/CardPreview/useCardPreviewStyles.d.ts +2 -1
- package/lib/components/CardPreview/useCardPreviewStyles.js +6 -5
- package/lib/components/CardPreview/useCardPreviewStyles.js.map +1 -1
- package/lib-commonjs/Card.js +1 -1
- package/lib-commonjs/CardFooter.js +1 -1
- package/lib-commonjs/CardHeader.js +1 -1
- package/lib-commonjs/CardPreview.js +1 -1
- package/lib-commonjs/components/Card/Card.d.ts +1 -1
- package/lib-commonjs/components/Card/Card.js +9 -9
- package/lib-commonjs/components/Card/Card.js.map +1 -1
- package/lib-commonjs/components/Card/Card.types.d.ts +4 -5
- package/lib-commonjs/components/Card/index.js +1 -1
- package/lib-commonjs/components/Card/renderCard.d.ts +1 -1
- package/lib-commonjs/components/Card/renderCard.js +11 -12
- package/lib-commonjs/components/Card/renderCard.js.map +1 -1
- package/lib-commonjs/components/Card/useCard.d.ts +3 -3
- package/lib-commonjs/components/Card/useCard.js +15 -15
- package/lib-commonjs/components/Card/useCard.js.map +1 -1
- package/lib-commonjs/components/Card/useCardStyles.d.ts +2 -1
- package/lib-commonjs/components/Card/useCardStyles.js +26 -16
- package/lib-commonjs/components/Card/useCardStyles.js.map +1 -1
- package/lib-commonjs/components/CardFooter/CardFooter.js +8 -8
- package/lib-commonjs/components/CardFooter/CardFooter.js.map +1 -1
- package/lib-commonjs/components/CardFooter/CardFooter.types.d.ts +3 -3
- package/lib-commonjs/components/CardFooter/index.js +1 -1
- package/lib-commonjs/components/CardFooter/renderCardFooter.d.ts +1 -1
- package/lib-commonjs/components/CardFooter/renderCardFooter.js +12 -14
- package/lib-commonjs/components/CardFooter/renderCardFooter.js.map +1 -1
- package/lib-commonjs/components/CardFooter/useCardFooter.d.ts +4 -8
- package/lib-commonjs/components/CardFooter/useCardFooter.js +14 -18
- package/lib-commonjs/components/CardFooter/useCardFooter.js.map +1 -1
- package/lib-commonjs/components/CardFooter/useCardFooterStyles.d.ts +2 -1
- package/lib-commonjs/components/CardFooter/useCardFooterStyles.js +13 -11
- package/lib-commonjs/components/CardFooter/useCardFooterStyles.js.map +1 -1
- package/lib-commonjs/components/CardHeader/CardHeader.js +8 -8
- package/lib-commonjs/components/CardHeader/CardHeader.js.map +1 -1
- package/lib-commonjs/components/CardHeader/CardHeader.types.d.ts +8 -8
- package/lib-commonjs/components/CardHeader/index.js +1 -1
- package/lib-commonjs/components/CardHeader/renderCardHeader.d.ts +1 -1
- package/lib-commonjs/components/CardHeader/renderCardHeader.js +16 -14
- package/lib-commonjs/components/CardHeader/renderCardHeader.js.map +1 -1
- package/lib-commonjs/components/CardHeader/useCardHeader.d.ts +4 -5
- package/lib-commonjs/components/CardHeader/useCardHeader.js +19 -19
- package/lib-commonjs/components/CardHeader/useCardHeader.js.map +1 -1
- package/lib-commonjs/components/CardHeader/useCardHeaderStyles.d.ts +2 -1
- package/lib-commonjs/components/CardHeader/useCardHeaderStyles.js +14 -12
- package/lib-commonjs/components/CardHeader/useCardHeaderStyles.js.map +1 -1
- package/lib-commonjs/components/CardPreview/CardPreview.js +8 -8
- package/lib-commonjs/components/CardPreview/CardPreview.js.map +1 -1
- package/lib-commonjs/components/CardPreview/CardPreview.types.d.ts +3 -3
- package/lib-commonjs/components/CardPreview/index.js +1 -1
- package/lib-commonjs/components/CardPreview/renderCardPreview.d.ts +1 -1
- package/lib-commonjs/components/CardPreview/renderCardPreview.js +12 -14
- package/lib-commonjs/components/CardPreview/renderCardPreview.js.map +1 -1
- package/lib-commonjs/components/CardPreview/useCardPreview.d.ts +4 -8
- package/lib-commonjs/components/CardPreview/useCardPreview.js +14 -18
- package/lib-commonjs/components/CardPreview/useCardPreview.js.map +1 -1
- package/lib-commonjs/components/CardPreview/useCardPreviewStyles.d.ts +2 -1
- package/lib-commonjs/components/CardPreview/useCardPreviewStyles.js +10 -9
- package/lib-commonjs/components/CardPreview/useCardPreviewStyles.js.map +1 -1
- package/lib-commonjs/index.js +1 -1
- package/package.json +11 -13
- package/lib/common/isConformant.d.ts +0 -4
- package/lib/common/isConformant.js +0 -11
- package/lib/common/isConformant.js.map +0 -1
- package/lib-commonjs/common/isConformant.d.ts +0 -4
- package/lib-commonjs/common/isConformant.js +0 -22
- package/lib-commonjs/common/isConformant.js.map +0 -1
package/dist/react-card.d.ts
CHANGED
@@ -1,34 +1,31 @@
|
|
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
|
-
*
|
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
|
12
|
+
export declare const cardClassName = "fui-Card";
|
13
13
|
|
14
14
|
/**
|
15
15
|
* Component to render Button actions in a Card component.
|
16
16
|
*/
|
17
17
|
export declare const CardFooter: ForwardRefComponent<CardFooterProps>;
|
18
18
|
|
19
|
+
export declare const cardFooterClassName = "fui-CardFooter";
|
20
|
+
|
19
21
|
/**
|
20
22
|
* CardFooter props
|
21
23
|
*/
|
22
24
|
export declare type CardFooterProps = ComponentProps<CardFooterSlots>;
|
23
25
|
|
24
|
-
/**
|
25
|
-
* Array of all shorthand properties listed in CardFooterShorthandProps
|
26
|
-
*/
|
27
|
-
export declare const cardFooterShorthandProps: Array<keyof CardFooterSlots>;
|
28
|
-
|
29
26
|
export declare type CardFooterSlots = {
|
30
|
-
root:
|
31
|
-
action?:
|
27
|
+
root: Slot<'div'>;
|
28
|
+
action?: Slot<'div'>;
|
32
29
|
};
|
33
30
|
|
34
31
|
/**
|
@@ -41,20 +38,20 @@ export declare type CardFooterState = ComponentState<CardFooterSlots>;
|
|
41
38
|
*/
|
42
39
|
export declare const CardHeader: ForwardRefComponent<CardHeaderProps>;
|
43
40
|
|
41
|
+
export declare const cardHeaderClassName = "fui-CardHeader";
|
42
|
+
|
44
43
|
/**
|
45
44
|
* CardHeader props
|
46
45
|
*/
|
47
|
-
export declare type CardHeaderProps = ComponentProps<CardHeaderSlots
|
48
|
-
|
49
|
-
export declare const cardHeaderShorthandProps: Array<keyof CardHeaderSlots>;
|
46
|
+
export declare type CardHeaderProps = ComponentProps<Partial<CardHeaderSlots>>;
|
50
47
|
|
51
48
|
export declare type CardHeaderSlots = {
|
52
|
-
root:
|
53
|
-
image:
|
54
|
-
content?:
|
55
|
-
header:
|
56
|
-
description:
|
57
|
-
action?:
|
49
|
+
root: Slot<'div'>;
|
50
|
+
image: Slot<'div'>;
|
51
|
+
content?: Slot<'div'>;
|
52
|
+
header: Slot<'span'>;
|
53
|
+
description: Slot<'span'>;
|
54
|
+
action?: Slot<'div'>;
|
58
55
|
};
|
59
56
|
|
60
57
|
/**
|
@@ -67,19 +64,16 @@ export declare type CardHeaderState = ComponentState<CardHeaderSlots>;
|
|
67
64
|
*/
|
68
65
|
export declare const CardPreview: ForwardRefComponent<CardPreviewProps>;
|
69
66
|
|
67
|
+
export declare const cardPreviewClassName = "fui-CardPreview";
|
68
|
+
|
70
69
|
/**
|
71
70
|
* CardPreview props
|
72
71
|
*/
|
73
72
|
export declare type CardPreviewProps = ComponentProps<CardPreviewSlots>;
|
74
73
|
|
75
|
-
/**
|
76
|
-
* Array of all shorthand properties listed in CardPreviewShorthandProps
|
77
|
-
*/
|
78
|
-
export declare const cardPreviewShorthandProps: Array<keyof CardPreviewSlots>;
|
79
|
-
|
80
74
|
export declare type CardPreviewSlots = {
|
81
|
-
root:
|
82
|
-
logo?:
|
75
|
+
root: Slot<'div'>;
|
76
|
+
logo?: Slot<'div'>;
|
83
77
|
};
|
84
78
|
|
85
79
|
/**
|
@@ -90,99 +84,99 @@ export declare type CardPreviewState = ComponentState<CardPreviewSlots>;
|
|
90
84
|
/**
|
91
85
|
* Card Props
|
92
86
|
*/
|
93
|
-
export declare type CardProps = ComponentProps<CardSlots
|
87
|
+
export declare type CardProps = ComponentProps<CardSlots>;
|
94
88
|
|
95
89
|
export declare type CardSlots = {
|
96
|
-
root:
|
90
|
+
root: Slot<'div'>;
|
97
91
|
};
|
98
92
|
|
99
93
|
/**
|
100
94
|
* State used in rendering Card
|
101
95
|
*/
|
102
|
-
export declare type CardState = ComponentState<CardSlots
|
96
|
+
export declare type CardState = ComponentState<CardSlots>;
|
103
97
|
|
104
98
|
/**
|
105
99
|
* Render the final JSX of Card
|
106
100
|
*/
|
107
|
-
export declare const
|
101
|
+
export declare const renderCard_unstable: (state: CardState) => JSX.Element;
|
108
102
|
|
109
103
|
/**
|
110
104
|
* Render the final JSX of CardFooter
|
111
105
|
*/
|
112
|
-
export declare const
|
106
|
+
export declare const renderCardFooter_unstable: (state: CardFooterState) => JSX.Element;
|
113
107
|
|
114
108
|
/**
|
115
109
|
* Render the final JSX of CardHeader
|
116
110
|
*/
|
117
|
-
export declare const
|
111
|
+
export declare const renderCardHeader_unstable: (state: CardHeaderState) => JSX.Element;
|
118
112
|
|
119
113
|
/**
|
120
114
|
* Render the final JSX of CardPreview
|
121
115
|
*/
|
122
|
-
export declare const
|
116
|
+
export declare const renderCardPreview_unstable: (state: CardPreviewState) => JSX.Element;
|
123
117
|
|
124
118
|
/**
|
125
119
|
* Create the state required to render Card.
|
126
120
|
*
|
127
|
-
* The returned state can be modified with hooks such as
|
128
|
-
* before being passed to
|
121
|
+
* The returned state can be modified with hooks such as useCardStyles_unstable,
|
122
|
+
* before being passed to renderCard_unstable.
|
129
123
|
*
|
130
124
|
* @param props - props from this instance of Card
|
131
125
|
* @param ref - reference to root HTMLElement of Card
|
132
126
|
*/
|
133
|
-
export declare const
|
127
|
+
export declare const useCard_unstable: (props: CardProps, ref: React_2.Ref<HTMLElement>) => CardState;
|
134
128
|
|
135
129
|
/**
|
136
130
|
* Create the state required to render CardFooter.
|
137
131
|
*
|
138
|
-
* The returned state can be modified with hooks such as
|
139
|
-
* before being passed to
|
132
|
+
* The returned state can be modified with hooks such as useCardFooterStyles_unstable,
|
133
|
+
* before being passed to renderCardFooter_unstable.
|
140
134
|
*
|
141
135
|
* @param props - props from this instance of CardFooter
|
142
136
|
* @param ref - reference to root HTMLElement of CardFooter
|
143
137
|
*/
|
144
|
-
export declare const
|
138
|
+
export declare const useCardFooter_unstable: (props: CardFooterProps, ref: React_2.Ref<HTMLElement>) => CardFooterState;
|
145
139
|
|
146
140
|
/**
|
147
141
|
* Apply styling to the CardFooter slots based on the state
|
148
142
|
*/
|
149
|
-
export declare const
|
143
|
+
export declare const useCardFooterStyles_unstable: (state: CardFooterState) => CardFooterState;
|
150
144
|
|
151
145
|
/**
|
152
146
|
* Create the state required to render CardHeader.
|
153
147
|
*
|
154
|
-
* The returned state can be modified with hooks such as
|
155
|
-
* before being passed to
|
148
|
+
* The returned state can be modified with hooks such as useCardHeaderStyles_unstable,
|
149
|
+
* before being passed to renderCardHeader_unstable.
|
156
150
|
*
|
157
151
|
* @param props - props from this instance of CardHeader
|
158
152
|
* @param ref - reference to root HTMLElement of CardHeader
|
159
153
|
*/
|
160
|
-
export declare const
|
154
|
+
export declare const useCardHeader_unstable: (props: CardHeaderProps, ref: React_2.Ref<HTMLElement>) => CardHeaderState;
|
161
155
|
|
162
156
|
/**
|
163
157
|
* Apply styling to the CardHeader slots based on the state
|
164
158
|
*/
|
165
|
-
export declare const
|
159
|
+
export declare const useCardHeaderStyles_unstable: (state: CardHeaderState) => CardHeaderState;
|
166
160
|
|
167
161
|
/**
|
168
162
|
* Create the state required to render CardPreview.
|
169
163
|
*
|
170
|
-
* The returned state can be modified with hooks such as
|
171
|
-
* before being passed to
|
164
|
+
* The returned state can be modified with hooks such as useCardPreviewStyles_unstable,
|
165
|
+
* before being passed to renderCardPreview_unstable.
|
172
166
|
*
|
173
167
|
* @param props - props from this instance of CardPreview
|
174
168
|
* @param ref - reference to root HTMLElement of CardPreview
|
175
169
|
*/
|
176
|
-
export declare const
|
170
|
+
export declare const useCardPreview_unstable: (props: CardPreviewProps, ref: React_2.Ref<HTMLElement>) => CardPreviewState;
|
177
171
|
|
178
172
|
/**
|
179
173
|
* Apply styling to the CardPreview slots based on the state
|
180
174
|
*/
|
181
|
-
export declare const
|
175
|
+
export declare const useCardPreviewStyles_unstable: (state: CardPreviewState) => CardPreviewState;
|
182
176
|
|
183
177
|
/**
|
184
178
|
* Apply styling to the Card slots based on the state
|
185
179
|
*/
|
186
|
-
export declare const
|
180
|
+
export declare const useCardStyles_unstable: (state: CardState) => CardState;
|
187
181
|
|
188
182
|
export { }
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { CardProps } from './Card.types';
|
2
2
|
import type { ForwardRefComponent } from '@fluentui/react-utilities';
|
3
3
|
/**
|
4
|
-
*
|
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 {
|
3
|
-
import {
|
4
|
-
import {
|
2
|
+
import { useCard_unstable } from './useCard';
|
3
|
+
import { renderCard_unstable } from './renderCard';
|
4
|
+
import { useCardStyles_unstable } from './useCardStyles';
|
5
5
|
/**
|
6
|
-
*
|
6
|
+
* A card provides scaffolding for hosting actions and content for a single topic.
|
7
7
|
*/
|
8
8
|
|
9
|
-
export
|
10
|
-
|
11
|
-
|
12
|
-
return
|
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,
|
1
|
+
{"version":3,"sources":["../../../src/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","sourceRoot":""}
|
@@ -1,13 +1,12 @@
|
|
1
|
-
import type { ComponentProps, ComponentState,
|
1
|
+
import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
|
2
2
|
export declare type CardSlots = {
|
3
|
-
root:
|
3
|
+
root: Slot<'div'>;
|
4
4
|
};
|
5
|
-
export declare type CardCommons = {};
|
6
5
|
/**
|
7
6
|
* Card Props
|
8
7
|
*/
|
9
|
-
export declare type CardProps = ComponentProps<CardSlots
|
8
|
+
export declare type CardProps = ComponentProps<CardSlots>;
|
10
9
|
/**
|
11
10
|
* State used in rendering Card
|
12
11
|
*/
|
13
|
-
export declare type CardState = ComponentState<CardSlots
|
12
|
+
export declare type CardState = ComponentState<CardSlots>;
|
@@ -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
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
return /*#__PURE__*/React.createElement(slots.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":"
|
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,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","sourceRoot":""}
|
@@ -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
|
7
|
-
* before being passed to
|
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
|
12
|
+
export declare const useCard_unstable: (props: CardProps, ref: React.Ref<HTMLElement>) => CardState;
|
@@ -1,28 +1,29 @@
|
|
1
|
-
import { __assign } from "tslib";
|
2
1
|
import { getNativeElementProps } from '@fluentui/react-utilities';
|
3
|
-
import { useFocusableGroup
|
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
|
8
|
-
* before being passed to
|
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
|
15
|
-
|
16
|
-
tabBehavior:
|
13
|
+
export const useCard_unstable = (props, ref) => {
|
14
|
+
const groupperAttrs = useFocusableGroup({
|
15
|
+
tabBehavior: 'limitedTrapFocus'
|
17
16
|
});
|
18
17
|
return {
|
19
18
|
components: {
|
20
19
|
root: 'div'
|
21
20
|
},
|
22
|
-
root: getNativeElementProps(props.as || 'div',
|
23
|
-
ref
|
24
|
-
role: 'group'
|
25
|
-
|
21
|
+
root: getNativeElementProps(props.as || 'div', {
|
22
|
+
ref,
|
23
|
+
role: 'group',
|
24
|
+
...groupperAttrs,
|
25
|
+
...props
|
26
|
+
})
|
26
27
|
};
|
27
28
|
};
|
28
29
|
//# sourceMappingURL=useCard.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Card/useCard.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"sources":["../../../src/components/Card/useCard.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,QAAsC,2BAAtC;AAEA,SAAS,iBAAT,QAAkC,yBAAlC;AAEA;;;;;;;;AAQG;;AACH,OAAO,MAAM,gBAAgB,GAAG,CAAC,KAAD,EAAmB,GAAnB,KAA6D;AAC3F,QAAM,aAAa,GAAG,iBAAiB,CAAC;AACtC,IAAA,WAAW,EAAE;AADyB,GAAD,CAAvC;AAIA,SAAO;AACL,IAAA,UAAU,EAAE;AAAE,MAAA,IAAI,EAAE;AAAR,KADP;AAGL,IAAA,IAAI,EAAE,qBAAqB,CAAC,KAAK,CAAC,EAAN,IAAY,KAAb,EAAoB;AAC7C,MAAA,GAD6C;AAE7C,MAAA,IAAI,EAAE,OAFuC;AAG7C,SAAG,aAH0C;AAI7C,SAAG;AAJ0C,KAApB;AAHtB,GAAP;AAUD,CAfM","sourceRoot":""}
|
@@ -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
|
6
|
+
export declare const useCardStyles_unstable: (state: CardState) => CardState;
|
@@ -1,25 +1,33 @@
|
|
1
|
-
import { __styles, mergeClasses } from '@
|
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
|
-
|
9
|
+
const useStyles = /*#__PURE__*/__styles({
|
7
10
|
"root": {
|
8
11
|
"mc9l5x": "f22iagw",
|
9
12
|
"Beiy3e4": "f1vx9l62",
|
10
|
-
"
|
11
|
-
"
|
13
|
+
"B68tc82": "f1p9o1ba",
|
14
|
+
"Bmxbyg5": "f1sil6mw",
|
15
|
+
"E5pizo": "f1whvlc6",
|
12
16
|
"sj55zd": "f19n0e5",
|
13
17
|
"De3pzq": "fxugw4r",
|
14
18
|
"z8tnut": "f1kcqot9",
|
15
19
|
"z189sj": ["f11qrl6u", "fjlbh76"],
|
16
20
|
"Byoj8tv": "fpe6lb7",
|
17
21
|
"uwmqm3": ["fjlbh76", "f11qrl6u"],
|
18
|
-
"
|
19
|
-
"
|
20
|
-
"
|
21
|
-
"
|
22
|
-
"
|
22
|
+
"i8kkvl": "f4akndk",
|
23
|
+
"Belr9w4": "fe5j3v",
|
24
|
+
"Bbmb7ep": ["f1aa9q02", "f16jpd5f"],
|
25
|
+
"Beyfa6y": ["f16jpd5f", "f1aa9q02"],
|
26
|
+
"B7oj6ja": ["f1jar5jt", "fyu767a"],
|
27
|
+
"Btl43ni": ["fyu767a", "f1jar5jt"],
|
28
|
+
"Bt4kzjz": ["fwanz6y", "f1sdy22h"],
|
29
|
+
"B1ou843": ["f1sdy22h", "fwanz6y"],
|
30
|
+
"Bx3mhbb": "f12h22a6"
|
23
31
|
},
|
24
32
|
"interactive": {
|
25
33
|
"Bceei9c": "f1k6fduh",
|
@@ -27,7 +35,7 @@ var useStyles = /*#__PURE__*/__styles({
|
|
27
35
|
"ecr2s2": "fb40n2d"
|
28
36
|
}
|
29
37
|
}, {
|
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;}", ".
|
38
|
+
"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;}", ".f1p9o1ba{overflow-x:hidden;}", ".f1sil6mw{overflow-y:hidden;}", ".f1whvlc6{box-shadow:var(--shadow4);}", ".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;}", ".f4akndk{-webkit-column-gap:12px;column-gap:12px;}", ".fe5j3v{row-gap:12px;}", ".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);}", ".fwanz6y>.fui-CardPreview{margin-left:-12px;}", ".f1sdy22h>.fui-CardPreview{margin-right:-12px;}", ".f12h22a6>.fui-CardPreview:first-child{margin-top:-12px;}", ".f1k6fduh{cursor:pointer;}"],
|
31
39
|
"h": [".f1knas48:hover{background-color:var(--colorNeutralBackground1Hover);}"],
|
32
40
|
"a": [".fb40n2d:active{background-color:var(--colorNeutralBackground1Pressed);}"]
|
33
41
|
});
|
@@ -36,9 +44,9 @@ var useStyles = /*#__PURE__*/__styles({
|
|
36
44
|
*/
|
37
45
|
|
38
46
|
|
39
|
-
export
|
40
|
-
|
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);
|
47
|
+
export const useCardStyles_unstable = state => {
|
48
|
+
const styles = useStyles();
|
49
|
+
state.root.className = mergeClasses(cardClassName, 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);
|
42
50
|
return state;
|
43
51
|
};
|
44
52
|
//# sourceMappingURL=useCardStyles.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Card/useCardStyles.ts"],"names":[],"mappings":"AAAA,
|
1
|
+
{"version":3,"sources":["../../../src/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,EAAlB;AAqCA;;AAEG;;;AACH,OAAO,MAAM,sBAAsB,GAAI,KAAD,IAAgC;AACpE,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CACjC,aADiC,EAEjC,MAAM,CAAC,IAF0B,EAGjC,CAAC,KAAK,CAAC,IAAN,CAAW,OAAX,IACC,KAAK,CAAC,IAAN,CAAW,SADZ,IAEC,KAAK,CAAC,IAAN,CAAW,WAFZ,IAGC,KAAK,CAAC,IAAN,CAAW,WAHZ,IAIC,KAAK,CAAC,IAAN,CAAW,aAJZ,IAKC,KAAK,CAAC,IAAN,CAAW,YALZ,IAMC,KAAK,CAAC,IAAN,CAAW,UANb,KAOE,MAAM,CAAC,WAVwB,EAWjC,KAAK,CAAC,IAAN,CAAW,SAXsB,CAAnC;AAcA,SAAO,KAAP;AACD,CAjBM","sourceRoot":""}
|
@@ -1,15 +1,15 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
2
|
+
import { useCardFooter_unstable } from './useCardFooter';
|
3
|
+
import { renderCardFooter_unstable } from './renderCardFooter';
|
4
|
+
import { useCardFooterStyles_unstable } from './useCardFooterStyles';
|
5
5
|
/**
|
6
6
|
* Component to render Button actions in a Card component.
|
7
7
|
*/
|
8
8
|
|
9
|
-
export
|
10
|
-
|
11
|
-
|
12
|
-
return
|
9
|
+
export const CardFooter = /*#__PURE__*/React.forwardRef((props, ref) => {
|
10
|
+
const state = useCardFooter_unstable(props, ref);
|
11
|
+
useCardFooterStyles_unstable(state);
|
12
|
+
return renderCardFooter_unstable(state);
|
13
13
|
});
|
14
14
|
CardFooter.displayName = 'CardFooter';
|
15
15
|
//# sourceMappingURL=CardFooter.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/CardFooter/CardFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,
|
1
|
+
{"version":3,"sources":["../../../src/components/CardFooter/CardFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,sBAAT,QAAuC,iBAAvC;AACA,SAAS,yBAAT,QAA0C,oBAA1C;AACA,SAAS,4BAAT,QAA6C,uBAA7C;AAIA;;AAEG;;AACH,OAAO,MAAM,UAAU,gBAAyC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;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","sourceRoot":""}
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import type { ComponentProps, ComponentState,
|
1
|
+
import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
|
2
2
|
export declare type CardFooterSlots = {
|
3
|
-
root:
|
4
|
-
action?:
|
3
|
+
root: Slot<'div'>;
|
4
|
+
action?: Slot<'div'>;
|
5
5
|
};
|
6
6
|
/**
|
7
7
|
* CardFooter props
|
@@ -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
|
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
2
|
import { getSlots } from '@fluentui/react-utilities';
|
4
|
-
import { cardFooterShorthandProps } from './useCardFooter';
|
5
3
|
/**
|
6
4
|
* Render the final JSX of CardFooter
|
7
5
|
*/
|
8
6
|
|
9
|
-
export
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
return /*#__PURE__*/React.createElement(slots.root,
|
7
|
+
export const renderCardFooter_unstable = state => {
|
8
|
+
const {
|
9
|
+
slots,
|
10
|
+
slotProps
|
11
|
+
} = getSlots(state);
|
12
|
+
return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
|
13
|
+
}, slotProps.root.children, slots.action && /*#__PURE__*/React.createElement(slots.action, { ...slotProps.action
|
14
|
+
}));
|
15
15
|
};
|
16
16
|
//# sourceMappingURL=renderCardFooter.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/CardFooter/renderCardFooter.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"sources":["../../../src/components/CardFooter/renderCardFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,yBAAyB,GAAI,KAAD,IAA2B;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","sourceRoot":""}
|
@@ -1,16 +1,12 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import type { CardFooterProps,
|
3
|
-
/**
|
4
|
-
* Array of all shorthand properties listed in CardFooterShorthandProps
|
5
|
-
*/
|
6
|
-
export declare const cardFooterShorthandProps: Array<keyof CardFooterSlots>;
|
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
|
11
|
-
* before being passed to
|
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
11
|
*/
|
16
|
-
export declare const
|
12
|
+
export declare const useCardFooter_unstable: (props: CardFooterProps, ref: React.Ref<HTMLElement>) => CardFooterState;
|
@@ -1,30 +1,27 @@
|
|
1
|
-
import { __assign } from "tslib";
|
2
1
|
import { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';
|
3
|
-
/**
|
4
|
-
* Array of all shorthand properties listed in CardFooterShorthandProps
|
5
|
-
*/
|
6
|
-
|
7
|
-
export var cardFooterShorthandProps = ['root', 'action'];
|
8
2
|
/**
|
9
3
|
* Create the state required to render CardFooter.
|
10
4
|
*
|
11
|
-
* The returned state can be modified with hooks such as
|
12
|
-
* before being passed to
|
5
|
+
* The returned state can be modified with hooks such as useCardFooterStyles_unstable,
|
6
|
+
* before being passed to renderCardFooter_unstable.
|
13
7
|
*
|
14
8
|
* @param props - props from this instance of CardFooter
|
15
9
|
* @param ref - reference to root HTMLElement of CardFooter
|
16
10
|
*/
|
17
11
|
|
18
|
-
export
|
19
|
-
|
12
|
+
export const useCardFooter_unstable = (props, ref) => {
|
13
|
+
const {
|
14
|
+
action
|
15
|
+
} = props;
|
20
16
|
return {
|
21
17
|
components: {
|
22
18
|
root: 'div',
|
23
19
|
action: 'div'
|
24
20
|
},
|
25
|
-
root: getNativeElementProps('div',
|
26
|
-
ref
|
27
|
-
|
21
|
+
root: getNativeElementProps('div', {
|
22
|
+
ref,
|
23
|
+
...props
|
24
|
+
}),
|
28
25
|
action: resolveShorthand(action)
|
29
26
|
};
|
30
27
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/CardFooter/useCardFooter.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"sources":["../../../src/components/CardFooter/useCardFooter.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,EAAgC,gBAAhC,QAAwD,2BAAxD;AAGA;;;;;;;;AAQG;;AACH,OAAO,MAAM,sBAAsB,GAAG,CAAC,KAAD,EAAyB,GAAzB,KAAyE;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","sourceRoot":""}
|
@@ -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
|
6
|
+
export declare const useCardFooterStyles_unstable: (state: CardFooterState) => CardFooterState;
|