@fluentui/react-migration-v8-v9 9.10.14 → 9.74.3-experimental.esm.20260709-49ee7a20cf.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 +12 -2
- package/dist/index.d.cts +202 -0
- package/lib/components/Button/ActionButtonShim.js +3 -3
- package/lib/components/Button/ActionButtonShim.js.map +1 -1
- package/lib/components/Button/ButtonShim.js +5 -5
- package/lib/components/Button/ButtonShim.js.map +1 -1
- package/lib/components/Button/CommandButtonShim.js +1 -1
- package/lib/components/Button/CommandButtonShim.js.map +1 -1
- package/lib/components/Button/CompoundButtonShim.js +3 -3
- package/lib/components/Button/CompoundButtonShim.js.map +1 -1
- package/lib/components/Button/DefaultButtonShim.js +2 -2
- package/lib/components/Button/DefaultButtonShim.js.map +1 -1
- package/lib/components/Button/MenuButtonShim.js +4 -4
- package/lib/components/Button/MenuButtonShim.js.map +1 -1
- package/lib/components/Button/PrimaryButtonShim.js +2 -2
- package/lib/components/Button/PrimaryButtonShim.js.map +1 -1
- package/lib/components/Button/ToggleButtonShim.js +3 -3
- package/lib/components/Button/ToggleButtonShim.js.map +1 -1
- package/lib/components/Button/index.js +9 -9
- package/lib/components/Button/index.js.map +1 -1
- package/lib/components/Button/shimButtonProps.js +2 -2
- package/lib/components/Checkbox/Checkbox.styles.js +1 -1
- package/lib/components/Checkbox/Checkbox.styles.js.map +1 -1
- package/lib/components/Checkbox/Checkbox.styles.raw.js +1 -1
- package/lib/components/Checkbox/CheckboxShim.js +5 -5
- package/lib/components/Checkbox/CheckboxShim.js.map +1 -1
- package/lib/components/Checkbox/index.js +1 -1
- package/lib/components/Checkbox/index.js.map +1 -1
- package/lib/components/Checkbox/shimCheckboxProps.js +3 -3
- package/lib/components/Checkbox/shimCheckboxProps.js.map +1 -1
- package/lib/components/Menu/MenuShim.js +4 -4
- package/lib/components/Menu/MenuShim.js.map +1 -1
- package/lib/components/Menu/index.js +2 -2
- package/lib/components/Menu/index.js.map +1 -1
- package/lib/components/Menu/shimMenuProps.js +2 -2
- package/lib/components/Stack/StackItemShim.js +3 -3
- package/lib/components/Stack/StackItemShim.js.map +1 -1
- package/lib/components/Stack/StackItemShim.styles.js +1 -1
- package/lib/components/Stack/StackItemShim.styles.js.map +1 -1
- package/lib/components/Stack/StackItemShim.styles.raw.js +1 -1
- package/lib/components/Stack/StackShim.js +5 -5
- package/lib/components/Stack/StackShim.js.map +1 -1
- package/lib/components/Stack/StackShim.styles.js +1 -1
- package/lib/components/Stack/StackShim.styles.js.map +1 -1
- package/lib/components/Stack/StackShim.styles.raw.js +1 -1
- package/lib/components/Stack/index.js +2 -2
- package/lib/components/Stack/index.js.map +1 -1
- package/lib/components/Stack/stackUtils.js +1 -1
- package/lib/components/Theme/index.js +4 -4
- package/lib/components/Theme/index.js.map +1 -1
- package/lib/components/Theme/v8ThemeShim.js +3 -3
- package/lib/components/Theme/v8ThemeShim.js.map +1 -1
- package/lib/components/Theme/v9BrandVariantsShim.js +1 -1
- package/lib/components/Theme/v9ThemeShim.js +2 -2
- package/lib/components/Theme/v9ThemeShim.js.map +1 -1
- package/lib/index.js +5 -5
- package/lib/index.js.map +1 -1
- package/lib-commonjs/components/Button/{ActionButtonShim.js → ActionButtonShim.cjs} +1 -1
- package/lib-commonjs/components/Button/{ActionButtonShim.js.map → ActionButtonShim.cjs.map} +1 -1
- package/lib-commonjs/components/Button/{ButtonShim.js → ButtonShim.cjs} +3 -3
- package/lib-commonjs/components/Button/{ButtonShim.js.map → ButtonShim.cjs.map} +1 -1
- package/lib-commonjs/components/Button/{CommandButtonShim.js → CommandButtonShim.cjs} +1 -1
- package/lib-commonjs/components/Button/{CommandButtonShim.js.map → CommandButtonShim.cjs.map} +1 -1
- package/lib-commonjs/components/Button/{CompoundButtonShim.js → CompoundButtonShim.cjs} +1 -1
- package/lib-commonjs/components/Button/{CompoundButtonShim.js.map → CompoundButtonShim.cjs.map} +1 -1
- package/lib-commonjs/components/Button/{DefaultButtonShim.js → DefaultButtonShim.cjs} +1 -1
- package/lib-commonjs/components/Button/{DefaultButtonShim.js.map → DefaultButtonShim.cjs.map} +1 -1
- package/lib-commonjs/components/Button/{MenuButtonShim.js → MenuButtonShim.cjs} +2 -2
- package/lib-commonjs/components/Button/{MenuButtonShim.js.map → MenuButtonShim.cjs.map} +1 -1
- package/lib-commonjs/components/Button/{PrimaryButtonShim.js → PrimaryButtonShim.cjs} +1 -1
- package/lib-commonjs/components/Button/{PrimaryButtonShim.js.map → PrimaryButtonShim.cjs.map} +1 -1
- package/lib-commonjs/components/Button/{ToggleButtonShim.js → ToggleButtonShim.cjs} +1 -1
- package/lib-commonjs/components/Button/{ToggleButtonShim.js.map → ToggleButtonShim.cjs.map} +1 -1
- package/lib-commonjs/components/Button/{index.js → index.cjs} +9 -9
- package/lib-commonjs/components/Button/{index.js.map → index.cjs.map} +1 -1
- package/lib-commonjs/components/Checkbox/Checkbox.styles.cjs.map +1 -0
- package/lib-commonjs/components/Checkbox/{CheckboxShim.js → CheckboxShim.cjs} +2 -2
- package/lib-commonjs/components/Checkbox/{CheckboxShim.js.map → CheckboxShim.cjs.map} +1 -1
- package/lib-commonjs/components/Checkbox/{index.js → index.cjs} +1 -1
- package/lib-commonjs/components/Checkbox/{index.js.map → index.cjs.map} +1 -1
- package/lib-commonjs/components/Checkbox/{shimCheckboxProps.js → shimCheckboxProps.cjs} +1 -1
- package/lib-commonjs/components/Checkbox/{shimCheckboxProps.js.map → shimCheckboxProps.cjs.map} +1 -1
- package/lib-commonjs/components/Menu/{MenuShim.js → MenuShim.cjs} +1 -1
- package/lib-commonjs/components/Menu/{MenuShim.js.map → MenuShim.cjs.map} +1 -1
- package/lib-commonjs/components/Menu/{index.js → index.cjs} +2 -2
- package/lib-commonjs/components/Menu/{index.js.map → index.cjs.map} +1 -1
- package/lib-commonjs/components/Stack/{StackItemShim.js → StackItemShim.cjs} +1 -1
- package/lib-commonjs/components/Stack/{StackItemShim.js.map → StackItemShim.cjs.map} +1 -1
- package/lib-commonjs/components/Stack/StackItemShim.styles.cjs.map +1 -0
- package/lib-commonjs/components/Stack/{StackShim.js → StackShim.cjs} +2 -2
- package/lib-commonjs/components/Stack/{StackShim.js.map → StackShim.cjs.map} +1 -1
- package/lib-commonjs/components/Stack/StackShim.styles.cjs.map +1 -0
- package/lib-commonjs/components/Stack/{index.js → index.cjs} +2 -2
- package/lib-commonjs/components/Stack/{index.js.map → index.cjs.map} +1 -1
- package/lib-commonjs/components/Theme/{index.js → index.cjs} +4 -4
- package/lib-commonjs/components/Theme/{index.js.map → index.cjs.map} +1 -1
- package/lib-commonjs/components/Theme/{v8ThemeShim.js → v8ThemeShim.cjs} +1 -1
- package/lib-commonjs/components/Theme/{v8ThemeShim.js.map → v8ThemeShim.cjs.map} +1 -1
- package/lib-commonjs/components/Theme/{v9ThemeShim.js → v9ThemeShim.cjs} +1 -1
- package/lib-commonjs/components/Theme/{v9ThemeShim.js.map → v9ThemeShim.cjs.map} +1 -1
- package/lib-commonjs/{index.js → index.cjs} +5 -5
- package/lib-commonjs/{index.js.map → index.cjs.map} +1 -1
- package/package.json +17 -15
- package/lib-commonjs/components/Checkbox/Checkbox.styles.js.map +0 -1
- package/lib-commonjs/components/Stack/StackItemShim.styles.js.map +0 -1
- package/lib-commonjs/components/Stack/StackShim.styles.js.map +0 -1
- /package/lib-commonjs/components/Button/{shimButtonProps.js → shimButtonProps.cjs} +0 -0
- /package/lib-commonjs/components/Button/{shimButtonProps.js.map → shimButtonProps.cjs.map} +0 -0
- /package/lib-commonjs/components/Checkbox/{Checkbox.styles.js → Checkbox.styles.cjs} +0 -0
- /package/lib-commonjs/components/Checkbox/{Checkbox.styles.raw.js → Checkbox.styles.raw.cjs} +0 -0
- /package/lib-commonjs/components/Checkbox/{Checkbox.styles.raw.js.map → Checkbox.styles.raw.cjs.map} +0 -0
- /package/lib-commonjs/components/Menu/{shimMenuProps.js → shimMenuProps.cjs} +0 -0
- /package/lib-commonjs/components/Menu/{shimMenuProps.js.map → shimMenuProps.cjs.map} +0 -0
- /package/lib-commonjs/components/Stack/{StackItemShim.styles.js → StackItemShim.styles.cjs} +0 -0
- /package/lib-commonjs/components/Stack/{StackItemShim.styles.raw.js → StackItemShim.styles.raw.cjs} +0 -0
- /package/lib-commonjs/components/Stack/{StackItemShim.styles.raw.js.map → StackItemShim.styles.raw.cjs.map} +0 -0
- /package/lib-commonjs/components/Stack/{StackShim.styles.js → StackShim.styles.cjs} +0 -0
- /package/lib-commonjs/components/Stack/{StackShim.styles.raw.js → StackShim.styles.raw.cjs} +0 -0
- /package/lib-commonjs/components/Stack/{StackShim.styles.raw.js.map → StackShim.styles.raw.cjs.map} +0 -0
- /package/lib-commonjs/components/Stack/{stackUtils.js → stackUtils.cjs} +0 -0
- /package/lib-commonjs/components/Stack/{stackUtils.js.map → stackUtils.cjs.map} +0 -0
- /package/lib-commonjs/components/Theme/{themeDuplicates.js → themeDuplicates.cjs} +0 -0
- /package/lib-commonjs/components/Theme/{themeDuplicates.js.map → themeDuplicates.cjs.map} +0 -0
- /package/lib-commonjs/components/Theme/{v9BrandVariantsShim.js → v9BrandVariantsShim.cjs} +0 -0
- /package/lib-commonjs/components/Theme/{v9BrandVariantsShim.js.map → v9BrandVariantsShim.cjs.map} +0 -0
- /package/lib-commonjs/components/{utils.js → utils.cjs} +0 -0
- /package/lib-commonjs/components/{utils.js.map → utils.cjs.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,22 @@
|
|
|
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 Thu, 09 Jul 2026 17:34:10 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.74.3-experimental.esm.20260709-49ee7a20cf.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-migration-v8-v9_v9.74.3-experimental.esm.20260709-49ee7a20cf.0)
|
|
8
|
+
|
|
9
|
+
Thu, 09 Jul 2026 17:34:10 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-migration-v8-v9_v9.10.14..@fluentui/react-migration-v8-v9_v9.74.3-experimental.esm.20260709-49ee7a20cf.0)
|
|
11
|
+
|
|
12
|
+
### Changes
|
|
13
|
+
|
|
14
|
+
- Release 9.74.3-experimental.esm.20260709-49ee7a20cf ([commit](https://github.com/microsoft/fluentui/commit/not available) by fluentui-internal@service.microsoft.com)
|
|
15
|
+
- Bump @fluentui/react-components to v9.74.3-experimental.esm.20260709-49ee7a20cf.0 ([commit](https://github.com/microsoft/fluentui/commit/175a26e0c520dd90a54578d1185a3b0b6c446e15) by beachball)
|
|
16
|
+
|
|
7
17
|
## [9.10.14](https://github.com/microsoft/fluentui/tree/@fluentui/react-migration-v8-v9_v9.10.14)
|
|
8
18
|
|
|
9
|
-
Mon, 29 Jun 2026 15:
|
|
19
|
+
Mon, 29 Jun 2026 15:15:07 GMT
|
|
10
20
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-migration-v8-v9_v9.10.13..@fluentui/react-migration-v8-v9_v9.10.14)
|
|
11
21
|
|
|
12
22
|
### Patches
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import type { BrandVariants } from '@fluentui/react-components';
|
|
2
|
+
import type { ButtonProps } from '@fluentui/react-components';
|
|
3
|
+
import type { IBaseButtonProps } from '@fluentui/react';
|
|
4
|
+
import type { IButtonProps } from '@fluentui/react';
|
|
5
|
+
import type { ICheckboxProps } from '@fluentui/react';
|
|
6
|
+
import type { IContextualMenuItem } from '@fluentui/react';
|
|
7
|
+
import type { IContextualMenuProps } from '@fluentui/react';
|
|
8
|
+
import type { IPalette } from '@fluentui/react';
|
|
9
|
+
import type { IStackItemProps } from '@fluentui/react';
|
|
10
|
+
import type { IStackProps } from '@fluentui/react';
|
|
11
|
+
import type { JSXElement } from '@fluentui/react-utilities';
|
|
12
|
+
import type { MenuProps } from '@fluentui/react-components';
|
|
13
|
+
import * as React_2 from 'react';
|
|
14
|
+
import type { Theme } from '@fluentui/react-components';
|
|
15
|
+
import type { Theme as Theme_2 } from '@fluentui/react';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Shims a v8 ActionButton to render a v9 Button
|
|
19
|
+
*/
|
|
20
|
+
declare const ActionButtonShim: React_2.ForwardRefExoticComponent<IButtonProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
21
|
+
export { ActionButtonShim }
|
|
22
|
+
export { ActionButtonShim as CommandButtonShim }
|
|
23
|
+
|
|
24
|
+
export declare type AlphaColors = 5 | 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90;
|
|
25
|
+
|
|
26
|
+
export declare const black = "#000000";
|
|
27
|
+
|
|
28
|
+
export declare const blackAlpha: Record<AlphaColors, string>;
|
|
29
|
+
|
|
30
|
+
export declare const brandWeb: BrandVariants;
|
|
31
|
+
|
|
32
|
+
export declare const ButtonShim: React_2.ForwardRefExoticComponent<IBaseButtonProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
33
|
+
|
|
34
|
+
export declare const CheckboxShim: React_2.ForwardRefExoticComponent<ICheckboxProps & React_2.RefAttributes<HTMLInputElement>>;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Possible color variant values
|
|
38
|
+
*/
|
|
39
|
+
export declare type ColorVariants = {
|
|
40
|
+
shade50: string;
|
|
41
|
+
shade40: string;
|
|
42
|
+
shade30: string;
|
|
43
|
+
shade20: string;
|
|
44
|
+
shade10: string;
|
|
45
|
+
primary: string;
|
|
46
|
+
tint10: string;
|
|
47
|
+
tint20: string;
|
|
48
|
+
tint30: string;
|
|
49
|
+
tint40: string;
|
|
50
|
+
tint50: string;
|
|
51
|
+
tint60: string;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Shims v8 CompoundButton to render a v9 CompoundButton
|
|
56
|
+
*/
|
|
57
|
+
export declare const CompoundButtonShim: React_2.ForwardRefExoticComponent<IButtonProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Creates v9 brand colors from a v8 palette using interpolation
|
|
61
|
+
* A v8 palette has nine colors and v9 has sixteen colors.
|
|
62
|
+
*/
|
|
63
|
+
export declare const createBrandVariants: (palette: IPalette, interpolation?: Interpolation) => BrandVariants;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Creates a v8 theme from v9 brand colors and theme.
|
|
67
|
+
* You can optionally pass a v8 base theme.
|
|
68
|
+
* Otherwise the default v8 theme is used.
|
|
69
|
+
*
|
|
70
|
+
* The v9 colors, fonts, and effects are applied on top of the v8 theme
|
|
71
|
+
* to allow v8 components to look as much like v9 components as possible.
|
|
72
|
+
*/
|
|
73
|
+
export declare const createV8Theme: (brandColors: BrandVariants, themeV9: Theme, isDarkTheme?: boolean, themeV8?: Theme_2) => Theme_2;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Creates a v9 theme from a v8 theme.
|
|
77
|
+
* You can optional pass a base v9 theme; otherwise webLightTheme is used.
|
|
78
|
+
*/
|
|
79
|
+
export declare const createV9Theme: (themeV8: Theme_2, baseThemeV9?: Theme) => Theme;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Shims a v8 DefaultButton to render a v9 Button
|
|
83
|
+
*/
|
|
84
|
+
export declare const DefaultButtonShim: React_2.ForwardRefExoticComponent<IButtonProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* All the global shared colors and their shade/tint variants
|
|
88
|
+
*/
|
|
89
|
+
export declare type GlobalSharedColors = {
|
|
90
|
+
darkRed: ColorVariants;
|
|
91
|
+
burgundy: ColorVariants;
|
|
92
|
+
cranberry: ColorVariants;
|
|
93
|
+
red: ColorVariants;
|
|
94
|
+
darkOrange: ColorVariants;
|
|
95
|
+
bronze: ColorVariants;
|
|
96
|
+
pumpkin: ColorVariants;
|
|
97
|
+
orange: ColorVariants;
|
|
98
|
+
peach: ColorVariants;
|
|
99
|
+
marigold: ColorVariants;
|
|
100
|
+
yellow: ColorVariants;
|
|
101
|
+
gold: ColorVariants;
|
|
102
|
+
brass: ColorVariants;
|
|
103
|
+
brown: ColorVariants;
|
|
104
|
+
darkBrown: ColorVariants;
|
|
105
|
+
lime: ColorVariants;
|
|
106
|
+
forest: ColorVariants;
|
|
107
|
+
seafoam: ColorVariants;
|
|
108
|
+
lightGreen: ColorVariants;
|
|
109
|
+
green: ColorVariants;
|
|
110
|
+
darkGreen: ColorVariants;
|
|
111
|
+
lightTeal: ColorVariants;
|
|
112
|
+
teal: ColorVariants;
|
|
113
|
+
darkTeal: ColorVariants;
|
|
114
|
+
cyan: ColorVariants;
|
|
115
|
+
steel: ColorVariants;
|
|
116
|
+
lightBlue: ColorVariants;
|
|
117
|
+
blue: ColorVariants;
|
|
118
|
+
royalBlue: ColorVariants;
|
|
119
|
+
darkBlue: ColorVariants;
|
|
120
|
+
cornflower: ColorVariants;
|
|
121
|
+
navy: ColorVariants;
|
|
122
|
+
lavender: ColorVariants;
|
|
123
|
+
purple: ColorVariants;
|
|
124
|
+
darkPurple: ColorVariants;
|
|
125
|
+
orchid: ColorVariants;
|
|
126
|
+
grape: ColorVariants;
|
|
127
|
+
berry: ColorVariants;
|
|
128
|
+
lilac: ColorVariants;
|
|
129
|
+
pink: ColorVariants;
|
|
130
|
+
hotPink: ColorVariants;
|
|
131
|
+
magenta: ColorVariants;
|
|
132
|
+
plum: ColorVariants;
|
|
133
|
+
beige: ColorVariants;
|
|
134
|
+
mink: ColorVariants;
|
|
135
|
+
silver: ColorVariants;
|
|
136
|
+
platinum: ColorVariants;
|
|
137
|
+
anchor: ColorVariants;
|
|
138
|
+
charcoal: ColorVariants;
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
export declare const grey: Record<Greys, string>;
|
|
142
|
+
|
|
143
|
+
export declare const grey14Alpha: Record<AlphaColors, string>;
|
|
144
|
+
|
|
145
|
+
export declare type Greys = 0 | 2 | 4 | 6 | 8 | 10 | 12 | 14 | 16 | 18 | 20 | 22 | 24 | 26 | 28 | 30 | 32 | 34 | 36 | 38 | 40 | 42 | 44 | 46 | 48 | 50 | 52 | 54 | 56 | 58 | 60 | 62 | 64 | 66 | 68 | 70 | 72 | 74 | 76 | 78 | 80 | 82 | 84 | 86 | 88 | 90 | 92 | 94 | 96 | 98 | 99 | 100;
|
|
146
|
+
|
|
147
|
+
export declare const hcButtonFace = "#ffffff";
|
|
148
|
+
|
|
149
|
+
export declare const hcButtonText = "#000000";
|
|
150
|
+
|
|
151
|
+
export declare const hcCanvas = "#000000";
|
|
152
|
+
|
|
153
|
+
export declare const hcCanvasText = "#ffffff";
|
|
154
|
+
|
|
155
|
+
export declare const hcDisabled = "#3ff23f";
|
|
156
|
+
|
|
157
|
+
export declare const hcHighlight = "#1aebff";
|
|
158
|
+
|
|
159
|
+
export declare const hcHighlightText = "#000000";
|
|
160
|
+
|
|
161
|
+
export declare const hcHyperlink = "#ffff00";
|
|
162
|
+
|
|
163
|
+
declare type Interpolation = 'pairs' | 'primaryAndEnds';
|
|
164
|
+
|
|
165
|
+
export declare const MenuButtonShim: React_2.ForwardRefExoticComponent<IButtonProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
166
|
+
|
|
167
|
+
export declare const MenuItemShim: (props: IContextualMenuItem) => JSXElement;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Shims v8 PrimaryButton to render a v9 Button
|
|
171
|
+
*/
|
|
172
|
+
export declare const PrimaryButtonShim: React_2.ForwardRefExoticComponent<IButtonProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
173
|
+
|
|
174
|
+
export declare const sharedColors: GlobalSharedColors;
|
|
175
|
+
|
|
176
|
+
export declare const shimButtonProps: (props: IBaseButtonProps & React_2.RefAttributes<HTMLButtonElement>) => ButtonProps;
|
|
177
|
+
|
|
178
|
+
export declare const shimMenuProps: (props: IContextualMenuProps) => Partial<MenuProps>;
|
|
179
|
+
|
|
180
|
+
export declare const StackItemShim: (props: IStackItemProps) => JSXElement;
|
|
181
|
+
|
|
182
|
+
export declare const StackShim: (props: IStackProps) => JSXElement;
|
|
183
|
+
|
|
184
|
+
export declare type TextAlignment = 'inherit' | 'initial' | 'revert' | 'unset' | 'center' | 'end' | 'start' | 'justify' | 'left' | 'match-parent' | 'right';
|
|
185
|
+
|
|
186
|
+
export declare type TextAlignments = {
|
|
187
|
+
start: TextAlignment;
|
|
188
|
+
center: TextAlignment;
|
|
189
|
+
end: TextAlignment;
|
|
190
|
+
justify: TextAlignment;
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Shims v8 ToggleButton to render a v9 ToggleButton
|
|
195
|
+
*/
|
|
196
|
+
export declare const ToggleButtonShim: React_2.ForwardRefExoticComponent<IButtonProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
197
|
+
|
|
198
|
+
export declare const white = "#ffffff";
|
|
199
|
+
|
|
200
|
+
export declare const whiteAlpha: Record<AlphaColors, string>;
|
|
201
|
+
|
|
202
|
+
export { }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import * as React from
|
|
3
|
-
import { Button } from
|
|
4
|
-
import { shimButtonProps } from
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { Button } from "@fluentui/react-components";
|
|
4
|
+
import { shimButtonProps } from "./shimButtonProps.js";
|
|
5
5
|
/**
|
|
6
6
|
* Shims a v8 ActionButton to render a v9 Button
|
|
7
7
|
*/ export const ActionButtonShim = /*#__PURE__*/ React.forwardRef((props, _ref)=>{
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import * as React from
|
|
3
|
-
import { Button } from
|
|
4
|
-
import { shimButtonProps } from
|
|
5
|
-
import { ToggleButtonShim } from
|
|
6
|
-
import { CompoundButtonShim } from
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { Button } from "@fluentui/react-components";
|
|
4
|
+
import { shimButtonProps } from "./shimButtonProps.js";
|
|
5
|
+
import { ToggleButtonShim } from "./ToggleButtonShim.js";
|
|
6
|
+
import { CompoundButtonShim } from "./CompoundButtonShim.js";
|
|
7
7
|
export const ButtonShim = /*#__PURE__*/ React.forwardRef((props, _ref)=>{
|
|
8
8
|
var _props_onRenderDescription;
|
|
9
9
|
const shimProps = shimButtonProps(props);
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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":["../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,
|
|
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,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import * as React from
|
|
3
|
-
import { CompoundButton } from
|
|
4
|
-
import { shimButtonProps } from
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { CompoundButton } from "@fluentui/react-components";
|
|
4
|
+
import { shimButtonProps } from "./shimButtonProps.js";
|
|
5
5
|
/**
|
|
6
6
|
* Shims v8 CompoundButton to render a v9 CompoundButton
|
|
7
7
|
*/ export const CompoundButtonShim = /*#__PURE__*/ React.forwardRef((props, _ref)=>{
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import * as React from
|
|
3
|
-
import { ButtonShim } from
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { ButtonShim } from "./ButtonShim.js";
|
|
4
4
|
/**
|
|
5
5
|
* Shims a v8 DefaultButton to render a v9 Button
|
|
6
6
|
*/ export const DefaultButtonShim = /*#__PURE__*/ React.forwardRef((props, _ref)=>{
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import * as React from
|
|
3
|
-
import { MenuButton, Menu, MenuList, MenuPopover, MenuTrigger } from
|
|
4
|
-
import { MenuItemShim, shimMenuProps } from
|
|
5
|
-
import { shimButtonProps } from
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { MenuButton, Menu, MenuList, MenuPopover, MenuTrigger } from "@fluentui/react-components";
|
|
4
|
+
import { MenuItemShim, shimMenuProps } from "../Menu/index.js";
|
|
5
|
+
import { shimButtonProps } from "./shimButtonProps.js";
|
|
6
6
|
export const MenuButtonShim = /*#__PURE__*/ React.forwardRef((props, _ref)=>{
|
|
7
7
|
var _props_menuProps;
|
|
8
8
|
const variantProps = {
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import * as React from
|
|
3
|
-
import { ButtonShim } from
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { ButtonShim } from "./ButtonShim.js";
|
|
4
4
|
/**
|
|
5
5
|
* Shims v8 PrimaryButton to render a v9 Button
|
|
6
6
|
*/ export const PrimaryButtonShim = /*#__PURE__*/ React.forwardRef((props, _ref)=>{
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import * as React from
|
|
3
|
-
import { ToggleButton } from
|
|
4
|
-
import { shimButtonProps } from
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { ToggleButton } from "@fluentui/react-components";
|
|
4
|
+
import { shimButtonProps } from "./shimButtonProps.js";
|
|
5
5
|
/**
|
|
6
6
|
* Shims v8 ToggleButton to render a v9 ToggleButton
|
|
7
7
|
*/ export const ToggleButtonShim = /*#__PURE__*/ React.forwardRef((props, _ref)=>{
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,9 +1,9 @@
|
|
|
1
|
-
export { ActionButtonShim } from
|
|
2
|
-
export { ButtonShim } from
|
|
3
|
-
export { CommandButtonShim } from
|
|
4
|
-
export { CompoundButtonShim } from
|
|
5
|
-
export { DefaultButtonShim } from
|
|
6
|
-
export { MenuButtonShim } from
|
|
7
|
-
export { PrimaryButtonShim } from
|
|
8
|
-
export { shimButtonProps } from
|
|
9
|
-
export { ToggleButtonShim } from
|
|
1
|
+
export { ActionButtonShim } from "./ActionButtonShim.js";
|
|
2
|
+
export { ButtonShim } from "./ButtonShim.js";
|
|
3
|
+
export { CommandButtonShim } from "./CommandButtonShim.js";
|
|
4
|
+
export { CompoundButtonShim } from "./CompoundButtonShim.js";
|
|
5
|
+
export { DefaultButtonShim } from "./DefaultButtonShim.js";
|
|
6
|
+
export { MenuButtonShim } from "./MenuButtonShim.js";
|
|
7
|
+
export { PrimaryButtonShim } from "./PrimaryButtonShim.js";
|
|
8
|
+
export { shimButtonProps } from "./shimButtonProps.js";
|
|
9
|
+
export { ToggleButtonShim } from "./ToggleButtonShim.js";
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,5 +1,5 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import { Icon } from
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Icon } from "@fluentui/react";
|
|
3
3
|
export const shimButtonProps = (props)=>{
|
|
4
4
|
//TODO: Icon shim. This still renders the v8 icon.
|
|
5
5
|
const icon = props.onRenderIcon ? props.onRenderIcon(props) : props.iconProps ? /*#__PURE__*/ React.createElement(Icon, props.iconProps) : undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__styles","useCheckboxStyles","root","mc9l5x","d"],"sources":["Checkbox.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles } from
|
|
1
|
+
{"version":3,"names":["__styles","useCheckboxStyles","root","mc9l5x","d"],"sources":["Checkbox.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles } from \"@fluentui/react-components\";\nexport const useCheckboxStyles = makeStyles({\n root: {\n display: 'flex'\n }\n});\n"],"mappings":"AAAA,YAAY;;AACZ,SAAAA,QAAA,QAA2B,4BAA4B;AACvD,OAAO,MAAMC,iBAAiB,gBAAGD,QAAA;EAAAE,IAAA;IAAAC,MAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,CAIhC,CAAC","ignoreList":[]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import * as React from
|
|
3
|
-
import { classNamesFunction } from
|
|
4
|
-
import { Checkbox, mergeClasses } from
|
|
5
|
-
import { useCheckboxProps } from
|
|
6
|
-
import { useCheckboxStyles } from
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { classNamesFunction } from "@fluentui/react";
|
|
4
|
+
import { Checkbox, mergeClasses } from "@fluentui/react-components";
|
|
5
|
+
import { useCheckboxProps } from "./shimCheckboxProps.js";
|
|
6
|
+
import { useCheckboxStyles } from "./Checkbox.styles.js";
|
|
7
7
|
const getClassNames = classNamesFunction({
|
|
8
8
|
useStaticStyles: false
|
|
9
9
|
});
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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;YADNA,8BACMA;eAF8B;YAC7CG,SAASH,CAAAA,gCAAAA,uBAAAA,YAAYI,OAAO,cAAnBJ,2CAAAA,qBAAqBG,OAAO,cAA5BH,0CAAAA,+BAAgC;YACzCK,eAAeL,CAAAA,sCAAAA,wBAAAA,YAAYI,OAAO,cAAnBJ,4CAAAA,sBAAqBK,aAAa,cAAlCL,gDAAAA,qCAAsC;YACrDM,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
|
-
export { CheckboxShim } from
|
|
1
|
+
export { CheckboxShim } from "./CheckboxShim.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Checkbox/index.ts"],"sourcesContent":["export { CheckboxShim } from './CheckboxShim';\n"],"names":["CheckboxShim"],"mappings":"AAAA,SAASA,YAAY,QAAQ,
|
|
1
|
+
{"version":3,"sources":["../src/components/Checkbox/index.ts"],"sourcesContent":["export { CheckboxShim } from './CheckboxShim';\n"],"names":["CheckboxShim"],"mappings":"AAAA,SAASA,YAAY,QAAQ,oBAAiB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import * as React from
|
|
3
|
-
import { useControllableValue } from
|
|
4
|
-
import { getHTMLAttributes } from
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { useControllableValue } from "@fluentui/react-hooks";
|
|
4
|
+
import { getHTMLAttributes } from "../utils.js";
|
|
5
5
|
// https://react.fluentui.dev/?path=/docs/concepts-migration-from-v8-components-checkbox-migration--docs [Link of the fluent v9 migration guide]
|
|
6
6
|
// https://github.com/microsoft/fluentui/blob/master/packages/react/src/components/Checkbox/Checkbox.types.ts [Link of the fluent v8 checkbox types definition]
|
|
7
7
|
// 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]
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,7 +1,7 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import { ContextualMenuItemType } from
|
|
3
|
-
import { MenuItem, MenuDivider, MenuGroup, MenuGroupHeader, MenuTrigger, Menu, MenuList, MenuPopover, MenuItemCheckbox } from
|
|
4
|
-
import { shimMenuHeaderProps, shimMenuItemCheckboxProps, shimMenuItemProps, shimMenuProps } from
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { ContextualMenuItemType } from "@fluentui/react";
|
|
3
|
+
import { MenuItem, MenuDivider, MenuGroup, MenuGroupHeader, MenuTrigger, Menu, MenuList, MenuPopover, MenuItemCheckbox } from "@fluentui/react-components";
|
|
4
|
+
import { shimMenuHeaderProps, shimMenuItemCheckboxProps, shimMenuItemProps, shimMenuProps } from "./shimMenuProps.js";
|
|
5
5
|
export const MenuItemShim = (props)=>{
|
|
6
6
|
var _props_subMenuProps;
|
|
7
7
|
if (props.itemType === ContextualMenuItemType.Divider) {
|