@fluentui-copilot/react-prompt-listbox 0.8.0 → 0.8.1-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 +31 -1
- package/CHANGELOG.md +11 -2
- package/lib/components/PromptListbox/usePromptListboxStyles.styles.raw.js +35 -0
- package/lib/components/PromptListbox/usePromptListboxStyles.styles.raw.js.map +1 -0
- package/lib/components/PromptOption/usePromptOptionStyles.styles.raw.js +74 -0
- package/lib/components/PromptOption/usePromptOptionStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/PromptListbox/usePromptListboxStyles.styles.raw.js +47 -0
- package/lib-commonjs/components/PromptListbox/usePromptListboxStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/PromptOption/usePromptOptionStyles.styles.raw.js +84 -0
- package/lib-commonjs/components/PromptOption/usePromptOptionStyles.styles.raw.js.map +1 -0
- package/package.json +11 -15
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,37 @@
|
|
|
2
2
|
"name": "@fluentui-copilot/react-prompt-listbox",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Fri, 19 Sep 2025 15:10:20 GMT",
|
|
6
|
+
"tag": "@fluentui-copilot/react-prompt-listbox_v0.8.1-hotfix.2",
|
|
7
|
+
"version": "0.8.1-hotfix.2",
|
|
8
|
+
"comments": {
|
|
9
|
+
"prerelease": [
|
|
10
|
+
{
|
|
11
|
+
"author": "hochelmartin@gmail.com",
|
|
12
|
+
"package": "@fluentui-copilot/react-prompt-listbox",
|
|
13
|
+
"commit": "3e4ebe676646c4c4346dbbab83511f963ffefd85",
|
|
14
|
+
"comment": "release: prepare hotfix 0.26.2-hotfix.2"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Mon, 19 May 2025 18:04:28 GMT",
|
|
21
|
+
"tag": "@fluentui-copilot/react-prompt-listbox_v0.8.1",
|
|
22
|
+
"version": "0.8.1",
|
|
23
|
+
"comments": {
|
|
24
|
+
"none": [
|
|
25
|
+
{
|
|
26
|
+
"author": "hochelmartin@gmail.com",
|
|
27
|
+
"package": "@fluentui-copilot/react-prompt-listbox",
|
|
28
|
+
"commit": "442954951d0eca92de20ecb0ff0fa9492431b62d",
|
|
29
|
+
"comment": "fix: exclude story files from production build"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"date": "Sat, 03 May 2025 01:27:44 GMT",
|
|
6
36
|
"tag": "@fluentui-copilot/react-prompt-listbox_v0.8.0",
|
|
7
37
|
"version": "0.8.0",
|
|
8
38
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
# Change Log - @fluentui-copilot/react-prompt-listbox
|
|
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.8.1-hotfix.2](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-prompt-listbox_v0.8.1-hotfix.2)
|
|
8
|
+
|
|
9
|
+
Fri, 19 Sep 2025 15:10:20 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-prompt-listbox_v0.8.1..@fluentui-copilot/react-prompt-listbox_v0.8.1-hotfix.2)
|
|
11
|
+
|
|
12
|
+
### Changes
|
|
13
|
+
|
|
14
|
+
- release: prepare hotfix 0.26.2-hotfix.2 ([PR #3284](https://github.com/microsoft/fluentai/pull/3284) by hochelmartin@gmail.com)
|
|
15
|
+
|
|
7
16
|
## [0.8.0](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-prompt-listbox_v0.8.0)
|
|
8
17
|
|
|
9
|
-
Sat, 03 May 2025 01:
|
|
18
|
+
Sat, 03 May 2025 01:27:44 GMT
|
|
10
19
|
[Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-prompt-listbox_v0.7.2..@fluentui-copilot/react-prompt-listbox_v0.8.0)
|
|
11
20
|
|
|
12
21
|
### Patches
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { makeStyles, mergeClasses } from '@fluentui/react-components';
|
|
2
|
+
import { tokens } from '@fluentui-copilot/tokens';
|
|
3
|
+
export const promptListboxClassNames = {
|
|
4
|
+
root: 'fai-PromptListbox'
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Styles for the root slot
|
|
8
|
+
*/
|
|
9
|
+
const useStyles = makeStyles({
|
|
10
|
+
listbox: {
|
|
11
|
+
boxShadow: tokens.shadow16,
|
|
12
|
+
borderRadius: tokens.borderRadiusMedium,
|
|
13
|
+
maxHeight: '80vh',
|
|
14
|
+
boxSizing: 'border-box'
|
|
15
|
+
},
|
|
16
|
+
listboxCollapsed: {
|
|
17
|
+
display: 'none'
|
|
18
|
+
},
|
|
19
|
+
// When rendering inline, the popupSurface will be rendered under relatively positioned elements such as Input.
|
|
20
|
+
// This is due to the surface being positioned as absolute, therefore zIndex: 1 ensures that won't happen.
|
|
21
|
+
inlineListbox: {
|
|
22
|
+
zIndex: 1
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
/**
|
|
26
|
+
* Apply styling to the PromptListbox slots based on the state
|
|
27
|
+
*/
|
|
28
|
+
export const usePromptListboxStyles_unstable = state => {
|
|
29
|
+
'use no memo';
|
|
30
|
+
|
|
31
|
+
const styles = useStyles();
|
|
32
|
+
state.root.className = mergeClasses(promptListboxClassNames.root, styles.listbox, state.inlinePopup && styles.inlineListbox, !state.open && styles.listboxCollapsed, state.root.className);
|
|
33
|
+
return state;
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=usePromptListboxStyles.styles.raw.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["usePromptListboxStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\nimport type { PromptListboxSlots, PromptListboxState } from './PromptListbox.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const promptListboxClassNames: SlotClassNames<PromptListboxSlots> = {\n root: 'fai-PromptListbox',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n listbox: {\n boxShadow: tokens.shadow16,\n borderRadius: tokens.borderRadiusMedium,\n maxHeight: '80vh',\n boxSizing: 'border-box',\n },\n\n listboxCollapsed: {\n display: 'none',\n },\n\n // When rendering inline, the popupSurface will be rendered under relatively positioned elements such as Input.\n // This is due to the surface being positioned as absolute, therefore zIndex: 1 ensures that won't happen.\n inlineListbox: {\n zIndex: 1,\n },\n});\n\n/**\n * Apply styling to the PromptListbox slots based on the state\n */\nexport const usePromptListboxStyles_unstable = (state: PromptListboxState): PromptListboxState => {\n 'use no memo';\n\n const styles = useStyles();\n state.root.className = mergeClasses(\n promptListboxClassNames.root,\n styles.listbox,\n state.inlinePopup && styles.inlineListbox,\n !state.open && styles.listboxCollapsed,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","tokens","promptListboxClassNames","root","useStyles","listbox","boxShadow","shadow16","borderRadius","borderRadiusMedium","maxHeight","boxSizing","listboxCollapsed","display","inlineListbox","zIndex","usePromptListboxStyles_unstable","state","styles","className","inlinePopup","open"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,QAAQ,6BAA6B;AACtE,SAASC,MAAM,QAAQ,2BAA2B;AAIlD,OAAO,MAAMC,0BAA8D;IACzEC,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYL,WAAW;IAC3BM,SAAS;QACPC,WAAWL,OAAOM,QAAQ;QAC1BC,cAAcP,OAAOQ,kBAAkB;QACvCC,WAAW;QACXC,WAAW;IACb;IAEAC,kBAAkB;QAChBC,SAAS;IACX;IAEA,+GAA+G;IAC/G,0GAA0G;IAC1GC,eAAe;QACbC,QAAQ;IACV;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,kCAAkC,CAACC;IAC9C;IAEA,MAAMC,SAASd;IACfa,MAAMd,IAAI,CAACgB,SAAS,GAAGnB,aACrBE,wBAAwBC,IAAI,EAC5Be,OAAOb,OAAO,EACdY,MAAMG,WAAW,IAAIF,OAAOJ,aAAa,EACzC,CAACG,MAAMI,IAAI,IAAIH,OAAON,gBAAgB,EACtCK,MAAMd,IAAI,CAACgB,SAAS;IAGtB,OAAOF;AACT,EAAE"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { makeStyles, mergeClasses, shorthands } from '@fluentui/react-components';
|
|
2
|
+
import { tokens } from '@fluentui-copilot/tokens';
|
|
3
|
+
import { ACTIVEDESCENDANT_FOCUSVISIBLE_ATTRIBUTE } from '@fluentui/react-aria';
|
|
4
|
+
export const promptOptionClassNames = {
|
|
5
|
+
root: 'fai-PromptOption'
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Styles for the root slot
|
|
9
|
+
*/
|
|
10
|
+
const useStyles = makeStyles({
|
|
11
|
+
root: {
|
|
12
|
+
alignItems: 'center',
|
|
13
|
+
borderRadius: tokens.borderRadiusMedium,
|
|
14
|
+
color: tokens.colorNeutralForeground1,
|
|
15
|
+
columnGap: tokens.spacingHorizontalXS,
|
|
16
|
+
cursor: 'pointer',
|
|
17
|
+
display: 'flex',
|
|
18
|
+
fontFamily: tokens.fontFamilyBase,
|
|
19
|
+
fontSize: tokens.fontSizeBase300,
|
|
20
|
+
lineHeight: tokens.lineHeightBase300,
|
|
21
|
+
padding: `${tokens.spacingVerticalSNudge} ${tokens.spacingHorizontalS}`,
|
|
22
|
+
position: 'relative',
|
|
23
|
+
':hover': {
|
|
24
|
+
backgroundColor: tokens.colorNeutralBackground1Hover,
|
|
25
|
+
color: tokens.colorNeutralForeground1Hover
|
|
26
|
+
},
|
|
27
|
+
':active': {
|
|
28
|
+
backgroundColor: tokens.colorNeutralBackground1Pressed,
|
|
29
|
+
color: tokens.colorNeutralForeground1Pressed
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
active: {
|
|
33
|
+
[`[${ACTIVEDESCENDANT_FOCUSVISIBLE_ATTRIBUTE}]::after`]: {
|
|
34
|
+
content: '""',
|
|
35
|
+
position: 'absolute',
|
|
36
|
+
pointerEvents: 'none',
|
|
37
|
+
zIndex: 1,
|
|
38
|
+
...shorthands.border(tokens.strokeWidthThick, `solid`, tokens.colorStrokeFocus2),
|
|
39
|
+
borderRadius: tokens.borderRadiusMedium,
|
|
40
|
+
top: '-2px',
|
|
41
|
+
bottom: '-2px',
|
|
42
|
+
left: '-2px',
|
|
43
|
+
right: '-2px'
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
disabled: {
|
|
47
|
+
color: tokens.colorNeutralForegroundDisabled,
|
|
48
|
+
':hover': {
|
|
49
|
+
backgroundColor: tokens.colorTransparentBackground,
|
|
50
|
+
color: tokens.colorNeutralForegroundDisabled
|
|
51
|
+
},
|
|
52
|
+
':active': {
|
|
53
|
+
backgroundColor: tokens.colorTransparentBackground,
|
|
54
|
+
color: tokens.colorNeutralForegroundDisabled
|
|
55
|
+
},
|
|
56
|
+
'@media (forced-colors: active)': {
|
|
57
|
+
color: 'GrayText'
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
/**
|
|
62
|
+
* Apply styling to the PromptOption slots based on the state
|
|
63
|
+
*/
|
|
64
|
+
export const usePromptOptionStyles_unstable = state => {
|
|
65
|
+
'use no memo';
|
|
66
|
+
|
|
67
|
+
const {
|
|
68
|
+
disabled
|
|
69
|
+
} = state;
|
|
70
|
+
const styles = useStyles();
|
|
71
|
+
state.root.className = mergeClasses(promptOptionClassNames.root, styles.root, styles.active, disabled && styles.disabled, state.root.className);
|
|
72
|
+
return state;
|
|
73
|
+
};
|
|
74
|
+
//# sourceMappingURL=usePromptOptionStyles.styles.raw.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["usePromptOptionStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\nimport { ACTIVEDESCENDANT_FOCUSVISIBLE_ATTRIBUTE } from '@fluentui/react-aria';\nimport type { PromptOptionSlots, PromptOptionState } from './PromptOption.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const promptOptionClassNames: SlotClassNames<PromptOptionSlots> = {\n root: 'fai-PromptOption',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n alignItems: 'center',\n borderRadius: tokens.borderRadiusMedium,\n color: tokens.colorNeutralForeground1,\n columnGap: tokens.spacingHorizontalXS,\n cursor: 'pointer',\n display: 'flex',\n fontFamily: tokens.fontFamilyBase,\n fontSize: tokens.fontSizeBase300,\n lineHeight: tokens.lineHeightBase300,\n padding: `${tokens.spacingVerticalSNudge} ${tokens.spacingHorizontalS}`,\n position: 'relative',\n\n ':hover': {\n backgroundColor: tokens.colorNeutralBackground1Hover,\n color: tokens.colorNeutralForeground1Hover,\n },\n\n ':active': {\n backgroundColor: tokens.colorNeutralBackground1Pressed,\n color: tokens.colorNeutralForeground1Pressed,\n },\n },\n\n active: {\n [`[${ACTIVEDESCENDANT_FOCUSVISIBLE_ATTRIBUTE}]::after`]: {\n content: '\"\"',\n position: 'absolute',\n pointerEvents: 'none',\n zIndex: 1,\n\n ...shorthands.border(tokens.strokeWidthThick, `solid`, tokens.colorStrokeFocus2),\n borderRadius: tokens.borderRadiusMedium,\n\n top: '-2px',\n bottom: '-2px',\n left: '-2px',\n right: '-2px',\n },\n },\n\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n\n ':hover': {\n backgroundColor: tokens.colorTransparentBackground,\n color: tokens.colorNeutralForegroundDisabled,\n },\n\n ':active': {\n backgroundColor: tokens.colorTransparentBackground,\n color: tokens.colorNeutralForegroundDisabled,\n },\n\n '@media (forced-colors: active)': {\n color: 'GrayText',\n },\n },\n});\n\n/**\n * Apply styling to the PromptOption slots based on the state\n */\nexport const usePromptOptionStyles_unstable = (state: PromptOptionState): PromptOptionState => {\n 'use no memo';\n\n const { disabled } = state;\n const styles = useStyles();\n state.root.className = mergeClasses(\n promptOptionClassNames.root,\n styles.root,\n styles.active,\n disabled && styles.disabled,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","shorthands","tokens","ACTIVEDESCENDANT_FOCUSVISIBLE_ATTRIBUTE","promptOptionClassNames","root","useStyles","alignItems","borderRadius","borderRadiusMedium","color","colorNeutralForeground1","columnGap","spacingHorizontalXS","cursor","display","fontFamily","fontFamilyBase","fontSize","fontSizeBase300","lineHeight","lineHeightBase300","padding","spacingVerticalSNudge","spacingHorizontalS","position","backgroundColor","colorNeutralBackground1Hover","colorNeutralForeground1Hover","colorNeutralBackground1Pressed","colorNeutralForeground1Pressed","active","content","pointerEvents","zIndex","border","strokeWidthThick","colorStrokeFocus2","top","bottom","left","right","disabled","colorNeutralForegroundDisabled","colorTransparentBackground","usePromptOptionStyles_unstable","state","styles","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,EAAEC,UAAU,QAAQ,6BAA6B;AAClF,SAASC,MAAM,QAAQ,2BAA2B;AAClD,SAASC,uCAAuC,QAAQ,uBAAuB;AAI/E,OAAO,MAAMC,yBAA4D;IACvEC,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYP,WAAW;IAC3BM,MAAM;QACJE,YAAY;QACZC,cAAcN,OAAOO,kBAAkB;QACvCC,OAAOR,OAAOS,uBAAuB;QACrCC,WAAWV,OAAOW,mBAAmB;QACrCC,QAAQ;QACRC,SAAS;QACTC,YAAYd,OAAOe,cAAc;QACjCC,UAAUhB,OAAOiB,eAAe;QAChCC,YAAYlB,OAAOmB,iBAAiB;QACpCC,SAAS,CAAC,EAAEpB,OAAOqB,qBAAqB,CAAC,CAAC,EAAErB,OAAOsB,kBAAkB,CAAC,CAAC;QACvEC,UAAU;QAEV,UAAU;YACRC,iBAAiBxB,OAAOyB,4BAA4B;YACpDjB,OAAOR,OAAO0B,4BAA4B;QAC5C;QAEA,WAAW;YACTF,iBAAiBxB,OAAO2B,8BAA8B;YACtDnB,OAAOR,OAAO4B,8BAA8B;QAC9C;IACF;IAEAC,QAAQ;QACN,CAAC,CAAC,CAAC,EAAE5B,wCAAwC,QAAQ,CAAC,CAAC,EAAE;YACvD6B,SAAS;YACTP,UAAU;YACVQ,eAAe;YACfC,QAAQ;YAER,GAAGjC,WAAWkC,MAAM,CAACjC,OAAOkC,gBAAgB,EAAE,CAAC,KAAK,CAAC,EAAElC,OAAOmC,iBAAiB,CAAC;YAChF7B,cAAcN,OAAOO,kBAAkB;YAEvC6B,KAAK;YACLC,QAAQ;YACRC,MAAM;YACNC,OAAO;QACT;IACF;IAEAC,UAAU;QACRhC,OAAOR,OAAOyC,8BAA8B;QAE5C,UAAU;YACRjB,iBAAiBxB,OAAO0C,0BAA0B;YAClDlC,OAAOR,OAAOyC,8BAA8B;QAC9C;QAEA,WAAW;YACTjB,iBAAiBxB,OAAO0C,0BAA0B;YAClDlC,OAAOR,OAAOyC,8BAA8B;QAC9C;QAEA,kCAAkC;YAChCjC,OAAO;QACT;IACF;AACF;AAEA;;CAEC,GACD,OAAO,MAAMmC,iCAAiC,CAACC;IAC7C;IAEA,MAAM,EAAEJ,QAAQ,EAAE,GAAGI;IACrB,MAAMC,SAASzC;IACfwC,MAAMzC,IAAI,CAAC2C,SAAS,GAAGhD,aACrBI,uBAAuBC,IAAI,EAC3B0C,OAAO1C,IAAI,EACX0C,OAAOhB,MAAM,EACbW,YAAYK,OAAOL,QAAQ,EAC3BI,MAAMzC,IAAI,CAAC2C,SAAS;IAGtB,OAAOF;AACT,EAAE"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
promptListboxClassNames: function() {
|
|
13
|
+
return promptListboxClassNames;
|
|
14
|
+
},
|
|
15
|
+
usePromptListboxStyles_unstable: function() {
|
|
16
|
+
return usePromptListboxStyles_unstable;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _reactcomponents = require("@fluentui/react-components");
|
|
20
|
+
const _tokens = require("@fluentui-copilot/tokens");
|
|
21
|
+
const promptListboxClassNames = {
|
|
22
|
+
root: 'fai-PromptListbox'
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Styles for the root slot
|
|
26
|
+
*/ const useStyles = (0, _reactcomponents.makeStyles)({
|
|
27
|
+
listbox: {
|
|
28
|
+
boxShadow: _tokens.tokens.shadow16,
|
|
29
|
+
borderRadius: _tokens.tokens.borderRadiusMedium,
|
|
30
|
+
maxHeight: '80vh',
|
|
31
|
+
boxSizing: 'border-box'
|
|
32
|
+
},
|
|
33
|
+
listboxCollapsed: {
|
|
34
|
+
display: 'none'
|
|
35
|
+
},
|
|
36
|
+
// When rendering inline, the popupSurface will be rendered under relatively positioned elements such as Input.
|
|
37
|
+
// This is due to the surface being positioned as absolute, therefore zIndex: 1 ensures that won't happen.
|
|
38
|
+
inlineListbox: {
|
|
39
|
+
zIndex: 1
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
const usePromptListboxStyles_unstable = (state)=>{
|
|
43
|
+
'use no memo';
|
|
44
|
+
const styles = useStyles();
|
|
45
|
+
state.root.className = (0, _reactcomponents.mergeClasses)(promptListboxClassNames.root, styles.listbox, state.inlinePopup && styles.inlineListbox, !state.open && styles.listboxCollapsed, state.root.className);
|
|
46
|
+
return state;
|
|
47
|
+
}; //# sourceMappingURL=usePromptListboxStyles.styles.raw.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["usePromptListboxStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\nimport type { PromptListboxSlots, PromptListboxState } from './PromptListbox.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const promptListboxClassNames: SlotClassNames<PromptListboxSlots> = {\n root: 'fai-PromptListbox',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n listbox: {\n boxShadow: tokens.shadow16,\n borderRadius: tokens.borderRadiusMedium,\n maxHeight: '80vh',\n boxSizing: 'border-box',\n },\n\n listboxCollapsed: {\n display: 'none',\n },\n\n // When rendering inline, the popupSurface will be rendered under relatively positioned elements such as Input.\n // This is due to the surface being positioned as absolute, therefore zIndex: 1 ensures that won't happen.\n inlineListbox: {\n zIndex: 1,\n },\n});\n\n/**\n * Apply styling to the PromptListbox slots based on the state\n */\nexport const usePromptListboxStyles_unstable = (state: PromptListboxState): PromptListboxState => {\n 'use no memo';\n\n const styles = useStyles();\n state.root.className = mergeClasses(\n promptListboxClassNames.root,\n styles.listbox,\n state.inlinePopup && styles.inlineListbox,\n !state.open && styles.listboxCollapsed,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["promptListboxClassNames","styles","useStyles","root","listbox","makeStyles","boxShadow","borderRadius","tokens","borderRadiusMedium","maxHeight","boxSizing","display","zIndex"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAKaA,uBAAAA;eAAAA;;IAgCLC,+BAASC;eAATD;;;iCArCiC;wBAClB;AAIhB,MAAMD,0BAA8D;UACzEG;AACF;AAEA;;CAEC,SAECC,YAASC,IAAAA,2BAAA,EAAA;aACPC;mBACAC,cAAAA,CAAcC,QAAOC;sBACrBC,cAAW,CAAAD,kBAAA;mBACXE;QACFA,WAAA;;sBAGW;QACXC,SAAA;;mHAG0G;8GAC3F;mBACL;QACVC,QAAA;IACF;AAEA;AAME,MAAMZ,kCAASC,CAAAA;;IAUf,MAAAD,SAAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
promptOptionClassNames: function() {
|
|
13
|
+
return promptOptionClassNames;
|
|
14
|
+
},
|
|
15
|
+
usePromptOptionStyles_unstable: function() {
|
|
16
|
+
return usePromptOptionStyles_unstable;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _reactcomponents = require("@fluentui/react-components");
|
|
20
|
+
const _tokens = require("@fluentui-copilot/tokens");
|
|
21
|
+
const _reactaria = require("@fluentui/react-aria");
|
|
22
|
+
const promptOptionClassNames = {
|
|
23
|
+
root: 'fai-PromptOption'
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Styles for the root slot
|
|
27
|
+
*/ const useStyles = (0, _reactcomponents.makeStyles)({
|
|
28
|
+
root: {
|
|
29
|
+
alignItems: 'center',
|
|
30
|
+
borderRadius: _tokens.tokens.borderRadiusMedium,
|
|
31
|
+
color: _tokens.tokens.colorNeutralForeground1,
|
|
32
|
+
columnGap: _tokens.tokens.spacingHorizontalXS,
|
|
33
|
+
cursor: 'pointer',
|
|
34
|
+
display: 'flex',
|
|
35
|
+
fontFamily: _tokens.tokens.fontFamilyBase,
|
|
36
|
+
fontSize: _tokens.tokens.fontSizeBase300,
|
|
37
|
+
lineHeight: _tokens.tokens.lineHeightBase300,
|
|
38
|
+
padding: `${_tokens.tokens.spacingVerticalSNudge} ${_tokens.tokens.spacingHorizontalS}`,
|
|
39
|
+
position: 'relative',
|
|
40
|
+
':hover': {
|
|
41
|
+
backgroundColor: _tokens.tokens.colorNeutralBackground1Hover,
|
|
42
|
+
color: _tokens.tokens.colorNeutralForeground1Hover
|
|
43
|
+
},
|
|
44
|
+
':active': {
|
|
45
|
+
backgroundColor: _tokens.tokens.colorNeutralBackground1Pressed,
|
|
46
|
+
color: _tokens.tokens.colorNeutralForeground1Pressed
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
active: {
|
|
50
|
+
[`[${_reactaria.ACTIVEDESCENDANT_FOCUSVISIBLE_ATTRIBUTE}]::after`]: {
|
|
51
|
+
content: '""',
|
|
52
|
+
position: 'absolute',
|
|
53
|
+
pointerEvents: 'none',
|
|
54
|
+
zIndex: 1,
|
|
55
|
+
..._reactcomponents.shorthands.border(_tokens.tokens.strokeWidthThick, `solid`, _tokens.tokens.colorStrokeFocus2),
|
|
56
|
+
borderRadius: _tokens.tokens.borderRadiusMedium,
|
|
57
|
+
top: '-2px',
|
|
58
|
+
bottom: '-2px',
|
|
59
|
+
left: '-2px',
|
|
60
|
+
right: '-2px'
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
disabled: {
|
|
64
|
+
color: _tokens.tokens.colorNeutralForegroundDisabled,
|
|
65
|
+
':hover': {
|
|
66
|
+
backgroundColor: _tokens.tokens.colorTransparentBackground,
|
|
67
|
+
color: _tokens.tokens.colorNeutralForegroundDisabled
|
|
68
|
+
},
|
|
69
|
+
':active': {
|
|
70
|
+
backgroundColor: _tokens.tokens.colorTransparentBackground,
|
|
71
|
+
color: _tokens.tokens.colorNeutralForegroundDisabled
|
|
72
|
+
},
|
|
73
|
+
'@media (forced-colors: active)': {
|
|
74
|
+
color: 'GrayText'
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
const usePromptOptionStyles_unstable = (state)=>{
|
|
79
|
+
'use no memo';
|
|
80
|
+
const { disabled } = state;
|
|
81
|
+
const styles = useStyles();
|
|
82
|
+
state.root.className = (0, _reactcomponents.mergeClasses)(promptOptionClassNames.root, styles.root, styles.active, disabled && styles.disabled, state.root.className);
|
|
83
|
+
return state;
|
|
84
|
+
}; //# sourceMappingURL=usePromptOptionStyles.styles.raw.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["usePromptOptionStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\nimport { ACTIVEDESCENDANT_FOCUSVISIBLE_ATTRIBUTE } from '@fluentui/react-aria';\nimport type { PromptOptionSlots, PromptOptionState } from './PromptOption.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const promptOptionClassNames: SlotClassNames<PromptOptionSlots> = {\n root: 'fai-PromptOption',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n alignItems: 'center',\n borderRadius: tokens.borderRadiusMedium,\n color: tokens.colorNeutralForeground1,\n columnGap: tokens.spacingHorizontalXS,\n cursor: 'pointer',\n display: 'flex',\n fontFamily: tokens.fontFamilyBase,\n fontSize: tokens.fontSizeBase300,\n lineHeight: tokens.lineHeightBase300,\n padding: `${tokens.spacingVerticalSNudge} ${tokens.spacingHorizontalS}`,\n position: 'relative',\n\n ':hover': {\n backgroundColor: tokens.colorNeutralBackground1Hover,\n color: tokens.colorNeutralForeground1Hover,\n },\n\n ':active': {\n backgroundColor: tokens.colorNeutralBackground1Pressed,\n color: tokens.colorNeutralForeground1Pressed,\n },\n },\n\n active: {\n [`[${ACTIVEDESCENDANT_FOCUSVISIBLE_ATTRIBUTE}]::after`]: {\n content: '\"\"',\n position: 'absolute',\n pointerEvents: 'none',\n zIndex: 1,\n\n ...shorthands.border(tokens.strokeWidthThick, `solid`, tokens.colorStrokeFocus2),\n borderRadius: tokens.borderRadiusMedium,\n\n top: '-2px',\n bottom: '-2px',\n left: '-2px',\n right: '-2px',\n },\n },\n\n disabled: {\n color: tokens.colorNeutralForegroundDisabled,\n\n ':hover': {\n backgroundColor: tokens.colorTransparentBackground,\n color: tokens.colorNeutralForegroundDisabled,\n },\n\n ':active': {\n backgroundColor: tokens.colorTransparentBackground,\n color: tokens.colorNeutralForegroundDisabled,\n },\n\n '@media (forced-colors: active)': {\n color: 'GrayText',\n },\n },\n});\n\n/**\n * Apply styling to the PromptOption slots based on the state\n */\nexport const usePromptOptionStyles_unstable = (state: PromptOptionState): PromptOptionState => {\n 'use no memo';\n\n const { disabled } = state;\n const styles = useStyles();\n state.root.className = mergeClasses(\n promptOptionClassNames.root,\n styles.root,\n styles.active,\n disabled && styles.disabled,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["promptOptionClassNames","disabled","state","root","makeStyles","alignItems","borderRadius","tokens","colorNeutralForeground1","columnGap","spacingHorizontalXS","cursor","display","fontFamily","fontSize","fontSizeBase300","lineHeight","lineHeightBase300","padding","spacingVerticalSNudge","position","spacingHorizontalS","backgroundColor","colorNeutralForeground1Hover","colorNeutralForeground1Pressed","pointerEvents","borderRadiusMedium","colorStrokeFocus2","left","right","color","colorNeutralForegroundDisabled"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAMaA,sBAAAA;eAAAA;;IA0EHC,8BAAaC;eAAbD;;;iCAhF2C;wBAC9B;2BACiC;AAIjD,MAAMD,yBAA4D;UACvEG;AACF;AAEA;;CAEC,SAECA,YAAMC,IAAAA,2BAAA,EAAA;UACJC;oBACAC;sBACOC,cAAOC,CAAAA,kBAAAA;eACdC,cAAAA,CAAAA,uBAAkBC;mBAClBC,cAAQ,CAAAD,mBAAA;gBACRE;iBACAC;oBACAC,cAAUP,CAAAA,cAAOQ;kBACjBC,cAAYT,CAAAA,eAAOU;oBACnBC,cAAYX,CAAAA,iBAAOY;iBACnBC,CAAAA,EAAAA,cAAU,CAAAD,qBAAA,CAAA,CAAA,EAAAZ,cAAA,CAAAc,kBAAA,CAAA,CAAA;kBAEV;kBACEC;6BACOf,cAAOgB,CAAAA,4BAA4B;mBAC5ChB,cAAA,CAAAgB,4BAAA;;mBAGED;6BACOf,cAAOiB,CAAAA,8BAA8B;mBAC9CjB,cAAA,CAAAiB,8BAAA;QACF;;YAGI;+DACS,CAAA,QAAA,CAAA,CAAA,EAAA;qBACTJ;sBACAK;2BACQ;oBAER;0CACAnB,CAAAA,MAAcC,CAAAA,cAAOmB,CAAAA,gBAAAA,EAAkB,CAAA,KAAA,CAAA,EAAAnB,cAAA,CAAAoB,iBAAA,CAAA;0BAElCpB,cAAA,CAAAmB,kBAAA;;oBAELE;kBACAC;mBACF;QACF;;cAGEC;eAEAvB,cAAA,CAAUwB,8BAAA;kBACRT;6BACOf,cAAOwB,CAAAA,0BAA8B;mBAC9CxB,cAAA,CAAAwB,8BAAA;;mBAGET;6BACOf,cAAOwB,CAAAA,0BAA8B;mBAC9CxB,cAAA,CAAAwB,8BAAA;;0CAGS;mBACT;QACF;IACF;AAEA;AAME,MAAQ9B,iCAAaC,CAAAA;;UAUrB,EACAD,QAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-copilot/react-prompt-listbox",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1-hotfix.2",
|
|
4
4
|
"description": "PromptListbox for input components using EditorInput.",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -12,15 +12,15 @@
|
|
|
12
12
|
},
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@fluentui-copilot/chat-input-plugins": "
|
|
16
|
-
"@fluentui-copilot/react-chat-input-plugins": "
|
|
17
|
-
"@fluentui-copilot/react-editor-input": "
|
|
18
|
-
"@fluentui-copilot/react-input-listbox": "
|
|
19
|
-
"@fluentui-copilot/react-prompt-input": "
|
|
20
|
-
"@fluentui-copilot/react-provider": "
|
|
21
|
-
"@fluentui-copilot/react-text-editor": "
|
|
22
|
-
"@fluentui-copilot/text-editor": "
|
|
23
|
-
"@fluentui-copilot/tokens": "
|
|
15
|
+
"@fluentui-copilot/chat-input-plugins": "0.4.2-hotfix.3",
|
|
16
|
+
"@fluentui-copilot/react-chat-input-plugins": "0.4.10-hotfix.2",
|
|
17
|
+
"@fluentui-copilot/react-editor-input": "0.4.11-hotfix.2",
|
|
18
|
+
"@fluentui-copilot/react-input-listbox": "0.3.3-hotfix.2",
|
|
19
|
+
"@fluentui-copilot/react-prompt-input": "0.8.1-hotfix.2",
|
|
20
|
+
"@fluentui-copilot/react-provider": "0.11.3-hotfix.2",
|
|
21
|
+
"@fluentui-copilot/react-text-editor": "0.4.1-hotfix.3",
|
|
22
|
+
"@fluentui-copilot/text-editor": "0.3.1-hotfix.3",
|
|
23
|
+
"@fluentui-copilot/tokens": "0.3.11-hotfix.2",
|
|
24
24
|
"@swc/helpers": "^0.5.1"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
@@ -40,11 +40,7 @@
|
|
|
40
40
|
"react": ">=16.14.0 <19.0.0",
|
|
41
41
|
"react-dom": ">=16.14.0 <19.0.0"
|
|
42
42
|
},
|
|
43
|
-
"beachball": {
|
|
44
|
-
"disallowedChangeTypes": [
|
|
45
|
-
"major"
|
|
46
|
-
]
|
|
47
|
-
},
|
|
43
|
+
"beachball": {},
|
|
48
44
|
"exports": {
|
|
49
45
|
".": {
|
|
50
46
|
"types": "./dist/index.d.ts",
|