@fluentui-copilot/react-suggestions 0.7.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +31 -1
- package/CHANGELOG.md +20 -2
- package/dist/index.d.ts +1 -1
- package/lib/Suggestion.js.map +1 -1
- package/lib/SuggestionList.js.map +1 -1
- package/lib/components/Suggestion/Suggestion.js.map +1 -1
- package/lib/components/Suggestion/index.js.map +1 -1
- package/lib/components/Suggestion/useSuggestionStyles.js.map +1 -1
- package/lib/components/SuggestionList/SuggestionList.js.map +1 -1
- package/lib/components/SuggestionList/SuggestionList.types.js +3 -1
- package/lib/components/SuggestionList/SuggestionList.types.js.map +1 -1
- package/lib/components/SuggestionList/index.js.map +1 -1
- package/lib/components/SuggestionList/renderSuggestionList.js.map +1 -1
- package/lib/components/SuggestionList/useSuggestionList.js +2 -2
- package/lib/components/SuggestionList/useSuggestionList.js.map +1 -1
- package/lib/components/SuggestionList/useSuggestionListStyles.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib-commonjs/Suggestion.js.map +1 -1
- package/lib-commonjs/SuggestionList.js.map +1 -1
- package/lib-commonjs/components/Suggestion/Suggestion.js.map +1 -1
- package/lib-commonjs/components/Suggestion/index.js.map +1 -1
- package/lib-commonjs/components/Suggestion/useSuggestionStyles.js.map +1 -1
- package/lib-commonjs/components/SuggestionList/SuggestionList.js.map +1 -1
- package/lib-commonjs/components/SuggestionList/SuggestionList.types.js +3 -1
- package/lib-commonjs/components/SuggestionList/SuggestionList.types.js.map +1 -1
- package/lib-commonjs/components/SuggestionList/index.js.map +1 -1
- package/lib-commonjs/components/SuggestionList/renderSuggestionList.js.map +1 -1
- package/lib-commonjs/components/SuggestionList/useSuggestionList.js +1 -1
- package/lib-commonjs/components/SuggestionList/useSuggestionList.js.map +1 -1
- package/lib-commonjs/components/SuggestionList/useSuggestionListStyles.js.map +1 -1
- package/lib-commonjs/index.js +6 -6
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +8 -8
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,37 @@
|
|
|
2
2
|
"name": "@fluentui-copilot/react-suggestions",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Tue, 30 Apr 2024 20:54:48 GMT",
|
|
6
|
+
"tag": "@fluentui-copilot/react-suggestions_v0.8.1",
|
|
7
|
+
"version": "0.8.1",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "sarah.higley@microsoft.com",
|
|
12
|
+
"package": "@fluentui-copilot/react-suggestions",
|
|
13
|
+
"commit": "66eba4eb0956384ecc14b2a40c5fa722680f79d8",
|
|
14
|
+
"comment": "chore: bump @fluentui/react-components to latest, 9.49.0 "
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Wed, 10 Apr 2024 23:07:50 GMT",
|
|
21
|
+
"tag": "@fluentui-copilot/react-suggestions_v0.8.0",
|
|
22
|
+
"version": "0.8.0",
|
|
23
|
+
"comments": {
|
|
24
|
+
"minor": [
|
|
25
|
+
{
|
|
26
|
+
"author": "Humberto.Morimoto@microsoft.com",
|
|
27
|
+
"package": "@fluentui-copilot/react-suggestions",
|
|
28
|
+
"commit": "2afa98912cd99ed6f604c582caee4d49d1ba895d",
|
|
29
|
+
"comment": "fix: Replace usage of deprecated getNativeElementProps with getIntrinsicElementProps."
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"date": "Wed, 13 Mar 2024 18:01:51 GMT",
|
|
6
36
|
"tag": "@fluentui-copilot/react-suggestions_v0.7.0",
|
|
7
37
|
"version": "0.7.0",
|
|
8
38
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,30 @@
|
|
|
1
1
|
# Change Log - @fluentui-copilot/react-suggestions
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Tue, 30 Apr 2024 20:54:48 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [0.8.1](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-suggestions_v0.8.1)
|
|
8
|
+
|
|
9
|
+
Tue, 30 Apr 2024 20:54:48 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-suggestions_v0.8.0..@fluentui-copilot/react-suggestions_v0.8.1)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- chore: bump @fluentui/react-components to latest, 9.49.0 ([PR #1580](https://github.com/microsoft/fluentai/pull/1580) by sarah.higley@microsoft.com)
|
|
15
|
+
|
|
16
|
+
## [0.8.0](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-suggestions_v0.8.0)
|
|
17
|
+
|
|
18
|
+
Wed, 10 Apr 2024 23:07:50 GMT
|
|
19
|
+
[Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-suggestions_v0.7.0..@fluentui-copilot/react-suggestions_v0.8.0)
|
|
20
|
+
|
|
21
|
+
### Minor changes
|
|
22
|
+
|
|
23
|
+
- fix: Replace usage of deprecated getNativeElementProps with getIntrinsicElementProps. ([PR #1512](https://github.com/microsoft/fluentai/pull/1512) by Humberto.Morimoto@microsoft.com)
|
|
24
|
+
|
|
7
25
|
## [0.7.0](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-suggestions_v0.7.0)
|
|
8
26
|
|
|
9
|
-
Wed, 13 Mar 2024 18:
|
|
27
|
+
Wed, 13 Mar 2024 18:01:51 GMT
|
|
10
28
|
[Compare changes](https://github.com/microsoft/fluentai/compare/@fluentai/suggestions_v0.6.1..@fluentui-copilot/react-suggestions_v0.7.0)
|
|
11
29
|
|
|
12
30
|
### Minor changes
|
package/dist/index.d.ts
CHANGED
|
@@ -61,7 +61,7 @@ export declare type TooltipComponent = React.FunctionComponent<Partial<TooltipPr
|
|
|
61
61
|
* @param props - props from this instance of SuggestionList
|
|
62
62
|
* @param ref - reference to root HTMLElement of SuggestionList
|
|
63
63
|
*/
|
|
64
|
-
export declare const useSuggestionList_unstable: (props: SuggestionListProps, ref: React_2.Ref<
|
|
64
|
+
export declare const useSuggestionList_unstable: (props: SuggestionListProps, ref: React_2.Ref<HTMLDivElement>) => SuggestionListState;
|
|
65
65
|
|
|
66
66
|
/**
|
|
67
67
|
* Apply styling to the SuggestionList slots based on the state
|
package/lib/Suggestion.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Suggestion.ts"],"sourcesContent":["export * from './components/Suggestion/index';\n"],"names":[],"mappings":"AAAA,cAAc,gCAAgC"}
|
|
1
|
+
{"version":3,"sources":["Suggestion.ts"],"sourcesContent":["export * from './components/Suggestion/index';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,gCAAgC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["SuggestionList.ts"],"sourcesContent":["export * from './components/SuggestionList/index';\n"],"names":[],"mappings":"AAAA,cAAc,oCAAoC"}
|
|
1
|
+
{"version":3,"sources":["SuggestionList.ts"],"sourcesContent":["export * from './components/SuggestionList/index';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,oCAAoC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Suggestion.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useSuggestionStyles_unstable } from './useSuggestionStyles';\nimport type { ButtonProps, ForwardRefComponent } from '@fluentui/react-components';\nimport { renderButton_unstable, useButtonStyles_unstable, useButton_unstable } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\n// Suggestion component - TODO: add more docs\nexport const Suggestion: ForwardRefComponent<ButtonProps> = React.forwardRef((props, ref) => {\n const state = useButton_unstable(props, ref);\n state.appearance = props.appearance || 'outline';\n useButtonStyles_unstable(state);\n useSuggestionStyles_unstable(state);\n useCustomStyleHook('useSuggestionStyles')(state);\n\n return renderButton_unstable(state);\n});\n\nSuggestion.displayName = 'Suggestion';\n"],"names":["React","useSuggestionStyles_unstable","renderButton_unstable","useButtonStyles_unstable","useButton_unstable","useCustomStyleHook","Suggestion","forwardRef","props","ref","state","appearance","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,4BAA4B,QAAQ,wBAAwB;AAErE,SAASC,qBAAqB,EAAEC,wBAAwB,EAAEC,kBAAkB,QAAQ,6BAA6B;AACjH,SAASC,kBAAkB,QAAQ,mCAAmC;AAEtE,6CAA6C;AAC7C,OAAO,MAAMC,2BAA+CN,MAAMO,UAAU,CAAC,CAACC,OAAOC;IACnF,MAAMC,QAAQN,mBAAmBI,OAAOC;IACxCC,MAAMC,UAAU,GAAGH,MAAMG,UAAU,IAAI;IACvCR,yBAAyBO;IACzBT,6BAA6BS;IAC7BL,mBAAmB,uBAAuBK;IAE1C,OAAOR,sBAAsBQ;AAC/B,GAAG;AAEHJ,WAAWM,WAAW,GAAG"}
|
|
1
|
+
{"version":3,"sources":["Suggestion.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useSuggestionStyles_unstable } from './useSuggestionStyles';\nimport type { ButtonProps, ForwardRefComponent } from '@fluentui/react-components';\nimport { renderButton_unstable, useButtonStyles_unstable, useButton_unstable } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\n// Suggestion component - TODO: add more docs\nexport const Suggestion: ForwardRefComponent<ButtonProps> = React.forwardRef((props, ref) => {\n const state = useButton_unstable(props, ref);\n state.appearance = props.appearance || 'outline';\n useButtonStyles_unstable(state);\n useSuggestionStyles_unstable(state);\n useCustomStyleHook('useSuggestionStyles')(state);\n\n return renderButton_unstable(state);\n});\n\nSuggestion.displayName = 'Suggestion';\n"],"names":["React","useSuggestionStyles_unstable","renderButton_unstable","useButtonStyles_unstable","useButton_unstable","useCustomStyleHook","Suggestion","forwardRef","props","ref","state","appearance","displayName"],"rangeMappings":";;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,4BAA4B,QAAQ,wBAAwB;AAErE,SAASC,qBAAqB,EAAEC,wBAAwB,EAAEC,kBAAkB,QAAQ,6BAA6B;AACjH,SAASC,kBAAkB,QAAQ,mCAAmC;AAEtE,6CAA6C;AAC7C,OAAO,MAAMC,2BAA+CN,MAAMO,UAAU,CAAC,CAACC,OAAOC;IACnF,MAAMC,QAAQN,mBAAmBI,OAAOC;IACxCC,MAAMC,UAAU,GAAGH,MAAMG,UAAU,IAAI;IACvCR,yBAAyBO;IACzBT,6BAA6BS;IAC7BL,mBAAmB,uBAAuBK;IAE1C,OAAOR,sBAAsBQ;AAC/B,GAAG;AAEHJ,WAAWM,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './Suggestion';\nexport * from './useSuggestionStyles';\n"],"names":[],"mappings":"AAAA,cAAc,eAAe;AAC7B,cAAc,wBAAwB"}
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './Suggestion';\nexport * from './useSuggestionStyles';\n"],"names":[],"rangeMappings":";","mappings":"AAAA,cAAc,eAAe;AAC7B,cAAc,wBAAwB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useSuggestionStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands, tokens, typographyStyles } from '@fluentui/react-components';\nimport type { SlotClassNames, ButtonSlots, ButtonState } from '@fluentui/react-components';\n\nexport const suggestionClassNames: SlotClassNames<ButtonSlots> = {\n root: 'fai-Suggestion',\n icon: 'fai-Suggestion__icon',\n};\n\nconst useSuggestionStylesStyles = makeStyles({\n root: {\n ...typographyStyles.caption1,\n // Brand/M365/140\n ...shorthands.border('1px', 'solid', tokens.colorBrandStroke2),\n ...shorthands.borderRadius(tokens.borderRadiusXLarge),\n ...shorthands.padding(tokens.spacingVerticalXS, tokens.spacingVerticalS),\n color: tokens.colorNeutralForeground2,\n textAlign: 'start',\n // remove this MQ once https://github.com/microsoft/fluentui/issues/28552 is resolved\n // media queries have zero specificity\n },\n enabled: {\n '@media (forced-colors: none)': {\n ':hover': {\n // Brand/M365/120\n ...shorthands.borderColor(tokens.colorBrandStroke2Hover),\n color: tokens.colorBrandForeground2Hover,\n backgroundColor: tokens.colorBrandBackground2Hover,\n },\n // Figma states 'on hover and pressed state'\n ':active:hover': {\n // Brand/M365/120\n ...shorthands.borderColor(tokens.colorBrandStroke2Pressed),\n color: tokens.colorBrandForeground2Pressed,\n backgroundColor: tokens.colorBrandBackground2Pressed,\n },\n },\n },\n});\n\nexport const useSuggestionStyles_unstable = (state: ButtonState): ButtonState => {\n const styles = useSuggestionStylesStyles();\n state.root.className = mergeClasses(\n suggestionClassNames.root,\n styles.root,\n !state.disabled && styles.enabled,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","shorthands","tokens","typographyStyles","suggestionClassNames","root","icon","useSuggestionStylesStyles","caption1","border","colorBrandStroke2","borderRadius","borderRadiusXLarge","padding","spacingVerticalXS","spacingVerticalS","color","colorNeutralForeground2","textAlign","enabled","borderColor","colorBrandStroke2Hover","colorBrandForeground2Hover","backgroundColor","colorBrandBackground2Hover","colorBrandStroke2Pressed","colorBrandForeground2Pressed","colorBrandBackground2Pressed","useSuggestionStyles_unstable","state","styles","className","disabled"],"mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,EAAEC,UAAU,EAAEC,MAAM,EAAEC,gBAAgB,QAAQ,6BAA6B;AAG5G,OAAO,MAAMC,uBAAoD;IAC/DC,MAAM;IACNC,MAAM;AACR,EAAE;AAEF,MAAMC,4BAA4BR,WAAW;IAC3CM,MAAM;QACJ,GAAGF,iBAAiBK,QAAQ;QAC5B,kBAAkB;QAClB,GAAGP,WAAWQ,MAAM,CAAC,OAAO,SAASP,OAAOQ,iBAAiB,CAAC;QAC9D,GAAGT,WAAWU,YAAY,CAACT,OAAOU,kBAAkB,CAAC;QACrD,GAAGX,WAAWY,OAAO,CAACX,OAAOY,iBAAiB,EAAEZ,OAAOa,gBAAgB,CAAC;QACxEC,OAAOd,OAAOe,uBAAuB;QACrCC,WAAW;IAGb;IACAC,SAAS;QACP,gCAAgC;YAC9B,UAAU;gBACR,kBAAkB;gBAClB,GAAGlB,WAAWmB,WAAW,CAAClB,OAAOmB,sBAAsB,CAAC;gBACxDL,OAAOd,OAAOoB,0BAA0B;gBACxCC,iBAAiBrB,OAAOsB,0BAA0B;YACpD;YACA,4CAA4C;YAC5C,iBAAiB;gBACf,kBAAkB;gBAClB,GAAGvB,WAAWmB,WAAW,CAAClB,OAAOuB,wBAAwB,CAAC;gBAC1DT,OAAOd,OAAOwB,4BAA4B;gBAC1CH,iBAAiBrB,OAAOyB,4BAA4B;YACtD;QACF;IACF;AACF;AAEA,OAAO,MAAMC,+BAA+B,CAACC;IAC3C,MAAMC,SAASvB;IACfsB,MAAMxB,IAAI,CAAC0B,SAAS,GAAG/B,aACrBI,qBAAqBC,IAAI,EACzByB,OAAOzB,IAAI,EACX,CAACwB,MAAMG,QAAQ,IAAIF,OAAOX,OAAO,EACjCU,MAAMxB,IAAI,CAAC0B,SAAS;IAGtB,OAAOF;AACT,EAAE"}
|
|
1
|
+
{"version":3,"sources":["useSuggestionStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands, tokens, typographyStyles } from '@fluentui/react-components';\nimport type { SlotClassNames, ButtonSlots, ButtonState } from '@fluentui/react-components';\n\nexport const suggestionClassNames: SlotClassNames<ButtonSlots> = {\n root: 'fai-Suggestion',\n icon: 'fai-Suggestion__icon',\n};\n\nconst useSuggestionStylesStyles = makeStyles({\n root: {\n ...typographyStyles.caption1,\n // Brand/M365/140\n ...shorthands.border('1px', 'solid', tokens.colorBrandStroke2),\n ...shorthands.borderRadius(tokens.borderRadiusXLarge),\n ...shorthands.padding(tokens.spacingVerticalXS, tokens.spacingVerticalS),\n color: tokens.colorNeutralForeground2,\n textAlign: 'start',\n // remove this MQ once https://github.com/microsoft/fluentui/issues/28552 is resolved\n // media queries have zero specificity\n },\n enabled: {\n '@media (forced-colors: none)': {\n ':hover': {\n // Brand/M365/120\n ...shorthands.borderColor(tokens.colorBrandStroke2Hover),\n color: tokens.colorBrandForeground2Hover,\n backgroundColor: tokens.colorBrandBackground2Hover,\n },\n // Figma states 'on hover and pressed state'\n ':active:hover': {\n // Brand/M365/120\n ...shorthands.borderColor(tokens.colorBrandStroke2Pressed),\n color: tokens.colorBrandForeground2Pressed,\n backgroundColor: tokens.colorBrandBackground2Pressed,\n },\n },\n },\n});\n\nexport const useSuggestionStyles_unstable = (state: ButtonState): ButtonState => {\n const styles = useSuggestionStylesStyles();\n state.root.className = mergeClasses(\n suggestionClassNames.root,\n styles.root,\n !state.disabled && styles.enabled,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","shorthands","tokens","typographyStyles","suggestionClassNames","root","icon","useSuggestionStylesStyles","caption1","border","colorBrandStroke2","borderRadius","borderRadiusXLarge","padding","spacingVerticalXS","spacingVerticalS","color","colorNeutralForeground2","textAlign","enabled","borderColor","colorBrandStroke2Hover","colorBrandForeground2Hover","backgroundColor","colorBrandBackground2Hover","colorBrandStroke2Pressed","colorBrandForeground2Pressed","colorBrandBackground2Pressed","useSuggestionStyles_unstable","state","styles","className","disabled"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,EAAEC,UAAU,EAAEC,MAAM,EAAEC,gBAAgB,QAAQ,6BAA6B;AAG5G,OAAO,MAAMC,uBAAoD;IAC/DC,MAAM;IACNC,MAAM;AACR,EAAE;AAEF,MAAMC,4BAA4BR,WAAW;IAC3CM,MAAM;QACJ,GAAGF,iBAAiBK,QAAQ;QAC5B,kBAAkB;QAClB,GAAGP,WAAWQ,MAAM,CAAC,OAAO,SAASP,OAAOQ,iBAAiB,CAAC;QAC9D,GAAGT,WAAWU,YAAY,CAACT,OAAOU,kBAAkB,CAAC;QACrD,GAAGX,WAAWY,OAAO,CAACX,OAAOY,iBAAiB,EAAEZ,OAAOa,gBAAgB,CAAC;QACxEC,OAAOd,OAAOe,uBAAuB;QACrCC,WAAW;IAGb;IACAC,SAAS;QACP,gCAAgC;YAC9B,UAAU;gBACR,kBAAkB;gBAClB,GAAGlB,WAAWmB,WAAW,CAAClB,OAAOmB,sBAAsB,CAAC;gBACxDL,OAAOd,OAAOoB,0BAA0B;gBACxCC,iBAAiBrB,OAAOsB,0BAA0B;YACpD;YACA,4CAA4C;YAC5C,iBAAiB;gBACf,kBAAkB;gBAClB,GAAGvB,WAAWmB,WAAW,CAAClB,OAAOuB,wBAAwB,CAAC;gBAC1DT,OAAOd,OAAOwB,4BAA4B;gBAC1CH,iBAAiBrB,OAAOyB,4BAA4B;YACtD;QACF;IACF;AACF;AAEA,OAAO,MAAMC,+BAA+B,CAACC;IAC3C,MAAMC,SAASvB;IACfsB,MAAMxB,IAAI,CAAC0B,SAAS,GAAG/B,aACrBI,qBAAqBC,IAAI,EACzByB,OAAOzB,IAAI,EACX,CAACwB,MAAMG,QAAQ,IAAIF,OAAOX,OAAO,EACjCU,MAAMxB,IAAI,CAAC0B,SAAS;IAGtB,OAAOF;AACT,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["SuggestionList.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useSuggestionList_unstable } from './useSuggestionList';\nimport { renderSuggestionList_unstable } from './renderSuggestionList';\nimport { useSuggestionListStyles_unstable } from './useSuggestionListStyles';\nimport type { SuggestionListProps } from './SuggestionList.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\n// SuggestionList component - TODO: add more docs\nexport const SuggestionList: ForwardRefComponent<SuggestionListProps> = React.forwardRef((props, ref) => {\n const state = useSuggestionList_unstable(props, ref);\n\n useSuggestionListStyles_unstable(state);\n useCustomStyleHook('useSuggestionListStyles')(state);\n\n return renderSuggestionList_unstable(state);\n});\n\nSuggestionList.displayName = 'SuggestionList';\n"],"names":["React","useSuggestionList_unstable","renderSuggestionList_unstable","useSuggestionListStyles_unstable","useCustomStyleHook","SuggestionList","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,0BAA0B,QAAQ,sBAAsB;AACjE,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,gCAAgC,QAAQ,4BAA4B;AAG7E,SAASC,kBAAkB,QAAQ,mCAAmC;AAEtE,iDAAiD;AACjD,OAAO,MAAMC,+BAA2DL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IAC/F,MAAMC,QAAQR,2BAA2BM,OAAOC;IAEhDL,iCAAiCM;IACjCL,mBAAmB,2BAA2BK;IAE9C,OAAOP,8BAA8BO;AACvC,GAAG;AAEHJ,eAAeK,WAAW,GAAG"}
|
|
1
|
+
{"version":3,"sources":["SuggestionList.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useSuggestionList_unstable } from './useSuggestionList';\nimport { renderSuggestionList_unstable } from './renderSuggestionList';\nimport { useSuggestionListStyles_unstable } from './useSuggestionListStyles';\nimport type { SuggestionListProps } from './SuggestionList.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\n// SuggestionList component - TODO: add more docs\nexport const SuggestionList: ForwardRefComponent<SuggestionListProps> = React.forwardRef((props, ref) => {\n const state = useSuggestionList_unstable(props, ref);\n\n useSuggestionListStyles_unstable(state);\n useCustomStyleHook('useSuggestionListStyles')(state);\n\n return renderSuggestionList_unstable(state);\n});\n\nSuggestionList.displayName = 'SuggestionList';\n"],"names":["React","useSuggestionList_unstable","renderSuggestionList_unstable","useSuggestionListStyles_unstable","useCustomStyleHook","SuggestionList","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,0BAA0B,QAAQ,sBAAsB;AACjE,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,gCAAgC,QAAQ,4BAA4B;AAG7E,SAASC,kBAAkB,QAAQ,mCAAmC;AAEtE,iDAAiD;AACjD,OAAO,MAAMC,+BAA2DL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IAC/F,MAAMC,QAAQR,2BAA2BM,OAAOC;IAEhDL,iCAAiCM;IACjCL,mBAAmB,2BAA2BK;IAE9C,OAAOP,8BAA8BO;AACvC,GAAG;AAEHJ,eAAeK,WAAW,GAAG"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
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.
|
|
2
4
|
// & Required<Pick<SuggestionListProps, 'propName'>>
|
|
3
5
|
//# 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":[],"mappings":"
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './SuggestionList';\nexport * from './SuggestionList.types';\nexport * from './renderSuggestionList';\nexport * from './useSuggestionList';\nexport * from './useSuggestionListStyles';\n"],"names":[],"mappings":"AAAA,cAAc,mBAAmB;AACjC,cAAc,yBAAyB;AACvC,cAAc,yBAAyB;AACvC,cAAc,sBAAsB;AACpC,cAAc,4BAA4B"}
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './SuggestionList';\nexport * from './SuggestionList.types';\nexport * from './renderSuggestionList';\nexport * from './useSuggestionList';\nexport * from './useSuggestionListStyles';\n"],"names":[],"rangeMappings":";;;;","mappings":"AAAA,cAAc,mBAAmB;AACjC,cAAc,yBAAyB;AACvC,cAAc,yBAAyB;AACvC,cAAc,sBAAsB;AACpC,cAAc,4BAA4B"}
|
|
@@ -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"],"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\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,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Button, Tooltip,
|
|
2
|
+
import { Button, Tooltip, getIntrinsicElementProps, slot, useArrowNavigationGroup } from '@fluentui/react-components';
|
|
3
3
|
import { ArrowCounterclockwise16Regular, ArrowCounterclockwise16Filled, bundleIcon } from '@fluentui/react-icons';
|
|
4
4
|
// If you add JSX to this file, be sure to change the file type to .tsx
|
|
5
5
|
/**
|
|
@@ -24,7 +24,7 @@ export const useSuggestionList_unstable = (props, ref) => {
|
|
|
24
24
|
reloadTooltip: Tooltip,
|
|
25
25
|
action: 'span'
|
|
26
26
|
},
|
|
27
|
-
root: slot.always(
|
|
27
|
+
root: slot.always(getIntrinsicElementProps('div', {
|
|
28
28
|
ref,
|
|
29
29
|
role: 'toolbar',
|
|
30
30
|
'aria-label': 'suggestions',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useSuggestionList.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Button, Tooltip,
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useSuggestionListStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands, 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 ...shorthands.gap(tokens.spacingVerticalS),\n ...shorthands.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 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","shorthands","tokens","suggestionListClassNames","root","reload","reloadTooltip","action","useStyles","display","flexWrap","justifyContent","gap","spacingVerticalS","margin","spacingVerticalNone","spacingHorizontalNone","maxWidth","spacingHorizontalXXL","minWidth","useSuggestionListStyles_unstable","state","styles","className"],"mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,EAAEC,UAAU,EAAEC,MAAM,QAAQ,6BAA6B;AAI1F,OAAO,MAAMC,2BAAgE;IAC3EC,MAAM;IACNC,QAAQ;IACRC,eAAe;IACfC,QAAQ;AACV,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYT,WAAW;IAC3BK,MAAM;QACJK,SAAS;QACTC,UAAU;QACVC,gBAAgB;QAChB,GAAGV,WAAWW,GAAG,CAACV,OAAOW,gBAAgB,CAAC;QAC1C,GAAGZ,WAAWa,MAAM,CAClBZ,OAAOa,mBAAmB,EAC1Bb,OAAOc,qBAAqB,EAC5Bd,OAAOW,gBAAgB,EACvBX,OAAOc,qBAAqB,CAC7B;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,MAAMC,SAASd;IACfa,MAAMjB,IAAI,CAACmB,SAAS,GAAGvB,aAAaG,yBAAyBC,IAAI,EAAEkB,OAAOlB,IAAI,EAAEiB,MAAMjB,IAAI,CAACmB,SAAS;IAEpG,IAAIF,MAAMhB,MAAM,EAAE;QAChBgB,MAAMhB,MAAM,CAACkB,SAAS,GAAGvB,aAAaG,yBAAyBE,MAAM,EAAEiB,OAAOjB,MAAM,EAAEgB,MAAMhB,MAAM,CAACkB,SAAS;IAC9G;IAEA,IAAIF,MAAMd,MAAM,EAAE;QAChBc,MAAMd,MAAM,CAACgB,SAAS,GAAGvB,aAAaG,yBAAyBI,MAAM,EAAEe,OAAOf,MAAM,EAAEc,MAAMd,MAAM,CAACgB,SAAS;IAC9G;IAEA,OAAOF;AACT,EAAE"}
|
|
1
|
+
{"version":3,"sources":["useSuggestionListStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands, 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 ...shorthands.gap(tokens.spacingVerticalS),\n ...shorthands.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 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","shorthands","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,UAAU,EAAEC,MAAM,QAAQ,6BAA6B;AAI1F,OAAO,MAAMC,2BAAgE;IAC3EC,MAAM;IACNC,QAAQ;IACRC,eAAe;IACfC,QAAQ;AACV,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYT,WAAW;IAC3BK,MAAM;QACJK,SAAS;QACTC,UAAU;QACVC,gBAAgB;QAChB,GAAGV,WAAWW,GAAG,CAACV,OAAOW,gBAAgB,CAAC;QAC1C,GAAGZ,WAAWa,MAAM,CAClBZ,OAAOa,mBAAmB,EAC1Bb,OAAOc,qBAAqB,EAC5Bd,OAAOW,gBAAgB,EACvBX,OAAOc,qBAAqB,CAC7B;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,MAAMC,SAASd;IACfa,MAAMjB,IAAI,CAACmB,SAAS,GAAGvB,aAAaG,yBAAyBC,IAAI,EAAEkB,OAAOlB,IAAI,EAAEiB,MAAMjB,IAAI,CAACmB,SAAS;IAEpG,IAAIF,MAAMhB,MAAM,EAAE;QAChBgB,MAAMhB,MAAM,CAACkB,SAAS,GAAGvB,aAAaG,yBAAyBE,MAAM,EAAEiB,OAAOjB,MAAM,EAAEgB,MAAMhB,MAAM,CAACkB,SAAS;IAC9G;IAEA,IAAIF,MAAMd,MAAM,EAAE;QAChBc,MAAMd,MAAM,CAACgB,SAAS,GAAGvB,aAAaG,yBAAyBI,MAAM,EAAEe,OAAOf,MAAM,EAAEc,MAAMd,MAAM,CAACgB,SAAS;IAC9G;IAEA,OAAOF;AACT,EAAE"}
|
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"],"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 { 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 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Suggestion.
|
|
1
|
+
{"version":3,"sources":["Suggestion.ts"],"sourcesContent":["export * from './components/Suggestion/index';\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;uBAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["SuggestionList.
|
|
1
|
+
{"version":3,"sources":["SuggestionList.ts"],"sourcesContent":["export * from './components/SuggestionList/index';\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;uBAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Suggestion.
|
|
1
|
+
{"version":3,"sources":["Suggestion.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useSuggestionStyles_unstable } from './useSuggestionStyles';\nimport type { ButtonProps, ForwardRefComponent } from '@fluentui/react-components';\nimport { renderButton_unstable, useButtonStyles_unstable, useButton_unstable } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\n// Suggestion component - TODO: add more docs\nexport const Suggestion: ForwardRefComponent<ButtonProps> = React.forwardRef((props, ref) => {\n const state = useButton_unstable(props, ref);\n state.appearance = props.appearance || 'outline';\n useButtonStyles_unstable(state);\n useSuggestionStyles_unstable(state);\n useCustomStyleHook('useSuggestionStyles')(state);\n\n return renderButton_unstable(state);\n});\n\nSuggestion.displayName = 'Suggestion';\n"],"names":["Suggestion","React","forwardRef","props","state","useButton_unstable","appearance","useButtonStyles_unstable","useSuggestionStyles_unstable","useCustomStyleHook","renderButton_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAOaA;;;eAAAA;;;;iEAPU;qCACsB;iCAEuC;+BACjD;AAG5B,MAAMA,aAAAA,WAAAA,GAAAA,OAA+CC,UAAMC,CAAU,CAACC,OAACA;UAC5EC,QAAMA,IAAAA,mCAAQC,EAAAA,OAAmBF;UACjCC,UAAME,GAAUH,MAAGA,UAAMG,IAAU;iDACnCC,EAAAA;yDACAC,EAAAA;yCACAC,EAAAA,uBAAmBL;WAEnBM,IAAAA,sCAAOA,EAAAA;AACT;AAEAV,WAAWW,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './Suggestion';\nexport * from './useSuggestionStyles';\n"],"names":[],"rangeMappings":";;;;;;","mappings":";;;;;uBAAc;uBACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useSuggestionStyles.
|
|
1
|
+
{"version":3,"sources":["useSuggestionStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands, tokens, typographyStyles } from '@fluentui/react-components';\nimport type { SlotClassNames, ButtonSlots, ButtonState } from '@fluentui/react-components';\n\nexport const suggestionClassNames: SlotClassNames<ButtonSlots> = {\n root: 'fai-Suggestion',\n icon: 'fai-Suggestion__icon',\n};\n\nconst useSuggestionStylesStyles = makeStyles({\n root: {\n ...typographyStyles.caption1,\n // Brand/M365/140\n ...shorthands.border('1px', 'solid', tokens.colorBrandStroke2),\n ...shorthands.borderRadius(tokens.borderRadiusXLarge),\n ...shorthands.padding(tokens.spacingVerticalXS, tokens.spacingVerticalS),\n color: tokens.colorNeutralForeground2,\n textAlign: 'start',\n // remove this MQ once https://github.com/microsoft/fluentui/issues/28552 is resolved\n // media queries have zero specificity\n },\n enabled: {\n '@media (forced-colors: none)': {\n ':hover': {\n // Brand/M365/120\n ...shorthands.borderColor(tokens.colorBrandStroke2Hover),\n color: tokens.colorBrandForeground2Hover,\n backgroundColor: tokens.colorBrandBackground2Hover,\n },\n // Figma states 'on hover and pressed state'\n ':active:hover': {\n // Brand/M365/120\n ...shorthands.borderColor(tokens.colorBrandStroke2Pressed),\n color: tokens.colorBrandForeground2Pressed,\n backgroundColor: tokens.colorBrandBackground2Pressed,\n },\n },\n },\n});\n\nexport const useSuggestionStyles_unstable = (state: ButtonState): ButtonState => {\n const styles = useSuggestionStylesStyles();\n state.root.className = mergeClasses(\n suggestionClassNames.root,\n styles.root,\n !state.disabled && styles.enabled,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["suggestionClassNames","root","icon","useSuggestionStylesStyles","makeStyles","typographyStyles","shorthands","color","colorNeutralForeground2","textAlign","ibv6hh","enabled","tokens","colorBrandForeground2Hover","borderColor","backgroundColor","sj55zd","fsow6f","styles","state","tx73yv","Bywfcay"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAGaA,oBAAAA;eAAAA;;;;;;iCAH0D;AAGhE,MAAMA,uBAAoD;UAC/DC;UACAC;AACF;AAEA,MAAMC,4BAA4BC,IAAAA,yBAAAA,EAAAA;UAChCH;iBACKI;iBACH;iBACGC;iBACAA;iBACAA;iBACHC;YAAAA;YAAcC;SAAAA;iBACdC;QAGFC,QAAA;YAAA;YAAA;SAAA;QACAC,QAAAA;gBACE;YAAA;YAAA;SAAA;gBACE;;;YACE;SAAkB;;;;YAEXC;SAAOC;;gBAEhB;YAAA;YAAA;SAAA;iBACA;YAAA;YAAA;SAAA;iBACA;YAAA;YAAA;SAAiB;;;YACf;SAAkB;;;YACfP;SAAWQ;;;;YAEdC;SAAiBH;iBACnB;gBACF;YAAA;YAAA;SAAA;QACFI,QAAA;QACFC,QAAA;IAEA;aACQC;QACNC,SAAMlB;QAONmB,QAAOD;YAAAA;YAAAA;SAAAA;QACPE,SAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["SuggestionList.
|
|
1
|
+
{"version":3,"sources":["SuggestionList.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useSuggestionList_unstable } from './useSuggestionList';\nimport { renderSuggestionList_unstable } from './renderSuggestionList';\nimport { useSuggestionListStyles_unstable } from './useSuggestionListStyles';\nimport type { SuggestionListProps } from './SuggestionList.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\n// SuggestionList component - TODO: add more docs\nexport const SuggestionList: ForwardRefComponent<SuggestionListProps> = React.forwardRef((props, ref) => {\n const state = useSuggestionList_unstable(props, ref);\n\n useSuggestionListStyles_unstable(state);\n useCustomStyleHook('useSuggestionListStyles')(state);\n\n return renderSuggestionList_unstable(state);\n});\n\nSuggestionList.displayName = 'SuggestionList';\n"],"names":["SuggestionList","React","forwardRef","props","state","useSuggestionList_unstable","useSuggestionListStyles_unstable","useCustomStyleHook","renderSuggestionList_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;;iEATU;mCACoB;sCACG;yCACG;+BAGd;AAG5B,MAAMA,iBAAAA,WAAAA,GAAAA,OAA2DC,UAAMC,CAAU,CAACC,OAACA;UACxFC,QAAMA,IAAAA,6CAAQC,EAAAA,OAA2BF;iEAEzCG,EAAAA;yCACAC,EAAAA,2BAAmBH;WAEnBI,IAAAA,mDAAOA,EAAAA;AACT;AAEAR,eAAeS,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["SuggestionList.types.
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './SuggestionList';\nexport * from './SuggestionList.types';\nexport * from './renderSuggestionList';\nexport * from './useSuggestionList';\nexport * from './useSuggestionListStyles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderSuggestionList.
|
|
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"}
|
|
@@ -22,7 +22,7 @@ const useSuggestionList_unstable = (props, ref)=>{
|
|
|
22
22
|
reloadTooltip: _reactcomponents.Tooltip,
|
|
23
23
|
action: 'span'
|
|
24
24
|
},
|
|
25
|
-
root: _reactcomponents.slot.always((0, _reactcomponents.
|
|
25
|
+
root: _reactcomponents.slot.always((0, _reactcomponents.getIntrinsicElementProps)('div', {
|
|
26
26
|
ref,
|
|
27
27
|
role: 'toolbar',
|
|
28
28
|
'aria-label': 'suggestions',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useSuggestionList.
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useSuggestionListStyles.
|
|
1
|
+
{"version":3,"sources":["useSuggestionListStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands, 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 ...shorthands.gap(tokens.spacingVerticalS),\n ...shorthands.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 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","state","root","reload","reloadTooltip","action","__styles","display","flexWrap","justifyContent","shorthands","maxWidth","jrapky","minWidth","Bf4jedk","B2u0y6b","useStyles","className","mergeClasses","styles"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIaA,wBAAAA;eAAAA;;IAkDPC,gCAAc;eAAdA;;;iCAtD+C;AAI9C,MAAMD,2BAAgE;UAC3EE;YACAC;mBACAC;YACAC;AACF;AAEA;;CAEC,SAECH,YAAMI,IAAAA,yBAAA,EAAA;UACJC;gBACAC;gBACAC;iBACGC;gBACAA;iBAMH;iBACEC;gBACF;YAAA;YAAA;SAAA;QACFC,QAAA;QACAT,QAAQ;YAAA;YAAA;SAAA;iBACNU;;YAEF;QAEAR,SAAQ;iBACNQ;;YAEF;QAGFC,SAAA;QAEAC,SAAA;;GAEC;OAEC;QAAA;QAAeC;QAAAA;QAAAA;QAAAA;QAAAA;QAAAA;QAAAA;QAAAA;QAAAA;QAAAA;QAAAA;KAAAA;;AAOf,MAAIf,mCAAcA,CAAAA;UAChBA,SAAMI;UACRH,IAAA,CAAAe,SAAA,GAAAC,IAAAA,6BAAA,EAAAlB,yBAAAE,IAAA,EAAAiB,OAAAjB,IAAA,EAAAD,MAAAC,IAAA,CAAAe,SAAA;QAEAhB,MAAOA,MAAAA,EAAAA;QACPA,MAAAE,MAAA,CAAAc,SAAA,GAAAC,IAAAA,6BAAA,EAAAlB,yBAAAG,MAAA,EAAAgB,OAAAhB,MAAA,EAAAF,MAAAE,MAAA,CAAAc,SAAA"}
|
package/lib-commonjs/index.js
CHANGED
|
@@ -12,18 +12,15 @@ _export(exports, {
|
|
|
12
12
|
Suggestion: function() {
|
|
13
13
|
return _Suggestion.Suggestion;
|
|
14
14
|
},
|
|
15
|
-
suggestionClassNames: function() {
|
|
16
|
-
return _Suggestion.suggestionClassNames;
|
|
17
|
-
},
|
|
18
|
-
useSuggestionStyles_unstable: function() {
|
|
19
|
-
return _Suggestion.useSuggestionStyles_unstable;
|
|
20
|
-
},
|
|
21
15
|
SuggestionList: function() {
|
|
22
16
|
return _SuggestionList.SuggestionList;
|
|
23
17
|
},
|
|
24
18
|
renderSuggestionList_unstable: function() {
|
|
25
19
|
return _SuggestionList.renderSuggestionList_unstable;
|
|
26
20
|
},
|
|
21
|
+
suggestionClassNames: function() {
|
|
22
|
+
return _Suggestion.suggestionClassNames;
|
|
23
|
+
},
|
|
27
24
|
suggestionListClassNames: function() {
|
|
28
25
|
return _SuggestionList.suggestionListClassNames;
|
|
29
26
|
},
|
|
@@ -32,6 +29,9 @@ _export(exports, {
|
|
|
32
29
|
},
|
|
33
30
|
useSuggestionList_unstable: function() {
|
|
34
31
|
return _SuggestionList.useSuggestionList_unstable;
|
|
32
|
+
},
|
|
33
|
+
useSuggestionStyles_unstable: function() {
|
|
34
|
+
return _Suggestion.useSuggestionStyles_unstable;
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
37
|
const _Suggestion = require("./Suggestion");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.
|
|
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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-copilot/react-suggestions",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "A Fluent AI package",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -12,16 +12,16 @@
|
|
|
12
12
|
},
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@fluentui-copilot/react-provider": "^0.8.
|
|
15
|
+
"@fluentui-copilot/react-provider": "^0.8.1",
|
|
16
16
|
"@swc/helpers": "^0.5.1"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
|
-
"@fluentui/react-components": ">=9.
|
|
20
|
-
"@fluentui/react-context-selector": ">=9.1.
|
|
21
|
-
"@fluentui/react-icons": ">=2.0.
|
|
22
|
-
"@fluentui/react-jsx-runtime": ">=9.0.
|
|
23
|
-
"@fluentui/react-shared-contexts": ">=9.
|
|
24
|
-
"@fluentui/react-utilities": ">=9.
|
|
19
|
+
"@fluentui/react-components": ">=9.49.0 <10.0.0",
|
|
20
|
+
"@fluentui/react-context-selector": ">=9.1.58 <10.0.0",
|
|
21
|
+
"@fluentui/react-icons": ">=2.0.237 <3.0.0",
|
|
22
|
+
"@fluentui/react-jsx-runtime": ">=9.0.36 <10.0.0",
|
|
23
|
+
"@fluentui/react-shared-contexts": ">=9.17.0 <10.0.0",
|
|
24
|
+
"@fluentui/react-utilities": ">=9.18.7 <10.0.0",
|
|
25
25
|
"@types/react": ">=16.14.0 <19.0.0",
|
|
26
26
|
"@types/react-dom": ">=16.9.8 <19.0.0",
|
|
27
27
|
"react": ">=16.14.0 <19.0.0",
|