@fluentui/react-migration-v0-v9 9.75.2-experimental.css-modules.20261113-ba13c87438.0 → 9.75.2-experimental.css-modules-subpath.20261120-0eb82b7e7e.0
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.md +13 -13
- package/dist/css-modules.d.cts +2 -0
- package/dist/css-modules.d.ts +2 -0
- package/lib/components/Attachment/AttachmentIcon.module.css +2 -2
- package/lib/components/Attachment/AttachmentIcon.styles.js +4 -4
- package/lib/components/Attachment/AttachmentIcon.styles.js.map +1 -1
- package/lib/components/Attachment/AttachmentIcon.styles.raw.js +3 -3
- package/lib/components/Attachment/AttachmentIcon.styles.raw.js.map +1 -1
- package/lib/components/List/List/List.module.css +0 -1
- package/lib/components/List/ListItem/ListItem.module.css +0 -1
- package/lib/css-modules/components/Attachment/Attachment.js +36 -0
- package/lib/css-modules/components/Attachment/Attachment.js.map +1 -0
- package/lib/css-modules/components/Attachment/AttachmentAction.js +44 -0
- package/lib/css-modules/components/Attachment/AttachmentAction.js.map +1 -0
- package/lib/css-modules/components/Attachment/AttachmentBody.js +15 -0
- package/lib/css-modules/components/Attachment/AttachmentBody.js.map +1 -0
- package/lib/css-modules/components/Attachment/AttachmentDescription.js +15 -0
- package/lib/css-modules/components/Attachment/AttachmentDescription.js.map +1 -0
- package/lib/css-modules/components/Attachment/AttachmentHeader.js +15 -0
- package/lib/css-modules/components/Attachment/AttachmentHeader.js.map +1 -0
- package/lib/css-modules/components/Attachment/AttachmentIcon.js +15 -0
- package/lib/css-modules/components/Attachment/AttachmentIcon.js.map +1 -0
- package/lib/css-modules/components/Attachment/index.js +6 -0
- package/lib/css-modules/components/Attachment/index.js.map +1 -0
- package/lib/css-modules/components/Flex/Flex.js +60 -0
- package/lib/css-modules/components/Flex/Flex.js.map +1 -0
- package/lib/css-modules/components/Flex/index.js +3 -0
- package/lib/css-modules/components/Flex/index.js.map +1 -0
- package/lib/css-modules/components/FormField/FormFieldShim.js +42 -0
- package/lib/css-modules/components/FormField/FormFieldShim.js.map +1 -0
- package/lib/css-modules/components/FormField/index.js +1 -0
- package/lib/css-modules/components/FormField/index.js.map +1 -0
- package/lib/css-modules/components/Grid/GridShim.js +30 -0
- package/lib/css-modules/components/Grid/GridShim.js.map +1 -0
- package/lib/css-modules/components/Grid/index.js +3 -0
- package/lib/css-modules/components/Grid/index.js.map +1 -0
- package/lib/css-modules/components/Input/Input.mixins.js +19 -0
- package/lib/css-modules/components/Input/Input.mixins.js.map +1 -0
- package/lib/css-modules/components/Input/index.js +1 -0
- package/lib/css-modules/components/Input/index.js.map +1 -0
- package/lib/css-modules/components/ItemLayout/ItemLayout.js +79 -0
- package/lib/css-modules/components/ItemLayout/ItemLayout.js.map +1 -0
- package/lib/css-modules/components/ItemLayout/index.js +2 -0
- package/lib/css-modules/components/ItemLayout/index.js.map +1 -0
- package/lib/css-modules/components/List/List/List.js +15 -0
- package/lib/css-modules/components/List/List/List.js.map +1 -0
- package/lib/css-modules/components/List/List/index.js +4 -0
- package/lib/css-modules/components/List/List/index.js.map +1 -0
- package/lib/css-modules/components/List/ListItem/ListItem.js +13 -0
- package/lib/css-modules/components/List/ListItem/ListItem.js.map +1 -0
- package/lib/css-modules/components/List/ListItem/index.js +4 -0
- package/lib/css-modules/components/List/ListItem/index.js.map +1 -0
- package/lib/css-modules/components/List/ListItem/renderListItem.js +19 -0
- package/lib/css-modules/components/List/ListItem/renderListItem.js.map +1 -0
- package/lib/css-modules/components/List/index.js +3 -0
- package/lib/css-modules/components/List/index.js.map +1 -0
- package/lib/css-modules/components/Primitive/Primitive.js +16 -0
- package/lib/css-modules/components/Primitive/Primitive.js.map +1 -0
- package/lib/css-modules/components/Primitive/index.js +1 -0
- package/lib/css-modules/components/Primitive/index.js.map +1 -0
- package/lib/css-modules/components/Segment/Segment.js +16 -0
- package/lib/css-modules/components/Segment/Segment.js.map +1 -0
- package/lib/css-modules/components/Segment/index.js +1 -0
- package/lib/css-modules/components/Segment/index.js.map +1 -0
- package/lib/css-modules/components/Spinner/SpinnerMigration.mixins.js +14 -0
- package/lib/css-modules/components/Spinner/SpinnerMigration.mixins.js.map +1 -0
- package/lib/css-modules/components/Spinner/index.js +1 -0
- package/lib/css-modules/components/Spinner/index.js.map +1 -0
- package/lib/css-modules/components/StyledText/StyledText.js +40 -0
- package/lib/css-modules/components/StyledText/StyledText.js.map +1 -0
- package/lib/css-modules/components/StyledText/index.js +2 -0
- package/lib/css-modules/components/StyledText/index.js.map +1 -0
- package/lib/css-modules/components/Video/Video.js +42 -0
- package/lib/css-modules/components/Video/Video.js.map +1 -0
- package/lib/css-modules/components/Video/index.js +1 -0
- package/lib/css-modules/components/Video/index.js.map +1 -0
- package/lib/css-modules/index.js +14 -0
- package/lib/css-modules/index.js.map +1 -0
- package/lib-commonjs/components/Attachment/AttachmentIcon.module.css +2 -2
- package/lib-commonjs/components/Attachment/AttachmentIcon.styles.cjs +6 -6
- package/lib-commonjs/components/Attachment/AttachmentIcon.styles.cjs.map +1 -1
- package/lib-commonjs/components/Attachment/AttachmentIcon.styles.raw.cjs +2 -2
- package/lib-commonjs/components/Attachment/AttachmentIcon.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/List/List/List.module.css +0 -1
- package/lib-commonjs/components/List/ListItem/ListItem.module.css +0 -1
- package/lib-commonjs/css-modules/components/Attachment/Attachment.cjs +61 -0
- package/lib-commonjs/css-modules/components/Attachment/Attachment.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/Attachment/AttachmentAction.cjs +63 -0
- package/lib-commonjs/css-modules/components/Attachment/AttachmentAction.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/Attachment/AttachmentBody.cjs +34 -0
- package/lib-commonjs/css-modules/components/Attachment/AttachmentBody.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/Attachment/AttachmentDescription.cjs +34 -0
- package/lib-commonjs/css-modules/components/Attachment/AttachmentDescription.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/Attachment/AttachmentHeader.cjs +34 -0
- package/lib-commonjs/css-modules/components/Attachment/AttachmentHeader.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/Attachment/AttachmentIcon.cjs +34 -0
- package/lib-commonjs/css-modules/components/Attachment/AttachmentIcon.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/Attachment/index.cjs +60 -0
- package/lib-commonjs/css-modules/components/Attachment/index.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/Flex/Flex.cjs +79 -0
- package/lib-commonjs/css-modules/components/Flex/Flex.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/Flex/index.cjs +27 -0
- package/lib-commonjs/css-modules/components/Flex/index.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/FormField/FormFieldShim.cjs +53 -0
- package/lib-commonjs/css-modules/components/FormField/FormFieldShim.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/FormField/index.cjs +11 -0
- package/lib-commonjs/css-modules/components/FormField/index.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/Grid/GridShim.cjs +49 -0
- package/lib-commonjs/css-modules/components/Grid/GridShim.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/Grid/index.cjs +27 -0
- package/lib-commonjs/css-modules/components/Grid/index.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/Input/Input.mixins.cjs +29 -0
- package/lib-commonjs/css-modules/components/Input/Input.mixins.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/Input/index.cjs +11 -0
- package/lib-commonjs/css-modules/components/Input/index.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/ItemLayout/ItemLayout.cjs +98 -0
- package/lib-commonjs/css-modules/components/ItemLayout/ItemLayout.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/ItemLayout/index.cjs +23 -0
- package/lib-commonjs/css-modules/components/ItemLayout/index.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/List/List/List.cjs +26 -0
- package/lib-commonjs/css-modules/components/List/List/List.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/List/List/index.cjs +31 -0
- package/lib-commonjs/css-modules/components/List/List/index.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/List/ListItem/ListItem.cjs +24 -0
- package/lib-commonjs/css-modules/components/List/ListItem/ListItem.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/List/ListItem/index.cjs +31 -0
- package/lib-commonjs/css-modules/components/List/ListItem/index.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/List/ListItem/renderListItem.cjs +27 -0
- package/lib-commonjs/css-modules/components/List/ListItem/renderListItem.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/List/index.cjs +48 -0
- package/lib-commonjs/css-modules/components/List/index.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/Primitive/Primitive.cjs +35 -0
- package/lib-commonjs/css-modules/components/Primitive/Primitive.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/Primitive/index.cjs +19 -0
- package/lib-commonjs/css-modules/components/Primitive/index.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/Segment/Segment.cjs +35 -0
- package/lib-commonjs/css-modules/components/Segment/Segment.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/Segment/index.cjs +19 -0
- package/lib-commonjs/css-modules/components/Segment/index.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/Spinner/SpinnerMigration.mixins.cjs +24 -0
- package/lib-commonjs/css-modules/components/Spinner/SpinnerMigration.mixins.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/Spinner/index.cjs +11 -0
- package/lib-commonjs/css-modules/components/Spinner/index.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/StyledText/StyledText.cjs +59 -0
- package/lib-commonjs/css-modules/components/StyledText/StyledText.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/StyledText/index.cjs +29 -0
- package/lib-commonjs/css-modules/components/StyledText/index.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/Video/Video.cjs +61 -0
- package/lib-commonjs/css-modules/components/Video/Video.cjs.map +1 -0
- package/lib-commonjs/css-modules/components/Video/index.cjs +19 -0
- package/lib-commonjs/css-modules/components/Video/index.cjs.map +1 -0
- package/lib-commonjs/css-modules/index.cjs +182 -0
- package/lib-commonjs/css-modules/index.cjs.map +1 -0
- package/package.json +19 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-migration-v0-v9
|
|
2
2
|
|
|
3
|
-
<!-- This log was last generated on Fri,
|
|
3
|
+
<!-- This log was last generated on Fri, 20 Nov 2026 10:33:50 GMT and should not be manually modified. -->
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## [9.75.2-experimental.css-modules.
|
|
7
|
+
## [9.75.2-experimental.css-modules-subpath.20261120-0eb82b7e7e.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-migration-v0-v9_v9.75.2-experimental.css-modules-subpath.20261120-0eb82b7e7e.0)
|
|
8
8
|
|
|
9
|
-
Fri,
|
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-migration-v0-v9_v9.6.43..@fluentui/react-migration-v0-v9_v9.75.2-experimental.css-modules.
|
|
9
|
+
Fri, 20 Nov 2026 10:33:50 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-migration-v0-v9_v9.6.43..@fluentui/react-migration-v0-v9_v9.75.2-experimental.css-modules-subpath.20261120-0eb82b7e7e.0)
|
|
11
11
|
|
|
12
12
|
### Changes
|
|
13
13
|
|
|
14
|
-
- Release 9.75.2-experimental.css-modules.
|
|
15
|
-
- Bump @fluentui/react-aria to v9.75.2-experimental.css-modules.
|
|
16
|
-
- Bump @fluentui/react-components to v9.75.2-experimental.css-modules.
|
|
17
|
-
- Bump @fluentui/react-context-selector to v9.75.2-experimental.css-modules.
|
|
18
|
-
- Bump @fluentui/react-jsx-runtime to v9.75.2-experimental.css-modules.
|
|
19
|
-
- Bump @fluentui/react-shared-contexts to v9.75.2-experimental.css-modules.
|
|
20
|
-
- Bump @fluentui/react-tabster to v9.75.2-experimental.css-modules.
|
|
21
|
-
- Bump @fluentui/react-theme to v9.75.2-experimental.css-modules.
|
|
22
|
-
- Bump @fluentui/react-utilities to v9.75.2-experimental.css-modules.
|
|
14
|
+
- Release 9.75.2-experimental.css-modules-subpath.20261120-0eb82b7e7e ([commit](https://github.com/microsoft/fluentui/commit/undefined) by 257645319+office-ogx-auth-helper[bot]@users.noreply.github.com)
|
|
15
|
+
- Bump @fluentui/react-aria to v9.75.2-experimental.css-modules-subpath.20261120-0eb82b7e7e.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
16
|
+
- Bump @fluentui/react-components to v9.75.2-experimental.css-modules-subpath.20261120-0eb82b7e7e.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
17
|
+
- Bump @fluentui/react-context-selector to v9.75.2-experimental.css-modules-subpath.20261120-0eb82b7e7e.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
18
|
+
- Bump @fluentui/react-jsx-runtime to v9.75.2-experimental.css-modules-subpath.20261120-0eb82b7e7e.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
19
|
+
- Bump @fluentui/react-shared-contexts to v9.75.2-experimental.css-modules-subpath.20261120-0eb82b7e7e.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
20
|
+
- Bump @fluentui/react-tabster to v9.75.2-experimental.css-modules-subpath.20261120-0eb82b7e7e.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
21
|
+
- Bump @fluentui/react-theme to v9.75.2-experimental.css-modules-subpath.20261120-0eb82b7e7e.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
22
|
+
- Bump @fluentui/react-utilities to v9.75.2-experimental.css-modules-subpath.20261120-0eb82b7e7e.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
23
23
|
|
|
24
24
|
## [9.6.43](https://github.com/microsoft/fluentui/tree/@fluentui/react-migration-v0-v9_v9.6.43)
|
|
25
25
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.root {
|
|
2
2
|
height: 32px;
|
|
3
3
|
width: 32px;
|
|
4
|
-
margin-inline-end:
|
|
4
|
+
margin-inline-end: var(--spacingHorizontalM);
|
|
5
5
|
display: inline-flex;
|
|
6
6
|
align-items: center;
|
|
7
7
|
justify-content: center;
|
|
@@ -16,5 +16,5 @@
|
|
|
16
16
|
height: 100%;
|
|
17
17
|
width: 100%;
|
|
18
18
|
/* stylelint-disable-next-line declaration-no-important -- mirrors the Griffel source, which forces the icon font size */
|
|
19
|
-
font-size:
|
|
19
|
+
font-size: var(--fontSizeHero800) !important;
|
|
20
20
|
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { __styles } from "@fluentui/react-components";
|
|
3
|
+
import { __styles, tokens } from "@fluentui/react-components";
|
|
4
4
|
const iconSize = '32px';
|
|
5
5
|
export const useAttachmentIconStyles = /*#__PURE__*/__styles({
|
|
6
6
|
root: {
|
|
7
7
|
Bqenvij: "f1d2rq10",
|
|
8
8
|
a9b677: "f1szoe96",
|
|
9
|
-
t21cq0: ["
|
|
9
|
+
t21cq0: ["fkujibs", "f199hnxi"],
|
|
10
10
|
mc9l5x: "ftuwxu6",
|
|
11
11
|
Bt984gj: "f122n59",
|
|
12
12
|
Brf1p80: "f4d9j23",
|
|
13
13
|
r2e3yl: "fqaw56w",
|
|
14
14
|
Bt7ks8d: "fjizfa5",
|
|
15
|
-
Bdewejq: "
|
|
15
|
+
Bdewejq: "fgmsalq"
|
|
16
16
|
}
|
|
17
17
|
}, {
|
|
18
|
-
d: [".f1d2rq10{height:32px;}", ".f1szoe96{width:32px;}", ".
|
|
18
|
+
d: [".f1d2rq10{height:32px;}", ".f1szoe96{width:32px;}", ".fkujibs{margin-right:var(--spacingHorizontalM);}", ".f199hnxi{margin-left:var(--spacingHorizontalM);}", ".ftuwxu6{display:inline-flex;}", ".f122n59{align-items:center;}", ".f4d9j23{justify-content:center;}", ".fqaw56w svg,.fqaw56w .fui-Icon-font{height:100%;}", ".fjizfa5 svg,.fjizfa5 .fui-Icon-font{width:100%;}", ".fgmsalq .fui-Icon-font{font-size:var(--fontSizeHero800)!important;}"]
|
|
19
19
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__styles","iconSize","useAttachmentIconStyles","root","Bqenvij","a9b677","t21cq0","mc9l5x","Bt984gj","Brf1p80","r2e3yl","Bt7ks8d","Bdewejq","d"],"sources":["AttachmentIcon.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles } from \"@fluentui/react-components\";\nconst iconSize = '32px';\nexport const useAttachmentIconStyles = makeStyles({\n root: {\n height: iconSize,\n width: iconSize,\n marginRight:
|
|
1
|
+
{"version":3,"names":["__styles","tokens","iconSize","useAttachmentIconStyles","root","Bqenvij","a9b677","t21cq0","mc9l5x","Bt984gj","Brf1p80","r2e3yl","Bt7ks8d","Bdewejq","d"],"sources":["AttachmentIcon.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, tokens } from \"@fluentui/react-components\";\nconst iconSize = '32px';\nexport const useAttachmentIconStyles = makeStyles({\n root: {\n height: iconSize,\n width: iconSize,\n marginRight: tokens.spacingHorizontalM,\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n '& svg, & .fui-Icon-font': {\n height: '100%',\n width: '100%'\n },\n '& .fui-Icon-font': {\n fontSize: `${tokens.fontSizeHero800} !important`\n }\n }\n});\n"],"mappings":"AAAA,YAAY;;AACZ,SAAAA,QAAA,EAAqBC,MAAM,QAAQ,4BAA4B;AAC/D,MAAMC,QAAQ,GAAG,MAAM;AACvB,OAAO,MAAMC,uBAAuB,gBAAGH,QAAA;EAAAI,IAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,CAgBtC,CAAC","ignoreList":[]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { makeStyles } from "@fluentui/react-components";
|
|
2
|
+
import { makeStyles, tokens } from "@fluentui/react-components";
|
|
3
3
|
const iconSize = '32px';
|
|
4
4
|
export const useAttachmentIconStyles = makeStyles({
|
|
5
5
|
root: {
|
|
6
6
|
height: iconSize,
|
|
7
7
|
width: iconSize,
|
|
8
|
-
marginRight:
|
|
8
|
+
marginRight: tokens.spacingHorizontalM,
|
|
9
9
|
display: 'inline-flex',
|
|
10
10
|
alignItems: 'center',
|
|
11
11
|
justifyContent: 'center',
|
|
@@ -14,7 +14,7 @@ export const useAttachmentIconStyles = makeStyles({
|
|
|
14
14
|
width: '100%'
|
|
15
15
|
},
|
|
16
16
|
'& .fui-Icon-font': {
|
|
17
|
-
fontSize: `${
|
|
17
|
+
fontSize: `${tokens.fontSizeHero800} !important`
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Attachment/AttachmentIcon.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles } from '@fluentui/react-components';\n\nconst iconSize = '32px';\n\nexport const useAttachmentIconStyles = makeStyles({\n root: {\n height: iconSize,\n width: iconSize,\n marginRight:
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Attachment/AttachmentIcon.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, tokens } from '@fluentui/react-components';\n\nconst iconSize = '32px';\n\nexport const useAttachmentIconStyles = makeStyles({\n root: {\n height: iconSize,\n width: iconSize,\n marginRight: tokens.spacingHorizontalM,\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n '& svg, & .fui-Icon-font': {\n height: '100%',\n width: '100%',\n },\n '& .fui-Icon-font': {\n fontSize: `${tokens.fontSizeHero800} !important`,\n },\n },\n});\n"],"names":["makeStyles","tokens","iconSize","useAttachmentIconStyles","root","height","width","marginRight","spacingHorizontalM","display","alignItems","justifyContent","fontSize","fontSizeHero800"],"mappings":"AAAA;AAEA,SAASA,UAAU,EAAEC,MAAM,QAAQ,6BAA6B;AAEhE,MAAMC,WAAW;AAEjB,OAAO,MAAMC,0BAA0BH,WAAW;IAChDI,MAAM;QACJC,QAAQH;QACRI,OAAOJ;QACPK,aAAaN,OAAOO,kBAAkB;QACtCC,SAAS;QACTC,YAAY;QACZC,gBAAgB;QAChB,2BAA2B;YACzBN,QAAQ;YACRC,OAAO;QACT;QACA,oBAAoB;YAClBM,UAAU,GAAGX,OAAOY,eAAe,CAAC,WAAW,CAAC;QAClD;IACF;AACF,GAAG"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { mergeClasses } from "@fluentui/react-components/css-modules";
|
|
3
|
+
import { useARIAButtonProps } from "@fluentui/react-aria";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { useAttachmentBaseStyles, useAttachmentStyles } from "../../../components/Attachment/Attachment.styles.css.js";
|
|
6
|
+
export const attachmentClassName = 'fui-Attachment';
|
|
7
|
+
export const attachmentProgressContainerClassName = `${attachmentClassName}__progress-container`;
|
|
8
|
+
export const attachmentProgressBarClassName = `${attachmentClassName}__progress`;
|
|
9
|
+
export const Attachment = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
10
|
+
const { actionable, className, children, disabled, onClick, progress, onKeyDown, onKeyUp, ...rest } = props;
|
|
11
|
+
const attachmentBaseClass = useAttachmentBaseStyles();
|
|
12
|
+
const classes = useAttachmentStyles();
|
|
13
|
+
const buttonProps = useARIAButtonProps('div', {
|
|
14
|
+
disabled,
|
|
15
|
+
onClick,
|
|
16
|
+
onKeyDown: onKeyDown,
|
|
17
|
+
onKeyUp: onKeyUp
|
|
18
|
+
});
|
|
19
|
+
return /*#__PURE__*/ React.createElement("div", {
|
|
20
|
+
ref: ref,
|
|
21
|
+
className: mergeClasses(attachmentClassName, attachmentBaseClass, actionable && classes.actionable, className),
|
|
22
|
+
...actionable && {
|
|
23
|
+
'data-is-focusable': true,
|
|
24
|
+
...buttonProps
|
|
25
|
+
},
|
|
26
|
+
...rest
|
|
27
|
+
}, children, !isNaN(Number(progress)) && /*#__PURE__*/ React.createElement("div", {
|
|
28
|
+
className: mergeClasses(attachmentProgressContainerClassName, classes.progressContainer)
|
|
29
|
+
}, /*#__PURE__*/ React.createElement("div", {
|
|
30
|
+
className: mergeClasses(classes.progressBar, attachmentProgressBarClassName),
|
|
31
|
+
style: {
|
|
32
|
+
width: `${progress}%`
|
|
33
|
+
}
|
|
34
|
+
})));
|
|
35
|
+
});
|
|
36
|
+
Attachment.displayName = 'Attachment';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Attachment/Attachment.tsx"],"sourcesContent":["'use client';\n\nimport { mergeClasses } from '@fluentui/react-components';\nimport { useARIAButtonProps } from '@fluentui/react-aria';\nimport * as React from 'react';\n\nimport { useAttachmentBaseStyles, useAttachmentStyles } from './Attachment.styles';\n\nexport const attachmentClassName = 'fui-Attachment';\nexport const attachmentProgressContainerClassName = `${attachmentClassName}__progress-container`;\nexport const attachmentProgressBarClassName = `${attachmentClassName}__progress`;\n\nexport interface AttachmentProps extends React.HTMLAttributes<HTMLElement> {\n actionable?: boolean;\n disabled?: boolean;\n progress?: string | number;\n onClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;\n}\n\nexport const Attachment = React.forwardRef<HTMLDivElement, AttachmentProps>((props, ref) => {\n const { actionable, className, children, disabled, onClick, progress, onKeyDown, onKeyUp, ...rest } = props;\n const attachmentBaseClass = useAttachmentBaseStyles();\n const classes = useAttachmentStyles();\n\n const buttonProps = useARIAButtonProps('div', {\n disabled,\n onClick,\n onKeyDown: onKeyDown as React.KeyboardEventHandler<HTMLLIElement & HTMLDivElement>,\n onKeyUp: onKeyUp as React.KeyboardEventHandler<HTMLLIElement & HTMLDivElement>,\n });\n\n return (\n <div\n ref={ref}\n className={mergeClasses(attachmentClassName, attachmentBaseClass, actionable && classes.actionable, className)}\n {...(actionable && {\n 'data-is-focusable': true,\n ...buttonProps,\n })}\n {...rest}\n >\n {children}\n {!isNaN(Number(progress)) && (\n <div className={mergeClasses(attachmentProgressContainerClassName, classes.progressContainer)}>\n <div\n className={mergeClasses(classes.progressBar, attachmentProgressBarClassName)}\n style={{ width: `${progress}%` }}\n />\n </div>\n )}\n </div>\n );\n});\n\nAttachment.displayName = 'Attachment';\n"],"names":["mergeClasses","useARIAButtonProps","React","useAttachmentBaseStyles","useAttachmentStyles","attachmentClassName","attachmentProgressContainerClassName","attachmentProgressBarClassName","Attachment","forwardRef","props","ref","actionable","className","children","disabled","onClick","progress","onKeyDown","onKeyUp","rest","attachmentBaseClass","classes","buttonProps","div","isNaN","Number","progressContainer","progressBar","style","width","displayName"],"mappings":"AAAA;AAEA,SAASA,YAAY,QAAQ,6BAA6B;AAC1D,SAASC,kBAAkB,QAAQ,uBAAuB;AAC1D,YAAYC,WAAW,QAAQ;AAE/B,SAASC,uBAAuB,EAAEC,mBAAmB,QAAQ,yBAAsB;AAEnF,OAAO,MAAMC,sBAAsB,iBAAiB;AACpD,OAAO,MAAMC,uCAAuC,GAAGD,oBAAoB,oBAAoB,CAAC,CAAC;AACjG,OAAO,MAAME,iCAAiC,GAAGF,oBAAoB,UAAU,CAAC,CAAC;AASjF,OAAO,MAAMG,2BAAaN,MAAMO,UAAU,CAAkC,CAACC,OAAOC;IAClF,MAAM,EAAEC,UAAU,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,OAAO,EAAE,GAAGC,MAAM,GAAGV;IACtG,MAAMW,sBAAsBlB;IAC5B,MAAMmB,UAAUlB;IAEhB,MAAMmB,cAActB,mBAAmB,OAAO;QAC5Cc;QACAC;QACAE,WAAWA;QACXC,SAASA;IACX;IAEA,qBACE,oBAACK;QACCb,KAAKA;QACLE,WAAWb,aAAaK,qBAAqBgB,qBAAqBT,cAAcU,QAAQV,UAAU,EAAEC;QACnG,GAAID,cAAc;YACjB,qBAAqB;YACrB,GAAGW,WAAW;QAChB,CAAC;QACA,GAAGH,IAAI;OAEPN,UACA,CAACW,MAAMC,OAAOT,4BACb,oBAACO;QAAIX,WAAWb,aAAaM,sCAAsCgB,QAAQK,iBAAiB;qBAC1F,oBAACH;QACCX,WAAWb,aAAasB,QAAQM,WAAW,EAAErB;QAC7CsB,OAAO;YAAEC,OAAO,GAAGb,SAAS,CAAC,CAAC;QAAC;;AAM3C,GAAG;AAEHT,WAAWuB,WAAW,GAAG"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { Button, mergeClasses } from "@fluentui/react-components/css-modules";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { useAttachmentActionStyles } from "../../../components/Attachment/AttachmentAction.styles.css.js";
|
|
5
|
+
export const attachmentActionClassName = 'fui-AttachmentAction';
|
|
6
|
+
export const AttachmentAction = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
7
|
+
const { className, disabled, disabledFocusable, children, onClick, onKeyUp, onKeyDown, ...rest } = props;
|
|
8
|
+
const classes = useAttachmentActionStyles();
|
|
9
|
+
const handleClick = React.useCallback((e)=>{
|
|
10
|
+
e.stopPropagation();
|
|
11
|
+
e.preventDefault();
|
|
12
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
13
|
+
}, [
|
|
14
|
+
onClick
|
|
15
|
+
]);
|
|
16
|
+
const handleKeyUp = React.useCallback((e)=>{
|
|
17
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
18
|
+
e.stopPropagation();
|
|
19
|
+
}
|
|
20
|
+
onKeyUp === null || onKeyUp === void 0 ? void 0 : onKeyUp(e);
|
|
21
|
+
}, [
|
|
22
|
+
onKeyUp
|
|
23
|
+
]);
|
|
24
|
+
const handleKeyDown = React.useCallback((e)=>{
|
|
25
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
26
|
+
e.stopPropagation();
|
|
27
|
+
}
|
|
28
|
+
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e);
|
|
29
|
+
}, [
|
|
30
|
+
onKeyDown
|
|
31
|
+
]);
|
|
32
|
+
return /*#__PURE__*/ React.createElement(Button, {
|
|
33
|
+
ref: ref,
|
|
34
|
+
className: mergeClasses(attachmentActionClassName, classes.root, (disabled || disabledFocusable) && classes.disabled, className),
|
|
35
|
+
appearance: "transparent",
|
|
36
|
+
disabled: disabled,
|
|
37
|
+
disabledFocusable: disabledFocusable,
|
|
38
|
+
onClick: handleClick,
|
|
39
|
+
onKeyDown: handleKeyDown,
|
|
40
|
+
onKeyUp: handleKeyUp,
|
|
41
|
+
...rest
|
|
42
|
+
}, children);
|
|
43
|
+
});
|
|
44
|
+
AttachmentAction.displayName = 'AttachmentAction';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Attachment/AttachmentAction.tsx"],"sourcesContent":["'use client';\n\nimport type { ButtonProps } from '@fluentui/react-components';\nimport { Button, mergeClasses } from '@fluentui/react-components';\nimport * as React from 'react';\nimport { useAttachmentActionStyles } from './AttachmentAction.styles';\n\nexport type AttachmentActionProps = ButtonProps;\n\nexport const attachmentActionClassName = 'fui-AttachmentAction';\n\nexport const AttachmentAction = React.forwardRef<HTMLButtonElement, AttachmentActionProps>((props, ref) => {\n const { className, disabled, disabledFocusable, children, onClick, onKeyUp, onKeyDown, ...rest } = props;\n const classes = useAttachmentActionStyles();\n\n const handleClick = React.useCallback<React.MouseEventHandler<HTMLButtonElement & HTMLAnchorElement>>(\n e => {\n e.stopPropagation();\n e.preventDefault();\n onClick?.(e);\n },\n [onClick],\n );\n\n const handleKeyUp = React.useCallback<React.KeyboardEventHandler<HTMLAnchorElement & HTMLButtonElement>>(\n e => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.stopPropagation();\n }\n onKeyUp?.(e);\n },\n [onKeyUp],\n );\n\n const handleKeyDown = React.useCallback<React.KeyboardEventHandler<HTMLButtonElement & HTMLAnchorElement>>(\n e => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.stopPropagation();\n }\n onKeyDown?.(e);\n },\n [onKeyDown],\n );\n\n return (\n <Button\n ref={ref}\n className={mergeClasses(\n attachmentActionClassName,\n classes.root,\n (disabled || disabledFocusable) && classes.disabled,\n className,\n )}\n appearance=\"transparent\"\n disabled={disabled}\n disabledFocusable={disabledFocusable}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n onKeyUp={handleKeyUp}\n {...rest}\n >\n {children}\n </Button>\n );\n});\n\nAttachmentAction.displayName = 'AttachmentAction';\n"],"names":["Button","mergeClasses","React","useAttachmentActionStyles","attachmentActionClassName","AttachmentAction","forwardRef","props","ref","className","disabled","disabledFocusable","children","onClick","onKeyUp","onKeyDown","rest","classes","handleClick","useCallback","e","stopPropagation","preventDefault","handleKeyUp","key","handleKeyDown","root","appearance","displayName"],"mappings":"AAAA;AAGA,SAASA,MAAM,EAAEC,YAAY,QAAQ,6BAA6B;AAClE,YAAYC,WAAW,QAAQ;AAC/B,SAASC,yBAAyB,QAAQ,+BAA4B;AAItE,OAAO,MAAMC,4BAA4B,uBAAuB;AAEhE,OAAO,MAAMC,iCAAmBH,MAAMI,UAAU,CAA2C,CAACC,OAAOC;IACjG,MAAM,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,iBAAiB,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,OAAO,EAAEC,SAAS,EAAE,GAAGC,MAAM,GAAGT;IACnG,MAAMU,UAAUd;IAEhB,MAAMe,cAAchB,MAAMiB,WAAW,CACnCC,CAAAA;QACEA,EAAEC,eAAe;QACjBD,EAAEE,cAAc;QAChBT,oBAAAA,8BAAAA,QAAUO;IACZ,GACA;QAACP;KAAQ;IAGX,MAAMU,cAAcrB,MAAMiB,WAAW,CACnCC,CAAAA;QACE,IAAIA,EAAEI,GAAG,KAAK,WAAWJ,EAAEI,GAAG,KAAK,KAAK;YACtCJ,EAAEC,eAAe;QACnB;QACAP,oBAAAA,8BAAAA,QAAUM;IACZ,GACA;QAACN;KAAQ;IAGX,MAAMW,gBAAgBvB,MAAMiB,WAAW,CACrCC,CAAAA;QACE,IAAIA,EAAEI,GAAG,KAAK,WAAWJ,EAAEI,GAAG,KAAK,KAAK;YACtCJ,EAAEC,eAAe;QACnB;QACAN,sBAAAA,gCAAAA,UAAYK;IACd,GACA;QAACL;KAAU;IAGb,qBACE,oBAACf;QACCQ,KAAKA;QACLC,WAAWR,aACTG,2BACAa,QAAQS,IAAI,EACZ,AAAChB,CAAAA,YAAYC,iBAAgB,KAAMM,QAAQP,QAAQ,EACnDD;QAEFkB,YAAW;QACXjB,UAAUA;QACVC,mBAAmBA;QACnBE,SAASK;QACTH,WAAWU;QACXX,SAASS;QACR,GAAGP,IAAI;OAEPJ;AAGP,GAAG;AAEHP,iBAAiBuB,WAAW,GAAG"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { mergeClasses } from "@fluentui/react-components/css-modules";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { useAttachmentBodyStyles } from "../../../components/Attachment/AttachmentBody.styles.css.js";
|
|
5
|
+
export const attachmentBodyClassName = 'fui-AttachmentBody';
|
|
6
|
+
export const AttachmentBody = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
7
|
+
const { className, children, ...rest } = props;
|
|
8
|
+
const classes = useAttachmentBodyStyles();
|
|
9
|
+
return /*#__PURE__*/ React.createElement("div", {
|
|
10
|
+
ref: ref,
|
|
11
|
+
className: mergeClasses(attachmentBodyClassName, classes.root, className),
|
|
12
|
+
...rest
|
|
13
|
+
}, children);
|
|
14
|
+
});
|
|
15
|
+
AttachmentBody.displayName = 'AttachmentBody';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Attachment/AttachmentBody.tsx"],"sourcesContent":["'use client';\n\nimport { mergeClasses } from '@fluentui/react-components';\nimport * as React from 'react';\nimport { useAttachmentBodyStyles } from './AttachmentBody.styles';\n\nexport interface AttachmentBodyProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nexport const attachmentBodyClassName = 'fui-AttachmentBody';\n\nexport const AttachmentBody: React.FC<AttachmentBodyProps> = React.forwardRef<HTMLDivElement, AttachmentBodyProps>(\n (props, ref) => {\n const { className, children, ...rest } = props;\n const classes = useAttachmentBodyStyles();\n\n return (\n <div ref={ref} className={mergeClasses(attachmentBodyClassName, classes.root, className)} {...rest}>\n {children}\n </div>\n );\n },\n);\n\nAttachmentBody.displayName = 'AttachmentBody';\n"],"names":["mergeClasses","React","useAttachmentBodyStyles","attachmentBodyClassName","AttachmentBody","forwardRef","props","ref","className","children","rest","classes","div","root","displayName"],"mappings":"AAAA;AAEA,SAASA,YAAY,QAAQ,6BAA6B;AAC1D,YAAYC,WAAW,QAAQ;AAC/B,SAASC,uBAAuB,QAAQ,6BAA0B;AAIlE,OAAO,MAAMC,0BAA0B,qBAAqB;AAE5D,OAAO,MAAMC,+BAAgDH,MAAMI,UAAU,CAC3E,CAACC,OAAOC;IACN,MAAM,EAAEC,SAAS,EAAEC,QAAQ,EAAE,GAAGC,MAAM,GAAGJ;IACzC,MAAMK,UAAUT;IAEhB,qBACE,oBAACU;QAAIL,KAAKA;QAAKC,WAAWR,aAAaG,yBAAyBQ,QAAQE,IAAI,EAAEL;QAAa,GAAGE,IAAI;OAC/FD;AAGP,GACA;AAEFL,eAAeU,WAAW,GAAG"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { mergeClasses } from "@fluentui/react-components/css-modules";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { useAttachmentDescriptionStyles } from "../../../components/Attachment/AttachmentDescription.styles.css.js";
|
|
5
|
+
export const attachmentDescriptionClassName = 'fui-AttachmentDescription';
|
|
6
|
+
export const AttachmentDescription = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
7
|
+
const { className, children, ...rest } = props;
|
|
8
|
+
const classes = useAttachmentDescriptionStyles();
|
|
9
|
+
return /*#__PURE__*/ React.createElement("span", {
|
|
10
|
+
ref: ref,
|
|
11
|
+
className: mergeClasses(attachmentDescriptionClassName, classes.root, className),
|
|
12
|
+
...rest
|
|
13
|
+
}, children);
|
|
14
|
+
});
|
|
15
|
+
AttachmentDescription.displayName = 'AttachmentDescription';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Attachment/AttachmentDescription.tsx"],"sourcesContent":["'use client';\n\nimport { mergeClasses } from '@fluentui/react-components';\nimport * as React from 'react';\nimport { useAttachmentDescriptionStyles } from './AttachmentDescription.styles';\n\nexport interface AttachmentDescriptionProps extends React.HTMLAttributes<HTMLSpanElement> {}\n\nexport const attachmentDescriptionClassName = 'fui-AttachmentDescription';\n\nexport const AttachmentDescription: React.FC<AttachmentDescriptionProps> = React.forwardRef<\n HTMLSpanElement,\n AttachmentDescriptionProps\n>((props, ref) => {\n const { className, children, ...rest } = props;\n const classes = useAttachmentDescriptionStyles();\n\n return (\n <span ref={ref} className={mergeClasses(attachmentDescriptionClassName, classes.root, className)} {...rest}>\n {children}\n </span>\n );\n});\n\nAttachmentDescription.displayName = 'AttachmentDescription';\n"],"names":["mergeClasses","React","useAttachmentDescriptionStyles","attachmentDescriptionClassName","AttachmentDescription","forwardRef","props","ref","className","children","rest","classes","span","root","displayName"],"mappings":"AAAA;AAEA,SAASA,YAAY,QAAQ,6BAA6B;AAC1D,YAAYC,WAAW,QAAQ;AAC/B,SAASC,8BAA8B,QAAQ,oCAAiC;AAIhF,OAAO,MAAMC,iCAAiC,4BAA4B;AAE1E,OAAO,MAAMC,sCAA8DH,MAAMI,UAAU,CAGzF,CAACC,OAAOC;IACR,MAAM,EAAEC,SAAS,EAAEC,QAAQ,EAAE,GAAGC,MAAM,GAAGJ;IACzC,MAAMK,UAAUT;IAEhB,qBACE,oBAACU;QAAKL,KAAKA;QAAKC,WAAWR,aAAaG,gCAAgCQ,QAAQE,IAAI,EAAEL;QAAa,GAAGE,IAAI;OACvGD;AAGP,GAAG;AAEHL,sBAAsBU,WAAW,GAAG"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { mergeClasses } from "@fluentui/react-components/css-modules";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { useAttachmentHeaderStyles } from "../../../components/Attachment/AttachmentHeader.styles.css.js";
|
|
5
|
+
export const attachmentHeaderClassName = 'fui-AttachmentHeader';
|
|
6
|
+
export const AttachmentHeader = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
7
|
+
const { className, children, ...rest } = props;
|
|
8
|
+
const classes = useAttachmentHeaderStyles();
|
|
9
|
+
return /*#__PURE__*/ React.createElement("span", {
|
|
10
|
+
ref: ref,
|
|
11
|
+
className: mergeClasses(attachmentHeaderClassName, classes.root, className),
|
|
12
|
+
...rest
|
|
13
|
+
}, children);
|
|
14
|
+
});
|
|
15
|
+
AttachmentHeader.displayName = 'AttachmentHeader';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Attachment/AttachmentHeader.tsx"],"sourcesContent":["'use client';\n\nimport { mergeClasses } from '@fluentui/react-components';\nimport * as React from 'react';\nimport { useAttachmentHeaderStyles } from './AttachmentHeader.styles';\n\nexport interface AttachmentHeaderProps extends React.HTMLAttributes<HTMLSpanElement> {}\n\nexport const attachmentHeaderClassName = 'fui-AttachmentHeader';\n\nexport const AttachmentHeader: React.FC<AttachmentHeaderProps> = React.forwardRef<\n HTMLSpanElement,\n AttachmentHeaderProps\n>((props, ref) => {\n const { className, children, ...rest } = props;\n const classes = useAttachmentHeaderStyles();\n\n return (\n <span ref={ref} className={mergeClasses(attachmentHeaderClassName, classes.root, className)} {...rest}>\n {children}\n </span>\n );\n});\n\nAttachmentHeader.displayName = 'AttachmentHeader';\n"],"names":["mergeClasses","React","useAttachmentHeaderStyles","attachmentHeaderClassName","AttachmentHeader","forwardRef","props","ref","className","children","rest","classes","span","root","displayName"],"mappings":"AAAA;AAEA,SAASA,YAAY,QAAQ,6BAA6B;AAC1D,YAAYC,WAAW,QAAQ;AAC/B,SAASC,yBAAyB,QAAQ,+BAA4B;AAItE,OAAO,MAAMC,4BAA4B,uBAAuB;AAEhE,OAAO,MAAMC,iCAAoDH,MAAMI,UAAU,CAG/E,CAACC,OAAOC;IACR,MAAM,EAAEC,SAAS,EAAEC,QAAQ,EAAE,GAAGC,MAAM,GAAGJ;IACzC,MAAMK,UAAUT;IAEhB,qBACE,oBAACU;QAAKL,KAAKA;QAAKC,WAAWR,aAAaG,2BAA2BQ,QAAQE,IAAI,EAAEL;QAAa,GAAGE,IAAI;OAClGD;AAGP,GAAG;AAEHL,iBAAiBU,WAAW,GAAG"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { mergeClasses } from "@fluentui/react-components/css-modules";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { useAttachmentIconStyles } from "../../../components/Attachment/AttachmentIcon.styles.css.js";
|
|
5
|
+
export const attachmentIconClassName = 'fui-AttachmentIcon';
|
|
6
|
+
export const AttachmentIcon = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
7
|
+
const { className, children, ...rest } = props;
|
|
8
|
+
const classes = useAttachmentIconStyles();
|
|
9
|
+
return /*#__PURE__*/ React.createElement("span", {
|
|
10
|
+
ref: ref,
|
|
11
|
+
className: mergeClasses(attachmentIconClassName, classes.root, className),
|
|
12
|
+
...rest
|
|
13
|
+
}, children);
|
|
14
|
+
});
|
|
15
|
+
AttachmentIcon.displayName = 'AttachmentIcon';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Attachment/AttachmentIcon.tsx"],"sourcesContent":["'use client';\n\nimport { mergeClasses } from '@fluentui/react-components';\nimport * as React from 'react';\nimport { useAttachmentIconStyles } from './AttachmentIcon.styles';\n\nexport interface AttachmentIconProps extends React.HTMLAttributes<HTMLSpanElement> {}\n\nexport const attachmentIconClassName = 'fui-AttachmentIcon';\n\nexport const AttachmentIcon: React.FC<AttachmentIconProps> = React.forwardRef<HTMLSpanElement, AttachmentIconProps>(\n (props, ref) => {\n const { className, children, ...rest } = props;\n const classes = useAttachmentIconStyles();\n\n return (\n <span ref={ref} className={mergeClasses(attachmentIconClassName, classes.root, className)} {...rest}>\n {children}\n </span>\n );\n },\n);\n\nAttachmentIcon.displayName = 'AttachmentIcon';\n"],"names":["mergeClasses","React","useAttachmentIconStyles","attachmentIconClassName","AttachmentIcon","forwardRef","props","ref","className","children","rest","classes","span","root","displayName"],"mappings":"AAAA;AAEA,SAASA,YAAY,QAAQ,6BAA6B;AAC1D,YAAYC,WAAW,QAAQ;AAC/B,SAASC,uBAAuB,QAAQ,6BAA0B;AAIlE,OAAO,MAAMC,0BAA0B,qBAAqB;AAE5D,OAAO,MAAMC,+BAAgDH,MAAMI,UAAU,CAC3E,CAACC,OAAOC;IACN,MAAM,EAAEC,SAAS,EAAEC,QAAQ,EAAE,GAAGC,MAAM,GAAGJ;IACzC,MAAMK,UAAUT;IAEhB,qBACE,oBAACU;QAAKL,KAAKA;QAAKC,WAAWR,aAAaG,yBAAyBQ,QAAQE,IAAI,EAAEL;QAAa,GAAGE,IAAI;OAChGD;AAGP,GACA;AAEFL,eAAeU,WAAW,GAAG"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { Attachment, attachmentClassName, attachmentProgressBarClassName, attachmentProgressContainerClassName } from "./Attachment.js";
|
|
2
|
+
export { AttachmentAction, attachmentActionClassName } from "./AttachmentAction.js";
|
|
3
|
+
export { AttachmentBody, attachmentBodyClassName } from "./AttachmentBody.js";
|
|
4
|
+
export { AttachmentDescription, attachmentDescriptionClassName } from "./AttachmentDescription.js";
|
|
5
|
+
export { AttachmentHeader, attachmentHeaderClassName } from "./AttachmentHeader.js";
|
|
6
|
+
export { AttachmentIcon, attachmentIconClassName } from "./AttachmentIcon.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Attachment/index.ts"],"sourcesContent":["export type { AttachmentProps } from './Attachment';\nexport {\n Attachment,\n attachmentClassName,\n attachmentProgressBarClassName,\n attachmentProgressContainerClassName,\n} from './Attachment';\nexport type { AttachmentActionProps } from './AttachmentAction';\nexport { AttachmentAction, attachmentActionClassName } from './AttachmentAction';\nexport type { AttachmentBodyProps } from './AttachmentBody';\nexport { AttachmentBody, attachmentBodyClassName } from './AttachmentBody';\nexport type { AttachmentDescriptionProps } from './AttachmentDescription';\nexport { AttachmentDescription, attachmentDescriptionClassName } from './AttachmentDescription';\nexport type { AttachmentHeaderProps } from './AttachmentHeader';\nexport { AttachmentHeader, attachmentHeaderClassName } from './AttachmentHeader';\nexport type { AttachmentIconProps } from './AttachmentIcon';\nexport { AttachmentIcon, attachmentIconClassName } from './AttachmentIcon';\n"],"names":["Attachment","attachmentClassName","attachmentProgressBarClassName","attachmentProgressContainerClassName","AttachmentAction","attachmentActionClassName","AttachmentBody","attachmentBodyClassName","AttachmentDescription","attachmentDescriptionClassName","AttachmentHeader","attachmentHeaderClassName","AttachmentIcon","attachmentIconClassName"],"mappings":"AACA,SACEA,UAAU,EACVC,mBAAmB,EACnBC,8BAA8B,EAC9BC,oCAAoC,QAC/B,kBAAe;AAEtB,SAASC,gBAAgB,EAAEC,yBAAyB,QAAQ,wBAAqB;AAEjF,SAASC,cAAc,EAAEC,uBAAuB,QAAQ,sBAAmB;AAE3E,SAASC,qBAAqB,EAAEC,8BAA8B,QAAQ,6BAA0B;AAEhG,SAASC,gBAAgB,EAAEC,yBAAyB,QAAQ,wBAAqB;AAEjF,SAASC,cAAc,EAAEC,uBAAuB,QAAQ,sBAAmB"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { mergeClasses } from "@fluentui/react-components/css-modules";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { useFlexStyles } from "../../../components/Flex/Flex.styles.css.js";
|
|
5
|
+
export const flexClassName = 'fui-Flex';
|
|
6
|
+
export const Flex = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
7
|
+
const { children, column, fill, gap, hAlign, inline, padding, space, vAlign, wrap, className, ...rest } = props;
|
|
8
|
+
const classes = useFlexStyles();
|
|
9
|
+
const classMaps = React.useMemo(()=>({
|
|
10
|
+
alignItems: {
|
|
11
|
+
start: classes.alignItemsFlexStart,
|
|
12
|
+
center: classes.alignItemsCenter,
|
|
13
|
+
end: classes.alignItemsFlexEnd,
|
|
14
|
+
stretch: classes.alignItemsCenter
|
|
15
|
+
},
|
|
16
|
+
justifyContent: {
|
|
17
|
+
start: classes.justifyContentFlexStart,
|
|
18
|
+
center: classes.justifyContentCenter,
|
|
19
|
+
end: classes.justifyContentFlexEnd,
|
|
20
|
+
stretch: classes.justifyContentStretch
|
|
21
|
+
},
|
|
22
|
+
justifyContentSpace: {
|
|
23
|
+
around: classes.justifyContentSpaceAround,
|
|
24
|
+
between: classes.justifyContentSpaceBetween,
|
|
25
|
+
evenly: classes.justifyContentSpaceEvenly
|
|
26
|
+
},
|
|
27
|
+
gapForColumnFlex: {
|
|
28
|
+
'gap.smaller': classes.gapForColumnFlexSmaller,
|
|
29
|
+
'gap.small': classes.gapForColumnFlexSmall,
|
|
30
|
+
'gap.medium': classes.gapForColumnFlexMedium,
|
|
31
|
+
'gap.large': classes.gapForColumnFlexLarge
|
|
32
|
+
},
|
|
33
|
+
gapRow: {
|
|
34
|
+
'gap.smaller': classes.gapForRowFlexSmaller,
|
|
35
|
+
'gap.small': classes.gapForRowFlexSmall,
|
|
36
|
+
'gap.medium': classes.gapForRowFlexMedium,
|
|
37
|
+
'gap.large': classes.gapForRowFlexLarge
|
|
38
|
+
},
|
|
39
|
+
paddings: {
|
|
40
|
+
'padding.medium': classes.paddingMedium
|
|
41
|
+
}
|
|
42
|
+
}), [
|
|
43
|
+
classes
|
|
44
|
+
]);
|
|
45
|
+
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);
|
|
46
|
+
const content = React.Children.map(children, (child)=>{
|
|
47
|
+
var _child_type;
|
|
48
|
+
// @ts-expect-error __isFlexItem is added to the React type property by N*
|
|
49
|
+
const isFlexItemElement = child === null || child === void 0 ? void 0 : (_child_type = child.type) === null || _child_type === void 0 ? void 0 : _child_type.__isFlexItem;
|
|
50
|
+
return isFlexItemElement ? /*#__PURE__*/ React.cloneElement(child, {
|
|
51
|
+
flexDirection: column ? 'column' : 'row'
|
|
52
|
+
}) : child;
|
|
53
|
+
});
|
|
54
|
+
return /*#__PURE__*/ React.createElement("div", {
|
|
55
|
+
ref: ref,
|
|
56
|
+
className: flexClasses,
|
|
57
|
+
...rest
|
|
58
|
+
}, content);
|
|
59
|
+
});
|
|
60
|
+
Flex.displayName = 'Flex';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Flex/Flex.tsx"],"sourcesContent":["'use client';\n\nimport { 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 ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\n React.cloneElement(child as React.ReactElement<any>, {\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;AAEA,SAASA,YAAY,QAAQ,6BAA6B;AAC1D,YAAYC,WAAW,QAAQ;AAE/B,SAASC,aAAa,QAAQ,mBAAgB;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;QADnC,0EAA0E;QAC1E,MAAMC,oBAA6BD,kBAAAA,6BAAAA,cAAAA,MAAOE,IAAI,cAAXF,kCAAAA,YAAaG,YAAY;QAE5D,OAAOF,kCAEH5D,MAAM+D,YAAY,CAACJ,OAAkC;YACnDK,eAAexD,SAAS,WAAW;QACrC,KACAmD;IACN;IAEA,qBACE,oBAACM;QAAI3D,KAAKA;QAAKW,WAAWqC;QAAc,GAAGpC,IAAI;OAC5CsC;AAGP,GAAG;AAEHrD,KAAK+D,WAAW,GAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Flex/index.ts"],"sourcesContent":["export { Flex, flexClassName } from './Flex';\nexport type { FlexProps } from './Flex';\nexport { useFlexStyles } from './Flex.styles';\nexport { flexItem } from './FlexItem.mixins';\n"],"names":["Flex","flexClassName","useFlexStyles","flexItem"],"mappings":"AAAA,SAASA,IAAI,EAAEC,aAAa,QAAQ,YAAS;AAE7C,SAASC,aAAa,QAAQ,mBAAgB;AAC9C,SAASC,QAAQ,QAAQ,uBAAoB"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { renderField_unstable, useFieldContextValues_unstable, useFieldStyles_unstable, useField_unstable } from "@fluentui/react-components/css-modules";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
export const FormFieldShim = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
5
|
+
const { errorMessage, required, control, label } = props;
|
|
6
|
+
const fieldProps = {
|
|
7
|
+
required
|
|
8
|
+
};
|
|
9
|
+
if (errorMessage && (control === null || control === void 0 ? void 0 : control.error) === 'true') {
|
|
10
|
+
fieldProps.validationState = 'error';
|
|
11
|
+
if (typeof errorMessage === 'object') {
|
|
12
|
+
fieldProps.validationMessage = errorMessage.content;
|
|
13
|
+
}
|
|
14
|
+
if (typeof errorMessage === 'string') {
|
|
15
|
+
fieldProps.validationMessage = errorMessage;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
if (label) {
|
|
19
|
+
if (typeof label === 'object') {
|
|
20
|
+
fieldProps.label = label.content;
|
|
21
|
+
} else {
|
|
22
|
+
fieldProps.label = label;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
const children = props.children || (control === null || control === void 0 ? void 0 : control.content);
|
|
26
|
+
if (/*#__PURE__*/ React.isValidElement(children)) {
|
|
27
|
+
const child = children;
|
|
28
|
+
// Use the Field's child render function to pass the field control props to the child
|
|
29
|
+
fieldProps.children = (fieldControlProps)=>/*#__PURE__*/ React.cloneElement(child, {
|
|
30
|
+
...fieldControlProps,
|
|
31
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
32
|
+
...child.props
|
|
33
|
+
});
|
|
34
|
+
} else {
|
|
35
|
+
fieldProps.children = children;
|
|
36
|
+
}
|
|
37
|
+
const state = useField_unstable(fieldProps, ref);
|
|
38
|
+
useFieldStyles_unstable(state);
|
|
39
|
+
const context = useFieldContextValues_unstable(state);
|
|
40
|
+
return renderField_unstable(state, context);
|
|
41
|
+
});
|
|
42
|
+
FormFieldShim.displayName = 'FormFieldShim';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/FormField/FormFieldShim.tsx"],"sourcesContent":["'use client';\n\nimport type { FieldProps } from '@fluentui/react-components';\nimport {\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 =>\n React.cloneElement(child, {\n ...fieldControlProps,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ...(child.props as any),\n });\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;AAGA,SACEA,oBAAoB,EACpBC,8BAA8B,EAC9BC,uBAAuB,EACvBC,iBAAiB,QACZ,6BAA6B;AAGpC,YAAYC,WAAW,QAAQ;AAoC/B,OAAO,MAAMC,8BAAgBD,MAAME,UAAU,CAA0C,CAACC,OAAOC;IAC7F,MAAM,EAAEC,YAAY,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,KAAK,EAAE,GAAGL;IACnD,MAAMM,aAAyB;QAAEH;IAAS;IAE1C,IAAID,gBAAgBE,CAAAA,oBAAAA,8BAAAA,QAASG,KAAK,MAAK,QAAQ;QAC7CD,WAAWE,eAAe,GAAG;QAC7B,IAAI,OAAON,iBAAiB,UAAU;YACpCI,WAAWG,iBAAiB,GAAGP,aAAaQ,OAAO;QACrD;QACA,IAAI,OAAOR,iBAAiB,UAAU;YACpCI,WAAWG,iBAAiB,GAAGP;QACjC;IACF;IAEA,IAAIG,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,KAAIP,oBAAAA,8BAAAA,QAASM,OAAO;IAE3E,kBAAIb,MAAMe,cAAc,CAACD,WAAW;QAClC,MAAME,QAA4BF;QAElC,qFAAqF;QACrFL,WAAWK,QAAQ,GAAGG,CAAAA,kCACpBjB,MAAMkB,YAAY,CAACF,OAAO;gBACxB,GAAGC,iBAAiB;gBACpB,8DAA8D;gBAC9D,GAAID,MAAMb,KAAK;YACjB;IACJ,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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { FormFieldShim } from "./FormFieldShim.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/FormField/index.ts"],"sourcesContent":["export { FormFieldShim } from './FormFieldShim';\n"],"names":["FormFieldShim"],"mappings":"AAAA,SAASA,aAAa,QAAQ,qBAAkB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { mergeClasses } from "@fluentui/react-components/css-modules";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { useGridStyles } from "../../../components/Grid/Grid.styles.css.js";
|
|
5
|
+
export const gridShimClassName = 'fui-Grid';
|
|
6
|
+
export const GridShim = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
7
|
+
const { rows, columns, className, ...rest } = props;
|
|
8
|
+
const classes = useGridStyles();
|
|
9
|
+
const classMaps = React.useMemo(()=>({
|
|
10
|
+
rowsClasses: {
|
|
11
|
+
1: classes.rows1,
|
|
12
|
+
2: classes.rows2,
|
|
13
|
+
3: classes.rows3
|
|
14
|
+
},
|
|
15
|
+
columnsClasses: {
|
|
16
|
+
1: classes.columns1,
|
|
17
|
+
2: classes.columns2,
|
|
18
|
+
3: classes.columns3
|
|
19
|
+
}
|
|
20
|
+
}), [
|
|
21
|
+
classes
|
|
22
|
+
]);
|
|
23
|
+
const gridClasses = mergeClasses(gridShimClassName, classes.grid, !rows && !columns && classes.columnsDefault, rows && !columns && classes.onlyRows, rows && classMaps.rowsClasses[rows], columns && classMaps.columnsClasses[columns], className);
|
|
24
|
+
return /*#__PURE__*/ React.createElement("div", {
|
|
25
|
+
ref: ref,
|
|
26
|
+
className: gridClasses,
|
|
27
|
+
...rest
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
GridShim.displayName = 'GridShim';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Grid/GridShim.tsx"],"sourcesContent":["'use client';\n\nimport { 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;AAEA,SAASA,YAAY,QAAQ,6BAA6B;AAC1D,YAAYC,WAAW,QAAQ;AAC/B,SAASC,aAAa,QAAQ,mBAAgB;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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Grid/index.ts"],"sourcesContent":["export { GridShim, gridShimClassName as gridClassName } from './GridShim';\nexport type { GridShimProps } from './GridShim';\nexport { useGridStyles } from './Grid.styles';\nexport { grid } from './Grid.mixins';\n"],"names":["GridShim","gridShimClassName","gridClassName","useGridStyles","grid"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,qBAAqBC,aAAa,QAAQ,gBAAa;AAE1E,SAASC,aAAa,QAAQ,mBAAgB;AAC9C,SAASC,IAAI,QAAQ,mBAAgB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { tokens } from "@fluentui/react-components/css-modules";
|
|
2
|
+
const fluid = ()=>({
|
|
3
|
+
width: '100%'
|
|
4
|
+
});
|
|
5
|
+
const error = ()=>({
|
|
6
|
+
border: `1px solid ${tokens.colorPaletteRedBorderActive}`
|
|
7
|
+
});
|
|
8
|
+
const errorIndicator = ()=>({
|
|
9
|
+
color: tokens.colorPaletteRedBorderActive
|
|
10
|
+
});
|
|
11
|
+
const successIndicator = ()=>({
|
|
12
|
+
color: tokens.colorPaletteGreenForeground1
|
|
13
|
+
});
|
|
14
|
+
export const input = {
|
|
15
|
+
error,
|
|
16
|
+
errorIndicator,
|
|
17
|
+
fluid,
|
|
18
|
+
successIndicator
|
|
19
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Input/Input.mixins.ts"],"sourcesContent":["import type { GriffelStyle } from '@fluentui/react-components';\nimport { tokens } from '@fluentui/react-components';\n\nconst fluid = (): GriffelStyle => ({ width: '100%' });\n\nconst error = (): GriffelStyle => ({ border: `1px solid ${tokens.colorPaletteRedBorderActive}` });\n\nconst errorIndicator = (): GriffelStyle => ({\n color: tokens.colorPaletteRedBorderActive,\n});\n\nconst successIndicator = (): GriffelStyle => ({\n color: tokens.colorPaletteGreenForeground1,\n});\n\nexport const input = {\n error,\n errorIndicator,\n fluid,\n successIndicator,\n};\n"],"names":["tokens","fluid","width","error","border","colorPaletteRedBorderActive","errorIndicator","color","successIndicator","colorPaletteGreenForeground1","input"],"mappings":"AACA,SAASA,MAAM,QAAQ,6BAA6B;AAEpD,MAAMC,QAAQ,IAAqB,CAAA;QAAEC,OAAO;IAAO,CAAA;AAEnD,MAAMC,QAAQ,IAAqB,CAAA;QAAEC,QAAQ,CAAC,UAAU,EAAEJ,OAAOK,2BAA2B,EAAE;IAAC,CAAA;AAE/F,MAAMC,iBAAiB,IAAqB,CAAA;QAC1CC,OAAOP,OAAOK,2BAA2B;IAC3C,CAAA;AAEA,MAAMG,mBAAmB,IAAqB,CAAA;QAC5CD,OAAOP,OAAOS,4BAA4B;IAC5C,CAAA;AAEA,OAAO,MAAMC,QAAQ;IACnBP;IACAG;IACAL;IACAO;AACF,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { input } from "./Input.mixins.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Input/index.ts"],"sourcesContent":["export { input } from './Input.mixins';\n"],"names":["input"],"mappings":"AAAA,SAASA,KAAK,QAAQ,oBAAiB"}
|