@fluentui/react-search 9.4.4 → 9.4.6

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.
Files changed (35) hide show
  1. package/CHANGELOG.md +25 -2
  2. package/dist/index.d.cts +89 -0
  3. package/lib/SearchBox.js +1 -1
  4. package/lib/SearchBox.js.map +1 -1
  5. package/lib/components/SearchBox/SearchBox.js +5 -5
  6. package/lib/components/SearchBox/SearchBox.js.map +1 -1
  7. package/lib/components/SearchBox/index.js +4 -4
  8. package/lib/components/SearchBox/index.js.map +1 -1
  9. package/lib/components/SearchBox/renderSearchBox.js +1 -1
  10. package/lib/components/SearchBox/useSearchBox.js +4 -4
  11. package/lib/components/SearchBox/useSearchBoxStyles.styles.js +3 -3
  12. package/lib/components/SearchBox/useSearchBoxStyles.styles.js.map +1 -1
  13. package/lib/components/SearchBox/useSearchBoxStyles.styles.raw.js +3 -3
  14. package/lib/index.js +1 -1
  15. package/lib/index.js.map +1 -1
  16. package/lib-commonjs/{SearchBox.js → SearchBox.cjs} +1 -1
  17. package/lib-commonjs/{SearchBox.js.map → SearchBox.cjs.map} +1 -1
  18. package/lib-commonjs/components/SearchBox/{SearchBox.js → SearchBox.cjs} +3 -3
  19. package/lib-commonjs/components/SearchBox/{SearchBox.js.map → SearchBox.cjs.map} +1 -1
  20. package/lib-commonjs/components/SearchBox/{index.js → index.cjs} +4 -4
  21. package/lib-commonjs/components/SearchBox/{index.js.map → index.cjs.map} +1 -1
  22. package/lib-commonjs/components/SearchBox/useSearchBoxStyles.styles.cjs.map +1 -0
  23. package/lib-commonjs/{index.js → index.cjs} +1 -1
  24. package/lib-commonjs/{index.js.map → index.cjs.map} +1 -1
  25. package/package.json +18 -12
  26. package/lib-commonjs/components/SearchBox/useSearchBoxStyles.styles.js.map +0 -1
  27. /package/lib-commonjs/components/SearchBox/{SearchBox.types.js → SearchBox.types.cjs} +0 -0
  28. /package/lib-commonjs/components/SearchBox/{SearchBox.types.js.map → SearchBox.types.cjs.map} +0 -0
  29. /package/lib-commonjs/components/SearchBox/{renderSearchBox.js → renderSearchBox.cjs} +0 -0
  30. /package/lib-commonjs/components/SearchBox/{renderSearchBox.js.map → renderSearchBox.cjs.map} +0 -0
  31. /package/lib-commonjs/components/SearchBox/{useSearchBox.js → useSearchBox.cjs} +0 -0
  32. /package/lib-commonjs/components/SearchBox/{useSearchBox.js.map → useSearchBox.cjs.map} +0 -0
  33. /package/lib-commonjs/components/SearchBox/{useSearchBoxStyles.styles.js → useSearchBoxStyles.styles.cjs} +0 -0
  34. /package/lib-commonjs/components/SearchBox/{useSearchBoxStyles.styles.raw.js → useSearchBoxStyles.styles.raw.cjs} +0 -0
  35. /package/lib-commonjs/components/SearchBox/{useSearchBoxStyles.styles.raw.js.map → useSearchBoxStyles.styles.raw.cjs.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,12 +1,35 @@
1
1
  # Change Log - @fluentui/react-search
2
2
 
3
- This log was last generated on Wed, 24 Jun 2026 11:03:43 GMT and should not be manually modified.
3
+ <!-- This log was last generated on Tue, 11 Aug 2026 17:16:02 GMT and should not be manually modified. -->
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.4.6](https://github.com/microsoft/fluentui/tree/@fluentui/react-search_v9.4.6)
8
+
9
+ Tue, 11 Aug 2026 17:16:02 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-search_v9.4.5..@fluentui/react-search_v9.4.6)
11
+
12
+ ### Patches
13
+
14
+ - Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake. ([PR #36327](https://github.com/microsoft/fluentui/pull/36327) by martinhochel@microsoft.com)
15
+ - Bump @fluentui/react-input to v9.8.6 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
16
+ - Bump @fluentui/react-jsx-runtime to v9.4.5 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
17
+ - Bump @fluentui/react-shared-contexts to v9.26.3 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
18
+ - Bump @fluentui/react-theme to v9.2.2 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
19
+ - Bump @fluentui/react-utilities to v9.26.6 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
20
+
21
+ ## [9.4.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-search_v9.4.5)
22
+
23
+ Tue, 04 Aug 2026 10:12:26 GMT
24
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-search_v9.4.4..@fluentui/react-search_v9.4.5)
25
+
26
+ ### Patches
27
+
28
+ - Bump @fluentui/react-input to v9.8.5 ([PR #36453](https://github.com/microsoft/fluentui/pull/36453) by beachball)
29
+
7
30
  ## [9.4.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-search_v9.4.4)
8
31
 
9
- Wed, 24 Jun 2026 11:03:43 GMT
32
+ Wed, 24 Jun 2026 11:09:54 GMT
10
33
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-search_v9.4.3..@fluentui/react-search_v9.4.4)
11
34
 
12
35
  ### Patches
@@ -0,0 +1,89 @@
1
+ import type { ComponentProps } from '@fluentui/react-utilities';
2
+ import type { ComponentState } from '@fluentui/react-utilities';
3
+ import type { ForwardRefComponent } from '@fluentui/react-utilities';
4
+ import type { InputOnChangeData } from '@fluentui/react-input';
5
+ import type { InputProps } from '@fluentui/react-input';
6
+ import type { InputSlots } from '@fluentui/react-input';
7
+ import type { InputState } from '@fluentui/react-input';
8
+ import type { JSXElement } from '@fluentui/react-utilities';
9
+ import * as React_2 from 'react';
10
+ import type { Slot } from '@fluentui/react-utilities';
11
+ import type { SlotClassNames } from '@fluentui/react-utilities';
12
+
13
+ /**
14
+ * Render the final JSX of SearchBox
15
+ */
16
+ export declare const renderSearchBox_unstable: (state: SearchBoxBaseState) => JSXElement;
17
+
18
+ /**
19
+ * SearchBox component - TODO: add more docs
20
+ */
21
+ export declare const SearchBox: ForwardRefComponent<SearchBoxProps>;
22
+
23
+ /**
24
+ * SearchBox base props — excludes design props (appearance, size).
25
+ */
26
+ export declare type SearchBoxBaseProps = Omit<SearchBoxProps, 'appearance' | 'size'>;
27
+
28
+ /**
29
+ * SearchBox base state — excludes design props (appearance, size).
30
+ */
31
+ export declare type SearchBoxBaseState = Omit<SearchBoxState, 'appearance' | 'size'>;
32
+
33
+ /** Overloaded onChange event type, used to merge functionality of regular text entry and the dismiss button */
34
+ export declare type SearchBoxChangeEvent = React_2.ChangeEvent<HTMLInputElement> | React_2.MouseEvent<HTMLSpanElement>;
35
+
36
+ export declare const searchBoxClassNames: SlotClassNames<SearchBoxSlots>;
37
+
38
+ /**
39
+ * SearchBox Props
40
+ */
41
+ export declare type SearchBoxProps = Omit<ComponentProps<Partial<SearchBoxSlots>, 'input'>, 'children' | 'defaultValue' | 'onChange' | 'size' | 'type' | 'value'> & Omit<InputProps, 'onChange'> & {
42
+ /**
43
+ * Custom onChange callback.
44
+ * Will be traditionally supplied with a React.ChangeEvent<HTMLInputElement> for usual character entry.
45
+ * When the dismiss button is clicked, this will be called with an event of type React.MouseEvent<HTMLSpanElement>
46
+ * and an empty string as the `value` property of the data parameter
47
+ */
48
+ onChange?: (event: SearchBoxChangeEvent, data: InputOnChangeData) => void;
49
+ };
50
+
51
+ export declare type SearchBoxSlots = InputSlots & {
52
+ /** Last element in the input, within the input border */
53
+ dismiss?: Slot<'span'>;
54
+ };
55
+
56
+ /**
57
+ * State used in rendering SearchBox
58
+ */
59
+ export declare type SearchBoxState = ComponentState<SearchBoxSlots> & InputState & Required<Pick<InputState, 'size'>> & Required<Pick<SearchBoxProps, 'disabled'>> & {
60
+ focused: boolean;
61
+ };
62
+
63
+ /**
64
+ * Create the state required to render SearchBox.
65
+ *
66
+ * The returned state can be modified with hooks such as useSearchBoxStyles_unstable,
67
+ * before being passed to renderSearchBox_unstable.
68
+ *
69
+ * @param props - props from this instance of SearchBox
70
+ * @param ref - reference to root HTMLElement of SearchBox
71
+ */
72
+ export declare const useSearchBox_unstable: (props: SearchBoxProps, ref: React_2.Ref<HTMLInputElement>) => SearchBoxState;
73
+
74
+ /**
75
+ * Base hook for SearchBox component. Manages state related to controlled/uncontrolled
76
+ * value, focus tracking, dismiss button click handling, search icon slot, and
77
+ * input type="search" — without design props (size, appearance).
78
+ *
79
+ * @param props - props from this instance of SearchBox (without size, appearance)
80
+ * @param ref - reference to root HTMLElement of SearchBox
81
+ */
82
+ export declare const useSearchBoxBase_unstable: (props: SearchBoxBaseProps, ref: React_2.Ref<HTMLInputElement>) => SearchBoxBaseState;
83
+
84
+ /**
85
+ * Apply styling to the SearchBox slots based on the state
86
+ */
87
+ export declare const useSearchBoxStyles_unstable: (state: SearchBoxState) => SearchBoxState;
88
+
89
+ export { }
package/lib/SearchBox.js CHANGED
@@ -1 +1 @@
1
- export { SearchBox, renderSearchBox_unstable, searchBoxClassNames, useSearchBoxStyles_unstable, useSearchBox_unstable, useSearchBoxBase_unstable } from './components/SearchBox/index';
1
+ export { SearchBox, renderSearchBox_unstable, searchBoxClassNames, useSearchBoxStyles_unstable, useSearchBox_unstable, useSearchBoxBase_unstable } from "./components/SearchBox/index.js";
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/SearchBox.ts"],"sourcesContent":["export type {\n SearchBoxChangeEvent,\n SearchBoxProps,\n SearchBoxBaseProps,\n SearchBoxSlots,\n SearchBoxState,\n SearchBoxBaseState,\n} from './components/SearchBox/index';\nexport {\n SearchBox,\n renderSearchBox_unstable,\n searchBoxClassNames,\n useSearchBoxStyles_unstable,\n useSearchBox_unstable,\n useSearchBoxBase_unstable,\n} from './components/SearchBox/index';\n"],"names":["SearchBox","renderSearchBox_unstable","searchBoxClassNames","useSearchBoxStyles_unstable","useSearchBox_unstable","useSearchBoxBase_unstable"],"mappings":"AAQA,SACEA,SAAS,EACTC,wBAAwB,EACxBC,mBAAmB,EACnBC,2BAA2B,EAC3BC,qBAAqB,EACrBC,yBAAyB,QACpB,+BAA+B"}
1
+ {"version":3,"sources":["../src/SearchBox.ts"],"sourcesContent":["export type {\n SearchBoxChangeEvent,\n SearchBoxProps,\n SearchBoxBaseProps,\n SearchBoxSlots,\n SearchBoxState,\n SearchBoxBaseState,\n} from './components/SearchBox/index';\nexport {\n SearchBox,\n renderSearchBox_unstable,\n searchBoxClassNames,\n useSearchBoxStyles_unstable,\n useSearchBox_unstable,\n useSearchBoxBase_unstable,\n} from './components/SearchBox/index';\n"],"names":["SearchBox","renderSearchBox_unstable","searchBoxClassNames","useSearchBoxStyles_unstable","useSearchBox_unstable","useSearchBoxBase_unstable"],"mappings":"AAQA,SACEA,SAAS,EACTC,wBAAwB,EACxBC,mBAAmB,EACnBC,2BAA2B,EAC3BC,qBAAqB,EACrBC,yBAAyB,QACpB,kCAA+B"}
@@ -1,9 +1,9 @@
1
1
  'use client';
2
- import * as React from 'react';
3
- import { useSearchBox_unstable } from './useSearchBox';
4
- import { renderSearchBox_unstable } from './renderSearchBox';
5
- import { useSearchBoxStyles_unstable } from './useSearchBoxStyles.styles';
6
- import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
2
+ import * as React from "react";
3
+ import { useSearchBox_unstable } from "./useSearchBox.js";
4
+ import { renderSearchBox_unstable } from "./renderSearchBox.js";
5
+ import { useSearchBoxStyles_unstable } from "./useSearchBoxStyles.styles.js";
6
+ import { useCustomStyleHook_unstable } from "@fluentui/react-shared-contexts";
7
7
  /**
8
8
  * SearchBox component - TODO: add more docs
9
9
  */ export const SearchBox = /*#__PURE__*/ React.forwardRef((props, ref)=>{
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/SearchBox/SearchBox.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useSearchBox_unstable } from './useSearchBox';\nimport { renderSearchBox_unstable } from './renderSearchBox';\nimport { useSearchBoxStyles_unstable } from './useSearchBoxStyles.styles';\nimport type { SearchBoxProps } from './SearchBox.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * SearchBox component - TODO: add more docs\n */\nexport const SearchBox: ForwardRefComponent<SearchBoxProps> = React.forwardRef((props, ref) => {\n const state = useSearchBox_unstable(props, ref);\n\n useSearchBoxStyles_unstable(state);\n\n useCustomStyleHook_unstable('useSearchBoxStyles_unstable')(state);\n\n return renderSearchBox_unstable(state);\n});\n\nSearchBox.displayName = 'SearchBox';\n"],"names":["React","useSearchBox_unstable","renderSearchBox_unstable","useSearchBoxStyles_unstable","useCustomStyleHook_unstable","SearchBox","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,QAAQ,iBAAiB;AACvD,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,2BAA2B,QAAQ,8BAA8B;AAG1E,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,0BAAiDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACrF,MAAMC,QAAQR,sBAAsBM,OAAOC;IAE3CL,4BAA4BM;IAE5BL,4BAA4B,+BAA+BK;IAE3D,OAAOP,yBAAyBO;AAClC,GAAG;AAEHJ,UAAUK,WAAW,GAAG"}
1
+ {"version":3,"sources":["../src/components/SearchBox/SearchBox.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useSearchBox_unstable } from './useSearchBox';\nimport { renderSearchBox_unstable } from './renderSearchBox';\nimport { useSearchBoxStyles_unstable } from './useSearchBoxStyles.styles';\nimport type { SearchBoxProps } from './SearchBox.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * SearchBox component - TODO: add more docs\n */\nexport const SearchBox: ForwardRefComponent<SearchBoxProps> = React.forwardRef((props, ref) => {\n const state = useSearchBox_unstable(props, ref);\n\n useSearchBoxStyles_unstable(state);\n\n useCustomStyleHook_unstable('useSearchBoxStyles_unstable')(state);\n\n return renderSearchBox_unstable(state);\n});\n\nSearchBox.displayName = 'SearchBox';\n"],"names":["React","useSearchBox_unstable","renderSearchBox_unstable","useSearchBoxStyles_unstable","useCustomStyleHook_unstable","SearchBox","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,QAAQ,oBAAiB;AACvD,SAASC,wBAAwB,QAAQ,uBAAoB;AAC7D,SAASC,2BAA2B,QAAQ,iCAA8B;AAG1E,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,0BAAiDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACrF,MAAMC,QAAQR,sBAAsBM,OAAOC;IAE3CL,4BAA4BM;IAE5BL,4BAA4B,+BAA+BK;IAE3D,OAAOP,yBAAyBO;AAClC,GAAG;AAEHJ,UAAUK,WAAW,GAAG"}
@@ -1,4 +1,4 @@
1
- export { SearchBox } from './SearchBox';
2
- export { renderSearchBox_unstable } from './renderSearchBox';
3
- export { useSearchBox_unstable, useSearchBoxBase_unstable } from './useSearchBox';
4
- export { searchBoxClassNames, useSearchBoxStyles_unstable } from './useSearchBoxStyles.styles';
1
+ export { SearchBox } from "./SearchBox.js";
2
+ export { renderSearchBox_unstable } from "./renderSearchBox.js";
3
+ export { useSearchBox_unstable, useSearchBoxBase_unstable } from "./useSearchBox.js";
4
+ export { searchBoxClassNames, useSearchBoxStyles_unstable } from "./useSearchBoxStyles.styles.js";
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/SearchBox/index.ts"],"sourcesContent":["export { SearchBox } from './SearchBox';\nexport type {\n SearchBoxChangeEvent,\n SearchBoxProps,\n SearchBoxBaseProps,\n SearchBoxSlots,\n SearchBoxState,\n SearchBoxBaseState,\n} from './SearchBox.types';\nexport { renderSearchBox_unstable } from './renderSearchBox';\nexport { useSearchBox_unstable, useSearchBoxBase_unstable } from './useSearchBox';\nexport { searchBoxClassNames, useSearchBoxStyles_unstable } from './useSearchBoxStyles.styles';\n"],"names":["SearchBox","renderSearchBox_unstable","useSearchBox_unstable","useSearchBoxBase_unstable","searchBoxClassNames","useSearchBoxStyles_unstable"],"mappings":"AAAA,SAASA,SAAS,QAAQ,cAAc;AASxC,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,qBAAqB,EAAEC,yBAAyB,QAAQ,iBAAiB;AAClF,SAASC,mBAAmB,EAAEC,2BAA2B,QAAQ,8BAA8B"}
1
+ {"version":3,"sources":["../src/components/SearchBox/index.ts"],"sourcesContent":["export { SearchBox } from './SearchBox';\nexport type {\n SearchBoxChangeEvent,\n SearchBoxProps,\n SearchBoxBaseProps,\n SearchBoxSlots,\n SearchBoxState,\n SearchBoxBaseState,\n} from './SearchBox.types';\nexport { renderSearchBox_unstable } from './renderSearchBox';\nexport { useSearchBox_unstable, useSearchBoxBase_unstable } from './useSearchBox';\nexport { searchBoxClassNames, useSearchBoxStyles_unstable } from './useSearchBoxStyles.styles';\n"],"names":["SearchBox","renderSearchBox_unstable","useSearchBox_unstable","useSearchBoxBase_unstable","searchBoxClassNames","useSearchBoxStyles_unstable"],"mappings":"AAAA,SAASA,SAAS,QAAQ,iBAAc;AASxC,SAASC,wBAAwB,QAAQ,uBAAoB;AAC7D,SAASC,qBAAqB,EAAEC,yBAAyB,QAAQ,oBAAiB;AAClF,SAASC,mBAAmB,EAAEC,2BAA2B,QAAQ,iCAA8B"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
- import { assertSlots } from '@fluentui/react-utilities';
2
+ import { assertSlots } from "@fluentui/react-utilities";
3
3
  /**
4
4
  * Render the final JSX of SearchBox
5
5
  */ export const renderSearchBox_unstable = (state)=>{
@@ -1,8 +1,8 @@
1
1
  'use client';
2
- import * as React from 'react';
3
- import { isResolvedShorthand, mergeCallbacks, slot, useControllableState, useEventCallback, useMergedRefs } from '@fluentui/react-utilities';
4
- import { useInput_unstable } from '@fluentui/react-input';
5
- import { DismissRegular, SearchRegular } from '@fluentui/react-icons';
2
+ import * as React from "react";
3
+ import { isResolvedShorthand, mergeCallbacks, slot, useControllableState, useEventCallback, useMergedRefs } from "@fluentui/react-utilities";
4
+ import { useInput_unstable } from "@fluentui/react-input";
5
+ import { DismissRegular, SearchRegular } from "@fluentui/react-icons";
6
6
  /**
7
7
  * Create the state required to render SearchBox.
8
8
  *
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
 
3
- import { __resetStyles, __styles, mergeClasses } from '@griffel/react';
4
- import { tokens } from '@fluentui/react-theme';
5
- import { useInputStyles_unstable } from '@fluentui/react-input';
3
+ import { __resetStyles, __styles, mergeClasses } from "@griffel/react";
4
+ import { tokens } from "@fluentui/react-theme";
5
+ import { useInputStyles_unstable } from "@fluentui/react-input";
6
6
  export const searchBoxClassNames = {
7
7
  root: 'fui-SearchBox',
8
8
  dismiss: 'fui-SearchBox__dismiss',
@@ -1 +1 @@
1
- {"version":3,"names":["__resetStyles","__styles","mergeClasses","tokens","useInputStyles_unstable","searchBoxClassNames","root","dismiss","contentAfter","contentBefore","input","useRootStyles","small","i8kkvl","B2u0y6b","uwmqm3","z189sj","medium","large","Boqhc8c","B8uat0v","unfocusedNoContentAfter","d","useInputStyles","useContentAfterStyles","rest","Bqenvij","a9b677","B68tc82","Bmxbyg5","Bpg54ce","p","useDismissClassName","useDismissStyles","disabled","sj55zd","Duoase","useSearchBoxStyles_unstable","state","focused","size","rootStyles","inputStyles","contentAfterStyles","dismissClassName","dismissStyles","className"],"sources":["useSearchBoxStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { useInputStyles_unstable } from '@fluentui/react-input';\nexport const searchBoxClassNames = {\n root: 'fui-SearchBox',\n dismiss: 'fui-SearchBox__dismiss',\n contentAfter: 'fui-SearchBox__contentAfter',\n contentBefore: 'fui-SearchBox__contentBefore',\n input: 'fui-SearchBox__input'\n};\n/**\n * Styles for the root slot\n */ const useRootStyles = makeStyles({\n small: {\n columnGap: 0,\n maxWidth: '468px',\n paddingLeft: tokens.spacingHorizontalSNudge,\n paddingRight: tokens.spacingHorizontalSNudge\n },\n medium: {\n columnGap: 0,\n maxWidth: '468px',\n paddingLeft: tokens.spacingHorizontalS,\n paddingRight: tokens.spacingHorizontalS\n },\n large: {\n columnGap: 0,\n maxWidth: '468px',\n paddingLeft: tokens.spacingHorizontalMNudge,\n paddingRight: tokens.spacingHorizontalMNudge\n },\n input: {\n paddingLeft: tokens.spacingHorizontalSNudge,\n paddingRight: 0,\n // removes the WebKit pseudoelement styling\n '::-webkit-search-decoration': {\n display: 'none'\n },\n '::-webkit-search-cancel-button': {\n display: 'none'\n }\n },\n unfocusedNoContentAfter: {\n paddingRight: 0\n }\n});\nconst useInputStyles = makeStyles({\n small: {\n paddingRight: tokens.spacingHorizontalSNudge\n },\n medium: {\n paddingRight: tokens.spacingHorizontalS\n },\n large: {\n paddingRight: tokens.spacingHorizontalMNudge\n }\n});\nconst useContentAfterStyles = makeStyles({\n contentAfter: {\n paddingLeft: tokens.spacingHorizontalM,\n columnGap: tokens.spacingHorizontalXS\n },\n rest: {\n height: 0,\n width: 0,\n paddingLeft: 0,\n overflow: 'hidden'\n }\n});\nconst useDismissClassName = makeResetStyles({\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground3,\n display: 'flex',\n // special case styling for icons (most common case) to ensure they're centered vertically\n // size: medium (default)\n '> svg': {\n fontSize: '20px'\n },\n cursor: 'pointer'\n});\nconst useDismissStyles = makeStyles({\n disabled: {\n color: tokens.colorNeutralForegroundDisabled\n },\n // Ensure resizable icons show up with the proper font size\n small: {\n '> svg': {\n fontSize: '16px'\n }\n },\n medium: {\n },\n large: {\n '> svg': {\n fontSize: '24px'\n }\n }\n});\n/**\n * Apply styling to the SearchBox slots based on the state\n */ export const useSearchBoxStyles_unstable = (state)=>{\n const { disabled, focused, size } = state;\n const rootStyles = useRootStyles();\n const inputStyles = useInputStyles();\n const contentAfterStyles = useContentAfterStyles();\n const dismissClassName = useDismissClassName();\n const dismissStyles = useDismissStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(searchBoxClassNames.root, rootStyles[size], !focused && rootStyles.unfocusedNoContentAfter, state.root.className);\n // eslint-disable-next-line react-hooks/immutability\n state.input.className = mergeClasses(searchBoxClassNames.input, rootStyles.input, !focused && inputStyles[size], state.input.className);\n if (state.dismiss) {\n // eslint-disable-next-line react-hooks/immutability\n state.dismiss.className = mergeClasses(searchBoxClassNames.dismiss, dismissClassName, disabled && dismissStyles.disabled, dismissStyles[size], state.dismiss.className);\n }\n if (state.contentBefore) {\n // eslint-disable-next-line react-hooks/immutability\n state.contentBefore.className = mergeClasses(searchBoxClassNames.contentBefore, state.contentBefore.className);\n }\n if (state.contentAfter) {\n // eslint-disable-next-line react-hooks/immutability\n state.contentAfter.className = mergeClasses(searchBoxClassNames.contentAfter, contentAfterStyles.contentAfter, !focused && contentAfterStyles.rest, state.contentAfter.className);\n } else if (state.dismiss) {\n // eslint-disable-next-line react-hooks/immutability\n state.dismiss.className = mergeClasses(state.dismiss.className, contentAfterStyles.contentAfter);\n }\n useInputStyles_unstable(state);\n return state;\n};\n"],"mappings":"AAAA,YAAY;;AACZ,SAAAA,aAAA,EAAAC,QAAA,EAAsCC,YAAY,QAAQ,gBAAgB;AAC1E,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,uBAAuB,QAAQ,uBAAuB;AAC/D,OAAO,MAAMC,mBAAmB,GAAG;EAC/BC,IAAI,EAAE,eAAe;EACrBC,OAAO,EAAE,wBAAwB;EACjCC,YAAY,EAAE,6BAA6B;EAC3CC,aAAa,EAAE,8BAA8B;EAC7CC,KAAK,EAAE;AACX,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AAkB,CAACnC,YAAY,EAAE,CAAC+B,OAAO,IAAII,kBAAkB,CAAClB,IAAI,EAAEa,KAAK,CAAC9B,YAAY,CAACsC,SAAS,CAAC;EACrL,CAAC,MAAM,IAAIR,KAAK,CAAC/B,OAAO,EAAE;IACtB;IACA+B,KAAK,CAAC/B,OAAO,CAACuC,SAAS,GAAG5C,YAAY,CAACoC,KAAK,CAAC/B,OAAO,CAACuC,SAAS,EAAEH,kBAAkB,CAACnC,YAAY,CAAC;EACpG;EACAJ,uBAAuB,CAACkC,KAAK,CAAC;EAC9B,OAAOA,KAAK;AAChB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["__resetStyles","__styles","mergeClasses","tokens","useInputStyles_unstable","searchBoxClassNames","root","dismiss","contentAfter","contentBefore","input","useRootStyles","small","i8kkvl","B2u0y6b","uwmqm3","z189sj","medium","large","Boqhc8c","B8uat0v","unfocusedNoContentAfter","d","useInputStyles","useContentAfterStyles","rest","Bqenvij","a9b677","B68tc82","Bmxbyg5","Bpg54ce","p","useDismissClassName","useDismissStyles","disabled","sj55zd","Duoase","useSearchBoxStyles_unstable","state","focused","size","rootStyles","inputStyles","contentAfterStyles","dismissClassName","dismissStyles","className"],"sources":["useSearchBoxStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeResetStyles, makeStyles, mergeClasses } from \"@griffel/react\";\nimport { tokens } from \"@fluentui/react-theme\";\nimport { useInputStyles_unstable } from \"@fluentui/react-input\";\nexport const searchBoxClassNames = {\n root: 'fui-SearchBox',\n dismiss: 'fui-SearchBox__dismiss',\n contentAfter: 'fui-SearchBox__contentAfter',\n contentBefore: 'fui-SearchBox__contentBefore',\n input: 'fui-SearchBox__input'\n};\n/**\n * Styles for the root slot\n */ const useRootStyles = makeStyles({\n small: {\n columnGap: 0,\n maxWidth: '468px',\n paddingLeft: tokens.spacingHorizontalSNudge,\n paddingRight: tokens.spacingHorizontalSNudge\n },\n medium: {\n columnGap: 0,\n maxWidth: '468px',\n paddingLeft: tokens.spacingHorizontalS,\n paddingRight: tokens.spacingHorizontalS\n },\n large: {\n columnGap: 0,\n maxWidth: '468px',\n paddingLeft: tokens.spacingHorizontalMNudge,\n paddingRight: tokens.spacingHorizontalMNudge\n },\n input: {\n paddingLeft: tokens.spacingHorizontalSNudge,\n paddingRight: 0,\n // removes the WebKit pseudoelement styling\n '::-webkit-search-decoration': {\n display: 'none'\n },\n '::-webkit-search-cancel-button': {\n display: 'none'\n }\n },\n unfocusedNoContentAfter: {\n paddingRight: 0\n }\n});\nconst useInputStyles = makeStyles({\n small: {\n paddingRight: tokens.spacingHorizontalSNudge\n },\n medium: {\n paddingRight: tokens.spacingHorizontalS\n },\n large: {\n paddingRight: tokens.spacingHorizontalMNudge\n }\n});\nconst useContentAfterStyles = makeStyles({\n contentAfter: {\n paddingLeft: tokens.spacingHorizontalM,\n columnGap: tokens.spacingHorizontalXS\n },\n rest: {\n height: 0,\n width: 0,\n paddingLeft: 0,\n overflow: 'hidden'\n }\n});\nconst useDismissClassName = makeResetStyles({\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground3,\n display: 'flex',\n // special case styling for icons (most common case) to ensure they're centered vertically\n // size: medium (default)\n '> svg': {\n fontSize: '20px'\n },\n cursor: 'pointer'\n});\nconst useDismissStyles = makeStyles({\n disabled: {\n color: tokens.colorNeutralForegroundDisabled\n },\n // Ensure resizable icons show up with the proper font size\n small: {\n '> svg': {\n fontSize: '16px'\n }\n },\n medium: {\n },\n large: {\n '> svg': {\n fontSize: '24px'\n }\n }\n});\n/**\n * Apply styling to the SearchBox slots based on the state\n */ export const useSearchBoxStyles_unstable = (state)=>{\n const { disabled, focused, size } = state;\n const rootStyles = useRootStyles();\n const inputStyles = useInputStyles();\n const contentAfterStyles = useContentAfterStyles();\n const dismissClassName = useDismissClassName();\n const dismissStyles = useDismissStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(searchBoxClassNames.root, rootStyles[size], !focused && rootStyles.unfocusedNoContentAfter, state.root.className);\n // eslint-disable-next-line react-hooks/immutability\n state.input.className = mergeClasses(searchBoxClassNames.input, rootStyles.input, !focused && inputStyles[size], state.input.className);\n if (state.dismiss) {\n // eslint-disable-next-line react-hooks/immutability\n state.dismiss.className = mergeClasses(searchBoxClassNames.dismiss, dismissClassName, disabled && dismissStyles.disabled, dismissStyles[size], state.dismiss.className);\n }\n if (state.contentBefore) {\n // eslint-disable-next-line react-hooks/immutability\n state.contentBefore.className = mergeClasses(searchBoxClassNames.contentBefore, state.contentBefore.className);\n }\n if (state.contentAfter) {\n // eslint-disable-next-line react-hooks/immutability\n state.contentAfter.className = mergeClasses(searchBoxClassNames.contentAfter, contentAfterStyles.contentAfter, !focused && contentAfterStyles.rest, state.contentAfter.className);\n } else if (state.dismiss) {\n // eslint-disable-next-line react-hooks/immutability\n state.dismiss.className = mergeClasses(state.dismiss.className, contentAfterStyles.contentAfter);\n }\n useInputStyles_unstable(state);\n return state;\n};\n"],"mappings":"AAAA,YAAY;;AACZ,SAAAA,aAAA,EAAAC,QAAA,EAAsCC,YAAY,QAAQ,gBAAgB;AAC1E,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,uBAAuB,QAAQ,uBAAuB;AAC/D,OAAO,MAAMC,mBAAmB,GAAG;EAC/BC,IAAI,EAAE,eAAe;EACrBC,OAAO,EAAE,wBAAwB;EACjCC,YAAY,EAAE,6BAA6B;EAC3CC,aAAa,EAAE,8BAA8B;EAC7CC,KAAK,EAAE;AACX,CAAC;AACD;AACA;AACA;AAAI,MAAMC,aAAa,gBAAGV,QAAA;EAAAW,KAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;EAAA;EAAAC,MAAA;IAAAJ,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;EAAA;EAAAE,KAAA;IAAAL,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;EAAA;EAAAN,KAAA;IAAAK,MAAA;IAAAC,MAAA;IAAAG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BAAuB,CAACkC,KAAK,CAAC;EAC9B,OAAOA,KAAK;AAChB,CAAC","ignoreList":[]}
@@ -1,7 +1,7 @@
1
1
  'use client';
2
- import { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';
3
- import { tokens } from '@fluentui/react-theme';
4
- import { useInputStyles_unstable } from '@fluentui/react-input';
2
+ import { makeResetStyles, makeStyles, mergeClasses } from "@griffel/react";
3
+ import { tokens } from "@fluentui/react-theme";
4
+ import { useInputStyles_unstable } from "@fluentui/react-input";
5
5
  export const searchBoxClassNames = {
6
6
  root: 'fui-SearchBox',
7
7
  dismiss: 'fui-SearchBox__dismiss',
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- export { SearchBox, renderSearchBox_unstable, searchBoxClassNames, useSearchBoxStyles_unstable, useSearchBox_unstable, useSearchBoxBase_unstable } from './SearchBox';
1
+ export { SearchBox, renderSearchBox_unstable, searchBoxClassNames, useSearchBoxStyles_unstable, useSearchBox_unstable, useSearchBoxBase_unstable } from "./SearchBox.js";
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export {\n SearchBox,\n renderSearchBox_unstable,\n searchBoxClassNames,\n useSearchBoxStyles_unstable,\n useSearchBox_unstable,\n useSearchBoxBase_unstable,\n} from './SearchBox';\nexport type {\n SearchBoxChangeEvent,\n SearchBoxProps,\n SearchBoxSlots,\n SearchBoxState,\n SearchBoxBaseProps,\n SearchBoxBaseState,\n} from './SearchBox';\n"],"names":["SearchBox","renderSearchBox_unstable","searchBoxClassNames","useSearchBoxStyles_unstable","useSearchBox_unstable","useSearchBoxBase_unstable"],"mappings":"AAAA,SACEA,SAAS,EACTC,wBAAwB,EACxBC,mBAAmB,EACnBC,2BAA2B,EAC3BC,qBAAqB,EACrBC,yBAAyB,QACpB,cAAc"}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export {\n SearchBox,\n renderSearchBox_unstable,\n searchBoxClassNames,\n useSearchBoxStyles_unstable,\n useSearchBox_unstable,\n useSearchBoxBase_unstable,\n} from './SearchBox';\nexport type {\n SearchBoxChangeEvent,\n SearchBoxProps,\n SearchBoxSlots,\n SearchBoxState,\n SearchBoxBaseProps,\n SearchBoxBaseState,\n} from './SearchBox';\n"],"names":["SearchBox","renderSearchBox_unstable","searchBoxClassNames","useSearchBoxStyles_unstable","useSearchBox_unstable","useSearchBoxBase_unstable"],"mappings":"AAAA,SACEA,SAAS,EACTC,wBAAwB,EACxBC,mBAAmB,EACnBC,2BAA2B,EAC3BC,qBAAqB,EACrBC,yBAAyB,QACpB,iBAAc"}
@@ -28,4 +28,4 @@ _export(exports, {
28
28
  return _index.useSearchBox_unstable;
29
29
  }
30
30
  });
31
- const _index = require("./components/SearchBox/index");
31
+ const _index = require("./components/SearchBox/index.cjs");
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/SearchBox.ts"],"sourcesContent":["export type {\n SearchBoxChangeEvent,\n SearchBoxProps,\n SearchBoxBaseProps,\n SearchBoxSlots,\n SearchBoxState,\n SearchBoxBaseState,\n} from './components/SearchBox/index';\nexport {\n SearchBox,\n renderSearchBox_unstable,\n searchBoxClassNames,\n useSearchBoxStyles_unstable,\n useSearchBox_unstable,\n useSearchBoxBase_unstable,\n} from './components/SearchBox/index';\n"],"names":["SearchBox","renderSearchBox_unstable","searchBoxClassNames","useSearchBoxStyles_unstable","useSearchBox_unstable","useSearchBoxBase_unstable"],"mappings":";;;;;;;;;;;;eASEA,gBAAS;;;eACTC,+BAAwB;;;eACxBC,0BAAmB;;;eAGnBG,gCAAyB;;;eAFzBF,kCAA2B;;;eAC3BC,4BAAqB;;;uBAEhB,+BAA+B"}
1
+ {"version":3,"sources":["../src/SearchBox.ts"],"sourcesContent":["export type {\n SearchBoxChangeEvent,\n SearchBoxProps,\n SearchBoxBaseProps,\n SearchBoxSlots,\n SearchBoxState,\n SearchBoxBaseState,\n} from './components/SearchBox/index';\nexport {\n SearchBox,\n renderSearchBox_unstable,\n searchBoxClassNames,\n useSearchBoxStyles_unstable,\n useSearchBox_unstable,\n useSearchBoxBase_unstable,\n} from './components/SearchBox/index';\n"],"names":["SearchBox","renderSearchBox_unstable","searchBoxClassNames","useSearchBoxStyles_unstable","useSearchBox_unstable","useSearchBoxBase_unstable"],"mappings":";;;;;;;;;;;;eASEA,gBAAS;;;eACTC,+BAAwB;;;eACxBC,0BAAmB;;;eAGnBG,gCAAyB;;;eAFzBF,kCAA2B;;;eAC3BC,4BAAqB;;;uBAEhB,kCAA+B"}
@@ -11,9 +11,9 @@ Object.defineProperty(exports, "SearchBox", {
11
11
  });
12
12
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
13
13
  const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
14
- const _useSearchBox = require("./useSearchBox");
15
- const _renderSearchBox = require("./renderSearchBox");
16
- const _useSearchBoxStylesstyles = require("./useSearchBoxStyles.styles");
14
+ const _useSearchBox = require("./useSearchBox.cjs");
15
+ const _renderSearchBox = require("./renderSearchBox.cjs");
16
+ const _useSearchBoxStylesstyles = require("./useSearchBoxStyles.styles.cjs");
17
17
  const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
18
18
  const SearchBox = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
19
19
  const state = (0, _useSearchBox.useSearchBox_unstable)(props, ref);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/SearchBox/SearchBox.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useSearchBox_unstable } from './useSearchBox';\nimport { renderSearchBox_unstable } from './renderSearchBox';\nimport { useSearchBoxStyles_unstable } from './useSearchBoxStyles.styles';\nimport type { SearchBoxProps } from './SearchBox.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * SearchBox component - TODO: add more docs\n */\nexport const SearchBox: ForwardRefComponent<SearchBoxProps> = React.forwardRef((props, ref) => {\n const state = useSearchBox_unstable(props, ref);\n\n useSearchBoxStyles_unstable(state);\n\n useCustomStyleHook_unstable('useSearchBoxStyles_unstable')(state);\n\n return renderSearchBox_unstable(state);\n});\n\nSearchBox.displayName = 'SearchBox';\n"],"names":["React","useSearchBox_unstable","renderSearchBox_unstable","useSearchBoxStyles_unstable","useCustomStyleHook_unstable","SearchBox","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;8BACO,iBAAiB;iCACd,oBAAoB;0CACjB,8BAA8B;qCAG9B,kCAAkC;AAKvE,MAAMK,YAAAA,WAAAA,GAAiDL,OAAMM,UAAU,CAAC,CAACC,OAAOC;IACrF,MAAMC,YAAQR,mCAAAA,EAAsBM,OAAOC;QAE3CL,qDAAAA,EAA4BM;QAE5BL,gDAAAA,EAA4B,+BAA+BK;IAE3D,WAAOP,yCAAAA,EAAyBO;AAClC,GAAG;AAEHJ,UAAUK,WAAW,GAAG"}
1
+ {"version":3,"sources":["../src/components/SearchBox/SearchBox.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useSearchBox_unstable } from './useSearchBox';\nimport { renderSearchBox_unstable } from './renderSearchBox';\nimport { useSearchBoxStyles_unstable } from './useSearchBoxStyles.styles';\nimport type { SearchBoxProps } from './SearchBox.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * SearchBox component - TODO: add more docs\n */\nexport const SearchBox: ForwardRefComponent<SearchBoxProps> = React.forwardRef((props, ref) => {\n const state = useSearchBox_unstable(props, ref);\n\n useSearchBoxStyles_unstable(state);\n\n useCustomStyleHook_unstable('useSearchBoxStyles_unstable')(state);\n\n return renderSearchBox_unstable(state);\n});\n\nSearchBox.displayName = 'SearchBox';\n"],"names":["React","useSearchBox_unstable","renderSearchBox_unstable","useSearchBoxStyles_unstable","useCustomStyleHook_unstable","SearchBox","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;8BACO,oBAAiB;iCACd,uBAAoB;0CACjB,iCAA8B;qCAG9B,kCAAkC;AAKvE,MAAMK,YAAAA,WAAAA,GAAiDL,OAAMM,UAAU,CAAC,CAACC,OAAOC;IACrF,MAAMC,YAAQR,mCAAAA,EAAsBM,OAAOC;QAE3CL,qDAAAA,EAA4BM;QAE5BL,gDAAAA,EAA4B,+BAA+BK;IAE3D,WAAOP,yCAAAA,EAAyBO;AAClC,GAAG;AAEHJ,UAAUK,WAAW,GAAG"}
@@ -28,7 +28,7 @@ _export(exports, {
28
28
  return _useSearchBox.useSearchBox_unstable;
29
29
  }
30
30
  });
31
- const _SearchBox = require("./SearchBox");
32
- const _renderSearchBox = require("./renderSearchBox");
33
- const _useSearchBox = require("./useSearchBox");
34
- const _useSearchBoxStylesstyles = require("./useSearchBoxStyles.styles");
31
+ const _SearchBox = require("./SearchBox.cjs");
32
+ const _renderSearchBox = require("./renderSearchBox.cjs");
33
+ const _useSearchBox = require("./useSearchBox.cjs");
34
+ const _useSearchBoxStylesstyles = require("./useSearchBoxStyles.styles.cjs");
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/SearchBox/index.ts"],"sourcesContent":["export { SearchBox } from './SearchBox';\nexport type {\n SearchBoxChangeEvent,\n SearchBoxProps,\n SearchBoxBaseProps,\n SearchBoxSlots,\n SearchBoxState,\n SearchBoxBaseState,\n} from './SearchBox.types';\nexport { renderSearchBox_unstable } from './renderSearchBox';\nexport { useSearchBox_unstable, useSearchBoxBase_unstable } from './useSearchBox';\nexport { searchBoxClassNames, useSearchBoxStyles_unstable } from './useSearchBoxStyles.styles';\n"],"names":["SearchBox","renderSearchBox_unstable","useSearchBox_unstable","useSearchBoxBase_unstable","searchBoxClassNames","useSearchBoxStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,oBAAS;;;eASTC,yCAAwB;;;eAExBG,6CAAmB;;;eADID,uCAAyB;;;eAC3BE,qDAA2B;;;eADhDH,mCAAqB;;;2BAVJ,cAAc;iCASC,oBAAoB;8BACI,iBAAiB;0CACjB,8BAA8B"}
1
+ {"version":3,"sources":["../src/components/SearchBox/index.ts"],"sourcesContent":["export { SearchBox } from './SearchBox';\nexport type {\n SearchBoxChangeEvent,\n SearchBoxProps,\n SearchBoxBaseProps,\n SearchBoxSlots,\n SearchBoxState,\n SearchBoxBaseState,\n} from './SearchBox.types';\nexport { renderSearchBox_unstable } from './renderSearchBox';\nexport { useSearchBox_unstable, useSearchBoxBase_unstable } from './useSearchBox';\nexport { searchBoxClassNames, useSearchBoxStyles_unstable } from './useSearchBoxStyles.styles';\n"],"names":["SearchBox","renderSearchBox_unstable","useSearchBox_unstable","useSearchBoxBase_unstable","searchBoxClassNames","useSearchBoxStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,oBAAS;;;eASTC,yCAAwB;;;eAExBG,6CAAmB;;;eADID,uCAAyB;;;eAC3BE,qDAA2B;;;eADhDH,mCAAqB;;;2BAVJ,iBAAc;iCASC,uBAAoB;8BACI,oBAAiB;0CACjB,iCAA8B"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useSearchBoxStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeResetStyles, makeStyles, mergeClasses } from \"@griffel/react\";\nimport { tokens } from \"@fluentui/react-theme\";\nimport { useInputStyles_unstable } from \"@fluentui/react-input\";\nexport const searchBoxClassNames = {\n root: 'fui-SearchBox',\n dismiss: 'fui-SearchBox__dismiss',\n contentAfter: 'fui-SearchBox__contentAfter',\n contentBefore: 'fui-SearchBox__contentBefore',\n input: 'fui-SearchBox__input'\n};\n/**\n * Styles for the root slot\n */ const useRootStyles = makeStyles({\n small: {\n columnGap: 0,\n maxWidth: '468px',\n paddingLeft: tokens.spacingHorizontalSNudge,\n paddingRight: tokens.spacingHorizontalSNudge\n },\n medium: {\n columnGap: 0,\n maxWidth: '468px',\n paddingLeft: tokens.spacingHorizontalS,\n paddingRight: tokens.spacingHorizontalS\n },\n large: {\n columnGap: 0,\n maxWidth: '468px',\n paddingLeft: tokens.spacingHorizontalMNudge,\n paddingRight: tokens.spacingHorizontalMNudge\n },\n input: {\n paddingLeft: tokens.spacingHorizontalSNudge,\n paddingRight: 0,\n // removes the WebKit pseudoelement styling\n '::-webkit-search-decoration': {\n display: 'none'\n },\n '::-webkit-search-cancel-button': {\n display: 'none'\n }\n },\n unfocusedNoContentAfter: {\n paddingRight: 0\n }\n});\nconst useInputStyles = makeStyles({\n small: {\n paddingRight: tokens.spacingHorizontalSNudge\n },\n medium: {\n paddingRight: tokens.spacingHorizontalS\n },\n large: {\n paddingRight: tokens.spacingHorizontalMNudge\n }\n});\nconst useContentAfterStyles = makeStyles({\n contentAfter: {\n paddingLeft: tokens.spacingHorizontalM,\n columnGap: tokens.spacingHorizontalXS\n },\n rest: {\n height: 0,\n width: 0,\n paddingLeft: 0,\n overflow: 'hidden'\n }\n});\nconst useDismissClassName = makeResetStyles({\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground3,\n display: 'flex',\n // special case styling for icons (most common case) to ensure they're centered vertically\n // size: medium (default)\n '> svg': {\n fontSize: '20px'\n },\n cursor: 'pointer'\n});\nconst useDismissStyles = makeStyles({\n disabled: {\n color: tokens.colorNeutralForegroundDisabled\n },\n // Ensure resizable icons show up with the proper font size\n small: {\n '> svg': {\n fontSize: '16px'\n }\n },\n medium: {\n },\n large: {\n '> svg': {\n fontSize: '24px'\n }\n }\n});\n/**\n * Apply styling to the SearchBox slots based on the state\n */ export const useSearchBoxStyles_unstable = (state)=>{\n const { disabled, focused, size } = state;\n const rootStyles = useRootStyles();\n const inputStyles = useInputStyles();\n const contentAfterStyles = useContentAfterStyles();\n const dismissClassName = useDismissClassName();\n const dismissStyles = useDismissStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(searchBoxClassNames.root, rootStyles[size], !focused && rootStyles.unfocusedNoContentAfter, state.root.className);\n // eslint-disable-next-line react-hooks/immutability\n state.input.className = mergeClasses(searchBoxClassNames.input, rootStyles.input, !focused && inputStyles[size], state.input.className);\n if (state.dismiss) {\n // eslint-disable-next-line react-hooks/immutability\n state.dismiss.className = mergeClasses(searchBoxClassNames.dismiss, dismissClassName, disabled && dismissStyles.disabled, dismissStyles[size], state.dismiss.className);\n }\n if (state.contentBefore) {\n // eslint-disable-next-line react-hooks/immutability\n state.contentBefore.className = mergeClasses(searchBoxClassNames.contentBefore, state.contentBefore.className);\n }\n if (state.contentAfter) {\n // eslint-disable-next-line react-hooks/immutability\n state.contentAfter.className = mergeClasses(searchBoxClassNames.contentAfter, contentAfterStyles.contentAfter, !focused && contentAfterStyles.rest, state.contentAfter.className);\n } else if (state.dismiss) {\n // eslint-disable-next-line react-hooks/immutability\n state.dismiss.className = mergeClasses(state.dismiss.className, contentAfterStyles.contentAfter);\n }\n useInputStyles_unstable(state);\n return state;\n};\n"],"names":["__resetStyles","__styles","mergeClasses","tokens","useInputStyles_unstable","searchBoxClassNames","root","dismiss","contentAfter","contentBefore","input","useRootStyles","small","i8kkvl","B2u0y6b","uwmqm3","z189sj","medium","large","Boqhc8c","B8uat0v","unfocusedNoContentAfter","d","useInputStyles","useContentAfterStyles","rest","Bqenvij","a9b677","B68tc82","Bmxbyg5","Bpg54ce","p","useDismissClassName","useDismissStyles","disabled","sj55zd","Duoase","useSearchBoxStyles_unstable","state","focused","size","rootStyles","inputStyles","contentAfterStyles","dismissClassName","dismissStyles","className"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAICK,mBAAmB;;;IAiGfgC,2BAA2B;;;;uBApGc,gBAAgB;4BAElC,uBAAuB;AACxD,4BAA4B;IAC/B/B,IAAI,EAAE,eAAe;IACrBC,OAAO,EAAE,wBAAwB;IACjCC,YAAY,EAAE,6BAA6B;IAC3CC,aAAa,EAAE,8BAA8B;IAC7CC,KAAK,EAAE;AACX,CAAC;AACD;;CAEA,GAAI,MAAMC,aAAa,GAAA,WAAA,OAAGV,eAAA,EAAA;IAAAW,KAAA,EAAA;QAAAC,MA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 _export(exports, {
28
28
  return _SearchBox.useSearchBox_unstable;
29
29
  }
30
30
  });
31
- const _SearchBox = require("./SearchBox");
31
+ const _SearchBox = require("./SearchBox.cjs");
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export {\n SearchBox,\n renderSearchBox_unstable,\n searchBoxClassNames,\n useSearchBoxStyles_unstable,\n useSearchBox_unstable,\n useSearchBoxBase_unstable,\n} from './SearchBox';\nexport type {\n SearchBoxChangeEvent,\n SearchBoxProps,\n SearchBoxSlots,\n SearchBoxState,\n SearchBoxBaseProps,\n SearchBoxBaseState,\n} from './SearchBox';\n"],"names":["SearchBox","renderSearchBox_unstable","searchBoxClassNames","useSearchBoxStyles_unstable","useSearchBox_unstable","useSearchBoxBase_unstable"],"mappings":";;;;;;;;;;;;eACEA,oBAAS;;;eACTC,mCAAwB;;;eACxBC,8BAAmB;;;eAGnBG,oCAAyB;;;eAFzBF,sCAA2B;;;eAC3BC,gCAAqB;;;2BAEhB,cAAc"}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export {\n SearchBox,\n renderSearchBox_unstable,\n searchBoxClassNames,\n useSearchBoxStyles_unstable,\n useSearchBox_unstable,\n useSearchBoxBase_unstable,\n} from './SearchBox';\nexport type {\n SearchBoxChangeEvent,\n SearchBoxProps,\n SearchBoxSlots,\n SearchBoxState,\n SearchBoxBaseProps,\n SearchBoxBaseState,\n} from './SearchBox';\n"],"names":["SearchBox","renderSearchBox_unstable","searchBoxClassNames","useSearchBoxStyles_unstable","useSearchBox_unstable","useSearchBoxBase_unstable"],"mappings":";;;;;;;;;;;;eACEA,oBAAS;;;eACTC,mCAAwB;;;eACxBC,8BAAmB;;;eAGnBG,oCAAyB;;;eAFzBF,sCAA2B;;;eAC3BC,gCAAqB;;;2BAEhB,iBAAc"}
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@fluentui/react-search",
3
- "version": "9.4.4",
3
+ "version": "9.4.6",
4
4
  "description": "Search input for Fluent UI v9",
5
- "main": "lib-commonjs/index.js",
5
+ "main": "lib-commonjs/index.cjs",
6
6
  "module": "lib/index.js",
7
7
  "typings": "./dist/index.d.ts",
8
8
  "sideEffects": false,
@@ -13,11 +13,11 @@
13
13
  "license": "MIT",
14
14
  "dependencies": {
15
15
  "@fluentui/react-icons": "^2.0.245",
16
- "@fluentui/react-input": "^9.8.4",
17
- "@fluentui/react-jsx-runtime": "^9.4.4",
18
- "@fluentui/react-shared-contexts": "^9.26.2",
19
- "@fluentui/react-theme": "^9.2.1",
20
- "@fluentui/react-utilities": "^9.26.5",
16
+ "@fluentui/react-input": "^9.8.6",
17
+ "@fluentui/react-jsx-runtime": "^9.4.5",
18
+ "@fluentui/react-shared-contexts": "^9.26.3",
19
+ "@fluentui/react-theme": "^9.2.2",
20
+ "@fluentui/react-utilities": "^9.26.6",
21
21
  "@griffel/react": "^1.5.32",
22
22
  "@swc/helpers": "^0.5.1"
23
23
  },
@@ -35,17 +35,23 @@
35
35
  },
36
36
  "exports": {
37
37
  ".": {
38
- "types": "./dist/index.d.ts",
39
- "node": "./lib-commonjs/index.js",
40
- "import": "./lib/index.js",
41
- "require": "./lib-commonjs/index.js"
38
+ "import": {
39
+ "types": "./dist/index.d.ts",
40
+ "default": "./lib/index.js"
41
+ },
42
+ "require": {
43
+ "types": "./dist/index.d.cts",
44
+ "default": "./lib-commonjs/index.cjs"
45
+ }
42
46
  },
43
47
  "./package.json": "./package.json"
44
48
  },
45
49
  "files": [
46
50
  "*.md",
47
51
  "dist/*.d.ts",
52
+ "dist/*.d.cts",
48
53
  "lib",
49
54
  "lib-commonjs"
50
- ]
55
+ ],
56
+ "type": "module"
51
57
  }
@@ -1 +0,0 @@
1
- {"version":3,"sources":["useSearchBoxStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { useInputStyles_unstable } from '@fluentui/react-input';\nexport const searchBoxClassNames = {\n root: 'fui-SearchBox',\n dismiss: 'fui-SearchBox__dismiss',\n contentAfter: 'fui-SearchBox__contentAfter',\n contentBefore: 'fui-SearchBox__contentBefore',\n input: 'fui-SearchBox__input'\n};\n/**\n * Styles for the root slot\n */ const useRootStyles = makeStyles({\n small: {\n columnGap: 0,\n maxWidth: '468px',\n paddingLeft: tokens.spacingHorizontalSNudge,\n paddingRight: tokens.spacingHorizontalSNudge\n },\n medium: {\n columnGap: 0,\n maxWidth: '468px',\n paddingLeft: tokens.spacingHorizontalS,\n paddingRight: tokens.spacingHorizontalS\n },\n large: {\n columnGap: 0,\n maxWidth: '468px',\n paddingLeft: tokens.spacingHorizontalMNudge,\n paddingRight: tokens.spacingHorizontalMNudge\n },\n input: {\n paddingLeft: tokens.spacingHorizontalSNudge,\n paddingRight: 0,\n // removes the WebKit pseudoelement styling\n '::-webkit-search-decoration': {\n display: 'none'\n },\n '::-webkit-search-cancel-button': {\n display: 'none'\n }\n },\n unfocusedNoContentAfter: {\n paddingRight: 0\n }\n});\nconst useInputStyles = makeStyles({\n small: {\n paddingRight: tokens.spacingHorizontalSNudge\n },\n medium: {\n paddingRight: tokens.spacingHorizontalS\n },\n large: {\n paddingRight: tokens.spacingHorizontalMNudge\n }\n});\nconst useContentAfterStyles = makeStyles({\n contentAfter: {\n paddingLeft: tokens.spacingHorizontalM,\n columnGap: tokens.spacingHorizontalXS\n },\n rest: {\n height: 0,\n width: 0,\n paddingLeft: 0,\n overflow: 'hidden'\n }\n});\nconst useDismissClassName = makeResetStyles({\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground3,\n display: 'flex',\n // special case styling for icons (most common case) to ensure they're centered vertically\n // size: medium (default)\n '> svg': {\n fontSize: '20px'\n },\n cursor: 'pointer'\n});\nconst useDismissStyles = makeStyles({\n disabled: {\n color: tokens.colorNeutralForegroundDisabled\n },\n // Ensure resizable icons show up with the proper font size\n small: {\n '> svg': {\n fontSize: '16px'\n }\n },\n medium: {\n },\n large: {\n '> svg': {\n fontSize: '24px'\n }\n }\n});\n/**\n * Apply styling to the SearchBox slots based on the state\n */ export const useSearchBoxStyles_unstable = (state)=>{\n const { disabled, focused, size } = state;\n const rootStyles = useRootStyles();\n const inputStyles = useInputStyles();\n const contentAfterStyles = useContentAfterStyles();\n const dismissClassName = useDismissClassName();\n const dismissStyles = useDismissStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(searchBoxClassNames.root, rootStyles[size], !focused && rootStyles.unfocusedNoContentAfter, state.root.className);\n // eslint-disable-next-line react-hooks/immutability\n state.input.className = mergeClasses(searchBoxClassNames.input, rootStyles.input, !focused && inputStyles[size], state.input.className);\n if (state.dismiss) {\n // eslint-disable-next-line react-hooks/immutability\n state.dismiss.className = mergeClasses(searchBoxClassNames.dismiss, dismissClassName, disabled && dismissStyles.disabled, dismissStyles[size], state.dismiss.className);\n }\n if (state.contentBefore) {\n // eslint-disable-next-line react-hooks/immutability\n state.contentBefore.className = mergeClasses(searchBoxClassNames.contentBefore, state.contentBefore.className);\n }\n if (state.contentAfter) {\n // eslint-disable-next-line react-hooks/immutability\n state.contentAfter.className = mergeClasses(searchBoxClassNames.contentAfter, contentAfterStyles.contentAfter, !focused && contentAfterStyles.rest, state.contentAfter.className);\n } else if (state.dismiss) {\n // eslint-disable-next-line react-hooks/immutability\n state.dismiss.className = mergeClasses(state.dismiss.className, contentAfterStyles.contentAfter);\n }\n useInputStyles_unstable(state);\n return state;\n};\n"],"names":["__resetStyles","__styles","mergeClasses","tokens","useInputStyles_unstable","searchBoxClassNames","root","dismiss","contentAfter","contentBefore","input","useRootStyles","small","i8kkvl","B2u0y6b","uwmqm3","z189sj","medium","large","Boqhc8c","B8uat0v","unfocusedNoContentAfter","d","useInputStyles","useContentAfterStyles","rest","Bqenvij","a9b677","B68tc82","Bmxbyg5","Bpg54ce","p","useDismissClassName","useDismissStyles","disabled","sj55zd","Duoase","useSearchBoxStyles_unstable","state","focused","size","rootStyles","inputStyles","cont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