@fluentui/react-migration-v0-v9 9.0.34 → 9.0.36
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 +85 -1
- package/CHANGELOG.md +29 -2
- package/lib/components/Flex/Flex.js +2 -2
- package/lib/components/Flex/Flex.js.map +1 -1
- package/lib/components/FormField/FormFieldShim.js +2 -3
- package/lib/components/FormField/FormFieldShim.js.map +1 -1
- package/lib-commonjs/components/Flex/Flex.js +2 -2
- package/lib-commonjs/components/Flex/Flex.js.map +1 -1
- package/lib-commonjs/components/FormField/FormFieldShim.js +2 -3
- package/lib-commonjs/components/FormField/FormFieldShim.js.map +1 -1
- package/package.json +6 -6
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,91 @@
|
|
|
2
2
|
"name": "@fluentui/react-migration-v0-v9",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Tue, 26 Sep 2023 17:44:12 GMT",
|
|
6
|
+
"tag": "@fluentui/react-migration-v0-v9_v9.0.36",
|
|
7
|
+
"version": "9.0.36",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "yuanboxue@microsoft.com",
|
|
12
|
+
"package": "@fluentui/react-migration-v0-v9",
|
|
13
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d",
|
|
14
|
+
"comment": "chore: trigger manual version bump after broken release"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "beachball",
|
|
18
|
+
"package": "@fluentui/react-migration-v0-v9",
|
|
19
|
+
"comment": "Bump @fluentui/react-theme to v9.1.14",
|
|
20
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "beachball",
|
|
24
|
+
"package": "@fluentui/react-migration-v0-v9",
|
|
25
|
+
"comment": "Bump @fluentui/react-utilities to v9.13.5",
|
|
26
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"author": "beachball",
|
|
30
|
+
"package": "@fluentui/react-migration-v0-v9",
|
|
31
|
+
"comment": "Bump @fluentui/react-jsx-runtime to v9.0.12",
|
|
32
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"author": "beachball",
|
|
36
|
+
"package": "@fluentui/react-migration-v0-v9",
|
|
37
|
+
"comment": "Bump @fluentui/react-components to v9.32.3",
|
|
38
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"date": "Tue, 26 Sep 2023 15:31:56 GMT",
|
|
45
|
+
"tag": "@fluentui/react-migration-v0-v9_v9.0.35",
|
|
46
|
+
"version": "9.0.35",
|
|
47
|
+
"comments": {
|
|
48
|
+
"patch": [
|
|
49
|
+
{
|
|
50
|
+
"author": "martinhochel@microsoft.com",
|
|
51
|
+
"package": "@fluentui/react-migration-v0-v9",
|
|
52
|
+
"commit": "e61473fa10195f6ebf2308205c1e72e91b711831",
|
|
53
|
+
"comment": "fix: bump swc core to mitigate transpilation memory leaks"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"author": "ololubek@microsoft.com",
|
|
57
|
+
"package": "@fluentui/react-migration-v0-v9",
|
|
58
|
+
"commit": "a31e7394d9f169bc5aa55430a22cdc65425a1b49",
|
|
59
|
+
"comment": "chore: Update react-icons version to pick up IconDirectionContextProvider updated export"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"author": "beachball",
|
|
63
|
+
"package": "@fluentui/react-migration-v0-v9",
|
|
64
|
+
"comment": "Bump @fluentui/react-theme to v9.1.13",
|
|
65
|
+
"commit": "e16520437e10cd824ac254dd797e32762b5de72d"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"author": "beachball",
|
|
69
|
+
"package": "@fluentui/react-migration-v0-v9",
|
|
70
|
+
"comment": "Bump @fluentui/react-utilities to v9.13.4",
|
|
71
|
+
"commit": "e16520437e10cd824ac254dd797e32762b5de72d"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"author": "beachball",
|
|
75
|
+
"package": "@fluentui/react-migration-v0-v9",
|
|
76
|
+
"comment": "Bump @fluentui/react-jsx-runtime to v9.0.11",
|
|
77
|
+
"commit": "e16520437e10cd824ac254dd797e32762b5de72d"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"author": "beachball",
|
|
81
|
+
"package": "@fluentui/react-migration-v0-v9",
|
|
82
|
+
"comment": "Bump @fluentui/react-components to v9.32.2",
|
|
83
|
+
"commit": "e16520437e10cd824ac254dd797e32762b5de72d"
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"date": "Wed, 20 Sep 2023 17:47:39 GMT",
|
|
6
90
|
"tag": "@fluentui/react-migration-v0-v9_v9.0.34",
|
|
7
91
|
"version": "9.0.34",
|
|
8
92
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,39 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-migration-v0-v9
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Tue, 26 Sep 2023 17:44:12 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.0.36](https://github.com/microsoft/fluentui/tree/@fluentui/react-migration-v0-v9_v9.0.36)
|
|
8
|
+
|
|
9
|
+
Tue, 26 Sep 2023 17:44:12 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-migration-v0-v9_v9.0.35..@fluentui/react-migration-v0-v9_v9.0.36)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- chore: trigger manual version bump after broken release ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by yuanboxue@microsoft.com)
|
|
15
|
+
- Bump @fluentui/react-theme to v9.1.14 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
|
|
16
|
+
- Bump @fluentui/react-utilities to v9.13.5 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
|
|
17
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.12 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
|
|
18
|
+
- Bump @fluentui/react-components to v9.32.3 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
|
|
19
|
+
|
|
20
|
+
## [9.0.35](https://github.com/microsoft/fluentui/tree/@fluentui/react-migration-v0-v9_v9.0.35)
|
|
21
|
+
|
|
22
|
+
Tue, 26 Sep 2023 15:31:56 GMT
|
|
23
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-migration-v0-v9_v9.0.34..@fluentui/react-migration-v0-v9_v9.0.35)
|
|
24
|
+
|
|
25
|
+
### Patches
|
|
26
|
+
|
|
27
|
+
- fix: bump swc core to mitigate transpilation memory leaks ([PR #29253](https://github.com/microsoft/fluentui/pull/29253) by martinhochel@microsoft.com)
|
|
28
|
+
- chore: Update react-icons version to pick up IconDirectionContextProvider updated export ([PR #29151](https://github.com/microsoft/fluentui/pull/29151) by ololubek@microsoft.com)
|
|
29
|
+
- Bump @fluentui/react-theme to v9.1.13 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
|
|
30
|
+
- Bump @fluentui/react-utilities to v9.13.4 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
|
|
31
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.11 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
|
|
32
|
+
- Bump @fluentui/react-components to v9.32.2 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
|
|
33
|
+
|
|
7
34
|
## [9.0.34](https://github.com/microsoft/fluentui/tree/@fluentui/react-migration-v0-v9_v9.0.34)
|
|
8
35
|
|
|
9
|
-
Wed, 20 Sep 2023 17:
|
|
36
|
+
Wed, 20 Sep 2023 17:47:39 GMT
|
|
10
37
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-migration-v0-v9_v9.0.33..@fluentui/react-migration-v0-v9_v9.0.34)
|
|
11
38
|
|
|
12
39
|
### Patches
|
|
@@ -43,9 +43,9 @@ export const Flex = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
43
43
|
]);
|
|
44
44
|
const flexClasses = mergeClasses(flexClassName, classes.flex, inline && classes.inline, column && classes.column, hAlign && (column ? classMaps.alignItems[hAlign] : classMaps.justifyContent[hAlign]), vAlign && (column ? classMaps.justifyContent[vAlign] : classMaps.alignItems[vAlign]), space && classMaps.justifyContentSpace[space], wrap && classes.wrap, fill && classes.fill, gap && (column ? classMaps.gapForColumnFlex[gap] : classMaps.gapRow[gap]), padding && classMaps.paddings[padding], className);
|
|
45
45
|
const content = React.Children.map(children, (child)=>{
|
|
46
|
-
var _child_type
|
|
46
|
+
var _child_type;
|
|
47
47
|
// @ts-expect-error __isFlexItem is added to the React type property by N*
|
|
48
|
-
const isFlexItemElement =
|
|
48
|
+
const isFlexItemElement = child === null || child === void 0 ? void 0 : (_child_type = child.type) === null || _child_type === void 0 ? void 0 : _child_type.__isFlexItem;
|
|
49
49
|
return isFlexItemElement ? /*#__PURE__*/ React.cloneElement(child, {
|
|
50
50
|
flexDirection: column ? 'column' : 'row'
|
|
51
51
|
}) : child;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Flex.tsx"],"sourcesContent":["import { mergeClasses } from '@fluentui/react-components';\nimport * as React from 'react';\n\nimport { useFlexStyles } from './Flex.styles';\n\nexport interface FlexProps {\n /** Defines if container should be inline element. */\n inline?: boolean;\n\n /** Sets vertical flow direction. */\n column?: boolean;\n\n /** Allows overflow items to wrap on the next container's line. */\n wrap?: boolean;\n\n /** Controls items alignment in horizontal direction. */\n hAlign?: 'start' | 'center' | 'end' | 'stretch';\n\n /** Controls items alignment in vertical direction. */\n vAlign?: 'start' | 'center' | 'end' | 'stretch';\n\n /** Defines strategy for distributing remaining space between items. */\n space?: 'around' | 'between' | 'evenly';\n\n /** Defines gap between each two adjacent child items. */\n gap?: 'gap.smaller' | 'gap.small' | 'gap.medium' | 'gap.large';\n\n /** Defines container's padding. */\n padding?: 'padding.medium';\n\n /** Orders container to fill all parent's space available. */\n fill?: boolean;\n}\n\nexport const flexClassName = 'fui-Flex';\n\nexport const Flex = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLElement> & FlexProps>((props, ref) => {\n const { children, column, fill, gap, hAlign, inline, padding, space, vAlign, wrap, className, ...rest } = props;\n const classes = useFlexStyles();\n\n const classMaps = React.useMemo(\n () => ({\n alignItems: {\n start: classes.alignItemsFlexStart,\n center: classes.alignItemsCenter,\n end: classes.alignItemsFlexEnd,\n stretch: classes.alignItemsCenter,\n },\n justifyContent: {\n start: classes.justifyContentFlexStart,\n center: classes.justifyContentCenter,\n end: classes.justifyContentFlexEnd,\n stretch: classes.justifyContentStretch,\n },\n justifyContentSpace: {\n around: classes.justifyContentSpaceAround,\n between: classes.justifyContentSpaceBetween,\n evenly: classes.justifyContentSpaceEvenly,\n },\n gapForColumnFlex: {\n 'gap.smaller': classes.gapForColumnFlexSmaller,\n 'gap.small': classes.gapForColumnFlexSmall,\n 'gap.medium': classes.gapForColumnFlexMedium,\n 'gap.large': classes.gapForColumnFlexLarge,\n },\n gapRow: {\n 'gap.smaller': classes.gapForRowFlexSmaller,\n 'gap.small': classes.gapForRowFlexSmall,\n 'gap.medium': classes.gapForRowFlexMedium,\n 'gap.large': classes.gapForRowFlexLarge,\n },\n paddings: {\n 'padding.medium': classes.paddingMedium,\n },\n }),\n [classes],\n );\n\n const flexClasses = mergeClasses(\n flexClassName,\n classes.flex,\n inline && classes.inline,\n column && classes.column,\n hAlign && (column ? classMaps.alignItems[hAlign] : classMaps.justifyContent[hAlign]),\n vAlign && (column ? classMaps.justifyContent[vAlign] : classMaps.alignItems[vAlign]),\n space && classMaps.justifyContentSpace[space],\n wrap && classes.wrap,\n fill && classes.fill,\n gap && (column ? classMaps.gapForColumnFlex[gap] : classMaps.gapRow[gap]),\n padding && classMaps.paddings[padding],\n className,\n );\n\n const content = React.Children.map(children, child => {\n // @ts-expect-error __isFlexItem is added to the React type property by N*\n const isFlexItemElement: boolean = child?.type?.__isFlexItem;\n\n return isFlexItemElement\n ? React.cloneElement(child as React.ReactElement, {\n flexDirection: column ? 'column' : 'row',\n })\n : child;\n });\n\n return (\n <div ref={ref} className={flexClasses} {...rest}>\n {content}\n </div>\n );\n});\n\nFlex.displayName = 'Flex';\n"],"names":["mergeClasses","React","useFlexStyles","flexClassName","Flex","forwardRef","props","ref","children","column","fill","gap","hAlign","inline","padding","space","vAlign","wrap","className","rest","classes","classMaps","useMemo","alignItems","start","alignItemsFlexStart","center","alignItemsCenter","end","alignItemsFlexEnd","stretch","justifyContent","justifyContentFlexStart","justifyContentCenter","justifyContentFlexEnd","justifyContentStretch","justifyContentSpace","around","justifyContentSpaceAround","between","justifyContentSpaceBetween","evenly","justifyContentSpaceEvenly","gapForColumnFlex","gapForColumnFlexSmaller","gapForColumnFlexSmall","gapForColumnFlexMedium","gapForColumnFlexLarge","gapRow","gapForRowFlexSmaller","gapForRowFlexSmall","gapForRowFlexMedium","gapForRowFlexLarge","paddings","paddingMedium","flexClasses","flex","content","Children","map","child","isFlexItemElement","type","__isFlexItem","cloneElement","flexDirection","div","displayName"],"mappings":"AAAA,SAASA,YAAY,QAAQ,6BAA6B;AAC1D,YAAYC,WAAW,QAAQ;AAE/B,SAASC,aAAa,QAAQ,gBAAgB;AA+B9C,OAAO,MAAMC,gBAAgB,WAAW;AAExC,OAAO,MAAMC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,CAAAA,SAASY,UAAUE,UAAU,CAACX,OAAO,GAAGS,UAAUU,cAAc,CAACnB,OAAO,AAAD,GAClFI,UAAWP,CAAAA,SAASY,UAAUU,cAAc,CAACf,OAAO,GAAGK,UAAUE,UAAU,CAACP,OAAO,AAAD,GAClFD,SAASM,UAAUe,mBAAmB,CAACrB,MAAM,EAC7CE,QAAQG,QAAQH,IAAI,EACpBP,QAAQU,QAAQV,IAAI,EACpBC,OAAQF,CAAAA,SAASY,UAAUsB,gBAAgB,CAAChC,IAAI,GAAGU,UAAU2B,MAAM,CAACrC,IAAI,AAAD,GACvEG,WAAWO,UAAUgC,QAAQ,CAACvC,QAAQ,EACtCI;IAGF,MAAMuC,UAAUxD,MAAMyD,QAAQ,CAACC,GAAG,CAACnD,UAAUoD,CAAAA;YAERA
|
|
1
|
+
{"version":3,"sources":["Flex.tsx"],"sourcesContent":["import { mergeClasses } from '@fluentui/react-components';\nimport * as React from 'react';\n\nimport { useFlexStyles } from './Flex.styles';\n\nexport interface FlexProps {\n /** Defines if container should be inline element. */\n inline?: boolean;\n\n /** Sets vertical flow direction. */\n column?: boolean;\n\n /** Allows overflow items to wrap on the next container's line. */\n wrap?: boolean;\n\n /** Controls items alignment in horizontal direction. */\n hAlign?: 'start' | 'center' | 'end' | 'stretch';\n\n /** Controls items alignment in vertical direction. */\n vAlign?: 'start' | 'center' | 'end' | 'stretch';\n\n /** Defines strategy for distributing remaining space between items. */\n space?: 'around' | 'between' | 'evenly';\n\n /** Defines gap between each two adjacent child items. */\n gap?: 'gap.smaller' | 'gap.small' | 'gap.medium' | 'gap.large';\n\n /** Defines container's padding. */\n padding?: 'padding.medium';\n\n /** Orders container to fill all parent's space available. */\n fill?: boolean;\n}\n\nexport const flexClassName = 'fui-Flex';\n\nexport const Flex = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLElement> & FlexProps>((props, ref) => {\n const { children, column, fill, gap, hAlign, inline, padding, space, vAlign, wrap, className, ...rest } = props;\n const classes = useFlexStyles();\n\n const classMaps = React.useMemo(\n () => ({\n alignItems: {\n start: classes.alignItemsFlexStart,\n center: classes.alignItemsCenter,\n end: classes.alignItemsFlexEnd,\n stretch: classes.alignItemsCenter,\n },\n justifyContent: {\n start: classes.justifyContentFlexStart,\n center: classes.justifyContentCenter,\n end: classes.justifyContentFlexEnd,\n stretch: classes.justifyContentStretch,\n },\n justifyContentSpace: {\n around: classes.justifyContentSpaceAround,\n between: classes.justifyContentSpaceBetween,\n evenly: classes.justifyContentSpaceEvenly,\n },\n gapForColumnFlex: {\n 'gap.smaller': classes.gapForColumnFlexSmaller,\n 'gap.small': classes.gapForColumnFlexSmall,\n 'gap.medium': classes.gapForColumnFlexMedium,\n 'gap.large': classes.gapForColumnFlexLarge,\n },\n gapRow: {\n 'gap.smaller': classes.gapForRowFlexSmaller,\n 'gap.small': classes.gapForRowFlexSmall,\n 'gap.medium': classes.gapForRowFlexMedium,\n 'gap.large': classes.gapForRowFlexLarge,\n },\n paddings: {\n 'padding.medium': classes.paddingMedium,\n },\n }),\n [classes],\n );\n\n const flexClasses = mergeClasses(\n flexClassName,\n classes.flex,\n inline && classes.inline,\n column && classes.column,\n hAlign && (column ? classMaps.alignItems[hAlign] : classMaps.justifyContent[hAlign]),\n vAlign && (column ? classMaps.justifyContent[vAlign] : classMaps.alignItems[vAlign]),\n space && classMaps.justifyContentSpace[space],\n wrap && classes.wrap,\n fill && classes.fill,\n gap && (column ? classMaps.gapForColumnFlex[gap] : classMaps.gapRow[gap]),\n padding && classMaps.paddings[padding],\n className,\n );\n\n const content = React.Children.map(children, child => {\n // @ts-expect-error __isFlexItem is added to the React type property by N*\n const isFlexItemElement: boolean = child?.type?.__isFlexItem;\n\n return isFlexItemElement\n ? React.cloneElement(child as React.ReactElement, {\n flexDirection: column ? 'column' : 'row',\n })\n : child;\n });\n\n return (\n <div ref={ref} className={flexClasses} {...rest}>\n {content}\n </div>\n );\n});\n\nFlex.displayName = 'Flex';\n"],"names":["mergeClasses","React","useFlexStyles","flexClassName","Flex","forwardRef","props","ref","children","column","fill","gap","hAlign","inline","padding","space","vAlign","wrap","className","rest","classes","classMaps","useMemo","alignItems","start","alignItemsFlexStart","center","alignItemsCenter","end","alignItemsFlexEnd","stretch","justifyContent","justifyContentFlexStart","justifyContentCenter","justifyContentFlexEnd","justifyContentStretch","justifyContentSpace","around","justifyContentSpaceAround","between","justifyContentSpaceBetween","evenly","justifyContentSpaceEvenly","gapForColumnFlex","gapForColumnFlexSmaller","gapForColumnFlexSmall","gapForColumnFlexMedium","gapForColumnFlexLarge","gapRow","gapForRowFlexSmaller","gapForRowFlexSmall","gapForRowFlexMedium","gapForRowFlexLarge","paddings","paddingMedium","flexClasses","flex","content","Children","map","child","isFlexItemElement","type","__isFlexItem","cloneElement","flexDirection","div","displayName"],"mappings":"AAAA,SAASA,YAAY,QAAQ,6BAA6B;AAC1D,YAAYC,WAAW,QAAQ;AAE/B,SAASC,aAAa,QAAQ,gBAAgB;AA+B9C,OAAO,MAAMC,gBAAgB,WAAW;AAExC,OAAO,MAAMC,qBAAOH,MAAMI,UAAU,CAAgE,CAACC,OAAOC;IAC1G,MAAM,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,IAAI,EAAEC,GAAG,EAAEC,MAAM,EAAEC,MAAM,EAAEC,OAAO,EAAEC,KAAK,EAAEC,MAAM,EAAEC,IAAI,EAAEC,SAAS,EAAE,GAAGC,MAAM,GAAGb;IAC1G,MAAMc,UAAUlB;IAEhB,MAAMmB,YAAYpB,MAAMqB,OAAO,CAC7B,IAAO,CAAA;YACLC,YAAY;gBACVC,OAAOJ,QAAQK,mBAAmB;gBAClCC,QAAQN,QAAQO,gBAAgB;gBAChCC,KAAKR,QAAQS,iBAAiB;gBAC9BC,SAASV,QAAQO,gBAAgB;YACnC;YACAI,gBAAgB;gBACdP,OAAOJ,QAAQY,uBAAuB;gBACtCN,QAAQN,QAAQa,oBAAoB;gBACpCL,KAAKR,QAAQc,qBAAqB;gBAClCJ,SAASV,QAAQ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kCAAAA,YAAaG,YAAY;QAE5D,OAAOF,kCACH5D,MAAM+D,YAAY,CAACJ,OAA6B;YAC9CK,eAAexD,SAAS,WAAW;QACrC,KACAmD;IACN;IAEA,qBACE,oBAACM;QAAI3D,KAAKA;QAAKW,WAAWqC;QAAc,GAAGpC,IAAI;OAC5CsC;AAGP,GAAG;AAEHrD,KAAK+D,WAAW,GAAG"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { renderField_unstable, useFieldContextValues_unstable, useFieldStyles_unstable, useField_unstable } from '@fluentui/react-components';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
export const FormFieldShim = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
4
|
-
var _control, _control1;
|
|
5
4
|
const { errorMessage, required, control, label } = props;
|
|
6
5
|
const fieldProps = {
|
|
7
6
|
required
|
|
8
7
|
};
|
|
9
|
-
if (errorMessage && (
|
|
8
|
+
if (errorMessage && (control === null || control === void 0 ? void 0 : control.error) === 'true') {
|
|
10
9
|
fieldProps.validationState = 'error';
|
|
11
10
|
if (typeof errorMessage === 'object') {
|
|
12
11
|
fieldProps.validationMessage = errorMessage.content;
|
|
@@ -22,7 +21,7 @@ export const FormFieldShim = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
22
21
|
fieldProps.label = label;
|
|
23
22
|
}
|
|
24
23
|
}
|
|
25
|
-
const children = props.children || (
|
|
24
|
+
const children = props.children || (control === null || control === void 0 ? void 0 : control.content);
|
|
26
25
|
if (/*#__PURE__*/ React.isValidElement(children)) {
|
|
27
26
|
const child = children;
|
|
28
27
|
// Use the Field's child render function to pass the field control props to the child
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["FormFieldShim.tsx"],"sourcesContent":["import {\n FieldProps,\n renderField_unstable,\n useFieldContextValues_unstable,\n useFieldStyles_unstable,\n useField_unstable,\n} from '@fluentui/react-components';\nimport type { ObjectShorthandValue } from '@fluentui/react-northstar';\n\nimport * as React from 'react';\n\ntype WithContent = ObjectShorthandValue<React.HTMLAttributes<HTMLDivElement>> | string;\n\n/**\n *\n */\ntype CustomInputFieldProps = React.PropsWithChildren<{\n /**\n * Message to be shown when error state is true\n */\n errorMessage?: WithContent;\n /**\n * Whether the field label should be marked as required.\n */\n required?: boolean;\n /**\n * Control to be rendered\n */\n control?: ObjectShorthandValue<{\n /**\n * Control content\n */\n content?: React.ReactNode;\n }> & {\n /**\n * Error state\n */\n error?: 'true' | 'false';\n };\n /**\n * Label to be rendered\n */\n label?: WithContent;\n}>;\n\nexport const FormFieldShim = React.forwardRef<HTMLInputElement, CustomInputFieldProps>((props, ref) => {\n const { errorMessage, required, control, label } = props;\n const fieldProps: FieldProps = { required };\n\n if (errorMessage && control?.error === 'true') {\n fieldProps.validationState = 'error';\n if (typeof errorMessage === 'object') {\n fieldProps.validationMessage = errorMessage.content;\n }\n if (typeof errorMessage === 'string') {\n fieldProps.validationMessage = errorMessage;\n }\n }\n\n if (label) {\n if (typeof label === 'object') {\n fieldProps.label = label.content;\n } else {\n fieldProps.label = label;\n }\n }\n\n const children: FieldProps['children'] = props.children || control?.content;\n\n if (React.isValidElement(children)) {\n const child: React.ReactElement = children;\n\n // Use the Field's child render function to pass the field control props to the child\n fieldProps.children = fieldControlProps => React.cloneElement(child, { ...fieldControlProps, ...child.props });\n } else {\n fieldProps.children = children;\n }\n\n const state = useField_unstable(fieldProps, ref);\n useFieldStyles_unstable(state);\n const context = useFieldContextValues_unstable(state);\n return renderField_unstable(state, context);\n});\n\nFormFieldShim.displayName = 'FormFieldShim';\n"],"names":["renderField_unstable","useFieldContextValues_unstable","useFieldStyles_unstable","useField_unstable","React","FormFieldShim","forwardRef","props","ref","
|
|
1
|
+
{"version":3,"sources":["FormFieldShim.tsx"],"sourcesContent":["import {\n FieldProps,\n renderField_unstable,\n useFieldContextValues_unstable,\n useFieldStyles_unstable,\n useField_unstable,\n} from '@fluentui/react-components';\nimport type { ObjectShorthandValue } from '@fluentui/react-northstar';\n\nimport * as React from 'react';\n\ntype WithContent = ObjectShorthandValue<React.HTMLAttributes<HTMLDivElement>> | string;\n\n/**\n *\n */\ntype CustomInputFieldProps = React.PropsWithChildren<{\n /**\n * Message to be shown when error state is true\n */\n errorMessage?: WithContent;\n /**\n * Whether the field label should be marked as required.\n */\n required?: boolean;\n /**\n * Control to be rendered\n */\n control?: ObjectShorthandValue<{\n /**\n * Control content\n */\n content?: React.ReactNode;\n }> & {\n /**\n * Error state\n */\n error?: 'true' | 'false';\n };\n /**\n * Label to be rendered\n */\n label?: WithContent;\n}>;\n\nexport const FormFieldShim = React.forwardRef<HTMLInputElement, CustomInputFieldProps>((props, ref) => {\n const { errorMessage, required, control, label } = props;\n const fieldProps: FieldProps = { required };\n\n if (errorMessage && control?.error === 'true') {\n fieldProps.validationState = 'error';\n if (typeof errorMessage === 'object') {\n fieldProps.validationMessage = errorMessage.content;\n }\n if (typeof errorMessage === 'string') {\n fieldProps.validationMessage = errorMessage;\n }\n }\n\n if (label) {\n if (typeof label === 'object') {\n fieldProps.label = label.content;\n } else {\n fieldProps.label = label;\n }\n }\n\n const children: FieldProps['children'] = props.children || control?.content;\n\n if (React.isValidElement(children)) {\n const child: React.ReactElement = children;\n\n // Use the Field's child render function to pass the field control props to the child\n fieldProps.children = fieldControlProps => React.cloneElement(child, { ...fieldControlProps, ...child.props });\n } else {\n fieldProps.children = children;\n }\n\n const state = useField_unstable(fieldProps, ref);\n useFieldStyles_unstable(state);\n const context = useFieldContextValues_unstable(state);\n return renderField_unstable(state, context);\n});\n\nFormFieldShim.displayName = 'FormFieldShim';\n"],"names":["renderField_unstable","useFieldContextValues_unstable","useFieldStyles_unstable","useField_unstable","React","FormFieldShim","forwardRef","props","ref","errorMessage","required","control","label","fieldProps","error","validationState","validationMessage","content","children","isValidElement","child","fieldControlProps","cloneElement","state","context","displayName"],"mappings":"AAAA,SAEEA,oBAAoB,EACpBC,8BAA8B,EAC9BC,uBAAuB,EACvBC,iBAAiB,QACZ,6BAA6B;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es.flex, inline && classes.inline, column && classes.column, hAlign && (column ? classMaps.alignItems[hAlign] : classMaps.justifyContent[hAlign]), vAlign && (column ? classMaps.justifyContent[vAlign] : classMaps.alignItems[vAlign]), space && classMaps.justifyContentSpace[space], wrap && classes.wrap, fill && classes.fill, gap && (column ? classMaps.gapForColumnFlex[gap] : classMaps.gapRow[gap]), padding && classMaps.paddings[padding], className);
|
|
64
64
|
const content = _react.Children.map(children, (child)=>{
|
|
65
|
-
var _child_type
|
|
65
|
+
var _child_type;
|
|
66
66
|
// @ts-expect-error __isFlexItem is added to the React type property by N*
|
|
67
|
-
const isFlexItemElement =
|
|
67
|
+
const isFlexItemElement = child === null || child === void 0 ? void 0 : (_child_type = child.type) === null || _child_type === void 0 ? void 0 : _child_type.__isFlexItem;
|
|
68
68
|
return isFlexItemElement ? /*#__PURE__*/ _react.cloneElement(child, {
|
|
69
69
|
flexDirection: column ? 'column' : 'row'
|
|
70
70
|
}) : child;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Flex.js"],"sourcesContent":["import { mergeClasses } from '@fluentui/react-components';\nimport * as React from 'react';\nimport { useFlexStyles } from './Flex.styles';\nexport const flexClassName = 'fui-Flex';\nexport const Flex = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const { children, column, fill, gap, hAlign, inline, padding, space, vAlign, wrap, className, ...rest } = props;\n const classes = useFlexStyles();\n const classMaps = React.useMemo(()=>({\n alignItems: {\n start: classes.alignItemsFlexStart,\n center: classes.alignItemsCenter,\n end: classes.alignItemsFlexEnd,\n stretch: classes.alignItemsCenter\n },\n justifyContent: {\n start: classes.justifyContentFlexStart,\n center: classes.justifyContentCenter,\n end: classes.justifyContentFlexEnd,\n stretch: classes.justifyContentStretch\n },\n justifyContentSpace: {\n around: classes.justifyContentSpaceAround,\n between: classes.justifyContentSpaceBetween,\n evenly: classes.justifyContentSpaceEvenly\n },\n gapForColumnFlex: {\n 'gap.smaller': classes.gapForColumnFlexSmaller,\n 'gap.small': classes.gapForColumnFlexSmall,\n 'gap.medium': classes.gapForColumnFlexMedium,\n 'gap.large': classes.gapForColumnFlexLarge\n },\n gapRow: {\n 'gap.smaller': classes.gapForRowFlexSmaller,\n 'gap.small': classes.gapForRowFlexSmall,\n 'gap.medium': classes.gapForRowFlexMedium,\n 'gap.large': classes.gapForRowFlexLarge\n },\n paddings: {\n 'padding.medium': classes.paddingMedium\n }\n }), [\n classes\n ]);\n const flexClasses = mergeClasses(flexClassName, classes.flex, inline && classes.inline, column && classes.column, hAlign && (column ? classMaps.alignItems[hAlign] : classMaps.justifyContent[hAlign]), vAlign && (column ? classMaps.justifyContent[vAlign] : classMaps.alignItems[vAlign]), space && classMaps.justifyContentSpace[space], wrap && classes.wrap, fill && classes.fill, gap && (column ? classMaps.gapForColumnFlex[gap] : classMaps.gapRow[gap]), padding && classMaps.paddings[padding], className);\n const content = React.Children.map(children, (child)=>{\n var _child_type
|
|
1
|
+
{"version":3,"sources":["Flex.js"],"sourcesContent":["import { mergeClasses } from '@fluentui/react-components';\nimport * as React from 'react';\nimport { useFlexStyles } from './Flex.styles';\nexport const flexClassName = 'fui-Flex';\nexport const Flex = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const { children, column, fill, gap, hAlign, inline, padding, space, vAlign, wrap, className, ...rest } = props;\n const classes = useFlexStyles();\n const classMaps = React.useMemo(()=>({\n alignItems: {\n start: classes.alignItemsFlexStart,\n center: classes.alignItemsCenter,\n end: classes.alignItemsFlexEnd,\n stretch: classes.alignItemsCenter\n },\n justifyContent: {\n start: classes.justifyContentFlexStart,\n center: classes.justifyContentCenter,\n end: classes.justifyContentFlexEnd,\n stretch: classes.justifyContentStretch\n },\n justifyContentSpace: {\n around: classes.justifyContentSpaceAround,\n between: classes.justifyContentSpaceBetween,\n evenly: classes.justifyContentSpaceEvenly\n },\n gapForColumnFlex: {\n 'gap.smaller': classes.gapForColumnFlexSmaller,\n 'gap.small': classes.gapForColumnFlexSmall,\n 'gap.medium': classes.gapForColumnFlexMedium,\n 'gap.large': classes.gapForColumnFlexLarge\n },\n gapRow: {\n 'gap.smaller': classes.gapForRowFlexSmaller,\n 'gap.small': classes.gapForRowFlexSmall,\n 'gap.medium': classes.gapForRowFlexMedium,\n 'gap.large': classes.gapForRowFlexLarge\n },\n paddings: {\n 'padding.medium': classes.paddingMedium\n }\n }), [\n classes\n ]);\n const flexClasses = mergeClasses(flexClassName, classes.flex, inline && classes.inline, column && classes.column, hAlign && (column ? classMaps.alignItems[hAlign] : classMaps.justifyContent[hAlign]), vAlign && (column ? classMaps.justifyContent[vAlign] : classMaps.alignItems[vAlign]), space && classMaps.justifyContentSpace[space], wrap && classes.wrap, fill && classes.fill, gap && (column ? classMaps.gapForColumnFlex[gap] : classMaps.gapRow[gap]), padding && classMaps.paddings[padding], className);\n const content = React.Children.map(children, (child)=>{\n var _child_type;\n // @ts-expect-error __isFlexItem is added to the React type property by N*\n const isFlexItemElement = child === null || child === void 0 ? void 0 : (_child_type = child.type) === null || _child_type === void 0 ? void 0 : _child_type.__isFlexItem;\n return isFlexItemElement ? /*#__PURE__*/ React.cloneElement(child, {\n flexDirection: column ? 'column' : 'row'\n }) : child;\n });\n return /*#__PURE__*/ React.createElement(\"div\", {\n ref: ref,\n className: flexClasses,\n ...rest\n }, content);\n});\nFlex.displayName = 'Flex';\n"],"names":["flexClassName","Flex","React","forwardRef","props","ref","children","column","fill","gap","hAlign","inline","padding","space","vAlign","wrap","className","rest","classes","useFlexStyles","classMaps","useMemo","alignItems","start","alignItemsFlexStart","center","alignItemsCenter","end","alignItemsFlexEnd","stretch","justifyContent","justifyContentFlexStart","justifyContentCenter","justifyContentFlexEnd","justifyContentStretch","justifyContentSpace","around","justifyContentSpaceAround","between","justifyContentSpaceBetween","evenly","justifyContentSpaceEvenly","gapForColumnFlex","gapForColumnFlexSmaller","gapForColumnFlexSmall","gapForColumnFlexMedium","gapForColumnFlexLarge","gapRow","gapForRowFlexSmaller","gapForRowFlexSmall","gapForRowFlexMedium","gapForRowFlexLarge","paddings","paddingMedium","flexClasses","mergeClasses","flex","content","Children","map","child","_child_type","isFlexItemElement","type","__isFlexItem","cloneElement","flexDirection","createElement","displayName"],"mappings":";;;;;;;;;;;IAGaA,aAAa;eAAbA;;IACAC,IAAI;eAAJA;;;;iCAJgB;iEACN;4BACO;AACvB,MAAMD,gBAAgB;AACtB,MAAMC,OAAO,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACvD,MAAM,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,IAAI,EAAEC,GAAG,EAAEC,MAAM,EAAEC,MAAM,EAAEC,OAAO,EAAEC,KAAK,EAAEC,MAAM,EAAEC,IAAI,EAAEC,SAAS,EAAE,GAAGC,MAAM,GAAGb;IAC1G,MAAMc,UAAUC,IAAAA,yBAAa;IAC7B,MAAMC,YAAYlB,OAAMmB,OAAO,CAAC,IAAK,CAAA;YAC7BC,YAAY;gBACRC,OAAOL,QAAQM,mBAAmB;gBAClCC,QAAQP,QAAQQ,gBAAgB;gBAChCC,KAAKT,QAAQU,iBAAiB;gBAC9BC,SAASX,QAAQQ,gBAAgB;YACrC;YACAI,gBAAgB;gBACZP,OAAOL,QAAQa,uBAAuB;gBACtCN,QAAQP,QAAQc,oBAAoB;gBACpCL,KAAKT,QAAQe,qBAAqB;gBAClCJ,SAASX,QAAQgB,qBAAqB;YAC1C;YACAC,qBAAqB;gBACjBC,QAAQlB,QAAQmB,yBAAyB;gBACzCC,SAASpB,QAAQqB,0BAA0B;gBAC3CC,QAAQtB,QAAQuB,yBAAyB;YAC7C;YACAC,kBAAkB;gBACd,eAAexB,QAAQyB,uBAAuB;gBAC9C,aAAazB,QAAQ0B,qBAAqB;gBAC1C,cAAc1B,QAAQ2B,sBAAsB;gBAC5C,aAAa3B,QAAQ4B,qBAAqB;YAC9C;YACAC,QAAQ;gBACJ,eAAe7B,QAAQ8B,oBAAoB;gBAC3C,aAAa9B,QAAQ+B,kBAAkB;gBACvC,cAAc/B,QAAQ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,11 @@ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildc
|
|
|
12
12
|
const _reactcomponents = require("@fluentui/react-components");
|
|
13
13
|
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
14
14
|
const FormFieldShim = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
15
|
-
var _control, _control1;
|
|
16
15
|
const { errorMessage, required, control, label } = props;
|
|
17
16
|
const fieldProps = {
|
|
18
17
|
required
|
|
19
18
|
};
|
|
20
|
-
if (errorMessage && (
|
|
19
|
+
if (errorMessage && (control === null || control === void 0 ? void 0 : control.error) === 'true') {
|
|
21
20
|
fieldProps.validationState = 'error';
|
|
22
21
|
if (typeof errorMessage === 'object') {
|
|
23
22
|
fieldProps.validationMessage = errorMessage.content;
|
|
@@ -33,7 +32,7 @@ const FormFieldShim = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
|
33
32
|
fieldProps.label = label;
|
|
34
33
|
}
|
|
35
34
|
}
|
|
36
|
-
const children = props.children || (
|
|
35
|
+
const children = props.children || (control === null || control === void 0 ? void 0 : control.content);
|
|
37
36
|
if (/*#__PURE__*/ _react.isValidElement(children)) {
|
|
38
37
|
const child = children;
|
|
39
38
|
// Use the Field's child render function to pass the field control props to the child
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["FormFieldShim.js"],"sourcesContent":["import { renderField_unstable, useFieldContextValues_unstable, useFieldStyles_unstable, useField_unstable } from '@fluentui/react-components';\nimport * as React from 'react';\nexport const FormFieldShim = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n
|
|
1
|
+
{"version":3,"sources":["FormFieldShim.js"],"sourcesContent":["import { renderField_unstable, useFieldContextValues_unstable, useFieldStyles_unstable, useField_unstable } from '@fluentui/react-components';\nimport * as React from 'react';\nexport const FormFieldShim = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const { errorMessage, required, control, label } = props;\n const fieldProps = {\n required\n };\n if (errorMessage && (control === null || control === void 0 ? void 0 : control.error) === 'true') {\n fieldProps.validationState = 'error';\n if (typeof errorMessage === 'object') {\n fieldProps.validationMessage = errorMessage.content;\n }\n if (typeof errorMessage === 'string') {\n fieldProps.validationMessage = errorMessage;\n }\n }\n if (label) {\n if (typeof label === 'object') {\n fieldProps.label = label.content;\n } else {\n fieldProps.label = label;\n }\n }\n const children = props.children || (control === null || control === void 0 ? void 0 : control.content);\n if (/*#__PURE__*/ React.isValidElement(children)) {\n const child = children;\n // Use the Field's child render function to pass the field control props to the child\n fieldProps.children = (fieldControlProps)=>/*#__PURE__*/ React.cloneElement(child, {\n ...fieldControlProps,\n ...child.props\n });\n } else {\n fieldProps.children = children;\n }\n const state = useField_unstable(fieldProps, ref);\n useFieldStyles_unstable(state);\n const context = useFieldContextValues_unstable(state);\n return renderField_unstable(state, context);\n});\nFormFieldShim.displayName = 'FormFieldShim';\n"],"names":["FormFieldShim","React","forwardRef","props","ref","errorMessage","required","control","label","fieldProps","error","validationState","validationMessage","content","children","isValidElement","child","fieldControlProps","cloneElement","state","useField_unstable","useFieldStyles_unstable","context","useFieldContextValues_unstable","renderField_unstable","displayName"],"mappings":";;;;+BAEaA;;;eAAAA;;;;iCAFoG;iEAC1F;AAChB,MAAMA,gBAAgB,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAChE,MAAM,EAAEC,YAAY,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,KAAK,EAAE,GAAGL;IACnD,MAAMM,aAAa;QACfH;IACJ;IACA,IAAID,gBAAgB,AAACE,CAAAA,YAAY,QAAQA,YAAY,KAAK,IAAI,KAAK,IAAIA,QAAQG,KAAK,AAAD,MAAO,QAAQ;QAC9FD,WAAWE,eAAe,GAAG;QAC7B,IAAI,OAAON,iBAAiB,UAAU;YAClCI,WAAWG,iBAAiB,GAAGP,aAAaQ,OAAO;QACvD;QACA,IAAI,OAAOR,iBAAiB,UAAU;YAClCI,WAAWG,iBAAiB,GAAGP;QACnC;IACJ;IACA,IAAIG,OAAO;QACP,IAAI,OAAOA,UAAU,UAAU;YAC3BC,WAAWD,KAAK,GAAGA,MAAMK,OAAO;QACpC,OAAO;YACHJ,WAAWD,KAAK,GAAGA;QACvB;IACJ;IACA,MAAMM,WAAWX,MAAMW,QAAQ,IAAKP,CAAAA,YAAY,QAAQA,YAAY,KAAK,IAAI,KAAK,IAAIA,QAAQM,OAAO,AAAD;IACpG,IAAI,WAAW,GAAGZ,OAAMc,cAAc,CAACD,WAAW;QAC9C,MAAME,QAAQF;QACd,qFAAqF;QACrFL,WAAWK,QAAQ,GAAG,CAACG,oBAAoB,WAAW,GAAGhB,OAAMiB,YAAY,CAACF,OAAO;gBAC3E,GAAGC,iBAAiB;gBACpB,GAAGD,MAAMb,KAAK;YAClB;IACR,OAAO;QACHM,WAAWK,QAAQ,GAAGA;IAC1B;IACA,MAAMK,QAAQC,IAAAA,kCAAiB,EAACX,YAAYL;IAC5CiB,IAAAA,wCAAuB,EAACF;IACxB,MAAMG,UAAUC,IAAAA,+CAA8B,EAACJ;IAC/C,OAAOK,IAAAA,qCAAoB,EAACL,OAAOG;AACvC;AACAtB,cAAcyB,WAAW,GAAG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-migration-v0-v9",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.36",
|
|
4
4
|
"description": "Migration shim components and methods for hybrid v0/v9 applications building on Fluent UI React.",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
"@fluentui/scripts-storybook": "*"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@fluentui/react-icons": "^2.0.
|
|
37
|
-
"@fluentui/react-theme": "^9.1.
|
|
38
|
-
"@fluentui/react-utilities": "^9.13.
|
|
39
|
-
"@fluentui/react-jsx-runtime": "^9.0.
|
|
40
|
-
"@fluentui/react-components": "^9.32.
|
|
36
|
+
"@fluentui/react-icons": "^2.0.217",
|
|
37
|
+
"@fluentui/react-theme": "^9.1.14",
|
|
38
|
+
"@fluentui/react-utilities": "^9.13.5",
|
|
39
|
+
"@fluentui/react-jsx-runtime": "^9.0.12",
|
|
40
|
+
"@fluentui/react-components": "^9.32.3",
|
|
41
41
|
"@fluentui/react-northstar": "^0.66.4",
|
|
42
42
|
"@griffel/react": "^1.5.14",
|
|
43
43
|
"@swc/helpers": "^0.5.1"
|