@fluentui/react-migration-v8-v9 9.4.10 → 9.4.11
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 +40 -1
- package/CHANGELOG.md +15 -2
- package/lib/components/Button/ActionButtonShim.js.map +1 -1
- package/lib/components/Button/ButtonShim.js +2 -2
- package/lib/components/Button/ButtonShim.js.map +1 -1
- package/lib/components/Button/CompoundButtonShim.js +2 -2
- package/lib/components/Button/CompoundButtonShim.js.map +1 -1
- package/lib/components/Button/DefaultButtonShim.js.map +1 -1
- package/lib/components/Button/MenuButtonShim.js.map +1 -1
- package/lib/components/Button/PrimaryButtonShim.js.map +1 -1
- package/lib/components/Button/ToggleButtonShim.js.map +1 -1
- package/lib/components/Button/shimButtonProps.js.map +1 -1
- package/lib/components/Menu/MenuShim.js.map +1 -1
- package/lib/components/Menu/shimMenuProps.js +3 -2
- package/lib/components/Menu/shimMenuProps.js.map +1 -1
- package/lib/components/Stack/StackItemShim.js +1 -1
- package/lib/components/Stack/StackItemShim.js.map +1 -1
- package/lib/components/Stack/StackShim.js +1 -1
- package/lib/components/Stack/StackShim.js.map +1 -1
- package/lib/components/Stack/stackUtils.js +2 -2
- package/lib/components/Stack/stackUtils.js.map +1 -1
- package/lib/components/Theme/v8ThemeShim.js +2 -1
- package/lib/components/Theme/v8ThemeShim.js.map +1 -1
- package/lib/components/Theme/v9BrandVariantsShim.js.map +1 -1
- package/lib/components/Theme/v9ThemeShim.js.map +1 -1
- package/lib-commonjs/components/Button/ActionButtonShim.js +7 -5
- package/lib-commonjs/components/Button/ActionButtonShim.js.map +1 -1
- package/lib-commonjs/components/Button/ButtonShim.js +13 -11
- package/lib-commonjs/components/Button/ButtonShim.js.map +1 -1
- package/lib-commonjs/components/Button/CommandButtonShim.js +4 -2
- package/lib-commonjs/components/Button/CommandButtonShim.js.map +1 -1
- package/lib-commonjs/components/Button/CompoundButtonShim.js +9 -7
- package/lib-commonjs/components/Button/CompoundButtonShim.js.map +1 -1
- package/lib-commonjs/components/Button/DefaultButtonShim.js +7 -5
- package/lib-commonjs/components/Button/DefaultButtonShim.js.map +1 -1
- package/lib-commonjs/components/Button/MenuButtonShim.js +7 -5
- package/lib-commonjs/components/Button/MenuButtonShim.js.map +1 -1
- package/lib-commonjs/components/Button/PrimaryButtonShim.js +7 -5
- package/lib-commonjs/components/Button/PrimaryButtonShim.js.map +1 -1
- package/lib-commonjs/components/Button/ToggleButtonShim.js +7 -5
- package/lib-commonjs/components/Button/ToggleButtonShim.js.map +1 -1
- package/lib-commonjs/components/Button/index.js +10 -10
- package/lib-commonjs/components/Button/index.js.map +1 -1
- package/lib-commonjs/components/Button/shimButtonProps.js +5 -3
- package/lib-commonjs/components/Button/shimButtonProps.js.map +1 -1
- package/lib-commonjs/components/Menu/MenuShim.js +12 -10
- package/lib-commonjs/components/Menu/MenuShim.js.map +1 -1
- package/lib-commonjs/components/Menu/index.js +3 -3
- package/lib-commonjs/components/Menu/index.js.map +1 -1
- package/lib-commonjs/components/Menu/shimMenuProps.js +17 -8
- package/lib-commonjs/components/Menu/shimMenuProps.js.map +1 -1
- package/lib-commonjs/components/Stack/StackItemShim.js +12 -10
- package/lib-commonjs/components/Stack/StackItemShim.js.map +1 -1
- package/lib-commonjs/components/Stack/StackItemShim.styles.js +20 -10
- package/lib-commonjs/components/Stack/StackItemShim.styles.js.map +1 -1
- package/lib-commonjs/components/Stack/StackShim.js +11 -9
- package/lib-commonjs/components/Stack/StackShim.js.map +1 -1
- package/lib-commonjs/components/Stack/StackShim.styles.js +16 -8
- package/lib-commonjs/components/Stack/StackShim.styles.js.map +1 -1
- package/lib-commonjs/components/Stack/index.js +3 -3
- package/lib-commonjs/components/Stack/index.js.map +1 -1
- package/lib-commonjs/components/Stack/stackUtils.js +11 -5
- package/lib-commonjs/components/Stack/stackUtils.js.map +1 -1
- package/lib-commonjs/components/Theme/index.js +5 -5
- package/lib-commonjs/components/Theme/index.js.map +1 -1
- package/lib-commonjs/components/Theme/themeDuplicates.js +54 -18
- package/lib-commonjs/components/Theme/themeDuplicates.js.map +1 -1
- package/lib-commonjs/components/Theme/v8ThemeShim.js +7 -4
- package/lib-commonjs/components/Theme/v8ThemeShim.js.map +1 -1
- package/lib-commonjs/components/Theme/v9BrandVariantsShim.js +3 -1
- package/lib-commonjs/components/Theme/v9BrandVariantsShim.js.map +1 -1
- package/lib-commonjs/components/Theme/v9ThemeShim.js +5 -3
- package/lib-commonjs/components/Theme/v9ThemeShim.js.map +1 -1
- package/lib-commonjs/index.js +96 -32
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +11 -11
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,46 @@
|
|
|
2
2
|
"name": "@fluentui/react-migration-v8-v9",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "Tue,
|
|
5
|
+
"date": "Tue, 05 Sep 2023 13:23:32 GMT",
|
|
6
|
+
"tag": "@fluentui/react-migration-v8-v9_v9.4.11",
|
|
7
|
+
"version": "9.4.11",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "bernardo.sunderhus@gmail.com",
|
|
12
|
+
"package": "@fluentui/react-migration-v8-v9",
|
|
13
|
+
"commit": "eea6d93a62249ba4fba3347fb291c67ee1a3fb24",
|
|
14
|
+
"comment": "bumps react peer dependencies to v16.14.0"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "bernardo.sunderhus@gmail.com",
|
|
18
|
+
"package": "@fluentui/react-migration-v8-v9",
|
|
19
|
+
"commit": "b93c2ac22355b6cb6f33dd509c6cd9c21f4fffc8",
|
|
20
|
+
"comment": "bumps @swc/helpers version to 0.5.1"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "beachball",
|
|
24
|
+
"package": "@fluentui/react-migration-v8-v9",
|
|
25
|
+
"comment": "Bump @fluentui/react-components to v9.30.2",
|
|
26
|
+
"commit": "0bf811dbcaaa6b78743537d142fe4d348b457045"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"author": "beachball",
|
|
30
|
+
"package": "@fluentui/react-migration-v8-v9",
|
|
31
|
+
"comment": "Bump @fluentui/react-theme to v9.1.12",
|
|
32
|
+
"commit": "0bf811dbcaaa6b78743537d142fe4d348b457045"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"author": "beachball",
|
|
36
|
+
"package": "@fluentui/react-migration-v8-v9",
|
|
37
|
+
"comment": "Bump @fluentui/react-utilities to v9.13.1",
|
|
38
|
+
"commit": "0bf811dbcaaa6b78743537d142fe4d348b457045"
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"date": "Tue, 29 Aug 2023 12:57:36 GMT",
|
|
6
45
|
"tag": "@fluentui/react-migration-v8-v9_v9.4.10",
|
|
7
46
|
"version": "9.4.10",
|
|
8
47
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,25 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-migration-v8-v9
|
|
2
2
|
|
|
3
|
-
This log was last generated on Tue,
|
|
3
|
+
This log was last generated on Tue, 05 Sep 2023 13:23:32 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.4.11](https://github.com/microsoft/fluentui/tree/@fluentui/react-migration-v8-v9_v9.4.11)
|
|
8
|
+
|
|
9
|
+
Tue, 05 Sep 2023 13:23:32 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-migration-v8-v9_v9.4.10..@fluentui/react-migration-v8-v9_v9.4.11)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- bumps react peer dependencies to v16.14.0 ([PR #28959](https://github.com/microsoft/fluentui/pull/28959) by bernardo.sunderhus@gmail.com)
|
|
15
|
+
- bumps @swc/helpers version to 0.5.1 ([PR #28989](https://github.com/microsoft/fluentui/pull/28989) by bernardo.sunderhus@gmail.com)
|
|
16
|
+
- Bump @fluentui/react-components to v9.30.2 ([PR #27840](https://github.com/microsoft/fluentui/pull/27840) by beachball)
|
|
17
|
+
- Bump @fluentui/react-theme to v9.1.12 ([PR #27840](https://github.com/microsoft/fluentui/pull/27840) by beachball)
|
|
18
|
+
- Bump @fluentui/react-utilities to v9.13.1 ([PR #27840](https://github.com/microsoft/fluentui/pull/27840) by beachball)
|
|
19
|
+
|
|
7
20
|
## [9.4.10](https://github.com/microsoft/fluentui/tree/@fluentui/react-migration-v8-v9_v9.4.10)
|
|
8
21
|
|
|
9
|
-
Tue, 29 Aug 2023 12:
|
|
22
|
+
Tue, 29 Aug 2023 12:57:36 GMT
|
|
10
23
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-migration-v8-v9_v9.4.9..@fluentui/react-migration-v8-v9_v9.4.10)
|
|
11
24
|
|
|
12
25
|
### Patches
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ActionButtonShim.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport type { IButtonProps } from '@fluentui/react';\n\nimport { Button } from '@fluentui/react-components';\n\nimport { shimButtonProps } from './shimButtonProps';\n\n/**\n * Shims a v8 ActionButton to render a v9 Button\n */\nexport const ActionButtonShim: React.ForwardRefExoticComponent<IButtonProps & React.RefAttributes<HTMLButtonElement>> =\n React.forwardRef((props, _ref) => {\n const variantProps = {\n ...props,\n variantClassName: 'ms-Button--action ms-Button--command',\n };\n\n const shimProps = shimButtonProps(variantProps);\n\n return <Button {...(props as React.RefAttributes<HTMLButtonElement>)} {...shimProps} appearance=\"transparent\" />;\n });\n"],"names":["React","Button","shimButtonProps","ActionButtonShim","forwardRef","props","_ref","variantProps","variantClassName","shimProps","appearance"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAI/B,SAASC,MAAM,QAAQ,6BAA6B;AAEpD,SAASC,eAAe,QAAQ,oBAAoB;AAEpD;;CAEC,GACD,OAAO,MAAMC,iCACXH,MAAMI,UAAU,CAAC,CAACC,OAAOC
|
|
1
|
+
{"version":3,"sources":["ActionButtonShim.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport type { IButtonProps } from '@fluentui/react';\n\nimport { Button } from '@fluentui/react-components';\n\nimport { shimButtonProps } from './shimButtonProps';\n\n/**\n * Shims a v8 ActionButton to render a v9 Button\n */\nexport const ActionButtonShim: React.ForwardRefExoticComponent<IButtonProps & React.RefAttributes<HTMLButtonElement>> =\n React.forwardRef((props, _ref) => {\n const variantProps = {\n ...props,\n variantClassName: 'ms-Button--action ms-Button--command',\n };\n\n const shimProps = shimButtonProps(variantProps);\n\n return <Button {...(props as React.RefAttributes<HTMLButtonElement>)} {...shimProps} appearance=\"transparent\" />;\n });\n"],"names":["React","Button","shimButtonProps","ActionButtonShim","forwardRef","props","_ref","variantProps","variantClassName","shimProps","appearance"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAI/B,SAASC,MAAM,QAAQ,6BAA6B;AAEpD,SAASC,eAAe,QAAQ,oBAAoB;AAEpD;;CAEC,GACD,OAAO,MAAMC,iCACXH,MAAMI,UAAU,CAAC,CAACC,OAAOC;IACvB,MAAMC,eAAe;QACnB,GAAGF,KAAK;QACRG,kBAAkB;IACpB;IAEA,MAAMC,YAAYP,gBAAgBK;IAElC,qBAAO,oBAACN;QAAQ,GAAII,KAAK;QAA8C,GAAGI,SAAS;QAAEC,YAAW;;AAClG,GAAG"}
|
|
@@ -4,12 +4,12 @@ import { shimButtonProps } from './shimButtonProps';
|
|
|
4
4
|
import { ToggleButtonShim } from './ToggleButtonShim';
|
|
5
5
|
import { CompoundButtonShim } from './CompoundButtonShim';
|
|
6
6
|
export const ButtonShim = /*#__PURE__*/ React.forwardRef((props, _ref)=>{
|
|
7
|
-
var _props_onRenderDescription;
|
|
7
|
+
var _props_onRenderDescription, _props;
|
|
8
8
|
const shimProps = shimButtonProps(props);
|
|
9
9
|
if (props.toggle) {
|
|
10
10
|
return /*#__PURE__*/ React.createElement(ToggleButtonShim, props, props.children);
|
|
11
11
|
}
|
|
12
|
-
if (props.secondaryText || ((_props_onRenderDescription = props.onRenderDescription) === null || _props_onRenderDescription === void 0 ? void 0 : _props_onRenderDescription.call(
|
|
12
|
+
if (props.secondaryText || ((_props_onRenderDescription = (_props = props).onRenderDescription) === null || _props_onRenderDescription === void 0 ? void 0 : _props_onRenderDescription.call(_props, props))) {
|
|
13
13
|
return /*#__PURE__*/ React.createElement(CompoundButtonShim, props);
|
|
14
14
|
}
|
|
15
15
|
return /*#__PURE__*/ React.createElement(Button, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ButtonShim.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport type { IBaseButtonProps } from '@fluentui/react';\n\nimport { Button } from '@fluentui/react-components';\n\nimport { shimButtonProps } from './shimButtonProps';\nimport { ToggleButtonShim } from './ToggleButtonShim';\nimport { CompoundButtonShim } from './CompoundButtonShim';\n\nexport const ButtonShim: React.ForwardRefExoticComponent<IBaseButtonProps & React.RefAttributes<HTMLButtonElement>> =\n React.forwardRef((props, _ref) => {\n const shimProps = shimButtonProps(props);\n\n if (props.toggle) {\n return <ToggleButtonShim {...props}>{props.children}</ToggleButtonShim>;\n }\n if (props.secondaryText || props.onRenderDescription?.(props)) {\n return <CompoundButtonShim {...props} />;\n }\n\n return <Button {...(props as React.RefAttributes<HTMLButtonElement>)} {...shimProps} />;\n });\n"],"names":["React","Button","shimButtonProps","ToggleButtonShim","CompoundButtonShim","ButtonShim","forwardRef","props","_ref","shimProps","toggle","children","secondaryText","onRenderDescription"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAI/B,SAASC,MAAM,QAAQ,6BAA6B;AAEpD,SAASC,eAAe,QAAQ,oBAAoB;AACpD,SAASC,gBAAgB,QAAQ,qBAAqB;AACtD,SAASC,kBAAkB,QAAQ,uBAAuB;AAE1D,OAAO,MAAMC,2BACXL,MAAMM,UAAU,CAAC,CAACC,OAAOC,
|
|
1
|
+
{"version":3,"sources":["ButtonShim.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport type { IBaseButtonProps } from '@fluentui/react';\n\nimport { Button } from '@fluentui/react-components';\n\nimport { shimButtonProps } from './shimButtonProps';\nimport { ToggleButtonShim } from './ToggleButtonShim';\nimport { CompoundButtonShim } from './CompoundButtonShim';\n\nexport const ButtonShim: React.ForwardRefExoticComponent<IBaseButtonProps & React.RefAttributes<HTMLButtonElement>> =\n React.forwardRef((props, _ref) => {\n const shimProps = shimButtonProps(props);\n\n if (props.toggle) {\n return <ToggleButtonShim {...props}>{props.children}</ToggleButtonShim>;\n }\n if (props.secondaryText || props.onRenderDescription?.(props)) {\n return <CompoundButtonShim {...props} />;\n }\n\n return <Button {...(props as React.RefAttributes<HTMLButtonElement>)} {...shimProps} />;\n });\n"],"names":["React","Button","shimButtonProps","ToggleButtonShim","CompoundButtonShim","ButtonShim","forwardRef","props","_ref","shimProps","toggle","children","secondaryText","onRenderDescription"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAI/B,SAASC,MAAM,QAAQ,6BAA6B;AAEpD,SAASC,eAAe,QAAQ,oBAAoB;AACpD,SAASC,gBAAgB,QAAQ,qBAAqB;AACtD,SAASC,kBAAkB,QAAQ,uBAAuB;AAE1D,OAAO,MAAMC,2BACXL,MAAMM,UAAU,CAAC,CAACC,OAAOC;QAMID,4BAAAA;IAL3B,MAAME,YAAYP,gBAAgBK;IAElC,IAAIA,MAAMG,MAAM,EAAE;QAChB,qBAAO,oBAACP,kBAAqBI,OAAQA,MAAMI,QAAQ;IACrD;IACA,IAAIJ,MAAMK,aAAa,MAAIL,6BAAAA,CAAAA,SAAAA,OAAMM,mBAAmB,cAAzBN,iDAAAA,gCAAAA,QAA4BA,SAAQ;QAC7D,qBAAO,oBAACH,oBAAuBG;IACjC;IAEA,qBAAO,oBAACN;QAAQ,GAAIM,KAAK;QAA8C,GAAGE,SAAS;;AACrF,GAAG"}
|
|
@@ -4,14 +4,14 @@ import { shimButtonProps } from './shimButtonProps';
|
|
|
4
4
|
/**
|
|
5
5
|
* Shims v8 CompoundButton to render a v9 CompoundButton
|
|
6
6
|
*/ export const CompoundButtonShim = /*#__PURE__*/ React.forwardRef((props, _ref)=>{
|
|
7
|
-
var _props_onRenderDescription;
|
|
7
|
+
var _props_onRenderDescription, _props;
|
|
8
8
|
const variantProps = {
|
|
9
9
|
...props,
|
|
10
10
|
variantClassName: props.primary ? 'ms-Button--compoundPrimary' : 'ms-Button--compound'
|
|
11
11
|
};
|
|
12
12
|
const shimProps = {
|
|
13
13
|
...shimButtonProps(variantProps),
|
|
14
|
-
secondaryContent: props.secondaryText || ((_props_onRenderDescription = props.onRenderDescription) === null || _props_onRenderDescription === void 0 ? void 0 : _props_onRenderDescription.call(
|
|
14
|
+
secondaryContent: props.secondaryText || ((_props_onRenderDescription = (_props = props).onRenderDescription) === null || _props_onRenderDescription === void 0 ? void 0 : _props_onRenderDescription.call(_props, props))
|
|
15
15
|
};
|
|
16
16
|
return /*#__PURE__*/ React.createElement(CompoundButton, {
|
|
17
17
|
...props,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["CompoundButtonShim.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport type { IButtonProps } from '@fluentui/react';\n\nimport { CompoundButton } from '@fluentui/react-components';\nimport type { CompoundButtonProps } from '@fluentui/react-components';\n\nimport { shimButtonProps } from './shimButtonProps';\n\n/**\n * Shims v8 CompoundButton to render a v9 CompoundButton\n */\nexport const CompoundButtonShim: React.ForwardRefExoticComponent<\n IButtonProps & React.RefAttributes<HTMLButtonElement>\n> = React.forwardRef((props, _ref) => {\n const variantProps = {\n ...props,\n variantClassName: props.primary ? 'ms-Button--compoundPrimary' : 'ms-Button--compound',\n };\n\n const shimProps: CompoundButtonProps = {\n ...shimButtonProps(variantProps),\n secondaryContent: props.secondaryText || props.onRenderDescription?.(props),\n };\n\n return <CompoundButton {...(props as React.RefAttributes<HTMLButtonElement>)} {...shimProps} />;\n});\n"],"names":["React","CompoundButton","shimButtonProps","CompoundButtonShim","forwardRef","props","_ref","variantProps","variantClassName","primary","shimProps","secondaryContent","secondaryText","onRenderDescription"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAI/B,SAASC,cAAc,QAAQ,6BAA6B;AAG5D,SAASC,eAAe,QAAQ,oBAAoB;AAEpD;;CAEC,GACD,OAAO,MAAMC,mCAETH,MAAMI,UAAU,CAAC,CAACC,OAAOC,
|
|
1
|
+
{"version":3,"sources":["CompoundButtonShim.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport type { IButtonProps } from '@fluentui/react';\n\nimport { CompoundButton } from '@fluentui/react-components';\nimport type { CompoundButtonProps } from '@fluentui/react-components';\n\nimport { shimButtonProps } from './shimButtonProps';\n\n/**\n * Shims v8 CompoundButton to render a v9 CompoundButton\n */\nexport const CompoundButtonShim: React.ForwardRefExoticComponent<\n IButtonProps & React.RefAttributes<HTMLButtonElement>\n> = React.forwardRef((props, _ref) => {\n const variantProps = {\n ...props,\n variantClassName: props.primary ? 'ms-Button--compoundPrimary' : 'ms-Button--compound',\n };\n\n const shimProps: CompoundButtonProps = {\n ...shimButtonProps(variantProps),\n secondaryContent: props.secondaryText || props.onRenderDescription?.(props),\n };\n\n return <CompoundButton {...(props as React.RefAttributes<HTMLButtonElement>)} {...shimProps} />;\n});\n"],"names":["React","CompoundButton","shimButtonProps","CompoundButtonShim","forwardRef","props","_ref","variantProps","variantClassName","primary","shimProps","secondaryContent","secondaryText","onRenderDescription"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAI/B,SAASC,cAAc,QAAQ,6BAA6B;AAG5D,SAASC,eAAe,QAAQ,oBAAoB;AAEpD;;CAEC,GACD,OAAO,MAAMC,mCAETH,MAAMI,UAAU,CAAC,CAACC,OAAOC;QAQgBD,4BAAAA;IAP3C,MAAME,eAAe;QACnB,GAAGF,KAAK;QACRG,kBAAkBH,MAAMI,OAAO,GAAG,+BAA+B;IACnE;IAEA,MAAMC,YAAiC;QACrC,GAAGR,gBAAgBK,aAAa;QAChCI,kBAAkBN,MAAMO,aAAa,MAAIP,6BAAAA,CAAAA,SAAAA,OAAMQ,mBAAmB,cAAzBR,iDAAAA,gCAAAA,QAA4BA;IACvE;IAEA,qBAAO,oBAACJ;QAAgB,GAAII,KAAK;QAA8C,GAAGK,SAAS;;AAC7F,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["DefaultButtonShim.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport type { IButtonProps } from '@fluentui/react';\n\nimport { ButtonShim } from './ButtonShim';\n\n/**\n * Shims a v8 DefaultButton to render a v9 Button\n */\nexport const DefaultButtonShim: React.ForwardRefExoticComponent<IButtonProps & React.RefAttributes<HTMLButtonElement>> =\n React.forwardRef((props, _ref) => {\n return <ButtonShim {...props} variantClassName={props.primary ? 'ms-Button--primary' : 'ms-Button--default'} />;\n });\n"],"names":["React","ButtonShim","DefaultButtonShim","forwardRef","props","_ref","variantClassName","primary"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAI/B,SAASC,UAAU,QAAQ,eAAe;AAE1C;;CAEC,GACD,OAAO,MAAMC,kCACXF,MAAMG,UAAU,CAAC,CAACC,OAAOC
|
|
1
|
+
{"version":3,"sources":["DefaultButtonShim.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport type { IButtonProps } from '@fluentui/react';\n\nimport { ButtonShim } from './ButtonShim';\n\n/**\n * Shims a v8 DefaultButton to render a v9 Button\n */\nexport const DefaultButtonShim: React.ForwardRefExoticComponent<IButtonProps & React.RefAttributes<HTMLButtonElement>> =\n React.forwardRef((props, _ref) => {\n return <ButtonShim {...props} variantClassName={props.primary ? 'ms-Button--primary' : 'ms-Button--default'} />;\n });\n"],"names":["React","ButtonShim","DefaultButtonShim","forwardRef","props","_ref","variantClassName","primary"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAI/B,SAASC,UAAU,QAAQ,eAAe;AAE1C;;CAEC,GACD,OAAO,MAAMC,kCACXF,MAAMG,UAAU,CAAC,CAACC,OAAOC;IACvB,qBAAO,oBAACJ;QAAY,GAAGG,KAAK;QAAEE,kBAAkBF,MAAMG,OAAO,GAAG,uBAAuB;;AACzF,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["MenuButtonShim.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport type { IButtonProps } from '@fluentui/react';\nimport { MenuButton, Menu, MenuList, MenuPopover, MenuTrigger } from '@fluentui/react-components';\nimport type { MenuButtonProps } from '@fluentui/react-components';\nimport { MenuItemShim, shimMenuProps } from '../Menu/index';\n\nimport { shimButtonProps } from './shimButtonProps';\n\nexport const MenuButtonShim: React.ForwardRefExoticComponent<IButtonProps & React.RefAttributes<HTMLButtonElement>> =\n React.forwardRef((props, _ref) => {\n const variantProps = {\n ...props,\n variantClassName: props.primary ? 'ms-Button--primary' : 'ms-Button--default',\n };\n\n const shimProps: MenuButtonProps = {\n ...shimButtonProps(variantProps),\n };\n\n const shimmedMenuProps = props.menuProps ? shimMenuProps(props.menuProps) : {};\n\n return (\n <Menu {...shimmedMenuProps}>\n <MenuTrigger>\n <MenuButton {...shimProps} />\n </MenuTrigger>\n <MenuPopover>\n <MenuList>\n {props.menuProps?.items.map(item => (\n // key is added through item spread\n // eslint-disable-next-line react/jsx-key\n <MenuItemShim {...item} />\n ))}\n </MenuList>\n </MenuPopover>\n </Menu>\n );\n });\n"],"names":["React","MenuButton","Menu","MenuList","MenuPopover","MenuTrigger","MenuItemShim","shimMenuProps","shimButtonProps","MenuButtonShim","forwardRef","props","_ref","variantProps","variantClassName","primary","shimProps","shimmedMenuProps","menuProps","items","map","item"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAG/B,SAASC,UAAU,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,WAAW,EAAEC,WAAW,QAAQ,6BAA6B;AAElG,SAASC,YAAY,EAAEC,aAAa,QAAQ,gBAAgB;AAE5D,SAASC,eAAe,QAAQ,oBAAoB;AAEpD,OAAO,MAAMC,+BACXT,MAAMU,UAAU,CAAC,CAACC,OAAOC
|
|
1
|
+
{"version":3,"sources":["MenuButtonShim.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport type { IButtonProps } from '@fluentui/react';\nimport { MenuButton, Menu, MenuList, MenuPopover, MenuTrigger } from '@fluentui/react-components';\nimport type { MenuButtonProps } from '@fluentui/react-components';\nimport { MenuItemShim, shimMenuProps } from '../Menu/index';\n\nimport { shimButtonProps } from './shimButtonProps';\n\nexport const MenuButtonShim: React.ForwardRefExoticComponent<IButtonProps & React.RefAttributes<HTMLButtonElement>> =\n React.forwardRef((props, _ref) => {\n const variantProps = {\n ...props,\n variantClassName: props.primary ? 'ms-Button--primary' : 'ms-Button--default',\n };\n\n const shimProps: MenuButtonProps = {\n ...shimButtonProps(variantProps),\n };\n\n const shimmedMenuProps = props.menuProps ? shimMenuProps(props.menuProps) : {};\n\n return (\n <Menu {...shimmedMenuProps}>\n <MenuTrigger>\n <MenuButton {...shimProps} />\n </MenuTrigger>\n <MenuPopover>\n <MenuList>\n {props.menuProps?.items.map(item => (\n // key is added through item spread\n // eslint-disable-next-line react/jsx-key\n <MenuItemShim {...item} />\n ))}\n </MenuList>\n </MenuPopover>\n </Menu>\n );\n });\n"],"names":["React","MenuButton","Menu","MenuList","MenuPopover","MenuTrigger","MenuItemShim","shimMenuProps","shimButtonProps","MenuButtonShim","forwardRef","props","_ref","variantProps","variantClassName","primary","shimProps","shimmedMenuProps","menuProps","items","map","item"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAG/B,SAASC,UAAU,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,WAAW,EAAEC,WAAW,QAAQ,6BAA6B;AAElG,SAASC,YAAY,EAAEC,aAAa,QAAQ,gBAAgB;AAE5D,SAASC,eAAe,QAAQ,oBAAoB;AAEpD,OAAO,MAAMC,+BACXT,MAAMU,UAAU,CAAC,CAACC,OAAOC;QAmBdD;IAlBT,MAAME,eAAe;QACnB,GAAGF,KAAK;QACRG,kBAAkBH,MAAMI,OAAO,GAAG,uBAAuB;IAC3D;IAEA,MAAMC,YAA6B;QACjC,GAAGR,gBAAgBK,aAAa;IAClC;IAEA,MAAMI,mBAAmBN,MAAMO,SAAS,GAAGX,cAAcI,MAAMO,SAAS,IAAI,CAAC;IAE7E,qBACE,oBAAChB,MAASe,gCACR,oBAACZ,iCACC,oBAACJ,YAAee,2BAElB,oBAACZ,iCACC,oBAACD,iBACEQ,mBAAAA,MAAMO,SAAS,cAAfP,uCAAAA,iBAAiBQ,KAAK,CAACC,GAAG,CAACC,CAAAA,OAC1B,mCAAmC;QACnC,yCAAyC;sBACzC,oBAACf,cAAiBe;AAM9B,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["PrimaryButtonShim.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport type { IButtonProps } from '@fluentui/react';\nimport { ButtonShim } from './ButtonShim';\n\n/**\n * Shims v8 PrimaryButton to render a v9 Button\n */\nexport const PrimaryButtonShim: React.ForwardRefExoticComponent<IButtonProps & React.RefAttributes<HTMLButtonElement>> =\n React.forwardRef((props, _ref) => {\n return <ButtonShim {...props} primary variantClassName=\"ms-Button--primary\" />;\n });\n"],"names":["React","ButtonShim","PrimaryButtonShim","forwardRef","props","_ref","primary","variantClassName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAG/B,SAASC,UAAU,QAAQ,eAAe;AAE1C;;CAEC,GACD,OAAO,MAAMC,kCACXF,MAAMG,UAAU,CAAC,CAACC,OAAOC
|
|
1
|
+
{"version":3,"sources":["PrimaryButtonShim.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport type { IButtonProps } from '@fluentui/react';\nimport { ButtonShim } from './ButtonShim';\n\n/**\n * Shims v8 PrimaryButton to render a v9 Button\n */\nexport const PrimaryButtonShim: React.ForwardRefExoticComponent<IButtonProps & React.RefAttributes<HTMLButtonElement>> =\n React.forwardRef((props, _ref) => {\n return <ButtonShim {...props} primary variantClassName=\"ms-Button--primary\" />;\n });\n"],"names":["React","ButtonShim","PrimaryButtonShim","forwardRef","props","_ref","primary","variantClassName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAG/B,SAASC,UAAU,QAAQ,eAAe;AAE1C;;CAEC,GACD,OAAO,MAAMC,kCACXF,MAAMG,UAAU,CAAC,CAACC,OAAOC;IACvB,qBAAO,oBAACJ;QAAY,GAAGG,KAAK;QAAEE,SAAAA;QAAQC,kBAAiB;;AACzD,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ToggleButtonShim.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport type { IButtonProps } from '@fluentui/react';\n\nimport { ToggleButton } from '@fluentui/react-components';\nimport type { ToggleButtonProps } from '@fluentui/react-components';\n\nimport { shimButtonProps } from './shimButtonProps';\n\n/**\n * Shims v8 ToggleButton to render a v9 ToggleButton\n */\nexport const ToggleButtonShim: React.ForwardRefExoticComponent<IButtonProps & React.RefAttributes<HTMLButtonElement>> =\n React.forwardRef((props, _ref) => {\n const variantProps = {\n ...props,\n variantClassName: props.primary ? 'ms-Button--compoundPrimary' : 'ms-Button--compound',\n };\n\n const shimProps: ToggleButtonProps = {\n ...shimButtonProps(variantProps),\n checked: props.checked,\n defaultChecked: props.defaultChecked,\n };\n\n return <ToggleButton {...(props as React.RefAttributes<HTMLButtonElement>)} {...shimProps} />;\n });\n"],"names":["React","ToggleButton","shimButtonProps","ToggleButtonShim","forwardRef","props","_ref","variantProps","variantClassName","primary","shimProps","checked","defaultChecked"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAI/B,SAASC,YAAY,QAAQ,6BAA6B;AAG1D,SAASC,eAAe,QAAQ,oBAAoB;AAEpD;;CAEC,GACD,OAAO,MAAMC,iCACXH,MAAMI,UAAU,CAAC,CAACC,OAAOC
|
|
1
|
+
{"version":3,"sources":["ToggleButtonShim.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport type { IButtonProps } from '@fluentui/react';\n\nimport { ToggleButton } from '@fluentui/react-components';\nimport type { ToggleButtonProps } from '@fluentui/react-components';\n\nimport { shimButtonProps } from './shimButtonProps';\n\n/**\n * Shims v8 ToggleButton to render a v9 ToggleButton\n */\nexport const ToggleButtonShim: React.ForwardRefExoticComponent<IButtonProps & React.RefAttributes<HTMLButtonElement>> =\n React.forwardRef((props, _ref) => {\n const variantProps = {\n ...props,\n variantClassName: props.primary ? 'ms-Button--compoundPrimary' : 'ms-Button--compound',\n };\n\n const shimProps: ToggleButtonProps = {\n ...shimButtonProps(variantProps),\n checked: props.checked,\n defaultChecked: props.defaultChecked,\n };\n\n return <ToggleButton {...(props as React.RefAttributes<HTMLButtonElement>)} {...shimProps} />;\n });\n"],"names":["React","ToggleButton","shimButtonProps","ToggleButtonShim","forwardRef","props","_ref","variantProps","variantClassName","primary","shimProps","checked","defaultChecked"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAI/B,SAASC,YAAY,QAAQ,6BAA6B;AAG1D,SAASC,eAAe,QAAQ,oBAAoB;AAEpD;;CAEC,GACD,OAAO,MAAMC,iCACXH,MAAMI,UAAU,CAAC,CAACC,OAAOC;IACvB,MAAMC,eAAe;QACnB,GAAGF,KAAK;QACRG,kBAAkBH,MAAMI,OAAO,GAAG,+BAA+B;IACnE;IAEA,MAAMC,YAA+B;QACnC,GAAGR,gBAAgBK,aAAa;QAChCI,SAASN,MAAMM,OAAO;QACtBC,gBAAgBP,MAAMO,cAAc;IACtC;IAEA,qBAAO,oBAACX;QAAc,GAAII,KAAK;QAA8C,GAAGK,SAAS;;AAC3F,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["shimButtonProps.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { Icon } from '@fluentui/react';\nimport type { IBaseButtonProps } from '@fluentui/react';\n\nimport type { ButtonProps } from '@fluentui/react-components';\n\nexport const shimButtonProps = (props: IBaseButtonProps & React.RefAttributes<HTMLButtonElement>): ButtonProps => {\n //TODO: Icon shim. This still renders the v8 icon.\n const icon = props.onRenderIcon ? (\n props.onRenderIcon(props)\n ) : props.iconProps ? (\n <Icon {...props.iconProps} />\n ) : undefined;\n\n const variantClassName = props.variantClassName ?? props.primary ? 'ms-Button--primary' : 'ms-Button--default';\n const className = [props.baseClassName, variantClassName, props.className].filter(Boolean).join(' ');\n\n return {\n // spread incoming props to propagate HTML properties not part of IBaseButtonProps\n ...props,\n appearance: props.primary ? 'primary' : undefined,\n className,\n disabled: props.disabled,\n disabledFocusable: props.allowDisabledFocus,\n 'aria-hidden': props.ariaHidden,\n 'aria-label': props.ariaLabel,\n icon,\n key: props.key || props.uniqueId,\n children: props.onRenderChildren\n ? props.onRenderChildren(props)\n : props.onRenderText\n ? props.onRenderText(props)\n : props.text || props.children,\n } as ButtonProps;\n};\n"],"names":["React","Icon","shimButtonProps","props","icon","onRenderIcon","iconProps","undefined","variantClassName","primary","className","baseClassName","filter","Boolean","join","appearance","disabled","disabledFocusable","allowDisabledFocus","ariaHidden","ariaLabel","key","uniqueId","children","onRenderChildren","onRenderText","text"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,IAAI,QAAQ,kBAAkB;AAKvC,OAAO,MAAMC,kBAAkB,CAACC
|
|
1
|
+
{"version":3,"sources":["shimButtonProps.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { Icon } from '@fluentui/react';\nimport type { IBaseButtonProps } from '@fluentui/react';\n\nimport type { ButtonProps } from '@fluentui/react-components';\n\nexport const shimButtonProps = (props: IBaseButtonProps & React.RefAttributes<HTMLButtonElement>): ButtonProps => {\n //TODO: Icon shim. This still renders the v8 icon.\n const icon = props.onRenderIcon ? (\n props.onRenderIcon(props)\n ) : props.iconProps ? (\n <Icon {...props.iconProps} />\n ) : undefined;\n\n const variantClassName = props.variantClassName ?? props.primary ? 'ms-Button--primary' : 'ms-Button--default';\n const className = [props.baseClassName, variantClassName, props.className].filter(Boolean).join(' ');\n\n return {\n // spread incoming props to propagate HTML properties not part of IBaseButtonProps\n ...props,\n appearance: props.primary ? 'primary' : undefined,\n className,\n disabled: props.disabled,\n disabledFocusable: props.allowDisabledFocus,\n 'aria-hidden': props.ariaHidden,\n 'aria-label': props.ariaLabel,\n icon,\n key: props.key || props.uniqueId,\n children: props.onRenderChildren\n ? props.onRenderChildren(props)\n : props.onRenderText\n ? props.onRenderText(props)\n : props.text || props.children,\n } as ButtonProps;\n};\n"],"names":["React","Icon","shimButtonProps","props","icon","onRenderIcon","iconProps","undefined","variantClassName","primary","className","baseClassName","filter","Boolean","join","appearance","disabled","disabledFocusable","allowDisabledFocus","ariaHidden","ariaLabel","key","uniqueId","children","onRenderChildren","onRenderText","text"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,IAAI,QAAQ,kBAAkB;AAKvC,OAAO,MAAMC,kBAAkB,CAACC;IAC9B,kDAAkD;IAClD,MAAMC,OAAOD,MAAME,YAAY,GAC7BF,MAAME,YAAY,CAACF,SACjBA,MAAMG,SAAS,iBACjB,oBAACL,MAASE,MAAMG,SAAS,IACvBC;QAEqBJ;IAAzB,MAAMK,mBAAmBL,CAAAA,CAAAA,0BAAAA,MAAMK,gBAAgB,cAAtBL,qCAAAA,0BAA0BA,MAAMM,OAAO,AAAD,IAAI,uBAAuB;IAC1F,MAAMC,YAAY;QAACP,MAAMQ,aAAa;QAAEH;QAAkBL,MAAMO,SAAS;KAAC,CAACE,MAAM,CAACC,SAASC,IAAI,CAAC;IAEhG,OAAO;QACL,kFAAkF;QAClF,GAAGX,KAAK;QACRY,YAAYZ,MAAMM,OAAO,GAAG,YAAYF;QACxCG;QACAM,UAAUb,MAAMa,QAAQ;QACxBC,mBAAmBd,MAAMe,kBAAkB;QAC3C,eAAef,MAAMgB,UAAU;QAC/B,cAAchB,MAAMiB,SAAS;QAC7BhB;QACAiB,KAAKlB,MAAMkB,GAAG,IAAIlB,MAAMmB,QAAQ;QAChCC,UAAUpB,MAAMqB,gBAAgB,GAC5BrB,MAAMqB,gBAAgB,CAACrB,SACvBA,MAAMsB,YAAY,GAClBtB,MAAMsB,YAAY,CAACtB,SACnBA,MAAMuB,IAAI,IAAIvB,MAAMoB,QAAQ;IAClC;AACF,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["MenuShim.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { ContextualMenuItemType } from '@fluentui/react';\nimport type { IContextualMenuItem } from '@fluentui/react';\nimport {\n MenuItem,\n MenuDivider,\n MenuGroup,\n MenuGroupHeader,\n MenuTrigger,\n Menu,\n MenuList,\n MenuPopover,\n MenuItemCheckbox,\n MenuDividerProps,\n} from '@fluentui/react-components';\n\nimport { shimMenuHeaderProps, shimMenuItemCheckboxProps, shimMenuItemProps, shimMenuProps } from './shimMenuProps';\n\nexport const MenuItemShim = (props: IContextualMenuItem) => {\n if (props.itemType === ContextualMenuItemType.Divider) {\n const shimProps = shimMenuItemProps(props);\n return <MenuDivider {...(shimProps as MenuDividerProps)} />;\n }\n\n if (props.itemType === ContextualMenuItemType.Section) {\n const shimProps = shimMenuHeaderProps(props);\n return (\n <MenuGroup>\n <MenuGroupHeader>{shimProps.children}</MenuGroupHeader>\n {/* //TODO: sectionProps handling */}\n {props.subMenuProps?.items.map(item => (\n // key is added through item spread\n // eslint-disable-next-line react/jsx-key\n <MenuItemShim {...item} />\n ))}\n </MenuGroup>\n );\n }\n\n if (props.canCheck) {\n const shimProps = shimMenuItemCheckboxProps(props);\n return <MenuItemCheckbox {...shimProps} />;\n }\n\n // Nested Menu to handle submenus\n if (props.subMenuProps?.items && props.subMenuProps.items.length > 0) {\n const shimmedMenuProps = shimMenuProps(props.subMenuProps);\n const shimmedItemProps = shimMenuItemProps(props);\n\n return (\n <Menu {...shimmedMenuProps}>\n <MenuTrigger>\n <MenuItem {...shimmedItemProps} hasSubmenu />\n </MenuTrigger>\n <MenuPopover>\n <MenuList>\n {props.subMenuProps.items.map(item => (\n // key is added through item spread\n // eslint-disable-next-line react/jsx-key\n <MenuItemShim {...item} />\n ))}\n </MenuList>\n </MenuPopover>\n </Menu>\n );\n }\n\n const shimProps = shimMenuItemProps(props);\n return <MenuItem {...shimProps} />;\n};\n"],"names":["React","ContextualMenuItemType","MenuItem","MenuDivider","MenuGroup","MenuGroupHeader","MenuTrigger","Menu","MenuList","MenuPopover","MenuItemCheckbox","shimMenuHeaderProps","shimMenuItemCheckboxProps","shimMenuItemProps","shimMenuProps","MenuItemShim","props","itemType","Divider","shimProps","Section","children","subMenuProps","items","map","item","canCheck","length","shimmedMenuProps","shimmedItemProps","hasSubmenu"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,sBAAsB,QAAQ,kBAAkB;AAEzD,SACEC,QAAQ,EACRC,WAAW,EACXC,SAAS,EACTC,eAAe,EACfC,WAAW,EACXC,IAAI,EACJC,QAAQ,EACRC,WAAW,EACXC,gBAAgB,QAEX,6BAA6B;AAEpC,SAASC,mBAAmB,EAAEC,yBAAyB,EAAEC,iBAAiB,EAAEC,aAAa,QAAQ,kBAAkB;AAEnH,OAAO,MAAMC,eAAe,CAACC
|
|
1
|
+
{"version":3,"sources":["MenuShim.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { ContextualMenuItemType } from '@fluentui/react';\nimport type { IContextualMenuItem } from '@fluentui/react';\nimport {\n MenuItem,\n MenuDivider,\n MenuGroup,\n MenuGroupHeader,\n MenuTrigger,\n Menu,\n MenuList,\n MenuPopover,\n MenuItemCheckbox,\n MenuDividerProps,\n} from '@fluentui/react-components';\n\nimport { shimMenuHeaderProps, shimMenuItemCheckboxProps, shimMenuItemProps, shimMenuProps } from './shimMenuProps';\n\nexport const MenuItemShim = (props: IContextualMenuItem) => {\n if (props.itemType === ContextualMenuItemType.Divider) {\n const shimProps = shimMenuItemProps(props);\n return <MenuDivider {...(shimProps as MenuDividerProps)} />;\n }\n\n if (props.itemType === ContextualMenuItemType.Section) {\n const shimProps = shimMenuHeaderProps(props);\n return (\n <MenuGroup>\n <MenuGroupHeader>{shimProps.children}</MenuGroupHeader>\n {/* //TODO: sectionProps handling */}\n {props.subMenuProps?.items.map(item => (\n // key is added through item spread\n // eslint-disable-next-line react/jsx-key\n <MenuItemShim {...item} />\n ))}\n </MenuGroup>\n );\n }\n\n if (props.canCheck) {\n const shimProps = shimMenuItemCheckboxProps(props);\n return <MenuItemCheckbox {...shimProps} />;\n }\n\n // Nested Menu to handle submenus\n if (props.subMenuProps?.items && props.subMenuProps.items.length > 0) {\n const shimmedMenuProps = shimMenuProps(props.subMenuProps);\n const shimmedItemProps = shimMenuItemProps(props);\n\n return (\n <Menu {...shimmedMenuProps}>\n <MenuTrigger>\n <MenuItem {...shimmedItemProps} hasSubmenu />\n </MenuTrigger>\n <MenuPopover>\n <MenuList>\n {props.subMenuProps.items.map(item => (\n // key is added through item spread\n // eslint-disable-next-line react/jsx-key\n <MenuItemShim {...item} />\n ))}\n </MenuList>\n </MenuPopover>\n </Menu>\n );\n }\n\n const shimProps = shimMenuItemProps(props);\n return <MenuItem {...shimProps} />;\n};\n"],"names":["React","ContextualMenuItemType","MenuItem","MenuDivider","MenuGroup","MenuGroupHeader","MenuTrigger","Menu","MenuList","MenuPopover","MenuItemCheckbox","shimMenuHeaderProps","shimMenuItemCheckboxProps","shimMenuItemProps","shimMenuProps","MenuItemShim","props","itemType","Divider","shimProps","Section","children","subMenuProps","items","map","item","canCheck","length","shimmedMenuProps","shimmedItemProps","hasSubmenu"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,sBAAsB,QAAQ,kBAAkB;AAEzD,SACEC,QAAQ,EACRC,WAAW,EACXC,SAAS,EACTC,eAAe,EACfC,WAAW,EACXC,IAAI,EACJC,QAAQ,EACRC,WAAW,EACXC,gBAAgB,QAEX,6BAA6B;AAEpC,SAASC,mBAAmB,EAAE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import { Icon } from '@fluentui/react';
|
|
3
3
|
export const shimMenuProps = (props)=>{
|
|
4
|
+
var _props, _props1;
|
|
4
5
|
return {
|
|
5
|
-
hasIcons: props === null ||
|
|
6
|
-
hasCheckmarks: props === null ||
|
|
6
|
+
hasIcons: (_props = props) === null || _props === void 0 ? void 0 : _props.items.some((i)=>i.iconProps),
|
|
7
|
+
hasCheckmarks: (_props1 = props) === null || _props1 === void 0 ? void 0 : _props1.items.some((i)=>i.canCheck || i.checked)
|
|
7
8
|
};
|
|
8
9
|
};
|
|
9
10
|
export const shimMenuItemProps = (props)=>{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["shimMenuProps.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { Icon } from '@fluentui/react';\nimport type { IContextualMenuItem, IContextualMenuProps } from '@fluentui/react';\nimport type { MenuItemProps, MenuGroupHeaderProps, MenuItemCheckboxProps, MenuProps } from '@fluentui/react-menu';\n\nexport const shimMenuProps = (props: IContextualMenuProps): Partial<MenuProps> => {\n return {\n hasIcons: props?.items.some(i => i.iconProps),\n hasCheckmarks: props?.items.some(i => i.canCheck || i.checked),\n };\n};\n\nexport const shimMenuItemProps = (props: IContextualMenuItem): MenuItemProps => {\n //TODO: Handle menuItem.onRenderIcon\n const icon = props.iconProps ? <Icon {...props.iconProps} /> : undefined;\n\n return {\n ...props,\n 'aria-label': props.ariaLabel,\n children: props.text,\n icon,\n secondaryContent: props.secondaryText,\n } as MenuItemProps;\n};\n\nexport const shimMenuItemCheckboxProps = (props: IContextualMenuItem): MenuItemCheckboxProps => {\n return {\n ...shimMenuItemProps(props),\n name: props.text || 'name',\n value: props.value || 'value',\n };\n};\n\nexport const shimMenuHeaderProps = (props: IContextualMenuItem): MenuGroupHeaderProps => {\n return {\n children: props.sectionProps?.title,\n };\n};\n"],"names":["React","Icon","shimMenuProps","props","hasIcons","items","some","i","iconProps","hasCheckmarks","canCheck","checked","shimMenuItemProps","icon","undefined","ariaLabel","children","text","secondaryContent","secondaryText","shimMenuItemCheckboxProps","name","value","shimMenuHeaderProps","sectionProps","title"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,IAAI,QAAQ,kBAAkB;AAIvC,OAAO,MAAMC,gBAAgB,CAACC,
|
|
1
|
+
{"version":3,"sources":["shimMenuProps.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { Icon } from '@fluentui/react';\nimport type { IContextualMenuItem, IContextualMenuProps } from '@fluentui/react';\nimport type { MenuItemProps, MenuGroupHeaderProps, MenuItemCheckboxProps, MenuProps } from '@fluentui/react-menu';\n\nexport const shimMenuProps = (props: IContextualMenuProps): Partial<MenuProps> => {\n return {\n hasIcons: props?.items.some(i => i.iconProps),\n hasCheckmarks: props?.items.some(i => i.canCheck || i.checked),\n };\n};\n\nexport const shimMenuItemProps = (props: IContextualMenuItem): MenuItemProps => {\n //TODO: Handle menuItem.onRenderIcon\n const icon = props.iconProps ? <Icon {...props.iconProps} /> : undefined;\n\n return {\n ...props,\n 'aria-label': props.ariaLabel,\n children: props.text,\n icon,\n secondaryContent: props.secondaryText,\n } as MenuItemProps;\n};\n\nexport const shimMenuItemCheckboxProps = (props: IContextualMenuItem): MenuItemCheckboxProps => {\n return {\n ...shimMenuItemProps(props),\n name: props.text || 'name',\n value: props.value || 'value',\n };\n};\n\nexport const shimMenuHeaderProps = (props: IContextualMenuItem): MenuGroupHeaderProps => {\n return {\n children: props.sectionProps?.title,\n };\n};\n"],"names":["React","Icon","shimMenuProps","props","hasIcons","items","some","i","iconProps","hasCheckmarks","canCheck","checked","shimMenuItemProps","icon","undefined","ariaLabel","children","text","secondaryContent","secondaryText","shimMenuItemCheckboxProps","name","value","shimMenuHeaderProps","sectionProps","title"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,IAAI,QAAQ,kBAAkB;AAIvC,OAAO,MAAMC,gBAAgB,CAACC;QAEhBA,QACKA;IAFjB,OAAO;QACLC,QAAQ,GAAED,SAAAA,mBAAAA,6BAAAA,OAAOE,KAAK,CAACC,IAAI,CAACC,CAAAA,IAAKA,EAAEC,SAAS;QAC5CC,aAAa,GAAEN,UAAAA,mBAAAA,8BAAAA,QAAOE,KAAK,CAACC,IAAI,CAACC,CAAAA,IAAKA,EAAEG,QAAQ,IAAIH,EAAEI,OAAO;IAC/D;AACF,EAAE;AAEF,OAAO,MAAMC,oBAAoB,CAACT;IAChC,oCAAoC;IACpC,MAAMU,OAAOV,MAAMK,SAAS,iBAAG,oBAACP,MAASE,MAAMK,SAAS,IAAOM;IAE/D,OAAO;QACL,GAAGX,KAAK;QACR,cAAcA,MAAMY,SAAS;QAC7BC,UAAUb,MAAMc,IAAI;QACpBJ;QACAK,kBAAkBf,MAAMgB,aAAa;IACvC;AACF,EAAE;AAEF,OAAO,MAAMC,4BAA4B,CAACjB;IACxC,OAAO;QACL,GAAGS,kBAAkBT,MAAM;QAC3BkB,MAAMlB,MAAMc,IAAI,IAAI;QACpBK,OAAOnB,MAAMmB,KAAK,IAAI;IACxB;AACF,EAAE;AAEF,OAAO,MAAMC,sBAAsB,CAACpB;QAEtBA;IADZ,OAAO;QACLa,QAAQ,GAAEb,sBAAAA,MAAMqB,YAAY,cAAlBrB,0CAAAA,oBAAoBsB,KAAK;IACrC;AACF,EAAE"}
|
|
@@ -5,7 +5,7 @@ const stackItemClassNames = {
|
|
|
5
5
|
root: 'ms-StackItem'
|
|
6
6
|
};
|
|
7
7
|
export const StackItemShim = (props)=>{
|
|
8
|
-
const { grow
|
|
8
|
+
const { grow, shrink, disableShrink, align, verticalFill, order, className, children } = props;
|
|
9
9
|
const styles = useStackItemShimStyles();
|
|
10
10
|
const alignSelfStyles = useFlexAlignSelfStyles();
|
|
11
11
|
const shrinkFlexStyles = useFlexShrinkStyles();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["StackItemShim.tsx"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport * as React from 'react';\nimport type { IStackItemProps } from '@fluentui/react';\n\nimport {\n useFlexAlignSelfStyles,\n useFlexGrowStyles,\n useFlexOrderStyles,\n useFlexShrinkStyles,\n useStackItemShimStyles,\n} from './StackItemShim.styles';\n\nconst stackItemClassNames = {\n root: 'ms-StackItem',\n};\n\nexport const StackItemShim = (props: IStackItemProps) => {\n const { grow, shrink, disableShrink, align, verticalFill, order, className, children } = props;\n\n const styles = useStackItemShimStyles();\n const alignSelfStyles = useFlexAlignSelfStyles();\n const shrinkFlexStyles = useFlexShrinkStyles();\n const growFlexStyles: Record<string, string> = useFlexGrowStyles();\n const orderFlexStyles: Record<string, string> = useFlexOrderStyles();\n\n const stackItemStyles = [styles.root, align && alignSelfStyles[align], verticalFill && styles.verticalFill];\n\n if (order) {\n stackItemStyles.push(orderFlexStyles[order]);\n }\n\n if (grow) {\n const flexGrow = grow === true ? growFlexStyles[1] : growFlexStyles[grow];\n stackItemStyles.push(flexGrow);\n }\n\n if (shrink && !disableShrink) {\n stackItemStyles.push(shrinkFlexStyles[1]);\n } else if (disableShrink || (!grow && !shrink)) {\n stackItemStyles.push(shrinkFlexStyles[0]);\n }\n\n if (disableShrink) {\n stackItemStyles.push(styles.disableShrink);\n }\n\n const rootStyles = mergeClasses(stackItemClassNames.root, ...stackItemStyles, className);\n\n return <div className={rootStyles}>{children}</div>;\n};\n"],"names":["mergeClasses","React","useFlexAlignSelfStyles","useFlexGrowStyles","useFlexOrderStyles","useFlexShrinkStyles","useStackItemShimStyles","stackItemClassNames","root","StackItemShim","props","grow","shrink","disableShrink","align","verticalFill","order","className","children","styles","alignSelfStyles","shrinkFlexStyles","growFlexStyles","orderFlexStyles","stackItemStyles","push","flexGrow","rootStyles","div"],"mappings":"AAAA,SAASA,YAAY,QAAQ,iBAAiB;AAC9C,YAAYC,WAAW,QAAQ;AAG/B,SACEC,sBAAsB,EACtBC,iBAAiB,EACjBC,kBAAkB,EAClBC,mBAAmB,EACnBC,sBAAsB,QACjB,yBAAyB;AAEhC,MAAMC,sBAAsB;IAC1BC,MAAM;AACR;AAEA,OAAO,MAAMC,gBAAgB,CAACC
|
|
1
|
+
{"version":3,"sources":["StackItemShim.tsx"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport * as React from 'react';\nimport type { IStackItemProps } from '@fluentui/react';\n\nimport {\n useFlexAlignSelfStyles,\n useFlexGrowStyles,\n useFlexOrderStyles,\n useFlexShrinkStyles,\n useStackItemShimStyles,\n} from './StackItemShim.styles';\n\nconst stackItemClassNames = {\n root: 'ms-StackItem',\n};\n\nexport const StackItemShim = (props: IStackItemProps) => {\n const { grow, shrink, disableShrink, align, verticalFill, order, className, children } = props;\n\n const styles = useStackItemShimStyles();\n const alignSelfStyles = useFlexAlignSelfStyles();\n const shrinkFlexStyles = useFlexShrinkStyles();\n const growFlexStyles: Record<string, string> = useFlexGrowStyles();\n const orderFlexStyles: Record<string, string> = useFlexOrderStyles();\n\n const stackItemStyles = [styles.root, align && alignSelfStyles[align], verticalFill && styles.verticalFill];\n\n if (order) {\n stackItemStyles.push(orderFlexStyles[order]);\n }\n\n if (grow) {\n const flexGrow = grow === true ? growFlexStyles[1] : growFlexStyles[grow];\n stackItemStyles.push(flexGrow);\n }\n\n if (shrink && !disableShrink) {\n stackItemStyles.push(shrinkFlexStyles[1]);\n } else if (disableShrink || (!grow && !shrink)) {\n stackItemStyles.push(shrinkFlexStyles[0]);\n }\n\n if (disableShrink) {\n stackItemStyles.push(styles.disableShrink);\n }\n\n const rootStyles = mergeClasses(stackItemClassNames.root, ...stackItemStyles, className);\n\n return <div className={rootStyles}>{children}</div>;\n};\n"],"names":["mergeClasses","React","useFlexAlignSelfStyles","useFlexGrowStyles","useFlexOrderStyles","useFlexShrinkStyles","useStackItemShimStyles","stackItemClassNames","root","StackItemShim","props","grow","shrink","disableShrink","align","verticalFill","order","className","children","styles","alignSelfStyles","shrinkFlexStyles","growFlexStyles","orderFlexStyles","stackItemStyles","push","flexGrow","rootStyles","div"],"mappings":"AAAA,SAASA,YAAY,QAAQ,iBAAi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exAlignItemsStyles();
|
|
14
14
|
const justifyContentFlexStyles = useFlexJustifyContentStyles();
|
|
15
15
|
const growFlexStyles = useFlexGrowStyles();
|
|
16
|
-
const { as: RootType = 'div'
|
|
16
|
+
const { as: RootType = 'div', verticalFill, horizontal, reversed, grow, wrap, horizontalAlign, verticalAlign, disableShrink, className } = props;
|
|
17
17
|
const tokens = {
|
|
18
18
|
...props.tokens
|
|
19
19
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["StackShim.tsx"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport { classNamesFunction } from '@fluentui/react';\nimport type { IStackProps, IStackTokens, IStackItemProps } from '@fluentui/react';\nimport * as React from 'react';\n\nimport { getChildrenGapStyles } from './stackUtils';\nimport type { StackShimStyles } from './stackUtils';\nimport {\n useFlexAlignItemsStyles,\n useFlexGrowStyles,\n useFlexJustifyContentStyles,\n useStackStyles,\n} from './StackShim.styles';\n\nconst stackClassNames = {\n root: 'ms-Stack',\n inner: 'ms-Stack-inner',\n};\n\nconst getClassNames = classNamesFunction<IStackProps, StackShimStyles>();\n\nexport const StackShim = (props: IStackProps) => {\n const styles = useStackStyles();\n const alignItemsFlexStyles = useFlexAlignItemsStyles();\n const justifyContentFlexStyles = useFlexJustifyContentStyles();\n const growFlexStyles: Record<string, string> = useFlexGrowStyles();\n\n const {\n as: RootType = 'div',\n verticalFill,\n horizontal,\n reversed,\n grow,\n wrap,\n horizontalAlign,\n verticalAlign,\n disableShrink,\n className,\n } = props;\n\n const tokens: IStackTokens = { ...props.tokens };\n\n let tokensRootStyles = {};\n let tokensInnerStyles = {};\n let childrenGapClassName;\n\n if (tokens) {\n tokensRootStyles = {\n padding: !wrap ? tokens.padding : undefined,\n maxHeight: tokens.maxHeight,\n maxWidth: tokens.maxWidth,\n };\n\n tokensInnerStyles = {\n padding: wrap ? tokens.padding : undefined,\n };\n\n if (tokens.childrenGap) {\n childrenGapClassName = getClassNames(getChildrenGapStyles, {\n horizontal,\n reversed,\n tokens,\n });\n }\n }\n\n const stackStyles = [\n wrap ? styles.wrap : styles.root,\n horizontal && styles.horizontal,\n verticalFill && styles.verticalFill,\n ];\n\n const stackInnerStyles = [\n styles.inner,\n horizontal && styles.horizontal,\n (!tokens || !tokens.childrenGap) && styles.innerWidth,\n ];\n\n let stackChildren = React.Children.toArray(props.children);\n if (\n stackChildren.length === 1 &&\n React.isValidElement(stackChildren[0]) &&\n stackChildren[0].type === React.Fragment\n ) {\n stackChildren = stackChildren[0].props.children;\n }\n\n stackChildren = React.Children.map(\n stackChildren as React.ReactElement[],\n (child: React.ReactElement<IStackItemProps>) => {\n if (!child) {\n return null;\n }\n\n if (child.type && ((child as React.ReactElement).type as React.ComponentType).name === 'StackItemShim') {\n const defaultItemProps: IStackItemProps = {\n shrink: !disableShrink,\n };\n\n return React.cloneElement(child, {\n ...defaultItemProps,\n ...child.props,\n });\n }\n\n return child;\n },\n );\n\n if (reversed) {\n if (horizontal) {\n stackStyles.push(styles.reversedHorizontal);\n stackInnerStyles.push(styles.reversedHorizontal);\n } else {\n stackStyles.push(styles.reversedVertical);\n stackInnerStyles.push(styles.reversedVertical);\n }\n }\n\n if (grow) {\n const flexGrow = grow === true ? growFlexStyles[1] : growFlexStyles[grow];\n stackStyles.push(flexGrow);\n }\n\n if (disableShrink) {\n stackStyles.push(styles.disableShrink);\n }\n\n if (horizontalAlign) {\n if (horizontal) {\n stackStyles.push(justifyContentFlexStyles[horizontalAlign]);\n stackInnerStyles.push(justifyContentFlexStyles[horizontalAlign]);\n } else {\n stackStyles.push(alignItemsFlexStyles[horizontalAlign]);\n stackInnerStyles.push(alignItemsFlexStyles[horizontalAlign]);\n }\n }\n\n if (verticalAlign) {\n if (horizontal) {\n stackStyles.push(alignItemsFlexStyles[verticalAlign]);\n stackInnerStyles.push(alignItemsFlexStyles[verticalAlign]);\n } else {\n stackStyles.push(justifyContentFlexStyles[verticalAlign]);\n stackInnerStyles.push(justifyContentFlexStyles[verticalAlign]);\n }\n }\n\n const rootClass = mergeClasses(\n stackClassNames.root,\n ...stackStyles,\n childrenGapClassName && !wrap && childrenGapClassName.root,\n className,\n );\n\n const innerClass = mergeClasses(\n stackClassNames.inner,\n ...stackInnerStyles,\n childrenGapClassName && wrap && childrenGapClassName.inner,\n );\n\n return wrap ? (\n <RootType className={rootClass} style={tokensRootStyles}>\n <div className={innerClass} style={tokensInnerStyles}>\n {stackChildren}\n </div>\n </RootType>\n ) : (\n <RootType className={rootClass} style={tokensRootStyles}>\n {stackChildren}\n </RootType>\n );\n};\n"],"names":["mergeClasses","classNamesFunction","React","getChildrenGapStyles","useFlexAlignItemsStyles","useFlexGrowStyles","useFlexJustifyContentStyles","useStackStyles","stackClassNames","root","inner","getClassNames","StackShim","props","styles","alignItemsFlexStyles","justifyContentFlexStyles","growFlexStyles","as","RootType","verticalFill","horizontal","reversed","grow","wrap","horizontalAlign","verticalAlign","disableShrink","className","tokens","tokensRootStyles","tokensInnerStyles","childrenGapClassName","padding","undefined","maxHeight","maxWidth","childrenGap","stackStyles","stackInnerStyles","innerWidth","stackChildren","Children","toArray","children","length","isValidElement","type","Fragment","map","child","name","defaultItemProps","shrink","cloneElement","push","reversedHorizontal","reversedVertical","flexGrow","rootClass","innerClass","style","div"],"mappings":"AAAA,SAASA,YAAY,QAAQ,iBAAiB;AAC9C,SAASC,kBAAkB,QAAQ,kBAAkB;AAErD,YAAYC,WAAW,QAAQ;AAE/B,SAASC,oBAAoB,QAAQ,eAAe;AAEpD,SACEC,uBAAuB,EACvBC,iBAAiB,EACjBC,2BAA2B,EAC3BC,cAAc,QACT,qBAAqB;AAE5B,MAAMC,kBAAkB;IACtBC,MAAM;IACNC,OAAO;AACT;AAEA,MAAMC,gBAAgBV;AAEtB,OAAO,MAAMW,YAAY,CAACC
|
|
1
|
+
{"version":3,"sources":["StackShim.tsx"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport { classNamesFunction } from '@fluentui/react';\nimport type { IStackProps, IStackTokens, IStackItemProps } from '@fluentui/react';\nimport * as React from 'react';\n\nimport { getChildrenGapStyles } from './stackUtils';\nimport type { StackShimStyles } from './stackUtils';\nimport {\n useFlexAlignItemsStyles,\n useFlexGrowStyles,\n useFlexJustifyContentStyles,\n useStackStyles,\n} from './StackShim.styles';\n\nconst stackClassNames = {\n root: 'ms-Stack',\n inner: 'ms-Stack-inner',\n};\n\nconst getClassNames = classNamesFunction<IStackProps, StackShimStyles>();\n\nexport const StackShim = (props: IStackProps) => {\n const styles = useStackStyles();\n const alignItemsFlexStyles = useFlexAlignItemsStyles();\n const justifyContentFlexStyles = useFlexJustifyContentStyles();\n const growFlexStyles: Record<string, string> = useFlexGrowStyles();\n\n const {\n as: RootType = 'div',\n verticalFill,\n horizontal,\n reversed,\n grow,\n wrap,\n horizontalAlign,\n verticalAlign,\n disableShrink,\n className,\n } = props;\n\n const tokens: IStackTokens = { ...props.tokens };\n\n let tokensRootStyles = {};\n let tokensInnerStyles = {};\n let childrenGapClassName;\n\n if (tokens) {\n tokensRootStyles = {\n padding: !wrap ? tokens.padding : undefined,\n maxHeight: tokens.maxHeight,\n maxWidth: tokens.maxWidth,\n };\n\n tokensInnerStyles = {\n padding: wrap ? tokens.padding : undefined,\n };\n\n if (tokens.childrenGap) {\n childrenGapClassName = getClassNames(getChildrenGapStyles, {\n horizontal,\n reversed,\n tokens,\n });\n }\n }\n\n const stackStyles = [\n wrap ? styles.wrap : styles.root,\n horizontal && styles.horizontal,\n verticalFill && styles.verticalFill,\n ];\n\n const stackInnerStyles = [\n styles.inner,\n horizontal && styles.horizontal,\n (!tokens || !tokens.childrenGap) && styles.innerWidth,\n ];\n\n let stackChildren = React.Children.toArray(props.children);\n if (\n stackChildren.length === 1 &&\n React.isValidElement(stackChildren[0]) &&\n stackChildren[0].type === React.Fragment\n ) {\n stackChildren = stackChildren[0].props.children;\n }\n\n stackChildren = React.Children.map(\n stackChildren as React.ReactElement[],\n (child: React.ReactElement<IStackItemProps>) => {\n if (!child) {\n return null;\n }\n\n if (child.type && ((child as React.ReactElement).type as React.ComponentType).name === 'StackItemShim') {\n const defaultItemProps: IStackItemProps = {\n shrink: !disableShrink,\n };\n\n return React.cloneElement(child, {\n ...defaultItemProps,\n ...child.props,\n });\n }\n\n return child;\n },\n );\n\n if (reversed) {\n if (horizontal) {\n stackStyles.push(styles.reversedHorizontal);\n stackInnerStyles.push(styles.reversedHorizontal);\n } else {\n stackStyles.push(styles.reversedVertical);\n stackInnerStyles.push(styles.reversedVertical);\n }\n }\n\n if (grow) {\n const flexGrow = grow === true ? growFlexStyles[1] : growFlexStyles[grow];\n stackStyles.push(flexGrow);\n }\n\n if (disableShrink) {\n stackStyles.push(styles.disableShrink);\n }\n\n if (horizontalAlign) {\n if (horizontal) {\n stackStyles.push(justifyContentFlexStyles[horizontalAlign]);\n stackInnerStyles.push(justifyContentFlexStyles[horizontalAlign]);\n } else {\n stackStyles.push(alignItemsFlexStyles[horizontalAlign]);\n stackInnerStyles.push(alignItemsFlexStyles[horizontalAlign]);\n }\n }\n\n if (verticalAlign) {\n if (horizontal) {\n stackStyles.push(alignItemsFlexStyles[verticalAlign]);\n stackInnerStyles.push(alignItemsFlexStyles[verticalAlign]);\n } else {\n stackStyles.push(justifyContentFlexStyles[verticalAlign]);\n stackInnerStyles.push(justifyContentFlexStyles[verticalAlign]);\n }\n }\n\n const rootClass = mergeClasses(\n stackClassNames.root,\n ...stackStyles,\n childrenGapClassName && !wrap && childrenGapClassName.root,\n className,\n );\n\n const innerClass = mergeClasses(\n stackClassNames.inner,\n ...stackInnerStyles,\n childrenGapClassName && wrap && childrenGapClassName.inner,\n );\n\n return wrap ? (\n <RootType className={rootClass} style={tokensRootStyles}>\n <div className={innerClass} style={tokensInnerStyles}>\n {stackChildren}\n </div>\n </RootType>\n ) : (\n <RootType className={rootClass} style={tokensRootStyles}>\n {stackChildren}\n </RootType>\n );\n};\n"],"names":["mergeClasses","classNamesFunction","React","getChildrenGapStyles","useFlexAlignItemsStyles","useFlexGrowStyles","useFlexJustifyContentStyles","useStackStyles","stackClassNames","root","inner","getClassNames","StackShim","props","styles","alignItemsFlexStyles","justifyContentFlexStyles","growFlexStyles","as","RootType","verticalFill","horizontal","reversed","grow","wrap","horizontalAlign","verticalAlign","disableShrink","className","tokens","tokensRootStyles","tokensInnerStyles","childrenGapClassName","padding","undefined","maxHeight","maxWidth","childrenGap","stackStyles","stackInnerStyles","innerWidth","stackChildren","Children","toArray","children","length","isValidElement","type","Fragment","map","child","name","defaultItemProps","shrink","cloneElement","push","reversedHorizontal","reversedVertical","flexGrow","rootClass","innerClass","style","div"],"mappings":"AAAA,SAASA,YAAY,QAAQ,iBAAiB;AAC9C,SAASC,kBAAkB,QAAQ,kBAAkB;AAErD,YAAYC,WAAW,QAAQ;AAE/B,SAASC,oBAAoB,QAAQ,eAAe;AAEpD,SACEC,uBAAuB,EACvBC,iBAAiB,EACjBC,2BAA2B,EAC3BC,cAAc,QACT,qBAAqB;AAE5B,MAAMC,kBAAkB;IACtBC,MAAM;IACNC,OAAO;AACT;AAEA,MAAMC,gBAAgBV;AAEtB,OAAO,MAAMW,YAAY,CAACC;IACxB,MAAMC,SAASP;IACf,MAAMQ,uBAAuBX;IAC7B,MAAMY,2BAA2BV;IACjC,MAAMW,iBAAyCZ;IAE/C,MAAM,EACJa,IAAIC,WAAW,KAAK,EACpBC,YAAY,EACZC,UAAU,EACVC,QAAQ,EACRC,IAAI,EACJC,IAAI,EACJC,eAAe,EACfC,aAAa,EACbC,aAAa,EACbC,SAAS,EACV,GAAGf;IAEJ,MAAMgB,SAAuB;QAAE,GAAGhB,MAAMgB,MAAM;IAAC;IAE/C,IAAIC,mBAAmB,CAAC;IACxB,IAAIC,oBAAoB,CAAC;IACzB,IAAIC;IAEJ,IAAIH,QAAQ;QACVC,mBAAmB;YACjBG,SAAS,CAACT,OAAOK,OAAOI,OAAO,GAAGC;YAClCC,WAAWN,OAAOM,SAAS;YAC3BC,UAAUP,OAAOO,QAAQ;QAC3B;QAEAL,o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B;OACpCW;AAGP,EAAE"}
|
|
@@ -97,11 +97,11 @@ const getValueUnitGap = (gap)=>{
|
|
|
97
97
|
* getStyles function for Stack.tokens.childrenGap prop styling
|
|
98
98
|
*/ export const getChildrenGapStyles = (props)=>{
|
|
99
99
|
const theme = getTheme();
|
|
100
|
-
const { horizontal
|
|
100
|
+
const { horizontal, reversed } = props;
|
|
101
101
|
const tokens = {
|
|
102
102
|
...props.tokens
|
|
103
103
|
};
|
|
104
|
-
const { rowGap
|
|
104
|
+
const { rowGap, columnGap } = parseGap(tokens.childrenGap, theme);
|
|
105
105
|
const horizontalMargin = `${-0.5 * columnGap.value}${columnGap.unit}`;
|
|
106
106
|
const verticalMargin = `${-0.5 * rowGap.value}${rowGap.unit}`;
|
|
107
107
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["stackUtils.ts"],"sourcesContent":["import { getTheme, IStackProps, IStackTokens, IStyle, ITheme } from '@fluentui/react';\n\n// Helper function that converts a themed spacing key (if given) to the corresponding themed spacing value.\nconst getThemedSpacing = (space: string, theme: ITheme): string => {\n if (theme.spacing.hasOwnProperty(space)) {\n return theme.spacing[space as keyof typeof theme.spacing];\n }\n return space;\n};\n\n// Helper function that takes a gap as a string and converts it into a { value, unit } representation.\nconst getValueUnitGap = (gap: string): { value: number; unit: string } => {\n const numericalPart = parseFloat(gap);\n const numericalValue = isNaN(numericalPart) ? 0 : numericalPart;\n const numericalString = isNaN(numericalPart) ? '' : numericalPart.toString();\n\n const unitPart = gap.substring(numericalString.toString().length);\n\n return {\n value: numericalValue,\n unit: unitPart || 'px',\n };\n};\n\n/**\n * Takes in a gap size in either a CSS-style format (e.g. 10 or \"10px\")\n * or a key of a themed spacing value (e.g. \"s1\").\n * Returns the separate numerical value of the padding (e.g. 10)\n * and the CSS unit (e.g. \"px\").\n */\nexport const parseGap = (\n gap: IStackProps['gap'],\n theme: ITheme,\n): { rowGap: { value: number; unit: string }; columnGap: { value: number; unit: string } } => {\n if (gap === undefined || gap === '') {\n return {\n rowGap: {\n value: 0,\n unit: 'px',\n },\n columnGap: {\n value: 0,\n unit: 'px',\n },\n };\n }\n\n if (typeof gap === 'number') {\n return {\n rowGap: {\n value: gap,\n unit: 'px',\n },\n columnGap: {\n value: gap,\n unit: 'px',\n },\n };\n }\n\n const splitGap = gap.split(' ');\n\n // If the array has more than two values, then return 0px.\n if (splitGap.length > 2) {\n return {\n rowGap: {\n value: 0,\n unit: 'px',\n },\n columnGap: {\n value: 0,\n unit: 'px',\n },\n };\n }\n\n // If the array has two values, then parse each one.\n if (splitGap.length === 2) {\n return {\n rowGap: getValueUnitGap(getThemedSpacing(splitGap[0], theme)),\n columnGap: getValueUnitGap(getThemedSpacing(splitGap[1], theme)),\n };\n }\n\n // Else, parse the numerical value and pass it as both the vertical and horizontal gap.\n const calculatedGap = getValueUnitGap(getThemedSpacing(gap, theme));\n\n return {\n rowGap: calculatedGap,\n columnGap: calculatedGap,\n };\n};\n\n/**\n * Takes in a padding in a CSS-style format (e.g. 10, \"10px\", \"10px 10px\", etc.)\n * where the separate padding values can also be the key of a themed spacing value\n * (e.g. \"s1 m\", \"10px l1 20px l2\", etc.).\n * Returns a CSS-style padding.\n */\nexport const parsePadding = (padding: number | string | undefined, theme: ITheme): number | string | undefined => {\n if (padding === undefined || typeof padding === 'number' || padding === '') {\n return padding;\n }\n\n const paddingValues = padding.split(' ');\n if (paddingValues.length < 2) {\n return getThemedSpacing(padding, theme);\n }\n\n return paddingValues.reduce((padding1: string, padding2: string) => {\n return getThemedSpacing(padding1, theme) + ' ' + getThemedSpacing(padding2, theme);\n });\n};\n\nexport interface StackShimStyles {\n root?: IStyle;\n inner?: IStyle;\n}\n/**\n *\n * getStyles function for Stack.tokens.childrenGap prop styling\n */\nexport const getChildrenGapStyles = (props: IStackProps): StackShimStyles => {\n const theme = getTheme();\n\n const { horizontal, reversed } = props;\n const tokens: IStackTokens = { ...props.tokens };\n\n const { rowGap, columnGap } = parseGap(tokens.childrenGap, theme);\n const horizontalMargin = `${-0.5 * columnGap.value}${columnGap.unit}`;\n const verticalMargin = `${-0.5 * rowGap.value}${rowGap.unit}`;\n\n return {\n root: [\n reversed &&\n horizontal && {\n '> *:not(:last-child)': {\n marginLeft: `${columnGap.value}${columnGap.unit}`,\n },\n },\n reversed &&\n !horizontal && {\n '> *:not(:last-child)': {\n marginTop: `${rowGap.value}${rowGap.unit}`,\n },\n },\n !reversed &&\n horizontal && {\n '> *:not(:first-child)': {\n marginLeft: `${columnGap.value}${columnGap.unit}`,\n },\n },\n !reversed &&\n !horizontal && {\n '> *:not(:first-child)': {\n marginTop: `${rowGap.value}${rowGap.unit}`,\n },\n },\n ],\n inner: [\n {\n marginLeft: horizontalMargin,\n marginRight: horizontalMargin,\n marginTop: verticalMargin,\n marginBottom: verticalMargin,\n width: columnGap.value === 0 ? '100%' : `calc(100% + ${columnGap.value}${columnGap.unit})`,\n '> *': {\n margin: `${0.5 * rowGap.value}${rowGap.unit} ${0.5 * columnGap.value}${columnGap.unit}`,\n },\n },\n horizontal && {\n height: rowGap.value === 0 ? '100%' : `calc(100% + ${rowGap.value}${rowGap.unit})`,\n '> *': {\n maxWidth: columnGap.value === 0 ? '100%' : `calc(100% - ${columnGap.value}${columnGap.unit})`,\n },\n },\n !horizontal && {\n height: `calc(100% + ${rowGap.value}${rowGap.unit})`,\n '> *': {\n maxHeight: rowGap.value === 0 ? '100%' : `calc(100% - ${rowGap.value}${rowGap.unit})`,\n },\n },\n ],\n };\n};\n"],"names":["getTheme","getThemedSpacing","space","theme","spacing","hasOwnProperty","getValueUnitGap","gap","numericalPart","parseFloat","numericalValue","isNaN","numericalString","toString","unitPart","substring","length","value","unit","parseGap","undefined","rowGap","columnGap","splitGap","split","calculatedGap","parsePadding","padding","paddingValues","reduce","padding1","padding2","getChildrenGapStyles","props","horizontal","reversed","tokens","childrenGap","horizontalMargin","verticalMargin","root","marginLeft","marginTop","inner","marginRight","marginBottom","width","margin","height","maxWidth","maxHeight"],"mappings":"AAAA,SAASA,QAAQ,QAAmD,kBAAkB;AAEtF,2GAA2G;AAC3G,MAAMC,mBAAmB,CAACC,OAAeC
|
|
1
|
+
{"version":3,"sources":["stackUtils.ts"],"sourcesContent":["import { getTheme, IStackProps, IStackTokens, IStyle, ITheme } from '@fluentui/react';\n\n// Helper function that converts a themed spacing key (if given) to the corresponding themed spacing value.\nconst getThemedSpacing = (space: string, theme: ITheme): string => {\n if (theme.spacing.hasOwnProperty(space)) {\n return theme.spacing[space as keyof typeof theme.spacing];\n }\n return space;\n};\n\n// Helper function that takes a gap as a string and converts it into a { value, unit } representation.\nconst getValueUnitGap = (gap: string): { value: number; unit: string } => {\n const numericalPart = parseFloat(gap);\n const numericalValue = isNaN(numericalPart) ? 0 : numericalPart;\n const numericalString = isNaN(numericalPart) ? '' : numericalPart.toString();\n\n const unitPart = gap.substring(numericalString.toString().length);\n\n return {\n value: numericalValue,\n unit: unitPart || 'px',\n };\n};\n\n/**\n * Takes in a gap size in either a CSS-style format (e.g. 10 or \"10px\")\n * or a key of a themed spacing value (e.g. \"s1\").\n * Returns the separate numerical value of the padding (e.g. 10)\n * and the CSS unit (e.g. \"px\").\n */\nexport const parseGap = (\n gap: IStackProps['gap'],\n theme: ITheme,\n): { rowGap: { value: number; unit: string }; columnGap: { value: number; unit: string } } => {\n if (gap === undefined || gap === '') {\n return {\n rowGap: {\n value: 0,\n unit: 'px',\n },\n columnGap: {\n value: 0,\n unit: 'px',\n },\n };\n }\n\n if (typeof gap === 'number') {\n return {\n rowGap: {\n value: gap,\n unit: 'px',\n },\n columnGap: {\n value: gap,\n unit: 'px',\n },\n };\n }\n\n const splitGap = gap.split(' ');\n\n // If the array has more than two values, then return 0px.\n if (splitGap.length > 2) {\n return {\n rowGap: {\n value: 0,\n unit: 'px',\n },\n columnGap: {\n value: 0,\n unit: 'px',\n },\n };\n }\n\n // If the array has two values, then parse each one.\n if (splitGap.length === 2) {\n return {\n rowGap: getValueUnitGap(getThemedSpacing(splitGap[0], theme)),\n columnGap: getValueUnitGap(getThemedSpacing(splitGap[1], theme)),\n };\n }\n\n // Else, parse the numerical value and pass it as both the vertical and horizontal gap.\n const calculatedGap = getValueUnitGap(getThemedSpacing(gap, theme));\n\n return {\n rowGap: calculatedGap,\n columnGap: calculatedGap,\n };\n};\n\n/**\n * Takes in a padding in a CSS-style format (e.g. 10, \"10px\", \"10px 10px\", etc.)\n * where the separate padding values can also be the key of a themed spacing value\n * (e.g. \"s1 m\", \"10px l1 20px l2\", etc.).\n * Returns a CSS-style padding.\n */\nexport const parsePadding = (padding: number | string | undefined, theme: ITheme): number | string | undefined => {\n if (padding === undefined || typeof padding === 'number' || padding === '') {\n return padding;\n }\n\n const paddingValues = padding.split(' ');\n if (paddingValues.length < 2) {\n return getThemedSpacing(padding, theme);\n }\n\n return paddingValues.reduce((padding1: string, padding2: string) => {\n return getThemedSpacing(padding1, theme) + ' ' + getThemedSpacing(padding2, theme);\n });\n};\n\nexport interface StackShimStyles {\n root?: IStyle;\n inner?: IStyle;\n}\n/**\n *\n * getStyles function for Stack.tokens.childrenGap prop styling\n */\nexport const getChildrenGapStyles = (props: IStackProps): StackShimStyles => {\n const theme = getTheme();\n\n const { horizontal, reversed } = props;\n const tokens: IStackTokens = { ...props.tokens };\n\n const { rowGap, columnGap } = parseGap(tokens.childrenGap, theme);\n const horizontalMargin = `${-0.5 * columnGap.value}${columnGap.unit}`;\n const verticalMargin = `${-0.5 * rowGap.value}${rowGap.unit}`;\n\n return {\n root: [\n reversed &&\n horizontal && {\n '> *:not(:last-child)': {\n marginLeft: `${columnGap.value}${columnGap.unit}`,\n },\n },\n reversed &&\n !horizontal && {\n '> *:not(:last-child)': {\n marginTop: `${rowGap.value}${rowGap.unit}`,\n },\n },\n !reversed &&\n horizontal && {\n '> *:not(:first-child)': {\n marginLeft: `${columnGap.value}${columnGap.unit}`,\n },\n },\n !reversed &&\n !horizontal && {\n '> *:not(:first-child)': {\n marginTop: `${rowGap.value}${rowGap.unit}`,\n },\n },\n ],\n inner: [\n {\n marginLeft: horizontalMargin,\n marginRight: horizontalMargin,\n marginTop: verticalMargin,\n marginBottom: verticalMargin,\n width: columnGap.value === 0 ? '100%' : `calc(100% + ${columnGap.value}${columnGap.unit})`,\n '> *': {\n margin: `${0.5 * rowGap.value}${rowGap.unit} ${0.5 * columnGap.value}${columnGap.unit}`,\n },\n },\n horizontal && {\n height: rowGap.value === 0 ? '100%' : `calc(100% + ${rowGap.value}${rowGap.unit})`,\n '> *': {\n maxWidth: columnGap.value === 0 ? '100%' : `calc(100% - ${columnGap.value}${columnGap.unit})`,\n },\n },\n !horizontal && {\n height: `calc(100% + ${rowGap.value}${rowGap.unit})`,\n '> *': {\n maxHeight: rowGap.value === 0 ? '100%' : `calc(100% - ${rowGap.value}${rowGap.unit})`,\n },\n },\n ],\n };\n};\n"],"names":["getTheme","getThemedSpacing","space","theme","spacing","hasOwnProperty","getValueUnitGap","gap","numericalPart","parseFloat","numericalValue","isNaN","numericalString","toString","unitPart","substring","length","value","unit","parseGap","undefined","rowGap","columnGap","splitGap","split","calculatedGap","parsePadding","padding","paddingValues","reduce","padding1","padding2","getChildrenGapStyles","props","horizontal","reversed","tokens","childrenGap","horizontalMargin","verticalMargin","root","marginLeft","marginTop","inner","marginRight","marginBottom","width","margin","height","maxWidth","maxHeight"],"mappings":"AAAA,SAASA,QAAQ,QAAmD,kBAAkB;AAEtF,2GAA2G;AAC3G,MAAMC,mBAAmB,CAACC,OAAeC;IACvC,IAAIA,MAAMC,OAAO,CAACC,cAAc,CAACH,QAAQ;QACvC,OAAOC,MAAMC,OAAO,CAACF,MAAoC;IAC3D;IACA,OAAOA;AACT;AAEA,sGAAsG;AACtG,MAAMI,kBAAkB,CAACC;IACvB,MAAMC,gBAAgBC,WAAWF;IACjC,MAAMG,iBAAiBC,MAAMH,iBAAiB,IAAIA;IAClD,MAAMI,kBAAkBD,MAAMH,iBAAiB,KAAKA,cAAcK,QAAQ;IAE1E,MAAMC,WAAWP,IAAIQ,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ACXM,cAAcN;gBACdO,OAAOxB,UAAUL,KAAK,KAAK,IAAI,SAAS,CAAC,YAAY,EAAEK,UAAUL,KAAK,CAAC,EAAEK,UAAUJ,IAAI,CAAC,CAAC,CAAC;gBAC1F,OAAO;oBACL6B,QAAQ,CAAC,EAAE,MAAM1B,OAAOJ,KAAK,CAAC,EAAEI,OAAOH,IAAI,CAAC,CAAC,EAAE,MAAMI,UAAUL,KAAK,CAAC,EAAEK,UAAUJ,IAAI,CAAC,CAAC;gBACzF;YACF;YACAgB,cAAc;gBACZc,QAAQ3B,OAAOJ,KAAK,KAAK,IAAI,SAAS,CAAC,YAAY,EAAEI,OAAOJ,KAAK,CAAC,EAAEI,OAAOH,IAAI,CAAC,CAAC,CAAC;gBAClF,OAAO;oBACL+B,UAAU3B,UAAUL,KAAK,KAAK,IAAI,SAAS,CAAC,YAAY,EAAEK,UAAUL,KAAK,CAAC,EAAEK,UAAUJ,IAAI,CAAC,CAAC,CAAC;gBAC/F;YACF;YACA,CAACgB,cAAc;gBACbc,QAAQ,CAAC,YAAY,EAAE3B,OAAOJ,KAAK,CAAC,EAAEI,OAAOH,IAAI,CAAC,CAAC,CAAC;gBACpD,OAAO;oBACLgC,WAAW7B,OAAOJ,KAAK,KAAK,IAAI,SAAS,CAAC,YAAY,EAAEI,OAAOJ,KAAK,CAAC,EAAEI,OAAOH,IAAI,CAAC,CAAC,CAAC;gBACvF;YACF;SACD;IACH;AACF,EAAE"}
|
|
@@ -289,6 +289,7 @@ const mappedSharedColors = {
|
|
|
289
289
|
* The v9 colors, fonts, and effects are applied on top of the v8 theme
|
|
290
290
|
* to allow v8 components to look as much like v9 components as possible.
|
|
291
291
|
*/ export const createV8Theme = (brandColors, themeV9, isDarkTheme = false, themeV8)=>{
|
|
292
|
+
var _themeV8;
|
|
292
293
|
const baseTheme = themeV8 || createTheme({
|
|
293
294
|
isInverted: isDarkTheme
|
|
294
295
|
});
|
|
@@ -299,6 +300,6 @@ const mappedSharedColors = {
|
|
|
299
300
|
semanticColors: mapSemanticColors(baseTheme.semanticColors, themeV9),
|
|
300
301
|
fonts: mapFonts(baseTheme.fonts, themeV9),
|
|
301
302
|
effects: mapEffects(baseTheme.effects, themeV9),
|
|
302
|
-
isInverted: isDarkTheme || (themeV8 === null ||
|
|
303
|
+
isInverted: isDarkTheme || ((_themeV8 = themeV8) === null || _themeV8 === void 0 ? void 0 : _themeV8.isInverted) === true
|
|
303
304
|
};
|
|
304
305
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["v8ThemeShim.ts"],"sourcesContent":["import type { IPalette, ISemanticColors, IFontStyles, IFontWeight, IEffects, Theme as ThemeV8 } from '@fluentui/react';\nimport { createTheme, DefaultPalette } from '@fluentui/react';\nimport { fluent2ComponentStyles } from '@fluentui/fluent2-theme';\n\nimport { BrandVariants, Theme as ThemeV9 } from '@fluentui/react-components';\n\nimport { black, blackAlpha, grey, sharedColors, white, whiteAlpha } from './themeDuplicates';\n\nconst mappedNeutrals = {\n black,\n blackTranslucent40: blackAlpha[40],\n neutralDark: grey[8],\n neutralPrimary: grey[14],\n neutralPrimaryAlt: grey[22],\n neutralSecondary: grey[36],\n neutralSecondaryAlt: grey[52],\n neutralTertiary: grey[62],\n neutralTertiaryAlt: grey[78],\n neutralQuaternary: grey[82],\n neutralQuaternaryAlt: grey[88],\n neutralLight: grey[92],\n neutralLighter: grey[96],\n neutralLighterAlt: grey[98],\n white,\n whiteTranslucent40: whiteAlpha[40],\n};\n\nconst invertedMappedNeutrals = {\n black: white,\n blackTranslucent40: whiteAlpha[40],\n neutralDark: grey[98],\n neutralPrimary: grey[96],\n neutralPrimaryAlt: grey[84],\n neutralSecondary: grey[82],\n neutralSecondaryAlt: grey[74],\n neutralTertiary: grey[44],\n neutralTertiaryAlt: grey[26],\n neutralQuaternary: grey[24],\n neutralQuaternaryAlt: grey[18],\n neutralLight: grey[16],\n neutralLighter: grey[14],\n neutralLighterAlt: grey[10],\n white: black,\n whiteTranslucent40: blackAlpha[40],\n};\n\nconst mappedSharedColors = {\n yellowDark: sharedColors.marigold.shade10,\n yellow: sharedColors.yellow.primary,\n yellowLight: sharedColors.yellow.tint40,\n orange: sharedColors.orange.primary,\n orangeLight: sharedColors.orange.tint20,\n orangeLighter: sharedColors.orange.tint40,\n redDark: sharedColors.darkRed.primary,\n red: sharedColors.red.primary,\n magentaDark: sharedColors.magenta.shade30,\n magenta: sharedColors.magenta.primary,\n magentaLight: sharedColors.magenta.tint30,\n purpleDark: sharedColors.darkPurple.primary,\n purple: sharedColors.purple.primary,\n purpleLight: sharedColors.purple.tint40,\n blueDark: sharedColors.darkBlue.primary,\n blueMid: sharedColors.royalBlue.primary,\n blue: sharedColors.blue.primary,\n blueLight: sharedColors.lightBlue.primary,\n tealDark: sharedColors.darkTeal.primary,\n teal: sharedColors.teal.primary,\n tealLight: sharedColors.lightTeal.primary,\n greenDark: sharedColors.darkGreen.primary,\n green: sharedColors.green.primary,\n greenLight: sharedColors.lightGreen.primary,\n};\n\n/**\n * Creates a v8 palette given a brand ramp\n */\nconst mapPalette = (brandColors: BrandVariants, inverted: boolean): IPalette => {\n const neutrals = inverted ? invertedMappedNeutrals : mappedNeutrals;\n const brands = inverted\n ? {\n themeDarker: brandColors[110],\n themeDark: brandColors[100],\n themeDarkAlt: brandColors[100],\n themePrimary: brandColors[90],\n themeSecondary: brandColors[90],\n themeTertiary: brandColors[60],\n themeLight: brandColors[50],\n themeLighter: brandColors[40],\n themeLighterAlt: brandColors[30],\n }\n : {\n themeDarker: brandColors[40],\n themeDark: brandColors[60],\n themeDarkAlt: brandColors[70],\n themePrimary: brandColors[80],\n themeSecondary: brandColors[90],\n themeTertiary: brandColors[120],\n themeLight: brandColors[140],\n themeLighter: brandColors[150],\n themeLighterAlt: brandColors[160],\n };\n\n return {\n ...DefaultPalette,\n ...neutrals,\n accent: brands.themePrimary,\n ...mappedSharedColors,\n ...brands,\n };\n};\n\n/**\n * Returns v9 theme colors overlaid on a base set of v8 semantic colors\n */\nconst mapSemanticColors = (baseColors: ISemanticColors, theme: ThemeV9): ISemanticColors => {\n return {\n ...baseColors,\n accentButtonBackground: theme.colorBrandBackground,\n accentButtonText: theme.colorNeutralForegroundOnBrand,\n actionLink: theme.colorNeutralForeground1,\n actionLinkHovered: theme.colorNeutralForeground1Hover,\n // blockingBackground,\n // blockingIcon,\n bodyBackground: theme.colorNeutralBackground1,\n bodyBackgroundChecked: theme.colorNeutralBackground1Selected,\n bodyBackgroundHovered: theme.colorNeutralBackground1Hover,\n bodyDivider: theme.colorNeutralStroke2,\n bodyFrameBackground: theme.colorNeutralBackground1,\n bodyFrameDivider: theme.colorNeutralStroke2,\n bodyStandoutBackground: theme.colorNeutralBackground2,\n bodySubtext: theme.colorNeutralForeground2,\n bodyText: theme.colorNeutralForeground1,\n bodyTextChecked: theme.colorNeutralForeground1Selected,\n buttonBackground: theme.colorNeutralBackground1,\n buttonBackgroundChecked: theme.colorNeutralBackground1Selected,\n buttonBackgroundCheckedHovered: theme.colorNeutralBackground1Hover,\n buttonBackgroundDisabled: theme.colorNeutralBackgroundDisabled,\n buttonBackgroundHovered: theme.colorNeutralBackground1Hover,\n buttonBackgroundPressed: theme.colorNeutralBackground1Pressed,\n buttonBorder: theme.colorNeutralStroke1,\n buttonBorderDisabled: theme.colorNeutralStrokeDisabled,\n buttonText: theme.colorNeutralForeground1,\n buttonTextChecked: theme.colorNeutralForeground1,\n buttonTextCheckedHovered: theme.colorNeutralForeground1,\n buttonTextDisabled: theme.colorNeutralForegroundDisabled,\n buttonTextHovered: theme.colorNeutralForeground1,\n buttonTextPressed: theme.colorNeutralForeground1,\n cardShadow: theme.shadow4,\n cardShadowHovered: theme.shadow8,\n cardStandoutBackground: theme.colorNeutralBackground1,\n defaultStateBackground: theme.colorNeutralBackground2,\n disabledBackground: theme.colorNeutralBackgroundDisabled,\n disabledBodySubtext: theme.colorNeutralForegroundDisabled,\n disabledBodyText: theme.colorNeutralForegroundDisabled,\n disabledBorder: theme.colorNeutralStrokeDisabled,\n disabledSubtext: theme.colorNeutralForegroundDisabled,\n disabledText: theme.colorNeutralForegroundDisabled,\n // errorBackground,\n // errorIcon,\n // errorText: ,\n focusBorder: theme.colorStrokeFocus2,\n // infoBackground,\n // infoIcon,\n inputBackground: theme.colorNeutralBackground1,\n inputBackgroundChecked: theme.colorBrandBackground,\n inputBackgroundCheckedHovered: theme.colorBrandBackgroundHover,\n inputBorder: theme.colorNeutralStrokeAccessible,\n inputBorderHovered: theme.colorNeutralStrokeAccessibleHover,\n inputFocusBorderAlt: theme.colorBrandStroke1,\n inputForegroundChecked: theme.colorNeutralForegroundOnBrand,\n inputIcon: theme.colorNeutralForeground3,\n inputIconDisabled: theme.colorNeutralForegroundDisabled,\n inputIconHovered: theme.colorNeutralForeground3,\n inputPlaceholderBackgroundChecked: theme.colorBrandBackgroundInvertedSelected,\n inputPlaceholderText: theme.colorNeutralForeground4,\n inputText: theme.colorNeutralForeground1,\n inputTextHovered: theme.colorNeutralForeground1Hover,\n link: theme.colorBrandForegroundLink,\n linkHovered: theme.colorBrandForegroundLinkHover,\n listBackground: theme.colorNeutralBackground1,\n listHeaderBackgroundHovered: theme.colorNeutralBackground1Hover,\n listHeaderBackgroundPressed: theme.colorNeutralBackground1Pressed,\n listItemBackgroundChecked: theme.colorNeutralBackground1Selected,\n listItemBackgroundCheckedHovered: theme.colorNeutralBackground1Selected,\n listItemBackgroundHovered: theme.colorNeutralBackground1Hover,\n listText: theme.colorNeutralForeground1,\n listTextColor: theme.colorNeutralForeground1,\n menuBackground: theme.colorNeutralBackground1,\n menuDivider: theme.colorNeutralStroke2,\n menuHeader: theme.colorNeutralForeground3,\n menuIcon: theme.colorNeutralForeground1,\n menuItemBackgroundChecked: theme.colorNeutralBackground1,\n menuItemBackgroundHovered: theme.colorNeutralBackground1Hover,\n menuItemBackgroundPressed: theme.colorNeutralBackground1Hover,\n menuItemText: theme.colorNeutralForeground1,\n menuItemTextHovered: theme.colorNeutralForeground1Hover,\n messageLink: theme.colorBrandForegroundLink,\n messageLinkHovered: theme.colorBrandForegroundLinkHover,\n messageText: theme.colorNeutralForeground1,\n primaryButtonBackground: theme.colorBrandBackground,\n primaryButtonBackgroundDisabled: theme.colorNeutralBackgroundDisabled,\n primaryButtonBackgroundHovered: theme.colorBrandBackgroundHover,\n primaryButtonBackgroundPressed: theme.colorBrandBackgroundPressed,\n primaryButtonBorder: theme.colorTransparentStroke,\n primaryButtonText: theme.colorNeutralForegroundOnBrand,\n primaryButtonTextDisabled: theme.colorNeutralForegroundDisabled,\n primaryButtonTextHovered: theme.colorNeutralForegroundOnBrand,\n primaryButtonTextPressed: theme.colorNeutralForegroundOnBrand,\n // severeWarningBackground,\n // severeWarningIcon,\n // smallInputBorder,\n // successBackground,\n // successIcon,\n // successText: ,\n // variantBorder,\n // variantBorderHovered,\n // warningBackground,\n // warningHighlight,\n // warningIcon,\n // warningText: ,\n };\n};\n\n/**\n * Overlays v9 fonts on a set of base v8 fonts.\n */\nconst mapFonts = (baseFonts: IFontStyles, theme: ThemeV9): IFontStyles => {\n return {\n ...baseFonts,\n tiny: {\n ...baseFonts.tiny,\n fontFamily: theme.fontFamilyBase,\n fontSize: theme.fontSizeBase100,\n fontWeight: theme.fontWeightRegular as IFontWeight,\n },\n xSmall: {\n ...baseFonts.xSmall,\n fontFamily: theme.fontFamilyBase,\n fontSize: theme.fontSizeBase100,\n fontWeight: theme.fontWeightRegular as IFontWeight,\n },\n small: {\n ...baseFonts.small,\n fontFamily: theme.fontFamilyBase,\n fontSize: theme.fontSizeBase200,\n fontWeight: theme.fontWeightRegular as IFontWeight,\n },\n smallPlus: {\n ...baseFonts.smallPlus,\n fontFamily: theme.fontFamilyBase,\n fontSize: theme.fontSizeBase200,\n fontWeight: theme.fontWeightRegular as IFontWeight,\n },\n medium: {\n ...baseFonts.medium,\n fontFamily: theme.fontFamilyBase,\n fontSize: theme.fontSizeBase300,\n fontWeight: theme.fontWeightRegular as IFontWeight,\n },\n mediumPlus: {\n ...baseFonts.mediumPlus,\n fontFamily: theme.fontFamilyBase,\n fontSize: theme.fontSizeBase400,\n fontWeight: theme.fontWeightRegular as IFontWeight,\n },\n large: {\n ...baseFonts.large,\n fontFamily: theme.fontFamilyBase,\n fontSize: theme.fontSizeBase400,\n fontWeight: theme.fontWeightRegular as IFontWeight,\n },\n xLarge: {\n ...baseFonts.xxLarge,\n fontFamily: theme.fontFamilyBase,\n fontSize: theme.fontSizeBase500,\n fontWeight: theme.fontWeightSemibold as IFontWeight,\n },\n xxLarge: {\n ...baseFonts.xxLarge,\n fontFamily: theme.fontFamilyBase,\n fontSize: theme.fontSizeHero700,\n fontWeight: theme.fontWeightSemibold as IFontWeight,\n },\n superLarge: {\n ...baseFonts.superLarge,\n fontFamily: theme.fontFamilyBase,\n fontSize: theme.fontSizeHero900,\n fontWeight: theme.fontWeightSemibold as IFontWeight,\n },\n mega: {\n ...baseFonts.mega,\n fontFamily: theme.fontFamilyBase,\n fontSize: theme.fontSizeHero1000,\n fontWeight: theme.fontWeightSemibold as IFontWeight,\n },\n };\n};\n\n/**\n * Overlays v9 shadows and border radii on a base set of v8 effects.\n */\nconst mapEffects = (baseEffects: IEffects, theme: ThemeV9): IEffects => {\n return {\n ...baseEffects,\n elevation4: theme.shadow4,\n elevation8: theme.shadow8,\n elevation16: theme.shadow16,\n elevation64: theme.shadow64,\n roundedCorner2: theme.borderRadiusSmall,\n roundedCorner4: theme.borderRadiusMedium,\n roundedCorner6: theme.borderRadiusLarge,\n };\n};\n\n/**\n * Creates a v8 theme from v9 brand colors and theme.\n * You can optionally pass a v8 base theme.\n * Otherwise the default v8 theme is used.\n *\n * The v9 colors, fonts, and effects are applied on top of the v8 theme\n * to allow v8 components to look as much like v9 components as possible.\n */\nexport const createV8Theme = (\n brandColors: BrandVariants,\n themeV9: ThemeV9,\n isDarkTheme: boolean = false,\n themeV8?: ThemeV8,\n): ThemeV8 => {\n const baseTheme = themeV8 || createTheme({ isInverted: isDarkTheme });\n\n return {\n ...baseTheme,\n palette: mapPalette(brandColors, isDarkTheme),\n components: fluent2ComponentStyles,\n semanticColors: mapSemanticColors(baseTheme.semanticColors, themeV9),\n fonts: mapFonts(baseTheme.fonts, themeV9),\n effects: mapEffects(baseTheme.effects, themeV9),\n isInverted: isDarkTheme || themeV8?.isInverted === true,\n };\n};\n"],"names":["createTheme","DefaultPalette","fluent2ComponentStyles","black","blackAlpha","grey","sharedColors","white","whiteAlpha","mappedNeutrals","blackTranslucent40","neutralDark","neutralPrimary","neutralPrimaryAlt","neutralSecondary","neutralSecondaryAlt","neutralTertiary","neutralTertiaryAlt","neutralQuaternary","neutralQuaternaryAlt","neutralLight","neutralLighter","neutralLighterAlt","whiteTranslucent40","invertedMappedNeutrals","mappedSharedColors","yellowDark","marigold","shade10","yellow","primary","yellowLight","tint40","orange","orangeLight","tint20","orangeLighter","redDark","darkRed","red","magentaDark","magenta","shade30","magentaLight","tint30","purpleDark","darkPurple","purple","purpleLight","blueDark","darkBlue","blueMid","royalBlue","blue","blueLight","lightBlue","tealDark","darkTeal","teal","tealLight","lightTeal","greenDark","darkGreen","green","greenLight","lightGreen","mapPalette","brandColors","inverted","neutrals","brands","themeDarker","themeDark","themeDarkAlt","themePrimary","themeSecondary","themeTertiary","themeLight","themeLighter","themeLighterAlt","accent","mapSemanticColors","baseColors","theme","accentButtonBackground","colorBrandBackground","accentButtonText","colorNeutralForegroundOnBrand","actionLink","colorNeutralForeground1","actionLinkHovered","colorNeutralForeground1Hover","bodyBackground","colorNeutralBackground1","bodyBackgroundChecked","colorNeutralBackground1Selected","bodyBackgroundHovered","colorNeutralBackground1Hover","bodyDivider","colorNeutralStroke2","bodyFrameBackground","bodyFrameDivider","bodyStandoutBackground","colorNeutralBackground2","bodySubtext","colorNeutralForeground2","bodyText","bodyTextChecked","colorNeutralForeground1Selected","buttonBackground","buttonBackgroundChecked","buttonBackgroundCheckedHovered","buttonBackgroundDisabled","colorNeutralBackgroundDisabled","buttonBackgroundHovered","buttonBackgroundPressed","colorNeutralBackground1Pressed","buttonBorder","colorNeutralStroke1","buttonBorderDisabled","colorNeutralStrokeDisabled","buttonText","buttonTextChecked","buttonTextCheckedHovered","buttonTextDisabled","colorNeutralForegroundDisabled","buttonTextHovered","buttonTextPressed","cardShadow","shadow4","cardShadowHovered","shadow8","cardStandoutBackground","defaultStateBackground","disabledBackground","disabledBodySubtext","disabledBodyText","disabledBorder","disabledSubtext","disabledText","focusBorder","colorStrokeFocus2","inputBackground","inputBackgroundChecked","inputBackgroundCheckedHovered","colorBrandBackgroundHover","inputBorder","colorNeutralStrokeAccessible","inputBorderHovered","colorNeutralStrokeAccessibleHover","inputFocusBorderAlt","colorBrandStroke1","inputForegroundChecked","inputIcon","colorNeutralForeground3","inputIconDisabled","inputIconHovered","inputPlaceholderBackgroundChecked","colorBrandBackgroundInvertedSelected","inputPlaceholderText","colorNeutralForeground4","inputText","inputTextHovered","link","colorBrandForegroundLink","linkHovered","colorBrandForegroundLinkHover","listBackground","listHeaderBackgroundHovered","listHeaderBackgroundPressed","listItemBackgroundChecked","listItemBackgroundCheckedHovered","listItemBackgroundHovered","listText","listTextColor","menuBackground","menuDivider","menuHeader","menuIcon","menuItemBackgroundChecked","menuItemBackgroundHovered","menuItemBackgroundPressed","menuItemText","menuItemTextHovered","messageLink","messageLinkHovered","messageText","primaryButtonBackground","primaryButtonBackgroundDisabled","primaryButtonBackgroundHovered","primaryButtonBackgroundPressed","colorBrandBackgroundPressed","primaryButtonBorder","colorTransparentStroke","primaryButtonText","primaryButtonTextDisabled","primaryButtonTextHovered","primaryButtonTextPressed","mapFonts","baseFonts","tiny","fontFamily","fontFamilyBase","fontSize","fontSizeBase100","fontWeight","fontWeightRegular","xSmall","small","fontSizeBase200","smallPlus","medium","fontSizeBase300","mediumPlus","fontSizeBase400","large","xLarge","xxLarge","fontSizeBase500","fontWeightSemibold","fontSizeHero700","superLarge","fontSizeHero900","mega","fontSizeHero1000","mapEffects","baseEffects","elevation4","elevation8","elevation16","shadow16","elevation64","shadow64","roundedCorner2","borderRadiusSmall","roundedCorner4","borderRadiusMedium","roundedCorner6","borderRadiusLarge","createV8Theme","themeV9","isDarkTheme","themeV8","baseTheme","isInverted","palette","components","semanticColors","fonts","effects"],"mappings":"AACA,SAASA,WAAW,EAAEC,cAAc,QAAQ,kBAAkB;AAC9D,SAASC,sBAAsB,QAAQ,0BAA0B;AAIjE,SAASC,KAAK,EAAEC,UAAU,EAAEC,IAAI,EAAEC,YAAY,EAAEC,KAAK,EAAEC,UAAU,QAAQ,oBAAoB;AAE7F,MAAMC,iBAAiB;IACrBN;IACAO,oBAAoBN,UAAU,CAAC,GAAG;IAClCO,aAAaN,IAAI,CAAC,EAAE;IACpBO,gBAAgBP,IAAI,CAAC,GAAG;IACxBQ,mBAAmBR,IAAI,CAAC,GAAG;IAC3BS,kBAAkBT,IAAI,CAAC,GAAG;IAC1BU,qBAAqBV,IAAI,CAAC,GAAG;IAC7BW,iBAAiBX,IAAI,CAAC,GAAG;IACzBY,oBAAoBZ,IAAI,CAAC,GAAG;IAC5Ba,mBAAmBb,IAAI,CAAC,GAAG;IAC3Bc,sBAAsBd,IAAI,CAAC,GAAG;IAC9Be,cAAcf,IAAI,CAAC,GAAG;IACtBgB,gBAAgBhB,IAAI,CAAC,GAAG;IACxBiB,mBAAmBjB,IAAI,CAAC,GAAG;IAC3BE;IACAgB,oBAAoBf,UAAU,CAAC,GAAG;AACpC;AAEA,MAAMgB,yBAAyB;IAC7BrB,OAAOI;IACPG,oBAAoBF,UAAU,CAAC,GAAG;IAClCG,aAAaN,IAAI,CAAC,GAAG;IACrBO,gBAAgBP,IAAI,CAAC,GAAG;IACxBQ,mBAAmBR,IAAI,CAAC,GAAG;IAC3BS,kBAAkBT,IAAI,CAAC,GAAG;IAC1BU,qBAAqBV,IAAI,CAAC,GAAG;IAC7BW,iBAAiBX,IAAI,CAAC,GAAG;IACzBY,oBAAoBZ,IAAI,CAAC,GAAG;IAC5Ba,mBAAmBb,IAAI,CAAC,GAAG;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;QACL,GAAGE,SAAS;QACZE,SAASnL,WAAWC,aAAa8K;QACjCK,YAAYpP;QACZqP,gBAAgBtK,kBAAkBkK,UAAUI,cAAc,EAAEP;QAC5DQ,OAAOlD,SAAS6C,UAAUK,KAAK,EAAER;QACjCS,SAASxB,WAAWkB,UAAUM,OAAO,EAAET;QACvCI,YAAYH,eAAeC,CAAAA,oBAAAA,qBAAAA,KAAAA,IAAAA,QAASE,UAAU,AAAD,MAAM,IAAI;IACzD;AACF,EAAE"}
|
|
1
|
+
{"version":3,"sources":["v8ThemeShim.ts"],"sourcesContent":["import type { IPalette, ISemanticColors, IFontStyles, IFontWeight, IEffects, Theme as ThemeV8 } from '@fluentui/react';\nimport { createTheme, DefaultPalette } from '@fluentui/react';\nimport { fluent2ComponentStyles } from '@fluentui/fluent2-theme';\n\nimport { BrandVariants, Theme as ThemeV9 } from '@fluentui/react-components';\n\nimport { black, blackAlpha, grey, sharedColors, white, whiteAlpha } from './themeDuplicates';\n\nconst mappedNeutrals = {\n black,\n blackTranslucent40: blackAlpha[40],\n neutralDark: grey[8],\n neutralPrimary: grey[14],\n neutralPrimaryAlt: grey[22],\n neutralSecondary: grey[36],\n neutralSecondaryAlt: grey[52],\n neutralTertiary: grey[62],\n neutralTertiaryAlt: grey[78],\n neutralQuaternary: grey[82],\n neutralQuaternaryAlt: grey[88],\n neutralLight: grey[92],\n neutralLighter: grey[96],\n neutralLighterAlt: grey[98],\n white,\n whiteTranslucent40: whiteAlpha[40],\n};\n\nconst invertedMappedNeutrals = {\n black: white,\n blackTranslucent40: whiteAlpha[40],\n neutralDark: grey[98],\n neutralPrimary: grey[96],\n neutralPrimaryAlt: grey[84],\n neutralSecondary: grey[82],\n neutralSecondaryAlt: grey[74],\n neutralTertiary: grey[44],\n neutralTertiaryAlt: grey[26],\n neutralQuaternary: grey[24],\n neutralQuaternaryAlt: grey[18],\n neutralLight: grey[16],\n neutralLighter: grey[14],\n neutralLighterAlt: grey[10],\n white: black,\n whiteTranslucent40: blackAlpha[40],\n};\n\nconst mappedSharedColors = {\n yellowDark: sharedColors.marigold.shade10,\n yellow: sharedColors.yellow.primary,\n yellowLight: sharedColors.yellow.tint40,\n orange: sharedColors.orange.primary,\n orangeLight: sharedColors.orange.tint20,\n orangeLighter: sharedColors.orange.tint40,\n redDark: sharedColors.darkRed.primary,\n red: sharedColors.red.primary,\n magentaDark: sharedColors.magenta.shade30,\n magenta: sharedColors.magenta.primary,\n magentaLight: sharedColors.magenta.tint30,\n purpleDark: sharedColors.darkPurple.primary,\n purple: sharedColors.purple.primary,\n purpleLight: sharedColors.purple.tint40,\n blueDark: sharedColors.darkBlue.primary,\n blueMid: sharedColors.royalBlue.primary,\n blue: sharedColors.blue.primary,\n blueLight: sharedColors.lightBlue.primary,\n tealDark: sharedColors.darkTeal.primary,\n teal: sharedColors.teal.primary,\n tealLight: sharedColors.lightTeal.primary,\n greenDark: sharedColors.darkGreen.primary,\n green: sharedColors.green.primary,\n greenLight: sharedColors.lightGreen.primary,\n};\n\n/**\n * Creates a v8 palette given a brand ramp\n */\nconst mapPalette = (brandColors: BrandVariants, inverted: boolean): IPalette => {\n const neutrals = inverted ? invertedMappedNeutrals : mappedNeutrals;\n const brands = inverted\n ? {\n themeDarker: brandColors[110],\n themeDark: brandColors[100],\n themeDarkAlt: brandColors[100],\n themePrimary: brandColors[90],\n themeSecondary: brandColors[90],\n themeTertiary: brandColors[60],\n themeLight: brandColors[50],\n themeLighter: brandColors[40],\n themeLighterAlt: brandColors[30],\n }\n : {\n themeDarker: brandColors[40],\n themeDark: brandColors[60],\n themeDarkAlt: brandColors[70],\n themePrimary: brandColors[80],\n themeSecondary: brandColors[90],\n themeTertiary: brandColors[120],\n themeLight: brandColors[140],\n themeLighter: brandColors[150],\n themeLighterAlt: brandColors[160],\n };\n\n return {\n ...DefaultPalette,\n ...neutrals,\n accent: brands.themePrimary,\n ...mappedSharedColors,\n ...brands,\n };\n};\n\n/**\n * Returns v9 theme colors overlaid on a base set of v8 semantic colors\n */\nconst mapSemanticColors = (baseColors: ISemanticColors, theme: ThemeV9): ISemanticColors => {\n return {\n ...baseColors,\n accentButtonBackground: theme.colorBrandBackground,\n accentButtonText: theme.colorNeutralForegroundOnBrand,\n actionLink: theme.colorNeutralForeground1,\n actionLinkHovered: theme.colorNeutralForeground1Hover,\n // blockingBackground,\n // blockingIcon,\n bodyBackground: theme.colorNeutralBackground1,\n bodyBackgroundChecked: theme.colorNeutralBackground1Selected,\n bodyBackgroundHovered: theme.colorNeutralBackground1Hover,\n bodyDivider: theme.colorNeutralStroke2,\n bodyFrameBackground: theme.colorNeutralBackground1,\n bodyFrameDivider: theme.colorNeutralStroke2,\n bodyStandoutBackground: theme.colorNeutralBackground2,\n bodySubtext: theme.colorNeutralForeground2,\n bodyText: theme.colorNeutralForeground1,\n bodyTextChecked: theme.colorNeutralForeground1Selected,\n buttonBackground: theme.colorNeutralBackground1,\n buttonBackgroundChecked: theme.colorNeutralBackground1Selected,\n buttonBackgroundCheckedHovered: theme.colorNeutralBackground1Hover,\n buttonBackgroundDisabled: theme.colorNeutralBackgroundDisabled,\n buttonBackgroundHovered: theme.colorNeutralBackground1Hover,\n buttonBackgroundPressed: theme.colorNeutralBackground1Pressed,\n buttonBorder: theme.colorNeutralStroke1,\n buttonBorderDisabled: theme.colorNeutralStrokeDisabled,\n buttonText: theme.colorNeutralForeground1,\n buttonTextChecked: theme.colorNeutralForeground1,\n buttonTextCheckedHovered: theme.colorNeutralForeground1,\n buttonTextDisabled: theme.colorNeutralForegroundDisabled,\n buttonTextHovered: theme.colorNeutralForeground1,\n buttonTextPressed: theme.colorNeutralForeground1,\n cardShadow: theme.shadow4,\n cardShadowHovered: theme.shadow8,\n cardStandoutBackground: theme.colorNeutralBackground1,\n defaultStateBackground: theme.colorNeutralBackground2,\n disabledBackground: theme.colorNeutralBackgroundDisabled,\n disabledBodySubtext: theme.colorNeutralForegroundDisabled,\n disabledBodyText: theme.colorNeutralForegroundDisabled,\n disabledBorder: theme.colorNeutralStrokeDisabled,\n disabledSubtext: theme.colorNeutralForegroundDisabled,\n disabledText: theme.colorNeutralForegroundDisabled,\n // errorBackground,\n // errorIcon,\n // errorText: ,\n focusBorder: theme.colorStrokeFocus2,\n // infoBackground,\n // infoIcon,\n inputBackground: theme.colorNeutralBackground1,\n inputBackgroundChecked: theme.colorBrandBackground,\n inputBackgroundCheckedHovered: theme.colorBrandBackgroundHover,\n inputBorder: theme.colorNeutralStrokeAccessible,\n inputBorderHovered: theme.colorNeutralStrokeAccessibleHover,\n inputFocusBorderAlt: theme.colorBrandStroke1,\n inputForegroundChecked: theme.colorNeutralForegroundOnBrand,\n inputIcon: theme.colorNeutralForeground3,\n inputIconDisabled: theme.colorNeutralForegroundDisabled,\n inputIconHovered: theme.colorNeutralForeground3,\n inputPlaceholderBackgroundChecked: theme.colorBrandBackgroundInvertedSelected,\n inputPlaceholderText: theme.colorNeutralForeground4,\n inputText: theme.colorNeutralForeground1,\n inputTextHovered: theme.colorNeutralForeground1Hover,\n link: theme.colorBrandForegroundLink,\n linkHovered: theme.colorBrandForegroundLinkHover,\n listBackground: theme.colorNeutralBackground1,\n listHeaderBackgroundHovered: theme.colorNeutralBackground1Hover,\n listHeaderBackgroundPressed: theme.colorNeutralBackground1Pressed,\n listItemBackgroundChecked: theme.colorNeutralBackground1Selected,\n listItemBackgroundCheckedHovered: theme.colorNeutralBackground1Selected,\n listItemBackgroundHovered: theme.colorNeutralBackground1Hover,\n listText: theme.colorNeutralForeground1,\n listTextColor: theme.colorNeutralForeground1,\n menuBackground: theme.colorNeutralBackground1,\n menuDivider: theme.colorNeutralStroke2,\n menuHeader: theme.colorNeutralForeground3,\n menuIcon: theme.colorNeutralForeground1,\n menuItemBackgroundChecked: theme.colorNeutralBackground1,\n menuItemBackgroundHovered: theme.colorNeutralBackground1Hover,\n menuItemBackgroundPressed: theme.colorNeutralBackground1Hover,\n menuItemText: theme.colorNeutralForeground1,\n menuItemTextHovered: theme.colorNeutralForeground1Hover,\n messageLink: theme.colorBrandForegroundLink,\n messageLinkHovered: theme.colorBrandForegroundLinkHover,\n messageText: theme.colorNeutralForeground1,\n primaryButtonBackground: theme.colorBrandBackground,\n primaryButtonBackgroundDisabled: theme.colorNeutralBackgroundDisabled,\n primaryButtonBackgroundHovered: theme.colorBrandBackgroundHover,\n primaryButtonBackgroundPressed: theme.colorBrandBackgroundPressed,\n primaryButtonBorder: theme.colorTransparentStroke,\n primaryButtonText: theme.colorNeutralForegroundOnBrand,\n primaryButtonTextDisabled: theme.colorNeutralForegroundDisabled,\n primaryButtonTextHovered: theme.colorNeutralForegroundOnBrand,\n primaryButtonTextPressed: theme.colorNeutralForegroundOnBrand,\n // severeWarningBackground,\n // severeWarningIcon,\n // smallInputBorder,\n // successBackground,\n // successIcon,\n // successText: ,\n // variantBorder,\n // variantBorderHovered,\n // warningBackground,\n // warningHighlight,\n // warningIcon,\n // warningText: ,\n };\n};\n\n/**\n * Overlays v9 fonts on a set of base v8 fonts.\n */\nconst mapFonts = (baseFonts: IFontStyles, theme: ThemeV9): IFontStyles => {\n return {\n ...baseFonts,\n tiny: {\n ...baseFonts.tiny,\n fontFamily: theme.fontFamilyBase,\n fontSize: theme.fontSizeBase100,\n fontWeight: theme.fontWeightRegular as IFontWeight,\n },\n xSmall: {\n ...baseFonts.xSmall,\n fontFamily: theme.fontFamilyBase,\n fontSize: theme.fontSizeBase100,\n fontWeight: theme.fontWeightRegular as IFontWeight,\n },\n small: {\n ...baseFonts.small,\n fontFamily: theme.fontFamilyBase,\n fontSize: theme.fontSizeBase200,\n fontWeight: theme.fontWeightRegular as IFontWeight,\n },\n smallPlus: {\n ...baseFonts.smallPlus,\n fontFamily: theme.fontFamilyBase,\n fontSize: theme.fontSizeBase200,\n fontWeight: theme.fontWeightRegular as IFontWeight,\n },\n medium: {\n ...baseFonts.medium,\n fontFamily: theme.fontFamilyBase,\n fontSize: theme.fontSizeBase300,\n fontWeight: theme.fontWeightRegular as IFontWeight,\n },\n mediumPlus: {\n ...baseFonts.mediumPlus,\n fontFamily: theme.fontFamilyBase,\n fontSize: theme.fontSizeBase400,\n fontWeight: theme.fontWeightRegular as IFontWeight,\n },\n large: {\n ...baseFonts.large,\n fontFamily: theme.fontFamilyBase,\n fontSize: theme.fontSizeBase400,\n fontWeight: theme.fontWeightRegular as IFontWeight,\n },\n xLarge: {\n ...baseFonts.xxLarge,\n fontFamily: theme.fontFamilyBase,\n fontSize: theme.fontSizeBase500,\n fontWeight: theme.fontWeightSemibold as IFontWeight,\n },\n xxLarge: {\n ...baseFonts.xxLarge,\n fontFamily: theme.fontFamilyBase,\n fontSize: theme.fontSizeHero700,\n fontWeight: theme.fontWeightSemibold as IFontWeight,\n },\n superLarge: {\n ...baseFonts.superLarge,\n fontFamily: theme.fontFamilyBase,\n fontSize: theme.fontSizeHero900,\n fontWeight: theme.fontWeightSemibold as IFontWeight,\n },\n mega: {\n ...baseFonts.mega,\n fontFamily: theme.fontFamilyBase,\n fontSize: theme.fontSizeHero1000,\n fontWeight: theme.fontWeightSemibold as IFontWeight,\n },\n };\n};\n\n/**\n * Overlays v9 shadows and border radii on a base set of v8 effects.\n */\nconst mapEffects = (baseEffects: IEffects, theme: ThemeV9): IEffects => {\n return {\n ...baseEffects,\n elevation4: theme.shadow4,\n elevation8: theme.shadow8,\n elevation16: theme.shadow16,\n elevation64: theme.shadow64,\n roundedCorner2: theme.borderRadiusSmall,\n roundedCorner4: theme.borderRadiusMedium,\n roundedCorner6: theme.borderRadiusLarge,\n };\n};\n\n/**\n * Creates a v8 theme from v9 brand colors and theme.\n * You can optionally pass a v8 base theme.\n * Otherwise the default v8 theme is used.\n *\n * The v9 colors, fonts, and effects are applied on top of the v8 theme\n * to allow v8 components to look as much like v9 components as possible.\n */\nexport const createV8Theme = (\n brandColors: BrandVariants,\n themeV9: ThemeV9,\n isDarkTheme: boolean = false,\n themeV8?: ThemeV8,\n): ThemeV8 => {\n const baseTheme = themeV8 || createTheme({ isInverted: isDarkTheme });\n\n return {\n ...baseTheme,\n palette: mapPalette(brandColors, isDarkTheme),\n components: fluent2ComponentStyles,\n semanticColors: mapSemanticColors(baseTheme.semanticColors, themeV9),\n fonts: mapFonts(baseTheme.fonts, themeV9),\n effects: mapEffects(baseTheme.effects, themeV9),\n isInverted: isDarkTheme || themeV8?.isInverted === true,\n };\n};\n"],"names":["createTheme","DefaultPalette","fluent2ComponentStyles","black","blackAlpha","grey","sharedColors","white","whiteAlpha","mappedNeutrals","blackTranslucent40","neutralDark","neutralPrimary","neutralPrimaryAlt","neutralSecondary","neutralSecondaryAlt","neutralTertiary","neutralTertiaryAlt","neutralQuaternary","neutralQuaternaryAlt","neutralLight","neutralLighter","neutralLighterAlt","whiteTranslucent40","invertedMappedNeutrals","mappedSharedColors","yellowDark","marigold","shade10","yellow","primary","yellowLight","tint40","orange","orangeLight","tint20","orangeLighter","redDark","darkRed","red","magentaDark","magenta","shade30","magentaLight","tint30","purpleDark","darkPurple","purple","purpleLight","blueDark","darkBlue","blueMid","royalBlue","blue","blueLight","lightBlue","tealDark","darkTeal","teal","tealLight","lightTeal","greenDark","darkGreen","green","greenLight","lightGreen","mapPalette","brandColors","inverted","neutrals","brands","themeDarker","themeDark","themeDarkAlt","themePrimary","themeSecondary","themeTertiary","themeLight","themeLighter","themeLighterAlt","accent","mapSemanticColors","baseColors","theme","accentButtonBackground","colorBrandBackground","accentButtonText","colorNeutralForegroundOnBrand","actionLink","colorNeutralForeground1","actionLinkHovered","colorNeutralForeground1Hover","bodyBackground","colorNeutralBackground1","bodyBackgroundChecked","colorNeutralBackground1Selected","bodyBackgroundHovered","colorNeutralBackground1Hover","bodyDivider","colorNeutralStroke2","bodyFrameBackground","bodyFrameDivider","bodyStandoutBackground","colorNeutralBackground2","bodySubtext","colorNeutralForeground2","bodyText","bodyTextChecked","colorNeutralForeground1Selected","buttonBackground","buttonBackgroundChecked","buttonBackgroundCheckedHovered","buttonBackgroundDisabled","colorNeutralBackgroundDisabled","buttonBackgroundHovered","buttonBackgroundPressed","colorNeutralBackground1Pressed","buttonBorder","colorNeutralStroke1","buttonBorderDisabled","colorNeutralStrokeDisabled","buttonText","buttonTextChecked","buttonTextCheckedHovered","buttonTextDisabled","colorNeutralForegroundDisabled","buttonTextHovered","buttonTextPressed","cardShadow","shadow4","cardShadowHovered","shadow8","cardStandoutBackground","defaultStateBackground","disabledBackground","disabledBodySubtext","disabledBodyText","disabledBorder","disabledSubtext","disabledText","focusBorder","colorStrokeFocus2","inputBackground","inputBackgroundChecked","inputBackgroundCheckedHovered","colorBrandBackgroundHover","inputBorder","colorNeutralStrokeAccessible","inputBorderHovered","colorNeutralStrokeAccessibleHover","inputFocusBorderAlt","colorBrandStroke1","inputForegroundChecked","inputIcon","colorNeutralForeground3","inputIconDisabled","inputIconHovered","inputPlaceholderBackgroundChecked","colorBrandBackgroundInvertedSelected","inputPlaceholderText","colorNeutralForeground4","inputText","inputTextHovered","link","colorBrandForegroundLink","linkHovered","colorBrandForegroundLinkHover","listBackground","listHeaderBackgroundHovered","listHeaderBackgroundPressed","listItemBackgroundChecked","listItemBackgroundCheckedHovered","listItemBackgroundHovered","listText","listTextColor","menuBackground","menuDivider","menuHeader","menuIcon","menuItemBackgroundChecked","menuItemBackgroundHovered","menuItemBackgroundPressed","menuItemText","menuItemTextHovered","messageLink","messageLinkHovered","messageText","primaryButtonBackground","primaryButtonBackgroundDisabled","primaryButtonBackgroundHovered","primaryButtonBackgroundPressed","colorBrandBackgroundPressed","primaryButtonBorder","colorTransparentStroke","primaryButtonText","primaryButtonTextDisabled","primaryButtonTextHovered","primaryButtonTextPressed","mapFonts","baseFonts","tiny","fontFamily","fontFamilyBase","fontSize","fontSizeBase100","fontWeight","fontWeightRegular","xSmall","small","fontSizeBase200","smallPlus","medium","fontSizeBase300","mediumPlus","fontSizeBase400","large","xLarge","xxLarge","fontSizeBase500","fontWeightSemibold","fontSizeHero700","superLarge","fontSizeHero900","mega","fontSizeHero1000","mapEffects","baseEffects","elevation4","elevation8","elevation16","shadow16","elevation64","shadow64","roundedCorner2","borderRadiusSmall","roundedCorner4","borderRadiusMedium","roundedCorner6","borderRadiusLarge","createV8Theme","themeV9","isDarkTheme","themeV8","baseTheme","isInverted","palette","components","semanticColors","fonts","effects"],"mappings":"AACA,SAASA,WAAW,EAAEC,cAAc,QAAQ,kBAAkB;AAC9D,SAASC,sBAAsB,QAAQ,0BAA0B;AAIjE,SAASC,KAAK,EAAEC,UAAU,EAAEC,IAAI,EAAEC,YAAY,EAAEC,KAAK,EAAEC,UAAU,QAAQ,oBAAoB;AAE7F,MAAMC,iBAAiB;IACrBN;IACAO,oBAAoBN,UAAU,CAAC,GAAG;IAClCO,aAAaN,IAAI,CAAC,EAAE;IACpBO,gBAAgBP,IAAI,CAAC,GAAG;IACxBQ,mBAAmBR,IAAI,CAAC,GAAG;IAC3BS,kBAAkBT,IAAI,CAAC,GAAG;IAC1BU,qBAAqBV,IAAI,CAAC,GAAG;IAC7BW,iBAAiBX,IAAI,CAAC,GAAG;IACzBY,oBAAoBZ,IAAI,CAAC,GAAG;IAC5Ba,mBAAmBb,IAAI,CAAC,GAAG;IAC3Bc,sBAAsBd,IAAI,CAAC,GAAG;IAC9Be,cAAcf,IAAI,CAAC,GAAG;IACtBgB,gBAAgBhB,IAAI,CAAC,GAAG;IACxBiB,mBAAmBjB,IAAI,CAAC,GAAG;IAC3BE;IACAgB,oBAAoBf,UAAU,CAAC,GAAG;AACpC;AAEA,MAAMgB,yBAAyB;IAC7BrB,OAAOI;IACPG,oBAAoBF,UAAU,CAAC,GAAG;IAClCG,aAAaN,IAAI,CAAC,GAAG;IACrBO,gBAAgBP,IAAI,CAAC,GAAG;IACxBQ,mBAAmBR,IAAI,CAAC,GAAG;IAC3BS,kBAAkBT,IAAI,CAAC,GAAG;IAC1BU,qBAAqBV,IAAI,CAAC,GAAG;IAC7BW,iBAAiBX,IAAI,CAAC,GAAG;IACzBY,oBAAoBZ,IAAI,CAAC,GAAG;IAC5Ba,mBAAmBb,IAAI,CAAC,GAAG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