@fluentui-copilot/react-suggestions 0.8.2 → 0.8.3
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 +28 -1
- package/CHANGELOG.md +13 -2
- 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} +25 -23
- 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} +36 -35
- 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 +8 -8
- 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,7 +2,34 @@
|
|
|
2
2
|
"name": "@fluentui-copilot/react-suggestions",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Fri, 31 May 2024 18:42:06 GMT",
|
|
6
|
+
"tag": "@fluentui-copilot/react-suggestions_v0.8.3",
|
|
7
|
+
"version": "0.8.3",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "tristan.watanabe@gmail.com",
|
|
12
|
+
"package": "@fluentui-copilot/react-suggestions",
|
|
13
|
+
"commit": "6df44dbcd267772e1b62426d14abe54a0b35bb97",
|
|
14
|
+
"comment": "chore: useStyle hook files now properly contain .styles. within filename."
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "seanmonahan@microsoft.com",
|
|
18
|
+
"package": "@fluentui-copilot/react-suggestions",
|
|
19
|
+
"commit": "c2e14c44cafafbdc10f52b9855384748a7524a63",
|
|
20
|
+
"comment": "chore: add eslint-plugin-react-compiler"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "tristan.watanabe@gmail.com",
|
|
24
|
+
"package": "@fluentui-copilot/react-suggestions",
|
|
25
|
+
"commit": "7583464747aec7a8a79a8c79eaeff85d749025e4",
|
|
26
|
+
"comment": "chore: bump @fluentui dependencies to latest 9.52.0."
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"date": "Wed, 08 May 2024 22:10:20 GMT",
|
|
6
33
|
"tag": "@fluentui-copilot/react-suggestions_v0.8.2",
|
|
7
34
|
"version": "0.8.2",
|
|
8
35
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
# Change Log - @fluentui-copilot/react-suggestions
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Fri, 31 May 2024 18:42:06 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [0.8.3](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-suggestions_v0.8.3)
|
|
8
|
+
|
|
9
|
+
Fri, 31 May 2024 18:42:06 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-suggestions_v0.8.2..@fluentui-copilot/react-suggestions_v0.8.3)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- chore: useStyle hook files now properly contain .styles. within filename. ([PR #1671](https://github.com/microsoft/fluentai/pull/1671) by tristan.watanabe@gmail.com)
|
|
15
|
+
- chore: add eslint-plugin-react-compiler ([PR #1642](https://github.com/microsoft/fluentai/pull/1642) by seanmonahan@microsoft.com)
|
|
16
|
+
- chore: bump @fluentui dependencies to latest 9.52.0. ([PR #1657](https://github.com/microsoft/fluentai/pull/1657) by tristan.watanabe@gmail.com)
|
|
17
|
+
|
|
7
18
|
## [0.8.2](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-suggestions_v0.8.2)
|
|
8
19
|
|
|
9
|
-
Wed, 08 May 2024 22:
|
|
20
|
+
Wed, 08 May 2024 22:10:20 GMT
|
|
10
21
|
[Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-suggestions_v0.8.1..@fluentui-copilot/react-suggestions_v0.8.2)
|
|
11
22
|
|
|
12
23
|
### Patches
|
|
@@ -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"}
|
|
@@ -33,46 +33,48 @@ const useSuggestionStylesStyles = __styles({
|
|
|
33
33
|
fsow6f: "fpgzoln"
|
|
34
34
|
},
|
|
35
35
|
enabled: {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
36
|
+
B9di4we: "fxuoarf",
|
|
37
|
+
B1f0e9u: ["f1qi0eim", "fiwk2rq"],
|
|
38
|
+
bb0oo: "f1jsw6og",
|
|
39
|
+
B88lpqa: ["fiwk2rq", "f1qi0eim"],
|
|
40
|
+
grrwut: "f1ggo121",
|
|
41
|
+
Bejlia0: "f1jg9xd",
|
|
42
|
+
v5djml: "fihmelj",
|
|
43
|
+
Bptf8dt: ["fs1n9un", "f1u9p12n"],
|
|
44
|
+
j4j8r: "f12ds35j",
|
|
45
|
+
H566xl: ["f1u9p12n", "fs1n9un"],
|
|
46
|
+
a9g2gr: "fezean8",
|
|
47
|
+
rgbxn1: "f1yr11xb"
|
|
48
48
|
}
|
|
49
49
|
}, {
|
|
50
50
|
d: [".fk6fouc{font-family:var(--fontFamilyBase);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", ".f5ogflp{border-top-width:1px;}", ".f1hqa2wf{border-right-width:1px;}", ".finvdd3{border-left-width:1px;}", ".f1f09k3d{border-bottom-width:1px;}", ".fzkkow9{border-top-style:solid;}", ".fcdblym{border-right-style:solid;}", ".fjik90z{border-left-style:solid;}", ".fg706s2{border-bottom-style:solid;}", ".f161y7kd{border-top-color:var(--colorBrandStroke2);}", ".f1c8dzaj{border-right-color:var(--colorBrandStroke2);}", ".f1sl6hi9{border-left-color:var(--colorBrandStroke2);}", ".f1619yhw{border-bottom-color:var(--colorBrandStroke2);}", ".fnivh3a{border-bottom-right-radius:var(--borderRadiusXLarge);}", ".fc7yr5o{border-bottom-left-radius:var(--borderRadiusXLarge);}", ".f1el4m67{border-top-right-radius:var(--borderRadiusXLarge);}", ".f8yange{border-top-left-radius:var(--borderRadiusXLarge);}", ".f1ywm7hm{padding-top:var(--spacingVerticalXS);}", ".f1yjm1ar{padding-right:var(--spacingVerticalS);}", ".f1egtk6x{padding-left:var(--spacingVerticalS);}", ".f14wxoun{padding-bottom:var(--spacingVerticalXS);}", ".fkfq4zb{color:var(--colorNeutralForeground2);}", ".fpgzoln{text-align:start;}"],
|
|
51
|
-
m: [["@media (forced-colors: none){.
|
|
51
|
+
m: [["@media (forced-colors: none){.fxuoarf:hover{border-top-color:var(--colorBrandStroke2Hover);}}", {
|
|
52
52
|
m: "(forced-colors: none)"
|
|
53
|
-
}], ["@media (forced-colors: none){.
|
|
53
|
+
}], ["@media (forced-colors: none){.f1qi0eim:hover{border-right-color:var(--colorBrandStroke2Hover);}.fiwk2rq:hover{border-left-color:var(--colorBrandStroke2Hover);}}", {
|
|
54
54
|
m: "(forced-colors: none)"
|
|
55
|
-
}], ["@media (forced-colors: none){.
|
|
55
|
+
}], ["@media (forced-colors: none){.f1jsw6og:hover{border-bottom-color:var(--colorBrandStroke2Hover);}}", {
|
|
56
56
|
m: "(forced-colors: none)"
|
|
57
|
-
}], ["@media (forced-colors: none){.
|
|
57
|
+
}], ["@media (forced-colors: none){.f1ggo121:hover{color:var(--colorBrandForeground2Hover);}}", {
|
|
58
58
|
m: "(forced-colors: none)"
|
|
59
|
-
}], ["@media (forced-colors: none){.
|
|
59
|
+
}], ["@media (forced-colors: none){.f1jg9xd:hover{background-color:var(--colorBrandBackground2Hover);}}", {
|
|
60
60
|
m: "(forced-colors: none)"
|
|
61
|
-
}], ["@media (forced-colors: none){.
|
|
61
|
+
}], ["@media (forced-colors: none){.fihmelj:active:hover{border-top-color:var(--colorBrandStroke2Pressed);}}", {
|
|
62
62
|
m: "(forced-colors: none)"
|
|
63
|
-
}], ["@media (forced-colors: none){.
|
|
63
|
+
}], ["@media (forced-colors: none){.f1u9p12n:active:hover{border-left-color:var(--colorBrandStroke2Pressed);}.fs1n9un:active:hover{border-right-color:var(--colorBrandStroke2Pressed);}}", {
|
|
64
64
|
m: "(forced-colors: none)"
|
|
65
|
-
}], ["@media (forced-colors: none){.
|
|
65
|
+
}], ["@media (forced-colors: none){.f12ds35j:active:hover{border-bottom-color:var(--colorBrandStroke2Pressed);}}", {
|
|
66
66
|
m: "(forced-colors: none)"
|
|
67
|
-
}], ["@media (forced-colors: none){.
|
|
67
|
+
}], ["@media (forced-colors: none){.fezean8:active:hover{color:var(--colorBrandForeground2Pressed);}}", {
|
|
68
68
|
m: "(forced-colors: none)"
|
|
69
|
-
}], ["@media (forced-colors: none){.
|
|
69
|
+
}], ["@media (forced-colors: none){.f1yr11xb:active:hover{background-color:var(--colorBrandBackground2Pressed);}}", {
|
|
70
70
|
m: "(forced-colors: none)"
|
|
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
|
@@ -87,30 +87,30 @@ const useSuggestionStylesStyles = (0, _reactcomponents.__styles)({
|
|
|
87
87
|
fsow6f: "fpgzoln"
|
|
88
88
|
},
|
|
89
89
|
enabled: {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
],
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
],
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
],
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
"
|
|
110
|
-
"
|
|
111
|
-
],
|
|
112
|
-
|
|
113
|
-
|
|
90
|
+
B9di4we: "fxuoarf",
|
|
91
|
+
B1f0e9u: [
|
|
92
|
+
"f1qi0eim",
|
|
93
|
+
"fiwk2rq"
|
|
94
|
+
],
|
|
95
|
+
bb0oo: "f1jsw6og",
|
|
96
|
+
B88lpqa: [
|
|
97
|
+
"fiwk2rq",
|
|
98
|
+
"f1qi0eim"
|
|
99
|
+
],
|
|
100
|
+
grrwut: "f1ggo121",
|
|
101
|
+
Bejlia0: "f1jg9xd",
|
|
102
|
+
v5djml: "fihmelj",
|
|
103
|
+
Bptf8dt: [
|
|
104
|
+
"fs1n9un",
|
|
105
|
+
"f1u9p12n"
|
|
106
|
+
],
|
|
107
|
+
j4j8r: "f12ds35j",
|
|
108
|
+
H566xl: [
|
|
109
|
+
"f1u9p12n",
|
|
110
|
+
"fs1n9un"
|
|
111
|
+
],
|
|
112
|
+
a9g2gr: "fezean8",
|
|
113
|
+
rgbxn1: "f1yr11xb"
|
|
114
114
|
}
|
|
115
115
|
}, {
|
|
116
116
|
d: [
|
|
@@ -143,61 +143,61 @@ const useSuggestionStylesStyles = (0, _reactcomponents.__styles)({
|
|
|
143
143
|
],
|
|
144
144
|
m: [
|
|
145
145
|
[
|
|
146
|
-
"@media (forced-colors: none){.
|
|
146
|
+
"@media (forced-colors: none){.fxuoarf:hover{border-top-color:var(--colorBrandStroke2Hover);}}",
|
|
147
147
|
{
|
|
148
148
|
m: "(forced-colors: none)"
|
|
149
149
|
}
|
|
150
150
|
],
|
|
151
151
|
[
|
|
152
|
-
"@media (forced-colors: none){.
|
|
152
|
+
"@media (forced-colors: none){.f1qi0eim:hover{border-right-color:var(--colorBrandStroke2Hover);}.fiwk2rq:hover{border-left-color:var(--colorBrandStroke2Hover);}}",
|
|
153
153
|
{
|
|
154
154
|
m: "(forced-colors: none)"
|
|
155
155
|
}
|
|
156
156
|
],
|
|
157
157
|
[
|
|
158
|
-
"@media (forced-colors: none){.
|
|
158
|
+
"@media (forced-colors: none){.f1jsw6og:hover{border-bottom-color:var(--colorBrandStroke2Hover);}}",
|
|
159
159
|
{
|
|
160
160
|
m: "(forced-colors: none)"
|
|
161
161
|
}
|
|
162
162
|
],
|
|
163
163
|
[
|
|
164
|
-
"@media (forced-colors: none){.
|
|
164
|
+
"@media (forced-colors: none){.f1ggo121:hover{color:var(--colorBrandForeground2Hover);}}",
|
|
165
165
|
{
|
|
166
166
|
m: "(forced-colors: none)"
|
|
167
167
|
}
|
|
168
168
|
],
|
|
169
169
|
[
|
|
170
|
-
"@media (forced-colors: none){.
|
|
170
|
+
"@media (forced-colors: none){.f1jg9xd:hover{background-color:var(--colorBrandBackground2Hover);}}",
|
|
171
171
|
{
|
|
172
172
|
m: "(forced-colors: none)"
|
|
173
173
|
}
|
|
174
174
|
],
|
|
175
175
|
[
|
|
176
|
-
"@media (forced-colors: none){.
|
|
176
|
+
"@media (forced-colors: none){.fihmelj:active:hover{border-top-color:var(--colorBrandStroke2Pressed);}}",
|
|
177
177
|
{
|
|
178
178
|
m: "(forced-colors: none)"
|
|
179
179
|
}
|
|
180
180
|
],
|
|
181
181
|
[
|
|
182
|
-
"@media (forced-colors: none){.
|
|
182
|
+
"@media (forced-colors: none){.f1u9p12n:active:hover{border-left-color:var(--colorBrandStroke2Pressed);}.fs1n9un:active:hover{border-right-color:var(--colorBrandStroke2Pressed);}}",
|
|
183
183
|
{
|
|
184
184
|
m: "(forced-colors: none)"
|
|
185
185
|
}
|
|
186
186
|
],
|
|
187
187
|
[
|
|
188
|
-
"@media (forced-colors: none){.
|
|
188
|
+
"@media (forced-colors: none){.f12ds35j:active:hover{border-bottom-color:var(--colorBrandStroke2Pressed);}}",
|
|
189
189
|
{
|
|
190
190
|
m: "(forced-colors: none)"
|
|
191
191
|
}
|
|
192
192
|
],
|
|
193
193
|
[
|
|
194
|
-
"@media (forced-colors: none){.
|
|
194
|
+
"@media (forced-colors: none){.fezean8:active:hover{color:var(--colorBrandForeground2Pressed);}}",
|
|
195
195
|
{
|
|
196
196
|
m: "(forced-colors: none)"
|
|
197
197
|
}
|
|
198
198
|
],
|
|
199
199
|
[
|
|
200
|
-
"@media (forced-colors: none){.
|
|
200
|
+
"@media (forced-colors: none){.f1yr11xb:active:hover{background-color:var(--colorBrandBackground2Pressed);}}",
|
|
201
201
|
{
|
|
202
202
|
m: "(forced-colors: none)"
|
|
203
203
|
}
|
|
@@ -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.8.
|
|
3
|
+
"version": "0.8.3",
|
|
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.3",
|
|
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.18.
|
|
19
|
+
"@fluentui/react-components": ">=9.52.0 <10.0.0",
|
|
20
|
+
"@fluentui/react-context-selector": ">=9.1.60 <10.0.0",
|
|
21
|
+
"@fluentui/react-icons": ">=2.0.240 <3.0.0",
|
|
22
|
+
"@fluentui/react-jsx-runtime": ">=9.0.38 <10.0.0",
|
|
23
|
+
"@fluentui/react-shared-contexts": ">=9.19.0 <10.0.0",
|
|
24
|
+
"@fluentui/react-utilities": ">=9.18.9 <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",
|
|
@@ -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","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 +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"}
|