@fluentui-copilot/react-suggestions 0.9.3 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/CHANGELOG.json +62 -0
  2. package/CHANGELOG.md +27 -1
  3. package/dist/index.d.ts +14 -18
  4. package/lib/Suggestion.js +1 -1
  5. package/lib/Suggestion.js.map +1 -1
  6. package/lib/SuggestionList.js +1 -1
  7. package/lib/SuggestionList.js.map +1 -1
  8. package/lib/components/Suggestion/index.js +3 -2
  9. package/lib/components/Suggestion/index.js.map +1 -1
  10. package/lib/components/Suggestion/useSuggestion.js.map +1 -1
  11. package/lib/components/SuggestionList/SuggestionList.types.js +1 -2
  12. package/lib/components/SuggestionList/SuggestionList.types.js.map +1 -1
  13. package/lib/components/SuggestionList/index.js +4 -5
  14. package/lib/components/SuggestionList/index.js.map +1 -1
  15. package/lib/components/SuggestionList/renderSuggestionList.js +1 -3
  16. package/lib/components/SuggestionList/renderSuggestionList.js.map +1 -1
  17. package/lib/components/SuggestionList/useSuggestionList.js +3 -24
  18. package/lib/components/SuggestionList/useSuggestionList.js.map +1 -1
  19. package/lib/components/SuggestionList/useSuggestionListStyles.styles.js +4 -10
  20. package/lib/components/SuggestionList/useSuggestionListStyles.styles.js.map +1 -1
  21. package/lib/index.js +1 -1
  22. package/lib/index.js.map +1 -1
  23. package/lib-commonjs/Suggestion.js +21 -2
  24. package/lib-commonjs/Suggestion.js.map +1 -1
  25. package/lib-commonjs/SuggestionList.js +24 -2
  26. package/lib-commonjs/SuggestionList.js.map +1 -1
  27. package/lib-commonjs/components/Suggestion/index.js +23 -3
  28. package/lib-commonjs/components/Suggestion/index.js.map +1 -1
  29. package/lib-commonjs/components/Suggestion/useSuggestion.js.map +1 -1
  30. package/lib-commonjs/components/SuggestionList/SuggestionList.types.js +0 -2
  31. package/lib-commonjs/components/SuggestionList/SuggestionList.types.js.map +1 -1
  32. package/lib-commonjs/components/SuggestionList/index.js +27 -6
  33. package/lib-commonjs/components/SuggestionList/index.js.map +1 -1
  34. package/lib-commonjs/components/SuggestionList/renderSuggestionList.js +1 -5
  35. package/lib-commonjs/components/SuggestionList/renderSuggestionList.js.map +1 -1
  36. package/lib-commonjs/components/SuggestionList/useSuggestionList.js +2 -24
  37. package/lib-commonjs/components/SuggestionList/useSuggestionList.js.map +1 -1
  38. package/lib-commonjs/components/SuggestionList/useSuggestionListStyles.styles.js +4 -9
  39. package/lib-commonjs/components/SuggestionList/useSuggestionListStyles.styles.js.map +1 -1
  40. package/lib-commonjs/index.js +3 -0
  41. package/lib-commonjs/index.js.map +1 -1
  42. package/package.json +1 -1
