@fluentui/react-provider 9.0.0-nightly.46b9ea7036.0 → 9.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +321 -24
- package/CHANGELOG.md +73 -14
- package/dist/react-provider.d.ts +16 -14
- package/lib/components/FluentProvider/FluentProvider.js +9 -9
- package/lib/components/FluentProvider/FluentProvider.js.map +1 -1
- package/lib/components/FluentProvider/FluentProvider.types.d.ts +8 -7
- package/lib/components/FluentProvider/index.d.ts +1 -0
- package/lib/components/FluentProvider/index.js +1 -0
- package/lib/components/FluentProvider/index.js.map +1 -1
- package/lib/components/FluentProvider/renderFluentProvider.d.ts +1 -1
- package/lib/components/FluentProvider/renderFluentProvider.js +10 -8
- package/lib/components/FluentProvider/renderFluentProvider.js.map +1 -1
- package/lib/components/FluentProvider/useFluentProvider.d.ts +4 -5
- package/lib/components/FluentProvider/useFluentProvider.js +44 -21
- package/lib/components/FluentProvider/useFluentProvider.js.map +1 -1
- package/lib/components/FluentProvider/useFluentProviderContextValues.d.ts +1 -1
- package/lib/components/FluentProvider/useFluentProviderContextValues.js +16 -15
- package/lib/components/FluentProvider/useFluentProviderContextValues.js.map +1 -1
- package/lib/components/FluentProvider/useFluentProviderStyles.d.ts +2 -1
- package/lib/components/FluentProvider/useFluentProviderStyles.js +7 -5
- package/lib/components/FluentProvider/useFluentProviderStyles.js.map +1 -1
- package/lib/components/FluentProvider/useThemeStyleTag.js +19 -21
- package/lib/components/FluentProvider/useThemeStyleTag.js.map +1 -1
- package/lib-commonjs/FluentProvider.js +1 -1
- package/lib-commonjs/components/FluentProvider/FluentProvider.js +10 -10
- package/lib-commonjs/components/FluentProvider/FluentProvider.js.map +1 -1
- package/lib-commonjs/components/FluentProvider/FluentProvider.types.d.ts +8 -7
- package/lib-commonjs/components/FluentProvider/index.d.ts +1 -0
- package/lib-commonjs/components/FluentProvider/index.js +3 -1
- package/lib-commonjs/components/FluentProvider/index.js.map +1 -1
- package/lib-commonjs/components/FluentProvider/renderFluentProvider.d.ts +1 -1
- package/lib-commonjs/components/FluentProvider/renderFluentProvider.js +15 -14
- package/lib-commonjs/components/FluentProvider/renderFluentProvider.js.map +1 -1
- package/lib-commonjs/components/FluentProvider/useFluentProvider.d.ts +4 -5
- package/lib-commonjs/components/FluentProvider/useFluentProvider.js +51 -29
- package/lib-commonjs/components/FluentProvider/useFluentProvider.js.map +1 -1
- package/lib-commonjs/components/FluentProvider/useFluentProviderContextValues.d.ts +1 -1
- package/lib-commonjs/components/FluentProvider/useFluentProviderContextValues.js +20 -19
- package/lib-commonjs/components/FluentProvider/useFluentProviderContextValues.js.map +1 -1
- package/lib-commonjs/components/FluentProvider/useFluentProviderStyles.d.ts +2 -1
- package/lib-commonjs/components/FluentProvider/useFluentProviderStyles.js +11 -7
- package/lib-commonjs/components/FluentProvider/useFluentProviderStyles.js.map +1 -1
- package/lib-commonjs/components/FluentProvider/useThemeStyleTag.js +21 -23
- package/lib-commonjs/components/FluentProvider/useThemeStyleTag.js.map +1 -1
- package/lib-commonjs/index.js +1 -1
- package/package.json +13 -15
- package/lib/common/isConformant.d.ts +0 -4
- package/lib/common/isConformant.js +0 -12
- package/lib/common/isConformant.js.map +0 -1
- package/lib-commonjs/common/isConformant.d.ts +0 -4
- package/lib-commonjs/common/isConformant.js +0 -23
- package/lib-commonjs/common/isConformant.js.map +0 -1
@@ -3,64 +3,86 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.useFluentProvider_unstable = void 0;
|
7
7
|
|
8
|
-
|
8
|
+
const react_tabster_1 = /*#__PURE__*/require("@fluentui/react-tabster");
|
9
9
|
|
10
|
-
|
10
|
+
const react_shared_contexts_1 = /*#__PURE__*/require("@fluentui/react-shared-contexts");
|
11
11
|
|
12
|
-
|
12
|
+
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
13
13
|
|
14
|
-
|
14
|
+
const React = /*#__PURE__*/require("react");
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
var useThemeStyleTag_1 = /*#__PURE__*/require("./useThemeStyleTag");
|
19
|
-
|
20
|
-
exports.fluentProviderShorthandProps = ['root'];
|
16
|
+
const useThemeStyleTag_1 = /*#__PURE__*/require("./useThemeStyleTag");
|
21
17
|
/**
|
22
18
|
* Create the state required to render FluentProvider.
|
23
19
|
*
|
24
|
-
* The returned state can be modified with hooks such as
|
25
|
-
* before being passed to
|
20
|
+
* The returned state can be modified with hooks such as useFluentProviderStyles_unstable,
|
21
|
+
* before being passed to renderFluentProvider_unstable.
|
26
22
|
*
|
27
23
|
* @param props - props from this instance of FluentProvider
|
28
24
|
* @param ref - reference to root HTMLElement of FluentProvider
|
29
25
|
*/
|
30
26
|
|
31
|
-
|
32
|
-
|
33
|
-
|
27
|
+
|
28
|
+
const useFluentProvider_unstable = (props, ref) => {
|
29
|
+
const parentContext = react_shared_contexts_1.useFluent();
|
30
|
+
const parentTheme = react_shared_contexts_1.useTheme();
|
34
31
|
/**
|
35
32
|
* TODO: add merge functions to "dir" merge,
|
36
33
|
* nesting providers with the same "dir" should not add additional attributes to DOM
|
37
34
|
* see https://github.com/microsoft/fluentui/blob/0dc74a19f3aa5a058224c20505016fbdb84db172/packages/fluentui/react-northstar/src/utils/mergeProviderContexts.ts#L89-L93
|
38
35
|
*/
|
39
36
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
37
|
+
const {
|
38
|
+
dir = parentContext.dir,
|
39
|
+
targetDocument = parentContext.targetDocument,
|
40
|
+
theme
|
41
|
+
} = props;
|
42
|
+
const mergedTheme = mergeThemes(parentTheme, theme);
|
43
|
+
React.useEffect(() => {
|
44
|
+
if (process.env.NODE_ENV !== 'production' && mergedTheme === undefined) {
|
45
|
+
// eslint-disable-next-line no-console
|
46
|
+
console.warn(`
|
47
|
+
FluentProvider: your "theme" is not defined !
|
48
|
+
=============================================
|
49
|
+
Make sure your root FluentProvider has set a theme or you're setting the theme in your child FluentProvider.
|
50
|
+
`);
|
51
|
+
} // eslint-disable-next-line react-hooks/exhaustive-deps
|
52
|
+
|
53
|
+
}, []);
|
47
54
|
return {
|
48
|
-
dir
|
49
|
-
targetDocument
|
55
|
+
dir,
|
56
|
+
targetDocument,
|
50
57
|
theme: mergedTheme,
|
51
58
|
themeClassName: useThemeStyleTag_1.useThemeStyleTag({
|
52
59
|
theme: mergedTheme,
|
53
|
-
targetDocument
|
60
|
+
targetDocument
|
54
61
|
}),
|
55
62
|
components: {
|
56
63
|
root: 'div'
|
57
64
|
},
|
58
|
-
root: react_utilities_1.getNativeElementProps('div',
|
59
|
-
dir
|
65
|
+
root: react_utilities_1.getNativeElementProps('div', { ...props,
|
66
|
+
dir,
|
60
67
|
ref: react_utilities_1.useMergedRefs(ref, react_tabster_1.useKeyboardNavAttribute())
|
61
|
-
})
|
68
|
+
})
|
62
69
|
};
|
63
70
|
};
|
64
71
|
|
65
|
-
exports.
|
72
|
+
exports.useFluentProvider_unstable = useFluentProvider_unstable;
|
73
|
+
|
74
|
+
function mergeThemes(a, b) {
|
75
|
+
// Merge impacts perf: we should like to avoid it if it's possible
|
76
|
+
if (a && b) {
|
77
|
+
return { ...a,
|
78
|
+
...b
|
79
|
+
};
|
80
|
+
}
|
81
|
+
|
82
|
+
if (a) {
|
83
|
+
return a;
|
84
|
+
}
|
85
|
+
|
86
|
+
return b;
|
87
|
+
}
|
66
88
|
//# sourceMappingURL=useFluentProvider.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/FluentProvider/useFluentProvider.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"sources":["../../../src/components/FluentProvider/useFluentProvider.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AAEA,MAAA,uBAAA,gBAAA,OAAA,CAAA,i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AAH4B,KAA7B;AAVD,GAAP;AAgBD,CA3CM;;AAAM,OAAA,CAAA,0BAAA,GAA0B,0BAA1B;;AA6Cb,SAAS,WAAT,CAAqB,CAArB,EAA4D,CAA5D,EAAuE;AACrE;AACA,MAAI,CAAC,IAAI,CAAT,EAAY;AACV,WAAO,EAAE,GAAG,CAAL;AAAQ,SAAG;AAAX,KAAP;AACD;;AAED,MAAI,CAAJ,EAAO;AACL,WAAO,CAAP;AACD;;AAED,SAAO,CAAP;AACD","sourceRoot":""}
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import type { FluentProviderContextValues, FluentProviderState } from './FluentProvider.types';
|
2
|
-
export declare function
|
2
|
+
export declare function useFluentProviderContextValues_unstable(state: FluentProviderState): FluentProviderContextValues;
|
@@ -3,32 +3,33 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.useFluentProviderContextValues_unstable = void 0;
|
7
7
|
|
8
|
-
|
8
|
+
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
9
9
|
|
10
|
-
|
10
|
+
const React = /*#__PURE__*/require("react");
|
11
11
|
|
12
|
-
function
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
}, [dir, targetDocument]); // "Tooltip" component mutates an object in this context, instance should be stable
|
12
|
+
function useFluentProviderContextValues_unstable(state) {
|
13
|
+
const {
|
14
|
+
root,
|
15
|
+
dir,
|
16
|
+
targetDocument,
|
17
|
+
theme
|
18
|
+
} = state;
|
19
|
+
const provider = React.useMemo(() => ({
|
20
|
+
dir,
|
21
|
+
targetDocument
|
22
|
+
}), [dir, targetDocument]); // "Tooltip" component mutates an object in this context, instance should be stable
|
23
23
|
|
24
|
-
|
24
|
+
const tooltip = react_utilities_1.useConst({});
|
25
25
|
return {
|
26
|
-
provider
|
27
|
-
|
28
|
-
|
26
|
+
provider,
|
27
|
+
textDirection: dir,
|
28
|
+
tooltip,
|
29
|
+
theme,
|
29
30
|
themeClassName: root.className
|
30
31
|
};
|
31
32
|
}
|
32
33
|
|
33
|
-
exports.
|
34
|
+
exports.useFluentProviderContextValues_unstable = useFluentProviderContextValues_unstable;
|
34
35
|
//# sourceMappingURL=useFluentProviderContextValues.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/FluentProvider/useFluentProviderContextValues.ts"],"names":[],"mappings":";;;;;;;AAAA,
|
1
|
+
{"version":3,"sources":["../../../src/components/FluentProvider/useFluentProviderContextValues.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AAGA,SAAgB,uCAAhB,CAAwD,KAAxD,EAAkF;AAChF,QAAM;AAAE,IAAA,IAAF;AAAQ,IAAA,GAAR;AAAa,IAAA,cAAb;AAA6B,IAAA;AAA7B,MAAuC,KAA7C;AAEA,QAAM,QAAQ,GAAG,KAAK,CAAC,OAAN,CAAc,OAAO;AAAE,IAAA,GAAF;AAAO,IAAA;AAAP,GAAP,CAAd,EAA+C,CAAC,GAAD,EAAM,cAAN,CAA/C,CAAjB,CAHgF,CAIhF;;AACA,QAAM,OAAO,GAAG,iBAAA,CAAA,QAAA,CAAS,EAAT,CAAhB;AAEA,SAAO;AACL,IAAA,QADK;AAEL,IAAA,aAAa,EAAE,GAFV;AAGL,IAAA,OAHK;AAIL,IAAA,KAJK;AAKL,IAAA,cAAc,EAAE,IAAI,CAAC;AALhB,GAAP;AAOD;;AAdD,OAAA,CAAA,uCAAA,GAAA,uCAAA","sourceRoot":""}
|
@@ -1,3 +1,4 @@
|
|
1
1
|
import type { FluentProviderState } from './FluentProvider.types';
|
2
|
+
export declare const fluentProviderClassName = "fui-FluentProvider";
|
2
3
|
/** Applies style classnames to slots */
|
3
|
-
export declare const
|
4
|
+
export declare const useFluentProviderStyles_unstable: (state: FluentProviderState) => FluentProviderState;
|
@@ -3,11 +3,15 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.useFluentProviderStyles_unstable = exports.fluentProviderClassName = void 0;
|
7
7
|
|
8
|
-
|
8
|
+
const react_1 = /*#__PURE__*/require("@griffel/react");
|
9
9
|
|
10
|
-
|
10
|
+
const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
|
11
|
+
|
12
|
+
exports.fluentProviderClassName = 'fui-FluentProvider';
|
13
|
+
|
14
|
+
const useStyles = /*#__PURE__*/react_1.__styles({
|
11
15
|
"root": {
|
12
16
|
"sj55zd": "f19n0e5",
|
13
17
|
"De3pzq": "fxugw4r",
|
@@ -21,11 +25,11 @@ var useStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
21
25
|
/** Applies style classnames to slots */
|
22
26
|
|
23
27
|
|
24
|
-
|
25
|
-
|
26
|
-
state.root.className =
|
28
|
+
const useFluentProviderStyles_unstable = state => {
|
29
|
+
const styles = useStyles();
|
30
|
+
state.root.className = react_1.mergeClasses(exports.fluentProviderClassName, state.themeClassName, styles.root, state.root.className);
|
27
31
|
return state;
|
28
32
|
};
|
29
33
|
|
30
|
-
exports.
|
34
|
+
exports.useFluentProviderStyles_unstable = useFluentProviderStyles_unstable;
|
31
35
|
//# sourceMappingURL=useFluentProviderStyles.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/FluentProvider/useFluentProviderStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,
|
1
|
+
{"version":3,"sources":["../../../src/components/FluentProvider/useFluentProviderStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAGa,OAAA,CAAA,uBAAA,GAA0B,oBAA1B;;AAEb,MAAM,SAAS,gBAAG,OAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAUA;;;AACO,MAAM,gCAAgC,GAAI,KAAD,IAA+B;AAC7E,QAAM,MAAM,GAAG,SAAS,EAAxB;AAEA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CAAa,OAAA,CAAA,uBAAb,EAAsC,KAAK,CAAC,cAA5C,EAA4D,MAAM,CAAC,IAAnE,EAAyE,KAAK,CAAC,IAAN,CAAW,SAApF,CAAvB;AAEA,SAAO,KAAP;AACD,CANM;;AAAM,OAAA,CAAA,gCAAA,GAAgC,gCAAhC","sourceRoot":""}
|
@@ -5,11 +5,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.useThemeStyleTag = void 0;
|
7
7
|
|
8
|
-
|
8
|
+
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
9
9
|
|
10
|
-
|
10
|
+
const React = /*#__PURE__*/require("react");
|
11
11
|
|
12
|
-
|
12
|
+
const useFluentProviderStyles_1 = /*#__PURE__*/require("./useFluentProviderStyles");
|
13
13
|
/**
|
14
14
|
* Writes a theme as css variables in a style tag on the provided targetDocument as a rule applied to a CSS class
|
15
15
|
*
|
@@ -17,33 +17,34 @@ var React = /*#__PURE__*/require("react");
|
|
17
17
|
*/
|
18
18
|
|
19
19
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
20
|
+
const useThemeStyleTag = options => {
|
21
|
+
const {
|
22
|
+
targetDocument,
|
23
|
+
theme
|
24
|
+
} = options;
|
25
|
+
const styleTagId = react_utilities_1.useId(useFluentProviderStyles_1.fluentProviderClassName);
|
26
|
+
const styleTag = React.useMemo(() => {
|
25
27
|
if (!targetDocument) {
|
26
28
|
return null;
|
27
29
|
}
|
28
30
|
|
29
|
-
|
31
|
+
const tag = targetDocument.createElement('style');
|
30
32
|
tag.setAttribute('id', styleTagId);
|
31
33
|
targetDocument.head.appendChild(tag);
|
32
34
|
return tag;
|
33
35
|
}, [styleTagId, targetDocument]);
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
cssVarRule += cssVar + ": " + cssVars[cssVar] + "; ";
|
36
|
+
const cssRule = React.useMemo(() => {
|
37
|
+
const cssVarsAsString = theme ? Object.keys(theme).reduce((cssVarRule, cssVar) => {
|
38
|
+
cssVarRule += `--${cssVar}: ${theme[cssVar]}; `;
|
38
39
|
return cssVarRule;
|
39
|
-
}, ''); // result: .fluent-provider1 { --css-var: '#fff' }
|
40
|
+
}, '') : ''; // result: .fluent-provider1 { --css-var: '#fff' }
|
40
41
|
|
41
|
-
return
|
42
|
+
return `.${styleTagId} { ${cssVarsAsString} }`;
|
42
43
|
}, [theme, styleTagId]);
|
43
|
-
|
44
|
+
const previousCssRule = react_utilities_1.usePrevious(cssRule);
|
44
45
|
|
45
46
|
if (styleTag && previousCssRule !== cssRule) {
|
46
|
-
|
47
|
+
const sheet = styleTag.sheet;
|
47
48
|
|
48
49
|
if (sheet.cssRules.length > 0) {
|
49
50
|
sheet.deleteRule(0);
|
@@ -53,13 +54,10 @@ var useThemeStyleTag = function (options) {
|
|
53
54
|
} // Removes the style tag from the targetDocument on unmount or change
|
54
55
|
|
55
56
|
|
56
|
-
React.useEffect(
|
57
|
-
return
|
58
|
-
var _a;
|
59
|
-
|
57
|
+
React.useEffect(() => {
|
58
|
+
return () => {
|
60
59
|
if (styleTag) {
|
61
|
-
|
62
|
-
(_a = styleTag.parentElement) === null || _a === void 0 ? void 0 : _a.removeChild(styleTag);
|
60
|
+
styleTag.remove();
|
63
61
|
}
|
64
62
|
};
|
65
63
|
}, [styleTag]);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/FluentProvider/useThemeStyleTag.ts"],"names":[],"mappings":";;;;;;;AAAA,
|
1
|
+
{"version":3,"sources":["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,OAAZ,CAAxB;;AAEA,MAAI,QAAQ,IAAI,eAAe,KAAK,OAApC,EAA6C;AAC3C,UAAM,KAAK,GAAG,QAAQ,CAAC,KAAvB;;AAEA,QAAI,KAAK,CAAC,QAAN,CAAe,MAAf,GAAwB,CAA5B,EAA+B;AAC7B,MAAA,KAAK,CAAC,UAAN,CAAiB,CAAjB;AACD;;AAED,IAAA,KAAK,CAAC,UAAN,CAAiB,OAAjB,EAA0B,CAA1B;AACD,GApCgG,CAsCjG;;;AACA,EAAA,KAAK,CAAC,SAAN,CAAgB,MAAK;AACnB,WAAO,MAAK;AACV,UAAI,QAAJ,EAAc;AACZ,QAAA,QAAQ,CAAC,MAAT;AACD;AACF,KAJD;AAKD,GAND,EAMG,CAAC,QAAD,CANH;AAQA,SAAO,UAAP;AACD,CAhDM;;AAAM,OAAA,CAAA,gBAAA,GAAgB,gBAAhB","sourceRoot":""}
|
package/lib-commonjs/index.js
CHANGED
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.useTheme = exports.useFluent = void 0;
|
7
7
|
|
8
|
-
|
8
|
+
const tslib_1 = /*#__PURE__*/require("tslib");
|
9
9
|
|
10
10
|
tslib_1.__exportStar(require("./FluentProvider"), exports);
|
11
11
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-provider",
|
3
|
-
"version": "9.0.0-
|
3
|
+
"version": "9.0.0-rc.1",
|
4
4
|
"description": "Fluent UI React provider component",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -14,28 +14,27 @@
|
|
14
14
|
"scripts": {
|
15
15
|
"build": "just-scripts build",
|
16
16
|
"bundle-size": "bundle-size measure",
|
17
|
-
"test": "jest",
|
17
|
+
"test": "jest --passWithNoTests",
|
18
18
|
"clean": "just-scripts clean",
|
19
19
|
"code-style": "just-scripts code-style",
|
20
20
|
"just": "just-scripts",
|
21
21
|
"lint": "just-scripts lint",
|
22
22
|
"docs": "api-extractor run --config=config/api-extractor.local.json --local",
|
23
|
-
"build:local": "tsc -p . --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output dist/react-provider/src && yarn docs",
|
24
|
-
"storybook": "
|
25
|
-
"start": "yarn storybook"
|
23
|
+
"build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output ./dist/packages/react-provider/src && yarn docs",
|
24
|
+
"storybook": "node ../../scripts/storybook/runner",
|
25
|
+
"start": "yarn storybook",
|
26
|
+
"type-check": "tsc -b tsconfig.json"
|
26
27
|
},
|
27
28
|
"devDependencies": {
|
28
|
-
"@fluentui/babel-make-styles": "9.0.0-nightly.46b9ea7036.0",
|
29
29
|
"@fluentui/eslint-plugin": "*",
|
30
|
-
"@fluentui/jest-serializer-make-styles": "9.0.0-nightly.46b9ea7036.0",
|
31
30
|
"@fluentui/react-conformance": "*",
|
32
|
-
"@fluentui/react-conformance-
|
31
|
+
"@fluentui/react-conformance-griffel": "9.0.0-beta.1",
|
33
32
|
"@fluentui/scripts": "^1.0.0",
|
34
33
|
"@types/enzyme": "3.10.3",
|
35
34
|
"@types/enzyme-adapter-react-16": "1.0.3",
|
36
|
-
"@types/jest": "24.9.1",
|
37
35
|
"@types/react": "16.9.42",
|
38
36
|
"@types/react-dom": "16.9.10",
|
37
|
+
"@types/react-test-renderer": "^16.0.0",
|
39
38
|
"enzyme": "~3.10.0",
|
40
39
|
"enzyme-adapter-react-16": "^1.15.0",
|
41
40
|
"react": "16.8.6",
|
@@ -43,11 +42,11 @@
|
|
43
42
|
"react-test-renderer": "^16.3.0"
|
44
43
|
},
|
45
44
|
"dependencies": {
|
46
|
-
"@
|
47
|
-
"@fluentui/react-shared-contexts": "9.0.0-
|
48
|
-
"@fluentui/react-tabster": "9.0.0-
|
49
|
-
"@fluentui/react-theme": "9.0.0-
|
50
|
-
"@fluentui/react-utilities": "9.0.0-
|
45
|
+
"@griffel/react": "1.0.0",
|
46
|
+
"@fluentui/react-shared-contexts": "9.0.0-rc.1",
|
47
|
+
"@fluentui/react-tabster": "9.0.0-rc.1",
|
48
|
+
"@fluentui/react-theme": "9.0.0-rc.1",
|
49
|
+
"@fluentui/react-utilities": "9.0.0-rc.1",
|
51
50
|
"tslib": "^2.1.0"
|
52
51
|
},
|
53
52
|
"peerDependencies": {
|
@@ -57,7 +56,6 @@
|
|
57
56
|
"react-dom": ">=16.8.0 <18.0.0"
|
58
57
|
},
|
59
58
|
"beachball": {
|
60
|
-
"tag": "beta",
|
61
59
|
"disallowedChangeTypes": [
|
62
60
|
"major",
|
63
61
|
"minor",
|
@@ -1,12 +0,0 @@
|
|
1
|
-
import { isConformant as baseIsConformant } from '@fluentui/react-conformance';
|
2
|
-
import makeStylesTests from '@fluentui/react-conformance-make-styles';
|
3
|
-
export function isConformant(testInfo) {
|
4
|
-
var defaultOptions = {
|
5
|
-
disabledTests: ['has-docblock'],
|
6
|
-
asPropHandlesRef: true,
|
7
|
-
componentPath: module.parent.filename.replace('.test', ''),
|
8
|
-
extraTests: makeStylesTests
|
9
|
-
};
|
10
|
-
baseIsConformant(defaultOptions, testInfo);
|
11
|
-
}
|
12
|
-
//# sourceMappingURL=isConformant.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../../src/common/isConformant.ts"],"names":[],"mappings":"AAAA,SAAS,YAAY,IAAI,gBAAzB,QAAiD,6BAAjD;AAEA,OAAO,eAAP,MAA4B,yCAA5B;AAEA,OAAM,SAAU,YAAV,CACJ,QADI,EACqF;AAEzF,MAAM,cAAc,GAAyC;AAC3D,IAAA,aAAa,EAAE,CAAC,cAAD,CAD4C;AAE3D,IAAA,gBAAgB,EAAE,IAFyC;AAG3D,IAAA,aAAa,EAAE,MAAO,CAAC,MAAR,CAAgB,QAAhB,CAAyB,OAAzB,CAAiC,OAAjC,EAA0C,EAA1C,CAH4C;AAI3D,IAAA,UAAU,EAAE;AAJ+C,GAA7D;AAOA,EAAA,gBAAgB,CAAC,cAAD,EAAiB,QAAjB,CAAhB;AACD","sourceRoot":""}
|
@@ -1,23 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.isConformant = void 0;
|
7
|
-
|
8
|
-
var react_conformance_1 = /*#__PURE__*/require("@fluentui/react-conformance");
|
9
|
-
|
10
|
-
var react_conformance_make_styles_1 = /*#__PURE__*/require("@fluentui/react-conformance-make-styles");
|
11
|
-
|
12
|
-
function isConformant(testInfo) {
|
13
|
-
var defaultOptions = {
|
14
|
-
disabledTests: ['has-docblock'],
|
15
|
-
asPropHandlesRef: true,
|
16
|
-
componentPath: module.parent.filename.replace('.test', ''),
|
17
|
-
extraTests: react_conformance_make_styles_1.default
|
18
|
-
};
|
19
|
-
react_conformance_1.isConformant(defaultOptions, testInfo);
|
20
|
-
}
|
21
|
-
|
22
|
-
exports.isConformant = isConformant;
|
23
|
-
//# sourceMappingURL=isConformant.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../../src/common/isConformant.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AAEA,IAAA,+BAAA,gBAAA,OAAA,CAAA,yCAAA,CAAA;;AAEA,SAAgB,YAAhB,CACE,QADF,EAC2F;AAEzF,MAAM,cAAc,GAAyC;AAC3D,IAAA,aAAa,EAAE,CAAC,cAAD,CAD4C;AAE3D,IAAA,gBAAgB,EAAE,IAFyC;AAG3D,IAAA,aAAa,EAAE,MAAO,CAAC,MAAR,CAAgB,QAAhB,CAAyB,OAAzB,CAAiC,OAAjC,EAA0C,EAA1C,CAH4C;AAI3D,IAAA,UAAU,EAAE,+BAAA,CAAA;AAJ+C,GAA7D;AAOA,EAAA,mBAAA,CAAA,YAAA,CAAiB,cAAjB,EAAiC,QAAjC;AACD;;AAXD,OAAA,CAAA,YAAA,GAAA,YAAA","sourceRoot":""}
|