@fluentui/react-utilities 9.8.0 → 9.8.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 +48 -1
- package/CHANGELOG.md +15 -2
- package/dist/index.d.ts +10 -9
- package/lib/hooks/useControllableState.js +21 -32
- package/lib/hooks/useControllableState.js.map +1 -1
- package/lib-commonjs/hooks/useControllableState.js +16 -27
- package/lib-commonjs/hooks/useControllableState.js.map +1 -1
- package/package.json +2 -2
- package/.swcrc +0 -30
package/CHANGELOG.json
CHANGED
@@ -2,7 +2,54 @@
|
|
2
2
|
"name": "@fluentui/react-utilities",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "
|
5
|
+
"date": "Fri, 12 May 2023 20:22:33 GMT",
|
6
|
+
"tag": "@fluentui/react-utilities_v9.8.1",
|
7
|
+
"version": "9.8.1",
|
8
|
+
"comments": {
|
9
|
+
"patch": [
|
10
|
+
{
|
11
|
+
"author": "bernardo.sunderhus@gmail.com",
|
12
|
+
"package": "@fluentui/react-utilities",
|
13
|
+
"commit": "88ff00c2979ecd025f725fa3fc4e4d370f95cfc4",
|
14
|
+
"comment": "feat: defers useControllableState state to initializer method"
|
15
|
+
},
|
16
|
+
{
|
17
|
+
"author": "bernardo.sunderhus@gmail.com",
|
18
|
+
"package": "@fluentui/react-utilities",
|
19
|
+
"commit": "f0b05741d812ad90c52754b0b4035d5554cf2aa0",
|
20
|
+
"comment": "chore: updates useControllableState comments"
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"author": "olfedias@microsoft.com",
|
24
|
+
"package": "@fluentui/react-utilities",
|
25
|
+
"commit": "c28decb23d191a0daaaf6d5d1832429715102129",
|
26
|
+
"comment": "chore: exclude .swcrc from being published"
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"author": "bernardo.sunderhus@gmail.com",
|
30
|
+
"package": "@fluentui/react-utilities",
|
31
|
+
"commit": "557ffca71ff7767a4d595b6fcc55ad4a1fe02360",
|
32
|
+
"comment": "chore: simplifies useControllableState hook internals"
|
33
|
+
},
|
34
|
+
{
|
35
|
+
"author": "beachball",
|
36
|
+
"package": "@fluentui/react-utilities",
|
37
|
+
"comment": "Bump @fluentui/keyboard-keys to v9.0.3",
|
38
|
+
"commit": "79c08ce5bbf6387b2b18ba4c3d2d5681e0177d4b"
|
39
|
+
}
|
40
|
+
],
|
41
|
+
"none": [
|
42
|
+
{
|
43
|
+
"author": "martinhochel@microsoft.com",
|
44
|
+
"package": "@fluentui/react-utilities",
|
45
|
+
"commit": "dbda7fa69e3000aaf8dd4a061e254ebd35198b8e",
|
46
|
+
"comment": "fix: update npmignore files to fix npm8/node16 regression how npm publish works"
|
47
|
+
}
|
48
|
+
]
|
49
|
+
}
|
50
|
+
},
|
51
|
+
{
|
52
|
+
"date": "Mon, 17 Apr 2023 17:54:02 GMT",
|
6
53
|
"tag": "@fluentui/react-utilities_v9.8.0",
|
7
54
|
"version": "9.8.0",
|
8
55
|
"comments": {
|
package/CHANGELOG.md
CHANGED
@@ -1,12 +1,25 @@
|
|
1
1
|
# Change Log - @fluentui/react-utilities
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Fri, 12 May 2023 20:22:33 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
+
## [9.8.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.8.1)
|
8
|
+
|
9
|
+
Fri, 12 May 2023 20:22:33 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.8.0..@fluentui/react-utilities_v9.8.1)
|
11
|
+
|
12
|
+
### Patches
|
13
|
+
|
14
|
+
- feat: defers useControllableState state to initializer method ([PR #27717](https://github.com/microsoft/fluentui/pull/27717) by bernardo.sunderhus@gmail.com)
|
15
|
+
- chore: updates useControllableState comments ([PR #27754](https://github.com/microsoft/fluentui/pull/27754) by bernardo.sunderhus@gmail.com)
|
16
|
+
- chore: exclude .swcrc from being published ([PR #27740](https://github.com/microsoft/fluentui/pull/27740) by olfedias@microsoft.com)
|
17
|
+
- chore: simplifies useControllableState hook internals ([PR #27702](https://github.com/microsoft/fluentui/pull/27702) by bernardo.sunderhus@gmail.com)
|
18
|
+
- Bump @fluentui/keyboard-keys to v9.0.3 ([PR #27827](https://github.com/microsoft/fluentui/pull/27827) by beachball)
|
19
|
+
|
7
20
|
## [9.8.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.8.0)
|
8
21
|
|
9
|
-
Mon, 17 Apr 2023 17:
|
22
|
+
Mon, 17 Apr 2023 17:54:02 GMT
|
10
23
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.7.4..@fluentui/react-utilities_v9.8.0)
|
11
24
|
|
12
25
|
### Minor changes
|
package/dist/index.d.ts
CHANGED
@@ -515,18 +515,19 @@ export declare type UnknownSlotProps = Pick<React_2.HTMLAttributes<HTMLElement>,
|
|
515
515
|
/**
|
516
516
|
* @internal
|
517
517
|
*
|
518
|
-
* A `useState
|
518
|
+
* A [`useState`](https://reactjs.org/docs/hooks-reference.html#usestate)-like hook
|
519
|
+
* to manage a value that could be either `controlled` or `uncontrolled`,
|
519
520
|
* such as a checked state or text input string.
|
520
521
|
*
|
521
|
-
*
|
522
|
-
*
|
522
|
+
* @see https://react.dev/learn/sharing-state-between-components#controlled-and-uncontrolled-components for more details on `controlled`/`uncontrolled`
|
523
|
+
*
|
524
|
+
* @returns an array of the current value and an updater (dispatcher) function.
|
525
|
+
* The updater function is referentially stable (won't change during the component's lifecycle).
|
526
|
+
* It can take either a new value, or a function which is passed the previous value and returns the new value.
|
527
|
+
*
|
528
|
+
* ❗️❗️ Calls to the dispatcher will only modify the state if the state is `uncontrolled`.
|
529
|
+
* Meaning that if a state is `controlled`, calls to the dispatcher do not modify the state.
|
523
530
|
*
|
524
|
-
* @returns Same as [`useState`](https://reactjs.org/docs/hooks-reference.html#usestate): an array
|
525
|
-
* of the current value and an updater (dispatch) function. The updater function is referentially
|
526
|
-
* stable (won't change during the component's lifecycle). It can take either a new value, or a
|
527
|
-
* function which is passed the previous value and returns the new value. Unlike `setState`, calls
|
528
|
-
* to the updater function will only be respected if the component is uncontrolled.
|
529
|
-
* @see https://reactjs.org/docs/uncontrolled-components.html
|
530
531
|
*/
|
531
532
|
export declare const useControllableState: <State>(options: UseControllableStateOptions<State>) => [State, React_2.Dispatch<React_2.SetStateAction<State>>];
|
532
533
|
|
@@ -1,46 +1,35 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
function isFactoryDispatch(newState) {
|
3
|
-
return typeof newState === 'function';
|
4
|
-
}
|
5
2
|
/**
|
6
3
|
* @internal
|
7
4
|
*
|
8
|
-
* A `useState
|
5
|
+
* A [`useState`](https://reactjs.org/docs/hooks-reference.html#usestate)-like hook
|
6
|
+
* to manage a value that could be either `controlled` or `uncontrolled`,
|
9
7
|
* such as a checked state or text input string.
|
10
8
|
*
|
11
|
-
*
|
12
|
-
*
|
9
|
+
* @see https://react.dev/learn/sharing-state-between-components#controlled-and-uncontrolled-components for more details on `controlled`/`uncontrolled`
|
10
|
+
*
|
11
|
+
* @returns an array of the current value and an updater (dispatcher) function.
|
12
|
+
* The updater function is referentially stable (won't change during the component's lifecycle).
|
13
|
+
* It can take either a new value, or a function which is passed the previous value and returns the new value.
|
14
|
+
*
|
15
|
+
* ❗️❗️ Calls to the dispatcher will only modify the state if the state is `uncontrolled`.
|
16
|
+
* Meaning that if a state is `controlled`, calls to the dispatcher do not modify the state.
|
13
17
|
*
|
14
|
-
* @returns Same as [`useState`](https://reactjs.org/docs/hooks-reference.html#usestate): an array
|
15
|
-
* of the current value and an updater (dispatch) function. The updater function is referentially
|
16
|
-
* stable (won't change during the component's lifecycle). It can take either a new value, or a
|
17
|
-
* function which is passed the previous value and returns the new value. Unlike `setState`, calls
|
18
|
-
* to the updater function will only be respected if the component is uncontrolled.
|
19
|
-
* @see https://reactjs.org/docs/uncontrolled-components.html
|
20
18
|
*/
|
21
19
|
export const useControllableState = options => {
|
22
|
-
const
|
23
|
-
|
24
|
-
|
25
|
-
const state = isControlled ? options.state : internalState;
|
26
|
-
const stateRef = React.useRef(state);
|
27
|
-
React.useEffect(() => {
|
28
|
-
stateRef.current = state;
|
29
|
-
}, [state]);
|
30
|
-
// To match the behavior of the setter returned by React.useState, this callback's identity
|
31
|
-
// should never change. This means it MUST NOT directly reference variables that can change.
|
32
|
-
const setState = React.useCallback(newState => {
|
33
|
-
// React dispatch can use a factory
|
34
|
-
// https://reactjs.org/docs/hooks-reference.html#functional-updates
|
35
|
-
if (isFactoryDispatch(newState)) {
|
36
|
-
stateRef.current = newState(stateRef.current);
|
37
|
-
} else {
|
38
|
-
stateRef.current = newState;
|
20
|
+
const [internalState, setInternalState] = React.useState(() => {
|
21
|
+
if (options.defaultState === undefined) {
|
22
|
+
return options.initialState;
|
39
23
|
}
|
40
|
-
|
41
|
-
}
|
42
|
-
return [state,
|
24
|
+
return isInitializer(options.defaultState) ? options.defaultState() : options.defaultState;
|
25
|
+
});
|
26
|
+
return useIsControlled(options.state) ? [options.state, noop] : [internalState, setInternalState];
|
43
27
|
};
|
28
|
+
function isInitializer(value) {
|
29
|
+
return typeof value === 'function';
|
30
|
+
}
|
31
|
+
function noop() {
|
32
|
+
/* noop */}
|
44
33
|
/**
|
45
34
|
* Helper hook to handle previous comparison of controlled/uncontrolled
|
46
35
|
* Prints an error when isControlled value switches between subsequent renders
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["React","
|
1
|
+
{"version":3,"names":["React","useControllableState","options","internalState","setInternalState","useState","defaultState","undefined","initialState","isInitializer","useIsControlled","state","noop","value","controlledValue","isControlled","process","env","NODE_ENV","useEffect","error","Error","controlWarning","undefinedWarning","console","stack","join"],"sources":["../../src/hooks/useControllableState.ts"],"sourcesContent":["import * as React from 'react';\n\n/**\n * @internal\n */\nexport type UseControllableStateOptions<State> = {\n /**\n * User-provided default state or initializer, for uncontrolled usage.\n */\n defaultState?: State | (() => State);\n /**\n * User-provided controlled state. `undefined` means internal state will be used.\n */\n state: State | undefined;\n /**\n * Used as the initial state if `state` and `defaultState` are both `undefined`.\n * If `undefined` is the correct initial state, pass that here.\n */\n initialState: State;\n};\n\n/**\n * @internal\n *\n * A [`useState`](https://reactjs.org/docs/hooks-reference.html#usestate)-like hook\n * to manage a value that could be either `controlled` or `uncontrolled`,\n * such as a checked state or text input string.\n *\n * @see https://react.dev/learn/sharing-state-between-components#controlled-and-uncontrolled-components for more details on `controlled`/`uncontrolled`\n *\n * @returns an array of the current value and an updater (dispatcher) function.\n * The updater function is referentially stable (won't change during the component's lifecycle).\n * It can take either a new value, or a function which is passed the previous value and returns the new value.\n *\n * ❗️❗️ Calls to the dispatcher will only modify the state if the state is `uncontrolled`.\n * Meaning that if a state is `controlled`, calls to the dispatcher do not modify the state.\n *\n */\nexport const useControllableState = <State>(\n options: UseControllableStateOptions<State>,\n): [State, React.Dispatch<React.SetStateAction<State>>] => {\n const [internalState, setInternalState] = React.useState<State>(() => {\n if (options.defaultState === undefined) {\n return options.initialState;\n }\n return isInitializer(options.defaultState) ? options.defaultState() : options.defaultState;\n });\n return useIsControlled(options.state) ? [options.state, noop] : [internalState, setInternalState];\n};\n\nfunction isInitializer<State>(value: State | (() => State)): value is () => State {\n return typeof value === 'function';\n}\n\nfunction noop() {\n /* noop */\n}\n\n/**\n * Helper hook to handle previous comparison of controlled/uncontrolled\n * Prints an error when isControlled value switches between subsequent renders\n * @returns - whether the value is controlled\n */\nconst useIsControlled = <V>(controlledValue: V | undefined): controlledValue is V => {\n const [isControlled] = React.useState<boolean>(() => controlledValue !== undefined);\n\n if (process.env.NODE_ENV !== 'production') {\n // We don't want these warnings in production even though it is against native behaviour\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (isControlled !== (controlledValue !== undefined)) {\n const error = new Error();\n\n const controlWarning = isControlled\n ? 'a controlled value to be uncontrolled'\n : 'an uncontrolled value to be controlled';\n\n const undefinedWarning = isControlled ? 'defined to an undefined' : 'undefined to a defined';\n\n // eslint-disable-next-line no-console\n console.error(\n [\n // Default react error\n 'A component is changing ' + controlWarning + '. This is likely caused by the value',\n 'changing from ' + undefinedWarning + ' value, which should not happen.',\n 'Decide between using a controlled or uncontrolled input element for the lifetime of the component.',\n 'More info: https://reactjs.org/link/controlled-components',\n error.stack,\n ].join(' '),\n );\n }\n }, [isControlled, controlledValue]);\n }\n\n return isControlled;\n};\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AAqBvB;;;;;;;;;;;;;;;;;AAiBA,OAAO,MAAMC,oBAAA,GACXC,OAAA,IACyD;EACzD,MAAM,CAACC,aAAA,EAAeC,gBAAA,CAAiB,GAAGJ,KAAA,CAAMK,QAAQ,CAAQ,MAAM;IACpE,IAAIH,OAAA,CAAQI,YAAY,KAAKC,SAAA,EAAW;MACtC,OAAOL,OAAA,CAAQM,YAAY;IAC7B;IACA,OAAOC,aAAA,CAAcP,OAAA,CAAQI,YAAY,IAAIJ,OAAA,CAAQI,YAAY,KAAKJ,OAAA,CAAQI,YAAY;EAC5F;EACA,OAAOI,eAAA,CAAgBR,OAAA,CAAQS,KAAK,IAAI,CAACT,OAAA,CAAQS,KAAK,EAAEC,IAAA,CAAK,GAAG,CAACT,aAAA,EAAeC,gBAAA,CAAiB;AACnG;AAEA,SAASK,cAAqBI,KAA4B,EAAwB;EAChF,OAAO,OAAOA,KAAA,KAAU;AAC1B;AAEA,SAASD,KAAA,EAAO;EACd;AAGF;;;;;AAKA,MAAMF,eAAA,GAAsBI,eAAA,IAAyD;EACnF,MAAM,CAACC,YAAA,CAAa,GAAGf,KAAA,CAAMK,QAAQ,CAAU,MAAMS,eAAA,KAAoBP,SAAA;EAEzE,IAAIS,OAAA,CAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;IACzC;IACA;IACAlB,KAAA,CAAMmB,SAAS,CAAC,MAAM;MACpB,IAAIJ,YAAA,MAAkBD,eAAA,KAAoBP,SAAQ,GAAI;QACpD,MAAMa,KAAA,GAAQ,IAAIC,KAAA;QAElB,MAAMC,cAAA,GAAiBP,YAAA,GACnB,0CACA,wCAAwC;QAE5C,MAAMQ,gBAAA,GAAmBR,YAAA,GAAe,4BAA4B,wBAAwB;QAE5F;QACAS,OAAA,CAAQJ,KAAK,CACX;QACE;QACA,6BAA6BE,cAAA,GAAiB,wCAC9C,mBAAmBC,gBAAA,GAAmB,oCACtC,sGACA,6DACAH,KAAA,CAAMK,KAAK,CACZ,CAACC,IAAI,CAAC;MAEX;IACF,GAAG,CAACX,YAAA,EAAcD,eAAA,CAAgB;EACpC;EAEA,OAAOC,YAAA;AACT"}
|
@@ -8,37 +8,26 @@ Object.defineProperty(exports, "useControllableState", {
|
|
8
8
|
});
|
9
9
|
const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
|
10
10
|
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
11
|
-
function isFactoryDispatch(newState) {
|
12
|
-
return typeof newState === 'function';
|
13
|
-
}
|
14
11
|
const useControllableState = (options)=>{
|
15
|
-
const
|
16
|
-
|
17
|
-
|
18
|
-
const state = isControlled ? options.state : internalState;
|
19
|
-
const stateRef = _react.useRef(state);
|
20
|
-
_react.useEffect(()=>{
|
21
|
-
stateRef.current = state;
|
22
|
-
}, [
|
23
|
-
state
|
24
|
-
]);
|
25
|
-
// To match the behavior of the setter returned by React.useState, this callback's identity
|
26
|
-
// should never change. This means it MUST NOT directly reference variables that can change.
|
27
|
-
const setState = _react.useCallback((newState)=>{
|
28
|
-
// React dispatch can use a factory
|
29
|
-
// https://reactjs.org/docs/hooks-reference.html#functional-updates
|
30
|
-
if (isFactoryDispatch(newState)) {
|
31
|
-
stateRef.current = newState(stateRef.current);
|
32
|
-
} else {
|
33
|
-
stateRef.current = newState;
|
12
|
+
const [internalState, setInternalState] = _react.useState(()=>{
|
13
|
+
if (options.defaultState === undefined) {
|
14
|
+
return options.initialState;
|
34
15
|
}
|
35
|
-
|
36
|
-
}
|
37
|
-
return [
|
38
|
-
state,
|
39
|
-
|
16
|
+
return isInitializer(options.defaultState) ? options.defaultState() : options.defaultState;
|
17
|
+
});
|
18
|
+
return useIsControlled(options.state) ? [
|
19
|
+
options.state,
|
20
|
+
noop
|
21
|
+
] : [
|
22
|
+
internalState,
|
23
|
+
setInternalState
|
40
24
|
];
|
41
25
|
};
|
26
|
+
function isInitializer(value) {
|
27
|
+
return typeof value === 'function';
|
28
|
+
}
|
29
|
+
function noop() {
|
30
|
+
/* noop */ }
|
42
31
|
/**
|
43
32
|
* Helper hook to handle previous comparison of controlled/uncontrolled
|
44
33
|
* Prints an error when isControlled value switches between subsequent renders
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../lib/hooks/useControllableState.js"],"sourcesContent":["import * as React from 'react';\
|
1
|
+
{"version":3,"sources":["../../lib/hooks/useControllableState.js"],"sourcesContent":["import * as React from 'react';\n/**\n * @internal\n *\n * A [`useState`](https://reactjs.org/docs/hooks-reference.html#usestate)-like hook\n * to manage a value that could be either `controlled` or `uncontrolled`,\n * such as a checked state or text input string.\n *\n * @see https://react.dev/learn/sharing-state-between-components#controlled-and-uncontrolled-components for more details on `controlled`/`uncontrolled`\n *\n * @returns an array of the current value and an updater (dispatcher) function.\n * The updater function is referentially stable (won't change during the component's lifecycle).\n * It can take either a new value, or a function which is passed the previous value and returns the new value.\n *\n * ❗️❗️ Calls to the dispatcher will only modify the state if the state is `uncontrolled`.\n * Meaning that if a state is `controlled`, calls to the dispatcher do not modify the state.\n *\n */\nexport const useControllableState = options => {\n const [internalState, setInternalState] = React.useState(() => {\n if (options.defaultState === undefined) {\n return options.initialState;\n }\n return isInitializer(options.defaultState) ? options.defaultState() : options.defaultState;\n });\n return useIsControlled(options.state) ? [options.state, noop] : [internalState, setInternalState];\n};\nfunction isInitializer(value) {\n return typeof value === 'function';\n}\nfunction noop() {\n /* noop */}\n/**\n * Helper hook to handle previous comparison of controlled/uncontrolled\n * Prints an error when isControlled value switches between subsequent renders\n * @returns - whether the value is controlled\n */\nconst useIsControlled = controlledValue => {\n const [isControlled] = React.useState(() => controlledValue !== undefined);\n if (process.env.NODE_ENV !== 'production') {\n // We don't want these warnings in production even though it is against native behaviour\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (isControlled !== (controlledValue !== undefined)) {\n const error = new Error();\n const controlWarning = isControlled ? 'a controlled value to be uncontrolled' : 'an uncontrolled value to be controlled';\n const undefinedWarning = isControlled ? 'defined to an undefined' : 'undefined to a defined';\n // eslint-disable-next-line no-console\n console.error([\n // Default react error\n 'A component is changing ' + controlWarning + '. This is likely caused by the value', 'changing from ' + undefinedWarning + ' value, which should not happen.', 'Decide between using a controlled or uncontrolled input element for the lifetime of the component.', 'More info: https://reactjs.org/link/controlled-components', error.stack].join(' '));\n }\n }, [isControlled, controlledValue]);\n }\n return isControlled;\n};\n//# sourceMappingURL=useControllableState.js.map"],"names":["useControllableState","options","internalState","setInternalState","React","useState","defaultState","undefined","initialState","isInitializer","useIsControlled","state","noop","value","controlledValue","isControlled","process","env","NODE_ENV","useEffect","error","Error","controlWarning","undefinedWarning","console","stack","join"],"mappings":";;;;+BAkBaA;;aAAAA;;;6DAlBU;AAkBhB,MAAMA,uBAAuBC,CAAAA,UAAW;IAC7C,MAAM,CAACC,eAAeC,iBAAiB,GAAGC,OAAMC,QAAQ,CAAC,IAAM;QAC7D,IAAIJ,QAAQK,YAAY,KAAKC,WAAW;YACtC,OAAON,QAAQO,YAAY;QAC7B,CAAC;QACD,OAAOC,cAAcR,QAAQK,YAAY,IAAIL,QAAQK,YAAY,KAAKL,QAAQK,YAAY;IAC5F;IACA,OAAOI,gBAAgBT,QAAQU,KAAK,IAAI;QAACV,QAAQU,KAAK;QAAEC;KAAK,GAAG;QAACV;QAAeC;KAAiB;AACnG;AACA,SAASM,cAAcI,KAAK,EAAE;IAC5B,OAAO,OAAOA,UAAU;AAC1B;AACA,SAASD,OAAO;AACd,QAAQ,GAAE;AACZ;;;;CAIC,GACD,MAAMF,kBAAkBI,CAAAA,kBAAmB;IACzC,MAAM,CAACC,aAAa,GAAGX,OAAMC,QAAQ,CAAC,IAAMS,oBAAoBP;IAChE,IAAIS,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACzC,wFAAwF;QACxF,sDAAsD;QACtDd,OAAMe,SAAS,CAAC,IAAM;YACpB,IAAIJ,iBAAkBD,CAAAA,oBAAoBP,SAAQ,GAAI;gBACpD,MAAMa,QAAQ,IAAIC;gBAClB,MAAMC,iBAAiBP,eAAe,0CAA0C,wCAAwC;gBACxH,MAAMQ,mBAAmBR,eAAe,4BAA4B,wBAAwB;gBAC5F,sCAAsC;gBACtCS,QAAQJ,KAAK,CAAC;oBACd,sBAAsB;oBACtB,6BAA6BE,iBAAiB;oBAAwC,mBAAmBC,mBAAmB;oBAAoC;oBAAsG;oBAA6DH,MAAMK,KAAK;iBAAC,CAACC,IAAI,CAAC;YACvV,CAAC;QACH,GAAG;YAACX;YAAcD;SAAgB;IACpC,CAAC;IACD,OAAOC;AACT,GACA,gDAAgD"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-utilities",
|
3
|
-
"version": "9.8.
|
3
|
+
"version": "9.8.1",
|
4
4
|
"description": "A set of general React-specific utilities.",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -28,7 +28,7 @@
|
|
28
28
|
"@fluentui/scripts-tasks": "*"
|
29
29
|
},
|
30
30
|
"dependencies": {
|
31
|
-
"@fluentui/keyboard-keys": "^9.0.
|
31
|
+
"@fluentui/keyboard-keys": "^9.0.3",
|
32
32
|
"@swc/helpers": "^0.4.14"
|
33
33
|
},
|
34
34
|
"peerDependencies": {
|
package/.swcrc
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"$schema": "https://json.schemastore.org/swcrc",
|
3
|
-
"exclude": [
|
4
|
-
"/testing",
|
5
|
-
"/**/*.cy.ts",
|
6
|
-
"/**/*.cy.tsx",
|
7
|
-
"/**/*.spec.ts",
|
8
|
-
"/**/*.spec.tsx",
|
9
|
-
"/**/*.test.ts",
|
10
|
-
"/**/*.test.tsx"
|
11
|
-
],
|
12
|
-
"jsc": {
|
13
|
-
"parser": {
|
14
|
-
"syntax": "typescript",
|
15
|
-
"tsx": true,
|
16
|
-
"decorators": false,
|
17
|
-
"dynamicImport": false
|
18
|
-
},
|
19
|
-
"externalHelpers": true,
|
20
|
-
"transform": {
|
21
|
-
"react": {
|
22
|
-
"runtime": "classic",
|
23
|
-
"useSpread": true
|
24
|
-
}
|
25
|
-
},
|
26
|
-
"target": "es2019"
|
27
|
-
},
|
28
|
-
"minify": false,
|
29
|
-
"sourceMaps": true
|
30
|
-
}
|