@fluentui/react-migration-v8-v9 9.74.7-experimental.cli-api.20261006-ccaa611d58.0 → 9.75.0-experimental.css-modules.20261031-810ab07afb.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +52 -6
- package/lib/components/Button/ActionButtonShim.js.map +1 -1
- package/lib/components/Button/ButtonShim.js.map +1 -1
- package/lib/components/Button/CommandButtonShim.js.map +1 -1
- 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/index.js.map +1 -1
- package/lib/components/Button/shimButtonProps.js +1 -1
- package/lib/components/Button/shimButtonProps.js.map +1 -1
- package/lib/components/Checkbox/Checkbox.module.css +5 -0
- package/lib/components/Checkbox/Checkbox.styles.css.js +2 -0
- package/lib/components/Checkbox/Checkbox.styles.css.js.map +1 -0
- package/lib/components/Checkbox/Checkbox.styles.raw.css.js +2 -0
- package/lib/components/Checkbox/Checkbox.styles.raw.css.js.map +1 -0
- package/lib/components/Checkbox/Checkbox.styles.raw.js.map +1 -1
- package/lib/components/Checkbox/CheckboxShim.js +3 -3
- package/lib/components/Checkbox/CheckboxShim.js.map +1 -1
- package/lib/components/Checkbox/index.js.map +1 -1
- package/lib/components/Checkbox/shimCheckboxProps.js.map +1 -1
- package/lib/components/Menu/MenuShim.js.map +1 -1
- package/lib/components/Menu/index.js.map +1 -1
- package/lib/components/Menu/shimMenuProps.js.map +1 -1
- package/lib/components/Stack/StackItemShim.js.map +1 -1
- package/lib/components/Stack/StackItemShim.module.css +138 -0
- package/lib/components/Stack/StackItemShim.styles.css.js +46 -0
- package/lib/components/Stack/StackItemShim.styles.css.js.map +1 -0
- package/lib/components/Stack/StackItemShim.styles.raw.css.js +46 -0
- package/lib/components/Stack/StackItemShim.styles.raw.css.js.map +1 -0
- package/lib/components/Stack/StackItemShim.styles.raw.js.map +1 -1
- package/lib/components/Stack/StackShim.js.map +1 -1
- package/lib/components/Stack/StackShim.module.css +152 -0
- package/lib/components/Stack/StackShim.styles.css.js +42 -0
- package/lib/components/Stack/StackShim.styles.css.js.map +1 -0
- package/lib/components/Stack/StackShim.styles.raw.css.js +42 -0
- package/lib/components/Stack/StackShim.styles.raw.css.js.map +1 -0
- package/lib/components/Stack/StackShim.styles.raw.js.map +1 -1
- package/lib/components/Stack/index.js.map +1 -1
- package/lib/components/Stack/stackUtils.js.map +1 -1
- package/lib/components/Theme/index.js.map +1 -1
- package/lib/components/Theme/themeDuplicates.js.map +1 -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/components/utils.js.map +1 -1
- package/lib-commonjs/components/Button/ActionButtonShim.cjs.map +1 -1
- package/lib-commonjs/components/Button/ButtonShim.cjs.map +1 -1
- package/lib-commonjs/components/Button/CommandButtonShim.cjs.map +1 -1
- package/lib-commonjs/components/Button/CompoundButtonShim.cjs.map +1 -1
- package/lib-commonjs/components/Button/DefaultButtonShim.cjs.map +1 -1
- package/lib-commonjs/components/Button/MenuButtonShim.cjs.map +1 -1
- package/lib-commonjs/components/Button/PrimaryButtonShim.cjs.map +1 -1
- package/lib-commonjs/components/Button/ToggleButtonShim.cjs.map +1 -1
- package/lib-commonjs/components/Button/index.cjs +10 -10
- package/lib-commonjs/components/Button/index.cjs.map +1 -1
- package/lib-commonjs/components/Button/shimButtonProps.cjs +1 -1
- package/lib-commonjs/components/Button/shimButtonProps.cjs.map +1 -1
- package/lib-commonjs/components/Checkbox/Checkbox.module.css +5 -0
- package/lib-commonjs/components/Checkbox/Checkbox.styles.css.cjs +13 -0
- package/lib-commonjs/components/Checkbox/Checkbox.styles.css.cjs.map +1 -0
- package/lib-commonjs/components/Checkbox/Checkbox.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/Checkbox/Checkbox.styles.raw.css.cjs +13 -0
- package/lib-commonjs/components/Checkbox/Checkbox.styles.raw.css.cjs.map +1 -0
- package/lib-commonjs/components/Checkbox/CheckboxShim.cjs +3 -3
- package/lib-commonjs/components/Checkbox/CheckboxShim.cjs.map +1 -1
- package/lib-commonjs/components/Checkbox/index.cjs.map +1 -1
- package/lib-commonjs/components/Checkbox/shimCheckboxProps.cjs.map +1 -1
- package/lib-commonjs/components/Menu/MenuShim.cjs.map +1 -1
- package/lib-commonjs/components/Menu/index.cjs +6 -6
- package/lib-commonjs/components/Menu/index.cjs.map +1 -1
- package/lib-commonjs/components/Menu/shimMenuProps.cjs +5 -5
- package/lib-commonjs/components/Menu/shimMenuProps.cjs.map +1 -1
- package/lib-commonjs/components/Stack/StackItemShim.cjs.map +1 -1
- package/lib-commonjs/components/Stack/StackItemShim.module.css +138 -0
- package/lib-commonjs/components/Stack/StackItemShim.styles.cjs +6 -6
- package/lib-commonjs/components/Stack/StackItemShim.styles.cjs.map +1 -1
- package/lib-commonjs/components/Stack/StackItemShim.styles.css.cjs +73 -0
- package/lib-commonjs/components/Stack/StackItemShim.styles.css.cjs.map +1 -0
- package/lib-commonjs/components/Stack/StackItemShim.styles.raw.cjs +6 -6
- package/lib-commonjs/components/Stack/StackItemShim.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/Stack/StackItemShim.styles.raw.css.cjs +73 -0
- package/lib-commonjs/components/Stack/StackItemShim.styles.raw.css.cjs.map +1 -0
- package/lib-commonjs/components/Stack/StackShim.cjs.map +1 -1
- package/lib-commonjs/components/Stack/StackShim.module.css +152 -0
- package/lib-commonjs/components/Stack/StackShim.styles.cjs +5 -5
- package/lib-commonjs/components/Stack/StackShim.styles.cjs.map +1 -1
- package/lib-commonjs/components/Stack/StackShim.styles.css.cjs +66 -0
- package/lib-commonjs/components/Stack/StackShim.styles.css.cjs.map +1 -0
- package/lib-commonjs/components/Stack/StackShim.styles.raw.cjs +5 -5
- package/lib-commonjs/components/Stack/StackShim.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/Stack/StackShim.styles.raw.css.cjs +66 -0
- package/lib-commonjs/components/Stack/StackShim.styles.raw.css.cjs.map +1 -0
- package/lib-commonjs/components/Stack/index.cjs +3 -3
- package/lib-commonjs/components/Stack/index.cjs.map +1 -1
- package/lib-commonjs/components/Stack/stackUtils.cjs +4 -4
- package/lib-commonjs/components/Stack/stackUtils.cjs.map +1 -1
- package/lib-commonjs/components/Theme/index.cjs +22 -22
- package/lib-commonjs/components/Theme/index.cjs.map +1 -1
- package/lib-commonjs/components/Theme/themeDuplicates.cjs +19 -19
- package/lib-commonjs/components/Theme/themeDuplicates.cjs.map +1 -1
- package/lib-commonjs/components/Theme/v8ThemeShim.cjs.map +1 -1
- package/lib-commonjs/components/Theme/v9BrandVariantsShim.cjs.map +1 -1
- package/lib-commonjs/components/Theme/v9ThemeShim.cjs.map +1 -1
- package/lib-commonjs/components/utils.cjs.map +1 -1
- package/lib-commonjs/index.cjs +34 -34
- package/lib-commonjs/index.cjs.map +1 -1
- package/package.json +10 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,18 +1,64 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-migration-v8-v9
|
|
2
2
|
|
|
3
|
-
<!-- This log was last generated on
|
|
3
|
+
<!-- This log was last generated on Sat, 31 Oct 2026 11:08:48 GMT and should not be manually modified. -->
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## [9.
|
|
7
|
+
## [9.75.0-experimental.css-modules.20261031-810ab07afb.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-migration-v8-v9_v9.75.0-experimental.css-modules.20261031-810ab07afb.0)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-migration-v8-v9_v9.10.
|
|
9
|
+
Sat, 31 Oct 2026 11:08:48 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-migration-v8-v9_v9.10.23..@fluentui/react-migration-v8-v9_v9.75.0-experimental.css-modules.20261031-810ab07afb.0)
|
|
11
11
|
|
|
12
12
|
### Changes
|
|
13
13
|
|
|
14
|
-
- Release 9.
|
|
15
|
-
- Bump @fluentui/react-components to v9.
|
|
14
|
+
- Release 9.75.0-experimental.css-modules.20261031-810ab07afb ([commit](https://github.com/microsoft/fluentui/commit/undefined) by 257645319+office-ogx-auth-helper[bot]@users.noreply.github.com)
|
|
15
|
+
- Bump @fluentui/react-components to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
16
|
+
|
|
17
|
+
## [9.10.23](https://github.com/microsoft/fluentui/tree/@fluentui/react-migration-v8-v9_v9.10.23)
|
|
18
|
+
|
|
19
|
+
Tue, 27 Oct 2026 16:42:57 GMT
|
|
20
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-migration-v8-v9_v9.10.22..@fluentui/react-migration-v8-v9_v9.10.23)
|
|
21
|
+
|
|
22
|
+
### Patches
|
|
23
|
+
|
|
24
|
+
- Bump @fluentui/react-components to v9.75.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
25
|
+
|
|
26
|
+
## [9.10.22](https://github.com/microsoft/fluentui/tree/@fluentui/react-migration-v8-v9_v9.10.22)
|
|
27
|
+
|
|
28
|
+
Thu, 22 Oct 2026 11:25:58 GMT
|
|
29
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-migration-v8-v9_v9.10.21..@fluentui/react-migration-v8-v9_v9.10.22)
|
|
30
|
+
|
|
31
|
+
### Patches
|
|
32
|
+
|
|
33
|
+
- Bump @fluentui/react-components to v9.74.11 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
34
|
+
|
|
35
|
+
## [9.10.21](https://github.com/microsoft/fluentui/tree/@fluentui/react-migration-v8-v9_v9.10.21)
|
|
36
|
+
|
|
37
|
+
Mon, 19 Oct 2026 16:49:01 GMT
|
|
38
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-migration-v8-v9_v9.10.20..@fluentui/react-migration-v8-v9_v9.10.21)
|
|
39
|
+
|
|
40
|
+
### Patches
|
|
41
|
+
|
|
42
|
+
- Bump @fluentui/react-components to v9.74.10 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
43
|
+
|
|
44
|
+
## [9.10.20](https://github.com/microsoft/fluentui/tree/@fluentui/react-migration-v8-v9_v9.10.20)
|
|
45
|
+
|
|
46
|
+
Wed, 23 Sep 2026 09:04:33 GMT
|
|
47
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-migration-v8-v9_v9.10.19..@fluentui/react-migration-v8-v9_v9.10.20)
|
|
48
|
+
|
|
49
|
+
### Patches
|
|
50
|
+
|
|
51
|
+
- Bump @fluentui/react-components to v9.74.9 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
52
|
+
|
|
53
|
+
## [9.10.19](https://github.com/microsoft/fluentui/tree/@fluentui/react-migration-v8-v9_v9.10.19)
|
|
54
|
+
|
|
55
|
+
Tue, 22 Sep 2026 11:25:40 GMT
|
|
56
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-migration-v8-v9_v9.10.18..@fluentui/react-migration-v8-v9_v9.10.19)
|
|
57
|
+
|
|
58
|
+
### Patches
|
|
59
|
+
|
|
60
|
+
- fix: remove unused react-dom and @types/react-dom peer dependencies, mark @types/react as optional ([PR #36559](https://github.com/microsoft/fluentui/pull/36559) by martinhochel@microsoft.com)
|
|
61
|
+
- Bump @fluentui/react-components to v9.74.8 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
16
62
|
|
|
17
63
|
## [9.10.18](https://github.com/microsoft/fluentui/tree/@fluentui/react-migration-v8-v9_v9.10.18)
|
|
18
64
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Button/ActionButtonShim.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport type { IButtonProps } from '@fluentui/react';\n\nimport { Button } from '@fluentui/react-components';\nimport type { RefAttributes } from '@fluentui/react-utilities';\n\nimport { shimButtonProps } from './shimButtonProps';\n\n/**\n * Shims a v8 ActionButton to render a v9 Button\n */\nexport const ActionButtonShim: React.ForwardRefExoticComponent<\n IButtonProps &\n // eslint-disable-next-line @typescript-eslint/no-restricted-types -- this is expected in order to be compatible with v8, as every v8 interface contains `React.RefAttributes` to accept ref as string\n 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 RefAttributes<HTMLButtonElement>)} {...shimProps} appearance=\"transparent\" />;\n});\n"],"names":["React","Button","shimButtonProps","ActionButtonShim","forwardRef","props","_ref","variantProps","variantClassName","shimProps","appearance"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAI/B,SAASC,MAAM,QAAQ,6BAA6B;AAGpD,SAASC,eAAe,QAAQ,uBAAoB;AAEpD;;CAEC,GACD,OAAO,MAAMC,iCAITH,MAAMI,UAAU,CAAC,CAACC,OAAOC;IAC3B,MAAMC,eAAe;QACnB,GAAGF,KAAK;QACRG,kBAAkB;IACpB;IAEA,MAAMC,YAAYP,gBAAgBK;IAElC,qBAAO,oBAACN;QAAQ,GAAII,KAAK;QAAwC,GAAGI,SAAS;QAAEC,YAAW;;AAC5F,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Button/ButtonShim.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport type { IBaseButtonProps } from '@fluentui/react';\n\nimport { Button } from '@fluentui/react-components';\nimport type { RefAttributes } from '@fluentui/react-utilities';\n\nimport { shimButtonProps } from './shimButtonProps';\nimport { ToggleButtonShim } from './ToggleButtonShim';\nimport { CompoundButtonShim } from './CompoundButtonShim';\n\nexport const ButtonShim: React.ForwardRefExoticComponent<\n IBaseButtonProps &\n // eslint-disable-next-line @typescript-eslint/no-restricted-types -- this is expected in order to be compatible with v8, as every v8 interface contains `React.RefAttributes` to accept ref as string\n 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 RefAttributes<HTMLButtonElement>)} {...shimProps} />;\n});\n"],"names":["React","Button","shimButtonProps","ToggleButtonShim","CompoundButtonShim","ButtonShim","forwardRef","props","_ref","shimProps","toggle","children","secondaryText","onRenderDescription"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAI/B,SAASC,MAAM,QAAQ,6BAA6B;AAGpD,SAASC,eAAe,QAAQ,uBAAoB;AACpD,SAASC,gBAAgB,QAAQ,wBAAqB;AACtD,SAASC,kBAAkB,QAAQ,0BAAuB;AAE1D,OAAO,MAAMC,2BAITL,MAAMM,UAAU,CAAC,CAACC,OAAOC;QAMAD;IAL3B,MAAME,YAAYP,gBAAgBK;IAElC,IAAIA,MAAMG,MAAM,EAAE;QAChB,qBAAO,oBAACP,kBAAqBI,OAAQA,MAAMI,QAAQ;IACrD;IACA,IAAIJ,MAAMK,aAAa,MAAIL,6BAAAA,MAAMM,mBAAmB,cAAzBN,iDAAAA,gCAAAA,OAA4BA,SAAQ;QAC7D,qBAAO,oBAACH,oBAAuBG;IACjC;IAEA,qBAAO,oBAACN;QAAQ,GAAIM,KAAK;QAAwC,GAAGE,SAAS;;AAC/E,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Button/CommandButtonShim.tsx"],"sourcesContent":["/**\n * Shims v8 CommandButtonShim to render a v9 Button\n */\nexport { ActionButtonShim as CommandButtonShim } from './ActionButtonShim';\n"],"names":["ActionButtonShim","CommandButtonShim"],"mappings":"AAAA;;CAEC,GACD,SAASA,oBAAoBC,iBAAiB,QAAQ,wBAAqB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Button/CompoundButtonShim.tsx"],"sourcesContent":["'use client';\n\nimport * 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';\nimport type { RefAttributes } from '@fluentui/react-utilities';\n\nimport { shimButtonProps } from './shimButtonProps';\n\n/**\n * Shims v8 CompoundButton to render a v9 CompoundButton\n */\nexport const CompoundButtonShim: React.ForwardRefExoticComponent<\n IButtonProps &\n // eslint-disable-next-line @typescript-eslint/no-restricted-types -- this is expected in order to be compatible with v8, as every v8 interface contains `React.RefAttributes` to accept ref as string\n 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 RefAttributes<HTMLButtonElement>)} {...shimProps} />;\n});\n"],"names":["React","CompoundButton","shimButtonProps","CompoundButtonShim","forwardRef","props","_ref","variantProps","variantClassName","primary","shimProps","secondaryContent","secondaryText","onRenderDescription"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAI/B,SAASC,cAAc,QAAQ,6BAA6B;AAI5D,SAASC,eAAe,QAAQ,uBAAoB;AAEpD;;CAEC,GACD,OAAO,MAAMC,mCAITH,MAAMI,UAAU,CAAC,CAACC,OAAOC;QAQgBD;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,MAAMQ,mBAAmB,cAAzBR,iDAAAA,gCAAAA,OAA4BA;IACvE;IAEA,qBAAO,oBAACJ;QAAgB,GAAII,KAAK;QAAwC,GAAGK,SAAS;;AACvF,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Button/DefaultButtonShim.tsx"],"sourcesContent":["'use client';\n\nimport * 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<\n IButtonProps &\n // eslint-disable-next-line @typescript-eslint/no-restricted-types -- this is expected in order to be compatible with v8, as every v8 interface contains `React.RefAttributes` to accept ref as string\n 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;AAEA,YAAYA,WAAW,QAAQ;AAI/B,SAASC,UAAU,QAAQ,kBAAe;AAE1C;;CAEC,GACD,OAAO,MAAMC,kCAITF,MAAMG,UAAU,CAAC,CAACC,OAAOC;IAC3B,qBAAO,oBAACJ;QAAY,GAAGG,KAAK;QAAEE,kBAAkBF,MAAMG,OAAO,GAAG,uBAAuB;;AACzF,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Button/MenuButtonShim.tsx"],"sourcesContent":["'use client';\n\nimport * 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<\n IButtonProps &\n // eslint-disable-next-line @typescript-eslint/no-restricted-types -- this is expected in order to be compatible with v8, as every v8 interface contains `React.RefAttributes` to accept ref as string\n 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;AAEA,YAAYA,WAAW,QAAQ;AAG/B,SAASC,UAAU,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,WAAW,EAAEC,WAAW,QAAQ,6BAA6B;AAElG,SAASC,YAAY,EAAEC,aAAa,QAAQ,mBAAgB;AAE5D,SAASC,eAAe,QAAQ,uBAAoB;AAEpD,OAAO,MAAMC,+BAITT,MAAMU,UAAU,CAAC,CAACC,OAAOC;QAmBlBD;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":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Button/PrimaryButtonShim.tsx"],"sourcesContent":["'use client';\n\nimport * 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<\n IButtonProps &\n // eslint-disable-next-line @typescript-eslint/no-restricted-types -- this is expected in order to be compatible with v8, as every v8 interface contains `React.RefAttributes` to accept ref as string\n 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;AAEA,YAAYA,WAAW,QAAQ;AAG/B,SAASC,UAAU,QAAQ,kBAAe;AAE1C;;CAEC,GACD,OAAO,MAAMC,kCAITF,MAAMG,UAAU,CAAC,CAACC,OAAOC;IAC3B,qBAAO,oBAACJ;QAAY,GAAGG,KAAK;QAAEE,SAAAA;QAAQC,kBAAiB;;AACzD,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Button/ToggleButtonShim.tsx"],"sourcesContent":["'use client';\n\nimport * 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';\nimport type { RefAttributes } from '@fluentui/react-utilities';\n\nimport { shimButtonProps } from './shimButtonProps';\n\n/**\n * Shims v8 ToggleButton to render a v9 ToggleButton\n */\nexport const ToggleButtonShim: React.ForwardRefExoticComponent<\n IButtonProps &\n // eslint-disable-next-line @typescript-eslint/no-restricted-types -- this is expected in order to be compatible with v8, as every v8 interface contains `React.RefAttributes` to accept ref as string\n 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 RefAttributes<HTMLButtonElement>)} {...shimProps} />;\n});\n"],"names":["React","ToggleButton","shimButtonProps","ToggleButtonShim","forwardRef","props","_ref","variantProps","variantClassName","primary","shimProps","checked","defaultChecked"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAI/B,SAASC,YAAY,QAAQ,6BAA6B;AAI1D,SAASC,eAAe,QAAQ,uBAAoB;AAEpD;;CAEC,GACD,OAAO,MAAMC,iCAITH,MAAMI,UAAU,CAAC,CAACC,OAAOC;IAC3B,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;QAAwC,GAAGK,SAAS;;AACrF,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Button/index.ts"],"sourcesContent":["export { ActionButtonShim } from './ActionButtonShim';\nexport { ButtonShim } from './ButtonShim';\nexport { CommandButtonShim } from './CommandButtonShim';\nexport { CompoundButtonShim } from './CompoundButtonShim';\nexport { DefaultButtonShim } from './DefaultButtonShim';\nexport { MenuButtonShim } from './MenuButtonShim';\nexport { PrimaryButtonShim } from './PrimaryButtonShim';\nexport { shimButtonProps } from './shimButtonProps';\nexport { ToggleButtonShim } from './ToggleButtonShim';\n"],"names":["ActionButtonShim","ButtonShim","CommandButtonShim","CompoundButtonShim","DefaultButtonShim","MenuButtonShim","PrimaryButtonShim","shimButtonProps","ToggleButtonShim"],"mappings":"AAAA,SAASA,gBAAgB,QAAQ,wBAAqB;AACtD,SAASC,UAAU,QAAQ,kBAAe;AAC1C,SAASC,iBAAiB,QAAQ,yBAAsB;AACxD,SAASC,kBAAkB,QAAQ,0BAAuB;AAC1D,SAASC,iBAAiB,QAAQ,yBAAsB;AACxD,SAASC,cAAc,QAAQ,sBAAmB;AAClD,SAASC,iBAAiB,QAAQ,yBAAsB;AACxD,SAASC,eAAe,QAAQ,uBAAoB;AACpD,SAASC,gBAAgB,QAAQ,wBAAqB"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Icon } from "@fluentui/react";
|
|
3
3
|
export const shimButtonProps = (props)=>{
|
|
4
|
+
var _props_variantClassName;
|
|
4
5
|
//TODO: Icon shim. This still renders the v8 icon.
|
|
5
6
|
const icon = props.onRenderIcon ? props.onRenderIcon(props) : props.iconProps ? /*#__PURE__*/ React.createElement(Icon, props.iconProps) : undefined;
|
|
6
|
-
var _props_variantClassName;
|
|
7
7
|
const variantClassName = ((_props_variantClassName = props.variantClassName) !== null && _props_variantClassName !== void 0 ? _props_variantClassName : props.primary) ? 'ms-Button--primary' : 'ms-Button--default';
|
|
8
8
|
const className = [
|
|
9
9
|
props.baseClassName,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Button/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 = (\n props: IBaseButtonProps &\n // eslint-disable-next-line @typescript-eslint/no-restricted-types -- this is expected in order to be compatible with v8, as every v8 interface contains `React.RefAttributes` to accept ref as string\n React.RefAttributes<HTMLButtonElement>,\n): 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,CAC7BC;QAWyBA;IAPzB,kDAAkD;IAClD,MAAMC,OAAOD,MAAME,YAAY,GAC7BF,MAAME,YAAY,CAACF,SACjBA,MAAMG,SAAS,iBACjB,oBAACL,MAASE,MAAMG,SAAS,IACvBC;IAEJ,MAAMC,mBAAmBL,EAAAA,0BAAAA,MAAMK,gBAAgB,cAAtBL,qCAAAA,0BAA0BA,MAAMM,OAAO,IAAG,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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Checkbox/Checkbox.styles.css.ts"],"sourcesContent":["import styles from './Checkbox.module.css';\n\nexport const useCheckboxStyles = (): typeof styles => styles;\n"],"names":["styles","useCheckboxStyles"],"mappings":"AAAA,OAAOA,YAAY,wBAAwB;AAE3C,OAAO,MAAMC,oBAAoB,IAAqBD,OAAO"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Checkbox/Checkbox.styles.css.ts"],"sourcesContent":["import styles from './Checkbox.module.css';\n\nexport const useCheckboxStyles = (): typeof styles => styles;\n"],"names":["styles","useCheckboxStyles"],"mappings":"AAAA,OAAOA,YAAY,wBAAwB;AAE3C,OAAO,MAAMC,oBAAoB,IAAqBD,OAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Checkbox/Checkbox.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles } from '@fluentui/react-components';\n\nexport const useCheckboxStyles = makeStyles({\n root: {\n display: 'flex',\n },\n});\n"],"names":["makeStyles","useCheckboxStyles","root","display"],"mappings":"AAAA;AAEA,SAASA,UAAU,QAAQ,6BAA6B;AAExD,OAAO,MAAMC,oBAAoBD,WAAW;IAC1CE,MAAM;QACJC,SAAS;IACX;AACF,GAAG"}
|
|
@@ -14,11 +14,11 @@ export const CheckboxShim = /*#__PURE__*/ React.forwardRef((props, _ref)=>{
|
|
|
14
14
|
const stylesV9 = useCheckboxStyles();
|
|
15
15
|
const checkboxRef = _ref || /*#__PURE__*/ React.createRef();
|
|
16
16
|
React.useImperativeHandle(componentRef, ()=>{
|
|
17
|
+
var _ref, _ref1;
|
|
17
18
|
var _checkboxRef_current, _checkboxRef_current1;
|
|
18
|
-
var _checkboxRef_current_checked, _checkboxRef_current_indeterminate;
|
|
19
19
|
return {
|
|
20
|
-
checked: (
|
|
21
|
-
indeterminate: (
|
|
20
|
+
checked: (_ref = (_checkboxRef_current = checkboxRef.current) === null || _checkboxRef_current === void 0 ? void 0 : _checkboxRef_current.checked) !== null && _ref !== void 0 ? _ref : false,
|
|
21
|
+
indeterminate: (_ref1 = (_checkboxRef_current1 = checkboxRef.current) === null || _checkboxRef_current1 === void 0 ? void 0 : _checkboxRef_current1.indeterminate) !== null && _ref1 !== void 0 ? _ref1 : false,
|
|
22
22
|
focus: ()=>{
|
|
23
23
|
var _checkboxRef_current;
|
|
24
24
|
return (_checkboxRef_current = checkboxRef.current) === null || _checkboxRef_current === void 0 ? void 0 : _checkboxRef_current.focus();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Checkbox/CheckboxShim.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport type { ICheckboxProps, ICheckboxStyles, ICheckboxStyleProps } from '@fluentui/react';\nimport { classNamesFunction } from '@fluentui/react';\nimport { Checkbox, mergeClasses } from '@fluentui/react-components';\nimport { useCheckboxProps } from './shimCheckboxProps';\nimport { useCheckboxStyles } from './Checkbox.styles';\nimport type { JSXElement } from '@fluentui/react-utilities';\n\nconst getClassNames = classNamesFunction<ICheckboxStyleProps, ICheckboxStyles>({\n useStaticStyles: false,\n});\n\nexport const CheckboxShim = React.forwardRef((props, _ref) => {\n const { className, styles: stylesV8, onRenderLabel, label, componentRef } = props;\n const shimProps = useCheckboxProps(props);\n const styles = getClassNames(stylesV8);\n const stylesV9 = useCheckboxStyles();\n const checkboxRef = (_ref as React.RefObject<HTMLInputElement>) || React.createRef<HTMLInputElement>();\n\n React.useImperativeHandle(componentRef, () => ({\n checked: checkboxRef.current?.checked ?? false,\n indeterminate: checkboxRef.current?.indeterminate ?? false,\n focus: () => checkboxRef.current?.focus(),\n }));\n\n const defaultLabelRenderer = (checkboxProps?: ICheckboxProps): JSXElement | null => {\n if (!checkboxProps) {\n return null;\n }\n const { label: defaultLabel, title } = checkboxProps;\n return defaultLabel ? (\n <span title={title} className={styles.text}>\n {defaultLabel}\n </span>\n ) : null;\n };\n\n if (label || onRenderLabel) {\n shimProps.label = {\n className: mergeClasses('ms-Checkbox-text', styles.label, styles.text),\n children: onRenderLabel ? onRenderLabel(props, defaultLabelRenderer) : label,\n };\n }\n\n return (\n <Checkbox\n {...shimProps}\n ref={checkboxRef}\n className={mergeClasses(stylesV9.root, 'ms-Checkbox', className, styles.root)}\n indicator={{ className: mergeClasses('ms-Checkbox-checkbox', styles.checkbox) }}\n />\n );\n // NOTE: cast is necessary as `ICheckboxProps` extends React.Ref<HTMLDivElement> which is not compatible with our defined React.Ref<HTMLInputElement>\n}) as React.ForwardRefExoticComponent<\n ICheckboxProps &\n // eslint-disable-next-line @typescript-eslint/no-restricted-types -- this is expected in order to be compatible with v8, as every v8 interface contains `React.RefAttributes` to accept ref as string\n React.RefAttributes<HTMLInputElement>\n>;\n\nCheckboxShim.displayName = 'CheckboxShim';\n"],"names":["React","classNamesFunction","Checkbox","mergeClasses","useCheckboxProps","useCheckboxStyles","getClassNames","useStaticStyles","CheckboxShim","forwardRef","props","_ref","className","styles","stylesV8","onRenderLabel","label","componentRef","shimProps","stylesV9","checkboxRef","createRef","useImperativeHandle","checked","current","indeterminate","focus","defaultLabelRenderer","checkboxProps","defaultLabel","title","span","text","children","ref","root","indicator","checkbox","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAG/B,SAASC,kBAAkB,QAAQ,kBAAkB;AACrD,SAASC,QAAQ,EAAEC,YAAY,QAAQ,6BAA6B;AACpE,SAASC,gBAAgB,QAAQ,yBAAsB;AACvD,SAASC,iBAAiB,QAAQ,uBAAoB;AAGtD,MAAMC,gBAAgBL,mBAAyD;IAC7EM,iBAAiB;AACnB;AAEA,OAAO,MAAMC,6BAAeR,MAAMS,UAAU,CAAC,CAACC,OAAOC;IACnD,MAAM,EAAEC,SAAS,EAAEC,QAAQC,QAAQ,EAAEC,aAAa,EAAEC,KAAK,EAAEC,YAAY,EAAE,GAAGP;IAC5E,MAAMQ,YAAYd,iBAAiBM;IACnC,MAAMG,SAASP,cAAcQ;IAC7B,MAAMK,WAAWd;IACjB,MAAMe,cAAc,AAACT,sBAA8CX,MAAMqB,SAAS;IAElFrB,MAAMsB,mBAAmB,CAACL,cAAc;;YAC7BG,sBACMA;eAF8B;YAC7CG,OAAO,WAAEH,uBAAAA,YAAYI,OAAO,cAAnBJ,2CAAAA,qBAAqBG,OAAO,uCAAI;YACzCE,aAAa,YAAEL,wBAAAA,YAAYI,OAAO,cAAnBJ,4CAAAA,sBAAqBK,aAAa,yCAAI;YACrDC,OAAO;oBAAMN;wBAAAA,uBAAAA,YAAYI,OAAO,cAAnBJ,2CAAAA,qBAAqBM,KAAK;;QACzC;;IAEA,MAAMC,uBAAuB,CAACC;QAC5B,IAAI,CAACA,eAAe;YAClB,OAAO;QACT;QACA,MAAM,EAAEZ,OAAOa,YAAY,EAAEC,KAAK,EAAE,GAAGF;QACvC,OAAOC,6BACL,oBAACE;YAAKD,OAAOA;YAAOlB,WAAWC,OAAOmB,IAAI;WACvCH,gBAED;IACN;IAEA,IAAIb,SAASD,eAAe;QAC1BG,UAAUF,KAAK,GAAG;YAChBJ,WAAWT,aAAa,oBAAoBU,OAAOG,KAAK,EAAEH,OAAOmB,IAAI;YACrEC,UAAUlB,gBAAgBA,cAAcL,OAAOiB,wBAAwBX;QACzE;IACF;IAEA,qBACE,oBAACd;QACE,GAAGgB,SAAS;QACbgB,KAAKd;QACLR,WAAWT,aAAagB,SAASgB,IAAI,EAAE,eAAevB,WAAWC,OAAOsB,IAAI;QAC5EC,WAAW;YAAExB,WAAWT,aAAa,wBAAwBU,OAAOwB,QAAQ;QAAE;;AAGlF,sJAAsJ;AACxJ,GAIE;AAEF7B,aAAa8B,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Checkbox/index.ts"],"sourcesContent":["export { CheckboxShim } from './CheckboxShim';\n"],"names":["CheckboxShim"],"mappings":"AAAA,SAASA,YAAY,QAAQ,oBAAiB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Checkbox/shimCheckboxProps.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport type { ICheckboxProps } from '@fluentui/react';\nimport type { CheckboxProps, CheckboxOnChangeData } from '@fluentui/react-components';\nimport { useControllableValue } from '@fluentui/react-hooks';\nimport { getHTMLAttributes } from '../utils';\n\n// https://react.fluentui.dev/?path=/docs/concepts-migration-from-v8-components-checkbox-migration--docs [Link of the fluent v9 migration guide]\n// https://github.com/microsoft/fluentui/blob/master/packages/react/src/components/Checkbox/Checkbox.types.ts [Link of the fluent v8 checkbox types definition]\n// https://github.com/microsoft/fluentui/blob/103b8977f8d5f8dd8c430bab46ff5308a2c76371/packages/react-components/react-checkbox/src/components/Checkbox/Checkbox.types.ts [Link of the fluent v9 checkbox types definition]\n\nconst CHECKBOX_PROPS_V8: Set<string> = new Set([\n 'ariaDescribedBy',\n 'ariaLabel',\n 'ariaLabelledBy',\n 'ariaPositionInSet',\n 'ariaSetSize',\n 'boxSide',\n 'checked',\n 'checkmarkIconProps', // one case used this\n 'className',\n 'componentRef',\n 'defaultChecked',\n 'defaultIndeterminate',\n 'disabled',\n 'indeterminate',\n 'inputProps',\n 'label',\n 'name',\n 'onChange',\n 'onRenderLabel',\n 'required',\n 'styles',\n 'theme',\n 'title',\n]);\n\nexport const useCheckboxProps = (props: ICheckboxProps): CheckboxProps => {\n const {\n ariaDescribedBy,\n ariaLabel,\n ariaLabelledBy,\n ariaPositionInSet,\n ariaSetSize,\n boxSide,\n checked: checkedV8,\n indeterminate,\n defaultChecked,\n defaultIndeterminate,\n disabled,\n inputProps,\n name,\n required,\n title,\n onChange: onChangeV8,\n } = props;\n\n const [checked, setChecked] = useControllableValue(checkedV8, defaultChecked);\n const [mixed, setMixed] = React.useState(indeterminate || defaultIndeterminate);\n\n const onChange = React.useCallback(\n (event: React.ChangeEvent<HTMLElement>, data: CheckboxOnChangeData): void => {\n let val: boolean | undefined = checked !== undefined ? (data.checked as boolean) : undefined;\n // Ensure the checkbox is controlled\n if (checked !== undefined) {\n if (mixed) {\n val = checkedV8 !== undefined ? checkedV8 : defaultChecked !== undefined ? defaultChecked : val;\n }\n }\n\n if (mixed) {\n setMixed(mixed && !indeterminate ? false : mixed);\n }\n\n setChecked(val);\n onChangeV8?.(event, data.checked as boolean);\n },\n [setChecked, checked, onChangeV8, mixed, indeterminate, checkedV8, defaultChecked],\n );\n\n const v9Props: Partial<CheckboxProps> = {\n checked: mixed ? 'mixed' : checked,\n defaultChecked: mixed ? 'mixed' : defaultChecked,\n labelPosition: boxSide === 'end' ? 'before' : 'after',\n disabled,\n required,\n title,\n name,\n onChange,\n };\n\n return {\n ...inputProps, // This inputProps is specific for the input element, and the html attributes are also used here instead of props.\n 'aria-describedby': ariaDescribedBy,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n 'aria-posinset': ariaPositionInSet,\n 'aria-setsize': ariaSetSize,\n ...v9Props,\n ...getHTMLAttributes(props, CHECKBOX_PROPS_V8),\n } as CheckboxProps;\n};\n"],"names":["React","useControllableValue","getHTMLAttributes","CHECKBOX_PROPS_V8","Set","useCheckboxProps","props","ariaDescribedBy","ariaLabel","ariaLabelledBy","ariaPositionInSet","ariaSetSize","boxSide","checked","checkedV8","indeterminate","defaultChecked","defaultIndeterminate","disabled","inputProps","name","required","title","onChange","onChangeV8","setChecked","mixed","setMixed","useState","useCallback","event","data","val","undefined","v9Props","labelPosition"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAI/B,SAASC,oBAAoB,QAAQ,wBAAwB;AAC7D,SAASC,iBAAiB,QAAQ,cAAW;AAE7C,gJAAgJ;AAChJ,+JAA+J;AAC/J,2NAA2N;AAE3N,MAAMC,oBAAiC,IAAIC,IAAI;IAC7C;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAED,OAAO,MAAMC,mBAAmB,CAACC;IAC/B,MAAM,EACJC,eAAe,EACfC,SAAS,EACTC,cAAc,EACdC,iBAAiB,EACjBC,WAAW,EACXC,OAAO,EACPC,SAASC,SAAS,EAClBC,aAAa,EACbC,cAAc,EACdC,oBAAoB,EACpBC,QAAQ,EACRC,UAAU,EACVC,IAAI,EACJC,QAAQ,EACRC,KAAK,EACLC,UAAUC,UAAU,EACrB,GAAGlB;IAEJ,MAAM,CAACO,SAASY,WAAW,GAAGxB,qBAAqBa,WAAWE;IAC9D,MAAM,CAACU,OAAOC,SAAS,GAAG3B,MAAM4B,QAAQ,CAACb,iBAAiBE;IAE1D,MAAMM,WAAWvB,MAAM6B,WAAW,CAChC,CAACC,OAAuCC;QACtC,IAAIC,MAA2BnB,YAAYoB,YAAaF,KAAKlB,OAAO,GAAeoB;QACnF,oCAAoC;QACpC,IAAIpB,YAAYoB,WAAW;YACzB,IAAIP,OAAO;gBACTM,MAAMlB,cAAcmB,YAAYnB,YAAYE,mBAAmBiB,YAAYjB,iBAAiBgB;YAC9F;QACF;QAEA,IAAIN,OAAO;YACTC,SAASD,SAAS,CAACX,gBAAgB,QAAQW;QAC7C;QAEAD,WAAWO;QACXR,uBAAAA,iCAAAA,WAAaM,OAAOC,KAAKlB,OAAO;IAClC,GACA;QAACY;QAAYZ;QAASW;QAAYE;QAAOX;QAAeD;QAAWE;KAAe;IAGpF,MAAMkB,UAAkC;QACtCrB,SAASa,QAAQ,UAAUb;QAC3BG,gBAAgBU,QAAQ,UAAUV;QAClCmB,eAAevB,YAAY,QAAQ,WAAW;QAC9CM;QACAG;QACAC;QACAF;QACAG;IACF;IAEA,OAAO;QACL,GAAGJ,UAAU;QACb,oBAAoBZ;QACpB,cAAcC;QACd,mBAAmBC;QACnB,iBAAiBC;QACjB,gBAAgBC;QAChB,GAAGuB,OAAO;QACV,GAAGhC,kBAAkBI,OAAOH,kBAAkB;IAChD;AACF,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Menu/MenuShim.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { ContextualMenuItemType } from '@fluentui/react';\nimport type { IContextualMenuItem } from '@fluentui/react';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { MenuDividerProps } from '@fluentui/react-components';\nimport {\n MenuItem,\n MenuDivider,\n MenuGroup,\n MenuGroupHeader,\n MenuTrigger,\n Menu,\n MenuList,\n MenuPopover,\n MenuItemCheckbox,\n} from '@fluentui/react-components';\n\nimport { shimMenuHeaderProps, shimMenuItemCheckboxProps, shimMenuItemProps, shimMenuProps } from './shimMenuProps';\nexport const MenuItemShim = (props: IContextualMenuItem): JSXElement => {\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;AAIzD,SACEC,QAAQ,EACRC,WAAW,EACXC,SAAS,EACTC,eAAe,EACfC,WAAW,EACXC,IAAI,EACJC,QAAQ,EACRC,WAAW,EACXC,gBAAgB,QACX,6BAA6B;AAEpC,SAASC,mBAAmB,EAAEC,yBAAyB,EAAEC,iBAAiB,EAAEC,aAAa,QAAQ,qBAAkB;AACnH,OAAO,MAAMC,eAAe,CAACC;QA2BvBA;IA1BJ,IAAIA,MAAMC,QAAQ,KAAKhB,uBAAuBiB,OAAO,EAAE;QACrD,MAAMC,YAAYN,kBAAkBG;QACpC,qBAAO,oBAACb,aAAiBgB;IAC3B;IAEA,IAAIH,MAAMC,QAAQ,KAAKhB,uBAAuBmB,OAAO,EAAE;YAMhDJ;QALL,MAAMG,YAAYR,oBAAoBK;QACtC,qBACE,oBAACZ,+BACC,oBAACC,uBAAiBc,UAAUE,QAAQ,IAEnCL,uBAAAA,MAAMM,YAAY,cAAlBN,2CAAAA,qBAAoBO,KAAK,CAACC,GAAG,CAACC,CAAAA,OAC7B,mCAAmC;YACnC,yCAAyC;0BACzC,oBAACV,cAAiBU;IAI1B;IAEA,IAAIT,MAAMU,QAAQ,EAAE;QAClB,MAAMP,YAAYP,0BAA0BI;QAC5C,qBAAO,oBAACN,kBAAqBS;IAC/B;IAEA,iCAAiC;IACjC,IAAIH,EAAAA,sBAAAA,MAAMM,YAAY,cAAlBN,0CAAAA,oBAAoBO,KAAK,KAAIP,MAAMM,YAAY,CAACC,KAAK,CAACI,MAAM,GAAG,GAAG;QACpE,MAAMC,mBAAmBd,cAAcE,MAAMM,YAAY;QACzD,MAAMO,mBAAmBhB,kBAAkBG;QAE3C,qBACE,oBAACT,MAASqB,gCACR,oBAACtB,iCACC,oBAACJ;YAAU,GAAG2B,gBAAgB;YAAEC,YAAAA;2BAElC,oBAACrB,iCACC,oBAACD,gBACEQ,MAAMM,YAAY,CAACC,KAAK,CAACC,GAAG,CAACC,CAAAA,OAC5B,mCAAmC;YACnC,yCAAyC;0BACzC,oBAACV,cAAiBU;IAM9B;IAEA,MAAMN,YAAYN,kBAAkBG;IACpC,qBAAO,oBAACd,UAAaiB;AACvB,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Menu/index.ts"],"sourcesContent":["export { MenuItemShim } from './MenuShim';\nexport { shimMenuHeaderProps, shimMenuItemCheckboxProps, shimMenuItemProps, shimMenuProps } from './shimMenuProps';\n"],"names":["MenuItemShim","shimMenuHeaderProps","shimMenuItemCheckboxProps","shimMenuItemProps","shimMenuProps"],"mappings":"AAAA,SAASA,YAAY,QAAQ,gBAAa;AAC1C,SAASC,mBAAmB,EAAEC,yBAAyB,EAAEC,iBAAiB,EAAEC,aAAa,QAAQ,qBAAkB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Menu/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-components';\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;IAC5B,OAAO;QACLC,QAAQ,EAAED,kBAAAA,4BAAAA,MAAOE,KAAK,CAACC,IAAI,CAACC,CAAAA,IAAKA,EAAEC,SAAS;QAC5CC,aAAa,EAAEN,kBAAAA,4BAAAA,MAAOE,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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Stack/StackItemShim.tsx"],"sourcesContent":["'use client';\n\nimport { mergeClasses } from '@griffel/react';\nimport * as React from 'react';\nimport type { IStackItemProps } from '@fluentui/react';\n\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport {\n useFlexAlignSelfStyles,\n useFlexGrowStyles,\n useFlexOrderStyles,\n useFlexShrinkStyles,\n useStackItemShimStyles,\n} from './StackItemShim.styles';\n\nconst stackItemClassNames = {\n root: 'ms-StackItem',\n};\nexport const StackItemShim = (props: IStackItemProps): JSXElement => {\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;AAEA,SAASA,YAAY,QAAQ,iBAAiB;AAC9C,YAAYC,WAAW,QAAQ;AAI/B,SACEC,sBAAsB,EACtBC,iBAAiB,EACjBC,kBAAkB,EAClBC,mBAAmB,EACnBC,sBAAsB,QACjB,4BAAyB;AAEhC,MAAMC,sBAAsB;IAC1BC,MAAM;AACR;AACA,OAAO,MAAMC,gBAAgB,CAACC;IAC5B,MAAM,EAAEC,IAAI,EAAEC,MAAM,EAAEC,aAAa,EAAEC,KAAK,EAAEC,YAAY,EAAEC,KAAK,EAAEC,SAAS,EAAEC,QAAQ,EAAE,GAAGR;IAEzF,MAAMS,SAASb;IACf,MAAMc,kBAAkBlB;IACxB,MAAMmB,mBAAmBhB;IACzB,MAAMiB,iBAAyCnB;IAC/C,MAAMoB,kBAA0CnB;IAEhD,MAAMoB,kBAAkB;QAACL,OAAOX,IAAI;QAAEM,SAASM,eAAe,CAACN,MAAM;QAAEC,gBAAgBI,OAAOJ,YAAY;KAAC;IAE3G,IAAIC,OAAO;QACTQ,gBAAgBC,IAAI,CAACF,eAAe,CAACP,MAAM;IAC7C;IAEA,IAAIL,MAAM;QACR,MAAMe,WAAWf,SAAS,OAAOW,cAAc,CAAC,EAAE,GAAGA,cAAc,CAACX,KAAK;QACzEa,gBAAgBC,IAAI,CAACC;IACvB;IAEA,IAAId,UAAU,CAACC,eAAe;QAC5BW,gBAAgBC,IAAI,CAACJ,gBAAgB,CAAC,EAAE;IAC1C,OAAO,IAAIR,iBAAkB,CAACF,QAAQ,CAACC,QAAS;QAC9CY,gBAAgBC,IAAI,CAACJ,gBAAgB,CAAC,EAAE;IAC1C;IAEA,IAAIR,eAAe;QACjBW,gBAAgBC,IAAI,CAACN,OAAON,aAAa;IAC3C;IAEA,MAAMc,aAAa3B,aAAaO,oBAAoBC,IAAI,KAAKgB,iBAAiBP;IAE9E,qBAAO,oBAACW;QAAIX,WAAWU;OAAaT;AACtC,EAAE"}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
@layer fluentui {
|
|
2
|
+
.root {
|
|
3
|
+
height: auto;
|
|
4
|
+
width: auto;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.disableShrink {
|
|
8
|
+
flex-shrink: 0;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.verticalFill {
|
|
12
|
+
height: 100%;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.alignSelfAuto {
|
|
16
|
+
align-self: auto;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.alignSelfBaseline {
|
|
20
|
+
align-self: baseline;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.alignSelfCenter {
|
|
24
|
+
align-self: center;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.alignSelfStart {
|
|
28
|
+
align-self: flex-start;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.alignSelfEnd {
|
|
32
|
+
align-self: flex-end;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.alignSelfStretch {
|
|
36
|
+
align-self: stretch;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.growInherit {
|
|
40
|
+
flex-grow: inherit;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.growInitial {
|
|
44
|
+
flex-grow: initial;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.growRevert {
|
|
48
|
+
flex-grow: revert;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.growUnset {
|
|
52
|
+
flex-grow: unset;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.grow1 {
|
|
56
|
+
flex-grow: 1;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.grow2 {
|
|
60
|
+
flex-grow: 2;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.grow3 {
|
|
64
|
+
flex-grow: 3;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.shrinkInherit {
|
|
68
|
+
flex-shrink: inherit;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.shrinkInitial {
|
|
72
|
+
flex-shrink: initial;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.shrinkRevert {
|
|
76
|
+
flex-shrink: revert;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.shrinkUnset {
|
|
80
|
+
flex-shrink: unset;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.shrink0 {
|
|
84
|
+
flex-shrink: 0;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.shrink1 {
|
|
88
|
+
flex-shrink: 1;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.shrink2 {
|
|
92
|
+
flex-shrink: 2;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.orderInherit {
|
|
96
|
+
order: inherit;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.orderInitial {
|
|
100
|
+
order: initial;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.orderUnset {
|
|
104
|
+
order: unset;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.orderRevert {
|
|
108
|
+
order: revert;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.orderMinus3 {
|
|
112
|
+
order: -3;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.orderMinus2 {
|
|
116
|
+
order: -2;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.orderMinus1 {
|
|
120
|
+
order: -1;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.order0 {
|
|
124
|
+
order: 0;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.order1 {
|
|
128
|
+
order: 1;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.order2 {
|
|
132
|
+
order: 2;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.order3 {
|
|
136
|
+
order: 3;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import styles from "./StackItemShim.module.css";
|
|
2
|
+
export const useStackItemShimStyles = ()=>({
|
|
3
|
+
root: styles.root,
|
|
4
|
+
disableShrink: styles.disableShrink,
|
|
5
|
+
verticalFill: styles.verticalFill
|
|
6
|
+
});
|
|
7
|
+
// The helper hooks keep the Griffel return shape: a map keyed by the prop value.
|
|
8
|
+
export const useFlexAlignSelfStyles = ()=>({
|
|
9
|
+
auto: styles.alignSelfAuto,
|
|
10
|
+
baseline: styles.alignSelfBaseline,
|
|
11
|
+
center: styles.alignSelfCenter,
|
|
12
|
+
start: styles.alignSelfStart,
|
|
13
|
+
end: styles.alignSelfEnd,
|
|
14
|
+
stretch: styles.alignSelfStretch
|
|
15
|
+
});
|
|
16
|
+
export const useFlexGrowStyles = ()=>({
|
|
17
|
+
inherit: styles.growInherit,
|
|
18
|
+
initial: styles.growInitial,
|
|
19
|
+
revert: styles.growRevert,
|
|
20
|
+
unset: styles.growUnset,
|
|
21
|
+
'1': styles.grow1,
|
|
22
|
+
'2': styles.grow2,
|
|
23
|
+
'3': styles.grow3
|
|
24
|
+
});
|
|
25
|
+
export const useFlexShrinkStyles = ()=>({
|
|
26
|
+
inherit: styles.shrinkInherit,
|
|
27
|
+
initial: styles.shrinkInitial,
|
|
28
|
+
revert: styles.shrinkRevert,
|
|
29
|
+
unset: styles.shrinkUnset,
|
|
30
|
+
'0': styles.shrink0,
|
|
31
|
+
'1': styles.shrink1,
|
|
32
|
+
'2': styles.shrink2
|
|
33
|
+
});
|
|
34
|
+
export const useFlexOrderStyles = ()=>({
|
|
35
|
+
inherit: styles.orderInherit,
|
|
36
|
+
initial: styles.orderInitial,
|
|
37
|
+
unset: styles.orderUnset,
|
|
38
|
+
revert: styles.orderRevert,
|
|
39
|
+
'-3': styles.orderMinus3,
|
|
40
|
+
'-2': styles.orderMinus2,
|
|
41
|
+
'-1': styles.orderMinus1,
|
|
42
|
+
'0': styles.order0,
|
|
43
|
+
'1': styles.order1,
|
|
44
|
+
'2': styles.order2,
|
|
45
|
+
'3': styles.order3
|
|
46
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Stack/StackItemShim.styles.css.ts"],"sourcesContent":["import styles from './StackItemShim.module.css';\n\nexport const useStackItemShimStyles = (): { root: string; disableShrink: string; verticalFill: string } => ({\n root: styles.root,\n disableShrink: styles.disableShrink,\n verticalFill: styles.verticalFill,\n});\n\n// The helper hooks keep the Griffel return shape: a map keyed by the prop value.\nexport const useFlexAlignSelfStyles = (): Record<string, string> => ({\n auto: styles.alignSelfAuto,\n baseline: styles.alignSelfBaseline,\n center: styles.alignSelfCenter,\n start: styles.alignSelfStart,\n end: styles.alignSelfEnd,\n stretch: styles.alignSelfStretch,\n});\n\nexport const useFlexGrowStyles = (): Record<string, string> => ({\n inherit: styles.growInherit,\n initial: styles.growInitial,\n revert: styles.growRevert,\n unset: styles.growUnset,\n '1': styles.grow1,\n '2': styles.grow2,\n '3': styles.grow3,\n});\n\nexport const useFlexShrinkStyles = (): Record<string, string> => ({\n inherit: styles.shrinkInherit,\n initial: styles.shrinkInitial,\n revert: styles.shrinkRevert,\n unset: styles.shrinkUnset,\n '0': styles.shrink0,\n '1': styles.shrink1,\n '2': styles.shrink2,\n});\n\nexport const useFlexOrderStyles = (): Record<string, string> => ({\n inherit: styles.orderInherit,\n initial: styles.orderInitial,\n unset: styles.orderUnset,\n revert: styles.orderRevert,\n '-3': styles.orderMinus3,\n '-2': styles.orderMinus2,\n '-1': styles.orderMinus1,\n '0': styles.order0,\n '1': styles.order1,\n '2': styles.order2,\n '3': styles.order3,\n});\n"],"names":["styles","useStackItemShimStyles","root","disableShrink","verticalFill","useFlexAlignSelfStyles","auto","alignSelfAuto","baseline","alignSelfBaseline","center","alignSelfCenter","start","alignSelfStart","end","alignSelfEnd","stretch","alignSelfStretch","useFlexGrowStyles","inherit","growInherit","initial","growInitial","revert","growRevert","unset","growUnset","grow1","grow2","grow3","useFlexShrinkStyles","shrinkInherit","shrinkInitial","shrinkRevert","shrinkUnset","shrink0","shrink1","shrink2","useFlexOrderStyles","orderInherit","orderInitial","orderUnset","orderRevert","orderMinus3","orderMinus2","orderMinus1","order0","order1","order2","order3"],"mappings":"AAAA,OAAOA,YAAY,6BAA6B;AAEhD,OAAO,MAAMC,yBAAyB,IAAsE,CAAA;QAC1GC,MAAMF,OAAOE,IAAI;QACjBC,eAAeH,OAAOG,aAAa;QACnCC,cAAcJ,OAAOI,YAAY;IACnC,CAAA,EAAG;AAEH,iFAAiF;AACjF,OAAO,MAAMC,yBAAyB,IAA+B,CAAA;QACnEC,MAAMN,OAAOO,aAAa;QAC1BC,UAAUR,OAAOS,iBAAiB;QAClCC,QAAQV,OAAOW,eAAe;QAC9BC,OAAOZ,OAAOa,cAAc;QAC5BC,KAAKd,OAAOe,YAAY;QACxBC,SAAShB,OAAOiB,gBAAgB;IAClC,CAAA,EAAG;AAEH,OAAO,MAAMC,oBAAoB,IAA+B,CAAA;QAC9DC,SAASnB,OAAOoB,WAAW;QAC3BC,SAASrB,OAAOsB,WAAW;QAC3BC,QAAQvB,OAAOwB,UAAU;QACzBC,OAAOzB,OAAO0B,SAAS;QACvB,KAAK1B,OAAO2B,KAAK;QACjB,KAAK3B,OAAO4B,KAAK;QACjB,KAAK5B,OAAO6B,KAAK;IACnB,CAAA,EAAG;AAEH,OAAO,MAAMC,sBAAsB,IAA+B,CAAA;QAChEX,SAASnB,OAAO+B,aAAa;QAC7BV,SAASrB,OAAOgC,aAAa;QAC7BT,QAAQvB,OAAOiC,YAAY;QAC3BR,OAAOzB,OAAOkC,WAAW;QACzB,KAAKlC,OAAOmC,OAAO;QACnB,KAAKnC,OAAOoC,OAAO;QACnB,KAAKpC,OAAOqC,OAAO;IACrB,CAAA,EAAG;AAEH,OAAO,MAAMC,qBAAqB,IAA+B,CAAA;QAC/DnB,SAASnB,OAAOuC,YAAY;QAC5BlB,SAASrB,OAAOwC,YAAY;QAC5Bf,OAAOzB,OAAOyC,UAAU;QACxBlB,QAAQvB,OAAO0C,WAAW;QAC1B,MAAM1C,OAAO2C,WAAW;QACxB,MAAM3C,OAAO4C,WAAW;QACxB,MAAM5C,OAAO6C,WAAW;QACxB,KAAK7C,OAAO8C,MAAM;QAClB,KAAK9C,OAAO+C,MAAM;QAClB,KAAK/C,OAAOgD,MAAM;QAClB,KAAKhD,OAAOiD,MAAM;IACpB,CAAA,EAAG"}
|