@fluentui-copilot/react-suggestions 0.12.3-hotfix.1 → 0.12.3-hotfix.2
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 +4 -4
- package/CHANGELOG.md +5 -5
- package/lib/Suggestion.js +1 -0
- package/lib/SuggestionList.js +1 -0
- package/lib/components/Suggestion/Suggestion.js +10 -8
- package/lib/components/Suggestion/Suggestion.types.js +2 -1
- package/lib/components/Suggestion/index.js +1 -0
- package/lib/components/Suggestion/useSuggestion.js +10 -9
- package/lib/components/Suggestion/useSuggestionStyles.styles.raw.js +48 -43
- package/lib/components/SuggestionList/SuggestionList.js +6 -5
- package/lib/components/SuggestionList/SuggestionList.types.js +2 -1
- package/lib/components/SuggestionList/index.js +1 -0
- package/lib/components/SuggestionList/renderSuggestionList.js +8 -9
- package/lib/components/SuggestionList/useSuggestionList.js +29 -24
- package/lib/components/SuggestionList/useSuggestionListStyles.styles.raw.js +31 -27
- package/lib/index.js +1 -0
- package/lib-commonjs/Suggestion.js +1 -0
- package/lib-commonjs/SuggestionList.js +1 -0
- package/lib-commonjs/components/Suggestion/Suggestion.js +1 -1
- package/lib-commonjs/components/Suggestion/Suggestion.js.map +1 -1
- package/lib-commonjs/components/Suggestion/Suggestion.types.js +1 -0
- package/lib-commonjs/components/Suggestion/index.js +1 -0
- package/lib-commonjs/components/Suggestion/useSuggestion.js +1 -1
- package/lib-commonjs/components/Suggestion/useSuggestion.js.map +1 -1
- package/lib-commonjs/components/Suggestion/useSuggestionStyles.styles.raw.js +1 -1
- package/lib-commonjs/components/Suggestion/useSuggestionStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/SuggestionList/SuggestionList.js +1 -1
- package/lib-commonjs/components/SuggestionList/SuggestionList.js.map +1 -1
- package/lib-commonjs/components/SuggestionList/SuggestionList.types.js +1 -0
- package/lib-commonjs/components/SuggestionList/index.js +1 -0
- package/lib-commonjs/components/SuggestionList/renderSuggestionList.js +1 -1
- package/lib-commonjs/components/SuggestionList/renderSuggestionList.js.map +1 -1
- package/lib-commonjs/components/SuggestionList/useSuggestionList.js +1 -1
- package/lib-commonjs/components/SuggestionList/useSuggestionList.js.map +1 -1
- package/lib-commonjs/components/SuggestionList/useSuggestionListStyles.styles.raw.js +1 -1
- package/lib-commonjs/components/SuggestionList/useSuggestionListStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/index.js +1 -0
- package/package.json +3 -3
package/CHANGELOG.json
CHANGED
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
"name": "@fluentui-copilot/react-suggestions",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
6
|
-
"tag": "@fluentui-copilot/react-suggestions_v0.12.3-hotfix.
|
|
7
|
-
"version": "0.12.3-hotfix.
|
|
5
|
+
"date": "Fri, 19 Sep 2025 15:10:20 GMT",
|
|
6
|
+
"tag": "@fluentui-copilot/react-suggestions_v0.12.3-hotfix.2",
|
|
7
|
+
"version": "0.12.3-hotfix.2",
|
|
8
8
|
"comments": {
|
|
9
9
|
"prerelease": [
|
|
10
10
|
{
|
|
11
11
|
"author": "hochelmartin@gmail.com",
|
|
12
12
|
"package": "@fluentui-copilot/react-suggestions",
|
|
13
13
|
"commit": "3e4ebe676646c4c4346dbbab83511f963ffefd85",
|
|
14
|
-
"comment": "release: prepare hotfix 0.26.2-hotfix.
|
|
14
|
+
"comment": "release: prepare hotfix 0.26.2-hotfix.2"
|
|
15
15
|
}
|
|
16
16
|
]
|
|
17
17
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
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, 19 Sep 2025 15:10:20 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## [0.12.3-hotfix.
|
|
7
|
+
## [0.12.3-hotfix.2](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-suggestions_v0.12.3-hotfix.2)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-suggestions_v0.12.3..@fluentui-copilot/react-suggestions_v0.12.3-hotfix.
|
|
9
|
+
Fri, 19 Sep 2025 15:10:20 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-suggestions_v0.12.3..@fluentui-copilot/react-suggestions_v0.12.3-hotfix.2)
|
|
11
11
|
|
|
12
12
|
### Changes
|
|
13
13
|
|
|
14
|
-
- release: prepare hotfix 0.26.2-hotfix.
|
|
14
|
+
- release: prepare hotfix 0.26.2-hotfix.2 ([PR #3284](https://github.com/microsoft/fluentai/pull/3284) by hochelmartin@gmail.com)
|
|
15
15
|
|
|
16
16
|
## [0.12.3](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-suggestions_v0.12.3)
|
|
17
17
|
|
package/lib/Suggestion.js
CHANGED
package/lib/SuggestionList.js
CHANGED
|
@@ -4,13 +4,15 @@ import { renderButton_unstable, useButtonStyles_unstable } from '@fluentui/react
|
|
|
4
4
|
import { useCustomStyleHook } from '@fluentui-copilot/react-provider';
|
|
5
5
|
import { useSuggestion_unstable } from './useSuggestion';
|
|
6
6
|
// Suggestion component - TODO: add more docs
|
|
7
|
-
export const Suggestion = /*#__PURE__*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
export const Suggestion = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
8
|
+
'use no memo';
|
|
9
|
+
|
|
10
|
+
const state = useSuggestion_unstable(props, ref);
|
|
11
|
+
state.appearance = props.appearance || 'outline';
|
|
12
|
+
useButtonStyles_unstable(state);
|
|
13
|
+
useSuggestionStyles_unstable(state);
|
|
14
|
+
useCustomStyleHook('useSuggestionStyles')(state);
|
|
15
|
+
return renderButton_unstable(state);
|
|
15
16
|
});
|
|
16
17
|
Suggestion.displayName = 'Suggestion';
|
|
18
|
+
//# sourceMappingURL=Suggestion.js.map
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export {};
|
|
2
|
+
//# sourceMappingURL=Suggestion.types.js.map
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { useButton_unstable } from '@fluentui/react-components';
|
|
2
2
|
import { useCopilotMode, useDesignVersion } from '@fluentui-copilot/react-provider';
|
|
3
|
-
export const useSuggestion_unstable = (props, ref)=>{
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
export const useSuggestion_unstable = (props, ref) => {
|
|
4
|
+
const buttonState = useButton_unstable(props, ref);
|
|
5
|
+
const mode = useCopilotMode(props.mode);
|
|
6
|
+
const designVersion = useDesignVersion(props.designVersion);
|
|
7
|
+
return {
|
|
8
|
+
...buttonState,
|
|
9
|
+
mode,
|
|
10
|
+
designVersion
|
|
11
|
+
};
|
|
12
12
|
};
|
|
13
|
+
//# sourceMappingURL=useSuggestion.js.map
|
|
@@ -1,53 +1,58 @@
|
|
|
1
1
|
import { makeStyles, mergeClasses, shorthands, typographyStyles } from '@fluentui/react-components';
|
|
2
2
|
import { tokens } from '@fluentui-copilot/tokens';
|
|
3
3
|
export const suggestionClassNames = {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
root: 'fai-Suggestion',
|
|
5
|
+
icon: 'fai-Suggestion__icon'
|
|
6
6
|
};
|
|
7
7
|
const useSuggestionStyles = makeStyles({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
canvas: {
|
|
35
|
-
...typographyStyles.body1,
|
|
36
|
-
padding: `${tokens.spacingVerticalSNudge} ${tokens.spacingHorizontalM}`
|
|
8
|
+
root: {
|
|
9
|
+
...typographyStyles.caption1,
|
|
10
|
+
// Brand/M365/140
|
|
11
|
+
...shorthands.border('1px', 'solid', tokens.colorBrandStroke2),
|
|
12
|
+
borderRadius: tokens.borderRadiusXLarge,
|
|
13
|
+
padding: `${tokens.spacingVerticalXS} ${tokens.spacingVerticalS}`,
|
|
14
|
+
color: tokens.colorNeutralForeground2,
|
|
15
|
+
textAlign: 'start'
|
|
16
|
+
},
|
|
17
|
+
enabled: {
|
|
18
|
+
'@media (forced-colors: none)': {
|
|
19
|
+
':hover': {
|
|
20
|
+
// Brand/M365/120
|
|
21
|
+
...shorthands.borderColor(tokens.colorBrandStroke2Hover),
|
|
22
|
+
color: tokens.colorBrandForeground2Hover,
|
|
23
|
+
backgroundColor: tokens.colorBrandBackground2Hover
|
|
24
|
+
},
|
|
25
|
+
// Figma states 'on hover and pressed state'
|
|
26
|
+
':active:hover': {
|
|
27
|
+
// Brand/M365/120
|
|
28
|
+
...shorthands.borderColor(tokens.colorBrandStroke2Pressed),
|
|
29
|
+
color: tokens.colorBrandForeground2Pressed,
|
|
30
|
+
backgroundColor: tokens.colorBrandBackground2Pressed
|
|
31
|
+
}
|
|
37
32
|
}
|
|
33
|
+
},
|
|
34
|
+
canvas: {
|
|
35
|
+
...typographyStyles.body1,
|
|
36
|
+
padding: `${tokens.spacingVerticalSNudge} ${tokens.spacingHorizontalM}`
|
|
37
|
+
}
|
|
38
38
|
});
|
|
39
39
|
const useNextStyles = makeStyles({
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
root: {
|
|
41
|
+
paddingHorizontal: tokens.spacingHorizontalM,
|
|
42
|
+
paddingVertical: tokens.spacingVerticalSNudge,
|
|
43
|
+
fontSize: tokens.fontSizeBase200
|
|
44
|
+
}
|
|
45
45
|
});
|
|
46
|
-
export const useSuggestionStyles_unstable =
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
46
|
+
export const useSuggestionStyles_unstable = state => {
|
|
47
|
+
'use no memo';
|
|
48
|
+
|
|
49
|
+
const {
|
|
50
|
+
designVersion,
|
|
51
|
+
mode
|
|
52
|
+
} = state;
|
|
53
|
+
const styles = useSuggestionStyles();
|
|
54
|
+
const nextStyles = useNextStyles();
|
|
55
|
+
state.root.className = mergeClasses(suggestionClassNames.root, styles.root, mode === 'canvas' && styles.canvas, designVersion === 'next' && nextStyles.root, !state.disabled && styles.enabled, state.root.className);
|
|
56
|
+
return state;
|
|
53
57
|
};
|
|
58
|
+
//# sourceMappingURL=useSuggestionStyles.styles.raw.js.map
|
|
@@ -4,10 +4,11 @@ import { renderSuggestionList_unstable } from './renderSuggestionList';
|
|
|
4
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
|
-
export const SuggestionList = /*#__PURE__*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
export const SuggestionList = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
8
|
+
const state = useSuggestionList_unstable(props, ref);
|
|
9
|
+
useSuggestionListStyles_unstable(state);
|
|
10
|
+
useCustomStyleHook('useSuggestionListStyles')(state);
|
|
11
|
+
return renderSuggestionList_unstable(state);
|
|
12
12
|
});
|
|
13
13
|
SuggestionList.displayName = 'SuggestionList';
|
|
14
|
+
//# sourceMappingURL=SuggestionList.js.map
|
|
@@ -2,3 +2,4 @@ export { SuggestionList } from './SuggestionList';
|
|
|
2
2
|
export { renderSuggestionList_unstable } from './renderSuggestionList';
|
|
3
3
|
export { useSuggestionList_unstable } from './useSuggestionList';
|
|
4
4
|
export { suggestionListClassNames, useSuggestionListStyles_unstable } from './useSuggestionListStyles.styles';
|
|
5
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
2
2
|
import { assertSlots } from '@fluentui/react-components';
|
|
3
3
|
/**
|
|
4
4
|
* Render the final JSX of SuggestionList
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
]
|
|
12
|
-
});
|
|
5
|
+
*/
|
|
6
|
+
export const renderSuggestionList_unstable = state => {
|
|
7
|
+
assertSlots(state);
|
|
8
|
+
return /*#__PURE__*/_jsxs(state.root, {
|
|
9
|
+
children: [state.root.children, state.action && /*#__PURE__*/_jsx(state.action, {})]
|
|
10
|
+
});
|
|
13
11
|
};
|
|
12
|
+
//# sourceMappingURL=renderSuggestionList.js.map
|
|
@@ -8,28 +8,33 @@ import { getIntrinsicElementProps, slot, useArrowNavigationGroup } from '@fluent
|
|
|
8
8
|
*
|
|
9
9
|
* @param props - props from this instance of SuggestionList
|
|
10
10
|
* @param ref - reference to root HTMLElement of SuggestionList
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
11
|
+
*/
|
|
12
|
+
export const useSuggestionList_unstable = (props, ref) => {
|
|
13
|
+
const {
|
|
14
|
+
action,
|
|
15
|
+
horizontalAlignment = 'end'
|
|
16
|
+
} = props;
|
|
17
|
+
return {
|
|
18
|
+
horizontalAlignment,
|
|
19
|
+
components: {
|
|
20
|
+
root: 'div',
|
|
21
|
+
action: 'span'
|
|
22
|
+
},
|
|
23
|
+
root: slot.always(getIntrinsicElementProps('div', {
|
|
24
|
+
ref,
|
|
25
|
+
role: 'toolbar',
|
|
26
|
+
'aria-label': 'suggestions',
|
|
27
|
+
...props,
|
|
28
|
+
...useArrowNavigationGroup({
|
|
29
|
+
axis: 'both',
|
|
30
|
+
circular: true
|
|
31
|
+
})
|
|
32
|
+
}), {
|
|
33
|
+
elementType: 'div'
|
|
34
|
+
}),
|
|
35
|
+
action: slot.optional(action, {
|
|
36
|
+
elementType: 'span'
|
|
37
|
+
})
|
|
38
|
+
};
|
|
35
39
|
};
|
|
40
|
+
//# sourceMappingURL=useSuggestionList.js.map
|
|
@@ -1,43 +1,47 @@
|
|
|
1
1
|
import { makeStyles, mergeClasses } from '@fluentui/react-components';
|
|
2
2
|
import { tokens } from '@fluentui-copilot/tokens';
|
|
3
3
|
export const suggestionListClassNames = {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
root: 'fai-SuggestionList',
|
|
5
|
+
action: 'fai-SuggestionList__action'
|
|
6
6
|
};
|
|
7
7
|
/**
|
|
8
8
|
* Styles for the root slot
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
*/
|
|
10
|
+
const useStyles = makeStyles({
|
|
11
|
+
root: {
|
|
12
|
+
display: 'flex',
|
|
13
|
+
flexWrap: 'wrap',
|
|
14
|
+
justifyContent: 'flex-end',
|
|
15
|
+
gap: tokens.spacingVerticalS,
|
|
16
|
+
margin: `
|
|
16
17
|
${tokens.spacingVerticalNone}
|
|
17
18
|
${tokens.spacingHorizontalNone}
|
|
18
19
|
${tokens.spacingVerticalS}
|
|
19
20
|
${tokens.spacingHorizontalNone}
|
|
20
21
|
`,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
horizontalAlignmentStart: {
|
|
26
|
-
justifyContent: 'flex-start'
|
|
27
|
-
},
|
|
28
|
-
action: {
|
|
29
|
-
minWidth: tokens.spacingHorizontalXXL,
|
|
30
|
-
maxWidth: tokens.spacingHorizontalXXL
|
|
22
|
+
'> :nth-last-of-type(2)': {
|
|
23
|
+
maxWidth: `calc(100% - ${tokens.spacingHorizontalXXL} - ${tokens.spacingVerticalS})`
|
|
31
24
|
}
|
|
25
|
+
},
|
|
26
|
+
horizontalAlignmentStart: {
|
|
27
|
+
justifyContent: 'flex-start'
|
|
28
|
+
},
|
|
29
|
+
action: {
|
|
30
|
+
minWidth: tokens.spacingHorizontalXXL,
|
|
31
|
+
maxWidth: tokens.spacingHorizontalXXL
|
|
32
|
+
}
|
|
32
33
|
});
|
|
33
34
|
/**
|
|
34
35
|
* Apply styling to the SuggestionList slots based on the state
|
|
35
|
-
*/
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
36
|
+
*/
|
|
37
|
+
export const useSuggestionListStyles_unstable = state => {
|
|
38
|
+
'use no memo';
|
|
39
|
+
|
|
40
|
+
const styles = useStyles();
|
|
41
|
+
state.root.className = mergeClasses(suggestionListClassNames.root, styles.root, state.horizontalAlignment === 'start' && styles.horizontalAlignmentStart, state.root.className);
|
|
42
|
+
if (state.action) {
|
|
43
|
+
state.action.className = mergeClasses(suggestionListClassNames.action, styles.action, state.action.className);
|
|
44
|
+
}
|
|
45
|
+
return state;
|
|
43
46
|
};
|
|
47
|
+
//# sourceMappingURL=useSuggestionListStyles.styles.raw.js.map
|
package/lib/index.js
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export { Suggestion, suggestionClassNames, useSuggestionStyles_unstable, useSuggestion_unstable } from './Suggestion';
|
|
2
2
|
export { SuggestionList, renderSuggestionList_unstable, suggestionListClassNames, useSuggestionListStyles_unstable, useSuggestionList_unstable } from './SuggestionList';
|
|
3
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -23,4 +23,4 @@ const Suggestion = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
|
23
23
|
(0, _reactprovider.useCustomStyleHook)('useSuggestionStyles')(state);
|
|
24
24
|
return (0, _reactcomponents.renderButton_unstable)(state);
|
|
25
25
|
});
|
|
26
|
-
Suggestion.displayName = 'Suggestion';
|
|
26
|
+
Suggestion.displayName = 'Suggestion'; //# sourceMappingURL=Suggestion.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Suggestion.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useSuggestionStyles_unstable } from './useSuggestionStyles.styles';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { renderButton_unstable, useButtonStyles_unstable } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\nimport { useSuggestion_unstable } from './useSuggestion';\nimport type { SuggestionProps } from './Suggestion.types';\n\n// Suggestion component - TODO: add more docs\nexport const Suggestion: ForwardRefComponent<SuggestionProps> = React.forwardRef((props, ref) => {\n 'use no memo';\n\n const state = useSuggestion_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","
|
|
1
|
+
{"version":3,"sources":["Suggestion.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useSuggestionStyles_unstable } from './useSuggestionStyles.styles';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { renderButton_unstable, useButtonStyles_unstable } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\nimport { useSuggestion_unstable } from './useSuggestion';\nimport type { SuggestionProps } from './Suggestion.types';\n\n// Suggestion component - TODO: add more docs\nexport const Suggestion: ForwardRefComponent<SuggestionProps> = React.forwardRef((props, ref) => {\n 'use no memo';\n\n const state = useSuggestion_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":";;;;+BASaA;;;eAAAA;;;;iEATU;2CACsB;iCAEmB;+BAC7B;+BACI;AAIhC,MAAMA,aAAAA,WAAAA,GAAAA,OAAmDC,UAAMC,CAAU,CAACC,OAACA;;UAIhFC,QAAMC,IAAAA,qCAAmBA,EAAUF,OAAIG;UACvCC,UAAAA,GAAAA,MAAAA,UAAyBH,IAAAA;iDACzBI,EAAAA;+DACmB,EAAAJ;yCAEZK,EAAAA,uBAAsBL;IAC/B,OAAGK,IAAAA,sCAAA,EAAAL;AAEHJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useSuggestion.ts"],"sourcesContent":["import { useButton_unstable } from '@fluentui/react-components';\nimport { useCopilotMode, useDesignVersion } from '@fluentui-copilot/react-provider';\nimport type { SuggestionProps, SuggestionState } from './Suggestion.types';\n\nexport const useSuggestion_unstable = (\n props: SuggestionProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): SuggestionState => {\n const buttonState = useButton_unstable(props, ref);\n const mode = useCopilotMode(props.mode);\n const designVersion = useDesignVersion(props.designVersion);\n return { ...buttonState, mode, designVersion };\n};\n"],"names":["useSuggestion_unstable","props","ref","buttonState","useButton_unstable","mode","useCopilotMode","designVersion","useDesignVersion"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAIaA;;;eAAAA;;;iCAJsB;+BACc;AAG1C,MAAMA,yBAAyB,CACpCC,OACAC;
|
|
1
|
+
{"version":3,"sources":["useSuggestion.ts"],"sourcesContent":["import { useButton_unstable } from '@fluentui/react-components';\nimport { useCopilotMode, useDesignVersion } from '@fluentui-copilot/react-provider';\nimport type { SuggestionProps, SuggestionState } from './Suggestion.types';\n\nexport const useSuggestion_unstable = (\n props: SuggestionProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): SuggestionState => {\n const buttonState = useButton_unstable(props, ref);\n const mode = useCopilotMode(props.mode);\n const designVersion = useDesignVersion(props.designVersion);\n return { ...buttonState, mode, designVersion };\n};\n"],"names":["useSuggestion_unstable","props","ref","buttonState","useButton_unstable","mode","useCopilotMode","designVersion","useDesignVersion"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAIaA;;;eAAAA;;;iCAJsB;+BACc;AAG1C,MAAMA,yBAAyB,CACpCC,OACAC;UAEAC,cAAMA,IAAAA,mCAAcC,EAAAA,OAAmBH;UACvCI,OAAMA,IAAAA,6BAAOC,EAAAA,MAAeL,IAAMI;UAClCE,gBAAMA,IAAAA,+BAAgBC,EAAAA,MAAiBP,aAAMM;WAC7C;sBAAYJ;;;;AACd"}
|
|
@@ -68,4 +68,4 @@ const useSuggestionStyles_unstable = (state)=>{
|
|
|
68
68
|
const nextStyles = useNextStyles();
|
|
69
69
|
state.root.className = (0, _reactcomponents.mergeClasses)(suggestionClassNames.root, styles.root, mode === 'canvas' && styles.canvas, designVersion === 'next' && nextStyles.root, !state.disabled && styles.enabled, state.root.className);
|
|
70
70
|
return state;
|
|
71
|
-
};
|
|
71
|
+
}; //# sourceMappingURL=useSuggestionStyles.styles.raw.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useSuggestionStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands, typographyStyles } from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\nimport type { SlotClassNames, ButtonSlots } from '@fluentui/react-components';\nimport type { SuggestionState } from './Suggestion.types';\n\nexport const suggestionClassNames: SlotClassNames<ButtonSlots> = {\n root: 'fai-Suggestion',\n icon: 'fai-Suggestion__icon',\n};\n\nconst useSuggestionStyles = makeStyles({\n root: {\n ...typographyStyles.caption1,\n // Brand/M365/140\n ...shorthands.border('1px', 'solid', tokens.colorBrandStroke2),\n borderRadius: tokens.borderRadiusXLarge,\n 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 canvas: {\n ...typographyStyles.body1,\n padding: `${tokens.spacingVerticalSNudge} ${tokens.spacingHorizontalM}`,\n },\n});\n\nconst useNextStyles = makeStyles({\n root: {\n paddingHorizontal: tokens.spacingHorizontalM,\n paddingVertical: tokens.spacingVerticalSNudge,\n fontSize: tokens.fontSizeBase200,\n },\n});\n\nexport const useSuggestionStyles_unstable = (state: SuggestionState): SuggestionState => {\n 'use no memo';\n\n const { designVersion, mode } = state;\n\n const styles = useSuggestionStyles();\n const nextStyles = useNextStyles();\n state.root.className = mergeClasses(\n suggestionClassNames.root,\n styles.root,\n mode === 'canvas' && styles.canvas,\n designVersion === 'next' && nextStyles.root,\n !state.disabled && styles.enabled,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["suggestionClassNames","useSuggestionStyles_unstable","root","icon","useSuggestionStyles","makeStyles","typographyStyles","caption1","shorthands","border","tokens","colorBrandStroke2","borderRadius","borderRadiusXLarge","padding","spacingVerticalXS","spacingVerticalS","color","colorNeutralForeground2","textAlign","enabled","borderColor","colorBrandStroke2Hover","colorBrandForeground2Hover","backgroundColor","colorBrandBackground2Hover","colorBrandStroke2Pressed","colorBrandForeground2Pressed","colorBrandBackground2Pressed","canvas","body1","spacingVerticalSNudge","spacingHorizontalM","useNextStyles","paddingHorizontal","paddingVertical","fontSize","fontSizeBase200","state","designVersion","
|
|
1
|
+
{"version":3,"sources":["useSuggestionStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands, typographyStyles } from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\nimport type { SlotClassNames, ButtonSlots } from '@fluentui/react-components';\nimport type { SuggestionState } from './Suggestion.types';\n\nexport const suggestionClassNames: SlotClassNames<ButtonSlots> = {\n root: 'fai-Suggestion',\n icon: 'fai-Suggestion__icon',\n};\n\nconst useSuggestionStyles = makeStyles({\n root: {\n ...typographyStyles.caption1,\n // Brand/M365/140\n ...shorthands.border('1px', 'solid', tokens.colorBrandStroke2),\n borderRadius: tokens.borderRadiusXLarge,\n 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 canvas: {\n ...typographyStyles.body1,\n padding: `${tokens.spacingVerticalSNudge} ${tokens.spacingHorizontalM}`,\n },\n});\n\nconst useNextStyles = makeStyles({\n root: {\n paddingHorizontal: tokens.spacingHorizontalM,\n paddingVertical: tokens.spacingVerticalSNudge,\n fontSize: tokens.fontSizeBase200,\n },\n});\n\nexport const useSuggestionStyles_unstable = (state: SuggestionState): SuggestionState => {\n 'use no memo';\n\n const { designVersion, mode } = state;\n\n const styles = useSuggestionStyles();\n const nextStyles = useNextStyles();\n state.root.className = mergeClasses(\n suggestionClassNames.root,\n styles.root,\n mode === 'canvas' && styles.canvas,\n designVersion === 'next' && nextStyles.root,\n !state.disabled && styles.enabled,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["suggestionClassNames","useSuggestionStyles_unstable","root","icon","useSuggestionStyles","makeStyles","typographyStyles","caption1","shorthands","border","tokens","colorBrandStroke2","borderRadius","borderRadiusXLarge","padding","spacingVerticalXS","spacingVerticalS","color","colorNeutralForeground2","textAlign","enabled","borderColor","colorBrandStroke2Hover","colorBrandForeground2Hover","backgroundColor","colorBrandBackground2Hover","colorBrandStroke2Pressed","colorBrandForeground2Pressed","colorBrandBackground2Pressed","canvas","body1","spacingVerticalSNudge","spacingHorizontalM","useNextStyles","paddingHorizontal","paddingVertical","fontSize","fontSizeBase200","state","designVersion","nextStyles","styles"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAKaA,oBAAAA;eAAAA;;IAgDAC,4BAAAA;eAAAA;;;iCArD0D;wBAChD;AAIhB,MAAMD,uBAAoD;UAC/DE;UACAC;AACF;AAEA,MAAMC,sBAAsBC,IAAAA,2BAAAA,EAAW;UACrCH;4CACKI,CAAAA,QAAiBC;0BACpB;sCACGC,CAAAA,MAAWC,CAAAA,OAAO,SAAOC,cAASA,CAAAA,iBAAOC,CAAAA;sBAC5CC,cAAcF,CAAAA,kBAAOG;iBACrBC,CAAAA,EAAAA,cAAYJ,CAAAA,iBAAOK,CAAAA,CAAAA,EAAiBL,cAAIA,CAAAA,gBAAOM,CAAAA,CAAAA;eAC/CC,cAAOP,CAAAA,uBAAOQ;mBACdC;;aAIFC;wCACE;sBACE;kCACE;8CACGZ,CAAAA,WAAWa,CAAAA,cAAAA,CAAWC,sBAAQA,CAAAA;qCACjCL,CAAAA,0BAAcM;iCACdC,cAAAA,CAAAA,0BAAwBC;;wDAE1B;6BACA;kCACE;8CACGjB,CAAAA,WAAWa,CAAAA,cAAAA,CAAWK,wBAAQA,CAAAA;qCACjCT,CAAAA,4BAAcU;iCACdH,cAAAA,CAAAA,4BAAwBI;;;;YAI9BC;4CACKvB,CAAAA,KAAiBwB;iBACpBhB,CAAAA,EAAAA,cAAYJ,CAAAA,qBAAOqB,CAAAA,CAAAA,EAAqBrB,cAAIA,CAAAA,kBAAOsB,CAAAA,CAAAA;;AAEvD;AAEA,MAAMC,gBAAgB5B,IAAAA,2BAAAA,EAAW;UAC/BH;2BACEgC,cAAmBxB,CAAAA,kBAAOsB;yBAC1BG,cAAiBzB,CAAAA,qBAAOqB;kBACxBK,cAAU1B,CAAAA,eAAO2B;;AAErB;AAEO,MAAMpC,+BAA+BqC,CAAAA;;UAK1C,EACAC,aAAMC,EACNF,IAAAA,KASAA;IACA,MAAAG,SAAArC"}
|
|
@@ -20,4 +20,4 @@ const SuggestionList = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
|
20
20
|
(0, _reactprovider.useCustomStyleHook)('useSuggestionListStyles')(state);
|
|
21
21
|
return (0, _renderSuggestionList.renderSuggestionList_unstable)(state);
|
|
22
22
|
});
|
|
23
|
-
SuggestionList.displayName = 'SuggestionList';
|
|
23
|
+
SuggestionList.displayName = 'SuggestionList'; //# sourceMappingURL=SuggestionList.js.map
|
|
@@ -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.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","
|
|
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"}
|
|
@@ -29,3 +29,4 @@ const _SuggestionList = require("./SuggestionList");
|
|
|
29
29
|
const _renderSuggestionList = require("./renderSuggestionList");
|
|
30
30
|
const _useSuggestionList = require("./useSuggestionList");
|
|
31
31
|
const _useSuggestionListStylesstyles = require("./useSuggestionListStyles.styles");
|
|
32
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderSuggestionList.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { SuggestionListState, SuggestionListSlots } from './SuggestionList.types';\n\n/**\n * Render the final JSX of SuggestionList\n */\nexport const renderSuggestionList_unstable = (state: SuggestionListState) => {\n assertSlots<SuggestionListSlots>(state);\n\n return (\n <state.root>\n {state.root.children}\n {state.action && <state.action />}\n </state.root>\n );\n};\n"],"names":["
|
|
1
|
+
{"version":3,"sources":["renderSuggestionList.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { SuggestionListState, SuggestionListSlots } from './SuggestionList.types';\n\n/**\n * Render the final JSX of SuggestionList\n */\nexport const renderSuggestionList_unstable = (state: SuggestionListState) => {\n assertSlots<SuggestionListSlots>(state);\n\n return (\n <state.root>\n {state.root.children}\n {state.action && <state.action />}\n </state.root>\n );\n};\n"],"names":["assertSlots","state","root","children","action","_jsx"],"rangeMappings":";;;;;;;;;;;;;;;;;;","mappings":";;;;+BAUEA;;;eAAAA;;;4BATF;iCAE4B;AAO1BA,MAAAA,gCAAiCC,CAAAA;oCAEjC,EAAAA;;kBAEKA;YAAAA,MAAMC,IAAKC,CAAAA,QAAQ;YAAAF,MAAAG,MAAA,IAAA,WAAA,GAAAC,IAAAA,eAAA,EAAAJ,MAAAG,MAAA,EAAA,CAAA;SAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useSuggestionList.tsx"],"sourcesContent":["import { getIntrinsicElementProps, slot, useArrowNavigationGroup } from '@fluentui/react-components';\nimport type { SuggestionListProps, SuggestionListState } from './SuggestionList.types';\n\n// If you add JSX to this file, be sure to change the file type to .tsx\n\n/**\n * Create the state required to render SuggestionList.\n *\n * The returned state can be modified with hooks such as useSuggestionListStyles_unstable,\n * before being passed to renderSuggestionList_unstable.\n *\n * @param props - props from this instance of SuggestionList\n * @param ref - reference to root HTMLElement of SuggestionList\n */\nexport const useSuggestionList_unstable = (\n props: SuggestionListProps,\n ref: React.Ref<HTMLDivElement>,\n): SuggestionListState => {\n const { action, horizontalAlignment = 'end' } = props;\n return {\n horizontalAlignment,\n components: {\n root: 'div',\n action: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n role: 'toolbar',\n 'aria-label': 'suggestions',\n ...props,\n ...useArrowNavigationGroup({ axis: 'both', circular: true }),\n }),\n { elementType: 'div' },\n ),\n action: slot.optional(action, { elementType: 'span' }),\n };\n};\n"],"names":["
|
|
1
|
+
{"version":3,"sources":["useSuggestionList.tsx"],"sourcesContent":["import { getIntrinsicElementProps, slot, useArrowNavigationGroup } from '@fluentui/react-components';\nimport type { SuggestionListProps, SuggestionListState } from './SuggestionList.types';\n\n// If you add JSX to this file, be sure to change the file type to .tsx\n\n/**\n * Create the state required to render SuggestionList.\n *\n * The returned state can be modified with hooks such as useSuggestionListStyles_unstable,\n * before being passed to renderSuggestionList_unstable.\n *\n * @param props - props from this instance of SuggestionList\n * @param ref - reference to root HTMLElement of SuggestionList\n */\nexport const useSuggestionList_unstable = (\n props: SuggestionListProps,\n ref: React.Ref<HTMLDivElement>,\n): SuggestionListState => {\n const { action, horizontalAlignment = 'end' } = props;\n return {\n horizontalAlignment,\n components: {\n root: 'div',\n action: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n role: 'toolbar',\n 'aria-label': 'suggestions',\n ...props,\n ...useArrowNavigationGroup({ axis: 'both', circular: true }),\n }),\n { elementType: 'div' },\n ),\n action: slot.optional(action, { elementType: 'span' }),\n };\n};\n"],"names":["action","props","ref","horizontalAlignment","slot","role","getIntrinsicElementProps","circular","useArrowNavigationGroup","elementType","optional"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAkBUA;;;eAAAA;;;iCAlB8D;AAkBtE,MAAQA,6BAA8B,CAAAC,OAAOC;UAC7C,QACEC,wBACY,KAAA;;;oBAINC;kBAEFF;oBACAG;;mCAEA,CAAGJ,MAAK,CAAAK,IAAAA,yCAAA,EAAA,OAAA;;;0BACmCC;oBAAiB;eAC9DC,IAAAA,wCACA,EAAA;sBAAEC;gBAAmBF,UAAA;cAEvBP;;yBAAoD;QACtD;QACAA,QAAAI,qBAAA,CAAAM,QAAA,CAAAV,QAAA"}
|
|
@@ -56,4 +56,4 @@ const useSuggestionListStyles_unstable = (state)=>{
|
|
|
56
56
|
state.action.className = (0, _reactcomponents.mergeClasses)(suggestionListClassNames.action, styles.action, state.action.className);
|
|
57
57
|
}
|
|
58
58
|
return state;
|
|
59
|
-
};
|
|
59
|
+
}; //# sourceMappingURL=useSuggestionListStyles.styles.raw.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useSuggestionListStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\nimport type { SuggestionListSlots, SuggestionListState } from './SuggestionList.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const suggestionListClassNames: SlotClassNames<SuggestionListSlots> = {\n root: 'fai-SuggestionList',\n action: 'fai-SuggestionList__action',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n flexWrap: 'wrap',\n justifyContent: 'flex-end',\n gap: tokens.spacingVerticalS,\n margin: `\n ${tokens.spacingVerticalNone}\n ${tokens.spacingHorizontalNone}\n ${tokens.spacingVerticalS}\n ${tokens.spacingHorizontalNone}\n `,\n '> :nth-last-of-type(2)': {\n maxWidth: `calc(100% - ${tokens.spacingHorizontalXXL} - ${tokens.spacingVerticalS})`,\n },\n },\n horizontalAlignmentStart: {\n justifyContent: 'flex-start',\n },\n\n action: {\n minWidth: tokens.spacingHorizontalXXL,\n maxWidth: tokens.spacingHorizontalXXL,\n },\n\n // TODO add additional classes for different states and/or slots\n});\n\n/**\n * Apply styling to the SuggestionList slots based on the state\n */\nexport const useSuggestionListStyles_unstable = (state: SuggestionListState): SuggestionListState => {\n 'use no memo';\n\n const styles = useStyles();\n state.root.className = mergeClasses(\n suggestionListClassNames.root,\n styles.root,\n state.horizontalAlignment === 'start' && styles.horizontalAlignmentStart,\n state.root.className,\n );\n\n if (state.action) {\n state.action.className = mergeClasses(suggestionListClassNames.action, styles.action, state.action.className);\n }\n\n return state;\n};\n"],"names":["suggestionListClassNames","
|
|
1
|
+
{"version":3,"sources":["useSuggestionListStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\nimport type { SuggestionListSlots, SuggestionListState } from './SuggestionList.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const suggestionListClassNames: SlotClassNames<SuggestionListSlots> = {\n root: 'fai-SuggestionList',\n action: 'fai-SuggestionList__action',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n flexWrap: 'wrap',\n justifyContent: 'flex-end',\n gap: tokens.spacingVerticalS,\n margin: `\n ${tokens.spacingVerticalNone}\n ${tokens.spacingHorizontalNone}\n ${tokens.spacingVerticalS}\n ${tokens.spacingHorizontalNone}\n `,\n '> :nth-last-of-type(2)': {\n maxWidth: `calc(100% - ${tokens.spacingHorizontalXXL} - ${tokens.spacingVerticalS})`,\n },\n },\n horizontalAlignmentStart: {\n justifyContent: 'flex-start',\n },\n\n action: {\n minWidth: tokens.spacingHorizontalXXL,\n maxWidth: tokens.spacingHorizontalXXL,\n },\n\n // TODO add additional classes for different states and/or slots\n});\n\n/**\n * Apply styling to the SuggestionList slots based on the state\n */\nexport const useSuggestionListStyles_unstable = (state: SuggestionListState): SuggestionListState => {\n 'use no memo';\n\n const styles = useStyles();\n state.root.className = mergeClasses(\n suggestionListClassNames.root,\n styles.root,\n state.horizontalAlignment === 'start' && styles.horizontalAlignmentStart,\n state.root.className,\n );\n\n if (state.action) {\n state.action.className = mergeClasses(suggestionListClassNames.action, styles.action, state.action.className);\n }\n\n return state;\n};\n"],"names":["suggestionListClassNames","styles","useStyles","root","action","makeStyles","display","flexWrap","justifyContent","spacingVerticalS","margin","tokens","spacingHorizontalNone","spacingHorizontalXXL","minWidth","maxWidth","state","className","mergeClasses","horizontalAlignment","horizontalAlignmentStart"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAKaA,wBAAAA;eAAAA;;IA0CLC,gCAASC;eAATD;;;iCA/CiC;wBAClB;AAIhB,MAAMD,2BAAgE;UAC3EG;YACAC;AACF;AAEA;;CAEC,SAECD,YAAME,IAAAA,2BAAA,EAAA;UACJC;iBACAC;kBACAC;wBACYC;aACZC,cAAAA,CAAQD,gBAAC;gBACLE,CAAAA;MACF,EAAEA,cAAAA,CAAOC,mBAAAA,CAAAA;MACT,EAAED,cAAAA,CAAOF,qBAAiB,CAAA;MAC1B,EAAEE,cAAAA,CAAOC,gBAAAA,CAAAA;MACV,EAAAD,cAAA,CAAAC,qBAAA,CAAA;;kCAEY;sBACb,CAAA,YAAA,EAAAD,cAAA,CAAAE,oBAAA,CAAA,GAAA,EAAAF,cAAA,CAAAF,gBAAA,CAAA,CAAA,CAAA;QACF;;8BAEkB;QAClBD,gBAAA;;YAGEM;kBACAC,cAAUJ,CAAAA,oBAAOE;QACnBE,UAAAJ,cAAA,CAAAE,oBAAA;IAGF;AAEA;AAME,MAAMZ,mCAASC,CAAAA;;UASbc,SAAMZ;UACRD,IAAA,CAAAc,SAAA,GAAAC,IAAAA,6BAAA,EAAAlB,yBAAAG,IAAA,EAAAF,OAAAE,IAAA,EAAAa,MAAAG,mBAAA,KAAA,WAAAlB,OAAAmB,wBAAA,EAAAJ,MAAAb,IAAA,CAAAc,SAAA;QAEAD,MAAOA,MAAAA,EAAAA;QACPA,MAAAZ,MAAA,CAAAa,SAAA,GAAAC,IAAAA,6BAAA,EAAAlB,yBAAAI,MAAA,EAAAH,OAAAG,MAAA,EAAAY,MAAAZ,MAAA,CAAAa,SAAA"}
|
package/lib-commonjs/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-copilot/react-suggestions",
|
|
3
|
-
"version": "0.12.3-hotfix.
|
|
3
|
+
"version": "0.12.3-hotfix.2",
|
|
4
4
|
"description": "A Fluent AI package",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
},
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@fluentui-copilot/react-provider": "0.11.3-hotfix.
|
|
16
|
-
"@fluentui-copilot/tokens": "0.3.11-hotfix.
|
|
15
|
+
"@fluentui-copilot/react-provider": "0.11.3-hotfix.2",
|
|
16
|
+
"@fluentui-copilot/tokens": "0.3.11-hotfix.2",
|
|
17
17
|
"@swc/helpers": "^0.5.1"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|