@fluentui-copilot/react-attachments 0.9.4 → 0.9.6
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 +91 -1
- package/CHANGELOG.md +25 -2
- package/lib/components/Attachment/Attachment.js +1 -1
- package/lib/components/Attachment/Attachment.js.map +1 -1
- package/lib/components/Attachment/index.js +1 -1
- package/lib/components/Attachment/index.js.map +1 -1
- package/lib/components/Attachment/{useAttachmentStyles.js → useAttachmentStyles.styles.js} +11 -8
- package/lib/components/Attachment/useAttachmentStyles.styles.js.map +1 -0
- package/lib/components/AttachmentList/AttachmentList.js +1 -1
- package/lib/components/AttachmentList/AttachmentList.js.map +1 -1
- package/lib/components/AttachmentList/index.js +1 -1
- package/lib/components/AttachmentList/index.js.map +1 -1
- package/lib/components/AttachmentList/useAttachmentList.js +11 -25
- package/lib/components/AttachmentList/useAttachmentList.js.map +1 -1
- package/lib/components/AttachmentList/{useAttachmentListStyles.js → useAttachmentListStyles.styles.js} +6 -2
- package/lib/components/AttachmentList/useAttachmentListStyles.styles.js.map +1 -0
- package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js +1 -1
- package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js.map +1 -1
- package/lib/components/AttachmentOverflowMenuButton/index.js +1 -1
- package/lib/components/AttachmentOverflowMenuButton/index.js.map +1 -1
- package/lib/components/AttachmentOverflowMenuButton/{useAttachmentOverflowMenuButtonStyles.js → useAttachmentOverflowMenuButtonStyles.styles.js} +7 -5
- package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.js.map +1 -0
- package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js +1 -1
- package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js.map +1 -1
- package/lib/components/AttachmentOverflowMenuItem/index.js +1 -1
- package/lib/components/AttachmentOverflowMenuItem/index.js.map +1 -1
- package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +3 -7
- package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js.map +1 -1
- package/lib/components/AttachmentOverflowMenuItem/{useAttachmentOverflowMenuItemStyles.js → useAttachmentOverflowMenuItemStyles.styles.js} +4 -2
- package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.js.map +1 -0
- package/lib/components/AttachmentTag/AttachmentTag.js +1 -1
- package/lib/components/AttachmentTag/AttachmentTag.js.map +1 -1
- package/lib/components/AttachmentTag/index.js +1 -1
- package/lib/components/AttachmentTag/index.js.map +1 -1
- package/lib/components/AttachmentTag/{useAttachmentTagStyles.js → useAttachmentTagStyles.styles.js} +3 -1
- package/lib/components/AttachmentTag/useAttachmentTagStyles.styles.js.map +1 -0
- package/lib/components/AttachmentTagItem/AttachmentTagItem.js +1 -1
- package/lib/components/AttachmentTagItem/AttachmentTagItem.js.map +1 -1
- package/lib/components/AttachmentTagItem/index.js +1 -1
- package/lib/components/AttachmentTagItem/index.js.map +1 -1
- package/lib/components/AttachmentTagItem/{useAttachmentTagItemStyles.js → useAttachmentTagItemStyles.styles.js} +4 -2
- package/lib/components/AttachmentTagItem/useAttachmentTagItemStyles.styles.js.map +1 -0
- package/lib/components/AttachmentTagList/AttachmentTagList.js +1 -1
- package/lib/components/AttachmentTagList/AttachmentTagList.js.map +1 -1
- package/lib/components/AttachmentTagList/index.js +1 -1
- package/lib/components/AttachmentTagList/index.js.map +1 -1
- package/lib/components/AttachmentTagList/{useAttachmentTagListStyles.js → useAttachmentTagListStyles.styles.js} +3 -1
- package/lib/components/AttachmentTagList/useAttachmentTagListStyles.styles.js.map +1 -0
- package/lib/components/utils/{useProgressBarStyles.js → useProgressBarStyles.styles.js} +9 -9
- package/lib/components/utils/useProgressBarStyles.styles.js.map +1 -0
- package/lib-commonjs/components/Attachment/Attachment.js +2 -2
- package/lib-commonjs/components/Attachment/Attachment.js.map +1 -1
- package/lib-commonjs/components/Attachment/index.js +1 -1
- package/lib-commonjs/components/Attachment/index.js.map +1 -1
- package/lib-commonjs/components/Attachment/{useAttachmentStyles.js → useAttachmentStyles.styles.js} +12 -9
- package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.js.map +1 -0
- package/lib-commonjs/components/AttachmentList/AttachmentList.js +2 -2
- package/lib-commonjs/components/AttachmentList/AttachmentList.js.map +1 -1
- package/lib-commonjs/components/AttachmentList/index.js +1 -1
- package/lib-commonjs/components/AttachmentList/index.js.map +1 -1
- package/lib-commonjs/components/AttachmentList/useAttachmentList.js +9 -27
- package/lib-commonjs/components/AttachmentList/useAttachmentList.js.map +1 -1
- package/lib-commonjs/components/AttachmentList/{useAttachmentListStyles.js → useAttachmentListStyles.styles.js} +7 -2
- package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.styles.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js +2 -2
- package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/index.js +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/index.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/{useAttachmentOverflowMenuButtonStyles.js → useAttachmentOverflowMenuButtonStyles.styles.js} +9 -8
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js +2 -2
- package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/index.js +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/index.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +2 -6
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/{useAttachmentOverflowMenuItemStyles.js → useAttachmentOverflowMenuItemStyles.styles.js} +4 -3
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.js.map +1 -0
- package/lib-commonjs/components/AttachmentTag/AttachmentTag.js +2 -2
- package/lib-commonjs/components/AttachmentTag/AttachmentTag.js.map +1 -1
- package/lib-commonjs/components/AttachmentTag/index.js +1 -1
- package/lib-commonjs/components/AttachmentTag/index.js.map +1 -1
- package/lib-commonjs/components/AttachmentTag/{useAttachmentTagStyles.js → useAttachmentTagStyles.styles.js} +2 -1
- package/lib-commonjs/components/AttachmentTag/useAttachmentTagStyles.styles.js.map +1 -0
- package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.js +2 -2
- package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagItem/index.js +1 -1
- package/lib-commonjs/components/AttachmentTagItem/index.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagItem/{useAttachmentTagItemStyles.js → useAttachmentTagItemStyles.styles.js} +6 -5
- package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItemStyles.styles.js.map +1 -0
- package/lib-commonjs/components/AttachmentTagList/AttachmentTagList.js +2 -2
- package/lib-commonjs/components/AttachmentTagList/AttachmentTagList.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagList/index.js +1 -1
- package/lib-commonjs/components/AttachmentTagList/index.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagList/{useAttachmentTagListStyles.js → useAttachmentTagListStyles.styles.js} +2 -1
- package/lib-commonjs/components/AttachmentTagList/useAttachmentTagListStyles.styles.js.map +1 -0
- package/lib-commonjs/components/utils/{useProgressBarStyles.js → useProgressBarStyles.styles.js} +9 -9
- package/lib-commonjs/components/utils/useProgressBarStyles.styles.js.map +1 -0
- package/package.json +9 -9
- package/lib/components/Attachment/useAttachmentStyles.js.map +0 -1
- package/lib/components/AttachmentList/useAttachmentListStyles.js.map +0 -1
- package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.js.map +0 -1
- package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.js.map +0 -1
- package/lib/components/AttachmentTag/useAttachmentTagStyles.js.map +0 -1
- package/lib/components/AttachmentTagItem/useAttachmentTagItemStyles.js.map +0 -1
- package/lib/components/AttachmentTagList/useAttachmentTagListStyles.js.map +0 -1
- package/lib/components/utils/useProgressBarStyles.js.map +0 -1
- package/lib-commonjs/components/Attachment/useAttachmentStyles.js.map +0 -1
- package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.js.map +0 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.js.map +0 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.js.map +0 -1
- package/lib-commonjs/components/AttachmentTag/useAttachmentTagStyles.js.map +0 -1
- package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItemStyles.js.map +0 -1
- package/lib-commonjs/components/AttachmentTagList/useAttachmentTagListStyles.js.map +0 -1
- package/lib-commonjs/components/utils/useProgressBarStyles.js.map +0 -1
|
@@ -13,10 +13,11 @@ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
|
13
13
|
const _reactcomponents = require("@fluentui/react-components");
|
|
14
14
|
const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
|
|
15
15
|
const _reactutilities = require("@fluentui/react-utilities");
|
|
16
|
+
const _reactutilities1 = require("@fluentui-copilot/react-utilities");
|
|
16
17
|
const _Attachment = require("../Attachment");
|
|
17
18
|
const _AttachmentOverflowMenuButton = require("../AttachmentOverflowMenuButton");
|
|
18
19
|
const _AttachmentOverflowMenuItem = require("../AttachmentOverflowMenuItem");
|
|
19
|
-
const
|
|
20
|
+
const _useAttachmentOverflowMenuButtonStylesstyles = require("../AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles");
|
|
20
21
|
const useAttachmentList_unstable = (props, ref)=>{
|
|
21
22
|
const { children, maxVisibleAttachments, onAttachmentDismiss, overflowMenuProps } = props;
|
|
22
23
|
const innerRef = _react.useRef(null);
|
|
@@ -40,7 +41,7 @@ const useAttachmentList_unstable = (props, ref)=>{
|
|
|
40
41
|
if (next) {
|
|
41
42
|
// focus on the overflow button if the next focusable element is the overflow button.
|
|
42
43
|
// if overflow button is removed from the DOM, focus on the last focusable element in the attachment list.
|
|
43
|
-
if (next.classList.contains(
|
|
44
|
+
if (next.classList.contains(_useAttachmentOverflowMenuButtonStylesstyles.attachmentOverflowMenuButtonClassNames.root)) {
|
|
44
45
|
setTimeout(()=>{
|
|
45
46
|
var _findLastFocusable;
|
|
46
47
|
(_findLastFocusable = findLastFocusable(innerRef.current)) === null || _findLastFocusable === void 0 ? void 0 : _findLastFocusable.focus();
|
|
@@ -62,34 +63,15 @@ const useAttachmentList_unstable = (props, ref)=>{
|
|
|
62
63
|
}, 0);
|
|
63
64
|
}
|
|
64
65
|
});
|
|
65
|
-
const
|
|
66
|
-
const resolvedChildren =
|
|
67
|
-
if (maxVisibleAttachments !== undefined) {
|
|
68
|
-
const results = [];
|
|
69
|
-
const childrenArray = _react.Children.toArray(children);
|
|
70
|
-
for(let index = 0; index < childrenArray.length; index++){
|
|
71
|
-
const child = childrenArray[index];
|
|
72
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
73
|
-
if (index >= maxVisibleAttachments && /*#__PURE__*/ _react.isValidElement(child)) {
|
|
74
|
-
results.push(/*#__PURE__*/ _react.cloneElement(child, {
|
|
75
|
-
...child.props,
|
|
76
|
-
className: (0, _reactcomponents.mergeClasses)(child.props.className, attachmentOverflowClassName)
|
|
77
|
-
}));
|
|
78
|
-
} else {
|
|
79
|
-
results.push(child);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
return results;
|
|
83
|
-
}
|
|
84
|
-
return children;
|
|
85
|
-
}, [
|
|
86
|
-
attachmentOverflowClassName,
|
|
66
|
+
const styles = (0, _Attachment.useOverflowStyles)();
|
|
67
|
+
const resolvedChildren = (0, _reactutilities1.useOverflowMaxVisibleItems)({
|
|
87
68
|
children,
|
|
88
|
-
maxVisibleAttachments
|
|
89
|
-
|
|
69
|
+
maxVisibleItems: maxVisibleAttachments,
|
|
70
|
+
overflowClassName: styles.overflow
|
|
71
|
+
});
|
|
90
72
|
_react.useEffect(()=>{
|
|
91
73
|
if (resolvedChildren && Array.isArray(resolvedChildren)) {
|
|
92
|
-
setAttachments(resolvedChildren.map((child)=>child.props));
|
|
74
|
+
setAttachments(resolvedChildren.filter((child)=>/*#__PURE__*/ _react.isValidElement(child)).map((child)=>child.props));
|
|
93
75
|
}
|
|
94
76
|
}, [
|
|
95
77
|
resolvedChildren
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useAttachmentList.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n getIntrinsicElementProps,\n
|
|
1
|
+
{"version":3,"sources":["useAttachmentList.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n getIntrinsicElementProps,\n slot,\n useArrowNavigationGroup,\n useEventCallback,\n useFocusFinders,\n useMergedRefs,\n} from '@fluentui/react-components';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { useTimeout } from '@fluentui/react-utilities';\nimport { useOverflowMaxVisibleItems } from '@fluentui-copilot/react-utilities';\nimport { useOverflowStyles, type AttachmentProps } from '../Attachment';\nimport { AttachmentOverflowMenuButton } from '../AttachmentOverflowMenuButton';\nimport { AttachmentOverflowMenuItem } from '../AttachmentOverflowMenuItem';\nimport { attachmentOverflowMenuButtonClassNames } from '../AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles';\nimport type { AttachmentListProps, AttachmentListState } from './AttachmentList.types';\n\n/**\n * Create the state required to render AttachmentList.\n *\n * The returned state can be modified with hooks such as useAttachmentListStyles_unstable,\n * before being passed to renderAttachmentList_unstable.\n *\n * @param props - props from this instance of AttachmentList\n * @param ref - reference to root HTMLElement of AttachmentList\n */\nexport const useAttachmentList_unstable = (\n props: AttachmentListProps,\n ref: React.Ref<HTMLDivElement>,\n): AttachmentListState => {\n const { children, maxVisibleAttachments, onAttachmentDismiss, overflowMenuProps } = props;\n const innerRef = React.useRef<HTMLDivElement>(null);\n const [setTimeout] = useTimeout();\n const { targetDocument } = useFluent();\n const { findNextFocusable, findPrevFocusable, findLastFocusable } = useFocusFinders();\n const [attachments, setAttachments] = React.useState<AttachmentProps[]>([]);\n const handleAttachmentDismiss: AttachmentListState['onAttachmentDismiss'] = useEventCallback((e, data) => {\n if (!onAttachmentDismiss) {\n return;\n }\n\n onAttachmentDismiss(e, data);\n\n // set focus after attachment dismiss\n const activeElement = targetDocument?.activeElement;\n if (innerRef.current?.contains(activeElement as HTMLElement)) {\n // focus on next attachment only if the active element is within the current attachment list\n const next = findNextFocusable(activeElement as HTMLElement, { container: innerRef.current });\n if (next) {\n // focus on the overflow button if the next focusable element is the overflow button.\n // if overflow button is removed from the DOM, focus on the last focusable element in the attachment list.\n if (next.classList.contains(attachmentOverflowMenuButtonClassNames.root)) {\n setTimeout(() => {\n findLastFocusable(innerRef.current as HTMLElement)?.focus();\n }, 0);\n } else {\n next.focus();\n }\n } else {\n const prev = findPrevFocusable(activeElement?.parentElement as HTMLElement, { container: innerRef.current });\n prev?.focus();\n }\n } else {\n // Handles keyboard focus when attachment removed is in the overflow menu. Also handles focus when the overflow button is removed from the DOM.\n setTimeout(() => {\n findLastFocusable(innerRef.current as HTMLElement)?.focus();\n }, 0);\n }\n });\n\n const styles = useOverflowStyles();\n const resolvedChildren = useOverflowMaxVisibleItems({\n children,\n maxVisibleItems: maxVisibleAttachments,\n overflowClassName: styles.overflow,\n });\n\n React.useEffect(() => {\n if (resolvedChildren && Array.isArray(resolvedChildren)) {\n setAttachments(\n resolvedChildren.filter(child => React.isValidElement(child)).map(child => (child as React.ReactElement).props),\n );\n }\n }, [resolvedChildren]);\n\n const arrowNavigationProps = useArrowNavigationGroup({\n circular: true,\n axis: 'both',\n memorizeCurrent: true,\n });\n\n const shouldUseOverflow = maxVisibleAttachments !== undefined;\n\n return {\n attachments,\n onAttachmentDismiss: handleAttachmentDismiss,\n shouldUseOverflow,\n overflowMenuProps,\n components: {\n root: 'div',\n overflowMenuButton: 'span',\n overflowMenuItem: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n 'aria-label': 'Attachments',\n ref: useMergedRefs(ref, innerRef),\n role: 'toolbar',\n ...arrowNavigationProps,\n ...props,\n children: resolvedChildren,\n }),\n { elementType: 'div' },\n ),\n overflowMenuButton: slot.optional(props.overflowMenuButton, {\n defaultProps: { children: <AttachmentOverflowMenuButton /> },\n elementType: 'span',\n renderByDefault: true,\n }),\n overflowMenuItem: slot.optional(props.overflowMenuItem, {\n defaultProps: { children: <AttachmentOverflowMenuItem /> },\n elementType: 'span',\n renderByDefault: true,\n }),\n };\n};\n"],"names":["children","maxVisibleAttachments","props","onAttachmentDismiss","setTimeout","targetDocument","findNextFocusable","overflowMenuProps","attachments","innerRef","activeElement","next","container","current","useState","useEventCallback","e","data","findLastFocusable","_innerRef_current","contains","prev","root","_findLastFocusable","focus","findPrevFocusable","parentElement","styles","useOverflowStyles","overflowClassName","React","useEffect","resolvedChildren","filter","child","arrowNavigationProps","useArrowNavigationGroup","memorizeCurrent","overflow","shouldUseOverflow","Array","isArray","components","overflowMenuButton","undefined","useMergedRefs","elementType","defaultProps","renderByDefault","overflowMenuItem","slot","optional","createElement","AttachmentOverflowMenuButton"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BA+BUA;;;eAAAA;;;;iEA/Ba;iCAQhB;qCACyC;gCACrB;iCACgB;4BACa;8CACX;4CACF;6DACY;AAgBrD,MAAQA,6BAAUC,CAAqBC,OAAEC;UACzC,EACAH,QAAOI,EACPH,qBAAQI,EACRF,mBAAQG,EACRC,iBAAOC,KACPN;qBASMO,OAAAA,MAAAA,CAAAA;UARJ,CAAAL,WAAKD,GAAAA,IAAAA,0BAAAA;0BAEL,gDAEAA;UAEA,mBACMO,mBACFD,mBACF,yCACME;wBAAyDC,eAAoBC,GAAAA,OAAOC,QAAA,CAAA,EAAA;oCAACC,IAAAA,iCAAA,EAAA,CAAAC,GAAAC;;kCAEzF;;;4BAGEb,GAAAA;6CACEc;8BAAAA,mBAAAA,QAAAA,mBAAkBT,KAASI,IAAO,KAAA,IAAAR,eAAlCa,aAAAA;iCACCT,SAAAI,OAAA,MAAA,QAAAM,sBAAA,KAAA,IAAA,KAAA,IAAAA,kBAAAC,QAAA,CAAAV,gBAAA;wGACE;2CACKA,eAAA;2BACZD,SAAAI,OAAA;;sBAEA;qGAAyG;0HAAC;yBAC1GQ,SAAAA,CAAAA,QAAAA,CAAAA,mFAAW,CAAAC,IAAA,GAAA;+BACb;wBACF,IAAOC;wBACLA,CAAAA,qBAAAL,kBAAAT,SAAAI,OAAA,CAAA,MAAA,QAAAU,uBAAA,KAAA,IAAA,KAAA,IAAAA,mBAAAC,KAAA;uBACApB;;8BACEc;;mBAEJ;gBACF,MAAAG,OAAAI,kBAAAf,kBAAA,QAAAA,kBAAA,KAAA,IAAA,KAAA,IAAAA,cAAAgB,aAAA,EAAA;oBAEMC,WAASC,SAAAA,OAAAA;gBACf;gBACE5B,SAAAA,QAAAA,SAAAA,KAAAA,IAAAA,KAAAA,IAAAA,KAAAA,KAAAA;;eAEA6B;YACF,+IAAA;YAEAC,WAAMC;gBACJ,IAAIC;sCAEAA,kBAAiBC,SAAOC,OAAAA,CAAAA,MAAAA,QAASJ,uBAAqBI,KAAYA,IAAAA,KAAS,IAACA,mBAAkCV,KAAA;eAElH;QACF;;UAAqBG,SAAAC,IAAAA,6BAAA;UAErBI,mBAAMG,IAAAA,2CAAuBC,EAAAA;;yBAErBnC;2BACNoC,OAAiBC,QAAA;;WAGnBP,SAAMQ,CAAAA;QAEN,IAAAP,oBAAOQ,MAAAC,OAAA,CAAAT,mBAAA;2BACLxB,iBAAAA,MAAAA,CAAAA,CAAAA,QAAAA,WAAAA,GAAAA,OAAAA,cAAAA,CAAAA,QAAAA,GAAAA,CAAAA,CAAAA,QAAAA,MAAAA,KAAAA;;;;KAEA+B;UACAhC,uBAAAA,IAAAA,wCAAAA,EAAAA;kBACAmC;;yBAEEC;;UAEFJ,oBAAAtC,0BAAA2C;WACAtB;;6BAGSuB;;;oBAGF3C;kBACHF;gCAEF;8BAAE8C;;cAEJH,qBAAAA,CAAAA,MAAAA,CAAAA,IAAAA,yCAAkCzC,EAAAA,OAAMyC;0BACtCI;mDAAgB/C,EAAAA,KAAAA;kBAA2C;mCAC9C;oBACbgD;sBACFhB;YACAiB;yBACEF;;4BAAyDG,qBAAA,CAAAC,QAAA,CAAAjD,MAAAyC,kBAAA,EAAA;0BACzDG;0BACAE,WAAiB,GAAAlB,OAAAsB,aAAA,CAAAC,0DAAA,EAAA;;YAErBP,aAAA;YACAE,iBAAA"}
|
|
@@ -25,14 +25,19 @@ const attachmentListClassNames = {
|
|
|
25
25
|
const useRootBaseClassName = (0, _reactcomponents.__resetStyles)("r168fwfa", null, [
|
|
26
26
|
".r168fwfa{column-gap:var(--spacingHorizontalSNudge);display:flex;flex-direction:row;flex-shrink:0;flex-wrap:wrap;row-gap:var(--spacingVerticalXS);}"
|
|
27
27
|
]);
|
|
28
|
+
const useOverflowMenuButtonBaseClassName = (0, _reactcomponents.__resetStyles)("rvxcmzt", null, [
|
|
29
|
+
".rvxcmzt{display:inline-flex;}"
|
|
30
|
+
]);
|
|
28
31
|
const useAttachmentListStyles_unstable = (state)=>{
|
|
32
|
+
'use no memo';
|
|
29
33
|
const rootBaseClassName = useRootBaseClassName();
|
|
34
|
+
const overflowMenuButtonClassName = useOverflowMenuButtonBaseClassName();
|
|
30
35
|
state.root.className = (0, _reactcomponents.mergeClasses)(attachmentListClassNames.root, rootBaseClassName, state.root.className);
|
|
31
36
|
if (state.overflowMenuButton) {
|
|
32
|
-
state.overflowMenuButton.className = (0, _reactcomponents.mergeClasses)(attachmentListClassNames.overflowMenuButton, state.overflowMenuButton.className);
|
|
37
|
+
state.overflowMenuButton.className = (0, _reactcomponents.mergeClasses)(attachmentListClassNames.overflowMenuButton, overflowMenuButtonClassName, state.overflowMenuButton.className);
|
|
33
38
|
}
|
|
34
39
|
if (state.overflowMenuItem) {
|
|
35
40
|
state.overflowMenuItem.className = (0, _reactcomponents.mergeClasses)(attachmentListClassNames.overflowMenuItem, state.overflowMenuItem.className);
|
|
36
41
|
}
|
|
37
42
|
return state;
|
|
38
|
-
}; //# sourceMappingURL=useAttachmentListStyles.js.map
|
|
43
|
+
}; //# sourceMappingURL=useAttachmentListStyles.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useAttachmentListStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses, tokens } from '@fluentui/react-components';\nimport type { AttachmentListSlots, AttachmentListState } from './AttachmentList.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const attachmentListClassNames: SlotClassNames<AttachmentListSlots> = {\n root: 'fai-AttachmentList',\n overflowMenuButton: 'fai-AttachmentList__overflowMenuButton',\n overflowMenuItem: 'fai-AttachmentList__overflowMenuItem',\n};\n\nconst useRootBaseClassName = makeResetStyles({\n columnGap: tokens.spacingHorizontalSNudge,\n display: 'flex',\n flexDirection: 'row',\n flexShrink: 0,\n flexWrap: 'wrap',\n rowGap: tokens.spacingVerticalXS,\n});\n\nconst useOverflowMenuButtonBaseClassName = makeResetStyles({\n display: 'inline-flex',\n});\n\n/**\n * Apply styling to the AttachmentList slots based on the state\n */\nexport const useAttachmentListStyles_unstable = (state: AttachmentListState): AttachmentListState => {\n 'use no memo';\n\n const rootBaseClassName = useRootBaseClassName();\n const overflowMenuButtonClassName = useOverflowMenuButtonBaseClassName();\n\n state.root.className = mergeClasses(attachmentListClassNames.root, rootBaseClassName, state.root.className);\n\n if (state.overflowMenuButton) {\n state.overflowMenuButton.className = mergeClasses(\n attachmentListClassNames.overflowMenuButton,\n overflowMenuButtonClassName,\n state.overflowMenuButton.className,\n );\n }\n\n if (state.overflowMenuItem) {\n state.overflowMenuItem.className = mergeClasses(\n attachmentListClassNames.overflowMenuItem,\n state.overflowMenuItem.className,\n );\n }\n return state;\n};\n"],"names":["attachmentListClassNames","flexWrap","root","overflowMenuButton","overflowMenuItem","useRootBaseClassName","makeResetStyles","columnGap","spacingHorizontalSNudge","state","useOverflowMenuButtonBaseClassName","display","className","mergeClasses","rootBaseClassName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIaA,wBAAAA;eAAAA;;IAWXC,gCAAU;eAAVA;;;iCAf4C;AAIvC,MAAMD,2BAAgE;UAC3EE;wBACAC;sBACAC;AACF;AAEA,MAAMC,uBAAuBC,IAAAA,8BAAAA,EAAAA,YAAgB,MAAA;IAAA;CAAA;MAC3CC,qCAAkBC,IAAAA,8BAAuB,EAAA,WAAA,MAAA;IAAA;CAAA;AAIzCP,MAAAA,mCAAUQ,CAAAA;;IAIZ,MAAMC,oBAAAA;UACJC,8BAASD;IACXD,MAAAP,IAAA,CAAAU,SAAA,GAAAC,IAAAA,6BAAA,EAAAb,yBAAAE,IAAA,EAAAY,mBAAAL,MAAAP,IAAA,CAAAU,SAAA;IAEA,IAAAH,MAAAN,kBAAA,EAAA;;IAEC;QAECM,MAAAL,gBAAA,EAAA;QAEAK,MAAMK,gBAAAA,CAAAA,SAAoBT,GAAAA,IAAAA,6BAAAA,EAAAA,yBAAAA,gBAAAA,EAAAA,MAAAA,gBAAAA,CAAAA,SAAAA;;WAG1BI;6DAIIT"}
|
package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js
CHANGED
|
@@ -12,10 +12,10 @@ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildc
|
|
|
12
12
|
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
13
|
const _useAttachmentOverflowMenuButton = require("./useAttachmentOverflowMenuButton");
|
|
14
14
|
const _renderAttachmentOverflowMenuButton = require("./renderAttachmentOverflowMenuButton");
|
|
15
|
-
const
|
|
15
|
+
const _useAttachmentOverflowMenuButtonStylesstyles = require("./useAttachmentOverflowMenuButtonStyles.styles");
|
|
16
16
|
const AttachmentOverflowMenuButton = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
17
17
|
const state = (0, _useAttachmentOverflowMenuButton.useAttachmentOverflowMenuButton_unstable)(props, ref);
|
|
18
|
-
(0,
|
|
18
|
+
(0, _useAttachmentOverflowMenuButtonStylesstyles.useAttachmentOverflowMenuButtonStyles_unstable)(state);
|
|
19
19
|
return (0, _renderAttachmentOverflowMenuButton.renderAttachmentOverflowMenuButton_unstable)(state);
|
|
20
20
|
});
|
|
21
21
|
AttachmentOverflowMenuButton.displayName = 'AttachmentOverflowMenuButton'; //# sourceMappingURL=AttachmentOverflowMenuButton.js.map
|
package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AttachmentOverflowMenuButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentOverflowMenuButton_unstable } from './useAttachmentOverflowMenuButton';\nimport { renderAttachmentOverflowMenuButton_unstable } from './renderAttachmentOverflowMenuButton';\nimport { useAttachmentOverflowMenuButtonStyles_unstable } from './useAttachmentOverflowMenuButtonStyles';\nimport type { AttachmentOverflowMenuButtonProps } from './AttachmentOverflowMenuButton.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\nexport const AttachmentOverflowMenuButton: ForwardRefComponent<AttachmentOverflowMenuButtonProps> = React.forwardRef(\n (props, ref) => {\n const state = useAttachmentOverflowMenuButton_unstable(props, ref);\n\n useAttachmentOverflowMenuButtonStyles_unstable(state);\n return renderAttachmentOverflowMenuButton_unstable(state);\n },\n);\n\nAttachmentOverflowMenuButton.displayName = 'AttachmentOverflowMenuButton';\n"],"names":["AttachmentOverflowMenuButton","React","forwardRef","props","state","useAttachmentOverflowMenuButton_unstable","useAttachmentOverflowMenuButtonStyles_unstable","renderAttachmentOverflowMenuButton_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAOaA;;;eAAAA;;;;iEAPU;iDACkC;oDACG;
|
|
1
|
+
{"version":3,"sources":["AttachmentOverflowMenuButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentOverflowMenuButton_unstable } from './useAttachmentOverflowMenuButton';\nimport { renderAttachmentOverflowMenuButton_unstable } from './renderAttachmentOverflowMenuButton';\nimport { useAttachmentOverflowMenuButtonStyles_unstable } from './useAttachmentOverflowMenuButtonStyles.styles';\nimport type { AttachmentOverflowMenuButtonProps } from './AttachmentOverflowMenuButton.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\nexport const AttachmentOverflowMenuButton: ForwardRefComponent<AttachmentOverflowMenuButtonProps> = React.forwardRef(\n (props, ref) => {\n const state = useAttachmentOverflowMenuButton_unstable(props, ref);\n\n useAttachmentOverflowMenuButtonStyles_unstable(state);\n return renderAttachmentOverflowMenuButton_unstable(state);\n },\n);\n\nAttachmentOverflowMenuButton.displayName = 'AttachmentOverflowMenuButton';\n"],"names":["AttachmentOverflowMenuButton","React","forwardRef","props","state","useAttachmentOverflowMenuButton_unstable","useAttachmentOverflowMenuButtonStyles_unstable","renderAttachmentOverflowMenuButton_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAOaA;;;eAAAA;;;;iEAPU;iDACkC;oDACG;6DACG;AAIxD,MAAMA,+BAAAA,WAAAA,GAAAA,OAAuFC,UAAMC,CAAU,CAClHC,OAACA;UACCC,QAAMA,IAAAA,yEAAQC,EAAAA,OAAyCF;mGAEvDG,EAAAA;WACAC,IAAAA,+EAAOA,EAAAA;AACT;AAGFP,6BAA6BQ,WAAW,GAAG"}
|
|
@@ -7,5 +7,5 @@ _export_star._(require("./AttachmentOverflowMenuButton"), exports);
|
|
|
7
7
|
_export_star._(require("./AttachmentOverflowMenuButton.types"), exports);
|
|
8
8
|
_export_star._(require("./renderAttachmentOverflowMenuButton"), exports);
|
|
9
9
|
_export_star._(require("./useAttachmentOverflowMenuButton"), exports);
|
|
10
|
-
_export_star._(require("./useAttachmentOverflowMenuButtonStyles"), exports);
|
|
10
|
+
_export_star._(require("./useAttachmentOverflowMenuButtonStyles.styles"), exports);
|
|
11
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './AttachmentOverflowMenuButton';\nexport * from './AttachmentOverflowMenuButton.types';\nexport * from './renderAttachmentOverflowMenuButton';\nexport * from './useAttachmentOverflowMenuButton';\nexport * from './useAttachmentOverflowMenuButtonStyles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './AttachmentOverflowMenuButton';\nexport * from './AttachmentOverflowMenuButton.types';\nexport * from './renderAttachmentOverflowMenuButton';\nexport * from './useAttachmentOverflowMenuButton';\nexport * from './useAttachmentOverflowMenuButtonStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|
|
@@ -17,24 +17,25 @@ _export(exports, {
|
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
19
|
const _reactcomponents = require("@fluentui/react-components");
|
|
20
|
-
const
|
|
20
|
+
const _useProgressBarStylesstyles = require("../utils/useProgressBarStyles.styles");
|
|
21
21
|
const attachmentOverflowMenuButtonClassNames = {
|
|
22
22
|
root: 'fai-AttachmentOverflowMenuButton',
|
|
23
23
|
progress: 'fai-AttachmentOverflowMenuButton__progress'
|
|
24
24
|
};
|
|
25
|
-
const useRootBaseClassName = (0, _reactcomponents.__resetStyles)("
|
|
25
|
+
const useRootBaseClassName = (0, _reactcomponents.__resetStyles)("rn3o5tq", null, {
|
|
26
26
|
r: [
|
|
27
|
-
".
|
|
28
|
-
".
|
|
29
|
-
".
|
|
27
|
+
".rn3o5tq{color:var(--colorNeutralForeground1);align-items:center;background-color:var(--colorNeutralBackground1);border:var(--strokeWidthThin) solid var(--colorNeutralStroke1);border-radius:var(--borderRadiusMedium);box-sizing:border-box;column-gap:var(--spacingHorizontalSNudge);cursor:pointer;display:inline-flex;flex-wrap:nowrap;font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase300);font-weight:var(--fontWeightRegular);justify-content:center;padding:var(--spacingVerticalXS) var(--spacingHorizontalS);vertical-align:middle;position:relative;}",
|
|
28
|
+
".rn3o5tq:hover{cursor:pointer;background-color:var(--colorNeutralBackground3Hover);color:var(--colorNeutralForeground2Hover);}",
|
|
29
|
+
".rn3o5tq:active{background-color:var(--colorNeutralBackground3Pressed);color:var(--colorNeutralForeground2Pressed);}"
|
|
30
30
|
],
|
|
31
31
|
s: [
|
|
32
|
-
"@media (forced-colors: active){.
|
|
32
|
+
"@media (forced-colors: active){.rn3o5tq:hover{background-color:HighlightText;}.rn3o5tq:active{background-color:HighlightText;}}"
|
|
33
33
|
]
|
|
34
34
|
});
|
|
35
35
|
const useAttachmentOverflowMenuButtonStyles_unstable = (state)=>{
|
|
36
|
+
'use no memo';
|
|
36
37
|
const rootBaseClassName = useRootBaseClassName();
|
|
37
|
-
const progressBarStyles = (0,
|
|
38
|
+
const progressBarStyles = (0, _useProgressBarStylesstyles.useProgressBarStyles)();
|
|
38
39
|
state.root.className = (0, _reactcomponents.mergeClasses)(attachmentOverflowMenuButtonClassNames.root, rootBaseClassName, state.root.className);
|
|
39
40
|
if (state.progress) {
|
|
40
41
|
state.progress.className = (0, _reactcomponents.mergeClasses)(attachmentOverflowMenuButtonClassNames.progress, progressBarStyles.progress, state.progress.className);
|
|
@@ -52,4 +53,4 @@ const useAttachmentOverflowMenuButtonStyles_unstable = (state)=>{
|
|
|
52
53
|
}
|
|
53
54
|
}
|
|
54
55
|
return state;
|
|
55
|
-
}; //# sourceMappingURL=useAttachmentOverflowMenuButtonStyles.js.map
|
|
56
|
+
}; //# sourceMappingURL=useAttachmentOverflowMenuButtonStyles.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useAttachmentOverflowMenuButtonStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses, slot, tokens, typographyStyles } from '@fluentui/react-components';\nimport { useProgressBarStyles } from '../utils/useProgressBarStyles.styles';\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.spacingVerticalXS} ${tokens.spacingHorizontalS}`,\n verticalAlign: 'middle',\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 'use no memo';\n\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","flexWrap","fontFamily","typographyStyles","fontSize","rootBaseClassName","className","fontWeight","justifyContent","mergeClasses","progressBarStyles","padding","tokens","spacingVerticalXS","verticalAlign","position","cursor","backgroundColor","colorNeutralBackground3Hover","colorNeutralForeground2Hover","indeterminateProgressBar","bar","regularProgressBar","colorNeutralForeground2Pressed"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAQaA,sCAAAA;eAAAA;;IAYXC,8CAAyC;eAAzCA;;;iCApBoE;4CACjC;AAO9B,MAAMD,yCAA4F;UACvGE;cACAC;AACF;AAEA,MAAMC,uBAAuBC,IAAAA,8BAAAA,EAAAA,WAAgB,MAAA;OAC3CC;QAAAA;QAAqC;QAAA;KAAA;OACrCC;QAAAA;KAAY;;AAKZN,MAAAA,iDAAyCO,CAAAA;;UAGzCC,oBAAUL;UACVM,oBAAYC,IAAAA,gDAAuBD;UACnCE,IAAAA,CAAAA,SAAUD,GAAAA,IAAAA,6BAAuBC,EAAAA,uCAAQV,IAAA,EAAAW,mBAAAL,MAAAN,IAAA,CAAAY,SAAA;QACzCC,MAAAA,QAAYJ,EAAAA;QACZK,MAAAA,QAAAA,CAAAA,SAAgB,GAAAC,IAAAA,6BAAA,EAAAjB,uCAAAG,QAAA,EAAAe,kBAAAf,QAAA,EAAAK,MAAAL,QAAA,CAAAW,SAAA;QAChBK,MAAAA,MAAYC,qBAAAA,CAAAA,QAAOC,CAAAA,MAAAA,QAAqBD,CAAAA,GAAAA,EAAAA;YACxCE,aAAe;YACfC,iBAAU;QAEV;YACEC,KAAAA;gBACAC,MAAAA,QAAAA,CAAiBL,KAAAA,KAAOM,WAAAA;gBACxBpB,IAAAA,SAAOc,GAAOO,IAAAA,6BAAAA,EAAAA,kBAA4BC,wBAAA,EAAAC,IAAAf,SAAA;YAC5C,OAAA;gBACAe,IAAAf,SAAW,GAAAG,IAAAA,6BAAA,EAAAC,kBAAAY,kBAAA,EAAAD,IAAAf,SAAA;;kBAETR,QAAOc,CAAAA,GAAOW,GAAAA;QAChB;;WAEEvB;2EAEA"}
|
|
@@ -12,10 +12,10 @@ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildc
|
|
|
12
12
|
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
13
|
const _useAttachmentOverflowMenuItem = require("./useAttachmentOverflowMenuItem");
|
|
14
14
|
const _renderAttachmentOverflowMenuItem = require("./renderAttachmentOverflowMenuItem");
|
|
15
|
-
const
|
|
15
|
+
const _useAttachmentOverflowMenuItemStylesstyles = require("./useAttachmentOverflowMenuItemStyles.styles");
|
|
16
16
|
const AttachmentOverflowMenuItem = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
17
17
|
const state = (0, _useAttachmentOverflowMenuItem.useAttachmentOverflowMenuItem_unstable)(props, ref);
|
|
18
|
-
(0,
|
|
18
|
+
(0, _useAttachmentOverflowMenuItemStylesstyles.useAttachmentOverflowMenuItemStyles_unstable)(state);
|
|
19
19
|
return (0, _renderAttachmentOverflowMenuItem.renderAttachmentOverflowMenuItem_unstable)(state);
|
|
20
20
|
});
|
|
21
21
|
AttachmentOverflowMenuItem.displayName = 'AttachmentOverflowMenuItem'; //# sourceMappingURL=AttachmentOverflowMenuItem.js.map
|
package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AttachmentOverflowMenuItem.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentOverflowMenuItem_unstable } from './useAttachmentOverflowMenuItem';\nimport { renderAttachmentOverflowMenuItem_unstable } from './renderAttachmentOverflowMenuItem';\nimport type { AttachmentOverflowMenuItemProps } from './AttachmentOverflowMenuItem.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useAttachmentOverflowMenuItemStyles_unstable } from './useAttachmentOverflowMenuItemStyles';\nexport const AttachmentOverflowMenuItem: ForwardRefComponent<AttachmentOverflowMenuItemProps> = React.forwardRef(\n (props, ref) => {\n const state = useAttachmentOverflowMenuItem_unstable(props, ref);\n useAttachmentOverflowMenuItemStyles_unstable(state);\n\n return renderAttachmentOverflowMenuItem_unstable(state);\n },\n);\n\nAttachmentOverflowMenuItem.displayName = 'AttachmentOverflowMenuItem';\n"],"names":["AttachmentOverflowMenuItem","React","forwardRef","props","state","useAttachmentOverflowMenuItem_unstable","useAttachmentOverflowMenuItemStyles_unstable","renderAttachmentOverflowMenuItem_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAMaA;;;eAAAA;;;;iEANU;+CACgC;kDACG;
|
|
1
|
+
{"version":3,"sources":["AttachmentOverflowMenuItem.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentOverflowMenuItem_unstable } from './useAttachmentOverflowMenuItem';\nimport { renderAttachmentOverflowMenuItem_unstable } from './renderAttachmentOverflowMenuItem';\nimport type { AttachmentOverflowMenuItemProps } from './AttachmentOverflowMenuItem.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useAttachmentOverflowMenuItemStyles_unstable } from './useAttachmentOverflowMenuItemStyles.styles';\nexport const AttachmentOverflowMenuItem: ForwardRefComponent<AttachmentOverflowMenuItemProps> = React.forwardRef(\n (props, ref) => {\n const state = useAttachmentOverflowMenuItem_unstable(props, ref);\n useAttachmentOverflowMenuItemStyles_unstable(state);\n\n return renderAttachmentOverflowMenuItem_unstable(state);\n },\n);\n\nAttachmentOverflowMenuItem.displayName = 'AttachmentOverflowMenuItem';\n"],"names":["AttachmentOverflowMenuItem","React","forwardRef","props","state","useAttachmentOverflowMenuItem_unstable","useAttachmentOverflowMenuItemStyles_unstable","renderAttachmentOverflowMenuItem_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAMaA;;;eAAAA;;;;iEANU;+CACgC;kDACG;2DAGG;AACtD,MAAMA,6BAAAA,WAAAA,GAAAA,OAAmFC,UAAMC,CAAU,CAC9GC,OAACA;UACCC,QAAMA,IAAAA,qEAAQC,EAAAA,OAAuCF;+FACrDG,EAAAA;WAEAC,IAAAA,2EAAOA,EAAAA;AACT;AAGFP,2BAA2BQ,WAAW,GAAG"}
|
|
@@ -7,5 +7,5 @@ _export_star._(require("./AttachmentOverflowMenuItem"), exports);
|
|
|
7
7
|
_export_star._(require("./AttachmentOverflowMenuItem.types"), exports);
|
|
8
8
|
_export_star._(require("./renderAttachmentOverflowMenuItem"), exports);
|
|
9
9
|
_export_star._(require("./useAttachmentOverflowMenuItem"), exports);
|
|
10
|
-
_export_star._(require("./useAttachmentOverflowMenuItemStyles"), exports);
|
|
10
|
+
_export_star._(require("./useAttachmentOverflowMenuItemStyles.styles"), exports);
|
|
11
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './AttachmentOverflowMenuItem';\nexport * from './AttachmentOverflowMenuItem.types';\nexport * from './renderAttachmentOverflowMenuItem';\nexport * from './useAttachmentOverflowMenuItem';\nexport * from './useAttachmentOverflowMenuItemStyles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './AttachmentOverflowMenuItem';\nexport * from './AttachmentOverflowMenuItem.types';\nexport * from './renderAttachmentOverflowMenuItem';\nexport * from './useAttachmentOverflowMenuItem';\nexport * from './useAttachmentOverflowMenuItemStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|
|
@@ -12,15 +12,14 @@ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildc
|
|
|
12
12
|
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
13
|
const _reactcomponents = require("@fluentui/react-components");
|
|
14
14
|
const _reacticons = require("@fluentui/react-icons");
|
|
15
|
-
const _reactoverflow = require("@fluentui/react-overflow");
|
|
16
15
|
const _attachmentListContext = require("../../contexts/attachmentListContext");
|
|
17
16
|
const useAttachmentOverflowMenuItem_unstable = (props, ref)=>{
|
|
17
|
+
'use no memo';
|
|
18
18
|
const { imageOnly, media } = props;
|
|
19
19
|
const DismissIcon = (0, _reacticons.bundleIcon)(_reacticons.Dismiss20Filled, _reacticons.Dismiss20Regular);
|
|
20
20
|
const menuItemId = (0, _reactcomponents.useId)('attachment-', props.id);
|
|
21
21
|
const isVisible = (0, _reactcomponents.useIsOverflowItemVisible)(menuItemId);
|
|
22
|
-
const { onAttachmentDismiss
|
|
23
|
-
const attachmentsVisibilityStatus = (0, _reactoverflow.useOverflowContext)((context)=>context.itemVisibility);
|
|
22
|
+
const { onAttachmentDismiss } = (0, _attachmentListContext.useAttachmentListContext_unstable)((context)=>context);
|
|
24
23
|
const root = _reactcomponents.slot.always({
|
|
25
24
|
ref,
|
|
26
25
|
icon: media,
|
|
@@ -36,9 +35,6 @@ const useAttachmentOverflowMenuItem_unstable = (props, ref)=>{
|
|
|
36
35
|
media,
|
|
37
36
|
id: menuItemId
|
|
38
37
|
});
|
|
39
|
-
if (shouldUseOverflow) {
|
|
40
|
-
delete attachmentsVisibilityStatus[menuItemId];
|
|
41
|
-
}
|
|
42
38
|
});
|
|
43
39
|
const progress = _reactcomponents.slot.optional(props.progress, {
|
|
44
40
|
defaultProps: {
|
package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useAttachmentOverflowMenuItem.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n MenuItem,\n ProgressBar,\n mergeCallbacks,\n slot,\n useId,\n useIsOverflowItemVisible,\n} from '@fluentui/react-components';\nimport { Dismiss20Filled, Dismiss20Regular, bundleIcon } from '@fluentui/react-icons';\nimport {
|
|
1
|
+
{"version":3,"sources":["useAttachmentOverflowMenuItem.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n MenuItem,\n ProgressBar,\n mergeCallbacks,\n slot,\n useId,\n useIsOverflowItemVisible,\n} 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 'use no memo';\n\n const { imageOnly, media } = props;\n const DismissIcon = bundleIcon(Dismiss20Filled, Dismiss20Regular);\n const menuItemId = useId('attachment-', props.id);\n const isVisible = useIsOverflowItemVisible(menuItemId);\n const { onAttachmentDismiss } = useAttachmentListContext_unstable(context => context);\n\n const root = slot.always(\n { ref, icon: media, secondaryContent: <DismissIcon />, ...props, id: menuItemId },\n { elementType: MenuItem },\n );\n root.onClick = mergeCallbacks(root.onClick, ev => {\n onAttachmentDismiss?.(ev, { content: props.children, media, id: menuItemId });\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":["useAttachmentOverflowMenuItem_unstable","props","ref","imageOnly","isVisible","media","icon","secondaryContent","menuItemId","useAttachmentListContext_unstable","context","elementType","MenuItem","root","onClick","onAttachmentDismiss","content","progress","optional","ev","shape","children","slot","defaultProps","components","ProgressBar"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BA6BEA;;;eAAAA;;;;iEA7BqB;iCAQhB;4BACuD;uCACZ;AAmBhD,MAAAA,yCAAA,CAAAC,OAAAC;;UAIA,EACAC,SAAMC,EACNC,KAAA,KAEAJ;UACIC,cAAAA,IAAAA,sBAAAA,EAAAA,2BAAAA,EAAAA,4BAAAA;UAAKI,aAAMD,IAAAA,sBAAAA,EAAAA,eAAAA,MAAAA,EAAAA;UAAOE,YAAAA,IAAAA,yCAAkB,EAAAC;UAAiB,qBAAcA,KAAWC,IAAAA,wDAChF,EAAAC,CAAAA,UAAAA;UAAEC,OAAAA,qBAAAA,CAAAA,MAAaC,CAAAA;QAASV;QAE1BW,MAAKC;0BACHC,WAAAA,GAAAA,OAAAA,aAAAA,CAAAA,aAAAA;gBAA4BC;;;qBAA+CJ,yBAAA;;SAG7EE,OAAMG,GAAAA,IAAAA,+BAAgBC,EAAAA,KAASjB,OAAMgB,EAAAA,CAAAA;gCACrB,QAAAF,wBAAA,KAAA,IAAA,KAAA,IAAAA,oBAAAI,IAAA;qBACZC,MAAOC,QAAA;;;;;UAKXJ,WAAAK,qBAAA,CAAAJ,QAAA,CAAAjB,MAAAgB,QAAA,EAAA;QAEAM,cAAO;mBACLC;uBACEX;+BACUY,MAAAA,EAAAA;;qBAEZZ,4BAAAA;;WAEAT;oBACAD;YACFU,MAAAD,yBAAA;YACAK,UAAAQ,4BAAA"}
|
|
@@ -17,7 +17,7 @@ _export(exports, {
|
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
19
|
const _reactcomponents = require("@fluentui/react-components");
|
|
20
|
-
const
|
|
20
|
+
const _useProgressBarStylesstyles = require("../utils/useProgressBarStyles.styles");
|
|
21
21
|
const attachmentOverflowMenuItemClassNames = {
|
|
22
22
|
root: 'fai-AttachmentOverflowMenuItem',
|
|
23
23
|
progress: 'fai-AttachmentOverflowMenuItem__progress'
|
|
@@ -32,9 +32,10 @@ const useStyles = (0, _reactcomponents.__styles)({
|
|
|
32
32
|
]
|
|
33
33
|
});
|
|
34
34
|
const useAttachmentOverflowMenuItemStyles_unstable = (state)=>{
|
|
35
|
+
'use no memo';
|
|
35
36
|
const { imageOnly } = state;
|
|
36
37
|
const styles = useStyles();
|
|
37
|
-
const progressBarStyles = (0,
|
|
38
|
+
const progressBarStyles = (0, _useProgressBarStylesstyles.useProgressBarStyles)();
|
|
38
39
|
state.root.className = (0, _reactcomponents.mergeClasses)(attachmentOverflowMenuItemClassNames.root, imageOnly && styles.imageOnly, state.root.className);
|
|
39
40
|
if (state.progress) {
|
|
40
41
|
state.progress.className = (0, _reactcomponents.mergeClasses)(attachmentOverflowMenuItemClassNames.progress, progressBarStyles.progress, state.progress.className);
|
|
@@ -52,4 +53,4 @@ const useAttachmentOverflowMenuItemStyles_unstable = (state)=>{
|
|
|
52
53
|
}
|
|
53
54
|
}
|
|
54
55
|
return state;
|
|
55
|
-
}; //# sourceMappingURL=useAttachmentOverflowMenuItemStyles.js.map
|
|
56
|
+
}; //# sourceMappingURL=useAttachmentOverflowMenuItemStyles.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useAttachmentOverflowMenuItemStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, slot } 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 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 'use no memo';\n\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","styles","useStyles","root","progress","makeStyles","imageOnly","alignItems","d","state","elementType","renderByDefault","className","mergeClasses","bar","value","undefined","progressBarStyles","indeterminateProgressBar","regularProgressBar"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAQaA,oCAAAA;eAAAA;;IAoBLC,4CAASC;eAATD;;;iCA5B+B;4CACF;AAO9B,MAAMD,uCAAwF;UACnGG;cACAC;AACF;AAEA,MAAMF,YAAYG,IAAAA,yBAAAA,EAAAA;eAChBC;iBACEC;;AAEJ,GAAA;IAEAC,GAAA;QAAA;KAAA;;AASE,MAAMP,+CAASC,CAAAA;;UASXO,WACFA;mBAMgDC;8BAAoBC,IAAAA,gDAAiB;UAAKR,IAAA,CAAAS,SAAA,GAAAC,IAAAA,6BAAA,EAAAb,qCAAAG,IAAA,EAAAG,aAAAL,OAAAK,SAAA,EAAAG,MAAAN,IAAA,CAAAS,SAAA;cACtFE,QAAK,EAAA;sBACHL,CAAAA,SAAML,GAASW,IAAAA,6BAAUC,EAAAA,qCAAWZ,QAAA,EAAAa,kBAAAb,QAAA,EAAAK,MAAAL,QAAA,CAAAQ,SAAA;oBACtCE,qBAAIF,CAAAA,QAAS,CAAAH,MAAGI,QAAAA,CAAaI,GAAAA,EAAAA;yBACxB;6BACDL;;iBAENH;gBACFA,MAAAL,QAAA,CAAAW,KAAA,KAAAC,WAAA;gBACFF,IAAAF,SAAA,GAAAC,IAAAA,6BAAA,EAAAI,kBAAAC,wBAAA,EAAAJ,IAAAF,SAAA;YAEA,OAAOH;gBACPK,IAAAF,SAAA,GAAAC,IAAAA,6BAAA,EAAAI,kBAAAE,kBAAA,EAAAL,IAAAF,SAAA"}
|
|
@@ -12,11 +12,11 @@ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildc
|
|
|
12
12
|
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
13
|
const _useAttachmentTag = require("./useAttachmentTag");
|
|
14
14
|
const _renderAttachmentTag = require("./renderAttachmentTag");
|
|
15
|
-
const
|
|
15
|
+
const _useAttachmentTagStylesstyles = require("./useAttachmentTagStyles.styles");
|
|
16
16
|
const _reactprovider = require("@fluentui-copilot/react-provider");
|
|
17
17
|
const AttachmentTag = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
18
18
|
const state = (0, _useAttachmentTag.useAttachmentTag_unstable)(props, ref);
|
|
19
|
-
(0,
|
|
19
|
+
(0, _useAttachmentTagStylesstyles.useAttachmentTagStyles_unstable)(state);
|
|
20
20
|
(0, _reactprovider.useCustomStyleHook)('useAttachmentTagStyles')(state);
|
|
21
21
|
return (0, _renderAttachmentTag.renderAttachmentTag_unstable)(state);
|
|
22
22
|
});
|
|
@@ -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.\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;
|
|
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.styles';\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;8CACG;+BAGb;AAOjC,MAAMA,gBAAQC,WAAAA,GAAAA,OAA0BC,UAAOC,CAAAA,CAAAA,OAAAA;UAE/CC,QAAAA,IAAAA,2CAAgCJ,EAAAA,OAAAA;qEACb,EAAAA;yCAEZK,EAAAA,0BAA6BL;IACtC,OAAGK,IAAAA,iDAAA,EAAAL;AAEHM"}
|
|
@@ -7,5 +7,5 @@ _export_star._(require("./AttachmentTag"), exports);
|
|
|
7
7
|
_export_star._(require("./AttachmentTag.types"), exports);
|
|
8
8
|
_export_star._(require("./renderAttachmentTag"), exports);
|
|
9
9
|
_export_star._(require("./useAttachmentTag"), exports);
|
|
10
|
-
_export_star._(require("./useAttachmentTagStyles"), exports);
|
|
10
|
+
_export_star._(require("./useAttachmentTagStyles.styles"), exports);
|
|
11
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './AttachmentTag';\nexport * from './AttachmentTag.types';\nexport * from './renderAttachmentTag';\nexport * from './useAttachmentTag';\nexport * from './useAttachmentTagStyles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './AttachmentTag';\nexport * from './AttachmentTag.types';\nexport * from './renderAttachmentTag';\nexport * from './useAttachmentTag';\nexport * from './useAttachmentTagStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|
|
@@ -63,6 +63,7 @@ const useIconBaseClassName = (0, _reactcomponents.__resetStyles)("r176grtk", nul
|
|
|
63
63
|
".r176grtk{align-items:center;border-radius:var(--borderRadiusCircular);border:var(--strokeWidthThin) solid var(--colorTransparentStroke);box-sizing:border-box;color:var(--colorNeutralForeground1);display:inline-flex;font-size:20px;height:calc(20px + var(--strokeWidthThin) * 2 + var(--spacingVerticalXXS));justify-content:center;max-width:calc(20px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS));min-width:calc(20px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS));padding:calc(var(--spacingVerticalXXS) / 2) calc(var(--spacingHorizontalXXS) / 2);}"
|
|
64
64
|
]);
|
|
65
65
|
const useAttachmentTagStyles_unstable = (state)=>{
|
|
66
|
+
'use no memo';
|
|
66
67
|
const rootBaseClassName = useRootBaseClassName();
|
|
67
68
|
const mediaBaseClassName = useMediaBaseClassName();
|
|
68
69
|
const contentBaseClassName = useContentBaseClassName();
|
|
@@ -74,4 +75,4 @@ const useAttachmentTagStyles_unstable = (state)=>{
|
|
|
74
75
|
state.content.className = (0, _reactcomponents.mergeClasses)(attachmentTagClassNames.content, contentBaseClassName, state.content.className);
|
|
75
76
|
state.icon.className = (0, _reactcomponents.mergeClasses)(attachmentTagClassNames.icon, iconBaseClassName, state.icon.className);
|
|
76
77
|
return state;
|
|
77
|
-
}; //# sourceMappingURL=useAttachmentTagStyles.js.map
|
|
78
|
+
}; //# sourceMappingURL=useAttachmentTagStyles.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useAttachmentTagStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses, tokens, typographyStyles } from '@fluentui/react-components';\nimport type { AttachmentTagSlots, AttachmentTagState } from './AttachmentTag.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const attachmentTagClassNames: SlotClassNames<AttachmentTagSlots> = {\n root: 'fai-AttachmentTag',\n media: 'fai-AttachmentTag__media',\n content: 'fai-AttachmentTag__content',\n icon: 'fai-AttachmentTag__icon',\n};\n\n/**\n * @internal\n */\nexport const ATTACHMENTTAG_MAXWIDTH = '180px';\nconst ATTACHMENTTAG_SIZE = '20px';\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 justifyContent: 'center',\n maxWidth: ATTACHMENTTAG_MAXWIDTH,\n padding: `${tokens.spacingVerticalXS} ${tokens.spacingHorizontalXS} ${tokens.spacingVerticalXS} ${tokens.spacingHorizontalS}`,\n verticalAlign: 'middle',\n\n ':hover': {\n borderColor: tokens.colorNeutralStroke1Hover,\n\n [`& .${attachmentTagClassNames.icon}`]: {\n color: tokens.colorBrandForegroundLinkHover,\n },\n },\n\n ':hover:active': {\n borderColor: tokens.colorNeutralStroke1Pressed,\n\n [`& .${attachmentTagClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2BrandPressed,\n },\n },\n\n ':focus': {\n [`& .${attachmentTagClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2BrandHover,\n },\n },\n\n ':focus:active': {\n [`& .${attachmentTagClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2BrandPressed,\n },\n },\n});\n\n/**\n * @internal\n */\nexport const useMediaBaseClassName = makeResetStyles({\n fontSize: ATTACHMENTTAG_SIZE,\n height: ATTACHMENTTAG_SIZE,\n lineHeight: ATTACHMENTTAG_SIZE,\n width: ATTACHMENTTAG_SIZE,\n});\n\n/**\n * @internal\n */\nexport const useContentBaseClassName = makeResetStyles({\n overflowX: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n ...typographyStyles.body1,\n});\n\n/**\n * @internal\n */\nexport const useIconBaseClassName = makeResetStyles({\n alignItems: 'center',\n borderRadius: tokens.borderRadiusCircular,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground1,\n display: 'inline-flex',\n fontSize: ATTACHMENTTAG_SIZE,\n height: `calc(${ATTACHMENTTAG_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingVerticalXXS})`,\n justifyContent: 'center',\n maxWidth: `calc(${ATTACHMENTTAG_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS})`,\n minWidth: `calc(${ATTACHMENTTAG_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS})`,\n padding: `calc(${tokens.spacingVerticalXXS} / 2) calc(${tokens.spacingHorizontalXXS} / 2)`,\n});\n\n/**\n * Apply styling to the AttachmentTag slots based on the state\n */\nexport const useAttachmentTagStyles_unstable = (state: AttachmentTagState): AttachmentTagState => {\n 'use no memo';\n\n const rootBaseClassName = useRootBaseClassName();\n const mediaBaseClassName = useMediaBaseClassName();\n const contentBaseClassName = useContentBaseClassName();\n const iconBaseClassName = useIconBaseClassName();\n\n state.root.className = mergeClasses(attachmentTagClassNames.root, rootBaseClassName, state.root.className);\n\n if (state.media) {\n state.media.className = mergeClasses(attachmentTagClassNames.media, mediaBaseClassName, state.media.className);\n }\n\n state.content.className = mergeClasses(\n attachmentTagClassNames.content,\n contentBaseClassName,\n state.content.className,\n );\n\n state.icon.className = mergeClasses(attachmentTagClassNames.icon, iconBaseClassName, state.icon.className);\n\n return state;\n};\n"],"names":["ATTACHMENTTAG_SIZE","attachmentTagClassNames","useAttachmentTagStyles_unstable","useContentBaseClassName","useIconBaseClassName","spacingVerticalXS","borderRadius","borderRadiusMedium","root","media","content","icon","useRootBaseClassName","color","colorNeutralForeground1","display","__resetStyles","padding","tokens","spacingHorizontalXS","state","rootBaseClassName","mediaBaseClassName","useMediaBaseClassName","borderColor","colorNeutralStroke1Pressed","iconBaseClassName","colorNeutralForeground2BrandPressed","className","mergeClasses","contentBaseClassName","colorNeutralForeground2BrandHover"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAeMA,sBAAqB;eAArBA;;IAXOC,uBAAAA;eAAAA;;IAgCJC,+BAA+B;eAA/BA;;IAVEC,uBAAA;eAAAA;;IAIAC,oBAAUC;eAAVD;;IARTE,qBAAqBC;eAArBD;;;iCAtB8D;AAIzD,MAAML,0BAA8D;UACzEO;WACAC;aACAC;UACAC;AACF;AAMMX,MAAAA,yBAAqB;AAE3B,MAAMY,qBAAAA;MACJC,uBAAcC,IAAAA,8BAAuB,EAAA,YAAA,WAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;CAAA;AAIrCR,MAAAA,wBAAqBC,IAAAA,8BAAkB,EAAA,YAAA,MAAA;IAAA;CAAA;AAIvCQ,MAASZ,0BAAAa,IAAAA,8BAAA,EAAA,WAAA,MAAA;IAAA;CAAA;AAITC,MAASb,uBAAUC,IAAAA,8BAAqBa,EAAAA,YAAOC,MAAAA;IAAAA;CAA8E;MAMtHjB,kCAAiCkB,CAAAA;;UAGxCC,oBAAAT;UAEAU,qBAAiBC;UACfC,uBAAoBC;UAEpBC,oBAAOzB;cACLY,CAAAA,SAAOK,GAAAA,IAAAA,6BAAOS,EAAAA,wBAAmCnB,IAAA,EAAAa,mBAAAD,MAAAZ,IAAA,CAAAoB,SAAA;cACnDnB,KAAA,EAAA;QACFW,MAAAX,KAAA,CAAAmB,SAAA,GAAAC,IAAAA,6BAAA,EAAA5B,wBAAAQ,KAAA,EAAAa,oBAAAF,MAAAX,KAAA,CAAAmB,SAAA;;UAGElB,OAAOT,CAAAA,SAAAA,GAAAA,IAAAA,6BAAwBU,EAAAA,wBAASD,OAAA,EAAAoB,sBAAAV,MAAAV,OAAA,CAAAkB,SAAA;cACtCf,CAAAA,SAAOK,GAAAA,IAAAA,6BAAOa,EAAAA,wBAAiCpB,IAAA,EAAAe,mBAAAN,MAAAT,IAAA,CAAAiB,SAAA;WACjDR;4DAGe"}
|
|
@@ -12,10 +12,10 @@ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildc
|
|
|
12
12
|
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
13
|
const _useAttachmentTagItem = require("./useAttachmentTagItem");
|
|
14
14
|
const _renderAttachmentTagItem = require("./renderAttachmentTagItem");
|
|
15
|
-
const
|
|
15
|
+
const _useAttachmentTagItemStylesstyles = require("./useAttachmentTagItemStyles.styles");
|
|
16
16
|
const AttachmentTagItem = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
17
17
|
const state = (0, _useAttachmentTagItem.useAttachmentTagItem_unstable)(props, ref);
|
|
18
|
-
(0,
|
|
18
|
+
(0, _useAttachmentTagItemStylesstyles.useAttachmentTagItemStyles_unstable)(state);
|
|
19
19
|
return (0, _renderAttachmentTagItem.renderAttachmentTagItem_unstable)(state);
|
|
20
20
|
});
|
|
21
21
|
AttachmentTagItem.displayName = 'AttachmentTagItem'; //# sourceMappingURL=AttachmentTagItem.js.map
|
|
@@ -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.\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;
|
|
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.styles';\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;kDACG;AASlD,MAAMA,oBAAQC,WAAAA,GAAAA,OAA8BC,UAAOC,CAAAA,CAAAA,OAAAA;UAEnDC,QAAAA,IAAAA,mDAAoCJ,EAAAA,OAAAA;6EAC7BK,EAAAA;IACT,OAAGA,IAAAA,yDAAA,EAAAL;AAEHM"}
|
|
@@ -7,5 +7,5 @@ _export_star._(require("./AttachmentTagItem"), exports);
|
|
|
7
7
|
_export_star._(require("./AttachmentTagItem.types"), exports);
|
|
8
8
|
_export_star._(require("./renderAttachmentTagItem"), exports);
|
|
9
9
|
_export_star._(require("./useAttachmentTagItem"), exports);
|
|
10
|
-
_export_star._(require("./useAttachmentTagItemStyles"), exports);
|
|
10
|
+
_export_star._(require("./useAttachmentTagItemStyles.styles"), exports);
|
|
11
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './AttachmentTagItem';\nexport * from './AttachmentTagItem.types';\nexport * from './renderAttachmentTagItem';\nexport * from './useAttachmentTagItem';\nexport * from './useAttachmentTagItemStyles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './AttachmentTagItem';\nexport * from './AttachmentTagItem.types';\nexport * from './renderAttachmentTagItem';\nexport * from './useAttachmentTagItem';\nexport * from './useAttachmentTagItemStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|
|
@@ -17,7 +17,7 @@ _export(exports, {
|
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
19
|
const _reactcomponents = require("@fluentui/react-components");
|
|
20
|
-
const
|
|
20
|
+
const _useAttachmentTagStylesstyles = require("../AttachmentTag/useAttachmentTagStyles.styles");
|
|
21
21
|
const attachmentTagItemClassNames = {
|
|
22
22
|
root: 'fai-AttachmentTagItem',
|
|
23
23
|
media: 'fai-AttachmentTagItem__media',
|
|
@@ -30,10 +30,11 @@ const attachmentTagItemClassNames = {
|
|
|
30
30
|
".rcbi0rb{display:inline-flex;flex-wrap:nowrap;column-gap:var(--spacingHorizontalSNudge);max-width:180px;align-items:center;}"
|
|
31
31
|
]);
|
|
32
32
|
const useAttachmentTagItemStyles_unstable = (state)=>{
|
|
33
|
+
'use no memo';
|
|
33
34
|
const rootBaseClassName = useRootBaseClassName();
|
|
34
|
-
const mediaBaseClassName = (0,
|
|
35
|
-
const contentBaseClassName = (0,
|
|
36
|
-
const iconBaseClassName = (0,
|
|
35
|
+
const mediaBaseClassName = (0, _useAttachmentTagStylesstyles.useMediaBaseClassName)();
|
|
36
|
+
const contentBaseClassName = (0, _useAttachmentTagStylesstyles.useContentBaseClassName)();
|
|
37
|
+
const iconBaseClassName = (0, _useAttachmentTagStylesstyles.useIconBaseClassName)();
|
|
37
38
|
state.root.className = (0, _reactcomponents.mergeClasses)(attachmentTagItemClassNames.root, rootBaseClassName, state.root.className);
|
|
38
39
|
if (state.media) {
|
|
39
40
|
state.media.className = (0, _reactcomponents.mergeClasses)(attachmentTagItemClassNames.media, mediaBaseClassName, state.media.className);
|
|
@@ -41,4 +42,4 @@ const useAttachmentTagItemStyles_unstable = (state)=>{
|
|
|
41
42
|
state.content.className = (0, _reactcomponents.mergeClasses)(attachmentTagItemClassNames.content, contentBaseClassName, state.content.className);
|
|
42
43
|
state.icon.className = (0, _reactcomponents.mergeClasses)(attachmentTagItemClassNames.icon, iconBaseClassName, state.icon.className);
|
|
43
44
|
return state;
|
|
44
|
-
}; //# sourceMappingURL=useAttachmentTagItemStyles.js.map
|
|
45
|
+
}; //# sourceMappingURL=useAttachmentTagItemStyles.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useAttachmentTagItemStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses, tokens } from '@fluentui/react-components';\nimport {\n ATTACHMENTTAG_MAXWIDTH,\n useContentBaseClassName,\n useIconBaseClassName,\n useMediaBaseClassName,\n} from '../AttachmentTag/useAttachmentTagStyles.styles';\nimport type { AttachmentTagItemSlots, AttachmentTagItemState } from './AttachmentTagItem.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const attachmentTagItemClassNames: SlotClassNames<AttachmentTagItemSlots> = {\n root: 'fai-AttachmentTagItem',\n media: 'fai-AttachmentTagItem__media',\n content: 'fai-AttachmentTagItem__content',\n icon: 'fai-AttachmentTagItem__icon',\n};\n\n/**\n * Styles for the root slot\n */\nconst useRootBaseClassName = makeResetStyles({\n display: 'inline-flex',\n flexWrap: 'nowrap',\n columnGap: tokens.spacingHorizontalSNudge,\n maxWidth: ATTACHMENTTAG_MAXWIDTH,\n alignItems: 'center',\n});\n\n/**\n * Apply styling to the AttachmentTagItem slots based on the state\n */\nexport const useAttachmentTagItemStyles_unstable = (state: AttachmentTagItemState): AttachmentTagItemState => {\n 'use no memo';\n\n const rootBaseClassName = useRootBaseClassName();\n const mediaBaseClassName = useMediaBaseClassName();\n const contentBaseClassName = useContentBaseClassName();\n const iconBaseClassName = useIconBaseClassName();\n\n state.root.className = mergeClasses(attachmentTagItemClassNames.root, rootBaseClassName, state.root.className);\n\n if (state.media) {\n state.media.className = mergeClasses(attachmentTagItemClassNames.media, mediaBaseClassName, state.media.className);\n }\n\n state.content.className = mergeClasses(\n attachmentTagItemClassNames.content,\n contentBaseClassName,\n state.content.className,\n );\n\n state.icon.className = mergeClasses(attachmentTagItemClassNames.icon, iconBaseClassName, state.icon.className);\n\n return state;\n};\n"],"names":["attachmentTagItemClassNames","alignItems","root","media","content","icon","display","__resetStyles","state","mediaBaseClassName","useAttachmentTagItemStyles_unstable","contentBaseClassName","useContentBaseClassName","iconBaseClassName","rootBaseClassName","useRootBaseClassName","useMediaBaseClassName","useIconBaseClassName","mergeClasses","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAUaA,2BAAAA;eAAAA;;IAeXC,mCAAY;eAAZA;;;iCAzB4C;8CAMvC;AAIA,MAAMD,8BAAsE;UACjFE;WACAC;aACAC;UACAC;AACF;AAEA;;CAEC,SAECC,uBAASC,IAAAA,8BAAA,EAAA,WAAA,MAAA;IAAA;CAAA;AAITN,MAAAA,sCAAYO,CAAAA;IACd;;IAIC,MACDC,qBAAaC,IAAAA,mDAAAA;UACXC,uBAAAC,IAAAA,qDAAA;UAEAC,oBAAMC,IAAAA,kDAAoBC;UAC1Bb,IAAMO,CAAAA,SAAAA,GAAAA,IAAAA,6BAAqBO,EAAAA,4BAAAA,IAAAA,EAAAA,mBAAAA,MAAAA,IAAAA,CAAAA,SAAAA;QAC3BR,MAAMG,KAAAA,EAAAA;QACNH,MAAMK,KAAAA,CAAAA,SAAAA,GAAAA,IAAAA,6BAAoBI,EAAAA,4BAAAA,KAAAA,EAAAA,oBAAAA,MAAAA,KAAAA,CAAAA,SAAAA;;UAItBT,OAAML,CAAAA,SAAO,GAAAe,IAAAA,6BAAA,EAAAlB,4BAAAI,OAAA,EAAAO,sBAAAH,MAAAJ,OAAA,CAAAe,SAAA;UACfX,IAAAA,CAAAA,SAAYW,GAAAA,IAAAA,6BAAYD,EAAAA,4BAAalB,IAAAA,EAAAA,mBAAmCS,MAAAA,IAAoBD,CAAAA,SAAW;WACzGA;gEAQoCR"}
|
|
@@ -13,12 +13,12 @@ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
|
13
13
|
const _renderAttachmentTagList = require("./renderAttachmentTagList");
|
|
14
14
|
const _useAttachmentTagList = require("./useAttachmentTagList");
|
|
15
15
|
const _useAttachmentTagListContextValues = require("./useAttachmentTagListContextValues");
|
|
16
|
-
const
|
|
16
|
+
const _useAttachmentTagListStylesstyles = require("./useAttachmentTagListStyles.styles");
|
|
17
17
|
const _reactprovider = require("@fluentui-copilot/react-provider");
|
|
18
18
|
const AttachmentTagList = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
19
19
|
const state = (0, _useAttachmentTagList.useAttachmentTagList_unstable)(props, ref);
|
|
20
20
|
const contextValues = (0, _useAttachmentTagListContextValues.useAttachmentTagListContextValues_unstable)(state);
|
|
21
|
-
(0,
|
|
21
|
+
(0, _useAttachmentTagListStylesstyles.useAttachmentTagListStyles_unstable)(state);
|
|
22
22
|
(0, _reactprovider.useCustomStyleHook)('useAttachmentTagListStyles')(state);
|
|
23
23
|
return (0, _renderAttachmentTagList.renderAttachmentTagList_unstable)(state, contextValues);
|
|
24
24
|
});
|
|
@@ -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.\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;
|
|
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.styles';\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;kDACP;+BAGjB;AAOjC,MAAMA,oBAAQC,WAAAA,GAAAA,OAA8BC,UAAOC,CAAAA,CAAAA,OAAAA;UACnDH,QAAMI,IAAAA,mDAAgBC,EAAAA,OAAAA;UAEtBC,gBAAAA,IAAAA,6EAAoCN,EAAAA;6EACjB,EAAAA;yCAEZO,EAAAA,8BAAwCH;IACjD,OAAGG,IAAAA,yDAAA,EAAAP,OAAAI;AAEHI"}
|
|
@@ -7,5 +7,5 @@ _export_star._(require("./AttachmentTagList"), exports);
|
|
|
7
7
|
_export_star._(require("./AttachmentTagList.types"), exports);
|
|
8
8
|
_export_star._(require("./renderAttachmentTagList"), exports);
|
|
9
9
|
_export_star._(require("./useAttachmentTagList"), exports);
|
|
10
|
-
_export_star._(require("./useAttachmentTagListStyles"), exports);
|
|
10
|
+
_export_star._(require("./useAttachmentTagListStyles.styles"), exports);
|
|
11
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './AttachmentTagList';\nexport * from './AttachmentTagList.types';\nexport * from './renderAttachmentTagList';\nexport * from './useAttachmentTagList';\nexport * from './useAttachmentTagListStyles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './AttachmentTagList';\nexport * from './AttachmentTagList.types';\nexport * from './renderAttachmentTagList';\nexport * from './useAttachmentTagList';\nexport * from './useAttachmentTagListStyles.styles';\n"],"names":[],"rangeMappings":";;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
|