@fluentui-copilot/react-attachments 0.8.2 → 0.9.0
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 +63 -1
- package/CHANGELOG.md +28 -2
- package/dist/index.d.ts +220 -5
- package/lib/AttachmentList.js +2 -0
- package/lib/AttachmentList.js.map +1 -0
- package/lib/AttachmentOverflowMenu.js +2 -0
- package/lib/AttachmentOverflowMenu.js.map +1 -0
- package/lib/AttachmentOverflowMenuButton.js +2 -0
- package/lib/AttachmentOverflowMenuButton.js.map +1 -0
- package/lib/AttachmentOverflowMenuItem.js +2 -0
- package/lib/AttachmentOverflowMenuItem.js.map +1 -0
- package/lib/components/Attachment/Attachment.types.js.map +1 -1
- package/lib/components/Attachment/useAttachment.js +6 -8
- package/lib/components/Attachment/useAttachment.js.map +1 -1
- package/lib/components/Attachment/useAttachmentStyles.js +2 -2
- package/lib/components/Attachment/useAttachmentStyles.js.map +1 -1
- package/lib/components/AttachmentList/AttachmentList.js +13 -0
- package/lib/components/AttachmentList/AttachmentList.js.map +1 -0
- package/lib/components/AttachmentList/AttachmentList.types.js +2 -0
- package/lib/components/AttachmentList/AttachmentList.types.js.map +1 -0
- package/lib/components/AttachmentList/index.js +6 -0
- package/lib/components/AttachmentList/index.js.map +1 -0
- package/lib/components/AttachmentList/renderAttachmentList.js +14 -0
- package/lib/components/AttachmentList/renderAttachmentList.js.map +1 -0
- package/lib/components/AttachmentList/useAttachmentList.js +74 -0
- package/lib/components/AttachmentList/useAttachmentList.js.map +1 -0
- package/lib/components/AttachmentList/useAttachmentListContextValues.js +13 -0
- package/lib/components/AttachmentList/useAttachmentListContextValues.js.map +1 -0
- package/lib/components/AttachmentList/useAttachmentListStyles.js +14 -0
- package/lib/components/AttachmentList/useAttachmentListStyles.js.map +1 -0
- package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js +15 -0
- package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js.map +1 -0
- package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js +2 -0
- package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js.map +1 -0
- package/lib/components/AttachmentOverflowMenu/index.js +6 -0
- package/lib/components/AttachmentOverflowMenu/index.js.map +1 -0
- package/lib/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js +18 -0
- package/lib/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js.map +1 -0
- package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js +24 -0
- package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js.map +1 -0
- package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js +17 -0
- package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js.map +1 -0
- package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js +11 -0
- package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js.map +1 -0
- package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js +2 -0
- package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js.map +1 -0
- package/lib/components/AttachmentOverflowMenuButton/index.js +6 -0
- package/lib/components/AttachmentOverflowMenuButton/index.js.map +1 -0
- package/lib/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js +14 -0
- package/lib/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js.map +1 -0
- package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js +32 -0
- package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js.map +1 -0
- package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.js +17 -0
- package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.js.map +1 -0
- package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js +11 -0
- package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js.map +1 -0
- package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js +2 -0
- package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js.map +1 -0
- package/lib/components/AttachmentOverflowMenuItem/index.js +6 -0
- package/lib/components/AttachmentOverflowMenuItem/index.js.map +1 -0
- package/lib/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js +10 -0
- package/lib/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js.map +1 -0
- package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +41 -0
- package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js.map +1 -0
- package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.js +14 -0
- package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.js.map +1 -0
- package/lib/components/AttachmentTag/AttachmentTag.js +4 -1
- package/lib/components/AttachmentTag/AttachmentTag.js.map +1 -1
- package/lib/components/AttachmentTag/useAttachmentTag.js.map +1 -1
- package/lib/components/AttachmentTagItem/AttachmentTagItem.js +4 -0
- package/lib/components/AttachmentTagItem/AttachmentTagItem.js.map +1 -1
- package/lib/components/AttachmentTagItem/useAttachmentTagItem.js.map +1 -1
- package/lib/components/AttachmentTagList/AttachmentTagList.js +4 -1
- package/lib/components/AttachmentTagList/AttachmentTagList.js.map +1 -1
- package/lib/components/AttachmentTagList/useAttachmentTagList.js +2 -2
- package/lib/components/AttachmentTagList/useAttachmentTagList.js.map +1 -1
- package/lib/components/index.js +5 -0
- package/lib/components/index.js.map +1 -1
- package/lib/components/utils/useAttachmentTagSlots.js +2 -2
- package/lib/components/utils/useAttachmentTagSlots.js.map +1 -1
- package/lib/contexts/attachmentListContext.js +8 -0
- package/lib/contexts/attachmentListContext.js.map +1 -0
- package/lib/contexts/attachmentOverflowMenuContext.js +10 -0
- package/lib/contexts/attachmentOverflowMenuContext.js.map +1 -0
- package/lib/index.js +6 -0
- package/lib/index.js.map +1 -1
- package/lib-commonjs/AttachmentList.js +7 -0
- package/lib-commonjs/AttachmentList.js.map +1 -0
- package/lib-commonjs/AttachmentOverflowMenu.js +7 -0
- package/lib-commonjs/AttachmentOverflowMenu.js.map +1 -0
- package/lib-commonjs/AttachmentOverflowMenuButton.js +7 -0
- package/lib-commonjs/AttachmentOverflowMenuButton.js.map +1 -0
- package/lib-commonjs/AttachmentOverflowMenuItem.js +7 -0
- package/lib-commonjs/AttachmentOverflowMenuItem.js.map +1 -0
- package/lib-commonjs/components/Attachment/useAttachment.js +5 -7
- package/lib-commonjs/components/Attachment/useAttachment.js.map +1 -1
- package/lib-commonjs/components/Attachment/useAttachmentStyles.js +4 -4
- package/lib-commonjs/components/Attachment/useAttachmentStyles.js.map +1 -1
- package/lib-commonjs/components/AttachmentList/AttachmentList.js +23 -0
- package/lib-commonjs/components/AttachmentList/AttachmentList.js.map +1 -0
- package/lib-commonjs/components/AttachmentList/AttachmentList.types.js +5 -0
- package/lib-commonjs/components/AttachmentList/AttachmentList.types.js.map +1 -0
- package/lib-commonjs/components/AttachmentList/index.js +11 -0
- package/lib-commonjs/components/AttachmentList/index.js.map +1 -0
- package/lib-commonjs/components/AttachmentList/renderAttachmentList.js +20 -0
- package/lib-commonjs/components/AttachmentList/renderAttachmentList.js.map +1 -0
- package/lib-commonjs/components/AttachmentList/useAttachmentList.js +68 -0
- package/lib-commonjs/components/AttachmentList/useAttachmentList.js.map +1 -0
- package/lib-commonjs/components/AttachmentList/useAttachmentListContextValues.js +20 -0
- package/lib-commonjs/components/AttachmentList/useAttachmentListContextValues.js.map +1 -0
- package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.js +30 -0
- package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js +24 -0
- package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js +5 -0
- package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenu/index.js +11 -0
- package/lib-commonjs/components/AttachmentOverflowMenu/index.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js +21 -0
- package/lib-commonjs/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js +21 -0
- package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js +22 -0
- package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js +21 -0
- package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js +5 -0
- package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuButton/index.js +11 -0
- package/lib-commonjs/components/AttachmentOverflowMenuButton/index.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js +24 -0
- package/lib-commonjs/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js +28 -0
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.js +37 -0
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js +21 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js +5 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/index.js +11 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/index.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js +16 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +39 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.js +28 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.js.map +1 -0
- 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/AttachmentTagList/useAttachmentTagList.js +1 -1
- package/lib-commonjs/components/AttachmentTagList/useAttachmentTagList.js.map +1 -1
- package/lib-commonjs/components/index.js +5 -0
- package/lib-commonjs/components/index.js.map +1 -1
- package/lib-commonjs/components/utils/useAttachmentTagSlots.js +1 -1
- package/lib-commonjs/components/utils/useAttachmentTagSlots.js.map +1 -1
- package/lib-commonjs/contexts/attachmentListContext.js +28 -0
- package/lib-commonjs/contexts/attachmentListContext.js.map +1 -0
- package/lib-commonjs/contexts/attachmentOverflowMenuContext.js +30 -0
- package/lib-commonjs/contexts/attachmentOverflowMenuContext.js.map +1 -0
- package/lib-commonjs/index.js +78 -0
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useAttachmentList.js"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot, useArrowNavigationGroup, useEventCallback, useFocusFinders, useMergedRefs } from '@fluentui/react-components';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { useOverflowContext } from '@fluentui/react-overflow';\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 = (props, ref) => {\n const {\n onAttachmentDismiss\n } = props;\n const attachmentsVisibilityStatus = useOverflowContext(context => context.itemVisibility);\n const innerRef = React.useRef(null);\n const {\n targetDocument\n } = useFluent();\n const {\n findNextFocusable,\n findPrevFocusable\n } = useFocusFinders();\n const handleAttachmentDismiss = useEventCallback((e, data) => {\n var _innerRef_current;\n if (!onAttachmentDismiss) {\n return;\n }\n onAttachmentDismiss(e, data);\n // Remove attachment from overflow context\n attachmentsVisibilityStatus === null || attachmentsVisibilityStatus === void 0 ? true : delete attachmentsVisibilityStatus[data.id];\n // set focus after attachment dismiss\n const activeElement = targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.activeElement;\n if ((_innerRef_current = innerRef.current) === null || _innerRef_current === void 0 ? void 0 : _innerRef_current.contains(activeElement)) {\n // focus on next attachment only if the active element is within the current attachment list\n const next = findNextFocusable(activeElement, {\n container: innerRef.current\n });\n if (next) {\n next.focus();\n return;\n } else {\n const prev = findPrevFocusable(activeElement === null || activeElement === void 0 ? void 0 : activeElement.parentElement, {\n container: innerRef.current\n });\n prev === null || prev === void 0 ? void 0 : prev.focus();\n }\n }\n });\n const arrowNavigationProps = useArrowNavigationGroup({\n circular: true,\n axis: 'both',\n memorizeCurrent: true\n });\n return {\n onAttachmentDismiss: handleAttachmentDismiss,\n components: {\n root: 'div'\n },\n root: slot.always(getIntrinsicElementProps('div', {\n 'aria-label': 'Attachments',\n ref: useMergedRefs(ref, innerRef),\n role: 'toolbar',\n ...arrowNavigationProps,\n ...props\n }), {\n elementType: 'div'\n })\n };\n};\n//# sourceMappingURL=useAttachmentList.js.map"],"names":["useAttachmentList_unstable","props","ref","onAttachmentDismiss","attachmentsVisibilityStatus","useOverflowContext","context","itemVisibility","innerRef","React","useRef","targetDocument","useFluent","findNextFocusable","findPrevFocusable","useFocusFinders","handleAttachmentDismiss","useEventCallback","e","data","_innerRef_current","id","activeElement","current","contains","next","container","focus","prev","parentElement","arrowNavigationProps","useArrowNavigationGroup","circular","axis","memorizeCurrent","components","root","slot","always","getIntrinsicElementProps","useMergedRefs","role","elementType"],"mappings":";;;;+BAaaA;;;eAAAA;;;;iEAbU;iCACmG;qCAC1E;+BACb;AAU5B,MAAMA,6BAA6B,CAACC,OAAOC;IAChD,MAAM,EACJC,mBAAmB,EACpB,GAAGF;IACJ,MAAMG,8BAA8BC,IAAAA,iCAAkB,EAACC,CAAAA,UAAWA,QAAQC,cAAc;IACxF,MAAMC,WAAWC,OAAMC,MAAM,CAAC;IAC9B,MAAM,EACJC,cAAc,EACf,GAAGC,IAAAA,uCAAS;IACb,MAAM,EACJC,iBAAiB,EACjBC,iBAAiB,EAClB,GAAGC,IAAAA,gCAAe;IACnB,MAAMC,0BAA0BC,IAAAA,iCAAgB,EAAC,CAACC,GAAGC;QACnD,IAAIC;QACJ,IAAI,CAACjB,qBAAqB;YACxB;QACF;QACAA,oBAAoBe,GAAGC;QACvB,0CAA0C;QAC1Cf,gCAAgC,QAAQA,gCAAgC,KAAK,IAAI,OAAO,OAAOA,2BAA2B,CAACe,KAAKE,EAAE,CAAC;QACnI,qCAAqC;QACrC,MAAMC,gBAAgBX,mBAAmB,QAAQA,mBAAmB,KAAK,IAAI,KAAK,IAAIA,eAAeW,aAAa;QAClH,IAAI,AAACF,CAAAA,oBAAoBZ,SAASe,OAAO,AAAD,MAAO,QAAQH,sBAAsB,KAAK,IAAI,KAAK,IAAIA,kBAAkBI,QAAQ,CAACF,gBAAgB;YACxI,4FAA4F;YAC5F,MAAMG,OAAOZ,kBAAkBS,eAAe;gBAC5CI,WAAWlB,SAASe,OAAO;YAC7B;YACA,IAAIE,MAAM;gBACRA,KAAKE,KAAK;gBACV;YACF,OAAO;gBACL,MAAMC,OAAOd,kBAAkBQ,kBAAkB,QAAQA,kBAAkB,KAAK,IAAI,KAAK,IAAIA,cAAcO,aAAa,EAAE;oBACxHH,WAAWlB,SAASe,OAAO;gBAC7B;gBACAK,SAAS,QAAQA,SAAS,KAAK,IAAI,KAAK,IAAIA,KAAKD,KAAK;YACxD;QACF;IACF;IACA,MAAMG,uBAAuBC,IAAAA,wCAAuB,EAAC;QACnDC,UAAU;QACVC,MAAM;QACNC,iBAAiB;IACnB;IACA,OAAO;QACL/B,qBAAqBa;QACrBmB,YAAY;YACVC,MAAM;QACR;QACAA,MAAMC,qBAAI,CAACC,MAAM,CAACC,IAAAA,yCAAwB,EAAC,OAAO;YAChD,cAAc;YACdrC,KAAKsC,IAAAA,8BAAa,EAACtC,KAAKM;YACxBiC,MAAM;YACN,GAAGX,oBAAoB;YACvB,GAAG7B,KAAK;QACV,IAAI;YACFyC,aAAa;QACf;IACF;AACF,GACA,6CAA6C"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "useAttachmentListContextValues_unstable", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return useAttachmentListContextValues_unstable;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
function useAttachmentListContextValues_unstable(state) {
|
|
12
|
+
const { onAttachmentDismiss } = state;
|
|
13
|
+
// This context is created with "@fluentui/react-context-selector", there is no sense to memoize it
|
|
14
|
+
const attachmentList = {
|
|
15
|
+
onAttachmentDismiss
|
|
16
|
+
};
|
|
17
|
+
return {
|
|
18
|
+
attachmentList
|
|
19
|
+
};
|
|
20
|
+
} //# sourceMappingURL=useAttachmentListContextValues.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useAttachmentListContextValues.js"],"sourcesContent":["export function useAttachmentListContextValues_unstable(state) {\n const {\n onAttachmentDismiss\n } = state;\n // This context is created with \"@fluentui/react-context-selector\", there is no sense to memoize it\n const attachmentList = {\n onAttachmentDismiss\n };\n return {\n attachmentList\n };\n}\n//# sourceMappingURL=useAttachmentListContextValues.js.map"],"names":["useAttachmentListContextValues_unstable","state","onAttachmentDismiss","attachmentList"],"mappings":";;;;+BAAgBA;;;eAAAA;;;AAAT,SAASA,wCAAwCC,KAAK;IAC3D,MAAM,EACJC,mBAAmB,EACpB,GAAGD;IACJ,mGAAmG;IACnG,MAAME,iBAAiB;QACrBD;IACF;IACA,OAAO;QACLC;IACF;AACF,EACA,0DAA0D"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
attachmentListClassNames: function() {
|
|
13
|
+
return attachmentListClassNames;
|
|
14
|
+
},
|
|
15
|
+
useAttachmentListStyles_unstable: function() {
|
|
16
|
+
return useAttachmentListStyles_unstable;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _reactcomponents = require("@fluentui/react-components");
|
|
20
|
+
const attachmentListClassNames = {
|
|
21
|
+
root: 'fai-AttachmentList'
|
|
22
|
+
};
|
|
23
|
+
const useRootBaseClassName = (0, _reactcomponents.__resetStyles)("r168fwfa", null, [
|
|
24
|
+
".r168fwfa{column-gap:var(--spacingHorizontalSNudge);display:flex;flex-direction:row;flex-shrink:0;flex-wrap:wrap;row-gap:var(--spacingVerticalXS);}"
|
|
25
|
+
]);
|
|
26
|
+
const useAttachmentListStyles_unstable = (state)=>{
|
|
27
|
+
const rootBaseClassName = useRootBaseClassName();
|
|
28
|
+
state.root.className = (0, _reactcomponents.mergeClasses)(attachmentListClassNames.root, rootBaseClassName, state.root.className);
|
|
29
|
+
return state;
|
|
30
|
+
}; //# sourceMappingURL=useAttachmentListStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useAttachmentListStyles.js"],"sourcesContent":["import { __resetStyles, mergeClasses, tokens } from '@fluentui/react-components';\nexport const attachmentListClassNames = {\n root: 'fai-AttachmentList'\n};\nconst useRootBaseClassName = __resetStyles(\"r168fwfa\", null, [\".r168fwfa{column-gap:var(--spacingHorizontalSNudge);display:flex;flex-direction:row;flex-shrink:0;flex-wrap:wrap;row-gap:var(--spacingVerticalXS);}\"]);\n/**\n * Apply styling to the AttachmentList slots based on the state\n */\nexport const useAttachmentListStyles_unstable = state => {\n const rootBaseClassName = useRootBaseClassName();\n state.root.className = mergeClasses(attachmentListClassNames.root, rootBaseClassName, state.root.className);\n return state;\n};\n//# sourceMappingURL=useAttachmentListStyles.js.map"],"names":["attachmentListClassNames","useAttachmentListStyles_unstable","root","useRootBaseClassName","__resetStyles","state","rootBaseClassName","className","mergeClasses"],"mappings":";;;;;;;;;;;IACaA,wBAAwB;eAAxBA;;IAOAC,gCAAgC;eAAhCA;;;iCARuC;AAC7C,MAAMD,2BAA2B;IACtCE,MAAM;AACR;AACA,MAAMC,uBAAuBC,IAAAA,8BAAa,EAAC,YAAY,MAAM;IAAC;CAAsJ;AAI7M,MAAMH,mCAAmCI,CAAAA;IAC9C,MAAMC,oBAAoBH;IAC1BE,MAAMH,IAAI,CAACK,SAAS,GAAGC,IAAAA,6BAAY,EAACR,yBAAyBE,IAAI,EAAEI,mBAAmBD,MAAMH,IAAI,CAACK,SAAS;IAC1G,OAAOF;AACT,GACA,mDAAmD"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "AttachmentOverflowMenu", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return AttachmentOverflowMenu;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _useAttachmentOverflowMenu = require("./useAttachmentOverflowMenu");
|
|
12
|
+
const _renderAttachmentOverflowMenu = require("./renderAttachmentOverflowMenu");
|
|
13
|
+
const _useAttachmentOverflowMenuContextValues = require("./useAttachmentOverflowMenuContextValues");
|
|
14
|
+
const _reactcomponents = require("@fluentui/react-components");
|
|
15
|
+
const AttachmentOverflowMenu = (props)=>{
|
|
16
|
+
const state = (0, _useAttachmentOverflowMenu.useAttachmentOverflowMenu_unstable)(props);
|
|
17
|
+
const menuContextValues = (0, _reactcomponents.useMenuContextValues_unstable)(state);
|
|
18
|
+
const attachmentOverflowMenuContextValues = (0, _useAttachmentOverflowMenuContextValues.useAttachmentOverflowMenuContextValues_unstable)(state);
|
|
19
|
+
return (0, _renderAttachmentOverflowMenu.renderAttachmentOverflowMenu_unstable)(state, {
|
|
20
|
+
menuContextValues,
|
|
21
|
+
attachmentOverflowMenuContextValues
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
AttachmentOverflowMenu.displayName = 'AttachmentOverflowMenu'; //# sourceMappingURL=AttachmentOverflowMenu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["AttachmentOverflowMenu.js"],"sourcesContent":["import { useAttachmentOverflowMenu_unstable } from './useAttachmentOverflowMenu';\nimport { renderAttachmentOverflowMenu_unstable } from './renderAttachmentOverflowMenu';\nimport { useAttachmentOverflowMenuContextValues_unstable } from './useAttachmentOverflowMenuContextValues';\nimport { useMenuContextValues_unstable } from '@fluentui/react-components';\nexport const AttachmentOverflowMenu = props => {\n const state = useAttachmentOverflowMenu_unstable(props);\n const menuContextValues = useMenuContextValues_unstable(state);\n const attachmentOverflowMenuContextValues = useAttachmentOverflowMenuContextValues_unstable(state);\n return renderAttachmentOverflowMenu_unstable(state, {\n menuContextValues,\n attachmentOverflowMenuContextValues\n });\n};\nAttachmentOverflowMenu.displayName = 'AttachmentOverflowMenu';\n//# sourceMappingURL=AttachmentOverflowMenu.js.map"],"names":["AttachmentOverflowMenu","props","state","useAttachmentOverflowMenu_unstable","menuContextValues","useMenuContextValues_unstable","attachmentOverflowMenuContextValues","useAttachmentOverflowMenuContextValues_unstable","renderAttachmentOverflowMenu_unstable","displayName"],"mappings":";;;;+BAIaA;;;eAAAA;;;2CAJsC;8CACG;wDACU;iCAClB;AACvC,MAAMA,yBAAyBC,CAAAA;IACpC,MAAMC,QAAQC,IAAAA,6DAAkC,EAACF;IACjD,MAAMG,oBAAoBC,IAAAA,8CAA6B,EAACH;IACxD,MAAMI,sCAAsCC,IAAAA,uFAA+C,EAACL;IAC5F,OAAOM,IAAAA,mEAAqC,EAACN,OAAO;QAClDE;QACAE;IACF;AACF;AACAN,uBAAuBS,WAAW,GAAG,0BACrC,kDAAkD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["AttachmentOverflowMenu.types.js"],"sourcesContent":["export {};\n//# sourceMappingURL=AttachmentOverflowMenu.types.js.map"],"names":[],"mappings":";;;;CACA,wDAAwD"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
const _export_star = require("@swc/helpers/_/_export_star");
|
|
6
|
+
_export_star._(require("./AttachmentOverflowMenu"), exports);
|
|
7
|
+
_export_star._(require("./AttachmentOverflowMenu.types"), exports);
|
|
8
|
+
_export_star._(require("./renderAttachmentOverflowMenu"), exports);
|
|
9
|
+
_export_star._(require("./useAttachmentOverflowMenu"), exports);
|
|
10
|
+
_export_star._(require("./useAttachmentOverflowMenuContextValues"), exports);
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.js"],"sourcesContent":["export * from './AttachmentOverflowMenu';\nexport * from './AttachmentOverflowMenu.types';\nexport * from './renderAttachmentOverflowMenu';\nexport * from './useAttachmentOverflowMenu';\nexport * from './useAttachmentOverflowMenuContextValues';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA;CACd,iCAAiC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "renderAttachmentOverflowMenu_unstable", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return renderAttachmentOverflowMenu_unstable;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
|
|
12
|
+
const _reactcomponents = require("@fluentui/react-components");
|
|
13
|
+
const _attachmentOverflowMenuContext = require("../../contexts/attachmentOverflowMenuContext");
|
|
14
|
+
const renderAttachmentOverflowMenu_unstable = (state, contextValues)=>{
|
|
15
|
+
const { menuContextValues, attachmentOverflowMenuContextValues } = contextValues;
|
|
16
|
+
(0, _reactcomponents.assertSlots)(state);
|
|
17
|
+
return state.isOverflowing ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_attachmentOverflowMenuContext.AttachmentOverflowMenuProvider, {
|
|
18
|
+
value: attachmentOverflowMenuContextValues.attachmentOverflowMenu,
|
|
19
|
+
children: (0, _reactcomponents.renderMenu_unstable)(state, menuContextValues)
|
|
20
|
+
}) : null;
|
|
21
|
+
}; //# sourceMappingURL=renderAttachmentOverflowMenu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["renderAttachmentOverflowMenu.js"],"sourcesContent":["import { jsx as _jsx } from \"@fluentui/react-jsx-runtime/jsx-runtime\";\nimport { assertSlots, renderMenu_unstable } from '@fluentui/react-components';\nimport { AttachmentOverflowMenuProvider } from '../../contexts/attachmentOverflowMenuContext';\n/**\n * Render the final JSX of AttachmentOverflowMenu\n */\nexport const renderAttachmentOverflowMenu_unstable = (state, contextValues) => {\n const {\n menuContextValues,\n attachmentOverflowMenuContextValues\n } = contextValues;\n assertSlots(state);\n return state.isOverflowing ? /*#__PURE__*/_jsx(AttachmentOverflowMenuProvider, {\n value: attachmentOverflowMenuContextValues.attachmentOverflowMenu,\n children: renderMenu_unstable(state, menuContextValues)\n }) : null;\n};\n//# sourceMappingURL=renderAttachmentOverflowMenu.js.map"],"names":["renderAttachmentOverflowMenu_unstable","state","contextValues","menuContextValues","attachmentOverflowMenuContextValues","assertSlots","isOverflowing","_jsx","AttachmentOverflowMenuProvider","value","attachmentOverflowMenu","children","renderMenu_unstable"],"mappings":";;;;+BAMaA;;;eAAAA;;;4BANe;iCACqB;+CACF;AAIxC,MAAMA,wCAAwC,CAACC,OAAOC;IAC3D,MAAM,EACJC,iBAAiB,EACjBC,mCAAmC,EACpC,GAAGF;IACJG,IAAAA,4BAAW,EAACJ;IACZ,OAAOA,MAAMK,aAAa,GAAG,WAAW,GAAEC,IAAAA,eAAI,EAACC,6DAA8B,EAAE;QAC7EC,OAAOL,oCAAoCM,sBAAsB;QACjEC,UAAUC,IAAAA,oCAAmB,EAACX,OAAOE;IACvC,KAAK;AACP,GACA,wDAAwD"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "useAttachmentOverflowMenu_unstable", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return useAttachmentOverflowMenu_unstable;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _reactcomponents = require("@fluentui/react-components");
|
|
12
|
+
const useAttachmentOverflowMenu_unstable = (props)=>{
|
|
13
|
+
const menuState = (0, _reactcomponents.useMenu_unstable)(props);
|
|
14
|
+
const { isOverflowing, ref: overflowButtonRef, overflowCount } = (0, _reactcomponents.useOverflowMenu)();
|
|
15
|
+
return {
|
|
16
|
+
...menuState,
|
|
17
|
+
isOverflowing,
|
|
18
|
+
overflowButtonRef,
|
|
19
|
+
overflowCount
|
|
20
|
+
};
|
|
21
|
+
}; //# sourceMappingURL=useAttachmentOverflowMenu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useAttachmentOverflowMenu.js"],"sourcesContent":["import { useMenu_unstable, useOverflowMenu } from '@fluentui/react-components';\n/**\n * Create the state required to render AttachmentOverflowMenu.\n *\n * The returned state can be modified with hooks such as useAttachmentOverflowMenuStyles_unstable,\n * before being passed to renderAttachmentOverflowMenu_unstable.\n *\n * @param props - props from this instance of AttachmentOverflowMenu\n */\nexport const useAttachmentOverflowMenu_unstable = props => {\n const menuState = useMenu_unstable(props);\n const {\n isOverflowing,\n ref: overflowButtonRef,\n overflowCount\n } = useOverflowMenu();\n return {\n ...menuState,\n isOverflowing,\n overflowButtonRef,\n overflowCount\n };\n};\n//# sourceMappingURL=useAttachmentOverflowMenu.js.map"],"names":["useAttachmentOverflowMenu_unstable","props","menuState","useMenu_unstable","isOverflowing","ref","overflowButtonRef","overflowCount","useOverflowMenu"],"mappings":";;;;+BASaA;;;eAAAA;;;iCATqC;AAS3C,MAAMA,qCAAqCC,CAAAA;IAChD,MAAMC,YAAYC,IAAAA,iCAAgB,EAACF;IACnC,MAAM,EACJG,aAAa,EACbC,KAAKC,iBAAiB,EACtBC,aAAa,EACd,GAAGC,IAAAA,gCAAe;IACnB,OAAO;QACL,GAAGN,SAAS;QACZE;QACAE;QACAC;IACF;AACF,GACA,qDAAqD"}
|
package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "useAttachmentOverflowMenuContextValues_unstable", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return useAttachmentOverflowMenuContextValues_unstable;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
function useAttachmentOverflowMenuContextValues_unstable(state) {
|
|
12
|
+
const { isOverflowing, overflowButtonRef, overflowCount } = state;
|
|
13
|
+
// This context is created with "@fluentui/react-context-selector", there is no sense to memoize it
|
|
14
|
+
const attachmentOverflowMenu = {
|
|
15
|
+
isOverflowing,
|
|
16
|
+
overflowButtonRef,
|
|
17
|
+
overflowCount
|
|
18
|
+
};
|
|
19
|
+
return {
|
|
20
|
+
attachmentOverflowMenu
|
|
21
|
+
};
|
|
22
|
+
} //# sourceMappingURL=useAttachmentOverflowMenuContextValues.js.map
|
package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useAttachmentOverflowMenuContextValues.js"],"sourcesContent":["export function useAttachmentOverflowMenuContextValues_unstable(state) {\n const {\n isOverflowing,\n overflowButtonRef,\n overflowCount\n } = state;\n // This context is created with \"@fluentui/react-context-selector\", there is no sense to memoize it\n const attachmentOverflowMenu = {\n isOverflowing,\n overflowButtonRef,\n overflowCount\n };\n return {\n attachmentOverflowMenu\n };\n}\n//# sourceMappingURL=useAttachmentOverflowMenuContextValues.js.map"],"names":["useAttachmentOverflowMenuContextValues_unstable","state","isOverflowing","overflowButtonRef","overflowCount","attachmentOverflowMenu"],"mappings":";;;;+BAAgBA;;;eAAAA;;;AAAT,SAASA,gDAAgDC,KAAK;IACnE,MAAM,EACJC,aAAa,EACbC,iBAAiB,EACjBC,aAAa,EACd,GAAGH;IACJ,mGAAmG;IACnG,MAAMI,yBAAyB;QAC7BH;QACAC;QACAC;IACF;IACA,OAAO;QACLC;IACF;AACF,EACA,kEAAkE"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "AttachmentOverflowMenuButton", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return AttachmentOverflowMenuButton;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
|
+
const _useAttachmentOverflowMenuButton = require("./useAttachmentOverflowMenuButton");
|
|
14
|
+
const _renderAttachmentOverflowMenuButton = require("./renderAttachmentOverflowMenuButton");
|
|
15
|
+
const _useAttachmentOverflowMenuButtonStyles = require("./useAttachmentOverflowMenuButtonStyles");
|
|
16
|
+
const AttachmentOverflowMenuButton = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
17
|
+
const state = (0, _useAttachmentOverflowMenuButton.useAttachmentOverflowMenuButton_unstable)(props, ref);
|
|
18
|
+
(0, _useAttachmentOverflowMenuButtonStyles.useAttachmentOverflowMenuButtonStyles_unstable)(state);
|
|
19
|
+
return (0, _renderAttachmentOverflowMenuButton.renderAttachmentOverflowMenuButton_unstable)(state);
|
|
20
|
+
});
|
|
21
|
+
AttachmentOverflowMenuButton.displayName = 'AttachmentOverflowMenuButton'; //# sourceMappingURL=AttachmentOverflowMenuButton.js.map
|
package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["AttachmentOverflowMenuButton.js"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentOverflowMenuButton_unstable } from './useAttachmentOverflowMenuButton';\nimport { renderAttachmentOverflowMenuButton_unstable } from './renderAttachmentOverflowMenuButton';\nimport { useAttachmentOverflowMenuButtonStyles_unstable } from './useAttachmentOverflowMenuButtonStyles';\nexport const AttachmentOverflowMenuButton = /*#__PURE__*/React.forwardRef((props, ref) => {\n const state = useAttachmentOverflowMenuButton_unstable(props, ref);\n useAttachmentOverflowMenuButtonStyles_unstable(state);\n return renderAttachmentOverflowMenuButton_unstable(state);\n});\nAttachmentOverflowMenuButton.displayName = 'AttachmentOverflowMenuButton';\n//# sourceMappingURL=AttachmentOverflowMenuButton.js.map"],"names":["AttachmentOverflowMenuButton","React","forwardRef","props","ref","state","useAttachmentOverflowMenuButton_unstable","useAttachmentOverflowMenuButtonStyles_unstable","renderAttachmentOverflowMenuButton_unstable","displayName"],"mappings":";;;;+BAIaA;;;eAAAA;;;;iEAJU;iDACkC;oDACG;uDACG;AACxD,MAAMA,+BAA+B,WAAW,GAAEC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAChF,MAAMC,QAAQC,IAAAA,yEAAwC,EAACH,OAAOC;IAC9DG,IAAAA,qFAA8C,EAACF;IAC/C,OAAOG,IAAAA,+EAA2C,EAACH;AACrD;AACAL,6BAA6BS,WAAW,GAAG,gCAC3C,wDAAwD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["AttachmentOverflowMenuButton.types.js"],"sourcesContent":["export {};\n//# sourceMappingURL=AttachmentOverflowMenuButton.types.js.map"],"names":[],"mappings":";;;;CACA,8DAA8D"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
const _export_star = require("@swc/helpers/_/_export_star");
|
|
6
|
+
_export_star._(require("./AttachmentOverflowMenuButton"), exports);
|
|
7
|
+
_export_star._(require("./AttachmentOverflowMenuButton.types"), exports);
|
|
8
|
+
_export_star._(require("./renderAttachmentOverflowMenuButton"), exports);
|
|
9
|
+
_export_star._(require("./useAttachmentOverflowMenuButton"), exports);
|
|
10
|
+
_export_star._(require("./useAttachmentOverflowMenuButtonStyles"), exports);
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.js"],"sourcesContent":["export * from './AttachmentOverflowMenuButton';\nexport * from './AttachmentOverflowMenuButton.types';\nexport * from './renderAttachmentOverflowMenuButton';\nexport * from './useAttachmentOverflowMenuButton';\nexport * from './useAttachmentOverflowMenuButtonStyles';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA;CACd,iCAAiC"}
|
package/lib-commonjs/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "renderAttachmentOverflowMenuButton_unstable", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return renderAttachmentOverflowMenuButton_unstable;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
|
|
12
|
+
const _reactcomponents = require("@fluentui/react-components");
|
|
13
|
+
const renderAttachmentOverflowMenuButton_unstable = (state)=>{
|
|
14
|
+
(0, _reactcomponents.assertSlots)(state);
|
|
15
|
+
return state.isOverflowing ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_reactcomponents.MenuTrigger, {
|
|
16
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(state.root, {
|
|
17
|
+
children: [
|
|
18
|
+
" +",
|
|
19
|
+
state.overflowCount,
|
|
20
|
+
" "
|
|
21
|
+
]
|
|
22
|
+
})
|
|
23
|
+
}) : null;
|
|
24
|
+
}; //# sourceMappingURL=renderAttachmentOverflowMenuButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["renderAttachmentOverflowMenuButton.js"],"sourcesContent":["import { jsx as _jsx, jsxs as _jsxs } from \"@fluentui/react-jsx-runtime/jsx-runtime\";\nimport { MenuTrigger, assertSlots } from '@fluentui/react-components';\n/**\n * Render the final JSX of AttachmentOverflowMenuButton\n */\nexport const renderAttachmentOverflowMenuButton_unstable = state => {\n assertSlots(state);\n return state.isOverflowing ? /*#__PURE__*/_jsx(MenuTrigger, {\n children: /*#__PURE__*/_jsxs(state.root, {\n children: [\" +\", state.overflowCount, \" \"]\n })\n }) : null;\n};\n//# sourceMappingURL=renderAttachmentOverflowMenuButton.js.map"],"names":["renderAttachmentOverflowMenuButton_unstable","state","assertSlots","isOverflowing","_jsx","MenuTrigger","children","_jsxs","root","overflowCount"],"mappings":";;;;+BAKaA;;;eAAAA;;;4BAL8B;iCACF;AAIlC,MAAMA,8CAA8CC,CAAAA;IACzDC,IAAAA,4BAAW,EAACD;IACZ,OAAOA,MAAME,aAAa,GAAG,WAAW,GAAEC,IAAAA,eAAI,EAACC,4BAAW,EAAE;QAC1DC,UAAU,WAAW,GAAEC,IAAAA,gBAAK,EAACN,MAAMO,IAAI,EAAE;YACvCF,UAAU;gBAAC;gBAAML,MAAMQ,aAAa;gBAAE;aAAI;QAC5C;IACF,KAAK;AACP,GACA,8DAA8D"}
|
package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "useAttachmentOverflowMenuButton_unstable", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return useAttachmentOverflowMenuButton_unstable;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _reactcomponents = require("@fluentui/react-components");
|
|
12
|
+
const _attachmentOverflowMenuContext = require("../../contexts/attachmentOverflowMenuContext");
|
|
13
|
+
const useAttachmentOverflowMenuButton_unstable = (props, ref)=>{
|
|
14
|
+
const { isOverflowing, overflowCount, overflowButtonRef } = (0, _attachmentOverflowMenuContext.useAttachmentOverflowMenuContext_unstable)((context)=>context);
|
|
15
|
+
return {
|
|
16
|
+
components: {
|
|
17
|
+
root: 'button'
|
|
18
|
+
},
|
|
19
|
+
root: _reactcomponents.slot.always((0, _reactcomponents.getIntrinsicElementProps)('button', {
|
|
20
|
+
ref: (0, _reactcomponents.useMergedRefs)(ref, overflowButtonRef),
|
|
21
|
+
...props
|
|
22
|
+
}), {
|
|
23
|
+
elementType: 'button'
|
|
24
|
+
}),
|
|
25
|
+
isOverflowing,
|
|
26
|
+
overflowCount
|
|
27
|
+
};
|
|
28
|
+
}; //# sourceMappingURL=useAttachmentOverflowMenuButton.js.map
|
package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useAttachmentOverflowMenuButton.js"],"sourcesContent":["import { getIntrinsicElementProps, slot, useMergedRefs } from '@fluentui/react-components';\nimport { useAttachmentOverflowMenuContext_unstable } from '../../contexts/attachmentOverflowMenuContext';\n/**\n * Create the state required to render AttachmentOverflowMenuButton.\n *\n * The returned state can be modified with hooks such as useAttachmentOverflowMenuButtonStyles_unstable,\n * before being passed to renderAttachmentOverflowMenuButton_unstable.\n *\n * @param props - props from this instance of AttachmentOverflowMenuButton\n * @param ref - reference to root HTMLElement of AttachmentOverflowMenuButton\n */\nexport const useAttachmentOverflowMenuButton_unstable = (props, ref) => {\n const {\n isOverflowing,\n overflowCount,\n overflowButtonRef\n } = useAttachmentOverflowMenuContext_unstable(context => context);\n return {\n components: {\n root: 'button'\n },\n root: slot.always(getIntrinsicElementProps('button', {\n ref: useMergedRefs(ref, overflowButtonRef),\n ...props\n }), {\n elementType: 'button'\n }),\n isOverflowing,\n overflowCount\n };\n};\n//# sourceMappingURL=useAttachmentOverflowMenuButton.js.map"],"names":["useAttachmentOverflowMenuButton_unstable","props","ref","isOverflowing","overflowCount","overflowButtonRef","useAttachmentOverflowMenuContext_unstable","context","components","root","slot","always","getIntrinsicElementProps","useMergedRefs","elementType"],"mappings":";;;;+BAWaA;;;eAAAA;;;iCAXiD;+CACJ;AAUnD,MAAMA,2CAA2C,CAACC,OAAOC;IAC9D,MAAM,EACJC,aAAa,EACbC,aAAa,EACbC,iBAAiB,EAClB,GAAGC,IAAAA,wEAAyC,EAACC,CAAAA,UAAWA;IACzD,OAAO;QACLC,YAAY;YACVC,MAAM;QACR;QACAA,MAAMC,qBAAI,CAACC,MAAM,CAACC,IAAAA,yCAAwB,EAAC,UAAU;YACnDV,KAAKW,IAAAA,8BAAa,EAACX,KAAKG;YACxB,GAAGJ,KAAK;QACV,IAAI;YACFa,aAAa;QACf;QACAX;QACAC;IACF;AACF,GACA,2DAA2D"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
attachmentOverflowMenuButtonClassNames: function() {
|
|
13
|
+
return attachmentOverflowMenuButtonClassNames;
|
|
14
|
+
},
|
|
15
|
+
useAttachmentOverflowMenuButtonStyles_unstable: function() {
|
|
16
|
+
return useAttachmentOverflowMenuButtonStyles_unstable;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _reactcomponents = require("@fluentui/react-components");
|
|
20
|
+
const attachmentOverflowMenuButtonClassNames = {
|
|
21
|
+
root: 'fai-AttachmentOverflowMenuButton'
|
|
22
|
+
};
|
|
23
|
+
const useRootBaseClassName = (0, _reactcomponents.__resetStyles)("r1hzuvbo", null, {
|
|
24
|
+
r: [
|
|
25
|
+
".r1hzuvbo{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(--spacingVerticalS);vertical-align:middle;}",
|
|
26
|
+
".r1hzuvbo:hover{cursor:pointer;background-color:var(--colorNeutralBackground3Hover);color:var(--colorNeutralForeground2Hover);}",
|
|
27
|
+
".r1hzuvbo:active{background-color:var(--colorNeutralBackground3Pressed);color:var(--colorNeutralForeground2Pressed);}"
|
|
28
|
+
],
|
|
29
|
+
s: [
|
|
30
|
+
"@media (forced-colors: active){.r1hzuvbo:hover{background-color:HighlightText;}.r1hzuvbo:active{background-color:HighlightText;}}"
|
|
31
|
+
]
|
|
32
|
+
});
|
|
33
|
+
const useAttachmentOverflowMenuButtonStyles_unstable = (state)=>{
|
|
34
|
+
const rootBaseClassName = useRootBaseClassName();
|
|
35
|
+
state.root.className = (0, _reactcomponents.mergeClasses)(attachmentOverflowMenuButtonClassNames.root, rootBaseClassName, state.root.className);
|
|
36
|
+
return state;
|
|
37
|
+
}; //# sourceMappingURL=useAttachmentOverflowMenuButtonStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useAttachmentOverflowMenuButtonStyles.js"],"sourcesContent":["import { __resetStyles, mergeClasses, tokens, typographyStyles } from '@fluentui/react-components';\nexport const attachmentOverflowMenuButtonClassNames = {\n root: 'fai-AttachmentOverflowMenuButton'\n};\nconst useRootBaseClassName = __resetStyles(\"r1hzuvbo\", null, {\n r: [\".r1hzuvbo{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(--spacingVerticalS);vertical-align:middle;}\", \".r1hzuvbo:hover{cursor:pointer;background-color:var(--colorNeutralBackground3Hover);color:var(--colorNeutralForeground2Hover);}\", \".r1hzuvbo:active{background-color:var(--colorNeutralBackground3Pressed);color:var(--colorNeutralForeground2Pressed);}\"],\n s: [\"@media (forced-colors: active){.r1hzuvbo:hover{background-color:HighlightText;}.r1hzuvbo:active{background-color:HighlightText;}}\"]\n});\n/**\n * Apply styling to the AttachmentOverflowMenuButton slots based on the state\n */\nexport const useAttachmentOverflowMenuButtonStyles_unstable = state => {\n const rootBaseClassName = useRootBaseClassName();\n state.root.className = mergeClasses(attachmentOverflowMenuButtonClassNames.root, rootBaseClassName, state.root.className);\n return state;\n};\n//# sourceMappingURL=useAttachmentOverflowMenuButtonStyles.js.map"],"names":["attachmentOverflowMenuButtonClassNames","useAttachmentOverflowMenuButtonStyles_unstable","root","useRootBaseClassName","__resetStyles","r","s","state","rootBaseClassName","className","mergeClasses"],"mappings":";;;;;;;;;;;IACaA,sCAAsC;eAAtCA;;IAUAC,8CAA8C;eAA9CA;;;iCAXyD;AAC/D,MAAMD,yCAAyC;IACpDE,MAAM;AACR;AACA,MAAMC,uBAAuBC,IAAAA,8BAAa,EAAC,YAAY,MAAM;IAC3DC,GAAG;QAAC;QAAugB;QAAmI;KAAwH;IACtwBC,GAAG;QAAC;KAAoI;AAC1I;AAIO,MAAML,iDAAiDM,CAAAA;IAC5D,MAAMC,oBAAoBL;IAC1BI,MAAML,IAAI,CAACO,SAAS,GAAGC,IAAAA,6BAAY,EAACV,uCAAuCE,IAAI,EAAEM,mBAAmBD,MAAML,IAAI,CAACO,SAAS;IACxH,OAAOF;AACT,GACA,iEAAiE"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "AttachmentOverflowMenuItem", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return AttachmentOverflowMenuItem;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
|
+
const _useAttachmentOverflowMenuItem = require("./useAttachmentOverflowMenuItem");
|
|
14
|
+
const _renderAttachmentOverflowMenuItem = require("./renderAttachmentOverflowMenuItem");
|
|
15
|
+
const _useAttachmentOverflowMenuItemStyles = require("./useAttachmentOverflowMenuItemStyles");
|
|
16
|
+
const AttachmentOverflowMenuItem = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
17
|
+
const state = (0, _useAttachmentOverflowMenuItem.useAttachmentOverflowMenuItem_unstable)(props, ref);
|
|
18
|
+
(0, _useAttachmentOverflowMenuItemStyles.useAttachmentOverflowMenuItemStyles_unstable)(state);
|
|
19
|
+
return (0, _renderAttachmentOverflowMenuItem.renderAttachmentOverflowMenuItem_unstable)(state);
|
|
20
|
+
});
|
|
21
|
+
AttachmentOverflowMenuItem.displayName = 'AttachmentOverflowMenuItem'; //# sourceMappingURL=AttachmentOverflowMenuItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["AttachmentOverflowMenuItem.js"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentOverflowMenuItem_unstable } from './useAttachmentOverflowMenuItem';\nimport { renderAttachmentOverflowMenuItem_unstable } from './renderAttachmentOverflowMenuItem';\nimport { useAttachmentOverflowMenuItemStyles_unstable } from './useAttachmentOverflowMenuItemStyles';\nexport const AttachmentOverflowMenuItem = /*#__PURE__*/React.forwardRef((props, ref) => {\n const state = useAttachmentOverflowMenuItem_unstable(props, ref);\n useAttachmentOverflowMenuItemStyles_unstable(state);\n return renderAttachmentOverflowMenuItem_unstable(state);\n});\nAttachmentOverflowMenuItem.displayName = 'AttachmentOverflowMenuItem';\n//# sourceMappingURL=AttachmentOverflowMenuItem.js.map"],"names":["AttachmentOverflowMenuItem","React","forwardRef","props","ref","state","useAttachmentOverflowMenuItem_unstable","useAttachmentOverflowMenuItemStyles_unstable","renderAttachmentOverflowMenuItem_unstable","displayName"],"mappings":";;;;+BAIaA;;;eAAAA;;;;iEAJU;+CACgC;kDACG;qDACG;AACtD,MAAMA,6BAA6B,WAAW,GAAEC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC9E,MAAMC,QAAQC,IAAAA,qEAAsC,EAACH,OAAOC;IAC5DG,IAAAA,iFAA4C,EAACF;IAC7C,OAAOG,IAAAA,2EAAyC,EAACH;AACnD;AACAL,2BAA2BS,WAAW,GAAG,8BACzC,sDAAsD"}
|
package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["AttachmentOverflowMenuItem.types.js"],"sourcesContent":["export {};\n//# sourceMappingURL=AttachmentOverflowMenuItem.types.js.map"],"names":[],"mappings":";;;;CACA,4DAA4D"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
const _export_star = require("@swc/helpers/_/_export_star");
|
|
6
|
+
_export_star._(require("./AttachmentOverflowMenuItem"), exports);
|
|
7
|
+
_export_star._(require("./AttachmentOverflowMenuItem.types"), exports);
|
|
8
|
+
_export_star._(require("./renderAttachmentOverflowMenuItem"), exports);
|
|
9
|
+
_export_star._(require("./useAttachmentOverflowMenuItem"), exports);
|
|
10
|
+
_export_star._(require("./useAttachmentOverflowMenuItemStyles"), exports);
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.js"],"sourcesContent":["export * from './AttachmentOverflowMenuItem';\nexport * from './AttachmentOverflowMenuItem.types';\nexport * from './renderAttachmentOverflowMenuItem';\nexport * from './useAttachmentOverflowMenuItem';\nexport * from './useAttachmentOverflowMenuItemStyles';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA;CACd,iCAAiC"}
|
package/lib-commonjs/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "renderAttachmentOverflowMenuItem_unstable", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return renderAttachmentOverflowMenuItem_unstable;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
|
|
12
|
+
const _reactcomponents = require("@fluentui/react-components");
|
|
13
|
+
const renderAttachmentOverflowMenuItem_unstable = (state)=>{
|
|
14
|
+
(0, _reactcomponents.assertSlots)(state);
|
|
15
|
+
return !state.isVisible ? /*#__PURE__*/ (0, _jsxruntime.jsx)(state.root, {}) : null;
|
|
16
|
+
}; //# sourceMappingURL=renderAttachmentOverflowMenuItem.js.map
|
package/lib-commonjs/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["renderAttachmentOverflowMenuItem.js"],"sourcesContent":["import { jsx as _jsx } from \"@fluentui/react-jsx-runtime/jsx-runtime\";\nimport { assertSlots } from '@fluentui/react-components';\n/**\n * Render the final JSX of AttachmentOverflowMenuItem\n */\nexport const renderAttachmentOverflowMenuItem_unstable = state => {\n assertSlots(state);\n return !state.isVisible ? /*#__PURE__*/_jsx(state.root, {}) : null;\n};\n//# sourceMappingURL=renderAttachmentOverflowMenuItem.js.map"],"names":["renderAttachmentOverflowMenuItem_unstable","state","assertSlots","isVisible","_jsx","root"],"mappings":";;;;+BAKaA;;;eAAAA;;;4BALe;iCACA;AAIrB,MAAMA,4CAA4CC,CAAAA;IACvDC,IAAAA,4BAAW,EAACD;IACZ,OAAO,CAACA,MAAME,SAAS,GAAG,WAAW,GAAEC,IAAAA,eAAI,EAACH,MAAMI,IAAI,EAAE,CAAC,KAAK;AAChE,GACA,4DAA4D"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "useAttachmentOverflowMenuItem_unstable", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return useAttachmentOverflowMenuItem_unstable;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
|
+
const _reactcomponents = require("@fluentui/react-components");
|
|
14
|
+
const _reacticons = require("@fluentui/react-icons");
|
|
15
|
+
const _attachmentListContext = require("../../contexts/attachmentListContext");
|
|
16
|
+
const useAttachmentOverflowMenuItem_unstable = (props, ref)=>{
|
|
17
|
+
const { id, media } = props;
|
|
18
|
+
const DismissIcon = (0, _reacticons.bundleIcon)(_reacticons.Dismiss20Filled, _reacticons.Dismiss20Regular);
|
|
19
|
+
const isVisible = (0, _reactcomponents.useIsOverflowItemVisible)(id);
|
|
20
|
+
const onAttachmentDismiss = (0, _attachmentListContext.useAttachmentListContext_unstable)((context)=>context.onAttachmentDismiss);
|
|
21
|
+
const root = _reactcomponents.slot.always({
|
|
22
|
+
ref,
|
|
23
|
+
icon: media,
|
|
24
|
+
secondaryContent: /*#__PURE__*/ _react.createElement(DismissIcon, null),
|
|
25
|
+
...props
|
|
26
|
+
}, {
|
|
27
|
+
elementType: _reactcomponents.MenuItem
|
|
28
|
+
});
|
|
29
|
+
root.onClick = (0, _reactcomponents.mergeCallbacks)(root.onClick, (ev)=>onAttachmentDismiss === null || onAttachmentDismiss === void 0 ? void 0 : onAttachmentDismiss(ev, {
|
|
30
|
+
id
|
|
31
|
+
}));
|
|
32
|
+
return {
|
|
33
|
+
components: {
|
|
34
|
+
root: _reactcomponents.MenuItem
|
|
35
|
+
},
|
|
36
|
+
root,
|
|
37
|
+
isVisible
|
|
38
|
+
};
|
|
39
|
+
}; //# sourceMappingURL=useAttachmentOverflowMenuItem.js.map
|
package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useAttachmentOverflowMenuItem.js"],"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';\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 = (props, ref) => {\n const {\n id,\n media\n } = props;\n const DismissIcon = bundleIcon(Dismiss20Filled, Dismiss20Regular);\n const isVisible = useIsOverflowItemVisible(id);\n const onAttachmentDismiss = useAttachmentListContext_unstable(context => context.onAttachmentDismiss);\n const root = slot.always({\n ref,\n icon: media,\n secondaryContent: /*#__PURE__*/React.createElement(DismissIcon, null),\n ...props\n }, {\n elementType: MenuItem\n });\n root.onClick = mergeCallbacks(root.onClick, ev => onAttachmentDismiss === null || onAttachmentDismiss === void 0 ? void 0 : onAttachmentDismiss(ev, {\n id\n }));\n return {\n components: {\n root: MenuItem\n },\n root,\n isVisible\n };\n};\n//# sourceMappingURL=useAttachmentOverflowMenuItem.js.map"],"names":["useAttachmentOverflowMenuItem_unstable","props","ref","id","media","DismissIcon","bundleIcon","Dismiss20Filled","Dismiss20Regular","isVisible","useIsOverflowItemVisible","onAttachmentDismiss","useAttachmentListContext_unstable","context","root","slot","always","icon","secondaryContent","React","createElement","elementType","MenuItem","onClick","mergeCallbacks","ev","components"],"mappings":";;;;+BAaaA;;;eAAAA;;;;iEAbU;iCACkD;4BACX;uCACZ;AAU3C,MAAMA,yCAAyC,CAACC,OAAOC;IAC5D,MAAM,EACJC,EAAE,EACFC,KAAK,EACN,GAAGH;IACJ,MAAMI,cAAcC,IAAAA,sBAAU,EAACC,2BAAe,EAAEC,4BAAgB;IAChE,MAAMC,YAAYC,IAAAA,yCAAwB,EAACP;IAC3C,MAAMQ,sBAAsBC,IAAAA,wDAAiC,EAACC,CAAAA,UAAWA,QAAQF,mBAAmB;IACpG,MAAMG,OAAOC,qBAAI,CAACC,MAAM,CAAC;QACvBd;QACAe,MAAMb;QACNc,kBAAkB,WAAW,GAAEC,OAAMC,aAAa,CAACf,aAAa;QAChE,GAAGJ,KAAK;IACV,GAAG;QACDoB,aAAaC,yBAAQ;IACvB;IACAR,KAAKS,OAAO,GAAGC,IAAAA,+BAAc,EAACV,KAAKS,OAAO,EAAEE,CAAAA,KAAMd,wBAAwB,QAAQA,wBAAwB,KAAK,IAAI,KAAK,IAAIA,oBAAoBc,IAAI;YAClJtB;QACF;IACA,OAAO;QACLuB,YAAY;YACVZ,MAAMQ,yBAAQ;QAChB;QACAR;QACAL;IACF;AACF,GACA,yDAAyD"}
|
package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
attachmentOverflowMenuItemClassNames: function() {
|
|
13
|
+
return attachmentOverflowMenuItemClassNames;
|
|
14
|
+
},
|
|
15
|
+
useAttachmentOverflowMenuItemStyles_unstable: function() {
|
|
16
|
+
return useAttachmentOverflowMenuItemStyles_unstable;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _reactcomponents = require("@fluentui/react-components");
|
|
20
|
+
const attachmentOverflowMenuItemClassNames = {
|
|
21
|
+
root: 'fai-AttachmentOverflowMenuItem'
|
|
22
|
+
};
|
|
23
|
+
const useRootBaseClassName = (0, _reactcomponents.__resetStyles)("r0", null, []);
|
|
24
|
+
const useAttachmentOverflowMenuItemStyles_unstable = (state)=>{
|
|
25
|
+
const rootBaseClassName = useRootBaseClassName();
|
|
26
|
+
state.root.className = (0, _reactcomponents.mergeClasses)(attachmentOverflowMenuItemClassNames.root, rootBaseClassName, state.root.className);
|
|
27
|
+
return state;
|
|
28
|
+
}; //# sourceMappingURL=useAttachmentOverflowMenuItemStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useAttachmentOverflowMenuItemStyles.js"],"sourcesContent":["import { __resetStyles, mergeClasses } from '@fluentui/react-components';\nexport const attachmentOverflowMenuItemClassNames = {\n root: 'fai-AttachmentOverflowMenuItem'\n};\nconst useRootBaseClassName = __resetStyles(\"r0\", null, []);\n/**\n * Apply styling to the AttachmentList slots based on the state\n */\nexport const useAttachmentOverflowMenuItemStyles_unstable = state => {\n const rootBaseClassName = useRootBaseClassName();\n state.root.className = mergeClasses(attachmentOverflowMenuItemClassNames.root, rootBaseClassName, state.root.className);\n return state;\n};\n//# sourceMappingURL=useAttachmentOverflowMenuItemStyles.js.map"],"names":["attachmentOverflowMenuItemClassNames","useAttachmentOverflowMenuItemStyles_unstable","root","useRootBaseClassName","__resetStyles","state","rootBaseClassName","className","mergeClasses"],"mappings":";;;;;;;;;;;IACaA,oCAAoC;eAApCA;;IAOAC,4CAA4C;eAA5CA;;;iCAR+B;AACrC,MAAMD,uCAAuC;IAClDE,MAAM;AACR;AACA,MAAMC,uBAAuBC,IAAAA,8BAAa,EAAC,MAAM,MAAM,EAAE;AAIlD,MAAMH,+CAA+CI,CAAAA;IAC1D,MAAMC,oBAAoBH;IAC1BE,MAAMH,IAAI,CAACK,SAAS,GAAGC,IAAAA,6BAAY,EAACR,qCAAqCE,IAAI,EAAEI,mBAAmBD,MAAMH,IAAI,CAACK,SAAS;IACtH,OAAOF;AACT,GACA,+DAA+D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AttachmentTag.js"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentTag_unstable } from './useAttachmentTag';\nimport { renderAttachmentTag_unstable } from './renderAttachmentTag';\nimport { useAttachmentTagStyles_unstable } from './useAttachmentTagStyles';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n
|
|
1
|
+
{"version":3,"sources":["AttachmentTag.js"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentTag_unstable } from './useAttachmentTag';\nimport { renderAttachmentTag_unstable } from './renderAttachmentTag';\nimport { useAttachmentTagStyles_unstable } from './useAttachmentTagStyles';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n/**\n * @deprecated use new Attachment component exported from @fluentui-copilot/react-attachments package instead.\n * Deprecated on 4/9/2024. Will be removed in the next minor release (0.15.0).\n */\nexport const AttachmentTag = /*#__PURE__*/React.forwardRef((props, ref) => {\n const state = useAttachmentTag_unstable(props, ref);\n useAttachmentTagStyles_unstable(state);\n useCustomStyleHook('useAttachmentTagStyles')(state);\n return renderAttachmentTag_unstable(state);\n});\nAttachmentTag.displayName = 'AttachmentTag';\n//# sourceMappingURL=AttachmentTag.js.map"],"names":["AttachmentTag","React","forwardRef","props","ref","state","useAttachmentTag_unstable","useAttachmentTagStyles_unstable","useCustomStyleHook","renderAttachmentTag_unstable","displayName"],"mappings":";;;;+BASaA;;;eAAAA;;;;iEATU;kCACmB;qCACG;wCACG;+BACb;AAK5B,MAAMA,gBAAgB,WAAW,GAAEC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACjE,MAAMC,QAAQC,IAAAA,2CAAyB,EAACH,OAAOC;IAC/CG,IAAAA,uDAA+B,EAACF;IAChCG,IAAAA,iCAAkB,EAAC,0BAA0BH;IAC7C,OAAOI,IAAAA,iDAA4B,EAACJ;AACtC;AACAL,cAAcU,WAAW,GAAG,iBAC5B,yCAAyC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AttachmentTagItem.js"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentTagItem_unstable } from './useAttachmentTagItem';\nimport { renderAttachmentTagItem_unstable } from './renderAttachmentTagItem';\nimport { useAttachmentTagItemStyles_unstable } from './useAttachmentTagItemStyles';\nexport const AttachmentTagItem = /*#__PURE__*/React.forwardRef((props, ref) => {\n const state = useAttachmentTagItem_unstable(props, ref);\n useAttachmentTagItemStyles_unstable(state);\n return renderAttachmentTagItem_unstable(state);\n});\nAttachmentTagItem.displayName = 'AttachmentTagItem';\n//# sourceMappingURL=AttachmentTagItem.js.map"],"names":["AttachmentTagItem","React","forwardRef","props","ref","state","useAttachmentTagItem_unstable","useAttachmentTagItemStyles_unstable","renderAttachmentTagItem_unstable","displayName"],"mappings":";;;;+
|
|
1
|
+
{"version":3,"sources":["AttachmentTagItem.js"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentTagItem_unstable } from './useAttachmentTagItem';\nimport { renderAttachmentTagItem_unstable } from './renderAttachmentTagItem';\nimport { useAttachmentTagItemStyles_unstable } from './useAttachmentTagItemStyles';\n/**\n * @deprecated use new AttachmentOverflowMenuItem component exported from @fluentui-copilot/react-attachments package instead.\n * Deprecated on 4/9/2024. Will be removed in the next minor release (0.15.0).\n */\nexport const AttachmentTagItem = /*#__PURE__*/React.forwardRef((props, ref) => {\n const state = useAttachmentTagItem_unstable(props, ref);\n useAttachmentTagItemStyles_unstable(state);\n return renderAttachmentTagItem_unstable(state);\n});\nAttachmentTagItem.displayName = 'AttachmentTagItem';\n//# sourceMappingURL=AttachmentTagItem.js.map"],"names":["AttachmentTagItem","React","forwardRef","props","ref","state","useAttachmentTagItem_unstable","useAttachmentTagItemStyles_unstable","renderAttachmentTagItem_unstable","displayName"],"mappings":";;;;+BAQaA;;;eAAAA;;;;iEARU;sCACuB;yCACG;4CACG;AAK7C,MAAMA,oBAAoB,WAAW,GAAEC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACrE,MAAMC,QAAQC,IAAAA,mDAA6B,EAACH,OAAOC;IACnDG,IAAAA,+DAAmC,EAACF;IACpC,OAAOG,IAAAA,yDAAgC,EAACH;AAC1C;AACAL,kBAAkBS,WAAW,GAAG,qBAChC,6CAA6C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AttachmentTagList.js"],"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 { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n
|
|
1
|
+
{"version":3,"sources":["AttachmentTagList.js"],"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 { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n/**\n * @deprecated use new AttachmentList component exported from @fluentui-copilot/react-attachments package instead.\n * Deprecated on 4/9/2024. Will be removed in the next minor release (0.15.0).\n */\nexport const AttachmentTagList = /*#__PURE__*/React.forwardRef((props, ref) => {\n const state = useAttachmentTagList_unstable(props, ref);\n const contextValues = useAttachmentTagListContextValues_unstable(state);\n useAttachmentTagListStyles_unstable(state);\n useCustomStyleHook('useAttachmentTagListStyles')(state);\n return renderAttachmentTagList_unstable(state, contextValues);\n});\nAttachmentTagList.displayName = 'AttachmentTagList';\n//# sourceMappingURL=AttachmentTagList.js.map"],"names":["AttachmentTagList","React","forwardRef","props","ref","state","useAttachmentTagList_unstable","contextValues","useAttachmentTagListContextValues_unstable","useAttachmentTagListStyles_unstable","useCustomStyleHook","renderAttachmentTagList_unstable","displayName"],"mappings":";;;;+BAUaA;;;eAAAA;;;;iEAVU;yCAC0B;sCACH;mDACa;4CACP;+BACjB;AAK5B,MAAMA,oBAAoB,WAAW,GAAEC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACrE,MAAMC,QAAQC,IAAAA,mDAA6B,EAACH,OAAOC;IACnD,MAAMG,gBAAgBC,IAAAA,6EAA0C,EAACH;IACjEI,IAAAA,+DAAmC,EAACJ;IACpCK,IAAAA,iCAAkB,EAAC,8BAA8BL;IACjD,OAAOM,IAAAA,yDAAgC,EAACN,OAAOE;AACjD;AACAP,kBAAkBY,WAAW,GAAG,qBAChC,6CAA6C"}
|
|
@@ -20,7 +20,7 @@ const useAttachmentTagList_unstable = (props, ref)=>{
|
|
|
20
20
|
components: {
|
|
21
21
|
root: 'div'
|
|
22
22
|
},
|
|
23
|
-
root: _reactcomponents.slot.always((0, _reactcomponents.
|
|
23
|
+
root: _reactcomponents.slot.always((0, _reactcomponents.getIntrinsicElementProps)('div', {
|
|
24
24
|
'aria-label': 'Attachments',
|
|
25
25
|
ref,
|
|
26
26
|
role: 'menu',
|