@fluentui-copilot/react-attachments 0.13.2 → 0.13.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 +16 -1
- package/CHANGELOG.md +11 -2
- package/lib/AgentTag.js +0 -1
- package/lib/Attachment.js +0 -1
- package/lib/AttachmentList.js +0 -1
- package/lib/AttachmentOverflowMenu.js +0 -1
- package/lib/AttachmentOverflowMenuButton.js +0 -1
- package/lib/AttachmentOverflowMenuItem.js +0 -1
- package/lib/components/AgentTag/AgentTag.js +4 -5
- package/lib/components/AgentTag/AgentTag.types.js +1 -2
- package/lib/components/AgentTag/index.js +0 -1
- package/lib/components/AgentTag/renderAgentTag.js +3 -5
- package/lib/components/AgentTag/useAgentTag.js +7 -9
- package/lib/components/AgentTag/useAgentTagStyles.styles.raw.js +66 -0
- package/lib/components/AgentTag/useAgentTagStyles.styles.raw.js.map +1 -0
- package/lib/components/Attachment/Attachment.js +5 -6
- package/lib/components/Attachment/Attachment.types.js +1 -2
- package/lib/components/Attachment/index.js +0 -1
- package/lib/components/Attachment/renderAttachment.js +36 -31
- package/lib/components/Attachment/useAttachment.js +85 -95
- package/lib/components/Attachment/useAttachmentStyles.styles.raw.js +317 -0
- package/lib/components/Attachment/useAttachmentStyles.styles.raw.js.map +1 -0
- package/lib/components/AttachmentList/AttachmentList.js +6 -7
- package/lib/components/AttachmentList/AttachmentList.types.js +1 -2
- package/lib/components/AttachmentList/index.js +0 -1
- package/lib/components/AttachmentList/renderAttachmentList.js +25 -25
- package/lib/components/AttachmentList/useAttachmentList.js +113 -124
- package/lib/components/AttachmentList/useAttachmentListContextValues.js +10 -15
- package/lib/components/AttachmentList/useAttachmentListStyles.styles.raw.js +44 -0
- package/lib/components/AttachmentList/useAttachmentListStyles.styles.raw.js.map +1 -0
- package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js +8 -9
- package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js +1 -2
- package/lib/components/AttachmentOverflowMenu/index.js +0 -1
- package/lib/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js +8 -13
- package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js +9 -15
- package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js +10 -15
- package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js +5 -6
- package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js +1 -2
- package/lib/components/AttachmentOverflowMenuButton/index.js +0 -1
- package/lib/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js +11 -10
- package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js +51 -59
- package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js +102 -0
- package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js.map +1 -0
- package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js +4 -5
- package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js +1 -2
- package/lib/components/AttachmentOverflowMenuItem/index.js +0 -1
- package/lib/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js +9 -8
- package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +41 -49
- package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js +57 -0
- package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js.map +1 -0
- package/lib/components/index.js +0 -1
- package/lib/components/utils/useProgressBarStyles.styles.raw.js +42 -0
- package/lib/components/utils/useProgressBarStyles.styles.raw.js.map +1 -0
- package/lib/contexts/attachmentListContext.js +4 -5
- package/lib/contexts/attachmentOverflowMenuContext.js +4 -5
- package/lib/index.js +0 -1
- package/lib-commonjs/AgentTag.js +0 -1
- package/lib-commonjs/Attachment.js +0 -1
- package/lib-commonjs/AttachmentList.js +0 -1
- package/lib-commonjs/AttachmentOverflowMenu.js +0 -1
- package/lib-commonjs/AttachmentOverflowMenuButton.js +0 -1
- package/lib-commonjs/AttachmentOverflowMenuItem.js +0 -1
- package/lib-commonjs/components/AgentTag/AgentTag.js +1 -1
- package/lib-commonjs/components/AgentTag/AgentTag.js.map +1 -1
- package/lib-commonjs/components/AgentTag/AgentTag.types.js +0 -1
- package/lib-commonjs/components/AgentTag/index.js +0 -1
- package/lib-commonjs/components/AgentTag/renderAgentTag.js +1 -1
- package/lib-commonjs/components/AgentTag/renderAgentTag.js.map +1 -1
- package/lib-commonjs/components/AgentTag/useAgentTag.js +1 -1
- package/lib-commonjs/components/AgentTag/useAgentTag.js.map +1 -1
- package/lib-commonjs/components/AgentTag/useAgentTagStyles.styles.raw.js +82 -0
- package/lib-commonjs/components/AgentTag/useAgentTagStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/Attachment/Attachment.js +1 -1
- package/lib-commonjs/components/Attachment/Attachment.js.map +1 -1
- package/lib-commonjs/components/Attachment/Attachment.types.js +0 -1
- package/lib-commonjs/components/Attachment/index.js +0 -1
- package/lib-commonjs/components/Attachment/renderAttachment.js +1 -1
- package/lib-commonjs/components/Attachment/renderAttachment.js.map +1 -1
- package/lib-commonjs/components/Attachment/useAttachment.js +1 -1
- package/lib-commonjs/components/Attachment/useAttachment.js.map +1 -1
- package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.raw.js +336 -0
- package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/AttachmentList/AttachmentList.js +1 -1
- package/lib-commonjs/components/AttachmentList/AttachmentList.js.map +1 -1
- package/lib-commonjs/components/AttachmentList/AttachmentList.types.js +0 -1
- package/lib-commonjs/components/AttachmentList/index.js +0 -1
- package/lib-commonjs/components/AttachmentList/renderAttachmentList.js +1 -1
- package/lib-commonjs/components/AttachmentList/renderAttachmentList.js.map +1 -1
- package/lib-commonjs/components/AttachmentList/useAttachmentList.js +1 -1
- package/lib-commonjs/components/AttachmentList/useAttachmentList.js.map +1 -1
- package/lib-commonjs/components/AttachmentList/useAttachmentListContextValues.js +1 -1
- package/lib-commonjs/components/AttachmentList/useAttachmentListContextValues.js.map +1 -1
- package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.styles.raw.js +60 -0
- package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js +0 -1
- package/lib-commonjs/components/AttachmentOverflowMenu/index.js +0 -1
- package/lib-commonjs/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js +0 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/index.js +0 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js +118 -0
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js +0 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/index.js +0 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js +73 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/index.js +0 -1
- package/lib-commonjs/components/utils/useProgressBarStyles.styles.raw.js +50 -0
- package/lib-commonjs/components/utils/useProgressBarStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/contexts/attachmentListContext.js +1 -1
- package/lib-commonjs/contexts/attachmentListContext.js.map +1 -1
- package/lib-commonjs/contexts/attachmentOverflowMenuContext.js +1 -1
- package/lib-commonjs/contexts/attachmentOverflowMenuContext.js.map +1 -1
- package/lib-commonjs/index.js +0 -1
- package/package.json +4 -4
|
@@ -0,0 +1,73 @@
|
|
|
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
|
+
attachmentOverflowMenuItemClassNames: function() {
|
|
13
|
+
return attachmentOverflowMenuItemClassNames;
|
|
14
|
+
},
|
|
15
|
+
useAttachmentOverflowMenuItemStyles_unstable: function() {
|
|
16
|
+
return useAttachmentOverflowMenuItemStyles_unstable;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _reactcomponents = require("@fluentui/react-components");
|
|
20
|
+
const _useProgressBarStylesstyles = require("../utils/useProgressBarStyles.styles");
|
|
21
|
+
const attachmentOverflowMenuItemClassNames = {
|
|
22
|
+
root: 'fai-AttachmentOverflowMenuItem',
|
|
23
|
+
progress: 'fai-AttachmentOverflowMenuItem__progress'
|
|
24
|
+
};
|
|
25
|
+
const FOCUS_VISIBLE_ATTR = 'data-fui-focus-visible';
|
|
26
|
+
const useStyles = (0, _reactcomponents.makeStyles)({
|
|
27
|
+
imageOnly: {
|
|
28
|
+
alignItems: 'center'
|
|
29
|
+
},
|
|
30
|
+
secondaryContent: {
|
|
31
|
+
display: 'flex',
|
|
32
|
+
alignItems: 'center'
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
const useNextStyles = (0, _reactcomponents.makeStyles)({
|
|
36
|
+
nextStyles: {
|
|
37
|
+
[`[${FOCUS_VISIBLE_ATTR}]::after`]: {
|
|
38
|
+
borderRadius: _reactcomponents.tokens.borderRadiusXLarge
|
|
39
|
+
},
|
|
40
|
+
outline: `${_reactcomponents.tokens.strokeWidthThin} solid ${_reactcomponents.tokens.colorTransparentStroke}`
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
const useAttachmentOverflowMenuItemStyles_unstable = (state)=>{
|
|
44
|
+
'use no memo';
|
|
45
|
+
const { imageOnly, designVersion } = state;
|
|
46
|
+
const styles = useStyles();
|
|
47
|
+
const nextStyles = useNextStyles();
|
|
48
|
+
const progressBarStyles = (0, _useProgressBarStylesstyles.useProgressBarStyles)();
|
|
49
|
+
state.root.className = (0, _reactcomponents.mergeClasses)(attachmentOverflowMenuItemClassNames.root, imageOnly && styles.imageOnly, designVersion === 'next' && nextStyles.nextStyles, state.root.className);
|
|
50
|
+
const secondaryContent = _reactcomponents.slot.optional(state.root.secondaryContent, {
|
|
51
|
+
elementType: 'span'
|
|
52
|
+
});
|
|
53
|
+
if (secondaryContent) {
|
|
54
|
+
secondaryContent.className = (0, _reactcomponents.mergeClasses)(styles.secondaryContent, secondaryContent.className);
|
|
55
|
+
state.root.secondaryContent = secondaryContent;
|
|
56
|
+
}
|
|
57
|
+
if (state.progress) {
|
|
58
|
+
state.progress.className = (0, _reactcomponents.mergeClasses)(attachmentOverflowMenuItemClassNames.progress, progressBarStyles.progress, state.progress.className);
|
|
59
|
+
const bar = _reactcomponents.slot.optional(state.progress.bar, {
|
|
60
|
+
elementType: 'div',
|
|
61
|
+
renderByDefault: true
|
|
62
|
+
});
|
|
63
|
+
if (bar) {
|
|
64
|
+
if (state.progress.value === undefined) {
|
|
65
|
+
bar.className = (0, _reactcomponents.mergeClasses)(progressBarStyles.indeterminateProgressBar, bar.className);
|
|
66
|
+
} else {
|
|
67
|
+
bar.className = (0, _reactcomponents.mergeClasses)(progressBarStyles.regularProgressBar, bar.className);
|
|
68
|
+
}
|
|
69
|
+
state.progress.bar = bar;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return state;
|
|
73
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useAttachmentOverflowMenuItemStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, slot, tokens } from '@fluentui/react-components';\nimport { useProgressBarStyles } from '../utils/useProgressBarStyles.styles';\nimport type {\n AttachmentOverflowMenuItemSlots,\n AttachmentOverflowMenuItemState,\n} from './AttachmentOverflowMenuItem.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const attachmentOverflowMenuItemClassNames: SlotClassNames<AttachmentOverflowMenuItemSlots> = {\n root: 'fai-AttachmentOverflowMenuItem',\n progress: 'fai-AttachmentOverflowMenuItem__progress',\n};\n\nconst FOCUS_VISIBLE_ATTR = 'data-fui-focus-visible';\n\nconst useStyles = makeStyles({\n imageOnly: {\n alignItems: 'center',\n },\n secondaryContent: {\n display: 'flex',\n alignItems: 'center',\n },\n});\n\nconst useNextStyles = makeStyles({\n nextStyles: {\n [`[${FOCUS_VISIBLE_ATTR}]::after`]: {\n borderRadius: tokens.borderRadiusXLarge,\n },\n outline: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,\n },\n});\n\n/**\n * Apply styling to the AttachmentList slots based on the state\n */\nexport const useAttachmentOverflowMenuItemStyles_unstable = (\n state: AttachmentOverflowMenuItemState,\n): AttachmentOverflowMenuItemState => {\n 'use no memo';\n\n const { imageOnly, designVersion } = state;\n const styles = useStyles();\n const nextStyles = useNextStyles();\n const progressBarStyles = useProgressBarStyles();\n\n state.root.className = mergeClasses(\n attachmentOverflowMenuItemClassNames.root,\n imageOnly && styles.imageOnly,\n designVersion === 'next' && nextStyles.nextStyles,\n state.root.className,\n );\n\n const secondaryContent = slot.optional(state.root.secondaryContent, {\n elementType: 'span',\n });\n if (secondaryContent) {\n secondaryContent.className = mergeClasses(styles.secondaryContent, secondaryContent.className);\n state.root.secondaryContent = secondaryContent;\n }\n\n if (state.progress) {\n state.progress.className = mergeClasses(\n attachmentOverflowMenuItemClassNames.progress,\n progressBarStyles.progress,\n state.progress.className,\n );\n\n const bar = slot.optional(state.progress.bar, { elementType: 'div', renderByDefault: true });\n if (bar) {\n if (state.progress.value === undefined) {\n bar.className = mergeClasses(progressBarStyles.indeterminateProgressBar, bar.className);\n } else {\n bar.className = mergeClasses(progressBarStyles.regularProgressBar, bar.className);\n }\n state.progress.bar = bar;\n }\n }\n\n return state;\n};\n"],"names":["attachmentOverflowMenuItemClassNames","useAttachmentOverflowMenuItemStyles_unstable","root","progress","FOCUS_VISIBLE_ATTR","useStyles","makeStyles","imageOnly","alignItems","secondaryContent","display","useNextStyles","nextStyles","borderRadius","tokens","borderRadiusXLarge","outline","strokeWidthThin","colorTransparentStroke","state","designVersion","styles","progressBarStyles","useProgressBarStyles","className","mergeClasses","slot","optional","elementType","bar","renderByDefault","value","undefined","indeterminateProgressBar","regularProgressBar"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAQaA,oCAAAA;eAAAA;;IA6BAC,4CAAAA;eAAAA;;;iCArC0C;4CAClB;AAO9B,MAAMD,uCAAwF;IACnGE,MAAM;IACNC,UAAU;AACZ;AAEA,MAAMC,qBAAqB;AAE3B,MAAMC,YAAYC,IAAAA,2BAAAA,EAAW;IAC3BC,WAAW;QACTC,YAAY;IACd;IACAC,kBAAkB;QAChBC,SAAS;QACTF,YAAY;IACd;AACF;AAEA,MAAMG,gBAAgBL,IAAAA,2BAAAA,EAAW;IAC/BM,YAAY;QACV,CAAC,CAAC,CAAC,EAAER,mBAAmB,QAAQ,CAAC,CAAC,EAAE;YAClCS,cAAcC,uBAAAA,CAAOC,kBAAkB;QACzC;QACAC,SAAS,CAAC,EAAEF,uBAAAA,CAAOG,eAAe,CAAC,OAAO,EAAEH,uBAAAA,CAAOI,sBAAsB,CAAC,CAAC;IAC7E;AACF;AAKO,MAAMjB,+CAA+C,CAC1DkB;IAEA;IAEA,MAAM,EAAEZ,SAAS,EAAEa,aAAa,EAAE,GAAGD;IACrC,MAAME,SAAShB;IACf,MAAMO,aAAaD;IACnB,MAAMW,oBAAoBC,IAAAA,gDAAAA;IAE1BJ,MAAMjB,IAAI,CAACsB,SAAS,GAAGC,IAAAA,6BAAAA,EACrBzB,qCAAqCE,IAAI,EACzCK,aAAac,OAAOd,SAAS,EAC7Ba,kBAAkB,UAAUR,WAAWA,UAAU,EACjDO,MAAMjB,IAAI,CAACsB,SAAS;IAGtB,MAAMf,mBAAmBiB,qBAAAA,CAAKC,QAAQ,CAACR,MAAMjB,IAAI,CAACO,gBAAgB,EAAE;QAClEmB,aAAa;IACf;IACA,IAAInB,kBAAkB;QACpBA,iBAAiBe,SAAS,GAAGC,IAAAA,6BAAAA,EAAaJ,OAAOZ,gBAAgB,EAAEA,iBAAiBe,SAAS;QAC7FL,MAAMjB,IAAI,CAACO,gBAAgB,GAAGA;IAChC;IAEA,IAAIU,MAAMhB,QAAQ,EAAE;QAClBgB,MAAMhB,QAAQ,CAACqB,SAAS,GAAGC,IAAAA,6BAAAA,EACzBzB,qCAAqCG,QAAQ,EAC7CmB,kBAAkBnB,QAAQ,EAC1BgB,MAAMhB,QAAQ,CAACqB,SAAS;QAG1B,MAAMK,MAAMH,qBAAAA,CAAKC,QAAQ,CAACR,MAAMhB,QAAQ,CAAC0B,GAAG,EAAE;YAAED,aAAa;YAAOE,iBAAiB;QAAK;QAC1F,IAAID,KAAK;YACP,IAAIV,MAAMhB,QAAQ,CAAC4B,KAAK,KAAKC,WAAW;gBACtCH,IAAIL,SAAS,GAAGC,IAAAA,6BAAAA,EAAaH,kBAAkBW,wBAAwB,EAAEJ,IAAIL,SAAS;YACxF,OAAO;gBACLK,IAAIL,SAAS,GAAGC,IAAAA,6BAAAA,EAAaH,kBAAkBY,kBAAkB,EAAEL,IAAIL,SAAS;YAClF;YACAL,MAAMhB,QAAQ,CAAC0B,GAAG,GAAGA;QACvB;IACF;IAEA,OAAOV;AACT"}
|
|
@@ -90,4 +90,3 @@ const _AttachmentList = require("./AttachmentList");
|
|
|
90
90
|
const _AttachmentOverflowMenu = require("./AttachmentOverflowMenu");
|
|
91
91
|
const _AttachmentOverflowMenuButton = require("./AttachmentOverflowMenuButton");
|
|
92
92
|
const _AttachmentOverflowMenuItem = require("./AttachmentOverflowMenuItem");
|
|
93
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "useProgressBarStyles", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return useProgressBarStyles;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _reactcomponents = require("@fluentui/react-components");
|
|
12
|
+
const _tokens = require("@fluentui-copilot/tokens");
|
|
13
|
+
const indeterminateProgressBarReducedMotion = {
|
|
14
|
+
'0%': {
|
|
15
|
+
opacity: '.2'
|
|
16
|
+
},
|
|
17
|
+
'50%': {
|
|
18
|
+
opacity: '1'
|
|
19
|
+
},
|
|
20
|
+
'100%': {
|
|
21
|
+
opacity: '.2'
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
const useProgressBarStyles = (0, _reactcomponents.makeStyles)({
|
|
25
|
+
progress: {
|
|
26
|
+
width: '100%',
|
|
27
|
+
position: 'absolute',
|
|
28
|
+
bottom: 0,
|
|
29
|
+
left: 0,
|
|
30
|
+
right: 0,
|
|
31
|
+
height: '4px',
|
|
32
|
+
borderBottomLeftRadius: _tokens.tokens.borderRadiusMedium,
|
|
33
|
+
borderBottomRightRadius: _tokens.tokens.borderRadiusMedium
|
|
34
|
+
},
|
|
35
|
+
regularProgressBar: {
|
|
36
|
+
height: '100%',
|
|
37
|
+
backgroundImage: `linear-gradient(90deg, ${_tokens.tokens.colorBrandFlair1} 35%, ${_tokens.tokens.colorBrandFlair2} 70%, ${_tokens.tokens.colorBrandFlair3} 92%)`
|
|
38
|
+
},
|
|
39
|
+
indeterminateProgressBar: {
|
|
40
|
+
height: '100%',
|
|
41
|
+
backgroundColor: _tokens.tokens.colorTransparentBackground,
|
|
42
|
+
backgroundImage: `linear-gradient(90deg, rgba(0,0,0,0) 0%, ${_tokens.tokens.colorBrandFlair1} 35%, ${_tokens.tokens.colorBrandFlair2} 70%, ${_tokens.tokens.colorBrandFlair3} 92%, rgba(0,0,0,0))`,
|
|
43
|
+
'@media screen and (prefers-reduced-motion: reduce)': {
|
|
44
|
+
maxWidth: '100%',
|
|
45
|
+
animationIterationCount: 'infinite',
|
|
46
|
+
animationDuration: '3s',
|
|
47
|
+
animationName: indeterminateProgressBarReducedMotion
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useProgressBarStyles.styles.ts"],"sourcesContent":["import { makeStyles } from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\n\nconst indeterminateProgressBarReducedMotion = {\n '0%': {\n opacity: '.2', // matches indeterminate bar width\n },\n '50%': {\n opacity: '1',\n },\n '100%': {\n opacity: '.2',\n },\n};\n\n/**\n * @internal\n */\nexport const useProgressBarStyles = makeStyles({\n progress: {\n width: '100%',\n position: 'absolute',\n bottom: 0,\n left: 0,\n right: 0,\n height: '4px',\n borderBottomLeftRadius: tokens.borderRadiusMedium,\n borderBottomRightRadius: tokens.borderRadiusMedium,\n },\n regularProgressBar: {\n height: '100%',\n backgroundImage: `linear-gradient(90deg, ${tokens.colorBrandFlair1} 35%, ${tokens.colorBrandFlair2} 70%, ${tokens.colorBrandFlair3} 92%)`,\n },\n indeterminateProgressBar: {\n height: '100%',\n backgroundColor: tokens.colorTransparentBackground,\n backgroundImage: `linear-gradient(90deg, rgba(0,0,0,0) 0%, ${tokens.colorBrandFlair1} 35%, ${tokens.colorBrandFlair2} 70%, ${tokens.colorBrandFlair3} 92%, rgba(0,0,0,0))`,\n '@media screen and (prefers-reduced-motion: reduce)': {\n maxWidth: '100%',\n animationIterationCount: 'infinite',\n animationDuration: '3s',\n animationName: indeterminateProgressBarReducedMotion,\n },\n },\n});\n"],"names":["useProgressBarStyles","indeterminateProgressBarReducedMotion","opacity","makeStyles","progress","width","position","bottom","left","right","height","borderBottomLeftRadius","tokens","borderRadiusMedium","borderBottomRightRadius","regularProgressBar","backgroundImage","colorBrandFlair1","colorBrandFlair2","colorBrandFlair3","indeterminateProgressBar","backgroundColor","colorTransparentBackground","maxWidth","animationIterationCount","animationDuration","animationName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAkBaA;;;eAAAA;;;iCAlBc;wBACJ;AAEvB,MAAMC,wCAAwC;IAC5C,MAAM;QACJC,SAAS;IACX;IACA,OAAO;QACLA,SAAS;IACX;IACA,QAAQ;QACNA,SAAS;IACX;AACF;AAKO,MAAMF,uBAAuBG,IAAAA,2BAAAA,EAAW;IAC7CC,UAAU;QACRC,OAAO;QACPC,UAAU;QACVC,QAAQ;QACRC,MAAM;QACNC,OAAO;QACPC,QAAQ;QACRC,wBAAwBC,cAAAA,CAAOC,kBAAkB;QACjDC,yBAAyBF,cAAAA,CAAOC,kBAAkB;IACpD;IACAE,oBAAoB;QAClBL,QAAQ;QACRM,iBAAiB,CAAC,uBAAuB,EAAEJ,cAAAA,CAAOK,gBAAgB,CAAC,MAAM,EAAEL,cAAAA,CAAOM,gBAAgB,CAAC,MAAM,EAAEN,cAAAA,CAAOO,gBAAgB,CAAC,KAAK,CAAC;IAC3I;IACAC,0BAA0B;QACxBV,QAAQ;QACRW,iBAAiBT,cAAAA,CAAOU,0BAA0B;QAClDN,iBAAiB,CAAC,yCAAyC,EAAEJ,cAAAA,CAAOK,gBAAgB,CAAC,MAAM,EAAEL,cAAAA,CAAOM,gBAAgB,CAAC,MAAM,EAAEN,cAAAA,CAAOO,gBAAgB,CAAC,qBAAqB,CAAC;QAC3K,sDAAsD;YACpDI,UAAU;YACVC,yBAAyB;YACzBC,mBAAmB;YACnBC,eAAezB;QACjB;IACF;AACF"}
|
|
@@ -27,4 +27,4 @@ const attachmentListContextDefaultValue = {
|
|
|
27
27
|
numberOfAttachments: 0
|
|
28
28
|
};
|
|
29
29
|
const AttachmentListProvider = AttachmentListContext.Provider;
|
|
30
|
-
const useAttachmentListContext_unstable = (selector)=>(0, _reactcontextselector.useContextSelector)(AttachmentListContext, (ctx = attachmentListContextDefaultValue)=>selector(ctx));
|
|
30
|
+
const useAttachmentListContext_unstable = (selector)=>(0, _reactcontextselector.useContextSelector)(AttachmentListContext, (ctx = attachmentListContextDefaultValue)=>selector(ctx));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["attachmentListContext.ts"],"sourcesContent":["import { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { Context, ContextSelector } from '@fluentui/react-context-selector';\nimport type { AttachmentListState } from '../components/index';\n\nexport const AttachmentListContext: Context<AttachmentListContextValue> = createContext<\n AttachmentListContextValue | undefined\n>(undefined) as Context<AttachmentListContextValue>;\n\nconst attachmentListContextDefaultValue: AttachmentListContextValue = {\n onAttachmentDismiss: () => null,\n shouldUseOverflow: false,\n numberOfAttachments: 0,\n};\n\n/**\n * Context shared between AttachmentList and its children components\n */\nexport type AttachmentListContextValue = Pick<\n AttachmentListState,\n 'onAttachmentDismiss' | 'shouldUseOverflow' | 'numberOfAttachments'\n>;\n\nexport const AttachmentListProvider = AttachmentListContext.Provider;\n\nexport const useAttachmentListContext_unstable = <T>(selector: ContextSelector<AttachmentListContextValue, T>) =>\n useContextSelector(AttachmentListContext, (ctx = attachmentListContextDefaultValue) => selector(ctx));\n"],"names":["AttachmentListContext","AttachmentListProvider","useAttachmentListContext_unstable","createContext","undefined","attachmentListContextDefaultValue","onAttachmentDismiss","shouldUseOverflow","numberOfAttachments","Provider","selector","useContextSelector","ctx"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIaA,qBAAAA;eAAAA;;IAkBAC,sBAAAA;eAAAA;;IAEAC,iCAAAA;eAAAA;;;sCAxBqC;AAI3C,MAAMF,wBAA6DG,IAAAA,mCAAAA,EAExEC;AAEF,MAAMC,oCAAgE;
|
|
1
|
+
{"version":3,"sources":["attachmentListContext.ts"],"sourcesContent":["import { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { Context, ContextSelector } from '@fluentui/react-context-selector';\nimport type { AttachmentListState } from '../components/index';\n\nexport const AttachmentListContext: Context<AttachmentListContextValue> = createContext<\n AttachmentListContextValue | undefined\n>(undefined) as Context<AttachmentListContextValue>;\n\nconst attachmentListContextDefaultValue: AttachmentListContextValue = {\n onAttachmentDismiss: () => null,\n shouldUseOverflow: false,\n numberOfAttachments: 0,\n};\n\n/**\n * Context shared between AttachmentList and its children components\n */\nexport type AttachmentListContextValue = Pick<\n AttachmentListState,\n 'onAttachmentDismiss' | 'shouldUseOverflow' | 'numberOfAttachments'\n>;\n\nexport const AttachmentListProvider = AttachmentListContext.Provider;\n\nexport const useAttachmentListContext_unstable = <T>(selector: ContextSelector<AttachmentListContextValue, T>) =>\n useContextSelector(AttachmentListContext, (ctx = attachmentListContextDefaultValue) => selector(ctx));\n"],"names":["AttachmentListContext","AttachmentListProvider","useAttachmentListContext_unstable","createContext","undefined","attachmentListContextDefaultValue","onAttachmentDismiss","shouldUseOverflow","numberOfAttachments","Provider","selector","useContextSelector","ctx"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIaA,qBAAAA;eAAAA;;IAkBAC,sBAAAA;eAAAA;;IAEAC,iCAAAA;eAAAA;;;sCAxBqC;AAI3C,MAAMF,wBAA6DG,IAAAA,mCAAAA,EAExEC;AAEF,MAAMC,oCAAgE;IACpEC,qBAAqB,IAAM;IAC3BC,mBAAmB;IACnBC,qBAAqB;AACvB;AAUO,MAAMP,yBAAyBD,sBAAsBS,QAAQ;AAE7D,MAAMP,oCAAoC,CAAIQ,WACnDC,IAAAA,wCAAAA,EAAmBX,uBAAuB,CAACY,MAAMP,iCAAiC,GAAKK,SAASE"}
|
|
@@ -27,4 +27,4 @@ const overflowMenuContextDefaultValue = {
|
|
|
27
27
|
overflowCount: 0
|
|
28
28
|
};
|
|
29
29
|
const AttachmentOverflowMenuProvider = AttachmentOverflowMenuContext.Provider;
|
|
30
|
-
const useAttachmentOverflowMenuContext_unstable = (selector)=>(0, _reactcontextselector.useContextSelector)(AttachmentOverflowMenuContext, (ctx = overflowMenuContextDefaultValue)=>selector(ctx));
|
|
30
|
+
const useAttachmentOverflowMenuContext_unstable = (selector)=>(0, _reactcontextselector.useContextSelector)(AttachmentOverflowMenuContext, (ctx = overflowMenuContextDefaultValue)=>selector(ctx));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["attachmentOverflowMenuContext.ts"],"sourcesContent":["import { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { Context, ContextSelector } from '@fluentui/react-context-selector';\nimport type { AttachmentOverflowMenuState } from '../components/index';\n\nexport const AttachmentOverflowMenuContext: Context<AttachmentOverflowMenuContextValue> = createContext<\n AttachmentOverflowMenuContextValue | undefined\n>(undefined) as Context<AttachmentOverflowMenuContextValue>;\n\nconst overflowMenuContextDefaultValue: AttachmentOverflowMenuContextValue = {\n isOverflowing: false,\n overflowButtonRef: undefined,\n overflowCount: 0,\n};\n\n/**\n * Context shared between AttachmentOverflowMenu and its children components\n */\nexport type AttachmentOverflowMenuContextValue = Pick<\n AttachmentOverflowMenuState,\n 'isOverflowing' | 'overflowButtonRef' | 'overflowCount'\n>;\nexport const AttachmentOverflowMenuProvider = AttachmentOverflowMenuContext.Provider;\n\nexport const useAttachmentOverflowMenuContext_unstable = <T>(\n selector: ContextSelector<AttachmentOverflowMenuContextValue, T>,\n) => useContextSelector(AttachmentOverflowMenuContext, (ctx = overflowMenuContextDefaultValue) => selector(ctx));\n"],"names":["AttachmentOverflowMenuContext","AttachmentOverflowMenuProvider","useAttachmentOverflowMenuContext_unstable","createContext","undefined","overflowMenuContextDefaultValue","isOverflowing","overflowButtonRef","overflowCount","Provider","selector","useContextSelector","ctx"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIaA,6BAAAA;eAAAA;;IAiBAC,8BAAAA;eAAAA;;IAEAC,yCAAAA;eAAAA;;;sCAvBqC;AAI3C,MAAMF,gCAA6EG,IAAAA,mCAAAA,EAExFC;AAEF,MAAMC,kCAAsE;
|
|
1
|
+
{"version":3,"sources":["attachmentOverflowMenuContext.ts"],"sourcesContent":["import { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { Context, ContextSelector } from '@fluentui/react-context-selector';\nimport type { AttachmentOverflowMenuState } from '../components/index';\n\nexport const AttachmentOverflowMenuContext: Context<AttachmentOverflowMenuContextValue> = createContext<\n AttachmentOverflowMenuContextValue | undefined\n>(undefined) as Context<AttachmentOverflowMenuContextValue>;\n\nconst overflowMenuContextDefaultValue: AttachmentOverflowMenuContextValue = {\n isOverflowing: false,\n overflowButtonRef: undefined,\n overflowCount: 0,\n};\n\n/**\n * Context shared between AttachmentOverflowMenu and its children components\n */\nexport type AttachmentOverflowMenuContextValue = Pick<\n AttachmentOverflowMenuState,\n 'isOverflowing' | 'overflowButtonRef' | 'overflowCount'\n>;\nexport const AttachmentOverflowMenuProvider = AttachmentOverflowMenuContext.Provider;\n\nexport const useAttachmentOverflowMenuContext_unstable = <T>(\n selector: ContextSelector<AttachmentOverflowMenuContextValue, T>,\n) => useContextSelector(AttachmentOverflowMenuContext, (ctx = overflowMenuContextDefaultValue) => selector(ctx));\n"],"names":["AttachmentOverflowMenuContext","AttachmentOverflowMenuProvider","useAttachmentOverflowMenuContext_unstable","createContext","undefined","overflowMenuContextDefaultValue","isOverflowing","overflowButtonRef","overflowCount","Provider","selector","useContextSelector","ctx"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIaA,6BAAAA;eAAAA;;IAiBAC,8BAAAA;eAAAA;;IAEAC,yCAAAA;eAAAA;;;sCAvBqC;AAI3C,MAAMF,gCAA6EG,IAAAA,mCAAAA,EAExFC;AAEF,MAAMC,kCAAsE;IAC1EC,eAAe;IACfC,mBAAmBH;IACnBI,eAAe;AACjB;AASO,MAAMP,iCAAiCD,8BAA8BS,QAAQ;AAE7E,MAAMP,4CAA4C,CACvDQ,WACGC,IAAAA,wCAAAA,EAAmBX,+BAA+B,CAACY,MAAMP,+BAA+B,GAAKK,SAASE"}
|
package/lib-commonjs/index.js
CHANGED
|
@@ -120,4 +120,3 @@ const _attachmentOverflowMenuContext = require("./contexts/attachmentOverflowMen
|
|
|
120
120
|
const _AttachmentOverflowMenuButton = require("./AttachmentOverflowMenuButton");
|
|
121
121
|
const _AttachmentOverflowMenuItem = require("./AttachmentOverflowMenuItem");
|
|
122
122
|
const _AgentTag = require("./AgentTag");
|
|
123
|
-
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-copilot/react-attachments",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.3",
|
|
4
4
|
"description": "A set of components related to attaching files in Copilot experiences.",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
},
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@fluentui-copilot/react-provider": "^0.12.
|
|
16
|
-
"@fluentui-copilot/react-utilities": "^0.0.
|
|
17
|
-
"@fluentui-copilot/tokens": "^0.3.
|
|
15
|
+
"@fluentui-copilot/react-provider": "^0.12.3",
|
|
16
|
+
"@fluentui-copilot/react-utilities": "^0.0.10",
|
|
17
|
+
"@fluentui-copilot/tokens": "^0.3.12",
|
|
18
18
|
"@swc/helpers": "^0.5.1"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|