@fluentui/react-migration-v0-v9 9.0.27 → 9.0.28
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 +46 -1
- package/CHANGELOG.md +16 -2
- package/lib/components/Flex/Flex.js +3 -3
- package/lib/components/Flex/Flex.js.map +1 -1
- package/lib/components/Flex/FlexItem.mixins.js.map +1 -1
- package/lib/components/FormField/FormFieldShim.js +4 -3
- package/lib/components/FormField/FormFieldShim.js.map +1 -1
- package/lib/components/Grid/Grid.mixins.js.map +1 -1
- package/lib/components/Grid/GridShim.js +1 -1
- package/lib/components/Grid/GridShim.js.map +1 -1
- package/lib/components/ItemLayout/ItemLayout.js.map +1 -1
- package/lib/components/Primitive/Primitive.js +1 -1
- package/lib/components/Primitive/Primitive.js.map +1 -1
- package/lib/components/Segment/Segment.js +1 -1
- package/lib/components/Segment/Segment.js.map +1 -1
- package/lib/components/StyledText/StyledText.js +1 -1
- package/lib/components/StyledText/StyledText.js.map +1 -1
- package/lib-commonjs/components/Button/ButtonMigration.mixins.js +29 -19
- package/lib-commonjs/components/Button/ButtonMigration.mixins.js.map +1 -1
- package/lib-commonjs/components/Button/index.js +2 -2
- package/lib-commonjs/components/Button/index.js.map +1 -1
- package/lib-commonjs/components/Flex/Flex.js +15 -11
- package/lib-commonjs/components/Flex/Flex.js.map +1 -1
- package/lib-commonjs/components/Flex/Flex.styles.js +5 -3
- package/lib-commonjs/components/Flex/Flex.styles.js.map +1 -1
- package/lib-commonjs/components/Flex/FlexItem.mixins.js +3 -1
- package/lib-commonjs/components/Flex/FlexItem.mixins.js.map +1 -1
- package/lib-commonjs/components/Flex/index.js +15 -7
- package/lib-commonjs/components/Flex/index.js.map +1 -1
- package/lib-commonjs/components/FormField/FormFieldShim.js +14 -11
- package/lib-commonjs/components/FormField/FormFieldShim.js.map +1 -1
- package/lib-commonjs/components/FormField/index.js +2 -2
- package/lib-commonjs/components/FormField/index.js.map +1 -1
- package/lib-commonjs/components/Grid/Grid.mixins.js +3 -1
- package/lib-commonjs/components/Grid/Grid.mixins.js.map +1 -1
- package/lib-commonjs/components/Grid/Grid.styles.js +5 -3
- package/lib-commonjs/components/Grid/Grid.styles.js.map +1 -1
- package/lib-commonjs/components/Grid/GridShim.js +13 -9
- package/lib-commonjs/components/Grid/GridShim.js.map +1 -1
- package/lib-commonjs/components/Grid/index.js +15 -7
- package/lib-commonjs/components/Grid/index.js.map +1 -1
- package/lib-commonjs/components/Input/Input.mixins.js +7 -5
- package/lib-commonjs/components/Input/Input.mixins.js.map +1 -1
- package/lib-commonjs/components/Input/index.js +4 -2
- package/lib-commonjs/components/Input/index.js.map +1 -1
- package/lib-commonjs/components/ItemLayout/ItemLayout.js +29 -25
- package/lib-commonjs/components/ItemLayout/ItemLayout.js.map +1 -1
- package/lib-commonjs/components/ItemLayout/ItemLayout.styles.js +5 -3
- package/lib-commonjs/components/ItemLayout/ItemLayout.styles.js.map +1 -1
- package/lib-commonjs/components/ItemLayout/index.js +3 -3
- package/lib-commonjs/components/ItemLayout/index.js.map +1 -1
- package/lib-commonjs/components/Primitive/Primitive.js +11 -7
- package/lib-commonjs/components/Primitive/Primitive.js.map +1 -1
- package/lib-commonjs/components/Primitive/index.js +2 -2
- package/lib-commonjs/components/Primitive/index.js.map +1 -1
- package/lib-commonjs/components/Segment/Segment.js +13 -9
- package/lib-commonjs/components/Segment/Segment.js.map +1 -1
- package/lib-commonjs/components/Segment/Segment.styles.js +5 -3
- package/lib-commonjs/components/Segment/Segment.styles.js.map +1 -1
- package/lib-commonjs/components/Segment/index.js +2 -2
- package/lib-commonjs/components/Segment/index.js.map +1 -1
- package/lib-commonjs/components/Slider/Slider.mixins.js +3 -1
- package/lib-commonjs/components/Slider/Slider.mixins.js.map +1 -1
- package/lib-commonjs/components/Slider/index.js +4 -2
- package/lib-commonjs/components/Slider/index.js.map +1 -1
- package/lib-commonjs/components/Spinner/SpinnerMigration.mixins.js +6 -4
- package/lib-commonjs/components/Spinner/SpinnerMigration.mixins.js.map +1 -1
- package/lib-commonjs/components/Spinner/index.js +4 -2
- package/lib-commonjs/components/Spinner/index.js.map +1 -1
- package/lib-commonjs/components/StyledText/StyledText.js +16 -12
- package/lib-commonjs/components/StyledText/StyledText.js.map +1 -1
- package/lib-commonjs/components/StyledText/StyledText.styles.js +13 -7
- package/lib-commonjs/components/StyledText/StyledText.styles.js.map +1 -1
- package/lib-commonjs/components/StyledText/index.js +3 -3
- package/lib-commonjs/components/StyledText/index.js.map +1 -1
- package/lib-commonjs/index.js +85 -35
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +10 -10
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,52 @@
|
|
|
2
2
|
"name": "@fluentui/react-migration-v0-v9",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "Tue,
|
|
5
|
+
"date": "Tue, 05 Sep 2023 13:23:31 GMT",
|
|
6
|
+
"tag": "@fluentui/react-migration-v0-v9_v9.0.28",
|
|
7
|
+
"version": "9.0.28",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "bernardo.sunderhus@gmail.com",
|
|
12
|
+
"package": "@fluentui/react-migration-v0-v9",
|
|
13
|
+
"commit": "b93c2ac22355b6cb6f33dd509c6cd9c21f4fffc8",
|
|
14
|
+
"comment": "bumps @swc/helpers version to 0.5.1"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "bernardo.sunderhus@gmail.com",
|
|
18
|
+
"package": "@fluentui/react-migration-v0-v9",
|
|
19
|
+
"commit": "eea6d93a62249ba4fba3347fb291c67ee1a3fb24",
|
|
20
|
+
"comment": "bumps react peer dependencies to v16.14.0"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "beachball",
|
|
24
|
+
"package": "@fluentui/react-migration-v0-v9",
|
|
25
|
+
"comment": "Bump @fluentui/react-theme to v9.1.12",
|
|
26
|
+
"commit": "0bf811dbcaaa6b78743537d142fe4d348b457045"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"author": "beachball",
|
|
30
|
+
"package": "@fluentui/react-migration-v0-v9",
|
|
31
|
+
"comment": "Bump @fluentui/react-utilities to v9.13.1",
|
|
32
|
+
"commit": "0bf811dbcaaa6b78743537d142fe4d348b457045"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"author": "beachball",
|
|
36
|
+
"package": "@fluentui/react-migration-v0-v9",
|
|
37
|
+
"comment": "Bump @fluentui/react-jsx-runtime to v9.0.4",
|
|
38
|
+
"commit": "0bf811dbcaaa6b78743537d142fe4d348b457045"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"author": "beachball",
|
|
42
|
+
"package": "@fluentui/react-migration-v0-v9",
|
|
43
|
+
"comment": "Bump @fluentui/react-components to v9.30.2",
|
|
44
|
+
"commit": "0bf811dbcaaa6b78743537d142fe4d348b457045"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"date": "Tue, 29 Aug 2023 12:57:36 GMT",
|
|
6
51
|
"tag": "@fluentui/react-migration-v0-v9_v9.0.27",
|
|
7
52
|
"version": "9.0.27",
|
|
8
53
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,26 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-migration-v0-v9
|
|
2
2
|
|
|
3
|
-
This log was last generated on Tue,
|
|
3
|
+
This log was last generated on Tue, 05 Sep 2023 13:23:31 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.0.28](https://github.com/microsoft/fluentui/tree/@fluentui/react-migration-v0-v9_v9.0.28)
|
|
8
|
+
|
|
9
|
+
Tue, 05 Sep 2023 13:23:31 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-migration-v0-v9_v9.0.27..@fluentui/react-migration-v0-v9_v9.0.28)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- bumps @swc/helpers version to 0.5.1 ([PR #28989](https://github.com/microsoft/fluentui/pull/28989) by bernardo.sunderhus@gmail.com)
|
|
15
|
+
- bumps react peer dependencies to v16.14.0 ([PR #28959](https://github.com/microsoft/fluentui/pull/28959) by bernardo.sunderhus@gmail.com)
|
|
16
|
+
- Bump @fluentui/react-theme to v9.1.12 ([PR #27840](https://github.com/microsoft/fluentui/pull/27840) by beachball)
|
|
17
|
+
- Bump @fluentui/react-utilities to v9.13.1 ([PR #27840](https://github.com/microsoft/fluentui/pull/27840) by beachball)
|
|
18
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.4 ([PR #27840](https://github.com/microsoft/fluentui/pull/27840) by beachball)
|
|
19
|
+
- Bump @fluentui/react-components to v9.30.2 ([PR #27840](https://github.com/microsoft/fluentui/pull/27840) by beachball)
|
|
20
|
+
|
|
7
21
|
## [9.0.27](https://github.com/microsoft/fluentui/tree/@fluentui/react-migration-v0-v9_v9.0.27)
|
|
8
22
|
|
|
9
|
-
Tue, 29 Aug 2023 12:
|
|
23
|
+
Tue, 29 Aug 2023 12:57:36 GMT
|
|
10
24
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-migration-v0-v9_v9.0.26..@fluentui/react-migration-v0-v9_v9.0.27)
|
|
11
25
|
|
|
12
26
|
### Patches
|
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import { useFlexStyles } from './Flex.styles';
|
|
4
4
|
export const flexClassName = 'fui-Flex';
|
|
5
5
|
export const Flex = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
6
|
-
const { children
|
|
6
|
+
const { children, column, fill, gap, hAlign, inline, padding, space, vAlign, wrap, className, ...rest } = props;
|
|
7
7
|
const classes = useFlexStyles();
|
|
8
8
|
const classMaps = React.useMemo(()=>({
|
|
9
9
|
alignItems: {
|
|
@@ -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, _child;
|
|
47
47
|
// @ts-expect-error __isFlexItem is added to the React type property by N*
|
|
48
|
-
const isFlexItemElement = child === null ||
|
|
48
|
+
const isFlexItemElement = (_child = 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,qBAAOH,MAAMI,UAAU,CAAgE,CAACC,OAAOC
|
|
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,QAAQe,qBAAqB;YACxC;YACAC,qBAAqB;gBACnBC,QAAQjB,QAAQkB,yBAAyB;gBACzCC,SAASnB,QAAQoB,0BAA0B;gBAC3CC,QAAQrB,QAAQsB,yBAAyB;YAC3C;YACAC,kBAAkB;gBAChB,eAAevB,QAAQwB,uBAAuB;gBAC9C,aAAaxB,QAAQyB,qBAAqB;gBAC1C,cAAczB,QAAQ0B,sBAAsB;gBAC5C,aAAa1B,QAAQ2B,qBAAqB;YAC5C;YACAC,QAAQ;gBACN,eAAe5B,QAAQ6B,oBAAoB;gBAC3C,aAAa7B,QAAQ8B,kBAAkB;gBACvC,cAAc9B,QAAQ+B,mBAAmB;gBACzC,aAAa/B,QAAQgC,kBAAkB;YACzC;YACAC,UAAU;gBACR,kBAAkBjC,QAAQkC,aAAa;YACzC;QACF,CAAA,GACA;QAAClC;KAAQ;IAGX,MAAMmC,cAAcvD,aAClBG,eACAiB,QAAQoC,IAAI,EACZ3C,UAAUO,QAAQP,MAAM,EACxBJ,UAAUW,QAAQX,MAAM,EACxBG,UAAWH,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,aAAAA;QADnC,0EAA0E;QAC1E,MAAMC,qBAA6BD,SAAAA,mBAAAA,8BAAAA,cAAAA,OAAOE,IAAI,cAAXF,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 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["FlexItem.mixins.ts"],"sourcesContent":["import { GriffelStyle } from '@fluentui/react-components';\n\nconst ALIGN = {\n auto: { alignSelf: 'auto' },\n start: { alignSelf: 'flex-start' },\n end: { alignSelf: 'flex-end' },\n center: { alignSelf: 'center' },\n baseline: { alignSelf: 'baseline' },\n stretch: { alignSelf: 'stretch' },\n};\n\nconst SIZE = {\n half: { flexBasis: '50%' },\n quarter: { flexBasis: '25%' },\n small: { flexBasis: '150px' },\n medium: { flexBasis: '200px' },\n large: { flexBasis: '300px' },\n};\n\nconst align = (value: 'auto' | 'start' | 'end' | 'center' | 'baseline' | 'stretch'): GriffelStyle => ALIGN[value];\n\nconst size = (value: 'half' | 'quarter' | 'small' | 'medium' | 'large'): GriffelStyle => SIZE[value];\n\nconst grow = (flexGrow: boolean | number): GriffelStyle | undefined => {\n if (flexGrow === true) {\n return { flexGrow: 1 };\n } else if (flexGrow) {\n return { flexGrow };\n } else {\n return undefined;\n }\n};\n\nconst shrink = (flexShrink: boolean | number): GriffelStyle | undefined => {\n if (typeof flexShrink === 'number') {\n return { flexShrink };\n } else if (flexShrink === false) {\n return { flexShrink: 0 };\n } else {\n return undefined;\n }\n};\n\nconst pushRow = (): GriffelStyle => ({ marginLeft: 'auto' });\nconst pushColumn = (): GriffelStyle => ({ marginTop: 'auto' });\n\nexport const flexItem = {\n align,\n size,\n grow,\n shrink,\n pushRow,\n pushColumn,\n};\n"],"names":["ALIGN","auto","alignSelf","start","end","center","baseline","stretch","SIZE","half","flexBasis","quarter","small","medium","large","align","value","size","grow","flexGrow","undefined","shrink","flexShrink","pushRow","marginLeft","pushColumn","marginTop","flexItem"],"mappings":"AAEA,MAAMA,QAAQ;IACZC,MAAM;QAAEC,WAAW;IAAO;IAC1BC,OAAO;QAAED,WAAW;IAAa;IACjCE,KAAK;QAAEF,WAAW;IAAW;IAC7BG,QAAQ;QAAEH,WAAW;IAAS;IAC9BI,UAAU;QAAEJ,WAAW;IAAW;IAClCK,SAAS;QAAEL,WAAW;IAAU;AAClC;AAEA,MAAMM,OAAO;IACXC,MAAM;QAAEC,WAAW;IAAM;IACzBC,SAAS;QAAED,WAAW;IAAM;IAC5BE,OAAO;QAAEF,WAAW;IAAQ;IAC5BG,QAAQ;QAAEH,WAAW;IAAQ;IAC7BI,OAAO;QAAEJ,WAAW;IAAQ;AAC9B;AAEA,MAAMK,QAAQ,CAACC,QAAsFhB,KAAK,CAACgB,MAAM;AAEjH,MAAMC,OAAO,CAACD,QAA2ER,IAAI,CAACQ,MAAM;AAEpG,MAAME,OAAO,CAACC
|
|
1
|
+
{"version":3,"sources":["FlexItem.mixins.ts"],"sourcesContent":["import { GriffelStyle } from '@fluentui/react-components';\n\nconst ALIGN = {\n auto: { alignSelf: 'auto' },\n start: { alignSelf: 'flex-start' },\n end: { alignSelf: 'flex-end' },\n center: { alignSelf: 'center' },\n baseline: { alignSelf: 'baseline' },\n stretch: { alignSelf: 'stretch' },\n};\n\nconst SIZE = {\n half: { flexBasis: '50%' },\n quarter: { flexBasis: '25%' },\n small: { flexBasis: '150px' },\n medium: { flexBasis: '200px' },\n large: { flexBasis: '300px' },\n};\n\nconst align = (value: 'auto' | 'start' | 'end' | 'center' | 'baseline' | 'stretch'): GriffelStyle => ALIGN[value];\n\nconst size = (value: 'half' | 'quarter' | 'small' | 'medium' | 'large'): GriffelStyle => SIZE[value];\n\nconst grow = (flexGrow: boolean | number): GriffelStyle | undefined => {\n if (flexGrow === true) {\n return { flexGrow: 1 };\n } else if (flexGrow) {\n return { flexGrow };\n } else {\n return undefined;\n }\n};\n\nconst shrink = (flexShrink: boolean | number): GriffelStyle | undefined => {\n if (typeof flexShrink === 'number') {\n return { flexShrink };\n } else if (flexShrink === false) {\n return { flexShrink: 0 };\n } else {\n return undefined;\n }\n};\n\nconst pushRow = (): GriffelStyle => ({ marginLeft: 'auto' });\nconst pushColumn = (): GriffelStyle => ({ marginTop: 'auto' });\n\nexport const flexItem = {\n align,\n size,\n grow,\n shrink,\n pushRow,\n pushColumn,\n};\n"],"names":["ALIGN","auto","alignSelf","start","end","center","baseline","stretch","SIZE","half","flexBasis","quarter","small","medium","large","align","value","size","grow","flexGrow","undefined","shrink","flexShrink","pushRow","marginLeft","pushColumn","marginTop","flexItem"],"mappings":"AAEA,MAAMA,QAAQ;IACZC,MAAM;QAAEC,WAAW;IAAO;IAC1BC,OAAO;QAAED,WAAW;IAAa;IACjCE,KAAK;QAAEF,WAAW;IAAW;IAC7BG,QAAQ;QAAEH,WAAW;IAAS;IAC9BI,UAAU;QAAEJ,WAAW;IAAW;IAClCK,SAAS;QAAEL,WAAW;IAAU;AAClC;AAEA,MAAMM,OAAO;IACXC,MAAM;QAAEC,WAAW;IAAM;IACzBC,SAAS;QAAED,WAAW;IAAM;IAC5BE,OAAO;QAAEF,WAAW;IAAQ;IAC5BG,QAAQ;QAAEH,WAAW;IAAQ;IAC7BI,OAAO;QAAEJ,WAAW;IAAQ;AAC9B;AAEA,MAAMK,QAAQ,CAACC,QAAsFhB,KAAK,CAACgB,MAAM;AAEjH,MAAMC,OAAO,CAACD,QAA2ER,IAAI,CAACQ,MAAM;AAEpG,MAAME,OAAO,CAACC;IACZ,IAAIA,aAAa,MAAM;QACrB,OAAO;YAAEA,UAAU;QAAE;IACvB,OAAO,IAAIA,UAAU;QACnB,OAAO;YAAEA;QAAS;IACpB,OAAO;QACL,OAAOC;IACT;AACF;AAEA,MAAMC,SAAS,CAACC;IACd,IAAI,OAAOA,eAAe,UAAU;QAClC,OAAO;YAAEA;QAAW;IACtB,OAAO,IAAIA,eAAe,OAAO;QAC/B,OAAO;YAAEA,YAAY;QAAE;IACzB,OAAO;QACL,OAAOF;IACT;AACF;AAEA,MAAMG,UAAU,IAAqB,CAAA;QAAEC,YAAY;IAAO,CAAA;AAC1D,MAAMC,aAAa,IAAqB,CAAA;QAAEC,WAAW;IAAO,CAAA;AAE5D,OAAO,MAAMC,WAAW;IACtBZ;IACAE;IACAC;IACAG;IACAE;IACAE;AACF,EAAE"}
|
|
@@ -1,11 +1,12 @@
|
|
|
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
|
-
|
|
4
|
+
var _control, _control1;
|
|
5
|
+
const { errorMessage, required, control, label } = props;
|
|
5
6
|
const fieldProps = {
|
|
6
7
|
required
|
|
7
8
|
};
|
|
8
|
-
if (errorMessage && (control === null ||
|
|
9
|
+
if (errorMessage && ((_control = control) === null || _control === void 0 ? void 0 : _control.error) === 'true') {
|
|
9
10
|
fieldProps.validationState = 'error';
|
|
10
11
|
if (typeof errorMessage === 'object') {
|
|
11
12
|
fieldProps.validationMessage = errorMessage.content;
|
|
@@ -21,7 +22,7 @@ export const FormFieldShim = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
21
22
|
fieldProps.label = label;
|
|
22
23
|
}
|
|
23
24
|
}
|
|
24
|
-
const children = props.children || (control === null ||
|
|
25
|
+
const children = props.children || ((_control1 = control) === null || _control1 === void 0 ? void 0 : _control1.content);
|
|
25
26
|
if (/*#__PURE__*/ React.isValidElement(children)) {
|
|
26
27
|
const child = children;
|
|
27
28
|
// 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","control","errorMessage","required","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;AAGpC,YAAYC,WAAW,QAAQ;AAoC/B,OAAO,MAAMC,8BAAgBD,MAAME,UAAU,CAA0C,CAACC,OAAOC;QAIzEC,UAkBuCA;IArB3D,MAAM,EAAEC,YAAY,EAAEC,QAAQ,EAAEF,OAAO,EAAEG,KAAK,EAAE,GAAGL;IACnD,MAAMM,aAAyB;QAAEF;IAAS;IAE1C,IAAID,gBAAgBD,EAAAA,WAAAA,qBAAAA,+BAAAA,SAASK,KAAK,MAAK,QAAQ;QAC7CD,WAAWE,eAAe,GAAG;QAC7B,IAAI,OAAOL,iBAAiB,UAAU;YACpCG,WAAWG,iBAAiB,GAAGN,aAAaO,OAAO;QACrD;QACA,IAAI,OAAOP,iBAAiB,UAAU;YACpCG,WAAWG,iBAAiB,GAAGN;QACjC;IACF;IAEA,IAAIE,OAAO;QACT,IAAI,OAAOA,UAAU,UAAU;YAC7BC,WAAWD,KAAK,GAAGA,MAAMK,OAAO;QAClC,OAAO;YACLJ,WAAWD,KAAK,GAAGA;QACrB;IACF;IAEA,MAAMM,WAAmCX,MAAMW,QAAQ,MAAIT,YAAAA,qBAAAA,gCAAAA,UAASQ,OAAO;IAE3E,kBAAIb,MAAMe,cAAc,CAACD,WAAW;QAClC,MAAME,QAA4BF;QAElC,qFAAqF;QACrFL,WAAWK,QAAQ,GAAGG,CAAAA,kCAAqBjB,MAAMkB,YAAY,CAACF,OAAO;gBAAE,GAAGC,iBAAiB;gBAAE,GAAGD,MAAMb,KAAK;YAAC;IAC9G,OAAO;QACLM,WAAWK,QAAQ,GAAGA;IACxB;IAEA,MAAMK,QAAQpB,kBAAkBU,YAAYL;IAC5CN,wBAAwBqB;IACxB,MAAMC,UAAUvB,+BAA+BsB;IAC/C,OAAOvB,qBAAqBuB,OAAOC;AACrC,GAAG;AAEHnB,cAAcoB,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Grid.mixins.ts"],"sourcesContent":["import { GriffelStyle } from '@fluentui/react-components';\n\nconst getCSSTemplateValue = (template: string | number): string => {\n const templateAsNumber = Number(template);\n\n return !isNaN(templateAsNumber) && templateAsNumber > 0 ? `repeat(${template}, 1fr)` : String(template);\n};\n\nconst columns = (template: string): GriffelStyle => ({\n gridTemplateColumns: getCSSTemplateValue(template),\n});\n\nconst rows = (template: string): GriffelStyle => ({\n gridTemplateRows: getCSSTemplateValue(template),\n});\n\nexport const grid = {\n columns,\n rows,\n};\n"],"names":["getCSSTemplateValue","template","templateAsNumber","Number","isNaN","String","columns","gridTemplateColumns","rows","gridTemplateRows","grid"],"mappings":"AAEA,MAAMA,sBAAsB,CAACC
|
|
1
|
+
{"version":3,"sources":["Grid.mixins.ts"],"sourcesContent":["import { GriffelStyle } from '@fluentui/react-components';\n\nconst getCSSTemplateValue = (template: string | number): string => {\n const templateAsNumber = Number(template);\n\n return !isNaN(templateAsNumber) && templateAsNumber > 0 ? `repeat(${template}, 1fr)` : String(template);\n};\n\nconst columns = (template: string): GriffelStyle => ({\n gridTemplateColumns: getCSSTemplateValue(template),\n});\n\nconst rows = (template: string): GriffelStyle => ({\n gridTemplateRows: getCSSTemplateValue(template),\n});\n\nexport const grid = {\n columns,\n rows,\n};\n"],"names":["getCSSTemplateValue","template","templateAsNumber","Number","isNaN","String","columns","gridTemplateColumns","rows","gridTemplateRows","grid"],"mappings":"AAEA,MAAMA,sBAAsB,CAACC;IAC3B,MAAMC,mBAAmBC,OAAOF;IAEhC,OAAO,CAACG,MAAMF,qBAAqBA,mBAAmB,IAAI,CAAC,OAAO,EAAED,SAAS,MAAM,CAAC,GAAGI,OAAOJ;AAChG;AAEA,MAAMK,UAAU,CAACL,WAAoC,CAAA;QACnDM,qBAAqBP,oBAAoBC;IAC3C,CAAA;AAEA,MAAMO,OAAO,CAACP,WAAoC,CAAA;QAChDQ,kBAAkBT,oBAAoBC;IACxC,CAAA;AAEA,OAAO,MAAMS,OAAO;IAClBJ;IACAE;AACF,EAAE"}
|
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import { useGridStyles } from './Grid.styles';
|
|
4
4
|
export const gridShimClassName = 'fui-Grid';
|
|
5
5
|
export const GridShim = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
6
|
-
const { rows
|
|
6
|
+
const { rows, columns, className, ...rest } = props;
|
|
7
7
|
const classes = useGridStyles();
|
|
8
8
|
const classMaps = React.useMemo(()=>({
|
|
9
9
|
rowsClasses: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["GridShim.tsx"],"sourcesContent":["import { mergeClasses } from '@fluentui/react-components';\nimport * as React from 'react';\nimport { useGridStyles } from './Grid.styles';\n\nexport interface GridShimProps {\n /**\n * The columns of the grid with a space-separated list of values.\n * The values represent the track size, and the space between them represents the grid line.\n */\n columns?: 1 | 2 | 3;\n\n /**\n * The rows of the grid with a space-separated list of values.\n * The values represent the track size, and the space between them represents the grid line.\n */\n rows?: 1 | 2 | 3;\n}\n\nexport const gridShimClassName = 'fui-Grid';\n\nexport const GridShim = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLElement> & GridShimProps>(\n (props, ref) => {\n const { rows, columns, className, ...rest } = props;\n const classes = useGridStyles();\n\n const classMaps = React.useMemo(\n () => ({\n rowsClasses: {\n 1: classes.rows1,\n 2: classes.rows2,\n 3: classes.rows3,\n },\n columnsClasses: {\n 1: classes.columns1,\n 2: classes.columns2,\n 3: classes.columns3,\n },\n }),\n [classes],\n );\n\n const gridClasses = mergeClasses(\n gridShimClassName,\n classes.grid,\n !rows && !columns && classes.columnsDefault,\n rows && !columns && classes.onlyRows,\n rows && classMaps.rowsClasses[rows],\n columns && classMaps.columnsClasses[columns],\n className,\n );\n return <div ref={ref} className={gridClasses} {...rest} />;\n },\n);\n\nGridShim.displayName = 'GridShim';\n"],"names":["mergeClasses","React","useGridStyles","gridShimClassName","GridShim","forwardRef","props","ref","rows","columns","className","rest","classes","classMaps","useMemo","rowsClasses","rows1","rows2","rows3","columnsClasses","columns1","columns2","columns3","gridClasses","grid","columnsDefault","onlyRows","div","displayName"],"mappings":"AAAA,SAASA,YAAY,QAAQ,6BAA6B;AAC1D,YAAYC,WAAW,QAAQ;AAC/B,SAASC,aAAa,QAAQ,gBAAgB;AAgB9C,OAAO,MAAMC,oBAAoB,WAAW;AAE5C,OAAO,MAAMC,yBAAWH,MAAMI,UAAU,CACtC,CAACC,OAAOC
|
|
1
|
+
{"version":3,"sources":["GridShim.tsx"],"sourcesContent":["import { mergeClasses } from '@fluentui/react-components';\nimport * as React from 'react';\nimport { useGridStyles } from './Grid.styles';\n\nexport interface GridShimProps {\n /**\n * The columns of the grid with a space-separated list of values.\n * The values represent the track size, and the space between them represents the grid line.\n */\n columns?: 1 | 2 | 3;\n\n /**\n * The rows of the grid with a space-separated list of values.\n * The values represent the track size, and the space between them represents the grid line.\n */\n rows?: 1 | 2 | 3;\n}\n\nexport const gridShimClassName = 'fui-Grid';\n\nexport const GridShim = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLElement> & GridShimProps>(\n (props, ref) => {\n const { rows, columns, className, ...rest } = props;\n const classes = useGridStyles();\n\n const classMaps = React.useMemo(\n () => ({\n rowsClasses: {\n 1: classes.rows1,\n 2: classes.rows2,\n 3: classes.rows3,\n },\n columnsClasses: {\n 1: classes.columns1,\n 2: classes.columns2,\n 3: classes.columns3,\n },\n }),\n [classes],\n );\n\n const gridClasses = mergeClasses(\n gridShimClassName,\n classes.grid,\n !rows && !columns && classes.columnsDefault,\n rows && !columns && classes.onlyRows,\n rows && classMaps.rowsClasses[rows],\n columns && classMaps.columnsClasses[columns],\n className,\n );\n return <div ref={ref} className={gridClasses} {...rest} />;\n },\n);\n\nGridShim.displayName = 'GridShim';\n"],"names":["mergeClasses","React","useGridStyles","gridShimClassName","GridShim","forwardRef","props","ref","rows","columns","className","rest","classes","classMaps","useMemo","rowsClasses","rows1","rows2","rows3","columnsClasses","columns1","columns2","columns3","gridClasses","grid","columnsDefault","onlyRows","div","displayName"],"mappings":"AAAA,SAASA,YAAY,QAAQ,6BAA6B;AAC1D,YAAYC,WAAW,QAAQ;AAC/B,SAASC,aAAa,QAAQ,gBAAgB;AAgB9C,OAAO,MAAMC,oBAAoB,WAAW;AAE5C,OAAO,MAAMC,yBAAWH,MAAMI,UAAU,CACtC,CAACC,OAAOC;IACN,MAAM,EAAEC,IAAI,EAAEC,OAAO,EAAEC,SAAS,EAAE,GAAGC,MAAM,GAAGL;IAC9C,MAAMM,UAAUV;IAEhB,MAAMW,YAAYZ,MAAMa,OAAO,CAC7B,IAAO,CAAA;YACLC,aAAa;gBACX,GAAGH,QAAQI,KAAK;gBAChB,GAAGJ,QAAQK,KAAK;gBAChB,GAAGL,QAAQM,KAAK;YAClB;YACAC,gBAAgB;gBACd,GAAGP,QAAQQ,QAAQ;gBACnB,GAAGR,QAAQS,QAAQ;gBACnB,GAAGT,QAAQU,QAAQ;YACrB;QACF,CAAA,GACA;QAACV;KAAQ;IAGX,MAAMW,cAAcvB,aAClBG,mBACAS,QAAQY,IAAI,EACZ,CAAChB,QAAQ,CAACC,WAAWG,QAAQa,cAAc,EAC3CjB,QAAQ,CAACC,WAAWG,QAAQc,QAAQ,EACpClB,QAAQK,UAAUE,WAAW,CAACP,KAAK,EACnCC,WAAWI,UAAUM,cAAc,CAACV,QAAQ,EAC5CC;IAEF,qBAAO,oBAACiB;QAAIpB,KAAKA;QAAKG,WAAWa;QAAc,GAAGZ,IAAI;;AACxD,GACA;AAEFP,SAASwB,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ItemLayout.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\nimport * as React from 'react';\nimport { mergeClasses } from '@fluentui/react-components';\nimport {\n ComponentProps,\n ComponentState,\n getNativeElementProps,\n Slot,\n slot,\n assertSlots,\n} from '@fluentui/react-utilities';\n\nimport { useItemLayoutStyles } from './ItemLayout.styles';\n\ntype ItemLayoutSlots = {\n root: Slot<'div'>;\n\n contentMedia?: Slot<'div'>;\n contentWrapper?: Slot<'div'>;\n\n header?: Slot<'div'>;\n headerMedia?: Slot<'div'>;\n\n startMedia?: Slot<'div'>;\n endMedia?: Slot<'div'>;\n};\n\ntype ItemLayoutProps = ComponentProps<ItemLayoutSlots>;\n\ntype ItemLayoutState = ComponentState<ItemLayoutSlots>;\n\nexport const itemLayoutClassName = 'fui-ItemLayout';\n\nexport const ItemLayout = React.forwardRef<HTMLDivElement, ItemLayoutProps>((props, ref) => {\n const state: ItemLayoutState = {\n components: {\n root: 'div',\n contentWrapper: 'div',\n contentMedia: 'div',\n header: 'div',\n headerMedia: 'div',\n startMedia: 'div',\n endMedia: 'div',\n },\n root: slot.always(getNativeElementProps('div', { ...props, ref }), { elementType: 'div' }),\n contentMedia: slot.optional(props.contentMedia, { elementType: 'div' }),\n contentWrapper: slot.optional(props.contentWrapper, { renderByDefault: true, elementType: 'div' }),\n header: slot.optional(props.header, { elementType: 'div' }),\n headerMedia: slot.optional(props.headerMedia, { elementType: 'div' }),\n startMedia: slot.optional(props.startMedia, { elementType: 'div' }),\n endMedia: slot.optional(props.endMedia, { elementType: 'div' }),\n };\n const styles = useItemLayoutStyles();\n\n state.root.className = mergeClasses(itemLayoutClassName, styles.root, state.root.className);\n if (state.contentWrapper) {\n state.contentWrapper.className = mergeClasses(styles.contentWrapper, state.contentWrapper.className);\n }\n\n if (state.contentMedia) {\n state.contentMedia.className = mergeClasses(styles.contentMedia, state.contentMedia.className);\n }\n\n if (state.header) {\n state.header.className = mergeClasses(styles.header, state.header.className);\n }\n\n if (state.headerMedia) {\n state.headerMedia.className = mergeClasses(styles.headerMedia, state.headerMedia.className);\n }\n\n if (state.startMedia) {\n state.startMedia.className = mergeClasses(styles.startMedia, state.startMedia.className);\n }\n\n if (state.endMedia) {\n state.endMedia.className = mergeClasses(styles.endMedia, state.endMedia.className);\n }\n\n assertSlots<ItemLayoutSlots>(state);\n\n return (\n <state.root>\n {state.startMedia && <state.startMedia />}\n {state.header && <state.header />}\n {state.headerMedia && <state.headerMedia />}\n {state.contentWrapper && <state.contentWrapper>{state.root.children}</state.contentWrapper>}\n {state.contentMedia && <state.contentMedia />}\n {state.endMedia && <state.endMedia />}\n </state.root>\n );\n});\n\nItemLayout.displayName = 'ItemLayout';\n"],"names":["createElement","React","mergeClasses","getNativeElementProps","slot","assertSlots","useItemLayoutStyles","itemLayoutClassName","ItemLayout","forwardRef","props","ref","state","components","root","contentWrapper","contentMedia","header","headerMedia","startMedia","endMedia","always","elementType","optional","renderByDefault","styles","className","children","displayName"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAC5D,YAAYC,WAAW,QAAQ;AAC/B,SAASC,YAAY,QAAQ,6BAA6B;AAC1D,SAGEC,qBAAqB,EAErBC,IAAI,EACJC,WAAW,QACN,4BAA4B;AAEnC,SAASC,mBAAmB,QAAQ,sBAAsB;AAmB1D,OAAO,MAAMC,sBAAsB,iBAAiB;AAEpD,OAAO,MAAMC,2BAAaP,MAAMQ,UAAU,CAAkC,CAACC,OAAOC
|
|
1
|
+
{"version":3,"sources":["ItemLayout.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\nimport * as React from 'react';\nimport { mergeClasses } from '@fluentui/react-components';\nimport {\n ComponentProps,\n ComponentState,\n getNativeElementProps,\n Slot,\n slot,\n assertSlots,\n} from '@fluentui/react-utilities';\n\nimport { useItemLayoutStyles } from './ItemLayout.styles';\n\ntype ItemLayoutSlots = {\n root: Slot<'div'>;\n\n contentMedia?: Slot<'div'>;\n contentWrapper?: Slot<'div'>;\n\n header?: Slot<'div'>;\n headerMedia?: Slot<'div'>;\n\n startMedia?: Slot<'div'>;\n endMedia?: Slot<'div'>;\n};\n\ntype ItemLayoutProps = ComponentProps<ItemLayoutSlots>;\n\ntype ItemLayoutState = ComponentState<ItemLayoutSlots>;\n\nexport const itemLayoutClassName = 'fui-ItemLayout';\n\nexport const ItemLayout = React.forwardRef<HTMLDivElement, ItemLayoutProps>((props, ref) => {\n const state: ItemLayoutState = {\n components: {\n root: 'div',\n contentWrapper: 'div',\n contentMedia: 'div',\n header: 'div',\n headerMedia: 'div',\n startMedia: 'div',\n endMedia: 'div',\n },\n root: slot.always(getNativeElementProps('div', { ...props, ref }), { elementType: 'div' }),\n contentMedia: slot.optional(props.contentMedia, { elementType: 'div' }),\n contentWrapper: slot.optional(props.contentWrapper, { renderByDefault: true, elementType: 'div' }),\n header: slot.optional(props.header, { elementType: 'div' }),\n headerMedia: slot.optional(props.headerMedia, { elementType: 'div' }),\n startMedia: slot.optional(props.startMedia, { elementType: 'div' }),\n endMedia: slot.optional(props.endMedia, { elementType: 'div' }),\n };\n const styles = useItemLayoutStyles();\n\n state.root.className = mergeClasses(itemLayoutClassName, styles.root, state.root.className);\n if (state.contentWrapper) {\n state.contentWrapper.className = mergeClasses(styles.contentWrapper, state.contentWrapper.className);\n }\n\n if (state.contentMedia) {\n state.contentMedia.className = mergeClasses(styles.contentMedia, state.contentMedia.className);\n }\n\n if (state.header) {\n state.header.className = mergeClasses(styles.header, state.header.className);\n }\n\n if (state.headerMedia) {\n state.headerMedia.className = mergeClasses(styles.headerMedia, state.headerMedia.className);\n }\n\n if (state.startMedia) {\n state.startMedia.className = mergeClasses(styles.startMedia, state.startMedia.className);\n }\n\n if (state.endMedia) {\n state.endMedia.className = mergeClasses(styles.endMedia, state.endMedia.className);\n }\n\n assertSlots<ItemLayoutSlots>(state);\n\n return (\n <state.root>\n {state.startMedia && <state.startMedia />}\n {state.header && <state.header />}\n {state.headerMedia && <state.headerMedia />}\n {state.contentWrapper && <state.contentWrapper>{state.root.children}</state.contentWrapper>}\n {state.contentMedia && <state.contentMedia />}\n {state.endMedia && <state.endMedia />}\n </state.root>\n );\n});\n\nItemLayout.displayName = 'ItemLayout';\n"],"names":["createElement","React","mergeClasses","getNativeElementProps","slot","assertSlots","useItemLayoutStyles","itemLayoutClassName","ItemLayout","forwardRef","props","ref","state","components","root","contentWrapper","contentMedia","header","headerMedia","startMedia","endMedia","always","elementType","optional","renderByDefault","styles","className","children","displayName"],"mappings":"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"}
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { mergeClasses } from '@fluentui/react-components';
|
|
3
3
|
export const primitiveClassName = 'fui-Primitive';
|
|
4
4
|
export const Primitive = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
5
|
-
const { as: Component = 'div'
|
|
5
|
+
const { as: Component = 'div', ...rest } = props;
|
|
6
6
|
const dir = typeof props.children === 'string' ? 'auto' : undefined;
|
|
7
7
|
const className = mergeClasses(primitiveClassName, props.className);
|
|
8
8
|
return /*#__PURE__*/ React.createElement(Component, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Primitive.tsx"],"sourcesContent":["import * as React from 'react';\nimport { mergeClasses } from '@fluentui/react-components';\n\n// Simplified version from https://github.com/reach/reach-ui/blob/55d28eda39afc4c667e97f5f62a48d1de034b93f/packages/utils/src/polymorphic.ts\ninterface PrimitiveComponent {\n /**\n * Infers props from JSX.IntrinsicElements based on \"as\" value. Explicitly avoids `React.ElementType` and manually\n * narrow the prop types so that events are typed when using JSX.IntrinsicElements.\n */\n <As extends keyof JSX.IntrinsicElements>(props: { as?: As } & JSX.IntrinsicElements[As]): React.ReactElement | null;\n\n displayName: string;\n}\n\nexport const primitiveClassName = 'fui-Primitive';\n\nexport const Primitive = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLElement> & { as: 'div' }>(\n (props, ref) => {\n const { as: Component = 'div', ...rest } = props;\n\n const dir = typeof props.children === 'string' ? 'auto' : undefined;\n\n const className = mergeClasses(primitiveClassName, props.className);\n\n return <Component dir={dir} {...rest} className={className} ref={ref} />;\n },\n) as PrimitiveComponent;\n\nPrimitive.displayName = 'Primitive';\n"],"names":["React","mergeClasses","primitiveClassName","Primitive","forwardRef","props","ref","as","Component","rest","dir","children","undefined","className","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,YAAY,QAAQ,6BAA6B;AAa1D,OAAO,MAAMC,qBAAqB,gBAAgB;AAElD,OAAO,MAAMC,0BAAYH,MAAMI,UAAU,CACvC,CAACC,OAAOC
|
|
1
|
+
{"version":3,"sources":["Primitive.tsx"],"sourcesContent":["import * as React from 'react';\nimport { mergeClasses } from '@fluentui/react-components';\n\n// Simplified version from https://github.com/reach/reach-ui/blob/55d28eda39afc4c667e97f5f62a48d1de034b93f/packages/utils/src/polymorphic.ts\ninterface PrimitiveComponent {\n /**\n * Infers props from JSX.IntrinsicElements based on \"as\" value. Explicitly avoids `React.ElementType` and manually\n * narrow the prop types so that events are typed when using JSX.IntrinsicElements.\n */\n <As extends keyof JSX.IntrinsicElements>(props: { as?: As } & JSX.IntrinsicElements[As]): React.ReactElement | null;\n\n displayName: string;\n}\n\nexport const primitiveClassName = 'fui-Primitive';\n\nexport const Primitive = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLElement> & { as: 'div' }>(\n (props, ref) => {\n const { as: Component = 'div', ...rest } = props;\n\n const dir = typeof props.children === 'string' ? 'auto' : undefined;\n\n const className = mergeClasses(primitiveClassName, props.className);\n\n return <Component dir={dir} {...rest} className={className} ref={ref} />;\n },\n) as PrimitiveComponent;\n\nPrimitive.displayName = 'Primitive';\n"],"names":["React","mergeClasses","primitiveClassName","Primitive","forwardRef","props","ref","as","Component","rest","dir","children","undefined","className","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,YAAY,QAAQ,6BAA6B;AAa1D,OAAO,MAAMC,qBAAqB,gBAAgB;AAElD,OAAO,MAAMC,0BAAYH,MAAMI,UAAU,CACvC,CAACC,OAAOC;IACN,MAAM,EAAEC,IAAIC,YAAY,KAAK,EAAE,GAAGC,MAAM,GAAGJ;IAE3C,MAAMK,MAAM,OAAOL,MAAMM,QAAQ,KAAK,WAAW,SAASC;IAE1D,MAAMC,YAAYZ,aAAaC,oBAAoBG,MAAMQ,SAAS;IAElE,qBAAO,oBAACL;QAAUE,KAAKA;QAAM,GAAGD,IAAI;QAAEI,WAAWA;QAAWP,KAAKA;;AACnE,GACsB;AAExBH,UAAUW,WAAW,GAAG"}
|
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import { useSegmentStyles } from './Segment.styles';
|
|
4
4
|
export const segmentClassName = 'fui-Segment';
|
|
5
5
|
export const Segment = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
6
|
-
const { children
|
|
6
|
+
const { children, className, ...rest } = props;
|
|
7
7
|
const classes = useSegmentStyles();
|
|
8
8
|
const segmentClasses = mergeClasses(segmentClassName, classes.segment, className);
|
|
9
9
|
return /*#__PURE__*/ React.createElement("div", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Segment.tsx"],"sourcesContent":["import { mergeClasses } from '@fluentui/react-components';\nimport * as React from 'react';\n\nimport { useSegmentStyles } from './Segment.styles';\n\nexport const segmentClassName = 'fui-Segment';\n\nexport const Segment = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLElement>>((props, ref) => {\n const { children, className, ...rest } = props;\n const classes = useSegmentStyles();\n\n const segmentClasses = mergeClasses(segmentClassName, classes.segment, className);\n\n return (\n <div ref={ref} className={segmentClasses} {...rest}>\n {children}\n </div>\n );\n});\n\nSegment.displayName = 'Segment';\n"],"names":["mergeClasses","React","useSegmentStyles","segmentClassName","Segment","forwardRef","props","ref","children","className","rest","classes","segmentClasses","segment","div","displayName"],"mappings":"AAAA,SAASA,YAAY,QAAQ,6BAA6B;AAC1D,YAAYC,WAAW,QAAQ;AAE/B,SAASC,gBAAgB,QAAQ,mBAAmB;AAEpD,OAAO,MAAMC,mBAAmB,cAAc;AAE9C,OAAO,MAAMC,wBAAUH,MAAMI,UAAU,CAAoD,CAACC,OAAOC
|
|
1
|
+
{"version":3,"sources":["Segment.tsx"],"sourcesContent":["import { mergeClasses } from '@fluentui/react-components';\nimport * as React from 'react';\n\nimport { useSegmentStyles } from './Segment.styles';\n\nexport const segmentClassName = 'fui-Segment';\n\nexport const Segment = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLElement>>((props, ref) => {\n const { children, className, ...rest } = props;\n const classes = useSegmentStyles();\n\n const segmentClasses = mergeClasses(segmentClassName, classes.segment, className);\n\n return (\n <div ref={ref} className={segmentClasses} {...rest}>\n {children}\n </div>\n );\n});\n\nSegment.displayName = 'Segment';\n"],"names":["mergeClasses","React","useSegmentStyles","segmentClassName","Segment","forwardRef","props","ref","children","className","rest","classes","segmentClasses","segment","div","displayName"],"mappings":"AAAA,SAASA,YAAY,QAAQ,6BAA6B;AAC1D,YAAYC,WAAW,QAAQ;AAE/B,SAASC,gBAAgB,QAAQ,mBAAmB;AAEpD,OAAO,MAAMC,mBAAmB,cAAc;AAE9C,OAAO,MAAMC,wBAAUH,MAAMI,UAAU,CAAoD,CAACC,OAAOC;IACjG,MAAM,EAAEC,QAAQ,EAAEC,SAAS,EAAE,GAAGC,MAAM,GAAGJ;IACzC,MAAMK,UAAUT;IAEhB,MAAMU,iBAAiBZ,aAAaG,kBAAkBQ,QAAQE,OAAO,EAAEJ;IAEvE,qBACE,oBAACK;QAAIP,KAAKA;QAAKE,WAAWG;QAAiB,GAAGF,IAAI;OAC/CF;AAGP,GAAG;AAEHJ,QAAQW,WAAW,GAAG"}
|
|
@@ -19,7 +19,7 @@ const sizeMap = {
|
|
|
19
19
|
largest: 'hero700'
|
|
20
20
|
};
|
|
21
21
|
export const StyledText = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
22
|
-
const { align
|
|
22
|
+
const { align, as: Component = 'span', atMention, disabled, error, important, success, temporary, timestamp, truncate, weight, wrap = true } = props;
|
|
23
23
|
const dir = typeof props.children === 'string' ? 'auto' : undefined;
|
|
24
24
|
const rootProps = getNativeElementProps(Component, {
|
|
25
25
|
ref,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["StyledText.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, mergeClasses, Slot, ComponentProps } from '@fluentui/react-components';\nimport { useSizeStyles, useStyles, useWeightStyles } from './StyledText.styles';\n\nexport type StyledTextSlots = {\n root: Slot<'span', 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'pre' | 'time'>;\n};\n\nexport type StyledTextProps = ComponentProps<StyledTextSlots> & {\n /**\n * Aligns text based on the parent container.\n */\n align?: 'start' | 'center' | 'end' | 'justify';\n\n /**\n * At mentions can be formatted to draw users' attention.\n * Mentions for \"me\" can be formatted to appear differently.\n */\n atMention?: 'me' | boolean;\n\n /**\n * Set as disabled StyledText component\n */\n disabled?: boolean;\n\n /**\n * Set as error StyledText component\n */\n error?: boolean;\n\n /**\n * The StyledText can appear more important and draw user's attention\n */\n important?: boolean;\n\n /**\n * Applies font size and line height based on the theme tokens.\n */\n size?:\n | 'smaller'\n | 'small'\n | 'medium'\n | 'large'\n | 'large500'\n | 'larger'\n | 'largest'\n | 100\n | 200\n | 300\n | 400\n | 500\n | 600\n | 700;\n\n /**\n * Set as success StyledText component\n */\n success?: boolean;\n\n /**\n * The text can signify a temporary state\n */\n temporary?: boolean;\n\n /**\n * Set as timestamp StyledText component\n */\n timestamp?: boolean;\n\n /**\n * Truncate overflowing text for block displays.\n */\n truncate?: boolean;\n\n /**\n * Applies font weight to the content.\n */\n weight?: 'light' | 'semilight' | 'regular' | 'medium' | 'semibold' | 'bold';\n\n /**\n * Wraps the text content on white spaces.\n *\n * @default true\n */\n wrap?: boolean;\n};\n\nexport const styledTextClassName = 'fui-StyledText';\n\nconst sizeMap: Record<string, 'base100' | 'base200' | 'base300' | 'base400' | 'base500' | 'base600' | 'hero700'> = {\n '100': 'base100',\n '200': 'base200',\n '300': 'base300',\n '400': 'base400',\n '500': 'base500',\n '600': 'base600',\n '700': 'hero700',\n smaller: 'base100',\n small: 'base200',\n medium: 'base300',\n large: 'base400',\n large500: 'base500',\n larger: 'base600',\n largest: 'hero700',\n};\n\nexport const StyledText = React.forwardRef<HTMLSpanElement, StyledTextProps>((props, ref) => {\n const {\n align,\n as: Component = 'span',\n atMention,\n disabled,\n error,\n important,\n success,\n temporary,\n timestamp,\n truncate,\n weight,\n wrap = true,\n } = props;\n\n const dir = typeof props.children === 'string' ? 'auto' : undefined;\n\n const rootProps = getNativeElementProps(Component, {\n ref,\n ...props,\n });\n\n const sizeStyles = useSizeStyles();\n const weightStyles = useWeightStyles();\n const styles = useStyles();\n\n const size = props.size ? sizeMap[props.size] : props.size;\n const className = mergeClasses(\n styledTextClassName,\n size && sizeStyles[size],\n weight && weightStyles[weight],\n wrap === false && styles.nowrap,\n truncate && styles.truncate,\n align === 'center' && styles.alignCenter,\n align === 'end' && styles.alignEnd,\n align === 'justify' && styles.alignJustify,\n\n atMention && styles.mention,\n atMention === 'me' && styles.mentionMe,\n disabled && styles.disabled,\n error && styles.error,\n important && styles.important,\n success && styles.success,\n temporary && styles.temporary,\n timestamp && styles.timestamp,\n\n props.className,\n );\n\n return <Component dir={dir} {...rootProps} className={className} />;\n});\n\nStyledText.displayName = 'StyledText';\n"],"names":["React","getNativeElementProps","mergeClasses","useSizeStyles","useStyles","useWeightStyles","styledTextClassName","sizeMap","smaller","small","medium","large","large500","larger","largest","StyledText","forwardRef","props","ref","align","as","Component","atMention","disabled","error","important","success","temporary","timestamp","truncate","weight","wrap","dir","children","undefined","rootProps","sizeStyles","weightStyles","styles","size","className","nowrap","alignCenter","alignEnd","alignJustify","mention","mentionMe","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,EAAEC,YAAY,QAA8B,6BAA6B;AACvG,SAASC,aAAa,EAAEC,SAAS,EAAEC,eAAe,QAAQ,sBAAsB;AAqFhF,OAAO,MAAMC,sBAAsB,iBAAiB;AAEpD,MAAMC,UAA6G;IACjH,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACPC,SAAS;IACTC,OAAO;IACPC,QAAQ;IACRC,OAAO;IACPC,UAAU;IACVC,QAAQ;IACRC,SAAS;AACX;AAEA,OAAO,MAAMC,2BAAaf,MAAMgB,UAAU,CAAmC,CAACC,OAAOC
|
|
1
|
+
{"version":3,"sources":["StyledText.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, mergeClasses, Slot, ComponentProps } from '@fluentui/react-components';\nimport { useSizeStyles, useStyles, useWeightStyles } from './StyledText.styles';\n\nexport type StyledTextSlots = {\n root: Slot<'span', 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'pre' | 'time'>;\n};\n\nexport type StyledTextProps = ComponentProps<StyledTextSlots> & {\n /**\n * Aligns text based on the parent container.\n */\n align?: 'start' | 'center' | 'end' | 'justify';\n\n /**\n * At mentions can be formatted to draw users' attention.\n * Mentions for \"me\" can be formatted to appear differently.\n */\n atMention?: 'me' | boolean;\n\n /**\n * Set as disabled StyledText component\n */\n disabled?: boolean;\n\n /**\n * Set as error StyledText component\n */\n error?: boolean;\n\n /**\n * The StyledText can appear more important and draw user's attention\n */\n important?: boolean;\n\n /**\n * Applies font size and line height based on the theme tokens.\n */\n size?:\n | 'smaller'\n | 'small'\n | 'medium'\n | 'large'\n | 'large500'\n | 'larger'\n | 'largest'\n | 100\n | 200\n | 300\n | 400\n | 500\n | 600\n | 700;\n\n /**\n * Set as success StyledText component\n */\n success?: boolean;\n\n /**\n * The text can signify a temporary state\n */\n temporary?: boolean;\n\n /**\n * Set as timestamp StyledText component\n */\n timestamp?: boolean;\n\n /**\n * Truncate overflowing text for block displays.\n */\n truncate?: boolean;\n\n /**\n * Applies font weight to the content.\n */\n weight?: 'light' | 'semilight' | 'regular' | 'medium' | 'semibold' | 'bold';\n\n /**\n * Wraps the text content on white spaces.\n *\n * @default true\n */\n wrap?: boolean;\n};\n\nexport const styledTextClassName = 'fui-StyledText';\n\nconst sizeMap: Record<string, 'base100' | 'base200' | 'base300' | 'base400' | 'base500' | 'base600' | 'hero700'> = {\n '100': 'base100',\n '200': 'base200',\n '300': 'base300',\n '400': 'base400',\n '500': 'base500',\n '600': 'base600',\n '700': 'hero700',\n smaller: 'base100',\n small: 'base200',\n medium: 'base300',\n large: 'base400',\n large500: 'base500',\n larger: 'base600',\n largest: 'hero700',\n};\n\nexport const StyledText = React.forwardRef<HTMLSpanElement, StyledTextProps>((props, ref) => {\n const {\n align,\n as: Component = 'span',\n atMention,\n disabled,\n error,\n important,\n success,\n temporary,\n timestamp,\n truncate,\n weight,\n wrap = true,\n } = props;\n\n const dir = typeof props.children === 'string' ? 'auto' : undefined;\n\n const rootProps = getNativeElementProps(Component, {\n ref,\n ...props,\n });\n\n const sizeStyles = useSizeStyles();\n const weightStyles = useWeightStyles();\n const styles = useStyles();\n\n const size = props.size ? sizeMap[props.size] : props.size;\n const className = mergeClasses(\n styledTextClassName,\n size && sizeStyles[size],\n weight && weightStyles[weight],\n wrap === false && styles.nowrap,\n truncate && styles.truncate,\n align === 'center' && styles.alignCenter,\n align === 'end' && styles.alignEnd,\n align === 'justify' && styles.alignJustify,\n\n atMention && styles.mention,\n atMention === 'me' && styles.mentionMe,\n disabled && styles.disabled,\n error && styles.error,\n important && styles.important,\n success && styles.success,\n temporary && styles.temporary,\n timestamp && styles.timestamp,\n\n props.className,\n );\n\n return <Component dir={dir} {...rootProps} className={className} />;\n});\n\nStyledText.displayName = 'StyledText';\n"],"names":["React","getNativeElementProps","mergeClasses","useSizeStyles","useStyles","useWeightStyles","styledTextClassName","sizeMap","smaller","small","medium","large","large500","larger","largest","StyledText","forwardRef","props","ref","align","as","Component","atMention","disabled","error","important","success","temporary","timestamp","truncate","weight","wrap","dir","children","undefined","rootProps","sizeStyles","weightStyles","styles","size","className","nowrap","alignCenter","alignEnd","alignJustify","mention","mentionMe","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,EAAEC,YAAY,QAA8B,6BAA6B;AACvG,SAASC,aAAa,EAAEC,SAAS,EAAEC,eAAe,QAAQ,sBAAsB;AAqFhF,OAAO,MAAMC,sBAAsB,iBAAiB;AAEpD,MAAMC,UAA6G;IACjH,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACPC,SAAS;IACTC,OAAO;IACPC,QAAQ;IACRC,OAAO;IACPC,UAAU;IACVC,QAAQ;IACRC,SAAS;AACX;AAEA,OAAO,MAAMC,2BAAaf,MAAMgB,UAAU,CAAmC,CAACC,OAAOC;IACnF,MAAM,EACJC,KAAK,EACLC,IAAIC,YAAY,MAAM,EACtBC,SAAS,EACTC,QAAQ,EACRC,KAAK,EACLC,SAAS,EACTC,OAAO,EACPC,SAAS,EACTC,SAAS,EACTC,QAAQ,EACRC,MAAM,EACNC,OAAO,IAAI,EACZ,GAAGd;IAEJ,MAAMe,MAAM,OAAOf,MAAMgB,QAAQ,KAAK,WAAW,SAASC;IAE1D,MAAMC,YAAYlC,sBAAsBoB,WAAW;QACjDH;QACA,GAAGD,KAAK;IACV;IAEA,MAAMmB,aAAajC;IACnB,MAAMkC,eAAehC;IACrB,MAAMiC,SAASlC;IAEf,MAAMmC,OAAOtB,MAAMsB,IAAI,GAAGhC,OAAO,CAACU,MAAMsB,IAAI,CAAC,GAAGtB,MAAMsB,IAAI;IAC1D,MAAMC,YAAYtC,aAChBI,qBACAiC,QAAQH,UAAU,CAACG,KAAK,EACxBT,UAAUO,YAAY,CAACP,OAAO,EAC9BC,SAAS,SAASO,OAAOG,MAAM,EAC/BZ,YAAYS,OAAOT,QAAQ,EAC3BV,UAAU,YAAYmB,OAAOI,WAAW,EACxCvB,UAAU,SAASmB,OAAOK,QAAQ,EAClCxB,UAAU,aAAamB,OAAOM,YAAY,EAE1CtB,aAAagB,OAAOO,OAAO,EAC3BvB,cAAc,QAAQgB,OAAOQ,SAAS,EACtCvB,YAAYe,OAAOf,QAAQ,EAC3BC,SAASc,OAAOd,KAAK,EACrBC,aAAaa,OAAOb,SAAS,EAC7BC,WAAWY,OAAOZ,OAAO,EACzBC,aAAaW,OAAOX,SAAS,EAC7BC,aAAaU,OAAOV,SAAS,EAE7BX,MAAMuB,SAAS;IAGjB,qBAAO,oBAACnB;QAAUW,KAAKA;QAAM,GAAGG,SAAS;QAAEK,WAAWA;;AACxD,GAAG;AAEHzB,WAAWgC,WAAW,GAAG"}
|
|
@@ -9,27 +9,37 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
v9HoverClasses: ()
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
v9HoverClasses: function() {
|
|
13
|
+
return v9HoverClasses;
|
|
14
|
+
},
|
|
15
|
+
v9Icon: function() {
|
|
16
|
+
return v9Icon;
|
|
17
|
+
},
|
|
18
|
+
v9CustomSizeIcon: function() {
|
|
19
|
+
return v9CustomSizeIcon;
|
|
20
|
+
},
|
|
21
|
+
v0Icon: function() {
|
|
22
|
+
return v0Icon;
|
|
23
|
+
},
|
|
24
|
+
v9DisabledCursor: function() {
|
|
25
|
+
return v9DisabledCursor;
|
|
26
|
+
}
|
|
17
27
|
});
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
28
|
+
const _reactcomponents = require("@fluentui/react-components");
|
|
29
|
+
const _reactnorthstar = require("@fluentui/react-northstar");
|
|
30
|
+
const _reacticons = require("@fluentui/react-icons");
|
|
21
31
|
const v9HoverClasses = ()=>({
|
|
22
|
-
[`& .${
|
|
32
|
+
[`& .${_reacticons.iconFilledClassName}`]: {
|
|
23
33
|
display: 'none'
|
|
24
34
|
},
|
|
25
|
-
[`& .${
|
|
35
|
+
[`& .${_reacticons.iconRegularClassName}`]: {
|
|
26
36
|
display: 'inline'
|
|
27
37
|
},
|
|
28
38
|
'&:hover': {
|
|
29
|
-
[`& .${
|
|
39
|
+
[`& .${_reacticons.iconFilledClassName}`]: {
|
|
30
40
|
display: 'inline'
|
|
31
41
|
},
|
|
32
|
-
[`& .${
|
|
42
|
+
[`& .${_reacticons.iconRegularClassName}`]: {
|
|
33
43
|
display: 'none'
|
|
34
44
|
}
|
|
35
45
|
}
|
|
@@ -41,29 +51,29 @@ const v9Icon = ()=>({
|
|
|
41
51
|
paddingBottom: '100%',
|
|
42
52
|
// negative margin is necessary here for centering v9 icon
|
|
43
53
|
// with v0 button, because of extra spaces that svg contains
|
|
44
|
-
...
|
|
45
|
-
...
|
|
54
|
+
..._reactcomponents.shorthands.margin('-4px', 0, 0, '-4px'),
|
|
55
|
+
..._reactcomponents.shorthands.overflow('visible')
|
|
46
56
|
},
|
|
47
57
|
...v9HoverClasses()
|
|
48
58
|
});
|
|
49
59
|
const v9CustomSizeIcon = ()=>({
|
|
50
60
|
'& svg': {
|
|
51
|
-
...
|
|
61
|
+
..._reactcomponents.shorthands.overflow('visible')
|
|
52
62
|
},
|
|
53
63
|
...v9HoverClasses()
|
|
54
64
|
});
|
|
55
65
|
const v0Icon = ()=>({
|
|
56
|
-
[`& .${
|
|
66
|
+
[`& .${_reactnorthstar.iconClassNames.outline}`]: {
|
|
57
67
|
display: 'block'
|
|
58
68
|
},
|
|
59
|
-
[`& .${
|
|
69
|
+
[`& .${_reactnorthstar.iconClassNames.filled}`]: {
|
|
60
70
|
display: 'none'
|
|
61
71
|
},
|
|
62
72
|
'&:hover': {
|
|
63
|
-
[`& .${
|
|
73
|
+
[`& .${_reactnorthstar.iconClassNames.outline}`]: {
|
|
64
74
|
display: 'none'
|
|
65
75
|
},
|
|
66
|
-
[`& .${
|
|
76
|
+
[`& .${_reactnorthstar.iconClassNames.filled}`]: {
|
|
67
77
|
display: 'block'
|
|
68
78
|
}
|
|
69
79
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ButtonMigration.mixins.js"],"sourcesContent":["import { shorthands } from '@fluentui/react-components';\nimport { iconClassNames } from '@fluentui/react-northstar';\nimport { iconFilledClassName, iconRegularClassName } from '@fluentui/react-icons';\nexport const v9HoverClasses = ()=>({\n [`& .${iconFilledClassName}`]: {\n display: 'none'\n },\n [`& .${iconRegularClassName}`]: {\n display: 'inline'\n },\n '&:hover': {\n [`& .${iconFilledClassName}`]: {\n display: 'inline'\n },\n [`& .${iconRegularClassName}`]: {\n display: 'none'\n }\n }\n });\nexport const v9Icon = ()=>({\n // styles that allow to keep consistent size of v9 icon with v0 icon\n '& svg': {\n width: '100%',\n paddingBottom: '100%',\n // negative margin is necessary here for centering v9 icon\n // with v0 button, because of extra spaces that svg contains\n ...shorthands.margin('-4px', 0, 0, '-4px'),\n ...shorthands.overflow('visible')\n },\n ...v9HoverClasses()\n });\nexport const v9CustomSizeIcon = ()=>({\n '& svg': {\n ...shorthands.overflow('visible')\n },\n ...v9HoverClasses()\n });\nexport const v0Icon = ()=>({\n [`& .${iconClassNames.outline}`]: {\n display: 'block'\n },\n [`& .${iconClassNames.filled}`]: {\n display: 'none'\n },\n '&:hover': {\n [`& .${iconClassNames.outline}`]: {\n display: 'none'\n },\n [`& .${iconClassNames.filled}`]: {\n display: 'block'\n }\n }\n });\nexport const v9DisabledCursor = ()=>({\n '&:disabled': {\n cursor: 'default',\n '&:hover': {\n cursor: 'default'\n },\n '&:hover:active': {\n cursor: 'default'\n }\n }\n });\n"],"names":["v9HoverClasses","v9Icon","v9CustomSizeIcon","v0Icon","v9DisabledCursor","iconFilledClassName","display","iconRegularClassName","width","paddingBottom","shorthands","margin","overflow","iconClassNames","outline","filled","cursor"],"mappings":";;;;;;;;;;;IAGaA,cAAc
|
|
1
|
+
{"version":3,"sources":["ButtonMigration.mixins.js"],"sourcesContent":["import { shorthands } from '@fluentui/react-components';\nimport { iconClassNames } from '@fluentui/react-northstar';\nimport { iconFilledClassName, iconRegularClassName } from '@fluentui/react-icons';\nexport const v9HoverClasses = ()=>({\n [`& .${iconFilledClassName}`]: {\n display: 'none'\n },\n [`& .${iconRegularClassName}`]: {\n display: 'inline'\n },\n '&:hover': {\n [`& .${iconFilledClassName}`]: {\n display: 'inline'\n },\n [`& .${iconRegularClassName}`]: {\n display: 'none'\n }\n }\n });\nexport const v9Icon = ()=>({\n // styles that allow to keep consistent size of v9 icon with v0 icon\n '& svg': {\n width: '100%',\n paddingBottom: '100%',\n // negative margin is necessary here for centering v9 icon\n // with v0 button, because of extra spaces that svg contains\n ...shorthands.margin('-4px', 0, 0, '-4px'),\n ...shorthands.overflow('visible')\n },\n ...v9HoverClasses()\n });\nexport const v9CustomSizeIcon = ()=>({\n '& svg': {\n ...shorthands.overflow('visible')\n },\n ...v9HoverClasses()\n });\nexport const v0Icon = ()=>({\n [`& .${iconClassNames.outline}`]: {\n display: 'block'\n },\n [`& .${iconClassNames.filled}`]: {\n display: 'none'\n },\n '&:hover': {\n [`& .${iconClassNames.outline}`]: {\n display: 'none'\n },\n [`& .${iconClassNames.filled}`]: {\n display: 'block'\n }\n }\n });\nexport const v9DisabledCursor = ()=>({\n '&:disabled': {\n cursor: 'default',\n '&:hover': {\n cursor: 'default'\n },\n '&:hover:active': {\n cursor: 'default'\n }\n }\n });\n"],"names":["v9HoverClasses","v9Icon","v9CustomSizeIcon","v0Icon","v9DisabledCursor","iconFilledClassName","display","iconRegularClassName","width","paddingBottom","shorthands","margin","overflow","iconClassNames","outline","filled","cursor"],"mappings":";;;;;;;;;;;IAGaA,cAAc;eAAdA;;IAgBAC,MAAM;eAANA;;IAYAC,gBAAgB;eAAhBA;;IAMAC,MAAM;eAANA;;IAgBAC,gBAAgB;eAAhBA;;;iCArDc;gCACI;4BAC2B;AACnD,MAAMJ,iBAAiB,IAAK,CAAA;QAC3B,CAAC,CAAC,GAAG,EAAEK,+BAAmB,CAAC,CAAC,CAAC,EAAE;YAC3BC,SAAS;QACb;QACA,CAAC,CAAC,GAAG,EAAEC,gCAAoB,CAAC,CAAC,CAAC,EAAE;YAC5BD,SAAS;QACb;QACA,WAAW;YACP,CAAC,CAAC,GAAG,EAAED,+BAAmB,CAAC,CAAC,CAAC,EAAE;gBAC3BC,SAAS;YACb;YACA,CAAC,CAAC,GAAG,EAAEC,gCAAoB,CAAC,CAAC,CAAC,EAAE;gBAC5BD,SAAS;YACb;QACJ;IACJ,CAAA;AACG,MAAML,SAAS,IAAK,CAAA;QACnB,oEAAoE;QACpE,SAAS;YACLO,OAAO;YACPC,eAAe;YACf,0DAA0D;YAC1D,4DAA4D;YAC5D,GAAGC,2BAAU,CAACC,MAAM,CAAC,QAAQ,GAAG,GAAG,OAAO;YAC1C,GAAGD,2BAAU,CAACE,QAAQ,CAAC,UAAU;QACrC;QACA,GAAGZ,gBAAgB;IACvB,CAAA;AACG,MAAME,mBAAmB,IAAK,CAAA;QAC7B,SAAS;YACL,GAAGQ,2BAAU,CAACE,QAAQ,CAAC,UAAU;QACrC;QACA,GAAGZ,gBAAgB;IACvB,CAAA;AACG,MAAMG,SAAS,IAAK,CAAA;QACnB,CAAC,CAAC,GAAG,EAAEU,8BAAc,CAACC,OAAO,CAAC,CAAC,CAAC,EAAE;YAC9BR,SAAS;QACb;QACA,CAAC,CAAC,GAAG,EAAEO,8BAAc,CAACE,MAAM,CAAC,CAAC,CAAC,EAAE;YAC7BT,SAAS;QACb;QACA,WAAW;YACP,CAAC,CAAC,GAAG,EAAEO,8BAAc,CAACC,OAAO,CAAC,CAAC,CAAC,EAAE;gBAC9BR,SAAS;YACb;YACA,CAAC,CAAC,GAAG,EAAEO,8BAAc,CAACE,MAAM,CAAC,CAAC,CAAC,EAAE;gBAC7BT,SAAS;YACb;QACJ;IACJ,CAAA;AACG,MAAMF,mBAAmB,IAAK,CAAA;QAC7B,cAAc;YACVY,QAAQ;YACR,WAAW;gBACPA,QAAQ;YACZ;YACA,kBAAkB;gBACdA,QAAQ;YACZ;QACJ;IACJ,CAAA"}
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
const
|
|
6
|
-
|
|
5
|
+
const _export_star = require("@swc/helpers/_/_export_star");
|
|
6
|
+
_export_star._(require("./ButtonMigration.mixins"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.js"],"sourcesContent":["export * from './ButtonMigration.mixins';\n"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"sources":["index.js"],"sourcesContent":["export * from './ButtonMigration.mixins';\n"],"names":[],"mappings":";;;;;uBAAc"}
|
|
@@ -9,17 +9,21 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
flexClassName: ()
|
|
13
|
-
|
|
12
|
+
flexClassName: function() {
|
|
13
|
+
return flexClassName;
|
|
14
|
+
},
|
|
15
|
+
Flex: function() {
|
|
16
|
+
return Flex;
|
|
17
|
+
}
|
|
14
18
|
});
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const _react = /*#__PURE__*/
|
|
18
|
-
const
|
|
19
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
20
|
+
const _reactcomponents = require("@fluentui/react-components");
|
|
21
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
22
|
+
const _Flexstyles = require("./Flex.styles");
|
|
19
23
|
const flexClassName = 'fui-Flex';
|
|
20
24
|
const Flex = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
21
|
-
const { children
|
|
22
|
-
const classes = (0,
|
|
25
|
+
const { children, column, fill, gap, hAlign, inline, padding, space, vAlign, wrap, className, ...rest } = props;
|
|
26
|
+
const classes = (0, _Flexstyles.useFlexStyles)();
|
|
23
27
|
const classMaps = _react.useMemo(()=>({
|
|
24
28
|
alignItems: {
|
|
25
29
|
start: classes.alignItemsFlexStart,
|
|
@@ -56,11 +60,11 @@ const Flex = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
|
56
60
|
}), [
|
|
57
61
|
classes
|
|
58
62
|
]);
|
|
59
|
-
const flexClasses = (0,
|
|
63
|
+
const flexClasses = (0, _reactcomponents.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);
|
|
60
64
|
const content = _react.Children.map(children, (child)=>{
|
|
61
|
-
var _child_type;
|
|
65
|
+
var _child_type, _child;
|
|
62
66
|
// @ts-expect-error __isFlexItem is added to the React type property by N*
|
|
63
|
-
const isFlexItemElement = child === null ||
|
|
67
|
+
const isFlexItemElement = (_child = child) === null || _child === void 0 ? void 0 : (_child_type = _child.type) === null || _child_type === void 0 ? void 0 : _child_type.__isFlexItem;
|
|
64
68
|
return isFlexItemElement ? /*#__PURE__*/ _react.cloneElement(child, {
|
|
65
69
|
flexDirection: column ? 'column' : 'row'
|
|
66
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
|
|
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, _child;\n // @ts-expect-error __isFlexItem is added to the React type property by N*\n const isFlexItemElement = (_child = 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","_child","isFlexItemElement","type","__isFlexItem","cloneElement","flexDirection","createElement","displayName"],"mappings":"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"}
|