@fluentui-copilot/react-attachments 0.9.1 → 0.9.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 +39 -1
- package/CHANGELOG.md +20 -2
- package/dist/index.d.ts +19 -6
- package/lib/components/Attachment/Attachment.types.js.map +1 -1
- package/lib/components/Attachment/renderAttachment.js +1 -1
- package/lib/components/Attachment/renderAttachment.js.map +1 -1
- package/lib/components/Attachment/useAttachment.js +15 -3
- package/lib/components/Attachment/useAttachment.js.map +1 -1
- package/lib/components/Attachment/useAttachmentStyles.js +22 -4
- package/lib/components/Attachment/useAttachmentStyles.js.map +1 -1
- package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js.map +1 -1
- package/lib/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js +1 -1
- package/lib/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js.map +1 -1
- package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js +15 -3
- package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js.map +1 -1
- package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.js +23 -5
- package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.js.map +1 -1
- package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js.map +1 -1
- package/lib/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js +4 -2
- package/lib/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js.map +1 -1
- package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +12 -2
- package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js.map +1 -1
- package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.js +21 -5
- package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.js.map +1 -1
- package/lib/components/AttachmentTag/AttachmentTag.js +1 -1
- package/lib/components/AttachmentTag/AttachmentTag.js.map +1 -1
- package/lib/components/AttachmentTagItem/AttachmentTagItem.js +1 -1
- package/lib/components/AttachmentTagItem/AttachmentTagItem.js.map +1 -1
- package/lib/components/AttachmentTagList/AttachmentTagList.js +1 -1
- package/lib/components/AttachmentTagList/AttachmentTagList.js.map +1 -1
- package/lib/components/utils/useProgressBarStyles.js +54 -0
- package/lib/components/utils/useProgressBarStyles.js.map +1 -0
- package/lib-commonjs/components/Attachment/Attachment.types.js.map +1 -1
- package/lib-commonjs/components/Attachment/renderAttachment.js +2 -1
- package/lib-commonjs/components/Attachment/renderAttachment.js.map +1 -1
- package/lib-commonjs/components/Attachment/useAttachment.js +14 -2
- package/lib-commonjs/components/Attachment/useAttachment.js.map +1 -1
- package/lib-commonjs/components/Attachment/useAttachmentStyles.js +22 -4
- package/lib-commonjs/components/Attachment/useAttachmentStyles.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js +2 -2
- package/lib-commonjs/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js +14 -2
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.js +24 -6
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js +6 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +11 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.js +20 -4
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.js.map +1 -1
- package/lib-commonjs/components/AttachmentTag/AttachmentTag.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagList/AttachmentTagList.js.map +1 -1
- package/lib-commonjs/components/utils/useProgressBarStyles.js +103 -0
- package/lib-commonjs/components/utils/useProgressBarStyles.js.map +1 -0
- package/package.json +9 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useAttachmentOverflowMenuButtonStyles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses, tokens, typographyStyles } from '@fluentui/react-components';\nimport type {\n AttachmentOverflowMenuButtonSlots,\n AttachmentOverflowMenuButtonState,\n} from './AttachmentOverflowMenuButton.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const attachmentOverflowMenuButtonClassNames: SlotClassNames<AttachmentOverflowMenuButtonSlots> = {\n root: 'fai-AttachmentOverflowMenuButton',\n};\n\nconst useRootBaseClassName = makeResetStyles({\n color: tokens.colorNeutralForeground1,\n alignItems: 'center',\n backgroundColor: tokens.colorNeutralBackground1,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,\n borderRadius: tokens.borderRadiusMedium,\n boxSizing: 'border-box',\n columnGap: tokens.spacingHorizontalSNudge,\n cursor: 'pointer',\n display: 'inline-flex',\n flexWrap: 'nowrap',\n fontFamily: typographyStyles.body1.fontFamily,\n fontSize: typographyStyles.body1.fontSize,\n fontWeight: typographyStyles.body1.fontWeight,\n justifyContent: 'center',\n padding: tokens.spacingVerticalS,\n verticalAlign: 'middle',\n alignSelf: 'end',\n\n ':hover': {\n cursor: 'pointer',\n backgroundColor: tokens.colorNeutralBackground3Hover,\n color: tokens.colorNeutralForeground2Hover,\n },\n ':active': {\n backgroundColor: tokens.colorNeutralBackground3Pressed,\n color: tokens.colorNeutralForeground2Pressed,\n },\n '@media (forced-colors: active)': {\n ':hover': {\n backgroundColor: 'HighlightText',\n },\n ':active': {\n backgroundColor: 'HighlightText',\n },\n },\n});\n/**\n * Apply styling to the AttachmentOverflowMenuButton slots based on the state\n */\nexport const useAttachmentOverflowMenuButtonStyles_unstable = (\n state: AttachmentOverflowMenuButtonState,\n): AttachmentOverflowMenuButtonState => {\n const rootBaseClassName = useRootBaseClassName();\n\n state.root.className = mergeClasses(\n attachmentOverflowMenuButtonClassNames.root,\n rootBaseClassName,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["attachmentOverflowMenuButtonClassNames","columnGap","root","useRootBaseClassName","makeResetStyles","color","alignItems","state","cursor","display","
|
|
1
|
+
{"version":3,"sources":["useAttachmentOverflowMenuButtonStyles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses, slot, tokens, typographyStyles } from '@fluentui/react-components';\nimport { useProgressBarStyles } from '../utils/useProgressBarStyles';\nimport type {\n AttachmentOverflowMenuButtonSlots,\n AttachmentOverflowMenuButtonState,\n} from './AttachmentOverflowMenuButton.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const attachmentOverflowMenuButtonClassNames: SlotClassNames<AttachmentOverflowMenuButtonSlots> = {\n root: 'fai-AttachmentOverflowMenuButton',\n progress: 'fai-AttachmentOverflowMenuButton__progress',\n};\n\nconst useRootBaseClassName = makeResetStyles({\n color: tokens.colorNeutralForeground1,\n alignItems: 'center',\n backgroundColor: tokens.colorNeutralBackground1,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,\n borderRadius: tokens.borderRadiusMedium,\n boxSizing: 'border-box',\n columnGap: tokens.spacingHorizontalSNudge,\n cursor: 'pointer',\n display: 'inline-flex',\n flexWrap: 'nowrap',\n fontFamily: typographyStyles.body1.fontFamily,\n fontSize: typographyStyles.body1.fontSize,\n fontWeight: typographyStyles.body1.fontWeight,\n justifyContent: 'center',\n padding: tokens.spacingVerticalS,\n verticalAlign: 'middle',\n alignSelf: 'end',\n position: 'relative',\n\n ':hover': {\n cursor: 'pointer',\n backgroundColor: tokens.colorNeutralBackground3Hover,\n color: tokens.colorNeutralForeground2Hover,\n },\n ':active': {\n backgroundColor: tokens.colorNeutralBackground3Pressed,\n color: tokens.colorNeutralForeground2Pressed,\n },\n '@media (forced-colors: active)': {\n ':hover': {\n backgroundColor: 'HighlightText',\n },\n ':active': {\n backgroundColor: 'HighlightText',\n },\n },\n});\n\n/**\n * Apply styling to the AttachmentOverflowMenuButton slots based on the state\n */\nexport const useAttachmentOverflowMenuButtonStyles_unstable = (\n state: AttachmentOverflowMenuButtonState,\n): AttachmentOverflowMenuButtonState => {\n const rootBaseClassName = useRootBaseClassName();\n const progressBarStyles = useProgressBarStyles();\n\n state.root.className = mergeClasses(\n attachmentOverflowMenuButtonClassNames.root,\n rootBaseClassName,\n state.root.className,\n );\n\n if (state.progress) {\n state.progress.className = mergeClasses(\n attachmentOverflowMenuButtonClassNames.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":["attachmentOverflowMenuButtonClassNames","columnGap","root","progress","useRootBaseClassName","makeResetStyles","color","alignItems","state","cursor","display","useProgressBarStyles","flexWrap","mergeClasses","rootBaseClassName","className","fontFamily","typographyStyles","fontSize","body1","progressBarStyles","fontWeight","justifyContent","padding","spacingVerticalS","verticalAlign","alignSelf","position","value","undefined","bar","indeterminateProgressBar","backgroundColor","colorNeutralBackground3Hover"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAQaA,sCAAAA;eAAAA;;IAYXC,8CAAyC;eAAzCA;;;iCApBoE;sCACjC;AAO9B,MAAMD,yCAA4F;UACvGE;cACAC;AACF;AAEA,MAAMC,uBAAuBC,IAAAA,8BAAAA,EAAAA,YAAgB,MAAA;OAC3CC;QAAAA;QAAqC;QAAA;KAAA;OACrCC;QAAAA;KAAY;;AAKZN,MAAAA,iDAAyCO,CAAAA;UACzCC,oBAAQL;UACRM,oBAASC,IAAAA,0CAAA;UACTC,IAAAA,CAAAA,SAAU,GAAAC,IAAAA,6BAAA,EAAAb,uCAAAE,IAAA,EAAAY,mBAAAN,MAAAN,IAAA,CAAAa,SAAA;QACVC,MAAAA,QAAYC,EAAAA;QACZC,MAAAA,QAAUD,CAAAA,SAAAA,GAAiBE,IAAAA,6BAAMD,EAAAA,uCAAQf,QAAA,EAAAiB,kBAAAjB,QAAA,EAAAK,MAAAL,QAAA,CAAAY,SAAA;QACzCM,MAAAA,MAAYJ,qBAAAA,CAAAA,QAAAA,CAAAA,MAAiBE,QAAME,CAAAA,GAAAA,EAAU;YAC7CC,aAAAA;YACAC,iBAAgBC;QAChBC;QACAC,IAAAA,KAAAA;YACAC,IAAAA,MAAUxB,QAAA,CAAAyB,KAAA,KAAAC,WAAA;gBAEVC,IAAAf,SAAU,GAAAF,IAAAA,6BAAA,EAAAO,kBAAAW,wBAAA,EAAAD,IAAAf,SAAA;mBACRN;gBACAuB,IAAAA,SAAAA,GAAAA,IAAAA,6BAAwBC,EAAAA,kBAAAA,kBAA4B,EAAAH,IAAAf,SAAA;;YAEtDP,MAAAL,QAAA,CAAA2B,GAAA,GAAAA;QACA;;WAEExB;oEAEgC"}
|
package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AttachmentOverflowMenuItem.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, MenuItem, Slot } from '@fluentui/react-components';\nimport type { AttachmentProps } from '../Attachment';\n\nexport type AttachmentOverflowMenuItemSlots = {\n root: NonNullable<Slot<typeof MenuItem>>;\n};\n\n/**\n * AttachmentOverflowMenuItem Props\n */\nexport type AttachmentOverflowMenuItemProps = ComponentProps<Partial<AttachmentOverflowMenuItemSlots>> &\n Pick<AttachmentProps, 'id' | 'media' | 'imageOnly'>;\n\n/**\n * State used in rendering AttachmentOverflowMenuItem\n */\nexport type AttachmentOverflowMenuItemState = ComponentState<AttachmentOverflowMenuItemSlots> &\n Pick<AttachmentOverflowMenuItemProps, 'imageOnly'> & {\n isVisible: boolean;\n };\n"],"names":[],"rangeMappings":";;","mappings":"
|
|
1
|
+
{"version":3,"sources":["AttachmentOverflowMenuItem.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, MenuItem, ProgressBar, Slot } from '@fluentui/react-components';\nimport type { AttachmentProps } from '../Attachment';\n\nexport type AttachmentOverflowMenuItemSlots = {\n root: NonNullable<Slot<typeof MenuItem>>;\n progress?: Slot<typeof ProgressBar>;\n};\n\n/**\n * AttachmentOverflowMenuItem Props\n */\nexport type AttachmentOverflowMenuItemProps = ComponentProps<Partial<AttachmentOverflowMenuItemSlots>> &\n Pick<AttachmentProps, 'id' | 'media' | 'imageOnly'>;\n\n/**\n * State used in rendering AttachmentOverflowMenuItem\n */\nexport type AttachmentOverflowMenuItemState = ComponentState<AttachmentOverflowMenuItemSlots> &\n Pick<AttachmentOverflowMenuItemProps, 'imageOnly'> & {\n isVisible: boolean;\n };\n"],"names":[],"rangeMappings":";;","mappings":"AAcA;;CAEC"}
|
package/lib-commonjs/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js
CHANGED
|
@@ -12,5 +12,10 @@ const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
|
|
|
12
12
|
const _reactcomponents = require("@fluentui/react-components");
|
|
13
13
|
const renderAttachmentOverflowMenuItem_unstable = (state)=>{
|
|
14
14
|
(0, _reactcomponents.assertSlots)(state);
|
|
15
|
-
return !state.isVisible ? /*#__PURE__*/ (0, _jsxruntime.
|
|
15
|
+
return !state.isVisible ? /*#__PURE__*/ (0, _jsxruntime.jsxs)(state.root, {
|
|
16
|
+
children: [
|
|
17
|
+
state.root.children,
|
|
18
|
+
state.progress && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.progress, {})
|
|
19
|
+
]
|
|
20
|
+
}) : null;
|
|
16
21
|
}; //# sourceMappingURL=renderAttachmentOverflowMenuItem.js.map
|
package/lib-commonjs/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderAttachmentOverflowMenuItem.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type {\n AttachmentOverflowMenuItemState,\n AttachmentOverflowMenuItemSlots,\n} from './AttachmentOverflowMenuItem.types';\n\n/**\n * Render the final JSX of AttachmentOverflowMenuItem\n */\nexport const renderAttachmentOverflowMenuItem_unstable = (state: AttachmentOverflowMenuItemState) => {\n assertSlots<AttachmentOverflowMenuItemSlots>(state);\n\n return !state.isVisible ? <state.root /> : null;\n};\n"],"names":["assertSlots","state","
|
|
1
|
+
{"version":3,"sources":["renderAttachmentOverflowMenuItem.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type {\n AttachmentOverflowMenuItemState,\n AttachmentOverflowMenuItemSlots,\n} from './AttachmentOverflowMenuItem.types';\n\n/**\n * Render the final JSX of AttachmentOverflowMenuItem\n */\nexport const renderAttachmentOverflowMenuItem_unstable = (state: AttachmentOverflowMenuItemState) => {\n assertSlots<AttachmentOverflowMenuItemSlots>(state);\n\n return !state.isVisible ? (\n <state.root>\n {state.root.children}\n {state.progress && <state.progress />}\n </state.root>\n ) : null;\n};\n"],"names":["assertSlots","state","root","children","progress","_jsx"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAaEA;;;eAAAA;;;4BAZF;iCAE4B;AAU1BA,MAAAA,4CAA6CC,CAAAA;oCAErCA,EAAAA;;kBAEHA;YAAAA,MAAMC,IAAKC,CAAAA,QAAQ;YAAAF,MAAAG,QAAA,IAAA,WAAA,GAAAC,IAAAA,eAAA,EAAAJ,MAAAG,QAAA,EAAA,CAAA;SAAA;;+DAGpB"}
|
|
@@ -29,11 +29,21 @@ const useAttachmentOverflowMenuItem_unstable = (props, ref)=>{
|
|
|
29
29
|
root.onClick = (0, _reactcomponents.mergeCallbacks)(root.onClick, (ev)=>onAttachmentDismiss === null || onAttachmentDismiss === void 0 ? void 0 : onAttachmentDismiss(ev, {
|
|
30
30
|
id
|
|
31
31
|
}));
|
|
32
|
+
const progress = _reactcomponents.slot.optional(props.progress, {
|
|
33
|
+
defaultProps: {
|
|
34
|
+
shape: 'square',
|
|
35
|
+
thickness: 'large',
|
|
36
|
+
'aria-labelledby': props.id
|
|
37
|
+
},
|
|
38
|
+
elementType: _reactcomponents.ProgressBar
|
|
39
|
+
});
|
|
32
40
|
return {
|
|
33
41
|
components: {
|
|
34
|
-
root: _reactcomponents.MenuItem
|
|
42
|
+
root: _reactcomponents.MenuItem,
|
|
43
|
+
progress: _reactcomponents.ProgressBar
|
|
35
44
|
},
|
|
36
45
|
root,
|
|
46
|
+
progress,
|
|
37
47
|
isVisible,
|
|
38
48
|
imageOnly
|
|
39
49
|
};
|
package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useAttachmentOverflowMenuItem.tsx"],"sourcesContent":["import * as React from 'react';\nimport { MenuItem, mergeCallbacks, slot, useIsOverflowItemVisible } from '@fluentui/react-components';\nimport { Dismiss20Filled, Dismiss20Regular, bundleIcon } from '@fluentui/react-icons';\nimport { useAttachmentListContext_unstable } from '../../contexts/attachmentListContext';\nimport type {\n AttachmentOverflowMenuItemProps,\n AttachmentOverflowMenuItemState,\n} from './AttachmentOverflowMenuItem.types';\n\n/**\n * Create the state required to render AttachmentOverflowMenuItem.\n *\n * The returned state can be modified with hooks such as useAttachmentOverflowMenuItemStyles_unstable,\n * before being passed to renderAttachmentOverflowMenuItem_unstable.\n *\n * @param props - props from this instance of AttachmentOverflowMenuItem\n * @param ref - reference to root HTMLElement of AttachmentOverflowMenuItem\n */\nexport const useAttachmentOverflowMenuItem_unstable = (\n props: AttachmentOverflowMenuItemProps,\n ref: React.Ref<HTMLDivElement>,\n): AttachmentOverflowMenuItemState => {\n const { id, imageOnly, media } = props;\n const DismissIcon = bundleIcon(Dismiss20Filled, Dismiss20Regular);\n const isVisible = useIsOverflowItemVisible(id);\n\n const onAttachmentDismiss = useAttachmentListContext_unstable(context => context.onAttachmentDismiss);\n\n const root = slot.always(\n { ref, icon: media, secondaryContent: <DismissIcon />, ...props },\n { elementType: MenuItem },\n );\n root.onClick = mergeCallbacks(root.onClick, ev =>\n onAttachmentDismiss?.(ev, {\n id,\n }),\n );\n\n return {\n components: {\n root: MenuItem,\n },\n root,\n isVisible,\n imageOnly,\n };\n};\n"],"names":["id","props","imageOnly","onAttachmentDismiss","media","icon","secondaryContent","useAttachmentListContext_unstable","context","root","slot","always","mergeCallbacks","onClick","elementType","
|
|
1
|
+
{"version":3,"sources":["useAttachmentOverflowMenuItem.tsx"],"sourcesContent":["import * as React from 'react';\nimport { MenuItem, ProgressBar, mergeCallbacks, slot, useIsOverflowItemVisible } from '@fluentui/react-components';\nimport { Dismiss20Filled, Dismiss20Regular, bundleIcon } from '@fluentui/react-icons';\nimport { useAttachmentListContext_unstable } from '../../contexts/attachmentListContext';\nimport type {\n AttachmentOverflowMenuItemProps,\n AttachmentOverflowMenuItemState,\n} from './AttachmentOverflowMenuItem.types';\n\n/**\n * Create the state required to render AttachmentOverflowMenuItem.\n *\n * The returned state can be modified with hooks such as useAttachmentOverflowMenuItemStyles_unstable,\n * before being passed to renderAttachmentOverflowMenuItem_unstable.\n *\n * @param props - props from this instance of AttachmentOverflowMenuItem\n * @param ref - reference to root HTMLElement of AttachmentOverflowMenuItem\n */\nexport const useAttachmentOverflowMenuItem_unstable = (\n props: AttachmentOverflowMenuItemProps,\n ref: React.Ref<HTMLDivElement>,\n): AttachmentOverflowMenuItemState => {\n const { id, imageOnly, media } = props;\n const DismissIcon = bundleIcon(Dismiss20Filled, Dismiss20Regular);\n const isVisible = useIsOverflowItemVisible(id);\n\n const onAttachmentDismiss = useAttachmentListContext_unstable(context => context.onAttachmentDismiss);\n\n const root = slot.always(\n { ref, icon: media, secondaryContent: <DismissIcon />, ...props },\n { elementType: MenuItem },\n );\n root.onClick = mergeCallbacks(root.onClick, ev =>\n onAttachmentDismiss?.(ev, {\n id,\n }),\n );\n\n const progress = slot.optional(props.progress, {\n defaultProps: {\n shape: 'square',\n thickness: 'large',\n 'aria-labelledby': props.id,\n },\n elementType: ProgressBar,\n });\n\n return {\n components: {\n root: MenuItem,\n progress: ProgressBar,\n },\n root,\n progress,\n isVisible,\n imageOnly,\n };\n};\n"],"names":["id","props","imageOnly","onAttachmentDismiss","media","icon","secondaryContent","useAttachmentListContext_unstable","context","root","slot","always","mergeCallbacks","onClick","elementType","progress","shape","ev","optional","thickness","ProgressBar","isVisible"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAsBUA;;;eAAAA;;;;iEAtBa;iCAC+D;4BACxB;uCACZ;AAmBhD,MAAQA,yCAAyBC,CAAAA,OAAAA;UACjC,EACAD,EAAA,EAEAE,SAAMC,EAENC,KAAA;UACSC,cAAMD,IAAAA,sBAAAA,EAAAA,2BAAAA,EAAAA,4BAAAA;UAAOE,YAAAA,IAAAA,yCAAkB,EAAAN;UAAiBG,sBAAQI,IAAAA,wDAAA,EAAAC,CAAAA,UAAAA,QAAAL,mBAAA;UAC/DM,OAAAC,qBAAA,CAAAC,MAAA,CAAA;;QAAwBN,MAAAD;QAE1BK,kBAAeG,WAAAA,GAAeH,OAAKI,aACjCV,CAAAA,aAAAA;gBACEH;;QAIJc,aAAMC,yBAAWL;;gBAEbM,GAAAA,IAAAA,+BAAO,EAAAP,KAAAI,OAAA,EAAAI,CAAAA,KAAAd,wBAAA,QAAAA,wBAAA,KAAA,IAAA,KAAA,IAAAA,oBAAAc,IAAA;;;UAGTF,WAAAL,qBAAA,CAAAQ,QAAA,CAAAjB,MAAAc,QAAA,EAAA;sBACAD;YACFE,OAAA;YAEAG,WAAO;+BACOlB,MAAAD,EAAA;;qBAEVe,4BAAUK;;WAEZX;oBACAM;kBACAM,yBAAAA;sBACAnB,4BAAAA;QACF;QACAO"}
|
package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.js
CHANGED
|
@@ -17,10 +17,11 @@ _export(exports, {
|
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
19
|
const _reactcomponents = require("@fluentui/react-components");
|
|
20
|
+
const _useProgressBarStyles = require("../utils/useProgressBarStyles");
|
|
20
21
|
const attachmentOverflowMenuItemClassNames = {
|
|
21
|
-
root: 'fai-AttachmentOverflowMenuItem'
|
|
22
|
+
root: 'fai-AttachmentOverflowMenuItem',
|
|
23
|
+
progress: 'fai-AttachmentOverflowMenuItem__progress'
|
|
22
24
|
};
|
|
23
|
-
const useRootBaseClassName = (0, _reactcomponents.__resetStyles)("r0", null, []);
|
|
24
25
|
const useStyles = (0, _reactcomponents.__styles)({
|
|
25
26
|
imageOnly: {
|
|
26
27
|
Bt984gj: "f122n59"
|
|
@@ -32,8 +33,23 @@ const useStyles = (0, _reactcomponents.__styles)({
|
|
|
32
33
|
});
|
|
33
34
|
const useAttachmentOverflowMenuItemStyles_unstable = (state)=>{
|
|
34
35
|
const { imageOnly } = state;
|
|
35
|
-
const rootBaseClassName = useRootBaseClassName();
|
|
36
36
|
const styles = useStyles();
|
|
37
|
-
|
|
37
|
+
const progressBarStyles = (0, _useProgressBarStyles.useProgressBarStyles)();
|
|
38
|
+
state.root.className = (0, _reactcomponents.mergeClasses)(attachmentOverflowMenuItemClassNames.root, imageOnly && styles.imageOnly, state.root.className);
|
|
39
|
+
if (state.progress) {
|
|
40
|
+
state.progress.className = (0, _reactcomponents.mergeClasses)(attachmentOverflowMenuItemClassNames.progress, progressBarStyles.progress, state.progress.className);
|
|
41
|
+
const bar = _reactcomponents.slot.optional(state.progress.bar, {
|
|
42
|
+
elementType: 'div',
|
|
43
|
+
renderByDefault: true
|
|
44
|
+
});
|
|
45
|
+
if (bar) {
|
|
46
|
+
if (state.progress.value === undefined) {
|
|
47
|
+
bar.className = (0, _reactcomponents.mergeClasses)(progressBarStyles.indeterminateProgressBar, bar.className);
|
|
48
|
+
} else {
|
|
49
|
+
bar.className = (0, _reactcomponents.mergeClasses)(progressBarStyles.regularProgressBar, bar.className);
|
|
50
|
+
}
|
|
51
|
+
state.progress.bar = bar;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
38
54
|
return state;
|
|
39
55
|
}; //# sourceMappingURL=useAttachmentOverflowMenuItemStyles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useAttachmentOverflowMenuItemStyles.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["useAttachmentOverflowMenuItemStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, slot } from '@fluentui/react-components';\nimport { useProgressBarStyles } from '../utils/useProgressBarStyles';\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 useStyles = makeStyles({\n imageOnly: {\n alignItems: 'center',\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 const { imageOnly } = state;\n const styles = useStyles();\n const progressBarStyles = useProgressBarStyles();\n\n state.root.className = mergeClasses(\n attachmentOverflowMenuItemClassNames.root,\n imageOnly && styles.imageOnly,\n state.root.className,\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","progressBarStyles","useProgressBarStyles","root","progress","useStyles","makeStyles","imageOnly","alignItems","d","state","styles","bar","renderByDefault","className","mergeClasses","undefined","indeterminateProgressBar"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAQaA,oCAAAA;eAAAA;;IAmBLC,4CAAoBC;eAApBD;;;iCA3B+B;sCACF;AAO9B,MAAMD,uCAAwF;UACnGG;cACAC;AACF;AAEA,MAAMC,YAAYC,IAAAA,yBAAAA,EAAAA;eAChBC;iBACEC;;AAEJ,GAAA;IAEAC,GAAA;QAAA;KAAA;;AAQE,MAAMR,+CAAoBC,CAAAA;UAE1BQ,EAMAH,SAAIG;UAOFC,SAAMC;8BAAuDV,IAAAA,0CAAA;cAAOW,CAAAA,SAAAA,GAAAA,IAAAA,6BAAiB,EAAAb,qCAAAG,IAAA,EAAAI,aAAAI,OAAAJ,SAAA,EAAAG,MAAAP,IAAA,CAAAW,SAAA;cAAKV,QAAA,EAAA;cAC1FA,QAAS,CAAAU,SAAA,GAAAC,IAAAA,6BAAA,EAAAf,qCAAAI,QAAA,EAAAH,kBAAAG,QAAA,EAAAM,MAAAN,QAAA,CAAAU,SAAA;oBACHJ,qBAAAA,CAAAA,QAAMN,CAAQM,MAAMN,QAAKY,CAAAA,GAAAA,EAAAA;yBAC3BJ;6BACK;;iBAEP;sBACAF,QAAMN,CAAAA,KAAY,KAAGQ,WAAAA;gBACvBA,IAAAE,SAAA,GAAAC,IAAAA,6BAAA,EAAAd,kBAAAgB,wBAAA,EAAAL,IAAAE,SAAA;YACF,OAAA;gBAEAF,IAAOF,SAAAA,GAAAA,IAAAA,6BAAAA,EAAAA,kBAAAA,kBAAAA,EAAAA,IAAAA,SAAAA;YACP"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AttachmentTag.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentTag_unstable } from './useAttachmentTag';\nimport { renderAttachmentTag_unstable } from './renderAttachmentTag';\nimport { useAttachmentTagStyles_unstable } from './useAttachmentTagStyles';\nimport type { AttachmentTagProps } from './AttachmentTag.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\n/**\n * @deprecated use new Attachment component exported from \\@fluentui-copilot/react-attachments package instead.\n * Deprecated on 4/9/2024
|
|
1
|
+
{"version":3,"sources":["AttachmentTag.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentTag_unstable } from './useAttachmentTag';\nimport { renderAttachmentTag_unstable } from './renderAttachmentTag';\nimport { useAttachmentTagStyles_unstable } from './useAttachmentTagStyles';\nimport type { AttachmentTagProps } from './AttachmentTag.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\n/**\n * @deprecated use new Attachment component exported from \\@fluentui-copilot/react-attachments package instead.\n * Deprecated on 4/9/2024.\n */\nexport const AttachmentTag: ForwardRefComponent<AttachmentTagProps> = React.forwardRef((props, ref) => {\n const state = useAttachmentTag_unstable(props, ref);\n\n useAttachmentTagStyles_unstable(state);\n useCustomStyleHook('useAttachmentTagStyles')(state);\n\n return renderAttachmentTag_unstable(state);\n});\n\nAttachmentTag.displayName = 'AttachmentTag';\n"],"names":["state","useAttachmentTag_unstable","props","ref","useAttachmentTagStyles_unstable","renderAttachmentTag_unstable","AttachmentTag"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAaQA;;;eAAAA;;;;iEAbe;kCACmB;qCACG;wCACG;+BAGb;AAOjC,MAAMA,gBAAQC,WAAAA,GAAAA,OAA0BC,UAAOC,CAAAA,CAAAA,OAAAA;UAE/CC,QAAAA,IAAAA,2CAAgCJ,EAAAA,OAAAA;+DACb,EAAAA;yCAEZK,EAAAA,0BAA6BL;IACtC,OAAGK,IAAAA,iDAAA,EAAAL;AAEHM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AttachmentTagItem.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentTagItem_unstable } from './useAttachmentTagItem';\nimport { renderAttachmentTagItem_unstable } from './renderAttachmentTagItem';\nimport { useAttachmentTagItemStyles_unstable } from './useAttachmentTagItemStyles';\nimport type { AttachmentTagItemProps } from './AttachmentTagItem.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\n/**\n * @deprecated use new AttachmentOverflowMenuItem component exported from \\@fluentui-copilot/react-attachments package instead.\n * Deprecated on 4/9/2024
|
|
1
|
+
{"version":3,"sources":["AttachmentTagItem.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentTagItem_unstable } from './useAttachmentTagItem';\nimport { renderAttachmentTagItem_unstable } from './renderAttachmentTagItem';\nimport { useAttachmentTagItemStyles_unstable } from './useAttachmentTagItemStyles';\nimport type { AttachmentTagItemProps } from './AttachmentTagItem.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\n/**\n * @deprecated use new AttachmentOverflowMenuItem component exported from \\@fluentui-copilot/react-attachments package instead.\n * Deprecated on 4/9/2024.\n */\nexport const AttachmentTagItem: ForwardRefComponent<AttachmentTagItemProps> = React.forwardRef((props, ref) => {\n const state = useAttachmentTagItem_unstable(props, ref);\n\n useAttachmentTagItemStyles_unstable(state);\n return renderAttachmentTagItem_unstable(state);\n});\n\nAttachmentTagItem.displayName = 'AttachmentTagItem';\n"],"names":["state","useAttachmentTagItem_unstable","props","ref","useAttachmentTagItemStyles_unstable","renderAttachmentTagItem_unstable","AttachmentTagItem"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAYQA;;;eAAAA;;;;iEAZe;sCACuB;yCACG;4CACG;AASlD,MAAMA,oBAAQC,WAAAA,GAAAA,OAA8BC,UAAOC,CAAAA,CAAAA,OAAAA;UAEnDC,QAAAA,IAAAA,mDAAoCJ,EAAAA,OAAAA;uEAC7BK,EAAAA;IACT,OAAGA,IAAAA,yDAAA,EAAAL;AAEHM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AttachmentTagList.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderAttachmentTagList_unstable } from './renderAttachmentTagList';\nimport { useAttachmentTagList_unstable } from './useAttachmentTagList';\nimport { useAttachmentTagListContextValues_unstable } from './useAttachmentTagListContextValues';\nimport { useAttachmentTagListStyles_unstable } from './useAttachmentTagListStyles';\nimport type { AttachmentTagListProps } from './AttachmentTagList.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\n/**\n * @deprecated use new AttachmentList component exported from \\@fluentui-copilot/react-attachments package instead.\n * Deprecated on 4/9/2024
|
|
1
|
+
{"version":3,"sources":["AttachmentTagList.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderAttachmentTagList_unstable } from './renderAttachmentTagList';\nimport { useAttachmentTagList_unstable } from './useAttachmentTagList';\nimport { useAttachmentTagListContextValues_unstable } from './useAttachmentTagListContextValues';\nimport { useAttachmentTagListStyles_unstable } from './useAttachmentTagListStyles';\nimport type { AttachmentTagListProps } from './AttachmentTagList.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\n/**\n * @deprecated use new AttachmentList component exported from \\@fluentui-copilot/react-attachments package instead.\n * Deprecated on 4/9/2024.\n */\nexport const AttachmentTagList: ForwardRefComponent<AttachmentTagListProps> = React.forwardRef((props, ref) => {\n const state = useAttachmentTagList_unstable(props, ref);\n const contextValues = useAttachmentTagListContextValues_unstable(state);\n\n useAttachmentTagListStyles_unstable(state);\n useCustomStyleHook('useAttachmentTagListStyles')(state);\n\n return renderAttachmentTagList_unstable(state, contextValues);\n});\n\nAttachmentTagList.displayName = 'AttachmentTagList';\n"],"names":["state","useAttachmentTagList_unstable","props","ref","contextValues","useAttachmentTagListContextValues_unstable","useAttachmentTagListStyles_unstable","renderAttachmentTagList_unstable","AttachmentTagList"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAcQA;;;eAAAA;;;;iEAde;yCAC0B;sCACH;mDACa;4CACP;+BAGjB;AAOjC,MAAMA,oBAAQC,WAAAA,GAAAA,OAA8BC,UAAOC,CAAAA,CAAAA,OAAAA;UACnDH,QAAMI,IAAAA,mDAAgBC,EAAAA,OAAAA;UAEtBC,gBAAAA,IAAAA,6EAAoCN,EAAAA;uEACjB,EAAAA;yCAEZO,EAAAA,8BAAwCH;IACjD,OAAGG,IAAAA,yDAAA,EAAAP,OAAAI;AAEHI"}
|
|
@@ -0,0 +1,103 @@
|
|
|
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 indeterminateProgressBarReducedMotion = {
|
|
13
|
+
'0%': {
|
|
14
|
+
opacity: '.2'
|
|
15
|
+
},
|
|
16
|
+
'50%': {
|
|
17
|
+
opacity: '1'
|
|
18
|
+
},
|
|
19
|
+
'100%': {
|
|
20
|
+
opacity: '.2'
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
const useProgressBarStyles = (0, _reactcomponents.__styles)({
|
|
24
|
+
progress: {
|
|
25
|
+
a9b677: "fly5x3f",
|
|
26
|
+
qhf8xq: "f1euv43f",
|
|
27
|
+
B5kzvoi: "f1yab3r1",
|
|
28
|
+
oyh7mz: [
|
|
29
|
+
"f1vgc2s3",
|
|
30
|
+
"f1e31b4d"
|
|
31
|
+
],
|
|
32
|
+
j35jbq: [
|
|
33
|
+
"f1e31b4d",
|
|
34
|
+
"f1vgc2s3"
|
|
35
|
+
],
|
|
36
|
+
Bqenvij: "f6ywr7j",
|
|
37
|
+
Beyfa6y: [
|
|
38
|
+
"f16jpd5f",
|
|
39
|
+
"f1aa9q02"
|
|
40
|
+
],
|
|
41
|
+
Bbmb7ep: [
|
|
42
|
+
"f1aa9q02",
|
|
43
|
+
"f16jpd5f"
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
regularProgressBar: {
|
|
47
|
+
Bqenvij: "f1l02sjl",
|
|
48
|
+
Bcmaq0h: "fx7worf"
|
|
49
|
+
},
|
|
50
|
+
indeterminateProgressBar: {
|
|
51
|
+
Bqenvij: "f1l02sjl",
|
|
52
|
+
De3pzq: "f1c21dwh",
|
|
53
|
+
Bcmaq0h: "f1hxqsn5",
|
|
54
|
+
B3ks32h: "f2xo07b",
|
|
55
|
+
B3vm3ge: "f1f2ih6z",
|
|
56
|
+
Gqtpxc: "f7h4d4t",
|
|
57
|
+
vr3tzx: "f32r5lb"
|
|
58
|
+
}
|
|
59
|
+
}, {
|
|
60
|
+
d: [
|
|
61
|
+
".fly5x3f{width:100%;}",
|
|
62
|
+
".f1euv43f{position:absolute;}",
|
|
63
|
+
".f1yab3r1{bottom:0;}",
|
|
64
|
+
".f1vgc2s3{left:0;}",
|
|
65
|
+
".f1e31b4d{right:0;}",
|
|
66
|
+
".f6ywr7j{height:4px;}",
|
|
67
|
+
".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}",
|
|
68
|
+
".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}",
|
|
69
|
+
".f1l02sjl{height:100%;}",
|
|
70
|
+
".fx7worf{background-image:linear-gradient(90deg, var(--fai-colorBrandFlair1) 35%, var(--fai-colorBrandFlair2) 70%, var(--fai-colorBrandFlair3) 92%);}",
|
|
71
|
+
".f1c21dwh{background-color:var(--colorTransparentBackground);}",
|
|
72
|
+
".f1hxqsn5{background-image:linear-gradient(90deg, rgba(0,0,0,0) 0%, var(--fai-colorBrandFlair1) 35%, var(--fai-colorBrandFlair2) 70%, var(--fai-colorBrandFlair3) 92%, rgba(0,0,0,0));}"
|
|
73
|
+
],
|
|
74
|
+
m: [
|
|
75
|
+
[
|
|
76
|
+
"@media screen and (prefers-reduced-motion: reduce){.f2xo07b{max-width:100%;}}",
|
|
77
|
+
{
|
|
78
|
+
m: "screen and (prefers-reduced-motion: reduce)"
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
[
|
|
82
|
+
"@media screen and (prefers-reduced-motion: reduce){.f1f2ih6z{animation-iteration-count:infinite;}}",
|
|
83
|
+
{
|
|
84
|
+
m: "screen and (prefers-reduced-motion: reduce)"
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
[
|
|
88
|
+
"@media screen and (prefers-reduced-motion: reduce){.f7h4d4t{animation-duration:3s;}}",
|
|
89
|
+
{
|
|
90
|
+
m: "screen and (prefers-reduced-motion: reduce)"
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
[
|
|
94
|
+
"@media screen and (prefers-reduced-motion: reduce){.f32r5lb{animation-name:ftc26vs;}}",
|
|
95
|
+
{
|
|
96
|
+
m: "screen and (prefers-reduced-motion: reduce)"
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
],
|
|
100
|
+
k: [
|
|
101
|
+
"@keyframes ftc26vs{0%{opacity:.2;}50%{opacity:1;}100%{opacity:.2;}}"
|
|
102
|
+
]
|
|
103
|
+
}); //# sourceMappingURL=useProgressBarStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useProgressBarStyles.ts"],"sourcesContent":["import { makeStyles, tokens } from '@fluentui/react-components';\nimport { tokens as copilotTokens } 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, ${copilotTokens.colorBrandFlair1} 35%, ${copilotTokens.colorBrandFlair2} 70%, ${copilotTokens.colorBrandFlair3} 92%)`,\n },\n indeterminateProgressBar: {\n height: '100%',\n backgroundColor: tokens.colorTransparentBackground,\n backgroundImage: `linear-gradient(90deg, rgba(0,0,0,0) 0%, ${copilotTokens.colorBrandFlair1} 35%, ${copilotTokens.colorBrandFlair2} 70%, ${copilotTokens.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":["progress","indeterminateProgressBarReducedMotion","opacity","__styles","width","position","bottom","left","right","height","borderBottomLeftRadius","borderBottomRightRadius","tokens","Bbmb7ep","backgroundImage","Bcmaq0h","backgroundColor","maxWidth","animationIterationCount","animationDuration","animationName","d"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAmBEA;;;eAAAA;;;iCAnByB;AAG3B,MAAMC,wCAAwC;UAC5C;iBACEC;;WAEF;iBACEA;;YAEF;iBACEA;;AAEJ;AAMEF,MAAAA,uBAAUG,IAAAA,yBAAA,EAAA;cACRC;gBACAC;gBACAC;iBACAC;gBACAC;YAAAA;YAAO;SAAA;gBACPC;YAAAA;YAAQ;SAAA;iBACRC;iBACAC;YAAAA;YAAAA;SAAyBC;QAC3BC,SAAA;YAAA;YAAA;SAAA;;wBAEU;iBACRC;QACFC,SAAA;;8BAEU;iBACRC;gBACAF;iBACA;iBACEG;iBACAC;gBACAC;gBACAC;;;IAGNC,GAAG;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-copilot/react-attachments",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.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,17 +12,18 @@
|
|
|
12
12
|
},
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@fluentui-copilot/react-provider": "^0.8.
|
|
15
|
+
"@fluentui-copilot/react-provider": "^0.8.2",
|
|
16
|
+
"@fluentui-copilot/tokens": "^0.3.2",
|
|
16
17
|
"@swc/helpers": "^0.5.1"
|
|
17
18
|
},
|
|
18
19
|
"peerDependencies": {
|
|
19
20
|
"@fluentui/keyboard-keys": ">=9.0.7 <10.0.0",
|
|
20
|
-
"@fluentui/react-components": ">=9.49.
|
|
21
|
-
"@fluentui/react-context-selector": ">=9.1.
|
|
22
|
-
"@fluentui/react-icons": ">=2.0.
|
|
23
|
-
"@fluentui/react-jsx-runtime": ">=9.0.
|
|
24
|
-
"@fluentui/react-overflow": ">=9.1.
|
|
25
|
-
"@fluentui/react-shared-contexts": ">=9.
|
|
21
|
+
"@fluentui/react-components": ">=9.49.2 <10.0.0",
|
|
22
|
+
"@fluentui/react-context-selector": ">=9.1.59 <10.0.0",
|
|
23
|
+
"@fluentui/react-icons": ">=2.0.239 <3.0.0",
|
|
24
|
+
"@fluentui/react-jsx-runtime": ">=9.0.37 <10.0.0",
|
|
25
|
+
"@fluentui/react-overflow": ">=9.1.18 <10.0.0",
|
|
26
|
+
"@fluentui/react-shared-contexts": ">=9.18.0 <10.0.0",
|
|
26
27
|
"@types/react": ">=16.14.0 <19.0.0",
|
|
27
28
|
"@types/react-dom": ">=16.9.8 <19.0.0",
|
|
28
29
|
"react": ">=16.14.0 <19.0.0",
|