@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.
Files changed (133) hide show
  1. package/CHANGELOG.json +16 -1
  2. package/CHANGELOG.md +11 -2
  3. package/lib/AgentTag.js +0 -1
  4. package/lib/Attachment.js +0 -1
  5. package/lib/AttachmentList.js +0 -1
  6. package/lib/AttachmentOverflowMenu.js +0 -1
  7. package/lib/AttachmentOverflowMenuButton.js +0 -1
  8. package/lib/AttachmentOverflowMenuItem.js +0 -1
  9. package/lib/components/AgentTag/AgentTag.js +4 -5
  10. package/lib/components/AgentTag/AgentTag.types.js +1 -2
  11. package/lib/components/AgentTag/index.js +0 -1
  12. package/lib/components/AgentTag/renderAgentTag.js +3 -5
  13. package/lib/components/AgentTag/useAgentTag.js +7 -9
  14. package/lib/components/AgentTag/useAgentTagStyles.styles.raw.js +66 -0
  15. package/lib/components/AgentTag/useAgentTagStyles.styles.raw.js.map +1 -0
  16. package/lib/components/Attachment/Attachment.js +5 -6
  17. package/lib/components/Attachment/Attachment.types.js +1 -2
  18. package/lib/components/Attachment/index.js +0 -1
  19. package/lib/components/Attachment/renderAttachment.js +36 -31
  20. package/lib/components/Attachment/useAttachment.js +85 -95
  21. package/lib/components/Attachment/useAttachmentStyles.styles.raw.js +317 -0
  22. package/lib/components/Attachment/useAttachmentStyles.styles.raw.js.map +1 -0
  23. package/lib/components/AttachmentList/AttachmentList.js +6 -7
  24. package/lib/components/AttachmentList/AttachmentList.types.js +1 -2
  25. package/lib/components/AttachmentList/index.js +0 -1
  26. package/lib/components/AttachmentList/renderAttachmentList.js +25 -25
  27. package/lib/components/AttachmentList/useAttachmentList.js +113 -124
  28. package/lib/components/AttachmentList/useAttachmentListContextValues.js +10 -15
  29. package/lib/components/AttachmentList/useAttachmentListStyles.styles.raw.js +44 -0
  30. package/lib/components/AttachmentList/useAttachmentListStyles.styles.raw.js.map +1 -0
  31. package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js +8 -9
  32. package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js +1 -2
  33. package/lib/components/AttachmentOverflowMenu/index.js +0 -1
  34. package/lib/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js +8 -13
  35. package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js +9 -15
  36. package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js +10 -15
  37. package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js +5 -6
  38. package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js +1 -2
  39. package/lib/components/AttachmentOverflowMenuButton/index.js +0 -1
  40. package/lib/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js +11 -10
  41. package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js +51 -59
  42. package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js +102 -0
  43. package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js.map +1 -0
  44. package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js +4 -5
  45. package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js +1 -2
  46. package/lib/components/AttachmentOverflowMenuItem/index.js +0 -1
  47. package/lib/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js +9 -8
  48. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +41 -49
  49. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js +57 -0
  50. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js.map +1 -0
  51. package/lib/components/index.js +0 -1
  52. package/lib/components/utils/useProgressBarStyles.styles.raw.js +42 -0
  53. package/lib/components/utils/useProgressBarStyles.styles.raw.js.map +1 -0
  54. package/lib/contexts/attachmentListContext.js +4 -5
  55. package/lib/contexts/attachmentOverflowMenuContext.js +4 -5
  56. package/lib/index.js +0 -1
  57. package/lib-commonjs/AgentTag.js +0 -1
  58. package/lib-commonjs/Attachment.js +0 -1
  59. package/lib-commonjs/AttachmentList.js +0 -1
  60. package/lib-commonjs/AttachmentOverflowMenu.js +0 -1
  61. package/lib-commonjs/AttachmentOverflowMenuButton.js +0 -1
  62. package/lib-commonjs/AttachmentOverflowMenuItem.js +0 -1
  63. package/lib-commonjs/components/AgentTag/AgentTag.js +1 -1
  64. package/lib-commonjs/components/AgentTag/AgentTag.js.map +1 -1
  65. package/lib-commonjs/components/AgentTag/AgentTag.types.js +0 -1
  66. package/lib-commonjs/components/AgentTag/index.js +0 -1
  67. package/lib-commonjs/components/AgentTag/renderAgentTag.js +1 -1
  68. package/lib-commonjs/components/AgentTag/renderAgentTag.js.map +1 -1
  69. package/lib-commonjs/components/AgentTag/useAgentTag.js +1 -1
  70. package/lib-commonjs/components/AgentTag/useAgentTag.js.map +1 -1
  71. package/lib-commonjs/components/AgentTag/useAgentTagStyles.styles.raw.js +82 -0
  72. package/lib-commonjs/components/AgentTag/useAgentTagStyles.styles.raw.js.map +1 -0
  73. package/lib-commonjs/components/Attachment/Attachment.js +1 -1
  74. package/lib-commonjs/components/Attachment/Attachment.js.map +1 -1
  75. package/lib-commonjs/components/Attachment/Attachment.types.js +0 -1
  76. package/lib-commonjs/components/Attachment/index.js +0 -1
  77. package/lib-commonjs/components/Attachment/renderAttachment.js +1 -1
  78. package/lib-commonjs/components/Attachment/renderAttachment.js.map +1 -1
  79. package/lib-commonjs/components/Attachment/useAttachment.js +1 -1
  80. package/lib-commonjs/components/Attachment/useAttachment.js.map +1 -1
  81. package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.raw.js +336 -0
  82. package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.raw.js.map +1 -0
  83. package/lib-commonjs/components/AttachmentList/AttachmentList.js +1 -1
  84. package/lib-commonjs/components/AttachmentList/AttachmentList.js.map +1 -1
  85. package/lib-commonjs/components/AttachmentList/AttachmentList.types.js +0 -1
  86. package/lib-commonjs/components/AttachmentList/index.js +0 -1
  87. package/lib-commonjs/components/AttachmentList/renderAttachmentList.js +1 -1
  88. package/lib-commonjs/components/AttachmentList/renderAttachmentList.js.map +1 -1
  89. package/lib-commonjs/components/AttachmentList/useAttachmentList.js +1 -1
  90. package/lib-commonjs/components/AttachmentList/useAttachmentList.js.map +1 -1
  91. package/lib-commonjs/components/AttachmentList/useAttachmentListContextValues.js +1 -1
  92. package/lib-commonjs/components/AttachmentList/useAttachmentListContextValues.js.map +1 -1
  93. package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.styles.raw.js +60 -0
  94. package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.styles.raw.js.map +1 -0
  95. package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js +1 -1
  96. package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js.map +1 -1
  97. package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js +0 -1
  98. package/lib-commonjs/components/AttachmentOverflowMenu/index.js +0 -1
  99. package/lib-commonjs/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js +1 -1
  100. package/lib-commonjs/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js.map +1 -1
  101. package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js +1 -1
  102. package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js.map +1 -1
  103. package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js +1 -1
  104. package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js.map +1 -1
  105. package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js +1 -1
  106. package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js.map +1 -1
  107. package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js +0 -1
  108. package/lib-commonjs/components/AttachmentOverflowMenuButton/index.js +0 -1
  109. package/lib-commonjs/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js +1 -1
  110. package/lib-commonjs/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js.map +1 -1
  111. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js +1 -1
  112. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js.map +1 -1
  113. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js +118 -0
  114. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js.map +1 -0
  115. package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js +1 -1
  116. package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js.map +1 -1
  117. package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js +0 -1
  118. package/lib-commonjs/components/AttachmentOverflowMenuItem/index.js +0 -1
  119. package/lib-commonjs/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js +1 -1
  120. package/lib-commonjs/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js.map +1 -1
  121. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +1 -1
  122. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js.map +1 -1
  123. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js +73 -0
  124. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js.map +1 -0
  125. package/lib-commonjs/components/index.js +0 -1
  126. package/lib-commonjs/components/utils/useProgressBarStyles.styles.raw.js +50 -0
  127. package/lib-commonjs/components/utils/useProgressBarStyles.styles.raw.js.map +1 -0
  128. package/lib-commonjs/contexts/attachmentListContext.js +1 -1
  129. package/lib-commonjs/contexts/attachmentListContext.js.map +1 -1
  130. package/lib-commonjs/contexts/attachmentOverflowMenuContext.js +1 -1
  131. package/lib-commonjs/contexts/attachmentOverflowMenuContext.js.map +1 -1
  132. package/lib-commonjs/index.js +0 -1
  133. 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)); //# sourceMappingURL=attachmentListContext.js.map
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;yBACpEC,IAA2B;uBAC3BC;yBACAC;AACF;AAUO,MAAMP,yBAAyBD,sBAAsBS,QAAQ;AAE7D,MAAMP,oCAAoCQ,CAAAA,WAC/CC,IAAAA,wCAAAA,EAAmBX,uBAAuB,CAACY,MAAMP,iCAAiC,GAAKK,SAASE"}
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)); //# sourceMappingURL=attachmentOverflowMenuContext.js.map
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;mBAC1EC;uBACAC;mBACAC;AACF;AASO,MAAMP,iCAAiCD,8BAA8BS,QAAQ;AAE7E,MAAMP,4CAA4CQ,CAAAA,WAEpDC,IAAAA,wCAAAA,EAAmBX,+BAA+B,CAACY,MAAMP,+BAA+B,GAAKK,SAASE"}
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"}
@@ -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.2",
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.2",
16
- "@fluentui-copilot/react-utilities": "^0.0.9",
17
- "@fluentui-copilot/tokens": "^0.3.11",
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": {