@fluentui-copilot/react-suggestions 0.0.0-nightly-20240524-0405-c4d67c24.1 → 0.0.0-nightly-20240530-0404-c2e14c44.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 +5 -5
- package/CHANGELOG.md +5 -5
- package/lib/components/Suggestion/Suggestion.js +3 -1
- package/lib/components/Suggestion/Suggestion.js.map +1 -1
- package/lib/components/Suggestion/index.js +1 -1
- package/lib/components/Suggestion/index.js.map +1 -1
- package/lib/components/Suggestion/{useSuggestionStyles.js → useSuggestionStyles.styles.js} +3 -1
- package/lib/components/Suggestion/useSuggestionStyles.styles.js.map +1 -0
- package/lib/components/SuggestionList/SuggestionList.js +1 -1
- package/lib/components/SuggestionList/SuggestionList.js.map +1 -1
- package/lib/components/SuggestionList/index.js +1 -1
- package/lib/components/SuggestionList/index.js.map +1 -1
- package/lib/components/SuggestionList/{useSuggestionListStyles.js → useSuggestionListStyles.styles.js} +3 -1
- package/lib/components/SuggestionList/useSuggestionListStyles.styles.js.map +1 -0
- package/lib-commonjs/components/Suggestion/Suggestion.js +3 -2
- package/lib-commonjs/components/Suggestion/Suggestion.js.map +1 -1
- package/lib-commonjs/components/Suggestion/index.js +1 -1
- package/lib-commonjs/components/Suggestion/index.js.map +1 -1
- package/lib-commonjs/components/Suggestion/{useSuggestionStyles.js → useSuggestionStyles.styles.js} +2 -1
- package/lib-commonjs/components/Suggestion/useSuggestionStyles.styles.js.map +1 -0
- package/lib-commonjs/components/SuggestionList/SuggestionList.js +2 -2
- package/lib-commonjs/components/SuggestionList/SuggestionList.js.map +1 -1
- package/lib-commonjs/components/SuggestionList/index.js +1 -1
- package/lib-commonjs/components/SuggestionList/index.js.map +1 -1
- package/lib-commonjs/components/SuggestionList/{useSuggestionListStyles.js → useSuggestionListStyles.styles.js} +2 -1
- package/lib-commonjs/components/SuggestionList/useSuggestionListStyles.styles.js.map +1 -0
- package/package.json +2 -2
- package/lib/components/Suggestion/useSuggestionStyles.js.map +0 -1
- package/lib/components/SuggestionList/useSuggestionListStyles.js.map +0 -1
- package/lib-commonjs/components/Suggestion/useSuggestionStyles.js.map +0 -1
- package/lib-commonjs/components/SuggestionList/useSuggestionListStyles.js.map +0 -1
package/CHANGELOG.json
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"name": "@fluentui-copilot/react-suggestions",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
6
|
-
"tag": "@fluentui-copilot/react-suggestions_v0.0.0-nightly-
|
|
7
|
-
"version": "0.0.0-nightly-
|
|
5
|
+
"date": "Thu, 30 May 2024 04:10:28 GMT",
|
|
6
|
+
"tag": "@fluentui-copilot/react-suggestions_v0.0.0-nightly-20240530-0404-c2e14c44.1",
|
|
7
|
+
"version": "0.0.0-nightly-20240530-0404-c2e14c44.1",
|
|
8
8
|
"comments": {
|
|
9
9
|
"prerelease": [
|
|
10
10
|
{
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
{
|
|
17
17
|
"author": "beachball",
|
|
18
18
|
"package": "@fluentui-copilot/react-suggestions",
|
|
19
|
-
"comment": "Bump @fluentui-copilot/react-provider to v0.0.0-nightly-
|
|
20
|
-
"commit": "
|
|
19
|
+
"comment": "Bump @fluentui-copilot/react-provider to v0.0.0-nightly-20240530-0404-c2e14c44.1",
|
|
20
|
+
"commit": "41ea9f8fe5aca53381edae42789977021da57431"
|
|
21
21
|
}
|
|
22
22
|
]
|
|
23
23
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
# Change Log - @fluentui-copilot/react-suggestions
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Thu, 30 May 2024 04:10:28 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## [0.0.0-nightly-
|
|
7
|
+
## [0.0.0-nightly-20240530-0404-c2e14c44.1](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-suggestions_v0.0.0-nightly-20240530-0404-c2e14c44.1)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-suggestions_v0.8.2..@fluentui-copilot/react-suggestions_v0.0.0-nightly-
|
|
9
|
+
Thu, 30 May 2024 04:10:28 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-suggestions_v0.8.2..@fluentui-copilot/react-suggestions_v0.0.0-nightly-20240530-0404-c2e14c44.1)
|
|
11
11
|
|
|
12
12
|
### Changes
|
|
13
13
|
|
|
14
14
|
- Release nightly ([commit](https://github.com/microsoft/fluentai/commit/not available) by fluentui-internal@service.microsoft.com)
|
|
15
|
-
- Bump @fluentui-copilot/react-provider to v0.0.0-nightly-
|
|
15
|
+
- Bump @fluentui-copilot/react-provider to v0.0.0-nightly-20240530-0404-c2e14c44.1 ([commit](https://github.com/microsoft/fluentai/commit/41ea9f8fe5aca53381edae42789977021da57431) by beachball)
|
|
16
16
|
|
|
17
17
|
## [0.8.2](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-suggestions_v0.8.2)
|
|
18
18
|
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { useSuggestionStyles_unstable } from './useSuggestionStyles';
|
|
2
|
+
import { useSuggestionStyles_unstable } from './useSuggestionStyles.styles';
|
|
3
3
|
import { renderButton_unstable, useButtonStyles_unstable, useButton_unstable } from '@fluentui/react-components';
|
|
4
4
|
import { useCustomStyleHook } from '@fluentui-copilot/react-provider';
|
|
5
5
|
// Suggestion component - TODO: add more docs
|
|
6
6
|
export const Suggestion = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
7
|
+
'use no memo';
|
|
8
|
+
|
|
7
9
|
const state = useButton_unstable(props, ref);
|
|
8
10
|
state.appearance = props.appearance || 'outline';
|
|
9
11
|
useButtonStyles_unstable(state);
|
|
@@ -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"],"rangeMappings":"
|
|
1
|
+
{"version":3,"sources":["Suggestion.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useSuggestionStyles_unstable } from './useSuggestionStyles.styles';\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 'use no memo';\n\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,+BAA+B;AAE5E,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;IAEA,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":[],"rangeMappings":";","mappings":"AAAA,cAAc,eAAe;AAC7B,cAAc
|
|
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"}
|
|
@@ -71,8 +71,10 @@ const useSuggestionStylesStyles = __styles({
|
|
|
71
71
|
}]]
|
|
72
72
|
});
|
|
73
73
|
export const useSuggestionStyles_unstable = state => {
|
|
74
|
+
'use no memo';
|
|
75
|
+
|
|
74
76
|
const styles = useSuggestionStylesStyles();
|
|
75
77
|
state.root.className = mergeClasses(suggestionClassNames.root, styles.root, !state.disabled && styles.enabled, state.root.className);
|
|
76
78
|
return state;
|
|
77
79
|
};
|
|
78
|
-
//# sourceMappingURL=useSuggestionStyles.js.map
|
|
80
|
+
//# sourceMappingURL=useSuggestionStyles.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useSuggestionStyles.styles.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 'use no memo';\n\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;IAEA,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,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useSuggestionList_unstable } from './useSuggestionList';
|
|
3
3
|
import { renderSuggestionList_unstable } from './renderSuggestionList';
|
|
4
|
-
import { useSuggestionListStyles_unstable } from './useSuggestionListStyles';
|
|
4
|
+
import { useSuggestionListStyles_unstable } from './useSuggestionListStyles.styles';
|
|
5
5
|
import { useCustomStyleHook } from '@fluentui-copilot/react-provider';
|
|
6
6
|
// SuggestionList component - TODO: add more docs
|
|
7
7
|
export const SuggestionList = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
@@ -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"],"rangeMappings":";;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,0BAA0B,QAAQ,sBAAsB;AACjE,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,gCAAgC,QAAQ,
|
|
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.styles';\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,mCAAmC;AAGpF,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"}
|
|
@@ -2,5 +2,5 @@ export * from './SuggestionList';
|
|
|
2
2
|
export * from './SuggestionList.types';
|
|
3
3
|
export * from './renderSuggestionList';
|
|
4
4
|
export * from './useSuggestionList';
|
|
5
|
-
export * from './useSuggestionListStyles';
|
|
5
|
+
export * from './useSuggestionListStyles.styles';
|
|
6
6
|
//# 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';\n"],"names":[],"rangeMappings":";;;;","mappings":"AAAA,cAAc,mBAAmB;AACjC,cAAc,yBAAyB;AACvC,cAAc,yBAAyB;AACvC,cAAc,sBAAsB;AACpC,cAAc,
|
|
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"}
|
|
@@ -36,6 +36,8 @@ const useStyles = __styles({
|
|
|
36
36
|
* Apply styling to the SuggestionList slots based on the state
|
|
37
37
|
*/
|
|
38
38
|
export const useSuggestionListStyles_unstable = state => {
|
|
39
|
+
'use no memo';
|
|
40
|
+
|
|
39
41
|
const styles = useStyles();
|
|
40
42
|
state.root.className = mergeClasses(suggestionListClassNames.root, styles.root, state.root.className);
|
|
41
43
|
if (state.reload) {
|
|
@@ -46,4 +48,4 @@ export const useSuggestionListStyles_unstable = state => {
|
|
|
46
48
|
}
|
|
47
49
|
return state;
|
|
48
50
|
};
|
|
49
|
-
//# sourceMappingURL=useSuggestionListStyles.js.map
|
|
51
|
+
//# sourceMappingURL=useSuggestionListStyles.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useSuggestionListStyles.styles.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 '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","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;IAEA,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"}
|
|
@@ -10,14 +10,15 @@ Object.defineProperty(exports, "Suggestion", {
|
|
|
10
10
|
});
|
|
11
11
|
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
12
|
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
|
-
const
|
|
13
|
+
const _useSuggestionStylesstyles = require("./useSuggestionStyles.styles");
|
|
14
14
|
const _reactcomponents = require("@fluentui/react-components");
|
|
15
15
|
const _reactprovider = require("@fluentui-copilot/react-provider");
|
|
16
16
|
const Suggestion = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
17
|
+
'use no memo';
|
|
17
18
|
const state = (0, _reactcomponents.useButton_unstable)(props, ref);
|
|
18
19
|
state.appearance = props.appearance || 'outline';
|
|
19
20
|
(0, _reactcomponents.useButtonStyles_unstable)(state);
|
|
20
|
-
(0,
|
|
21
|
+
(0, _useSuggestionStylesstyles.useSuggestionStyles_unstable)(state);
|
|
21
22
|
(0, _reactprovider.useCustomStyleHook)('useSuggestionStyles')(state);
|
|
22
23
|
return (0, _reactcomponents.renderButton_unstable)(state);
|
|
23
24
|
});
|
|
@@ -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":["Suggestion","React","forwardRef","props","state","
|
|
1
|
+
{"version":3,"sources":["Suggestion.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useSuggestionStyles_unstable } from './useSuggestionStyles.styles';\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 'use no memo';\n\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","appearance","ref","useButtonStyles_unstable","useSuggestionStyles_unstable","renderButton_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAOaA;;;eAAAA;;;;iEAPU;2CACsB;iCAEuC;+BACjD;AAG5B,MAAMA,aAAAA,WAAAA,GAAAA,OAA+CC,UAAMC,CAAU,CAACC,OAACA;;UAI5EC,QAAMC,IAAAA,mCAAmBA,EAAAA,OAAUC;UACnCC,UAAAA,GAAAA,MAAAA,UAAyBH,IAAAA;iDACzBI,EAAAA;+DACmB,EAAAJ;yCAEZK,EAAAA,uBAAsBL;IAC/B,OAAGK,IAAAA,sCAAA,EAAAL;AAEHJ"}
|
|
@@ -4,5 +4,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
const _export_star = require("@swc/helpers/_/_export_star");
|
|
6
6
|
_export_star._(require("./Suggestion"), exports);
|
|
7
|
-
_export_star._(require("./useSuggestionStyles"), exports);
|
|
7
|
+
_export_star._(require("./useSuggestionStyles.styles"), exports);
|
|
8
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './Suggestion';\nexport * from './useSuggestionStyles';\n"],"names":[],"rangeMappings":";;;;;;","mappings":";;;;;uBAAc;uBACA"}
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './Suggestion';\nexport * from './useSuggestionStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;","mappings":";;;;;uBAAc;uBACA"}
|
package/lib-commonjs/components/Suggestion/{useSuggestionStyles.js → useSuggestionStyles.styles.js}
RENAMED
|
@@ -205,7 +205,8 @@ const useSuggestionStylesStyles = (0, _reactcomponents.__styles)({
|
|
|
205
205
|
]
|
|
206
206
|
});
|
|
207
207
|
const useSuggestionStyles_unstable = (state)=>{
|
|
208
|
+
'use no memo';
|
|
208
209
|
const styles = useSuggestionStylesStyles();
|
|
209
210
|
state.root.className = (0, _reactcomponents.mergeClasses)(suggestionClassNames.root, styles.root, !state.disabled && styles.enabled, state.root.className);
|
|
210
211
|
return state;
|
|
211
|
-
}; //# sourceMappingURL=useSuggestionStyles.js.map
|
|
212
|
+
}; //# sourceMappingURL=useSuggestionStyles.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useSuggestionStyles.styles.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 'use no memo';\n\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","B9di4we","styles","state","mergeClasses","bb0oo","B88lpqa"],"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;aACE;QAEAC,SAAMC;QACNC,SAAMnB;YAAI;YAAU;SAAGoB;QAOvBC,OAAOF;QACPG,SAAA;YAAA;YAAA;SAAA"}
|
|
@@ -12,11 +12,11 @@ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildc
|
|
|
12
12
|
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
13
|
const _useSuggestionList = require("./useSuggestionList");
|
|
14
14
|
const _renderSuggestionList = require("./renderSuggestionList");
|
|
15
|
-
const
|
|
15
|
+
const _useSuggestionListStylesstyles = require("./useSuggestionListStyles.styles");
|
|
16
16
|
const _reactprovider = require("@fluentui-copilot/react-provider");
|
|
17
17
|
const SuggestionList = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
18
18
|
const state = (0, _useSuggestionList.useSuggestionList_unstable)(props, ref);
|
|
19
|
-
(0,
|
|
19
|
+
(0, _useSuggestionListStylesstyles.useSuggestionListStyles_unstable)(state);
|
|
20
20
|
(0, _reactprovider.useCustomStyleHook)('useSuggestionListStyles')(state);
|
|
21
21
|
return (0, _renderSuggestionList.renderSuggestionList_unstable)(state);
|
|
22
22
|
});
|
|
@@ -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":["SuggestionList","React","forwardRef","props","state","useSuggestionList_unstable","useSuggestionListStyles_unstable","useCustomStyleHook","renderSuggestionList_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;;iEATU;mCACoB;sCACG
|
|
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.styles';\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;+CACG;+BAGd;AAG5B,MAAMA,iBAAAA,WAAAA,GAAAA,OAA2DC,UAAMC,CAAU,CAACC,OAACA;UACxFC,QAAMA,IAAAA,6CAAQC,EAAAA,OAA2BF;uEAEzCG,EAAAA;yCACAC,EAAAA,2BAAmBH;WAEnBI,IAAAA,mDAAOA,EAAAA;AACT;AAEAR,eAAeS,WAAW,GAAG"}
|
|
@@ -7,5 +7,5 @@ _export_star._(require("./SuggestionList"), exports);
|
|
|
7
7
|
_export_star._(require("./SuggestionList.types"), exports);
|
|
8
8
|
_export_star._(require("./renderSuggestionList"), exports);
|
|
9
9
|
_export_star._(require("./useSuggestionList"), exports);
|
|
10
|
-
_export_star._(require("./useSuggestionListStyles"), exports);
|
|
10
|
+
_export_star._(require("./useSuggestionListStyles.styles"), exports);
|
|
11
11
|
//# 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';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|
|
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"}
|
|
@@ -69,6 +69,7 @@ const suggestionListClassNames = {
|
|
|
69
69
|
]
|
|
70
70
|
});
|
|
71
71
|
const useSuggestionListStyles_unstable = (state)=>{
|
|
72
|
+
'use no memo';
|
|
72
73
|
const styles = useStyles();
|
|
73
74
|
state.root.className = (0, _reactcomponents.mergeClasses)(suggestionListClassNames.root, styles.root, state.root.className);
|
|
74
75
|
if (state.reload) {
|
|
@@ -78,4 +79,4 @@ const useSuggestionListStyles_unstable = (state)=>{
|
|
|
78
79
|
state.action.className = (0, _reactcomponents.mergeClasses)(suggestionListClassNames.action, styles.action, state.action.className);
|
|
79
80
|
}
|
|
80
81
|
return state;
|
|
81
|
-
}; //# sourceMappingURL=useSuggestionListStyles.js.map
|
|
82
|
+
}; //# sourceMappingURL=useSuggestionListStyles.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useSuggestionListStyles.styles.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 '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","shorthands","maxWidth","jrapky","minWidth","Bf4jedk","B2u0y6b","state","styles","useStyles"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIaA,wBAAAA;eAAAA;;IAkDXC,gCAAA;eAAAA;;;iCAtDmD;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;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;;AAOA,MAAAd,mCAAAe,CAAAA;;UAIAC,SAAAC;UAEAhB,IAAOc,CAAAA,SAAAA,GAAAA,IAAAA,6BAAAA,EAAAA,yBAAAA,IAAAA,EAAAA,OAAAA,IAAAA,EAAAA,MAAAA,IAAAA,CAAAA,SAAAA;IACP,IAAAA,MAAAb,MAAA,EAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-copilot/react-suggestions",
|
|
3
|
-
"version": "0.0.0-nightly-
|
|
3
|
+
"version": "0.0.0-nightly-20240530-0404-c2e14c44.1",
|
|
4
4
|
"description": "A Fluent AI package",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
},
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@fluentui-copilot/react-provider": "0.0.0-nightly-
|
|
15
|
+
"@fluentui-copilot/react-provider": "0.0.0-nightly-20240530-0404-c2e14c44.1",
|
|
16
16
|
"@swc/helpers": "^0.5.1"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
@@ -1 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
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","B1f0e9u","bb0oo"],"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,SAAOD;YAAAA;YAAAA;SAAAA;QACPE,OAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|