@fluentui/react-search 9.0.6 → 9.0.7
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 +15 -3
- package/lib/components/SearchBox/useSearchBox.js +7 -7
- package/lib/components/SearchBox/useSearchBox.js.map +1 -1
- package/lib-commonjs/components/SearchBox/useSearchBox.js +7 -7
- package/lib-commonjs/components/SearchBox/useSearchBox.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,17 +1,29 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-search
|
|
2
2
|
|
|
3
|
-
This log was last generated on Thu,
|
|
3
|
+
This log was last generated on Thu, 06 Jun 2024 15:22:20 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.0.7](https://github.com/microsoft/fluentui/tree/@fluentui/react-search_v9.0.7)
|
|
8
|
+
|
|
9
|
+
Thu, 06 Jun 2024 15:22:20 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-search_v9.0.6..@fluentui/react-search_v9.0.7)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- chore: ensure only state or defaultState is provided on useControllableState hook invocation ([PR #31461](https://github.com/microsoft/fluentui/pull/31461) by bernardo.sunderhus@gmail.com)
|
|
15
|
+
- Bump @fluentui/react-input to v9.4.78 ([PR #31586](https://github.com/microsoft/fluentui/pull/31586) by beachball)
|
|
16
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.39 ([PR #31586](https://github.com/microsoft/fluentui/pull/31586) by beachball)
|
|
17
|
+
- Bump @fluentui/react-utilities to v9.18.10 ([PR #31586](https://github.com/microsoft/fluentui/pull/31586) by beachball)
|
|
18
|
+
|
|
7
19
|
## [9.0.6](https://github.com/microsoft/fluentui/tree/@fluentui/react-search_v9.0.6)
|
|
8
20
|
|
|
9
|
-
Thu, 23 May 2024
|
|
21
|
+
Thu, 23 May 2024 08:02:52 GMT
|
|
10
22
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-search_v9.0.5..@fluentui/react-search_v9.0.6)
|
|
11
23
|
|
|
12
24
|
### Patches
|
|
13
25
|
|
|
14
|
-
- Bump @fluentui/react-input to v9.4.77 ([commit](https://github.com/microsoft/fluentui/commit/
|
|
26
|
+
- Bump @fluentui/react-input to v9.4.77 ([commit](https://github.com/microsoft/fluentui/commit/03599d609e8310b08c57d1f871cffbf717d79207) by beachball)
|
|
15
27
|
|
|
16
28
|
## [9.0.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-search_v9.0.5)
|
|
17
29
|
|
|
@@ -11,12 +11,12 @@ import { DismissRegular, SearchRegular } from '@fluentui/react-icons';
|
|
|
11
11
|
* @param props - props from this instance of SearchBox
|
|
12
12
|
* @param ref - reference to root HTMLElement of SearchBox
|
|
13
13
|
*/ export const useSearchBox_unstable = (props, ref)=>{
|
|
14
|
-
const { size = 'medium', disabled = false, root, contentBefore, dismiss, contentAfter, ...inputProps } = props;
|
|
14
|
+
const { size = 'medium', disabled = false, root, contentBefore, dismiss, contentAfter, value, defaultValue, ...inputProps } = props;
|
|
15
15
|
const searchBoxRootRef = React.useRef(null);
|
|
16
16
|
const searchBoxRef = React.useRef(null);
|
|
17
|
-
const [
|
|
18
|
-
state:
|
|
19
|
-
defaultState:
|
|
17
|
+
const [internalValue, setInternalValue] = useControllableState({
|
|
18
|
+
state: value,
|
|
19
|
+
defaultState: defaultValue,
|
|
20
20
|
initialState: ''
|
|
21
21
|
});
|
|
22
22
|
// Tracks the focus of the component for the contentAfter and dismiss button
|
|
@@ -36,7 +36,7 @@ import { DismissRegular, SearchRegular } from '@fluentui/react-icons';
|
|
|
36
36
|
(_dismiss_onClick = dismiss.onClick) === null || _dismiss_onClick === void 0 ? void 0 : _dismiss_onClick.call(dismiss, event);
|
|
37
37
|
}
|
|
38
38
|
const newValue = '';
|
|
39
|
-
|
|
39
|
+
setInternalValue(newValue);
|
|
40
40
|
(_props_onChange = props.onChange) === null || _props_onChange === void 0 ? void 0 : _props_onChange.call(props, event, {
|
|
41
41
|
value: newValue
|
|
42
42
|
});
|
|
@@ -45,7 +45,7 @@ import { DismissRegular, SearchRegular } from '@fluentui/react-icons';
|
|
|
45
45
|
type: 'search',
|
|
46
46
|
disabled,
|
|
47
47
|
size,
|
|
48
|
-
value,
|
|
48
|
+
value: internalValue,
|
|
49
49
|
root: slot.always({
|
|
50
50
|
...rootProps,
|
|
51
51
|
ref: useMergedRefs(rootProps === null || rootProps === void 0 ? void 0 : rootProps.ref, searchBoxRootRef),
|
|
@@ -72,7 +72,7 @@ import { DismissRegular, SearchRegular } from '@fluentui/react-icons';
|
|
|
72
72
|
(_props_onChange = props.onChange) === null || _props_onChange === void 0 ? void 0 : _props_onChange.call(props, ev, {
|
|
73
73
|
value: newValue
|
|
74
74
|
});
|
|
75
|
-
|
|
75
|
+
setInternalValue(newValue);
|
|
76
76
|
})
|
|
77
77
|
}, useMergedRefs(searchBoxRef, ref));
|
|
78
78
|
const state = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useSearchBox.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n isResolvedShorthand,\n mergeCallbacks,\n slot,\n useControllableState,\n useEventCallback,\n useMergedRefs,\n} from '@fluentui/react-utilities';\nimport { useInput_unstable } from '@fluentui/react-input';\nimport { DismissRegular, SearchRegular } from '@fluentui/react-icons';\nimport type { ExtractSlotProps } from '@fluentui/react-utilities';\nimport type { SearchBoxSlots, SearchBoxProps, SearchBoxState } from './SearchBox.types';\n\n/**\n * Create the state required to render SearchBox.\n *\n * The returned state can be modified with hooks such as useSearchBoxStyles_unstable,\n * before being passed to renderSearchBox_unstable.\n *\n * @param props - props from this instance of SearchBox\n * @param ref - reference to root HTMLElement of SearchBox\n */\nexport const useSearchBox_unstable = (props: SearchBoxProps, ref: React.Ref<HTMLInputElement>): SearchBoxState => {\n const {
|
|
1
|
+
{"version":3,"sources":["useSearchBox.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n isResolvedShorthand,\n mergeCallbacks,\n slot,\n useControllableState,\n useEventCallback,\n useMergedRefs,\n} from '@fluentui/react-utilities';\nimport { useInput_unstable } from '@fluentui/react-input';\nimport { DismissRegular, SearchRegular } from '@fluentui/react-icons';\nimport type { ExtractSlotProps } from '@fluentui/react-utilities';\nimport type { SearchBoxSlots, SearchBoxProps, SearchBoxState } from './SearchBox.types';\n\n/**\n * Create the state required to render SearchBox.\n *\n * The returned state can be modified with hooks such as useSearchBoxStyles_unstable,\n * before being passed to renderSearchBox_unstable.\n *\n * @param props - props from this instance of SearchBox\n * @param ref - reference to root HTMLElement of SearchBox\n */\nexport const useSearchBox_unstable = (props: SearchBoxProps, ref: React.Ref<HTMLInputElement>): SearchBoxState => {\n const {\n size = 'medium',\n disabled = false,\n root,\n contentBefore,\n dismiss,\n contentAfter,\n value,\n defaultValue,\n ...inputProps\n } = props;\n\n const searchBoxRootRef = React.useRef<HTMLDivElement>(null);\n const searchBoxRef = React.useRef<HTMLInputElement>(null);\n\n const [internalValue, setInternalValue] = useControllableState({\n state: value,\n defaultState: defaultValue,\n initialState: '',\n });\n\n // Tracks the focus of the component for the contentAfter and dismiss button\n const [focused, setFocused] = React.useState(false);\n\n const onFocus = useEventCallback(() => {\n setFocused(true);\n });\n\n const onBlur: React.FocusEventHandler<HTMLSpanElement> = useEventCallback(ev => {\n setFocused(!!searchBoxRootRef.current?.contains(ev.relatedTarget));\n });\n\n const rootProps = slot.resolveShorthand(root);\n\n const handleDismissClick = useEventCallback((event: React.MouseEvent<HTMLSpanElement>) => {\n if (isResolvedShorthand(dismiss)) {\n dismiss.onClick?.(event);\n }\n const newValue = '';\n setInternalValue(newValue);\n props.onChange?.(event, { value: newValue });\n });\n\n const inputState = useInput_unstable(\n {\n type: 'search',\n disabled,\n size,\n value: internalValue,\n root: slot.always<ExtractSlotProps<SearchBoxSlots['root']>>(\n {\n ...rootProps,\n ref: useMergedRefs(rootProps?.ref, searchBoxRootRef),\n onFocus: useEventCallback(mergeCallbacks(rootProps?.onFocus, onFocus)),\n onBlur: useEventCallback(mergeCallbacks(rootProps?.onBlur, onBlur)),\n },\n {\n elementType: 'span',\n },\n ),\n contentBefore: slot.optional(contentBefore, {\n renderByDefault: true,\n defaultProps: {\n children: <SearchRegular />,\n },\n elementType: 'span',\n }),\n contentAfter: slot.optional(contentAfter, {\n renderByDefault: true,\n elementType: 'span',\n }),\n ...inputProps,\n onChange: useEventCallback(ev => {\n const newValue = ev.target.value;\n props.onChange?.(ev, { value: newValue });\n setInternalValue(newValue);\n }),\n },\n useMergedRefs(searchBoxRef, ref),\n );\n\n const state: SearchBoxState = {\n ...inputState,\n components: {\n ...inputState.components,\n dismiss: 'span',\n },\n dismiss: slot.optional(dismiss, {\n defaultProps: {\n children: <DismissRegular />,\n role: 'button',\n 'aria-label': 'clear',\n tabIndex: -1,\n },\n renderByDefault: true,\n elementType: 'span',\n }),\n disabled,\n focused,\n size,\n };\n\n if (state.dismiss) {\n state.dismiss.onClick = handleDismissClick;\n }\n\n return state;\n};\n"],"names":["React","isResolvedShorthand","mergeCallbacks","slot","useControllableState","useEventCallback","useMergedRefs","useInput_unstable","DismissRegular","SearchRegular","useSearchBox_unstable","props","ref","size","disabled","root","contentBefore","dismiss","contentAfter","value","defaultValue","inputProps","searchBoxRootRef","useRef","searchBoxRef","internalValue","setInternalValue","state","defaultState","initialState","focused","setFocused","useState","onFocus","onBlur","ev","current","contains","relatedTarget","rootProps","resolveShorthand","handleDismissClick","event","onClick","newValue","onChange","inputState","type","always","elementType","optional","renderByDefault","defaultProps","children","target","components","role","tabIndex"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SACEC,mBAAmB,EACnBC,cAAc,EACdC,IAAI,EACJC,oBAAoB,EACpBC,gBAAgB,EAChBC,aAAa,QACR,4BAA4B;AACnC,SAASC,iBAAiB,QAAQ,wB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,gCAAAA,UAAW3B,GAAG,EAAEU;YACnCW,SAAS5B,iBAAiBH,eAAeqC,sBAAAA,gCAAAA,UAAWN,OAAO,EAAEA;YAC7DC,QAAQ7B,iBAAiBH,eAAeqC,sBAAAA,gCAAAA,UAAWL,MAAM,EAAEA;QAC7D,GACA;YACEe,aAAa;QACf;QAEFjC,eAAeb,KAAK+C,QAAQ,CAAClC,eAAe;YAC1CmC,iBAAiB;YACjBC,cAAc;gBACZC,wBAAU,oBAAC5C;YACb;YACAwC,aAAa;QACf;QACA/B,cAAcf,KAAK+C,QAAQ,CAAChC,cAAc;YACxCiC,iBAAiB;YACjBF,aAAa;QACf;QACA,GAAG5B,UAAU;QACbwB,UAAUxC,iBAAiB8B,CAAAA;gBAEzBxB;YADA,MAAMiC,WAAWT,GAAGmB,MAAM,CAACnC,KAAK;aAChCR,kBAAAA,MAAMkC,QAAQ,cAAdlC,sCAAAA,qBAAAA,OAAiBwB,IAAI;gBAAEhB,OAAOyB;YAAS;YACvClB,iBAAiBkB;QACnB;IACF,GACAtC,cAAckB,cAAcZ;IAG9B,MAAMe,QAAwB;QAC5B,GAAGmB,UAAU;QACbS,YAAY;YACV,GAAGT,WAAWS,UAAU;YACxBtC,SAAS;QACX;QACAA,SAASd,KAAK+C,QAAQ,CAACjC,SAAS;YAC9BmC,cAAc;gBACZC,wBAAU,oBAAC7C;gBACXgD,MAAM;gBACN,cAAc;gBACdC,UAAU,CAAC;YACb;YACAN,iBAAiB;YACjBF,aAAa;QACf;QACAnC;QACAgB;QACAjB;IACF;IAEA,IAAIc,MAAMV,OAAO,EAAE;QACjBU,MAAMV,OAAO,CAAC0B,OAAO,GAAGF;IAC1B;IAEA,OAAOd;AACT,EAAE"}
|
|
@@ -14,12 +14,12 @@ const _reactutilities = require("@fluentui/react-utilities");
|
|
|
14
14
|
const _reactinput = require("@fluentui/react-input");
|
|
15
15
|
const _reacticons = require("@fluentui/react-icons");
|
|
16
16
|
const useSearchBox_unstable = (props, ref)=>{
|
|
17
|
-
const { size = 'medium', disabled = false, root, contentBefore, dismiss, contentAfter, ...inputProps } = props;
|
|
17
|
+
const { size = 'medium', disabled = false, root, contentBefore, dismiss, contentAfter, value, defaultValue, ...inputProps } = props;
|
|
18
18
|
const searchBoxRootRef = _react.useRef(null);
|
|
19
19
|
const searchBoxRef = _react.useRef(null);
|
|
20
|
-
const [
|
|
21
|
-
state:
|
|
22
|
-
defaultState:
|
|
20
|
+
const [internalValue, setInternalValue] = (0, _reactutilities.useControllableState)({
|
|
21
|
+
state: value,
|
|
22
|
+
defaultState: defaultValue,
|
|
23
23
|
initialState: ''
|
|
24
24
|
});
|
|
25
25
|
// Tracks the focus of the component for the contentAfter and dismiss button
|
|
@@ -39,7 +39,7 @@ const useSearchBox_unstable = (props, ref)=>{
|
|
|
39
39
|
(_dismiss_onClick = dismiss.onClick) === null || _dismiss_onClick === void 0 ? void 0 : _dismiss_onClick.call(dismiss, event);
|
|
40
40
|
}
|
|
41
41
|
const newValue = '';
|
|
42
|
-
|
|
42
|
+
setInternalValue(newValue);
|
|
43
43
|
(_props_onChange = props.onChange) === null || _props_onChange === void 0 ? void 0 : _props_onChange.call(props, event, {
|
|
44
44
|
value: newValue
|
|
45
45
|
});
|
|
@@ -48,7 +48,7 @@ const useSearchBox_unstable = (props, ref)=>{
|
|
|
48
48
|
type: 'search',
|
|
49
49
|
disabled,
|
|
50
50
|
size,
|
|
51
|
-
value,
|
|
51
|
+
value: internalValue,
|
|
52
52
|
root: _reactutilities.slot.always({
|
|
53
53
|
...rootProps,
|
|
54
54
|
ref: (0, _reactutilities.useMergedRefs)(rootProps === null || rootProps === void 0 ? void 0 : rootProps.ref, searchBoxRootRef),
|
|
@@ -75,7 +75,7 @@ const useSearchBox_unstable = (props, ref)=>{
|
|
|
75
75
|
(_props_onChange = props.onChange) === null || _props_onChange === void 0 ? void 0 : _props_onChange.call(props, ev, {
|
|
76
76
|
value: newValue
|
|
77
77
|
});
|
|
78
|
-
|
|
78
|
+
setInternalValue(newValue);
|
|
79
79
|
})
|
|
80
80
|
}, (0, _reactutilities.useMergedRefs)(searchBoxRef, ref));
|
|
81
81
|
const state = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useSearchBox.js"],"sourcesContent":["import * as React from 'react';\nimport { isResolvedShorthand, mergeCallbacks, slot, useControllableState, useEventCallback, useMergedRefs } from '@fluentui/react-utilities';\nimport { useInput_unstable } from '@fluentui/react-input';\nimport { DismissRegular, SearchRegular } from '@fluentui/react-icons';\n/**\n * Create the state required to render SearchBox.\n *\n * The returned state can be modified with hooks such as useSearchBoxStyles_unstable,\n * before being passed to renderSearchBox_unstable.\n *\n * @param props - props from this instance of SearchBox\n * @param ref - reference to root HTMLElement of SearchBox\n */ export const useSearchBox_unstable = (props, ref)=>{\n const { size = 'medium', disabled = false, root, contentBefore, dismiss, contentAfter, ...inputProps } = props;\n const searchBoxRootRef = React.useRef(null);\n const searchBoxRef = React.useRef(null);\n const [
|
|
1
|
+
{"version":3,"sources":["useSearchBox.js"],"sourcesContent":["import * as React from 'react';\nimport { isResolvedShorthand, mergeCallbacks, slot, useControllableState, useEventCallback, useMergedRefs } from '@fluentui/react-utilities';\nimport { useInput_unstable } from '@fluentui/react-input';\nimport { DismissRegular, SearchRegular } from '@fluentui/react-icons';\n/**\n * Create the state required to render SearchBox.\n *\n * The returned state can be modified with hooks such as useSearchBoxStyles_unstable,\n * before being passed to renderSearchBox_unstable.\n *\n * @param props - props from this instance of SearchBox\n * @param ref - reference to root HTMLElement of SearchBox\n */ export const useSearchBox_unstable = (props, ref)=>{\n const { size = 'medium', disabled = false, root, contentBefore, dismiss, contentAfter, value, defaultValue, ...inputProps } = props;\n const searchBoxRootRef = React.useRef(null);\n const searchBoxRef = React.useRef(null);\n const [internalValue, setInternalValue] = useControllableState({\n state: value,\n defaultState: defaultValue,\n initialState: ''\n });\n // Tracks the focus of the component for the contentAfter and dismiss button\n const [focused, setFocused] = React.useState(false);\n const onFocus = useEventCallback(()=>{\n setFocused(true);\n });\n const onBlur = useEventCallback((ev)=>{\n var _searchBoxRootRef_current;\n setFocused(!!((_searchBoxRootRef_current = searchBoxRootRef.current) === null || _searchBoxRootRef_current === void 0 ? void 0 : _searchBoxRootRef_current.contains(ev.relatedTarget)));\n });\n const rootProps = slot.resolveShorthand(root);\n const handleDismissClick = useEventCallback((event)=>{\n var _props_onChange;\n if (isResolvedShorthand(dismiss)) {\n var _dismiss_onClick;\n (_dismiss_onClick = dismiss.onClick) === null || _dismiss_onClick === void 0 ? void 0 : _dismiss_onClick.call(dismiss, event);\n }\n const newValue = '';\n setInternalValue(newValue);\n (_props_onChange = props.onChange) === null || _props_onChange === void 0 ? void 0 : _props_onChange.call(props, event, {\n value: newValue\n });\n });\n const inputState = useInput_unstable({\n type: 'search',\n disabled,\n size,\n value: internalValue,\n root: slot.always({\n ...rootProps,\n ref: useMergedRefs(rootProps === null || rootProps === void 0 ? void 0 : rootProps.ref, searchBoxRootRef),\n onFocus: useEventCallback(mergeCallbacks(rootProps === null || rootProps === void 0 ? void 0 : rootProps.onFocus, onFocus)),\n onBlur: useEventCallback(mergeCallbacks(rootProps === null || rootProps === void 0 ? void 0 : rootProps.onBlur, onBlur))\n }, {\n elementType: 'span'\n }),\n contentBefore: slot.optional(contentBefore, {\n renderByDefault: true,\n defaultProps: {\n children: /*#__PURE__*/ React.createElement(SearchRegular, null)\n },\n elementType: 'span'\n }),\n contentAfter: slot.optional(contentAfter, {\n renderByDefault: true,\n elementType: 'span'\n }),\n ...inputProps,\n onChange: useEventCallback((ev)=>{\n var _props_onChange;\n const newValue = ev.target.value;\n (_props_onChange = props.onChange) === null || _props_onChange === void 0 ? void 0 : _props_onChange.call(props, ev, {\n value: newValue\n });\n setInternalValue(newValue);\n })\n }, useMergedRefs(searchBoxRef, ref));\n const state = {\n ...inputState,\n components: {\n ...inputState.components,\n dismiss: 'span'\n },\n dismiss: slot.optional(dismiss, {\n defaultProps: {\n children: /*#__PURE__*/ React.createElement(DismissRegular, null),\n role: 'button',\n 'aria-label': 'clear',\n tabIndex: -1\n },\n renderByDefault: true,\n elementType: 'span'\n }),\n disabled,\n focused,\n size\n };\n if (state.dismiss) {\n state.dismiss.onClick = handleDismissClick;\n }\n return state;\n};\n"],"names":["useSearchBox_unstable","props","ref","size","disabled","root","contentBefore","dismiss","contentAfter","value","defaultValue","inputProps","searchBoxRootRef","React","useRef","searchBoxRef","internalValue","setInternalValue","useControllableState","state","defaultState","initialState","focused","setFocused","useState","onFocus","useEventCallback","onBlur","ev","_searchBoxRootRef_current","current","contains","relatedTarget","rootProps","slot","resolveShorthand","handleDismissClick","event","_props_onChange","isResolvedShorthand","_dismiss_onClick","onClick","call","newValue","onChange","inputState","useInput_unstable","type","always","useMergedRefs","mergeCallbacks","elementType","optional","renderByDefault","defaultProps","children","createElement","SearchRegular","target","components","DismissRegular","role","tabIndex"],"mappings":";;;;+BAYiBA;;;eAAAA;;;;iEAZM;gCAC0F;4BAC/E;4BACY;AASnC,MAAMA,wBAAwB,CAACC,OAAOC;IAC7C,MAAM,EAAEC,OAAO,QAAQ,EAAEC,WAAW,KAAK,EAAEC,IAAI,EAAEC,aAAa,EAAEC,OAAO,EAAEC,YAAY,EAAEC,KAAK,EAAEC,YAAY,EAAE,GAAGC,YAAY,GAAGV;IAC9H,MAAMW,mBAAmBC,OAAMC,MAAM,CAAC;IACtC,MAAMC,eAAeF,OAAMC,MAAM,CAAC;IAClC,MAAM,CAACE,eAAeC,iBAAiB,GAAGC,IAAAA,oCAAoB,EAAC;QAC3DC,OAAOV;QACPW,cAAcV;QACdW,cAAc;IAClB;IACA,4EAA4E;IAC5E,MAAM,CAACC,SAASC,WAAW,GAAGV,OAAMW,QAAQ,CAAC;IAC7C,MAAMC,UAAUC,IAAAA,gCAAgB,EAAC;QAC7BH,WAAW;IACf;IACA,MAAMI,SAASD,IAAAA,gCAAgB,EAAC,CAACE;QAC7B,IAAIC;QACJN,WAAW,CAAC,CAAE,CAAA,AAACM,CAAAA,4B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,UAAU,WAAW,GAAG1C,OAAM2C,aAAa,CAACC,yBAAa,EAAE;YAC/D;YACAN,aAAa;QACjB;QACA3C,cAAc0B,oBAAI,CAACkB,QAAQ,CAAC5C,cAAc;YACtC6C,iBAAiB;YACjBF,aAAa;QACjB;QACA,GAAGxC,UAAU;QACbiC,UAAUlB,IAAAA,gCAAgB,EAAC,CAACE;YACxB,IAAIU;YACJ,MAAMK,WAAWf,GAAG8B,MAAM,CAACjD,KAAK;YAC/B6B,CAAAA,kBAAkBrC,MAAM2C,QAAQ,AAAD,MAAO,QAAQN,oBAAoB,KAAK,IAAI,KAAK,IAAIA,gBAAgBI,IAAI,CAACzC,OAAO2B,IAAI;gBACjHnB,OAAOkC;YACX;YACA1B,iBAAiB0B;QACrB;IACJ,GAAGM,IAAAA,6BAAa,EAAClC,cAAcb;IAC/B,MAAMiB,QAAQ;QACV,GAAG0B,UAAU;QACbc,YAAY;YACR,GAAGd,WAAWc,UAAU;YACxBpD,SAAS;QACb;QACAA,SAAS2B,oBAAI,CAACkB,QAAQ,CAAC7C,SAAS;YAC5B+C,cAAc;gBACVC,UAAU,WAAW,GAAG1C,OAAM2C,aAAa,CAACI,0BAAc,EAAE;gBAC5DC,MAAM;gBACN,cAAc;gBACdC,UAAU,CAAC;YACf;YACAT,iBAAiB;YACjBF,aAAa;QACjB;QACA/C;QACAkB;QACAnB;IACJ;IACA,IAAIgB,MAAMZ,OAAO,EAAE;QACfY,MAAMZ,OAAO,CAACkC,OAAO,GAAGL;IAC5B;IACA,OAAOjB;AACX"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-search",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.7",
|
|
4
4
|
"description": "Search input for Fluent UI v9",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@fluentui/react-icons": "^2.0.239",
|
|
36
|
-
"@fluentui/react-input": "^9.4.
|
|
37
|
-
"@fluentui/react-jsx-runtime": "^9.0.
|
|
36
|
+
"@fluentui/react-input": "^9.4.78",
|
|
37
|
+
"@fluentui/react-jsx-runtime": "^9.0.39",
|
|
38
38
|
"@fluentui/react-theme": "^9.1.19",
|
|
39
|
-
"@fluentui/react-utilities": "^9.18.
|
|
39
|
+
"@fluentui/react-utilities": "^9.18.10",
|
|
40
40
|
"@griffel/react": "^1.5.22",
|
|
41
41
|
"@swc/helpers": "^0.5.1"
|
|
42
42
|
},
|