@fluentui-copilot/react-attachments 0.0.0-nightly-20250717-0405-eecbae35.1 → 0.0.0-nightly-20250718-0405-8e705578.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/CHANGELOG.json +18 -3
  2. package/CHANGELOG.md +13 -4
  3. package/lib/components/AgentTag/useAgentTagStyles.styles.raw.js +66 -0
  4. package/lib/components/AgentTag/useAgentTagStyles.styles.raw.js.map +1 -0
  5. package/lib/components/Attachment/useAttachmentStyles.styles.raw.js +317 -0
  6. package/lib/components/Attachment/useAttachmentStyles.styles.raw.js.map +1 -0
  7. package/lib/components/AttachmentList/useAttachmentListStyles.styles.raw.js +44 -0
  8. package/lib/components/AttachmentList/useAttachmentListStyles.styles.raw.js.map +1 -0
  9. package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js +102 -0
  10. package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js.map +1 -0
  11. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js +57 -0
  12. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js.map +1 -0
  13. package/lib/components/utils/useProgressBarStyles.styles.raw.js +42 -0
  14. package/lib/components/utils/useProgressBarStyles.styles.raw.js.map +1 -0
  15. package/lib-commonjs/components/AgentTag/useAgentTagStyles.styles.raw.js +82 -0
  16. package/lib-commonjs/components/AgentTag/useAgentTagStyles.styles.raw.js.map +1 -0
  17. package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.raw.js +336 -0
  18. package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.raw.js.map +1 -0
  19. package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.styles.raw.js +60 -0
  20. package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.styles.raw.js.map +1 -0
  21. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js +118 -0
  22. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js.map +1 -0
  23. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js +73 -0
  24. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js.map +1 -0
  25. package/lib-commonjs/components/utils/useProgressBarStyles.styles.raw.js +50 -0
  26. package/lib-commonjs/components/utils/useProgressBarStyles.styles.raw.js.map +1 -0
  27. 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"}
@@ -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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui-copilot/react-attachments",
3
- "version": "0.0.0-nightly-20250717-0405-eecbae35.1",
3
+ "version": "0.0.0-nightly-20250718-0405-8e705578.1",
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.0.0-nightly-20250717-0405-eecbae35.1",
16
- "@fluentui-copilot/react-utilities": "0.0.0-nightly-20250717-0405-eecbae35.1",
17
- "@fluentui-copilot/tokens": "0.0.0-nightly-20250717-0405-eecbae35.1",
15
+ "@fluentui-copilot/react-provider": "0.0.0-nightly-20250718-0405-8e705578.1",
16
+ "@fluentui-copilot/react-utilities": "0.0.0-nightly-20250718-0405-8e705578.1",
17
+ "@fluentui-copilot/tokens": "0.0.0-nightly-20250718-0405-8e705578.1",
18
18
  "@swc/helpers": "^0.5.1"
19
19
  },
20
20
  "peerDependencies": {