package/CHANGELOG.json CHANGED
@@ -1,6 +1,68 @@
1
1
  {
2
2
  "name": "@fluentui-copilot/react-suggestions",
3
3
  "entries": [
4
+ {
5
+ "date": "Wed, 29 Jan 2025 01:36:32 GMT",
6
+ "tag": "@fluentui-copilot/react-suggestions_v0.10.0",
7
+ "version": "0.10.0",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "soniaboller@gmail.com",
12
+ "package": "@fluentui-copilot/react-suggestions",
13
+ "commit": "9e3ff3abb67084e0c2efacbebf94959b9387c00c",
14
+ "comment": "feat: export all types and hooks from barrel file"
15
+ },
16
+ {
17
+ "author": "jiangemma@microsoft.com",
18
+ "package": "@fluentui-copilot/react-suggestions",
19
+ "commit": "40580f770f4ae9a330f80f73f4fd73f59be66173",
20
+ "comment": "fix: Update `SuggestionsList` to be left-aligned"
21
+ },
22
+ {
23
+ "author": "Humberto.Morimoto@microsoft.com",
24
+ "package": "@fluentui-copilot/react-suggestions",
25
+ "commit": "05b2ab5de70498d017515429fd3a0e82c0d3ef70",
26
+ "comment": "chore: Making return type for useSuggestion explicit."
27
+ },
28
+ {
29
+ "author": "estebanmu@microsoft.com",
30
+ "package": "@fluentui-copilot/react-suggestions",
31
+ "commit": "6d3003651ba598b2a84df2efea60b9add2bfa312",
32
+ "comment": "fix: Update suggestions API to unblock CI."
33
+ },
34
+ {
35
+ "author": "estebanmu@microsoft.com",
36
+ "package": "@fluentui-copilot/react-suggestions",
37
+ "commit": "5b1da9edd6ddefc48dfea7d778e29ff3d7c0002b",
38
+ "comment": "fix: Update Suggestion's API file"
39
+ }
40
+ ],
41
+ "minor": [
42
+ {
43
+ "author": "jiangemma@microsoft.com",
44
+ "package": "@fluentui-copilot/react-suggestions",
45
+ "commit": "e3731e4bed805ac7a6c0dd0f99ca68ef9adc235b",
46
+ "comment": "fix: Remove deprecated `reload` and `reloadTooltip` slots from `SuggestionsList`"
47
+ }
48
+ ]
49
+ }
50
+ },
51
+ {
52
+ "date": "Wed, 18 Dec 2024 08:55:42 GMT",
53
+ "tag": "@fluentui-copilot/react-suggestions_v0.9.4",
54
+ "version": "0.9.4",
55
+ "comments": {
56
+ "patch": [
57
+ {
58
+ "author": "makotom@microsoft.com",
59
+ "package": "@fluentui-copilot/react-suggestions",
60
+ "commit": "cc179462507d13546b93c6330be325014286998c",
61
+ "comment": "chore: Banning * exports."
62
+ }
63
+ ]
64
+ }
65
+ },
4
66
  {
5
67
  "date": "Thu, 31 Oct 2024 17:41:08 GMT",
6
68
  "tag": "@fluentui-copilot/react-suggestions_v0.9.2",
package/CHANGELOG.md CHANGED
@@ -1,9 +1,35 @@
1
1
  # Change Log - @fluentui-copilot/react-suggestions
2
2
 
3
- This log was last generated on Thu, 31 Oct 2024 17:41:08 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 29 Jan 2025 01:36:32 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [0.10.0](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-suggestions_v0.10.0)
8
+
9
+ Wed, 29 Jan 2025 01:36:32 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-suggestions_v0.9.4..@fluentui-copilot/react-suggestions_v0.10.0)
11
+
12
+ ### Minor changes
13
+
14
+ - fix: Remove deprecated `reload` and `reloadTooltip` slots from `SuggestionsList` ([PR #2548](https://github.com/microsoft/fluentai/pull/2548) by jiangemma@microsoft.com)
15
+
16
+ ### Patches
17
+
18
+ - feat: export all types and hooks from barrel file ([PR #2552](https://github.com/microsoft/fluentai/pull/2552) by soniaboller@gmail.com)
19
+ - fix: Update `SuggestionsList` to be left-aligned ([PR #2543](https://github.com/microsoft/fluentai/pull/2543) by jiangemma@microsoft.com)
20
+ - chore: Making return type for useSuggestion explicit. ([PR #2582](https://github.com/microsoft/fluentai/pull/2582) by Humberto.Morimoto@microsoft.com)
21
+ - fix: Update suggestions API to unblock CI. ([PR #2581](https://github.com/microsoft/fluentai/pull/2581) by estebanmu@microsoft.com)
22
+ - fix: Update Suggestion's API file ([PR #2561](https://github.com/microsoft/fluentai/pull/2561) by estebanmu@microsoft.com)
23
+
24
+ ## [0.9.4](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-suggestions_v0.9.4)
25
+
26
+ Wed, 18 Dec 2024 08:55:42 GMT
27
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-suggestions_v0.9.2..@fluentui-copilot/react-suggestions_v0.9.4)
28
+
29
+ ### Patches
30
+
31
+ - chore: Banning * exports. ([PR #2477](https://github.com/microsoft/fluentai/pull/2477) by makotom@microsoft.com)
32
+
7
33
  ## [0.9.2](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-suggestions_v0.9.2)
8
34
 
9
35
  Thu, 31 Oct 2024 17:41:08 GMT
package/dist/index.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  /// <reference types="react" />
2
2
 
3
- import type { Button } from '@fluentui/react-components';
4
3
  import type { ButtonProps } from '@fluentui/react-components';
5
4
  import type { ButtonSlots } from '@fluentui/react-components';
6
5
  import type { ButtonState } from '@fluentui/react-components';
@@ -8,7 +7,6 @@ import type { ComponentProps } from '@fluentui/react-components';
8
7
  import type { ComponentState } from '@fluentui/react-components';
9
8
  import type { CopilotMode } from '@fluentui-copilot/react-provider';
10
9
  import type { ForwardRefComponent } from '@fluentui/react-components';
11
- import * as React_2 from 'react';
12
10
  import type { Slot } from '@fluentui/react-components';
13
11
  import type { SlotClassNames } from '@fluentui/react-components';
14
12
  import type { TooltipProps } from '@fluentui/react-components';
@@ -29,36 +27,34 @@ export declare const suggestionListClassNames: SlotClassNames<SuggestionListSlot
29
27
  /**
30
28
  * SuggestionList Props
31
29
  */
32
- export declare type SuggestionListProps = ComponentProps<SuggestionListSlots> & {};
30
+ export declare type SuggestionListProps = ComponentProps<SuggestionListSlots> & {
31
+ /**
32
+ * The horizontal alignment of the SuggestionsList.
33
+ * @default 'end'
34
+ */
35
+ horizontalAlignment?: 'start' | 'end';
36
+ };
33
37
 
34
38
  export declare type SuggestionListSlots = {
35
39
  root: Slot<'div'>;
36
- /**
37
- * @deprecated - Use `action` slot instead. Will be removed in the next major release (0.9.0)
38
- * Deprecated on 10/23/2023
39
- */
40
- reload?: Slot<typeof Button>;
41
- /**
42
- * @deprecated - Use `action` slot instead. Will be removed in the next major release (0.9.0)
43
- * Deprecated on 10/23/2023
44
- */
45
- reloadTooltip?: Slot<TooltipComponent>;
46
40
  action?: Slot<'span'>;
47
41
  };
48
42
 
49
43
  /**
50
44
  * State used in rendering SuggestionList
51
45
  */
52
- export declare type SuggestionListState = ComponentState<SuggestionListSlots>;
46
+ export declare type SuggestionListState = ComponentState<SuggestionListSlots> & Required<Pick<SuggestionListProps, 'horizontalAlignment'>>;
53
47
 
54
- declare type SuggestionProps = CopilotMode & ComponentProps<SuggestionSlots> & Omit<ButtonProps, keyof ButtonSlots>;
48
+ export declare type SuggestionProps = CopilotMode & ComponentProps<SuggestionSlots> & Omit<ButtonProps, keyof ButtonSlots>;
55
49
 
56
- declare type SuggestionSlots = ButtonSlots;
50
+ export declare type SuggestionSlots = ButtonSlots;
57
51
 
58
- declare type SuggestionState = ComponentState<SuggestionSlots> & Required<Pick<SuggestionProps, 'mode'>> & Omit<ButtonState, keyof ButtonSlots>;
52
+ export declare type SuggestionState = ComponentState<SuggestionSlots> & Required<Pick<SuggestionProps, 'mode'>> & Omit<ButtonState, keyof ButtonSlots>;
59
53
 
60
54
  export declare type TooltipComponent = React.FunctionComponent<Partial<TooltipProps>>;
61
55
 
56
+ export declare const useSuggestion_unstable: (props: SuggestionProps, ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>) => SuggestionState;
57
+
62
58
  /**
63
59
  * Create the state required to render SuggestionList.
64
60
  *
@@ -68,7 +64,7 @@ export declare type TooltipComponent = React.FunctionComponent<Partial<TooltipPr
68
64
  * @param props - props from this instance of SuggestionList
69
65
  * @param ref - reference to root HTMLElement of SuggestionList
70
66
  */
71
- export declare const useSuggestionList_unstable: (props: SuggestionListProps, ref: React_2.Ref<HTMLDivElement>) => SuggestionListState;
67
+ export declare const useSuggestionList_unstable: (props: SuggestionListProps, ref: React.Ref<HTMLDivElement>) => SuggestionListState;
72
68
 
73
69
  /**
74
70
  * Apply styling to the SuggestionList slots based on the state
package/lib/Suggestion.js CHANGED
@@ -1,2 +1,2 @@
1
- export * from './components/Suggestion/index';
1
+ export { Suggestion, suggestionClassNames, useSuggestionStyles_unstable, useSuggestion_unstable } from './components/Suggestion/index';
2
2
  //# sourceMappingURL=Suggestion.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["Suggestion.ts"],"sourcesContent":["export * from './components/Suggestion/index';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,gCAAgC"}
1
+ {"version":3,"sources":["Suggestion.ts"],"sourcesContent":["export type { SuggestionProps, SuggestionSlots, SuggestionState } from './components/Suggestion/index';\nexport {\n Suggestion,\n suggestionClassNames,\n useSuggestionStyles_unstable,\n useSuggestion_unstable,\n} from './components/Suggestion/index';\n"],"names":["Suggestion","suggestionClassNames","useSuggestionStyles_unstable","useSuggestion_unstable"],"rangeMappings":"","mappings":"AACA,SACEA,UAAU,EACVC,oBAAoB,EACpBC,4BAA4B,EAC5BC,sBAAsB,QACjB,gCAAgC"}
@@ -1,2 +1,2 @@
1
- export * from './components/SuggestionList/index';
1
+ export { SuggestionList, renderSuggestionList_unstable, suggestionListClassNames, useSuggestionListStyles_unstable, useSuggestionList_unstable } from './components/SuggestionList/index';
2
2
  //# sourceMappingURL=SuggestionList.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["SuggestionList.ts"],"sourcesContent":["export * from './components/SuggestionList/index';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,oCAAoC"}
1
+ {"version":3,"sources":["SuggestionList.ts"],"sourcesContent":["export type { SuggestionListProps, SuggestionListSlots, SuggestionListState, TooltipComponent } from './components/SuggestionList/index';\nexport { SuggestionList, renderSuggestionList_unstable, suggestionListClassNames, useSuggestionListStyles_unstable, useSuggestionList_unstable } from './components/SuggestionList/index';\n"],"names":["SuggestionList","renderSuggestionList_unstable","suggestionListClassNames","useSuggestionListStyles_unstable","useSuggestionList_unstable"],"rangeMappings":"","mappings":"AACA,SAASA,cAAc,EAAEC,6BAA6B,EAAEC,wBAAwB,EAAEC,gCAAgC,EAAEC,0BAA0B,QAAQ,oCAAoC"}
@@ -1,3 +1,4 @@
1
- export * from './Suggestion';
2
- export * from './useSuggestionStyles.styles';
1
+ export { Suggestion } from './Suggestion';
2
+ export { useSuggestion_unstable } from './useSuggestion';
3
+ export { suggestionClassNames, useSuggestionStyles_unstable } from './useSuggestionStyles.styles';
3
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './Suggestion';\nexport * from './useSuggestionStyles.styles';\n"],"names":[],"rangeMappings":";","mappings":"AAAA,cAAc,eAAe;AAC7B,cAAc,+BAA+B"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export { Suggestion } from './Suggestion';\nexport type { SuggestionProps, SuggestionSlots, SuggestionState } from './Suggestion.types';\nexport { useSuggestion_unstable } from './useSuggestion';\nexport { suggestionClassNames, useSuggestionStyles_unstable } from './useSuggestionStyles.styles';\n"],"names":["Suggestion","useSuggestion_unstable","suggestionClassNames","useSuggestionStyles_unstable"],"rangeMappings":";;","mappings":"AAAA,SAASA,UAAU,QAAQ,eAAe;AAE1C,SAASC,sBAAsB,QAAQ,kBAAkB;AACzD,SAASC,oBAAoB,EAAEC,4BAA4B,QAAQ,+BAA+B"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useSuggestion.ts"],"sourcesContent":["import { useButton_unstable } from '@fluentui/react-components';\nimport { useCopilotMode } from '@fluentui-copilot/react-provider';\nimport type { SuggestionProps } from './Suggestion.types';\n\nexport const useSuggestion_unstable = (\n props: SuggestionProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n) => {\n const buttonState = useButton_unstable(props, ref);\n const mode = useCopilotMode(props.mode);\n return { ...buttonState, mode };\n};\n"],"names":["useButton_unstable","useCopilotMode","useSuggestion_unstable","props","ref","buttonState","mode"],"rangeMappings":";;;;;;;;;","mappings":"AAAA,SAASA,kBAAkB,QAAQ,6BAA6B;AAChE,SAASC,cAAc,QAAQ,mCAAmC;AAGlE,OAAO,MAAMC,yBAAyB,CACpCC,OACAC;IAEA,MAAMC,cAAcL,mBAAmBG,OAAOC;IAC9C,MAAME,OAAOL,eAAeE,MAAMG,IAAI;IACtC,OAAO;QAAE,GAAGD,WAAW;QAAEC;IAAK;AAChC,EAAE"}
1
+ {"version":3,"sources":["useSuggestion.ts"],"sourcesContent":["import { useButton_unstable } from '@fluentui/react-components';\nimport { useCopilotMode } from '@fluentui-copilot/react-provider';\nimport type { SuggestionProps, SuggestionState } from './Suggestion.types';\n\nexport const useSuggestion_unstable = (\n props: SuggestionProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): SuggestionState => {\n const buttonState = useButton_unstable(props, ref);\n const mode = useCopilotMode(props.mode);\n return { ...buttonState, mode };\n};\n"],"names":["useButton_unstable","useCopilotMode","useSuggestion_unstable","props","ref","buttonState","mode"],"rangeMappings":";;;;;;;;;","mappings":"AAAA,SAASA,kBAAkB,QAAQ,6BAA6B;AAChE,SAASC,cAAc,QAAQ,mCAAmC;AAGlE,OAAO,MAAMC,yBAAyB,CACpCC,OACAC;IAEA,MAAMC,cAAcL,mBAAmBG,OAAOC;IAC9C,MAAME,OAAOL,eAAeE,MAAMG,IAAI;IACtC,OAAO;QAAE,GAAGD,WAAW;QAAEC;IAAK;AAChC,EAAE"}
@@ -1,5 +1,4 @@
1
1
  /**
2
2
  * State used in rendering SuggestionList
3
- */export {}; // TODO: Remove semicolon from previous line, uncomment next line, and provide union of props to pick from SuggestionListProps.
4
- // & Required<Pick<SuggestionListProps, 'propName'>>
3
+ */export {};
5
4
  //# sourceMappingURL=SuggestionList.types.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["SuggestionList.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot, TooltipProps, Button } from '@fluentui/react-components';\n\nexport type TooltipComponent = React.FunctionComponent<Partial<TooltipProps>>;\n\nexport type SuggestionListSlots = {\n root: Slot<'div'>;\n /**\n * @deprecated - Use `action` slot instead. Will be removed in the next major release (0.9.0)\n * Deprecated on 10/23/2023\n */\n reload?: Slot<typeof Button>;\n /**\n * @deprecated - Use `action` slot instead. Will be removed in the next major release (0.9.0)\n * Deprecated on 10/23/2023\n */\n reloadTooltip?: Slot<TooltipComponent>;\n action?: Slot<'span'>;\n};\n\n/**\n * SuggestionList Props\n */\nexport type SuggestionListProps = ComponentProps<SuggestionListSlots> & {};\n\n/**\n * State used in rendering SuggestionList\n */\nexport type SuggestionListState = ComponentState<SuggestionListSlots>;\n// TODO: Remove semicolon from previous line, uncomment next line, and provide union of props to pick from SuggestionListProps.\n// & Required<Pick<SuggestionListProps, 'propName'>>\n"],"names":[],"rangeMappings":";;;","mappings":"AAwBA;;CAEC,GACD,WAAsE,CACtE,+HAA+H;CAC/H,oDAAoD"}
1
+ {"version":3,"sources":["SuggestionList.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot, TooltipProps } from '@fluentui/react-components';\n\nexport type TooltipComponent = React.FunctionComponent<Partial<TooltipProps>>;\n\nexport type SuggestionListSlots = {\n root: Slot<'div'>;\n action?: Slot<'span'>;\n};\n\n/**\n * SuggestionList Props\n */\nexport type SuggestionListProps = ComponentProps<SuggestionListSlots> & {\n /**\n * The horizontal alignment of the SuggestionsList.\n * @default 'end'\n */\n horizontalAlignment?: 'start' | 'end';\n};\n\n/**\n * State used in rendering SuggestionList\n */\nexport type SuggestionListState = ComponentState<SuggestionListSlots> &\n Required<Pick<SuggestionListProps, 'horizontalAlignment'>>;\n"],"names":[],"rangeMappings":";;","mappings":"AAoBA;;CAEC,GACD,WAC6D"}
@@ -1,6 +1,5 @@
1
- export * from './SuggestionList';
2
- export * from './SuggestionList.types';
3
- export * from './renderSuggestionList';
4
- export * from './useSuggestionList';
5
- export * from './useSuggestionListStyles.styles';
1
+ export { SuggestionList } from './SuggestionList';
2
+ export { renderSuggestionList_unstable } from './renderSuggestionList';
3
+ export { useSuggestionList_unstable } from './useSuggestionList';
4
+ export { suggestionListClassNames, useSuggestionListStyles_unstable } from './useSuggestionListStyles.styles';
6
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './SuggestionList';\nexport * from './SuggestionList.types';\nexport * from './renderSuggestionList';\nexport * from './useSuggestionList';\nexport * from './useSuggestionListStyles.styles';\n"],"names":[],"rangeMappings":";;;;","mappings":"AAAA,cAAc,mBAAmB;AACjC,cAAc,yBAAyB;AACvC,cAAc,yBAAyB;AACvC,cAAc,sBAAsB;AACpC,cAAc,mCAAmC"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export { SuggestionList } from './SuggestionList';\nexport type { SuggestionListProps, SuggestionListSlots, SuggestionListState, TooltipComponent } from './SuggestionList.types';\nexport { renderSuggestionList_unstable } from './renderSuggestionList';\nexport { useSuggestionList_unstable } from './useSuggestionList';\nexport { suggestionListClassNames, useSuggestionListStyles_unstable } from './useSuggestionListStyles.styles';\n"],"names":["SuggestionList","renderSuggestionList_unstable","useSuggestionList_unstable","suggestionListClassNames","useSuggestionListStyles_unstable"],"rangeMappings":";;;","mappings":"AAAA,SAASA,cAAc,QAAQ,mBAAmB;AAElD,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,0BAA0B,QAAQ,sBAAsB;AACjE,SAASC,wBAAwB,EAAEC,gCAAgC,QAAQ,mCAAmC"}
@@ -6,9 +6,7 @@ import { assertSlots } from '@fluentui/react-components';
6
6
  export const renderSuggestionList_unstable = state => {
7
7
  assertSlots(state);
8
8
  return /*#__PURE__*/_jsxs(state.root, {
9
- children: [state.root.children, state.reload && state.reloadTooltip && /*#__PURE__*/_jsx(state.reloadTooltip, {
10
- children: /*#__PURE__*/_jsx(state.reload, {})
11
- }), state.reload && !state.reloadTooltip && /*#__PURE__*/_jsx(state.reload, {}), state.action && !state.reload && /*#__PURE__*/_jsx(state.action, {})]
9
+ children: [state.root.children, state.action && /*#__PURE__*/_jsx(state.action, {})]
12
10
  });
13
11
  };
14
12
  //# sourceMappingURL=renderSuggestionList.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["renderSuggestionList.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { SuggestionListState, SuggestionListSlots } from './SuggestionList.types';\n\n/**\n * Render the final JSX of SuggestionList\n */\nexport const renderSuggestionList_unstable = (state: SuggestionListState) => {\n assertSlots<SuggestionListSlots>(state);\n\n return (\n <state.root>\n {state.root.children}\n\n {state.reload && state.reloadTooltip && (\n <state.reloadTooltip>\n <state.reload />\n </state.reloadTooltip>\n )}\n\n {state.reload && !state.reloadTooltip && <state.reload />}\n\n {state.action && !state.reload && <state.action />}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderSuggestionList_unstable","state","root","children","reload","reloadTooltip","action"],"rangeMappings":";;;;;;;;;;;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,6BAA6B;AAGzD;;CAEC,GACD,OAAO,MAAMC,gCAAgC,CAACC;IAC5CF,YAAiCE;IAEjC,qBACE,MAACA,MAAMC,IAAI;;YACRD,MAAMC,IAAI,CAACC,QAAQ;YAEnBF,MAAMG,MAAM,IAAIH,MAAMI,aAAa,kBAClC,KAACJ,MAAMI,aAAa;0BAClB,cAAA,KAACJ,MAAMG,MAAM;;YAIhBH,MAAMG,MAAM,IAAI,CAACH,MAAMI,aAAa,kBAAI,KAACJ,MAAMG,MAAM;YAErDH,MAAMK,MAAM,IAAI,CAACL,MAAMG,MAAM,kBAAI,KAACH,MAAMK,MAAM;;;AAGrD,EAAE"}
1
+ {"version":3,"sources":["renderSuggestionList.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { SuggestionListState, SuggestionListSlots } from './SuggestionList.types';\n\n/**\n * Render the final JSX of SuggestionList\n */\nexport const renderSuggestionList_unstable = (state: SuggestionListState) => {\n assertSlots<SuggestionListSlots>(state);\n\n return (\n <state.root>\n {state.root.children}\n {state.action && <state.action />}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderSuggestionList_unstable","state","root","children","action"],"rangeMappings":";;;;;;;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,6BAA6B;AAGzD;;CAEC,GACD,OAAO,MAAMC,gCAAgC,CAACC;IAC5CF,YAAiCE;IAEjC,qBACE,MAACA,MAAMC,IAAI;;YACRD,MAAMC,IAAI,CAACC,QAAQ;YACnBF,MAAMG,MAAM,kBAAI,KAACH,MAAMG,MAAM;;;AAGpC,EAAE"}
@@ -1,6 +1,4 @@
1
- import * as React from 'react';
2
- import { Button, Tooltip, getIntrinsicElementProps, slot, useArrowNavigationGroup } from '@fluentui/react-components';
3
- import { ArrowCounterclockwise16Regular, ArrowCounterclockwise16Filled, bundleIcon } from '@fluentui/react-icons';
1
+ import { getIntrinsicElementProps, slot, useArrowNavigationGroup } from '@fluentui/react-components';
4
2
  // If you add JSX to this file, be sure to change the file type to .tsx
5
3
  /**
6
4
  * Create the state required to render SuggestionList.
@@ -14,14 +12,12 @@ import { ArrowCounterclockwise16Regular, ArrowCounterclockwise16Filled, bundleIc
14
12
  export const useSuggestionList_unstable = (props, ref) => {
15
13
  const {
16
14
  action,
17
- reload
15
+ horizontalAlignment = 'end'
18
16
  } = props;
19
- const ReloadIcon = bundleIcon(ArrowCounterclockwise16Filled, ArrowCounterclockwise16Regular);
20
17
  return {
18
+ horizontalAlignment,
21
19
  components: {
22
20
  root: 'div',
23
- reload: Button,
24
- reloadTooltip: Tooltip,
25
21
  action: 'span'
26
22
  },
27
23
  root: slot.always(getIntrinsicElementProps('div', {
@@ -36,23 +32,6 @@ export const useSuggestionList_unstable = (props, ref) => {
36
32
  }), {
37
33
  elementType: 'div'
38
34
  }),
39
- reloadTooltip: slot.optional(props.reloadTooltip, {
40
- defaultProps: {
41
- relationship: 'label',
42
- content: 'Reload',
43
- withArrow: reload !== undefined
44
- },
45
- renderByDefault: true,
46
- elementType: Tooltip
47
- }),
48
- reload: slot.optional(reload, {
49
- defaultProps: {
50
- icon: /*#__PURE__*/React.createElement(ReloadIcon, null),
51
- size: 'small',
52
- appearance: 'transparent'
53
- },
54
- elementType: Button
55
- }),
56
35
  action: slot.optional(action, {
57
36
  elementType: 'span'
58
37
  })
@@ -1 +1 @@
1
- {"version":3,"sources":["useSuggestionList.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Button, Tooltip, getIntrinsicElementProps, slot, useArrowNavigationGroup } from '@fluentui/react-components';\nimport { ArrowCounterclockwise16Regular, ArrowCounterclockwise16Filled, bundleIcon } from '@fluentui/react-icons';\nimport type { SuggestionListProps, SuggestionListState, TooltipComponent } from './SuggestionList.types';\n\n// If you add JSX to this file, be sure to change the file type to .tsx\n\n/**\n * Create the state required to render SuggestionList.\n *\n * The returned state can be modified with hooks such as useSuggestionListStyles_unstable,\n * before being passed to renderSuggestionList_unstable.\n *\n * @param props - props from this instance of SuggestionList\n * @param ref - reference to root HTMLElement of SuggestionList\n */\nexport const useSuggestionList_unstable = (\n props: SuggestionListProps,\n ref: React.Ref<HTMLDivElement>,\n): SuggestionListState => {\n const { action, reload } = props;\n const ReloadIcon = bundleIcon(ArrowCounterclockwise16Filled, ArrowCounterclockwise16Regular);\n return {\n components: {\n root: 'div',\n reload: Button,\n reloadTooltip: Tooltip as TooltipComponent,\n action: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n role: 'toolbar',\n 'aria-label': 'suggestions',\n ...props,\n ...useArrowNavigationGroup({ axis: 'both', circular: true }),\n }),\n { elementType: 'div' },\n ),\n reloadTooltip: slot.optional(props.reloadTooltip, {\n defaultProps: {\n relationship: 'label',\n content: 'Reload',\n withArrow: reload !== undefined,\n },\n renderByDefault: true,\n elementType: Tooltip as TooltipComponent,\n }),\n reload: slot.optional(reload, {\n defaultProps: {\n icon: <ReloadIcon />,\n size: 'small',\n appearance: 'transparent',\n },\n elementType: Button,\n }),\n action: slot.optional(action, { elementType: 'span' }),\n };\n};\n"],"names":["React","Button","Tooltip","getIntrinsicElementProps","slot","useArrowNavigationGroup","ArrowCounterclockwise16Regular","ArrowCounterclockwise16Filled","bundleIcon","useSuggestionList_unstable","props","ref","action","reload","ReloadIcon","components","root","reloadTooltip","always","role","axis","circular","elementType","optional","defaultProps","relationship","content","withArrow","undefined","renderByDefault","icon","size","appearance"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,MAAM,EAAEC,OAAO,EAAEC,wBAAwB,EAAEC,IAAI,EAAEC,uBAAuB,QAAQ,6BAA6B;AACtH,SAASC,8BAA8B,EAAEC,6BAA6B,EAAEC,UAAU,QAAQ,wBAAwB;AAGlH,uEAAuE;AAEvE;;;;;;;;CAQC,GACD,OAAO,MAAMC,6BAA6B,CACxCC,OACAC;IAEA,MAAM,EAAEC,MAAM,EAAEC,MAAM,EAAE,GAAGH;IAC3B,MAAMI,aAAaN,WAAWD,+BAA+BD;IAC7D,OAAO;QACLS,YAAY;YACVC,MAAM;YACNH,QAAQZ;YACRgB,eAAef;YACfU,QAAQ;QACV;QACAI,MAAMZ,KAAKc,MAAM,CACff,yBAAyB,OAAO;YAC9BQ;YACAQ,MAAM;YACN,cAAc;YACd,GAAGT,KAAK;YACR,GAAGL,wBAAwB;gBAAEe,MAAM;gBAAQC,UAAU;YAAK,EAAE;QAC9D,IACA;YAAEC,aAAa;QAAM;QAEvBL,eAAeb,KAAKmB,QAAQ,CAACb,MAAMO,aAAa,EAAE;YAChDO,cAAc;gBACZC,cAAc;gBACdC,SAAS;gBACTC,WAAWd,WAAWe;YACxB;YACAC,iBAAiB;YACjBP,aAAapB;QACf;QACAW,QAAQT,KAAKmB,QAAQ,CAACV,QAAQ;YAC5BW,cAAc;gBACZM,oBAAM,oBAAChB;gBACPiB,MAAM;gBACNC,YAAY;YACd;YACAV,aAAarB;QACf;QACAW,QAAQR,KAAKmB,QAAQ,CAACX,QAAQ;YAAEU,aAAa;QAAO;IACtD;AACF,EAAE"}
1
+ {"version":3,"sources":["useSuggestionList.tsx"],"sourcesContent":["import { getIntrinsicElementProps, slot, useArrowNavigationGroup } from '@fluentui/react-components';\nimport type { SuggestionListProps, SuggestionListState } from './SuggestionList.types';\n\n// If you add JSX to this file, be sure to change the file type to .tsx\n\n/**\n * Create the state required to render SuggestionList.\n *\n * The returned state can be modified with hooks such as useSuggestionListStyles_unstable,\n * before being passed to renderSuggestionList_unstable.\n *\n * @param props - props from this instance of SuggestionList\n * @param ref - reference to root HTMLElement of SuggestionList\n */\nexport const useSuggestionList_unstable = (\n props: SuggestionListProps,\n ref: React.Ref<HTMLDivElement>,\n): SuggestionListState => {\n const { action, horizontalAlignment = 'end' } = props;\n return {\n horizontalAlignment,\n components: {\n root: 'div',\n action: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n role: 'toolbar',\n 'aria-label': 'suggestions',\n ...props,\n ...useArrowNavigationGroup({ axis: 'both', circular: true }),\n }),\n { elementType: 'div' },\n ),\n action: slot.optional(action, { elementType: 'span' }),\n };\n};\n"],"names":["getIntrinsicElementProps","slot","useArrowNavigationGroup","useSuggestionList_unstable","props","ref","action","horizontalAlignment","components","root","always","role","axis","circular","elementType","optional"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,wBAAwB,EAAEC,IAAI,EAAEC,uBAAuB,QAAQ,6BAA6B;AAGrG,uEAAuE;AAEvE;;;;;;;;CAQC,GACD,OAAO,MAAMC,6BAA6B,CACxCC,OACAC;IAEA,MAAM,EAAEC,MAAM,EAAEC,sBAAsB,KAAK,EAAE,GAAGH;IAChD,OAAO;QACLG;QACAC,YAAY;YACVC,MAAM;YACNH,QAAQ;QACV;QACAG,MAAMR,KAAKS,MAAM,CACfV,yBAAyB,OAAO;YAC9BK;YACAM,MAAM;YACN,cAAc;YACd,GAAGP,KAAK;YACR,GAAGF,wBAAwB;gBAAEU,MAAM;gBAAQC,UAAU;YAAK,EAAE;QAC9D,IACA;YAAEC,aAAa;QAAM;QAEvBR,QAAQL,KAAKc,QAAQ,CAACT,QAAQ;YAAEQ,aAAa;QAAO;IACtD;AACF,EAAE"}
@@ -1,8 +1,6 @@
1
1
  import { __styles, mergeClasses, tokens } from '@fluentui/react-components';
2
2
  export const suggestionListClassNames = {
3
3
  root: 'fai-SuggestionList',
4
- reload: 'fai-SuggestionList__reload',
5
- reloadTooltip: 'fai-SuggestionList__reloadTooltip',
6
4
  action: 'fai-SuggestionList__action'
7
5
  };
8
6
  /**
@@ -23,9 +21,8 @@ const useStyles = __styles({
23
21
  B74szlk: ["f4bgq6r", "f83tq75"],
24
22
  Beptln2: "fr3gje9"
25
23
  },
26
- reload: {
27
- Bf4jedk: "f79feoa",
28
- B2u0y6b: "f1cs043"
24
+ horizontalAlignmentStart: {
25
+ Brf1p80: "fbhxue7"
29
26
  },
30
27
  action: {
31
28
  Bf4jedk: "f79feoa",
@@ -38,7 +35,7 @@ const useStyles = __styles({
38
35
  p: -1
39
36
  }], [".f83tq75{margin:var(--spacingVerticalNone) var(--spacingHorizontalNone) var(--spacingVerticalS) var(--spacingHorizontalNone);}", {
40
37
  p: -1
41
- }], ".fr3gje9>:nth-last-of-type(2){max-width:calc(100% - var(--spacingHorizontalXXL) - var(--spacingVerticalS));}", ".f79feoa{min-width:var(--spacingHorizontalXXL);}", ".f1cs043{max-width:var(--spacingHorizontalXXL);}"]
38
+ }], ".fr3gje9>:nth-last-of-type(2){max-width:calc(100% - var(--spacingHorizontalXXL) - var(--spacingVerticalS));}", ".fbhxue7{justify-content:flex-start;}", ".f79feoa{min-width:var(--spacingHorizontalXXL);}", ".f1cs043{max-width:var(--spacingHorizontalXXL);}"]
42
39
  });
43
40
  /**
44
41
  * Apply styling to the SuggestionList slots based on the state
@@ -47,10 +44,7 @@ export const useSuggestionListStyles_unstable = state => {
47
44
  'use no memo';
48
45
 
49
46
  const styles = useStyles();
50
- state.root.className = mergeClasses(suggestionListClassNames.root, styles.root, state.root.className);
51
- if (state.reload) {
52
- state.reload.className = mergeClasses(suggestionListClassNames.reload, styles.reload, state.reload.className);
53
- }
47
+ state.root.className = mergeClasses(suggestionListClassNames.root, styles.root, state.horizontalAlignment === 'start' && styles.horizontalAlignmentStart, state.root.className);
54
48
  if (state.action) {
55
49
  state.action.className = mergeClasses(suggestionListClassNames.action, styles.action, state.action.className);
56
50
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["useSuggestionListStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, tokens } from '@fluentui/react-components';\nimport type { SuggestionListSlots, SuggestionListState } from './SuggestionList.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const suggestionListClassNames: SlotClassNames<SuggestionListSlots> = {\n root: 'fai-SuggestionList',\n reload: 'fai-SuggestionList__reload',\n reloadTooltip: 'fai-SuggestionList__reloadTooltip',\n action: 'fai-SuggestionList__action',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n flexWrap: 'wrap',\n justifyContent: 'flex-end',\n gap: tokens.spacingVerticalS,\n margin: `\n ${tokens.spacingVerticalNone}\n ${tokens.spacingHorizontalNone}\n ${tokens.spacingVerticalS}\n ${tokens.spacingHorizontalNone}\n `,\n '> :nth-last-of-type(2)': {\n maxWidth: `calc(100% - ${tokens.spacingHorizontalXXL} - ${tokens.spacingVerticalS})`,\n },\n },\n reload: {\n minWidth: tokens.spacingHorizontalXXL,\n maxWidth: tokens.spacingHorizontalXXL,\n },\n\n action: {\n minWidth: tokens.spacingHorizontalXXL,\n maxWidth: tokens.spacingHorizontalXXL,\n },\n\n // TODO add additional classes for different states and/or slots\n});\n\n/**\n * Apply styling to the SuggestionList slots based on the state\n */\nexport const useSuggestionListStyles_unstable = (state: SuggestionListState): SuggestionListState => {\n 'use no memo';\n\n const styles = useStyles();\n state.root.className = mergeClasses(suggestionListClassNames.root, styles.root, state.root.className);\n\n if (state.reload) {\n state.reload.className = mergeClasses(suggestionListClassNames.reload, styles.reload, state.reload.className);\n }\n\n if (state.action) {\n state.action.className = mergeClasses(suggestionListClassNames.action, styles.action, state.action.className);\n }\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","tokens","suggestionListClassNames","root","reload","reloadTooltip","action","useStyles","display","flexWrap","justifyContent","gap","spacingVerticalS","margin","spacingVerticalNone","spacingHorizontalNone","maxWidth","spacingHorizontalXXL","minWidth","useSuggestionListStyles_unstable","state","styles","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,EAAEC,MAAM,QAAQ,6BAA6B;AAI9E,OAAO,MAAMC,2BAAgE;IAC3EC,MAAM;IACNC,QAAQ;IACRC,eAAe;IACfC,QAAQ;AACV,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYR,WAAW;IAC3BI,MAAM;QACJK,SAAS;QACTC,UAAU;QACVC,gBAAgB;QAChBC,KAAKV,OAAOW,gBAAgB;QAC5BC,QAAQ,CAAC;MACP,EAAEZ,OAAOa,mBAAmB,CAAC;MAC7B,EAAEb,OAAOc,qBAAqB,CAAC;MAC/B,EAAEd,OAAOW,gBAAgB,CAAC;MAC1B,EAAEX,OAAOc,qBAAqB,CAAC;IACjC,CAAC;QACD,0BAA0B;YACxBC,UAAU,CAAC,YAAY,EAAEf,OAAOgB,oBAAoB,CAAC,GAAG,EAAEhB,OAAOW,gBAAgB,CAAC,CAAC,CAAC;QACtF;IACF;IACAR,QAAQ;QACNc,UAAUjB,OAAOgB,oBAAoB;QACrCD,UAAUf,OAAOgB,oBAAoB;IACvC;IAEAX,QAAQ;QACNY,UAAUjB,OAAOgB,oBAAoB;QACrCD,UAAUf,OAAOgB,oBAAoB;IACvC;AAGF;AAEA;;CAEC,GACD,OAAO,MAAME,mCAAmC,CAACC;IAC/C;IAEA,MAAMC,SAASd;IACfa,MAAMjB,IAAI,CAACmB,SAAS,GAAGtB,aAAaE,yBAAyBC,IAAI,EAAEkB,OAAOlB,IAAI,EAAEiB,MAAMjB,IAAI,CAACmB,SAAS;IAEpG,IAAIF,MAAMhB,MAAM,EAAE;QAChBgB,MAAMhB,MAAM,CAACkB,SAAS,GAAGtB,aAAaE,yBAAyBE,MAAM,EAAEiB,OAAOjB,MAAM,EAAEgB,MAAMhB,MAAM,CAACkB,SAAS;IAC9G;IAEA,IAAIF,MAAMd,MAAM,EAAE;QAChBc,MAAMd,MAAM,CAACgB,SAAS,GAAGtB,aAAaE,yBAAyBI,MAAM,EAAEe,OAAOf,MAAM,EAAEc,MAAMd,MAAM,CAACgB,SAAS;IAC9G;IAEA,OAAOF;AACT,EAAE"}
1
+ {"version":3,"sources":["useSuggestionListStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, tokens } from '@fluentui/react-components';\nimport type { SuggestionListSlots, SuggestionListState } from './SuggestionList.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const suggestionListClassNames: SlotClassNames<SuggestionListSlots> = {\n root: 'fai-SuggestionList',\n action: 'fai-SuggestionList__action',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n flexWrap: 'wrap',\n justifyContent: 'flex-end',\n gap: tokens.spacingVerticalS,\n margin: `\n ${tokens.spacingVerticalNone}\n ${tokens.spacingHorizontalNone}\n ${tokens.spacingVerticalS}\n ${tokens.spacingHorizontalNone}\n `,\n '> :nth-last-of-type(2)': {\n maxWidth: `calc(100% - ${tokens.spacingHorizontalXXL} - ${tokens.spacingVerticalS})`,\n },\n },\n horizontalAlignmentStart: {\n justifyContent: 'flex-start',\n },\n\n action: {\n minWidth: tokens.spacingHorizontalXXL,\n maxWidth: tokens.spacingHorizontalXXL,\n },\n\n // TODO add additional classes for different states and/or slots\n});\n\n/**\n * Apply styling to the SuggestionList slots based on the state\n */\nexport const useSuggestionListStyles_unstable = (state: SuggestionListState): SuggestionListState => {\n 'use no memo';\n\n const styles = useStyles();\n state.root.className = mergeClasses(\n suggestionListClassNames.root,\n styles.root,\n state.horizontalAlignment === 'start' && styles.horizontalAlignmentStart,\n state.root.className,\n );\n\n if (state.action) {\n state.action.className = mergeClasses(suggestionListClassNames.action, styles.action, state.action.className);\n }\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","tokens","suggestionListClassNames","root","action","useStyles","display","flexWrap","justifyContent","gap","spacingVerticalS","margin","spacingVerticalNone","spacingHorizontalNone","maxWidth","spacingHorizontalXXL","horizontalAlignmentStart","minWidth","useSuggestionListStyles_unstable","state","styles","className","horizontalAlignment"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,EAAEC,MAAM,QAAQ,6BAA6B;AAI9E,OAAO,MAAMC,2BAAgE;IAC3EC,MAAM;IACNC,QAAQ;AACV,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYN,WAAW;IAC3BI,MAAM;QACJG,SAAS;QACTC,UAAU;QACVC,gBAAgB;QAChBC,KAAKR,OAAOS,gBAAgB;QAC5BC,QAAQ,CAAC;MACP,EAAEV,OAAOW,mBAAmB,CAAC;MAC7B,EAAEX,OAAOY,qBAAqB,CAAC;MAC/B,EAAEZ,OAAOS,gBAAgB,CAAC;MAC1B,EAAET,OAAOY,qBAAqB,CAAC;IACjC,CAAC;QACD,0BAA0B;YACxBC,UAAU,CAAC,YAAY,EAAEb,OAAOc,oBAAoB,CAAC,GAAG,EAAEd,OAAOS,gBAAgB,CAAC,CAAC,CAAC;QACtF;IACF;IACAM,0BAA0B;QACxBR,gBAAgB;IAClB;IAEAJ,QAAQ;QACNa,UAAUhB,OAAOc,oBAAoB;QACrCD,UAAUb,OAAOc,oBAAoB;IACvC;AAGF;AAEA;;CAEC,GACD,OAAO,MAAMG,mCAAmC,CAACC;IAC/C;IAEA,MAAMC,SAASf;IACfc,MAAMhB,IAAI,CAACkB,SAAS,GAAGrB,aACrBE,yBAAyBC,IAAI,EAC7BiB,OAAOjB,IAAI,EACXgB,MAAMG,mBAAmB,KAAK,WAAWF,OAAOJ,wBAAwB,EACxEG,MAAMhB,IAAI,CAACkB,SAAS;IAGtB,IAAIF,MAAMf,MAAM,EAAE;QAChBe,MAAMf,MAAM,CAACiB,SAAS,GAAGrB,aAAaE,yBAAyBE,MAAM,EAAEgB,OAAOhB,MAAM,EAAEe,MAAMf,MAAM,CAACiB,SAAS;IAC9G;IAEA,OAAOF;AACT,EAAE"}
package/lib/index.js CHANGED
@@ -1,3 +1,3 @@
1
- export { Suggestion, suggestionClassNames, useSuggestionStyles_unstable } from './Suggestion';
1
+ export { Suggestion, suggestionClassNames, useSuggestionStyles_unstable, useSuggestion_unstable } from './Suggestion';
2
2
  export { SuggestionList, renderSuggestionList_unstable, suggestionListClassNames, useSuggestionListStyles_unstable, useSuggestionList_unstable } from './SuggestionList';
3
3
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export { Suggestion, suggestionClassNames, useSuggestionStyles_unstable } from './Suggestion';\nexport type { SuggestionListProps, SuggestionListSlots, SuggestionListState, TooltipComponent } from './SuggestionList';\nexport {\n SuggestionList,\n renderSuggestionList_unstable,\n suggestionListClassNames,\n useSuggestionListStyles_unstable,\n useSuggestionList_unstable,\n} from './SuggestionList';\n"],"names":["Suggestion","suggestionClassNames","useSuggestionStyles_unstable","SuggestionList","renderSuggestionList_unstable","suggestionListClassNames","useSuggestionListStyles_unstable","useSuggestionList_unstable"],"rangeMappings":";","mappings":"AAAA,SAASA,UAAU,EAAEC,oBAAoB,EAAEC,4BAA4B,QAAQ,eAAe;AAE9F,SACEC,cAAc,EACdC,6BAA6B,EAC7BC,wBAAwB,EACxBC,gCAAgC,EAChCC,0BAA0B,QACrB,mBAAmB"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export type { SuggestionProps, SuggestionSlots, SuggestionState } from './Suggestion';\nexport { Suggestion, suggestionClassNames, useSuggestionStyles_unstable, useSuggestion_unstable } from './Suggestion';\nexport type { SuggestionListProps, SuggestionListSlots, SuggestionListState, TooltipComponent } from './SuggestionList';\nexport {\n SuggestionList,\n renderSuggestionList_unstable,\n suggestionListClassNames,\n useSuggestionListStyles_unstable,\n useSuggestionList_unstable,\n} from './SuggestionList';\n"],"names":["Suggestion","suggestionClassNames","useSuggestionStyles_unstable","useSuggestion_unstable","SuggestionList","renderSuggestionList_unstable","suggestionListClassNames","useSuggestionListStyles_unstable","useSuggestionList_unstable"],"rangeMappings":";","mappings":"AACA,SAASA,UAAU,EAAEC,oBAAoB,EAAEC,4BAA4B,EAAEC,sBAAsB,QAAQ,eAAe;AAEtH,SACEC,cAAc,EACdC,6BAA6B,EAC7BC,wBAAwB,EACxBC,gCAAgC,EAChCC,0BAA0B,QACrB,mBAAmB"}
@@ -2,6 +2,25 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const _export_star = require("@swc/helpers/_/_export_star");
6
- _export_star._(require("./components/Suggestion/index"), exports);
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ Suggestion: function() {
13
+ return _index.Suggestion;
14
+ },
15
+ suggestionClassNames: function() {
16
+ return _index.suggestionClassNames;
17
+ },
18
+ useSuggestionStyles_unstable: function() {
19
+ return _index.useSuggestionStyles_unstable;
20
+ },
21
+ useSuggestion_unstable: function() {
22
+ return _index.useSuggestion_unstable;
23
+ }
24
+ });
25
+ const _index = require("./components/Suggestion/index");
7
26
  //# sourceMappingURL=Suggestion.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["Suggestion.ts"],"sourcesContent":["export * from './components/Suggestion/index';\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;uBAAc"}
1
+ {"version":3,"sources":["Suggestion.ts"],"sourcesContent":["export type { SuggestionProps, SuggestionSlots, SuggestionState } from './components/Suggestion/index';\nexport {\n Suggestion,\n suggestionClassNames,\n useSuggestionStyles_unstable,\n useSuggestion_unstable,\n} from './components/Suggestion/index';\n"],"names":["Suggestion","suggestionClassNames","useSuggestionStyles_unstable","useSuggestion_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAEEA,UAAU;eAAVA,iBAAU;;IACVC,oBAAoB;eAApBA,2BAAoB;;IACpBC,4BAA4B;eAA5BA,mCAA4B;;IAC5BC,sBAAsB;eAAtBA,6BAAsB;;;uBACjB"}
@@ -2,6 +2,28 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const _export_star = require("@swc/helpers/_/_export_star");
6
- _export_star._(require("./components/SuggestionList/index"), exports);
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ SuggestionList: function() {
13
+ return _index.SuggestionList;
14
+ },
15
+ renderSuggestionList_unstable: function() {
16
+ return _index.renderSuggestionList_unstable;
17
+ },
18
+ suggestionListClassNames: function() {
19
+ return _index.suggestionListClassNames;
20
+ },
21
+ useSuggestionListStyles_unstable: function() {
22
+ return _index.useSuggestionListStyles_unstable;
23
+ },
24
+ useSuggestionList_unstable: function() {
25
+ return _index.useSuggestionList_unstable;
26
+ }
27
+ });
28
+ const _index = require("./components/SuggestionList/index");
7
29
  //# sourceMappingURL=SuggestionList.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["SuggestionList.ts"],"sourcesContent":["export * from './components/SuggestionList/index';\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;uBAAc"}
1
+ {"version":3,"sources":["SuggestionList.ts"],"sourcesContent":["export type { SuggestionListProps, SuggestionListSlots, SuggestionListState, TooltipComponent } from './components/SuggestionList/index';\nexport { SuggestionList, renderSuggestionList_unstable, suggestionListClassNames, useSuggestionListStyles_unstable, useSuggestionList_unstable } from './components/SuggestionList/index';\n"],"names":["SuggestionList","renderSuggestionList_unstable","suggestionListClassNames","useSuggestionListStyles_unstable","useSuggestionList_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IACSA,cAAc;eAAdA,qBAAc;;IAAEC,6BAA6B;eAA7BA,oCAA6B;;IAAEC,wBAAwB;eAAxBA,+BAAwB;;IAAEC,gCAAgC;eAAhCA,uCAAgC;;IAAEC,0BAA0B;eAA1BA,iCAA0B;;;uBAAQ"}
@@ -2,7 +2,27 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const _export_star = require("@swc/helpers/_/_export_star");
6
- _export_star._(require("./Suggestion"), exports);
7
- _export_star._(require("./useSuggestionStyles.styles"), exports);
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ Suggestion: function() {
13
+ return _Suggestion.Suggestion;
14
+ },
15
+ suggestionClassNames: function() {
16
+ return _useSuggestionStylesstyles.suggestionClassNames;
17
+ },
18
+ useSuggestionStyles_unstable: function() {
19
+ return _useSuggestionStylesstyles.useSuggestionStyles_unstable;
20
+ },
21
+ useSuggestion_unstable: function() {
22
+ return _useSuggestion.useSuggestion_unstable;
23
+ }
24
+ });
25
+ const _Suggestion = require("./Suggestion");
26
+ const _useSuggestion = require("./useSuggestion");
27
+ const _useSuggestionStylesstyles = require("./useSuggestionStyles.styles");
8
28
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './Suggestion';\nexport * from './useSuggestionStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;","mappings":";;;;;uBAAc;uBACA"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export { Suggestion } from './Suggestion';\nexport type { SuggestionProps, SuggestionSlots, SuggestionState } from './Suggestion.types';\nexport { useSuggestion_unstable } from './useSuggestion';\nexport { suggestionClassNames, useSuggestionStyles_unstable } from './useSuggestionStyles.styles';\n"],"names":["Suggestion","suggestionClassNames","useSuggestionStyles_unstable","useSuggestion_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,UAAU;eAAVA,sBAAU;;IAGVC,oBAAoB;eAApBA,+CAAoB;;IAAEC,4BAA4B;eAA5BA,uDAA4B;;IADlDC,sBAAsB;eAAtBA,qCAAsB;;;4BAFJ;+BAEY;2CAC4B"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useSuggestion.ts"],"sourcesContent":["import { useButton_unstable } from '@fluentui/react-components';\nimport { useCopilotMode } from '@fluentui-copilot/react-provider';\nimport type { SuggestionProps } from './Suggestion.types';\n\nexport const useSuggestion_unstable = (\n props: SuggestionProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n) => {\n const buttonState = useButton_unstable(props, ref);\n const mode = useCopilotMode(props.mode);\n return { ...buttonState, mode };\n};\n"],"names":["useSuggestion_unstable","props","ref","buttonState","useButton_unstable","mode","useCopilotMode"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAIaA;;;eAAAA;;;iCAJsB;+BACJ;AAGxB,MAAMA,yBAAyB,CACpCC,OACAC;UAEAC,cAAMA,IAAAA,mCAAcC,EAAAA,OAAmBH;UACvCI,OAAMA,IAAAA,6BAAOC,EAAAA,MAAeL,IAAMI;WAClC;sBAAYF;;;AACd"}
1
+ {"version":3,"sources":["useSuggestion.ts"],"sourcesContent":["import { useButton_unstable } from '@fluentui/react-components';\nimport { useCopilotMode } from '@fluentui-copilot/react-provider';\nimport type { SuggestionProps, SuggestionState } from './Suggestion.types';\n\nexport const useSuggestion_unstable = (\n props: SuggestionProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): SuggestionState => {\n const buttonState = useButton_unstable(props, ref);\n const mode = useCopilotMode(props.mode);\n return { ...buttonState, mode };\n};\n"],"names":["useSuggestion_unstable","props","ref","buttonState","useButton_unstable","mode","useCopilotMode"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAIaA;;;eAAAA;;;iCAJsB;+BACJ;AAGxB,MAAMA,yBAAyB,CACpCC,OACAC;UAEAC,cAAMA,IAAAA,mCAAcC,EAAAA,OAAmBH;UACvCI,OAAMA,IAAAA,6BAAOC,EAAAA,MAAeL,IAAMI;WAClC;sBAAYF;;;AACd"}
@@ -4,6 +4,4 @@
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- // TODO: Remove semicolon from previous line, uncomment next line, and provide union of props to pick from SuggestionListProps.
8
- // & Required<Pick<SuggestionListProps, 'propName'>>
9
7
  //# sourceMappingURL=SuggestionList.types.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["SuggestionList.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot, TooltipProps, Button } from '@fluentui/react-components';\n\nexport type TooltipComponent = React.FunctionComponent<Partial<TooltipProps>>;\n\nexport type SuggestionListSlots = {\n root: Slot<'div'>;\n /**\n * @deprecated - Use `action` slot instead. Will be removed in the next major release (0.9.0)\n * Deprecated on 10/23/2023\n */\n reload?: Slot<typeof Button>;\n /**\n * @deprecated - Use `action` slot instead. Will be removed in the next major release (0.9.0)\n * Deprecated on 10/23/2023\n */\n reloadTooltip?: Slot<TooltipComponent>;\n action?: Slot<'span'>;\n};\n\n/**\n * SuggestionList Props\n */\nexport type SuggestionListProps = ComponentProps<SuggestionListSlots> & {};\n\n/**\n * State used in rendering SuggestionList\n */\nexport type SuggestionListState = ComponentState<SuggestionListSlots>;\n// TODO: Remove semicolon from previous line, uncomment next line, and provide union of props to pick from SuggestionListProps.\n// & Required<Pick<SuggestionListProps, 'propName'>>\n"],"names":[],"rangeMappings":";;;;;;;","mappings":"AAwBA;;CAEC;;;;CACD,+HACA;qDACA"}
1
+ {"version":3,"sources":["SuggestionList.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot, TooltipProps } from '@fluentui/react-components';\n\nexport type TooltipComponent = React.FunctionComponent<Partial<TooltipProps>>;\n\nexport type SuggestionListSlots = {\n root: Slot<'div'>;\n action?: Slot<'span'>;\n};\n\n/**\n * SuggestionList Props\n */\nexport type SuggestionListProps = ComponentProps<SuggestionListSlots> & {\n /**\n * The horizontal alignment of the SuggestionsList.\n * @default 'end'\n */\n horizontalAlignment?: 'start' | 'end';\n};\n\n/**\n * State used in rendering SuggestionList\n */\nexport type SuggestionListState = ComponentState<SuggestionListSlots> &\n Required<Pick<SuggestionListProps, 'horizontalAlignment'>>;\n"],"names":[],"rangeMappings":";;","mappings":"AAoBA;;CAEC"}
@@ -2,10 +2,31 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const _export_star = require("@swc/helpers/_/_export_star");
6
- _export_star._(require("./SuggestionList"), exports);
7
- _export_star._(require("./SuggestionList.types"), exports);
8
- _export_star._(require("./renderSuggestionList"), exports);
9
- _export_star._(require("./useSuggestionList"), exports);
10
- _export_star._(require("./useSuggestionListStyles.styles"), exports);
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ SuggestionList: function() {
13
+ return _SuggestionList.SuggestionList;
14
+ },
15
+ renderSuggestionList_unstable: function() {
16
+ return _renderSuggestionList.renderSuggestionList_unstable;
17
+ },
18
+ suggestionListClassNames: function() {
19
+ return _useSuggestionListStylesstyles.suggestionListClassNames;
20
+ },
21
+ useSuggestionListStyles_unstable: function() {
22
+ return _useSuggestionListStylesstyles.useSuggestionListStyles_unstable;
23
+ },
24
+ useSuggestionList_unstable: function() {
25
+ return _useSuggestionList.useSuggestionList_unstable;
26
+ }
27
+ });
28
+ const _SuggestionList = require("./SuggestionList");
29
+ const _renderSuggestionList = require("./renderSuggestionList");
30
+ const _useSuggestionList = require("./useSuggestionList");
31
+ const _useSuggestionListStylesstyles = require("./useSuggestionListStyles.styles");
11
32
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './SuggestionList';\nexport * from './SuggestionList.types';\nexport * from './renderSuggestionList';\nexport * from './useSuggestionList';\nexport * from './useSuggestionListStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export { SuggestionList } from './SuggestionList';\nexport type { SuggestionListProps, SuggestionListSlots, SuggestionListState, TooltipComponent } from './SuggestionList.types';\nexport { renderSuggestionList_unstable } from './renderSuggestionList';\nexport { useSuggestionList_unstable } from './useSuggestionList';\nexport { suggestionListClassNames, useSuggestionListStyles_unstable } from './useSuggestionListStyles.styles';\n"],"names":["SuggestionList","renderSuggestionList_unstable","suggestionListClassNames","useSuggestionListStyles_unstable","useSuggestionList_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,cAAc;eAAdA,8BAAc;;IAEdC,6BAA6B;eAA7BA,mDAA6B;;IAE7BC,wBAAwB;eAAxBA,uDAAwB;;IAAEC,gCAAgC;eAAhCA,+DAAgC;;IAD1DC,0BAA0B;eAA1BA,6CAA0B;;;gCAHJ;sCAEe;mCACH;+CACgC"}
@@ -15,11 +15,7 @@ const renderSuggestionList_unstable = (state)=>{
15
15
  return /*#__PURE__*/ (0, _jsxruntime.jsxs)(state.root, {
16
16
  children: [
17
17
  state.root.children,
18
- state.reload && state.reloadTooltip && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.reloadTooltip, {
19
- children: /*#__PURE__*/ (0, _jsxruntime.jsx)(state.reload, {})
20
- }),
21
- state.reload && !state.reloadTooltip && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.reload, {}),
22
- state.action && !state.reload && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.action, {})
18
+ state.action && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.action, {})
23
19
  ]
24
20
  });
25
21
  }; //# sourceMappingURL=renderSuggestionList.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["renderSuggestionList.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { SuggestionListState, SuggestionListSlots } from './SuggestionList.types';\n\n/**\n * Render the final JSX of SuggestionList\n */\nexport const renderSuggestionList_unstable = (state: SuggestionListState) => {\n assertSlots<SuggestionListSlots>(state);\n\n return (\n <state.root>\n {state.root.children}\n\n {state.reload && state.reloadTooltip && (\n <state.reloadTooltip>\n <state.reload />\n </state.reloadTooltip>\n )}\n\n {state.reload && !state.reloadTooltip && <state.reload />}\n\n {state.action && !state.reload && <state.action />}\n </state.root>\n );\n};\n"],"names":["assertSlots","state","root","children","reload","reloadTooltip","_jsx","action"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAUEA;;;eAAAA;;;4BATF;iCAE4B;AAO1BA,MAAAA,gCAAiCC,CAAAA;oCAEjC,EAAAA;;kBAEKA;YAAAA,MAAMC,IAAKC,CAAAA,QAAQ;YAAAF,MAAAG,MAAA,IAAAH,MAAAI,aAAA,IAAA,WAAA,GAAAC,IAAAA,eAAA,EAAAL,MAAAI,aAAA,EAAA;0BAEnBJ,WAAY,GAAIA,IAAAA,eAAAA,EAAMI,MAAAA,MAAAA,EAAa,CAAA;;mCAEhCA,aAAA,IAACJ,WAAY,GAAAK,IAAAA,eAAA,EAAAL,MAAAG,MAAA,EAAA,CAAA;YAAAH,MAAAM,MAAA,IAAA,CAAAN,MAAAG,MAAA,IAAA,WAAA,GAAAE,IAAAA,eAAA,EAAAL,MAAAM,MAAA,EAAA,CAAA;SAAA;;mDAMa"}
1
+ {"version":3,"sources":["renderSuggestionList.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { SuggestionListState, SuggestionListSlots } from './SuggestionList.types';\n\n/**\n * Render the final JSX of SuggestionList\n */\nexport const renderSuggestionList_unstable = (state: SuggestionListState) => {\n assertSlots<SuggestionListSlots>(state);\n\n return (\n <state.root>\n {state.root.children}\n {state.action && <state.action />}\n </state.root>\n );\n};\n"],"names":["assertSlots","state","root","children","action","_jsx"],"rangeMappings":";;;;;;;;;;;;;;;;;;","mappings":";;;;+BAUEA;;;eAAAA;;;4BATF;iCAE4B;AAO1BA,MAAAA,gCAAiCC,CAAAA;oCAEjC,EAAAA;;kBAEKA;YAAAA,MAAMC,IAAKC,CAAAA,QAAQ;YAAAF,MAAAG,MAAA,IAAA,WAAA,GAAAC,IAAAA,eAAA,EAAAJ,MAAAG,MAAA,EAAA,CAAA;SAAA"}
@@ -8,18 +8,13 @@ Object.defineProperty(exports, "useSuggestionList_unstable", {
8
8
  return useSuggestionList_unstable;
9
9
  }
10
10
  });
11
- const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
- const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
11
  const _reactcomponents = require("@fluentui/react-components");
14
- const _reacticons = require("@fluentui/react-icons");
15
12
  const useSuggestionList_unstable = (props, ref)=>{
16
- const { action, reload } = props;
17
- const ReloadIcon = (0, _reacticons.bundleIcon)(_reacticons.ArrowCounterclockwise16Filled, _reacticons.ArrowCounterclockwise16Regular);
13
+ const { action, horizontalAlignment = 'end' } = props;
18
14
  return {
15
+ horizontalAlignment,
19
16
  components: {
20
17
  root: 'div',
21
- reload: _reactcomponents.Button,
22
- reloadTooltip: _reactcomponents.Tooltip,
23
18
  action: 'span'
24
19
  },
25
20
  root: _reactcomponents.slot.always((0, _reactcomponents.getIntrinsicElementProps)('div', {
@@ -34,23 +29,6 @@ const useSuggestionList_unstable = (props, ref)=>{
34
29
  }), {
35
30
  elementType: 'div'
36
31
  }),
37
- reloadTooltip: _reactcomponents.slot.optional(props.reloadTooltip, {
38
- defaultProps: {
39
- relationship: 'label',
40
- content: 'Reload',
41
- withArrow: reload !== undefined
42
- },
43
- renderByDefault: true,
44
- elementType: _reactcomponents.Tooltip
45
- }),
46
- reload: _reactcomponents.slot.optional(reload, {
47
- defaultProps: {
48
- icon: /*#__PURE__*/ _react.createElement(ReloadIcon, null),
49
- size: 'small',
50
- appearance: 'transparent'
51
- },
52
- elementType: _reactcomponents.Button
53
- }),
54
32
  action: _reactcomponents.slot.optional(action, {
55
33
  elementType: 'span'
56
34
  })
@@ -1 +1 @@
1
- {"version":3,"sources":["useSuggestionList.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Button, Tooltip, getIntrinsicElementProps, slot, useArrowNavigationGroup } from '@fluentui/react-components';\nimport { ArrowCounterclockwise16Regular, ArrowCounterclockwise16Filled, bundleIcon } from '@fluentui/react-icons';\nimport type { SuggestionListProps, SuggestionListState, TooltipComponent } from './SuggestionList.types';\n\n// If you add JSX to this file, be sure to change the file type to .tsx\n\n/**\n * Create the state required to render SuggestionList.\n *\n * The returned state can be modified with hooks such as useSuggestionListStyles_unstable,\n * before being passed to renderSuggestionList_unstable.\n *\n * @param props - props from this instance of SuggestionList\n * @param ref - reference to root HTMLElement of SuggestionList\n */\nexport const useSuggestionList_unstable = (\n props: SuggestionListProps,\n ref: React.Ref<HTMLDivElement>,\n): SuggestionListState => {\n const { action, reload } = props;\n const ReloadIcon = bundleIcon(ArrowCounterclockwise16Filled, ArrowCounterclockwise16Regular);\n return {\n components: {\n root: 'div',\n reload: Button,\n reloadTooltip: Tooltip as TooltipComponent,\n action: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n role: 'toolbar',\n 'aria-label': 'suggestions',\n ...props,\n ...useArrowNavigationGroup({ axis: 'both', circular: true }),\n }),\n { elementType: 'div' },\n ),\n reloadTooltip: slot.optional(props.reloadTooltip, {\n defaultProps: {\n relationship: 'label',\n content: 'Reload',\n withArrow: reload !== undefined,\n },\n renderByDefault: true,\n elementType: Tooltip as TooltipComponent,\n }),\n reload: slot.optional(reload, {\n defaultProps: {\n icon: <ReloadIcon />,\n size: 'small',\n appearance: 'transparent',\n },\n elementType: Button,\n }),\n action: slot.optional(action, { elementType: 'span' }),\n };\n};\n"],"names":["action","props","components","Button","slot","always","ref","role","getIntrinsicElementProps","circular","useArrowNavigationGroup","elementType","reloadTooltip","relationship","withArrow","reload","undefined","renderByDefault","defaultProps","icon","appearance","size","optional"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAoBUA;;;eAAAA;;;;iEApBa;iCACkE;4BACC;AAkBxF,MAAQA,6BAAmBC,CAAAA,OAAAA;UAC3B,EACAD,MAAA,QACEE;uBAEUC,IAAAA,sBAAAA,EAAAA,yCAAAA,EAAAA,0CAAAA;;oBAERH;kBACF;oBACMI,uBAAKC;2BAEPC,wBAAAA;oBACAC;;mCAEA,CAAGN,MAAK,CAAAO,IAAAA,yCAAA,EAAA,OAAA;;;0BACmCC;oBAAiB;eAC9DC,IAAAA,wCACA,EAAA;sBAAEC;gBAAmBF,UAAA;cAEvBG;;yBAEIC;;uBAEAC,qBAAAA,CAAAA,QAAWC,CAAAA,MAAWC,aAAAA,EAAAA;0BACxB;8BACAC;yBACAN;gBACFG,WAAAC,WAAAC;;6BAEEE;yBACEC,wBAAAA;;qCAEAC,CAAAA,QAAAA,CAAAA,QAAY;0BACd;sBACAT,WAAaR,GAAAA,OAAAA,aAAAA,CAAAA,YAAAA;gBACfkB,MAAA;gBACArB,YAAQI;;yBAA4CD,uBAAA;QACtD;QACAH,QAAAI,qBAAA,CAAAkB,QAAA,CAAAtB,QAAA"}
1
+ {"version":3,"sources":["useSuggestionList.tsx"],"sourcesContent":["import { getIntrinsicElementProps, slot, useArrowNavigationGroup } from '@fluentui/react-components';\nimport type { SuggestionListProps, SuggestionListState } from './SuggestionList.types';\n\n// If you add JSX to this file, be sure to change the file type to .tsx\n\n/**\n * Create the state required to render SuggestionList.\n *\n * The returned state can be modified with hooks such as useSuggestionListStyles_unstable,\n * before being passed to renderSuggestionList_unstable.\n *\n * @param props - props from this instance of SuggestionList\n * @param ref - reference to root HTMLElement of SuggestionList\n */\nexport const useSuggestionList_unstable = (\n props: SuggestionListProps,\n ref: React.Ref<HTMLDivElement>,\n): SuggestionListState => {\n const { action, horizontalAlignment = 'end' } = props;\n return {\n horizontalAlignment,\n components: {\n root: 'div',\n action: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n role: 'toolbar',\n 'aria-label': 'suggestions',\n ...props,\n ...useArrowNavigationGroup({ axis: 'both', circular: true }),\n }),\n { elementType: 'div' },\n ),\n action: slot.optional(action, { elementType: 'span' }),\n };\n};\n"],"names":["action","props","ref","horizontalAlignment","slot","role","getIntrinsicElementProps","circular","useArrowNavigationGroup","elementType","optional"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAkBUA;;;eAAAA;;;iCAlB8D;AAkBtE,MAAQA,6BAA8B,CAAAC,OAAOC;UAC7C,QACEC,wBACY,KAAA;;;oBAINC;kBAEFF;oBACAG;;mCAEA,CAAGJ,MAAK,CAAAK,IAAAA,yCAAA,EAAA,OAAA;;;0BACmCC;oBAAiB;eAC9DC,IAAAA,wCACA,EAAA;sBAAEC;gBAAmBF,UAAA;cAEvBP;;yBAAoD;QACtD;QACAA,QAAAI,qBAAA,CAAAM,QAAA,CAAAV,QAAA"}
@@ -19,8 +19,6 @@ _export(exports, {
19
19
  const _reactcomponents = require("@fluentui/react-components");
20
20
  const suggestionListClassNames = {
21
21
  root: 'fai-SuggestionList',
22
- reload: 'fai-SuggestionList__reload',
23
- reloadTooltip: 'fai-SuggestionList__reloadTooltip',
24
22
  action: 'fai-SuggestionList__action'
25
23
  };
26
24
  /**
@@ -43,9 +41,8 @@ const suggestionListClassNames = {
43
41
  ],
44
42
  Beptln2: "fr3gje9"
45
43
  },
46
- reload: {
47
- Bf4jedk: "f79feoa",
48
- B2u0y6b: "f1cs043"
44
+ horizontalAlignmentStart: {
45
+ Brf1p80: "fbhxue7"
49
46
  },
50
47
  action: {
51
48
  Bf4jedk: "f79feoa",
@@ -75,6 +72,7 @@ const suggestionListClassNames = {
75
72
  }
76
73
  ],
77
74
  ".fr3gje9>:nth-last-of-type(2){max-width:calc(100% - var(--spacingHorizontalXXL) - var(--spacingVerticalS));}",
75
+ ".fbhxue7{justify-content:flex-start;}",
78
76
  ".f79feoa{min-width:var(--spacingHorizontalXXL);}",
79
77
  ".f1cs043{max-width:var(--spacingHorizontalXXL);}"
80
78
  ]
@@ -82,10 +80,7 @@ const suggestionListClassNames = {
82
80
  const useSuggestionListStyles_unstable = (state)=>{
83
81
  'use no memo';
84
82
  const styles = useStyles();
85
- state.root.className = (0, _reactcomponents.mergeClasses)(suggestionListClassNames.root, styles.root, state.root.className);
86
- if (state.reload) {
87
- state.reload.className = (0, _reactcomponents.mergeClasses)(suggestionListClassNames.reload, styles.reload, state.reload.className);
88
- }
83
+ state.root.className = (0, _reactcomponents.mergeClasses)(suggestionListClassNames.root, styles.root, state.horizontalAlignment === 'start' && styles.horizontalAlignmentStart, state.root.className);
89
84
  if (state.action) {
90
85
  state.action.className = (0, _reactcomponents.mergeClasses)(suggestionListClassNames.action, styles.action, state.action.className);
91
86
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["useSuggestionListStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, tokens } from '@fluentui/react-components';\nimport type { SuggestionListSlots, SuggestionListState } from './SuggestionList.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const suggestionListClassNames: SlotClassNames<SuggestionListSlots> = {\n root: 'fai-SuggestionList',\n reload: 'fai-SuggestionList__reload',\n reloadTooltip: 'fai-SuggestionList__reloadTooltip',\n action: 'fai-SuggestionList__action',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n flexWrap: 'wrap',\n justifyContent: 'flex-end',\n gap: tokens.spacingVerticalS,\n margin: `\n ${tokens.spacingVerticalNone}\n ${tokens.spacingHorizontalNone}\n ${tokens.spacingVerticalS}\n ${tokens.spacingHorizontalNone}\n `,\n '> :nth-last-of-type(2)': {\n maxWidth: `calc(100% - ${tokens.spacingHorizontalXXL} - ${tokens.spacingVerticalS})`,\n },\n },\n reload: {\n minWidth: tokens.spacingHorizontalXXL,\n maxWidth: tokens.spacingHorizontalXXL,\n },\n\n action: {\n minWidth: tokens.spacingHorizontalXXL,\n maxWidth: tokens.spacingHorizontalXXL,\n },\n\n // TODO add additional classes for different states and/or slots\n});\n\n/**\n * Apply styling to the SuggestionList slots based on the state\n */\nexport const useSuggestionListStyles_unstable = (state: SuggestionListState): SuggestionListState => {\n 'use no memo';\n\n const styles = useStyles();\n state.root.className = mergeClasses(suggestionListClassNames.root, styles.root, state.root.className);\n\n if (state.reload) {\n state.reload.className = mergeClasses(suggestionListClassNames.reload, styles.reload, state.reload.className);\n }\n\n if (state.action) {\n state.action.className = mergeClasses(suggestionListClassNames.action, styles.action, state.action.className);\n }\n\n return state;\n};\n"],"names":["suggestionListClassNames","useSuggestionListStyles_unstable","root","reload","reloadTooltip","action","__styles","display","flexWrap","justifyContent","tokens","margin","t21cq0","maxWidth","minWidth","d","state","p","useStyles"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIaA,wBAAAA;eAAAA;;IAsDXC,gCAAA;eAAAA;;;iCA1DuC;AAIlC,MAAMD,2BAAgE;UAC3EE;YACAC;mBACAC;YACAC;AACF;AAEA;;CAEC,SAECH,YAAMI,IAAAA,yBAAA,EAAA;UACJC;gBACAC;gBACAC;iBACKC;gBACLC;iBACID;gBACAA;gBACAA;gBACAA;QACJE,QAAC;iBACD;iBACEC;YAAAA;YAAW;SAAY;iBACzB;;YAEFV;iBACEW;iBACAD;;YAGFR;iBACES;iBACAD;;AAIJ,GAAA;IAEAE,GAAA;QAAA;QAAA;QAAA;QAAA;YAAA;YAAA;;YAEC;SACD;QAAA;YAAA;YAAiDC;gBAC/CC,GAAA,CAAA;;SAEA;QAAA;YAAA;YAAeC;gBACfF,GAAAA,CAAAA;;SAEA;QAAA;QAAkB;QAAA;KAAA;;AAMlB,MAAAf,mCAAAe,CAAAA"}
1
+ {"version":3,"sources":["useSuggestionListStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, tokens } from '@fluentui/react-components';\nimport type { SuggestionListSlots, SuggestionListState } from './SuggestionList.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const suggestionListClassNames: SlotClassNames<SuggestionListSlots> = {\n root: 'fai-SuggestionList',\n action: 'fai-SuggestionList__action',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n flexWrap: 'wrap',\n justifyContent: 'flex-end',\n gap: tokens.spacingVerticalS,\n margin: `\n ${tokens.spacingVerticalNone}\n ${tokens.spacingHorizontalNone}\n ${tokens.spacingVerticalS}\n ${tokens.spacingHorizontalNone}\n `,\n '> :nth-last-of-type(2)': {\n maxWidth: `calc(100% - ${tokens.spacingHorizontalXXL} - ${tokens.spacingVerticalS})`,\n },\n },\n horizontalAlignmentStart: {\n justifyContent: 'flex-start',\n },\n\n action: {\n minWidth: tokens.spacingHorizontalXXL,\n maxWidth: tokens.spacingHorizontalXXL,\n },\n\n // TODO add additional classes for different states and/or slots\n});\n\n/**\n * Apply styling to the SuggestionList slots based on the state\n */\nexport const useSuggestionListStyles_unstable = (state: SuggestionListState): SuggestionListState => {\n 'use no memo';\n\n const styles = useStyles();\n state.root.className = mergeClasses(\n suggestionListClassNames.root,\n styles.root,\n state.horizontalAlignment === 'start' && styles.horizontalAlignmentStart,\n state.root.className,\n );\n\n if (state.action) {\n state.action.className = mergeClasses(suggestionListClassNames.action, styles.action, state.action.className);\n }\n\n return state;\n};\n"],"names":["suggestionListClassNames","root","action","__styles","display","flexWrap","justifyContent","tokens","margin","t21cq0","maxWidth","horizontalAlignmentStart","minWidth","d","state","p","useStyles"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIaA,wBAAAA;eAAAA;;;;;;iCAJ4B;AAIlC,MAAMA,2BAAgE;UAC3EC;YACAC;AACF;AAEA;;CAEC,SAECD,YAAME,IAAAA,yBAAA,EAAA;UACJC;gBACAC;gBACAC;iBACKC;gBACLC;iBACID;gBACAA;gBACAA;gBACAA;QACJE,QAAC;iBACD;iBACEC;YAAAA;YAAW;SAAY;iBACzB;;8BAEFC;iBACEL;;YAGFJ;iBACEU;iBACAF;;AAIJ,GAAA;IAEAG,GAAA;QAAA;QAAA;QAAA;QAAA;YAAA;YAAA;;YAEC;SACD;QAAA;YAAA;YAAiDC;gBAC/CC,GAAA,CAAA;;SAEA;QAAA;YAAA;YAAeC;gBACfF,GAAAA,CAAAA;;SAOA;QAAA;QAAkB;QAAA;QAAA;KAAA"}
@@ -32,6 +32,9 @@ _export(exports, {
32
32
  },
33
33
  useSuggestionStyles_unstable: function() {
34
34
  return _Suggestion.useSuggestionStyles_unstable;
35
+ },
36
+ useSuggestion_unstable: function() {
37
+ return _Suggestion.useSuggestion_unstable;
35
38
  }
36
39
  });
37
40
  const _Suggestion = require("./Suggestion");
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export { Suggestion, suggestionClassNames, useSuggestionStyles_unstable } from './Suggestion';\nexport type { SuggestionListProps, SuggestionListSlots, SuggestionListState, TooltipComponent } from './SuggestionList';\nexport {\n SuggestionList,\n renderSuggestionList_unstable,\n suggestionListClassNames,\n useSuggestionListStyles_unstable,\n useSuggestionList_unstable,\n} from './SuggestionList';\n"],"names":["Suggestion","SuggestionList","renderSuggestionList_unstable","suggestionClassNames","suggestionListClassNames","useSuggestionListStyles_unstable","useSuggestionList_unstable","useSuggestionStyles_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,UAAU;eAAVA,sBAAU;;IAGjBC,cAAc;eAAdA,8BAAc;;IACdC,6BAA6B;eAA7BA,6CAA6B;;IAJVC,oBAAoB;eAApBA,gCAAoB;;IAKvCC,wBAAwB;eAAxBA,wCAAwB;;IACxBC,gCAAgC;eAAhCA,gDAAgC;;IAChCC,0BAA0B;eAA1BA,0CAA0B;;IAPeC,4BAA4B;eAA5BA,wCAA4B;;;4BAAQ;gCAQxE"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export type { SuggestionProps, SuggestionSlots, SuggestionState } from './Suggestion';\nexport { Suggestion, suggestionClassNames, useSuggestionStyles_unstable, useSuggestion_unstable } from './Suggestion';\nexport type { SuggestionListProps, SuggestionListSlots, SuggestionListState, TooltipComponent } from './SuggestionList';\nexport {\n SuggestionList,\n renderSuggestionList_unstable,\n suggestionListClassNames,\n useSuggestionListStyles_unstable,\n useSuggestionList_unstable,\n} from './SuggestionList';\n"],"names":["Suggestion","SuggestionList","renderSuggestionList_unstable","suggestionClassNames","suggestionListClassNames","useSuggestionListStyles_unstable","useSuggestionList_unstable","useSuggestionStyles_unstable","useSuggestion_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IACSA,UAAU;eAAVA,sBAAU;;IAGjBC,cAAc;eAAdA,8BAAc;;IACdC,6BAA6B;eAA7BA,6CAA6B;;IAJVC,oBAAoB;eAApBA,gCAAoB;;IAKvCC,wBAAwB;eAAxBA,wCAAwB;;IACxBC,gCAAgC;eAAhCA,gDAAgC;;IAChCC,0BAA0B;eAA1BA,0CAA0B;;IAPeC,4BAA4B;eAA5BA,wCAA4B;;IAAEC,sBAAsB;eAAtBA,kCAAsB;;;4BAAQ;gCAQhG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui-copilot/react-suggestions",
3
- "version": "0.9.3",
3
+ "version": "0.10.0",
4
4
  "description": "A Fluent AI package",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",