@fluentui/react-text 9.0.0-rc.8 → 9.0.0-rc.9
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 +54 -1
- package/CHANGELOG.md +16 -2
- package/dist/index.d.ts +26 -28
- package/lib/components/Text/Text.types.js.map +1 -1
- package/lib/components/Text/useText.js +6 -6
- package/lib/components/Text/useText.js.map +1 -1
- package/lib-commonjs/components/Text/useText.js +6 -6
- package/lib-commonjs/components/Text/useText.js.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.json
CHANGED
@@ -2,7 +2,60 @@
|
|
2
2
|
"name": "@fluentui/react-text",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "
|
5
|
+
"date": "Mon, 23 May 2022 12:10:18 GMT",
|
6
|
+
"tag": "@fluentui/react-text_v9.0.0-rc.9",
|
7
|
+
"version": "9.0.0-rc.9",
|
8
|
+
"comments": {
|
9
|
+
"prerelease": [
|
10
|
+
{
|
11
|
+
"author": "olfedias@microsoft.com",
|
12
|
+
"package": "@fluentui/react-text",
|
13
|
+
"commit": "f120fe9160ad7311a87af0cfacd8d2fb26275e34",
|
14
|
+
"comment": "chore: Update Griffel to latest version"
|
15
|
+
},
|
16
|
+
{
|
17
|
+
"author": "Humberto.Morimoto@microsoft.com",
|
18
|
+
"package": "@fluentui/react-text",
|
19
|
+
"commit": "cab7ae0f9667d278f6e4b3463f4890fe8bf63ca8",
|
20
|
+
"comment": "Removing TextCommons type."
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"author": "olfedias@microsoft.com",
|
24
|
+
"package": "@fluentui/react-text",
|
25
|
+
"commit": "60804cec07a495b8a5d1fc66338bf0443b212144",
|
26
|
+
"comment": "chore: Update Griffel to latest version"
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"author": "beachball",
|
30
|
+
"package": "@fluentui/react-text",
|
31
|
+
"comment": "Bump @fluentui/react-theme to v9.0.0-rc.8",
|
32
|
+
"commit": "8d58f08997acf595e3eb7f628123e7fa7830c394"
|
33
|
+
},
|
34
|
+
{
|
35
|
+
"author": "beachball",
|
36
|
+
"package": "@fluentui/react-text",
|
37
|
+
"comment": "Bump @fluentui/react-utilities to v9.0.0-rc.9",
|
38
|
+
"commit": "8d58f08997acf595e3eb7f628123e7fa7830c394"
|
39
|
+
},
|
40
|
+
{
|
41
|
+
"author": "beachball",
|
42
|
+
"package": "@fluentui/react-text",
|
43
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.6",
|
44
|
+
"commit": "8d58f08997acf595e3eb7f628123e7fa7830c394"
|
45
|
+
}
|
46
|
+
],
|
47
|
+
"none": [
|
48
|
+
{
|
49
|
+
"author": "t-emmajiang@microsoft.com",
|
50
|
+
"package": "@fluentui/react-text",
|
51
|
+
"commit": "d1b79b83dbffbc0242d8f463715741efec9bf5dd",
|
52
|
+
"comment": "fixing typo in Text best practices"
|
53
|
+
}
|
54
|
+
]
|
55
|
+
}
|
56
|
+
},
|
57
|
+
{
|
58
|
+
"date": "Thu, 05 May 2022 18:26:30 GMT",
|
6
59
|
"tag": "@fluentui/react-text_v9.0.0-rc.8",
|
7
60
|
"version": "9.0.0-rc.8",
|
8
61
|
"comments": {
|
package/CHANGELOG.md
CHANGED
@@ -1,12 +1,26 @@
|
|
1
1
|
# Change Log - @fluentui/react-text
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Mon, 23 May 2022 12:10:18 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
+
## [9.0.0-rc.9](https://github.com/microsoft/fluentui/tree/@fluentui/react-text_v9.0.0-rc.9)
|
8
|
+
|
9
|
+
Mon, 23 May 2022 12:10:18 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-text_v9.0.0-rc.8..@fluentui/react-text_v9.0.0-rc.9)
|
11
|
+
|
12
|
+
### Changes
|
13
|
+
|
14
|
+
- chore: Update Griffel to latest version ([PR #22894](https://github.com/microsoft/fluentui/pull/22894) by olfedias@microsoft.com)
|
15
|
+
- Removing TextCommons type. ([PR #22971](https://github.com/microsoft/fluentui/pull/22971) by Humberto.Morimoto@microsoft.com)
|
16
|
+
- chore: Update Griffel to latest version ([PR #23029](https://github.com/microsoft/fluentui/pull/23029) by olfedias@microsoft.com)
|
17
|
+
- Bump @fluentui/react-theme to v9.0.0-rc.8 ([PR #23030](https://github.com/microsoft/fluentui/pull/23030) by beachball)
|
18
|
+
- Bump @fluentui/react-utilities to v9.0.0-rc.9 ([PR #23030](https://github.com/microsoft/fluentui/pull/23030) by beachball)
|
19
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.6 ([PR #23030](https://github.com/microsoft/fluentui/pull/23030) by beachball)
|
20
|
+
|
7
21
|
## [9.0.0-rc.8](https://github.com/microsoft/fluentui/tree/@fluentui/react-text_v9.0.0-rc.8)
|
8
22
|
|
9
|
-
Thu, 05 May 2022 18:
|
23
|
+
Thu, 05 May 2022 18:26:30 GMT
|
10
24
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-text_v9.0.0-rc.7..@fluentui/react-text_v9.0.0-rc.8)
|
11
25
|
|
12
26
|
### Changes
|
package/dist/index.d.ts
CHANGED
@@ -97,85 +97,83 @@ export declare const textClassName = "fui-Text";
|
|
97
97
|
|
98
98
|
export declare const textClassNames: SlotClassNames<TextSlots>;
|
99
99
|
|
100
|
-
|
100
|
+
/**
|
101
|
+
* Text Props
|
102
|
+
*/
|
103
|
+
export declare type TextProps = ComponentProps<TextSlots> & {
|
101
104
|
/**
|
102
105
|
* Wraps the text content on white spaces.
|
103
106
|
*
|
104
|
-
* @
|
107
|
+
* @default true
|
105
108
|
*/
|
106
|
-
wrap
|
109
|
+
wrap?: boolean;
|
107
110
|
/**
|
108
111
|
* Truncate overflowing text for block displays.
|
109
112
|
*
|
110
|
-
* @
|
113
|
+
* @default false
|
111
114
|
*/
|
112
|
-
truncate
|
115
|
+
truncate?: boolean;
|
113
116
|
/**
|
114
117
|
* Applies a block display for the content.
|
115
118
|
*
|
116
|
-
* @
|
119
|
+
* @default false
|
117
120
|
*/
|
118
|
-
block
|
121
|
+
block?: boolean;
|
119
122
|
/**
|
120
123
|
* Applies the italic font style to the content.
|
121
124
|
*
|
122
|
-
* @
|
125
|
+
* @default false
|
123
126
|
*/
|
124
|
-
italic
|
127
|
+
italic?: boolean;
|
125
128
|
/**
|
126
129
|
* Applies the underline text decoration to the content.
|
127
130
|
*
|
128
|
-
* @
|
131
|
+
* @default false
|
129
132
|
*/
|
130
|
-
underline
|
133
|
+
underline?: boolean;
|
131
134
|
/**
|
132
135
|
* Applies the strikethrough text decoration to the content.
|
133
136
|
*
|
134
|
-
* @
|
137
|
+
* @default false
|
135
138
|
*/
|
136
|
-
strikethrough
|
139
|
+
strikethrough?: boolean;
|
137
140
|
/**
|
138
141
|
* Applies font size and line height based on the theme tokens.
|
139
142
|
*
|
140
|
-
* @
|
143
|
+
* @default 300
|
141
144
|
*/
|
142
|
-
size
|
145
|
+
size?: 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 1000;
|
143
146
|
/**
|
144
147
|
* Applies the font family to the content.
|
145
148
|
*
|
146
|
-
* @
|
149
|
+
* @default base
|
147
150
|
*/
|
148
|
-
font
|
151
|
+
font?: 'base' | 'monospace' | 'numeric';
|
149
152
|
/**
|
150
153
|
* Applies font weight to the content.
|
151
154
|
*
|
152
|
-
* @
|
155
|
+
* @default regular
|
153
156
|
*/
|
154
|
-
weight
|
157
|
+
weight?: 'regular' | 'medium' | 'semibold';
|
155
158
|
/**
|
156
159
|
* Aligns text based on the parent container.
|
157
160
|
*
|
158
|
-
* @
|
161
|
+
* @default start
|
159
162
|
*/
|
160
|
-
align
|
163
|
+
align?: 'start' | 'center' | 'end' | 'justify';
|
161
164
|
};
|
162
165
|
|
163
|
-
/**
|
164
|
-
* Text Props
|
165
|
-
*/
|
166
|
-
export declare type TextProps = ComponentProps<TextSlots> & Partial<TextCommons>;
|
167
|
-
|
168
166
|
/**
|
169
167
|
* Text slots
|
170
168
|
*/
|
171
169
|
export declare type TextSlots = {
|
172
|
-
root: Slot<'span', '
|
170
|
+
root: Slot<'span', 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'pre'>;
|
173
171
|
};
|
174
172
|
|
175
173
|
/**
|
176
174
|
* State used in rendering Text
|
177
175
|
*/
|
178
|
-
export declare type TextState = ComponentState<TextSlots> &
|
176
|
+
export declare type TextState = ComponentState<TextSlots> & Required<Pick<TextProps, 'align' | 'block' | 'font' | 'italic' | 'size' | 'strikethrough' | 'truncate' | 'underline' | 'weight' | 'wrap'>>;
|
179
177
|
|
180
178
|
declare type TextWrapperProps = Omit<TextProps, 'font' | 'size'>;
|
181
179
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Text.types.js","sourceRoot":"../src/","sources":["components/Text/Text.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\n/**\n * Text slots\n */\nexport type TextSlots = {\n root: Slot<'span', '
|
1
|
+
{"version":3,"file":"Text.types.js","sourceRoot":"../src/","sources":["components/Text/Text.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\n/**\n * Text slots\n */\nexport type TextSlots = {\n root: Slot<'span', 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'pre'>;\n};\n\n/**\n * Text Props\n */\nexport type TextProps = ComponentProps<TextSlots> & {\n /**\n * Wraps the text content on white spaces.\n *\n * @default true\n */\n wrap?: boolean;\n\n /**\n * Truncate overflowing text for block displays.\n *\n * @default false\n */\n truncate?: boolean;\n\n /**\n * Applies a block display for the content.\n *\n * @default false\n */\n block?: boolean;\n\n /**\n * Applies the italic font style to the content.\n *\n * @default false\n */\n italic?: boolean;\n\n /**\n * Applies the underline text decoration to the content.\n *\n * @default false\n */\n underline?: boolean;\n\n /**\n * Applies the strikethrough text decoration to the content.\n *\n * @default false\n */\n strikethrough?: boolean;\n\n /**\n * Applies font size and line height based on the theme tokens.\n *\n * @default 300\n */\n size?: 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 1000;\n\n /**\n * Applies the font family to the content.\n *\n * @default base\n */\n font?: 'base' | 'monospace' | 'numeric';\n\n /**\n * Applies font weight to the content.\n *\n * @default regular\n */\n weight?: 'regular' | 'medium' | 'semibold';\n\n /**\n * Aligns text based on the parent container.\n *\n * @default start\n */\n align?: 'start' | 'center' | 'end' | 'justify';\n};\n\n/**\n * State used in rendering Text\n */\nexport type TextState = ComponentState<TextSlots> &\n Required<\n Pick<\n TextProps,\n 'align' | 'block' | 'font' | 'italic' | 'size' | 'strikethrough' | 'truncate' | 'underline' | 'weight' | 'wrap'\n >\n >;\n"]}
|
@@ -26,16 +26,16 @@ export const useText_unstable = (props, ref) => {
|
|
26
26
|
} = props;
|
27
27
|
const as = (_a = props.as) !== null && _a !== void 0 ? _a : 'span';
|
28
28
|
const state = {
|
29
|
-
|
30
|
-
truncate: truncate !== null && truncate !== void 0 ? truncate : false,
|
29
|
+
align: align !== null && align !== void 0 ? align : 'start',
|
31
30
|
block: block !== null && block !== void 0 ? block : false,
|
31
|
+
font: font !== null && font !== void 0 ? font : 'base',
|
32
32
|
italic: italic !== null && italic !== void 0 ? italic : false,
|
33
|
-
underline: underline !== null && underline !== void 0 ? underline : false,
|
34
|
-
strikethrough: strikethrough !== null && strikethrough !== void 0 ? strikethrough : false,
|
35
33
|
size: size !== null && size !== void 0 ? size : 300,
|
36
|
-
|
34
|
+
strikethrough: strikethrough !== null && strikethrough !== void 0 ? strikethrough : false,
|
35
|
+
truncate: truncate !== null && truncate !== void 0 ? truncate : false,
|
36
|
+
underline: underline !== null && underline !== void 0 ? underline : false,
|
37
37
|
weight: weight !== null && weight !== void 0 ? weight : 'regular',
|
38
|
-
|
38
|
+
wrap: wrap !== null && wrap !== void 0 ? wrap : true,
|
39
39
|
components: {
|
40
40
|
root: 'span'
|
41
41
|
},
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["components/Text/useText.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,QAAsC,2BAAtC;AAGA;;;;;;;;AAQG;;AACH,OAAO,MAAM,gBAAgB,GAAG,CAAC,KAAD,EAAmB,GAAnB,KAA6D;;;AAC3F,QAAM;AAAE,IAAA,IAAF;AAAQ,IAAA,QAAR;AAAkB,IAAA,KAAlB;AAAyB,IAAA,MAAzB;AAAiC,IAAA,SAAjC;AAA4C,IAAA,aAA5C;AAA2D,IAAA,IAA3D;AAAiE,IAAA,IAAjE;AAAuE,IAAA,MAAvE;AAA+E,IAAA;AAA/E,MAAyF,KAA/F;AACA,QAAM,EAAE,GAAG,CAAA,EAAA,GAAA,KAAK,CAAC,EAAN,MAAQ,IAAR,IAAQ,EAAA,KAAA,KAAA,CAAR,GAAQ,EAAR,GAAY,MAAvB;AAEA,QAAM,KAAK,GAAc;AACvB,IAAA,
|
1
|
+
{"version":3,"sources":["components/Text/useText.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,QAAsC,2BAAtC;AAGA;;;;;;;;AAQG;;AACH,OAAO,MAAM,gBAAgB,GAAG,CAAC,KAAD,EAAmB,GAAnB,KAA6D;;;AAC3F,QAAM;AAAE,IAAA,IAAF;AAAQ,IAAA,QAAR;AAAkB,IAAA,KAAlB;AAAyB,IAAA,MAAzB;AAAiC,IAAA,SAAjC;AAA4C,IAAA,aAA5C;AAA2D,IAAA,IAA3D;AAAiE,IAAA,IAAjE;AAAuE,IAAA,MAAvE;AAA+E,IAAA;AAA/E,MAAyF,KAA/F;AACA,QAAM,EAAE,GAAG,CAAA,EAAA,GAAA,KAAK,CAAC,EAAN,MAAQ,IAAR,IAAQ,EAAA,KAAA,KAAA,CAAR,GAAQ,EAAR,GAAY,MAAvB;AAEA,QAAM,KAAK,GAAc;AACvB,I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ElementProps } from '@fluentui/react-utilities';\nimport type { TextProps, TextState } from './Text.types';\n\n/**\n * Create the state required to render Text.\n *\n * The returned state can be modified with hooks such as useTextStyles_unstable,\n * before being passed to renderText_unstable.\n *\n * @param props - props from this instance of Text\n * @param ref - reference to root HTMLElement of Text\n */\nexport const useText_unstable = (props: TextProps, ref: React.Ref<HTMLElement>): TextState => {\n const { wrap, truncate, block, italic, underline, strikethrough, size, font, weight, align } = props;\n const as = props.as ?? 'span';\n\n const state: TextState = {\n align: align ?? 'start',\n block: block ?? false,\n font: font ?? 'base',\n italic: italic ?? false,\n size: size ?? 300,\n strikethrough: strikethrough ?? false,\n truncate: truncate ?? false,\n underline: underline ?? false,\n weight: weight ?? 'regular',\n wrap: wrap ?? true,\n\n components: { root: 'span' },\n\n root: getNativeElementProps(as, {\n ref,\n ...props,\n as,\n }),\n };\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
@@ -34,16 +34,16 @@ const useText_unstable = (props, ref) => {
|
|
34
34
|
} = props;
|
35
35
|
const as = (_a = props.as) !== null && _a !== void 0 ? _a : 'span';
|
36
36
|
const state = {
|
37
|
-
|
38
|
-
truncate: truncate !== null && truncate !== void 0 ? truncate : false,
|
37
|
+
align: align !== null && align !== void 0 ? align : 'start',
|
39
38
|
block: block !== null && block !== void 0 ? block : false,
|
39
|
+
font: font !== null && font !== void 0 ? font : 'base',
|
40
40
|
italic: italic !== null && italic !== void 0 ? italic : false,
|
41
|
-
underline: underline !== null && underline !== void 0 ? underline : false,
|
42
|
-
strikethrough: strikethrough !== null && strikethrough !== void 0 ? strikethrough : false,
|
43
41
|
size: size !== null && size !== void 0 ? size : 300,
|
44
|
-
|
42
|
+
strikethrough: strikethrough !== null && strikethrough !== void 0 ? strikethrough : false,
|
43
|
+
truncate: truncate !== null && truncate !== void 0 ? truncate : false,
|
44
|
+
underline: underline !== null && underline !== void 0 ? underline : false,
|
45
45
|
weight: weight !== null && weight !== void 0 ? weight : 'regular',
|
46
|
-
|
46
|
+
wrap: wrap !== null && wrap !== void 0 ? wrap : true,
|
47
47
|
components: {
|
48
48
|
root: 'span'
|
49
49
|
},
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["components/Text/useText.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;;;;;;;AAQG;;;AACI,MAAM,gBAAgB,GAAG,CAAC,KAAD,EAAmB,GAAnB,KAA6D;;;AAC3F,QAAM;AAAE,IAAA,IAAF;AAAQ,IAAA,QAAR;AAAkB,IAAA,KAAlB;AAAyB,IAAA,MAAzB;AAAiC,IAAA,SAAjC;AAA4C,IAAA,aAA5C;AAA2D,IAAA,IAA3D;AAAiE,IAAA,IAAjE;AAAuE,IAAA,MAAvE;AAA+E,IAAA;AAA/E,MAAyF,KAA/F;AACA,QAAM,EAAE,GAAG,CAAA,EAAA,GAAA,KAAK,CAAC,EAAN,MAAQ,IAAR,IAAQ,EAAA,KAAA,KAAA,CAAR,GAAQ,EAAR,GAAY,MAAvB;AAEA,QAAM,KAAK,GAAc;AACvB,IAAA,
|
1
|
+
{"version":3,"sources":["components/Text/useText.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;;;;;;;AAQG;;;AACI,MAAM,gBAAgB,GAAG,CAAC,KAAD,EAAmB,GAAnB,KAA6D;;;AAC3F,QAAM;AAAE,IAAA,IAAF;AAAQ,IAAA,QAAR;AAAkB,IAAA,KAAlB;AAAyB,IAAA,MAAzB;AAAiC,IAAA,SAAjC;AAA4C,IAAA,aAA5C;AAA2D,IAAA,IAA3D;AAAiE,IAAA,IAAjE;AAAuE,IAAA,MAAvE;AAA+E,IAAA;AAA/E,MAAyF,KAA/F;AACA,QAAM,EAAE,GAAG,CAAA,EAAA,GAAA,KAAK,CAAC,EAAN,MAAQ,IAAR,IAAQ,EAAA,KAAA,KAAA,CAAR,GAAQ,EAAR,GAAY,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SAAO,KAAP;AACD,CA1BM;;AAAM,OAAA,CAAA,gBAAA,GAAgB,gBAAhB","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { TextProps, TextState } from './Text.types';\n\n/**\n * Create the state required to render Text.\n *\n * The returned state can be modified with hooks such as useTextStyles_unstable,\n * before being passed to renderText_unstable.\n *\n * @param props - props from this instance of Text\n * @param ref - reference to root HTMLElement of Text\n */\nexport const useText_unstable = (props: TextProps, ref: React.Ref<HTMLElement>): TextState => {\n const { wrap, truncate, block, italic, underline, strikethrough, size, font, weight, align } = props;\n const as = props.as ?? 'span';\n\n const state: TextState = {\n align: align ?? 'start',\n block: block ?? false,\n font: font ?? 'base',\n italic: italic ?? false,\n size: size ?? 300,\n strikethrough: strikethrough ?? false,\n truncate: truncate ?? false,\n underline: underline ?? false,\n weight: weight ?? 'regular',\n wrap: wrap ?? true,\n\n components: { root: 'span' },\n\n root: getNativeElementProps(as, {\n ref,\n ...props,\n as,\n }),\n };\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-text",
|
3
|
-
"version": "9.0.0-rc.
|
3
|
+
"version": "9.0.0-rc.9",
|
4
4
|
"description": "Text is a typography and styling abstraction component that can be used to ensure the consistency of all text across your application.",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -28,13 +28,13 @@
|
|
28
28
|
"devDependencies": {
|
29
29
|
"@fluentui/eslint-plugin": "*",
|
30
30
|
"@fluentui/react-conformance": "*",
|
31
|
-
"@fluentui/react-conformance-griffel": "9.0.0-beta.
|
31
|
+
"@fluentui/react-conformance-griffel": "9.0.0-beta.6",
|
32
32
|
"@fluentui/scripts": "^1.0.0"
|
33
33
|
},
|
34
34
|
"dependencies": {
|
35
|
-
"@griffel/react": "1.0.
|
36
|
-
"@fluentui/react-theme": "9.0.0-rc.
|
37
|
-
"@fluentui/react-utilities": "9.0.0-rc.
|
35
|
+
"@griffel/react": "1.0.5",
|
36
|
+
"@fluentui/react-theme": "9.0.0-rc.8",
|
37
|
+
"@fluentui/react-utilities": "9.0.0-rc.9",
|
38
38
|
"tslib": "^2.1.0"
|
39
39
|
},
|
40
40
|
"peerDependencies": {
|