@fluentui-copilot/react-attachments 0.8.3 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +71 -1
- package/CHANGELOG.md +28 -2
- package/dist/index.d.ts +154 -5
- package/lib/Attachment.js.map +1 -1
- package/lib/AttachmentList.js.map +1 -1
- 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/AttachmentTag.js.map +1 -1
- package/lib/AttachmentTagItem.js.map +1 -1
- package/lib/AttachmentTagList.js.map +1 -1
- package/lib/components/Attachment/Attachment.js.map +1 -1
- package/lib/components/Attachment/Attachment.types.js +3 -1
- package/lib/components/Attachment/Attachment.types.js.map +1 -1
- package/lib/components/Attachment/index.js.map +1 -1
- package/lib/components/Attachment/renderAttachment.js +1 -1
- package/lib/components/Attachment/renderAttachment.js.map +1 -1
- package/lib/components/Attachment/useAttachment.js +5 -1
- package/lib/components/Attachment/useAttachment.js.map +1 -1
- package/lib/components/Attachment/useAttachmentStyles.js +18 -3
- package/lib/components/Attachment/useAttachmentStyles.js.map +1 -1
- package/lib/components/AttachmentList/AttachmentList.js.map +1 -1
- package/lib/components/AttachmentList/AttachmentList.types.js.map +1 -1
- package/lib/components/AttachmentList/index.js.map +1 -1
- package/lib/components/AttachmentList/renderAttachmentList.js.map +1 -1
- package/lib/components/AttachmentList/useAttachmentList.js.map +1 -1
- package/lib/components/AttachmentList/useAttachmentListContextValues.js.map +1 -1
- package/lib/components/AttachmentList/useAttachmentListStyles.js.map +1 -1
- 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 +4 -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 +4 -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 +43 -0
- package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js.map +1 -0
- package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.js +25 -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/AttachmentTag.types.js +3 -1
- package/lib/components/AttachmentTag/AttachmentTag.types.js.map +1 -1
- package/lib/components/AttachmentTag/index.js.map +1 -1
- package/lib/components/AttachmentTag/renderAttachmentTag.js.map +1 -1
- package/lib/components/AttachmentTag/useAttachmentTag.js.map +1 -1
- package/lib/components/AttachmentTag/useAttachmentTagStyles.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/AttachmentTagItem.types.js +3 -1
- package/lib/components/AttachmentTagItem/AttachmentTagItem.types.js.map +1 -1
- package/lib/components/AttachmentTagItem/index.js.map +1 -1
- package/lib/components/AttachmentTagItem/renderAttachmentTagItem.js.map +1 -1
- package/lib/components/AttachmentTagItem/useAttachmentTagItem.js.map +1 -1
- package/lib/components/AttachmentTagItem/useAttachmentTagItemStyles.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/AttachmentTagList.types.js.map +1 -1
- package/lib/components/AttachmentTagList/index.js.map +1 -1
- package/lib/components/AttachmentTagList/renderAttachmentTagList.js.map +1 -1
- package/lib/components/AttachmentTagList/useAttachmentTagList.js +2 -2
- package/lib/components/AttachmentTagList/useAttachmentTagList.js.map +1 -1
- package/lib/components/AttachmentTagList/useAttachmentTagListContextValues.js.map +1 -1
- package/lib/components/AttachmentTagList/useAttachmentTagListStyles.js.map +1 -1
- package/lib/components/index.js +3 -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.map +1 -1
- package/lib/contexts/attachmentOverflowMenuContext.js +10 -0
- package/lib/contexts/attachmentOverflowMenuContext.js.map +1 -0
- package/lib/contexts/attachmentTagListContext.js.map +1 -1
- package/lib/index.js +4 -0
- package/lib/index.js.map +1 -1
- package/lib-commonjs/Attachment.js.map +1 -1
- package/lib-commonjs/AttachmentList.js.map +1 -1
- 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/AttachmentTag.js.map +1 -1
- package/lib-commonjs/AttachmentTagItem.js.map +1 -1
- package/lib-commonjs/AttachmentTagList.js.map +1 -1
- package/lib-commonjs/components/Attachment/Attachment.js.map +1 -1
- package/lib-commonjs/components/Attachment/Attachment.types.js +3 -1
- package/lib-commonjs/components/Attachment/Attachment.types.js.map +1 -1
- package/lib-commonjs/components/Attachment/index.js.map +1 -1
- package/lib-commonjs/components/Attachment/renderAttachment.js +1 -1
- package/lib-commonjs/components/Attachment/renderAttachment.js.map +1 -1
- package/lib-commonjs/components/Attachment/useAttachment.js +3 -1
- package/lib-commonjs/components/Attachment/useAttachment.js.map +1 -1
- package/lib-commonjs/components/Attachment/useAttachmentStyles.js +31 -5
- package/lib-commonjs/components/Attachment/useAttachmentStyles.js.map +1 -1
- package/lib-commonjs/components/AttachmentList/AttachmentList.js.map +1 -1
- package/lib-commonjs/components/AttachmentList/AttachmentList.types.js.map +1 -1
- package/lib-commonjs/components/AttachmentList/index.js.map +1 -1
- package/lib-commonjs/components/AttachmentList/renderAttachmentList.js.map +1 -1
- package/lib-commonjs/components/AttachmentList/useAttachmentList.js.map +1 -1
- package/lib-commonjs/components/AttachmentList/useAttachmentListContextValues.js.map +1 -1
- package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.js.map +1 -1
- 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 +7 -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 +7 -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 +40 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.js +39 -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/AttachmentTag/AttachmentTag.types.js +3 -1
- package/lib-commonjs/components/AttachmentTag/AttachmentTag.types.js.map +1 -1
- package/lib-commonjs/components/AttachmentTag/index.js.map +1 -1
- package/lib-commonjs/components/AttachmentTag/renderAttachmentTag.js.map +1 -1
- package/lib-commonjs/components/AttachmentTag/useAttachmentTag.js.map +1 -1
- package/lib-commonjs/components/AttachmentTag/useAttachmentTagStyles.js +7 -7
- package/lib-commonjs/components/AttachmentTag/useAttachmentTagStyles.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.types.js +3 -1
- package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.types.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagItem/index.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagItem/renderAttachmentTagItem.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItem.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItemStyles.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagList/AttachmentTagList.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagList/AttachmentTagList.types.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagList/index.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagList/renderAttachmentTagList.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/AttachmentTagList/useAttachmentTagListContextValues.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagList/useAttachmentTagListStyles.js.map +1 -1
- package/lib-commonjs/components/index.js +3 -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.map +1 -1
- package/lib-commonjs/contexts/attachmentOverflowMenuContext.js +30 -0
- package/lib-commonjs/contexts/attachmentOverflowMenuContext.js.map +1 -0
- package/lib-commonjs/contexts/attachmentTagListContext.js.map +1 -1
- package/lib-commonjs/index.js +95 -43
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +9 -9
|
@@ -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.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"}
|
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.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type {\n AttachmentOverflowMenuItemState,\n AttachmentOverflowMenuItemSlots,\n} from './AttachmentOverflowMenuItem.types';\n\n/**\n * Render the final JSX of AttachmentOverflowMenuItem\n */\nexport const renderAttachmentOverflowMenuItem_unstable = (state: AttachmentOverflowMenuItemState) => {\n assertSlots<AttachmentOverflowMenuItemSlots>(state);\n\n return !state.isVisible ? <state.root /> : null;\n};\n"],"names":["assertSlots","state","isVisible","_jsx","root"],"rangeMappings":";;;;;;;;;;;;;;","mappings":";;;;+BAaEA;;;eAAAA;;;4BAbwB;iCAGE;AAU1BA,MAAAA,4CAA6CC,CAAAA;oCAErCA,EAAAA;IACR,OAAA,CAAAA,MAAAC,SAAA,GAAA,WAAA,GAAAC,IAAAA,eAAA,EAAAF,MAAAG,IAAA,EAAA,CAAA,KAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
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, imageOnly, 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
|
+
imageOnly
|
|
39
|
+
};
|
|
40
|
+
}; //# sourceMappingURL=useAttachmentOverflowMenuItem.js.map
|
package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useAttachmentOverflowMenuItem.tsx"],"sourcesContent":["import * as React from 'react';\nimport { MenuItem, mergeCallbacks, slot, useIsOverflowItemVisible } from '@fluentui/react-components';\nimport { Dismiss20Filled, Dismiss20Regular, bundleIcon } from '@fluentui/react-icons';\nimport { useAttachmentListContext_unstable } from '../../contexts/attachmentListContext';\nimport type {\n AttachmentOverflowMenuItemProps,\n AttachmentOverflowMenuItemState,\n} from './AttachmentOverflowMenuItem.types';\n\n/**\n * Create the state required to render AttachmentOverflowMenuItem.\n *\n * The returned state can be modified with hooks such as useAttachmentOverflowMenuItemStyles_unstable,\n * before being passed to renderAttachmentOverflowMenuItem_unstable.\n *\n * @param props - props from this instance of AttachmentOverflowMenuItem\n * @param ref - reference to root HTMLElement of AttachmentOverflowMenuItem\n */\nexport const useAttachmentOverflowMenuItem_unstable = (\n props: AttachmentOverflowMenuItemProps,\n ref: React.Ref<HTMLDivElement>,\n): AttachmentOverflowMenuItemState => {\n const { id, imageOnly, media } = props;\n const DismissIcon = bundleIcon(Dismiss20Filled, Dismiss20Regular);\n const isVisible = useIsOverflowItemVisible(id);\n\n const onAttachmentDismiss = useAttachmentListContext_unstable(context => context.onAttachmentDismiss);\n\n const root = slot.always(\n { ref, icon: media, secondaryContent: <DismissIcon />, ...props },\n { elementType: MenuItem },\n );\n root.onClick = mergeCallbacks(root.onClick, ev =>\n onAttachmentDismiss?.(ev, {\n id,\n }),\n );\n\n return {\n components: {\n root: MenuItem,\n },\n root,\n isVisible,\n imageOnly,\n };\n};\n"],"names":["id","props","imageOnly","onAttachmentDismiss","media","icon","secondaryContent","useAttachmentListContext_unstable","context","root","slot","always","mergeCallbacks","onClick","elementType","MenuItem","isVisible"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAsBUA;;;eAAAA;;;;iEAtBa;iCACkD;4BACX;uCACZ;AAmBhD,MAAQA,yCAAyBC,CAAAA,OAAAA;UACjC,EACAD,EAAA,EAEAE,SAAMC,EAENC,KAAA;UACSC,cAAMD,IAAAA,sBAAAA,EAAAA,2BAAAA,EAAAA,4BAAAA;UAAOE,YAAAA,IAAAA,yCAAkB,EAAAN;UAAiBG,sBAAQI,IAAAA,wDAAA,EAAAC,CAAAA,UAAAA,QAAAL,mBAAA;UAC/DM,OAAAC,qBAAA,CAAAC,MAAA,CAAA;;QAAwBN,MAAAD;QAE1BK,kBAAeG,WAAAA,GAAeH,OAAKI,aACjCV,CAAAA,aAAAA;gBACEH;;QAIJc,aAAOC,yBAAA;;gBAEHN,GAAAA,IAAAA,+BAAMM,EAAAA,KAAAA,OAAAA,EAAAA,CAAAA,KAAAA,wBAAAA,QAAAA,wBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,oBAAAA,IAAAA;;;WAGRC;oBACAd;YACFO,MAAAM,yBAAA;QACA"}
|
package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
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 useStyles = (0, _reactcomponents.__styles)({
|
|
25
|
+
imageOnly: {
|
|
26
|
+
Bt984gj: "f122n59"
|
|
27
|
+
}
|
|
28
|
+
}, {
|
|
29
|
+
d: [
|
|
30
|
+
".f122n59{align-items:center;}"
|
|
31
|
+
]
|
|
32
|
+
});
|
|
33
|
+
const useAttachmentOverflowMenuItemStyles_unstable = (state)=>{
|
|
34
|
+
const { imageOnly } = state;
|
|
35
|
+
const rootBaseClassName = useRootBaseClassName();
|
|
36
|
+
const styles = useStyles();
|
|
37
|
+
state.root.className = (0, _reactcomponents.mergeClasses)(attachmentOverflowMenuItemClassNames.root, rootBaseClassName, imageOnly && styles.imageOnly, state.root.className);
|
|
38
|
+
return state;
|
|
39
|
+
}; //# sourceMappingURL=useAttachmentOverflowMenuItemStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useAttachmentOverflowMenuItemStyles.ts"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses } from '@fluentui/react-components';\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};\n\nconst useRootBaseClassName = makeResetStyles({});\nconst useStyles = makeStyles({\n imageOnly: {\n alignItems: 'center',\n },\n});\n\n/**\n * Apply styling to the AttachmentList slots based on the state\n */\nexport const useAttachmentOverflowMenuItemStyles_unstable = (\n state: AttachmentOverflowMenuItemState,\n): AttachmentOverflowMenuItemState => {\n const { imageOnly } = state;\n const rootBaseClassName = useRootBaseClassName();\n const styles = useStyles();\n\n state.root.className = mergeClasses(\n attachmentOverflowMenuItemClassNames.root,\n rootBaseClassName,\n imageOnly && styles.imageOnly,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["attachmentOverflowMenuItemClassNames","styles","useStyles","root","useRootBaseClassName","makeResetStyles","makeStyles","imageOnly","alignItems","d","state"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAOaA,oCAAAA;eAAAA;;IAmBLC,4CAASC;eAATD;;;iCA1B0C;AAO3C,MAAMD,uCAAwF;UACnGG;AACF;AAEA,MAAMC,uBAAuBC,IAAAA,8BAAAA,EAAAA,MAAiB,MAAA,EAAA;AAC9C,MAAMH,YAAYI,IAAAA,yBAAAA,EAAAA;eAChBC;iBACEC;;AAEJ,GAAA;IAEAC,GAAA;QAAA;KAAA;;AAQE,MAAMR,+CAASC,CAAAA;UAEfQ,EAOAH,SAAOG,EACP,GAAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AttachmentTag.
|
|
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. Will be removed in the next minor release (0.15.0).\n */\nexport const AttachmentTag: ForwardRefComponent<AttachmentTagProps> = React.forwardRef((props, ref) => {\n const state = useAttachmentTag_unstable(props, ref);\n\n useAttachmentTagStyles_unstable(state);\n useCustomStyleHook('useAttachmentTagStyles')(state);\n\n return renderAttachmentTag_unstable(state);\n});\n\nAttachmentTag.displayName = 'AttachmentTag';\n"],"names":["state","useAttachmentTag_unstable","props","ref","useAttachmentTagStyles_unstable","renderAttachmentTag_unstable","AttachmentTag"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAaQA;;;eAAAA;;;;iEAbe;kCACmB;qCACG;wCACG;+BAGb;AAOjC,MAAMA,gBAAQC,WAAAA,GAAAA,OAA0BC,UAAOC,CAAAA,CAAAA,OAAAA;UAE/CC,QAAAA,IAAAA,2CAAgCJ,EAAAA,OAAAA;+DACb,EAAAA;yCAEZK,EAAAA,0BAA6BL;IACtC,OAAGK,IAAAA,iDAAA,EAAAL;AAEHM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AttachmentTag.types.
|
|
1
|
+
{"version":3,"sources":["AttachmentTag.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\n\nexport type AttachmentTagSlots = {\n root: NonNullable<Slot<'button'>>;\n\n media?: Slot<'span'>;\n\n content: NonNullable<Slot<'span'>>;\n\n icon: NonNullable<Slot<'span'>>;\n};\n\n/**\n * AttachmentTag Props\n */\nexport type AttachmentTagProps = ComponentProps<Partial<AttachmentTagSlots>>;\n\n/**\n * State used in rendering AttachmentTag\n */\nexport type AttachmentTagState = ComponentState<AttachmentTagSlots>;\n"],"names":[],"rangeMappings":";;","mappings":"AAiBA;;CAEC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderAttachmentTag.
|
|
1
|
+
{"version":3,"sources":["renderAttachmentTag.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { AttachmentTagState, AttachmentTagSlots } from './AttachmentTag.types';\n\n/**\n * Render the final JSX of AttachmentTag\n */\nexport const renderAttachmentTag_unstable = (state: AttachmentTagState) => {\n assertSlots<AttachmentTagSlots>(state);\n\n return (\n <state.root>\n {state.media && <state.media />}\n <state.content />\n <state.icon />\n </state.root>\n );\n};\n"],"names":["assertSlots","state","media","_jsx","content","icon"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAUEA;;;eAAAA;;;4BATF;iCAE4B;AAO1BA,MAAAA,+BAAgCC,CAAAA;oCAEhC,EAAAA;;kBAEKA;YAAAA,MAAMC,KAAK,IAAA,WAAI,GAAAC,IAAAA,eAACF,EAAAA,MAAMC,KAAK,EAAA,CAAA;YAAA,WAAA,GAAAC,IAAAA,eAAA,EAAAF,MAAAG,OAAA,EAAA,CAAA;YAAA,WAAA,GAAAD,IAAAA,eAAA,EAAAF,MAAAI,IAAA,EAAA,CAAA;SAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useAttachmentTag.
|
|
1
|
+
{"version":3,"sources":["useAttachmentTag.tsx"],"sourcesContent":["import type * as React from 'react';\nimport { useAttachmentTagSlots } from '../utils/useAttachmentTagSlots';\nimport type { AttachmentTagProps, AttachmentTagState } from './AttachmentTag.types';\n\n/**\n * Create the state required to render AttachmentTag.\n *\n * The returned state can be modified with hooks such as useAttachmentTagStyles_unstable,\n * before being passed to renderAttachmentTag_unstable.\n *\n * @param props - props from this instance of AttachmentTag\n * @param ref - reference to root HTMLElement of AttachmentTag\n */\nexport const useAttachmentTag_unstable = (\n props: AttachmentTagProps,\n ref: React.Ref<HTMLButtonElement>,\n): AttachmentTagState => {\n return useAttachmentTagSlots(props, ref, {\n elementType: { root: 'button', media: 'span', content: 'span', icon: 'span' },\n });\n};\n"],"names":["useAttachmentTagSlots","ref","elementType","props","root","media","content","icon"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAiBSA;;;eAAAA;;;uCAhB6B;AAgBpC,MAAOA,4BAA6BC,CAAAA,OAAKA;WACvCC,IAAAA,4CAAa,EAAAC,OAAAF,KAAA;qBAAEG;kBAAgBC;mBAAeC;qBAAiBC;kBAAa;QAC9E;IACA"}
|
|
@@ -9,14 +9,14 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
attachmentTagClassNames: function() {
|
|
13
|
-
return attachmentTagClassNames;
|
|
14
|
-
},
|
|
15
12
|
ATTACHMENTTAG_MAXWIDTH: function() {
|
|
16
13
|
return ATTACHMENTTAG_MAXWIDTH;
|
|
17
14
|
},
|
|
18
|
-
|
|
19
|
-
return
|
|
15
|
+
attachmentTagClassNames: function() {
|
|
16
|
+
return attachmentTagClassNames;
|
|
17
|
+
},
|
|
18
|
+
useAttachmentTagStyles_unstable: function() {
|
|
19
|
+
return useAttachmentTagStyles_unstable;
|
|
20
20
|
},
|
|
21
21
|
useContentBaseClassName: function() {
|
|
22
22
|
return useContentBaseClassName;
|
|
@@ -24,8 +24,8 @@ _export(exports, {
|
|
|
24
24
|
useIconBaseClassName: function() {
|
|
25
25
|
return useIconBaseClassName;
|
|
26
26
|
},
|
|
27
|
-
|
|
28
|
-
return
|
|
27
|
+
useMediaBaseClassName: function() {
|
|
28
|
+
return useMediaBaseClassName;
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
31
|
const _reactcomponents = require("@fluentui/react-components");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useAttachmentTagStyles.
|
|
1
|
+
{"version":3,"sources":["useAttachmentTagStyles.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 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","colorBrandForegroundLinkHover","mediaBaseClassName","useMediaBaseClassName","contentBaseClassName","iconBaseClassName","borderColor","colorNeutralStroke1Pressed","rootBaseClassName","className","colorNeutralForeground2BrandPressed","mergeClasses"],"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;8BACtBC;UAChBC,qBAAAC;UACFC,uBAAArB;UAEAsB,oBAAiBrB;UACfsB,IAAAA,CAAAA,SAAaR,GAAAA,IAAAA,6BAAOS,EAAAA,wBAA0BnB,IAAA,EAAAoB,mBAAAR,MAAAZ,IAAA,CAAAqB,SAAA;cAE5CpB,KAAKR,EAAAA;mBACLY,CAAAA,SAAOK,GAAOY,IAAAA,6BAAAA,EAAAA,wBAAmCrB,KAAA,EAAAa,oBAAAF,MAAAX,KAAA,CAAAoB,SAAA;;UAErDnB,OAAA,CAAAmB,SAAA,GAAAE,IAAAA,6BAAA,EAAA9B,wBAAAS,OAAA,EAAAc,sBAAAJ,MAAAV,OAAA,CAAAmB,SAAA;UAEAlB,IAAA,CAAAkB,SAAU,GAAAE,IAAAA,6BAAA,EAAA9B,wBAAAU,IAAA,EAAAc,mBAAAL,MAAAT,IAAA,CAAAkB,SAAA;WACPT;qDAED"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AttachmentTagItem.
|
|
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. Will be removed in the next minor release (0.15.0).\n */\nexport const AttachmentTagItem: ForwardRefComponent<AttachmentTagItemProps> = React.forwardRef((props, ref) => {\n const state = useAttachmentTagItem_unstable(props, ref);\n\n useAttachmentTagItemStyles_unstable(state);\n return renderAttachmentTagItem_unstable(state);\n});\n\nAttachmentTagItem.displayName = 'AttachmentTagItem';\n"],"names":["state","useAttachmentTagItem_unstable","props","ref","useAttachmentTagItemStyles_unstable","renderAttachmentTagItem_unstable","AttachmentTagItem"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAYQA;;;eAAAA;;;;iEAZe;sCACuB;yCACG;4CACG;AASlD,MAAMA,oBAAQC,WAAAA,GAAAA,OAA8BC,UAAOC,CAAAA,CAAAA,OAAAA;UAEnDC,QAAAA,IAAAA,mDAAoCJ,EAAAA,OAAAA;uEAC7BK,EAAAA;IACT,OAAGA,IAAAA,yDAAA,EAAAL;AAEHM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AttachmentTagItem.types.
|
|
1
|
+
{"version":3,"sources":["AttachmentTagItem.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\n\nexport type AttachmentTagItemSlots = {\n root: NonNullable<Slot<'div'>>;\n media?: Slot<'span'>;\n content: NonNullable<Slot<'span'>>;\n icon: NonNullable<Slot<'span'>>;\n};\n\n/**\n * AttachmentTagItem Props\n */\nexport type AttachmentTagItemProps = ComponentProps<Partial<AttachmentTagItemSlots>>;\n\n/**\n * State used in rendering AttachmentTagItem\n */\nexport type AttachmentTagItemState = ComponentState<AttachmentTagItemSlots>;\n"],"names":[],"rangeMappings":";;","mappings":"AAcA;;CAEC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderAttachmentTagItem.
|
|
1
|
+
{"version":3,"sources":["renderAttachmentTagItem.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { AttachmentTagItemState, AttachmentTagItemSlots } from './AttachmentTagItem.types';\n\n/**\n * Render the final JSX of AttachmentTagItem\n */\nexport const renderAttachmentTagItem_unstable = (state: AttachmentTagItemState) => {\n assertSlots<AttachmentTagItemSlots>(state);\n\n return (\n <state.root>\n {state.media && <state.media />}\n <state.content />\n <state.icon />\n </state.root>\n );\n};\n"],"names":["assertSlots","state","media","_jsx","content","icon"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAUEA;;;eAAAA;;;4BATF;iCAE4B;AAO1BA,MAAAA,mCAAoCC,CAAAA;oCAEpC,EAAAA;;kBAEKA;YAAAA,MAAMC,KAAK,IAAA,WAAI,GAAAC,IAAAA,eAACF,EAAAA,MAAMC,KAAK,EAAA,CAAA;YAAA,WAAA,GAAAC,IAAAA,eAAA,EAAAF,MAAAG,OAAA,EAAA,CAAA;YAAA,WAAA,GAAAD,IAAAA,eAAA,EAAAF,MAAAI,IAAA,EAAA,CAAA;SAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useAttachmentTagItem.
|
|
1
|
+
{"version":3,"sources":["useAttachmentTagItem.ts"],"sourcesContent":["import type * as React from 'react';\nimport { useAttachmentTagSlots } from '../utils/useAttachmentTagSlots';\nimport type { AttachmentTagItemProps, AttachmentTagItemState } from './AttachmentTagItem.types';\n\n/**\n * Create the state required to render AttachmentTagItem.\n *\n * The returned state can be modified with hooks such as useAttachmentTagItemStyles_unstable,\n * before being passed to renderAttachmentTagItem_unstable.\n *\n * @param props - props from this instance of AttachmentTagItem\n * @param ref - reference to root HTMLElement of AttachmentTagItem\n */\nexport const useAttachmentTagItem_unstable = (\n props: AttachmentTagItemProps,\n ref: React.Ref<HTMLDivElement>,\n): AttachmentTagItemState => {\n return useAttachmentTagSlots(props, ref, {\n elementType: { root: 'div', media: 'span', content: 'span', icon: 'span' },\n });\n};\n"],"names":["useAttachmentTagSlots","props","ref","elementType","root","media","content","icon"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAiBSA;;;eAAAA;;;uCAhB6B;AAgBpC,MAAOA,gCAAkC,CAAAC,OAAAC;WACvCC,IAAAA,4CAAa,EAAAF,OAAAC,KAAA;qBAAEE;kBAAaC;mBAAeC;qBAAiBC;kBAAa;QAC3E;IACA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useAttachmentTagItemStyles.
|
|
1
|
+
{"version":3,"sources":["useAttachmentTagItemStyles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses, tokens } from '@fluentui/react-components';\nimport {\n ATTACHMENTTAG_MAXWIDTH,\n useContentBaseClassName,\n useIconBaseClassName,\n useMediaBaseClassName,\n} from '../AttachmentTag/useAttachmentTagStyles';\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 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","rootBaseClassName","useRootBaseClassName","mediaBaseClassName","useMediaBaseClassName","iconBaseClassName","useAttachmentTagItemStyles_unstable","contentBaseClassName","useContentBaseClassName","className","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAUaA,2BAAAA;eAAAA;;IAeXC,mCAAY;eAAZA;;;iCAzB4C;wCAMvC;AAIA,MAAMD,8BAAsE;UACjFE;WACAC;aACAC;UACAC;AACF;AAEA;;CAEC,SAECC,uBAASC,IAAAA,8BAAA,EAAA,WAAA,MAAA;IAAA;CAAA;AAITN,MAAAA,sCAAYO,CAAAA;IACd,MAAAC,oBAAAC;IAEA,MAAAC,qBAAAC,IAAAA,6CAAA;;IAEC,MACDC,oBAAaC,IAAAA,4CAAAA;UACXZ,IAAMO,CAAAA,SAAAA,GAAAA,IAAAA,6BAAoBC,EAAAA,4BAAAA,IAAAA,EAAAA,mBAAAA,MAAAA,IAAAA,CAAAA,SAAAA;QAC1BF,MAAMG,KAAAA,EAAAA;QACNH,MAAMO,KAAAA,CAAAA,SAAAA,GAAAA,IAAAA,6BAAuBC,EAAAA,4BAAAA,KAAAA,EAAAA,oBAAAA,MAAAA,KAAAA,CAAAA,SAAAA;;UAG7BR,OAAWS,CAAAA,SAAS,GAAGC,IAAAA,6BAAalB,EAAAA,4BAA4BE,OAAMO,EAAAA,sBAAyBP,MAAKe,OAAS,CAAAA,SAAA;UAEzGT,IAAAA,CAAAA,SAAa,GAAAU,IAAAA,6BAAA,EAAAlB,4BAAAK,IAAA,EAAAQ,mBAAAL,MAAAH,IAAA,CAAAY,SAAA;WACfT;yDAIAR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AttachmentTagList.
|
|
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. Will be removed in the next minor release (0.15.0).\n */\nexport const AttachmentTagList: ForwardRefComponent<AttachmentTagListProps> = React.forwardRef((props, ref) => {\n const state = useAttachmentTagList_unstable(props, ref);\n const contextValues = useAttachmentTagListContextValues_unstable(state);\n\n useAttachmentTagListStyles_unstable(state);\n useCustomStyleHook('useAttachmentTagListStyles')(state);\n\n return renderAttachmentTagList_unstable(state, contextValues);\n});\n\nAttachmentTagList.displayName = 'AttachmentTagList';\n"],"names":["state","useAttachmentTagList_unstable","props","ref","contextValues","useAttachmentTagListContextValues_unstable","useAttachmentTagListStyles_unstable","renderAttachmentTagList_unstable","AttachmentTagList"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAcQA;;;eAAAA;;;;iEAde;yCAC0B;sCACH;mDACa;4CACP;+BAGjB;AAOjC,MAAMA,oBAAQC,WAAAA,GAAAA,OAA8BC,UAAOC,CAAAA,CAAAA,OAAAA;UACnDH,QAAMI,IAAAA,mDAAgBC,EAAAA,OAAAA;UAEtBC,gBAAAA,IAAAA,6EAAoCN,EAAAA;uEACjB,EAAAA;yCAEZO,EAAAA,8BAAwCH;IACjD,OAAGG,IAAAA,yDAAA,EAAAP,OAAAI;AAEHI"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AttachmentTagList.types.
|
|
1
|
+
{"version":3,"sources":["AttachmentTagList.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\nimport type { AttachmentTagListContextValue } from '../../contexts/attachmentTagListContext';\nimport type { AttachmentTagProps } from '../AttachmentTag/AttachmentTag.types';\n\nexport type AttachmentTagListSlots = {\n root: Slot<'div'>;\n};\n\nexport type AttachmentTagDismissedData = {\n content?: AttachmentTagProps['children'];\n media?: AttachmentTagProps['media'];\n};\n\n/**\n * AttachmentTagList Props\n */\nexport type AttachmentTagListProps = ComponentProps<AttachmentTagListSlots> & {\n onAttachmentTagDismiss?: (\n e: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>,\n data: AttachmentTagDismissedData,\n ) => void;\n};\n\n/**\n * State used in rendering AttachmentTagList\n */\nexport type AttachmentTagListState = ComponentState<AttachmentTagListSlots> &\n Pick<AttachmentTagListProps, 'onAttachmentTagDismiss'>;\n\nexport type AttachmentTagListContextValues = {\n tagList: AttachmentTagListContextValue;\n};\n"],"names":[],"rangeMappings":"","mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderAttachmentTagList.
|
|
1
|
+
{"version":3,"sources":["renderAttachmentTagList.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\n\nimport { AttachmentTagListProvider } from '../../contexts/attachmentTagListContext';\nimport type {\n AttachmentTagListContextValues,\n AttachmentTagListState,\n AttachmentTagListSlots,\n} from './AttachmentTagList.types';\n\n/**\n * Render the final JSX of AttachmentTagList\n */\nexport const renderAttachmentTagList_unstable = (\n state: AttachmentTagListState,\n contextValues: AttachmentTagListContextValues,\n) => {\n assertSlots<AttachmentTagListSlots>(state);\n\n return (\n <AttachmentTagListProvider value={contextValues.tagList}>\n <state.root />\n </AttachmentTagListProvider>\n );\n};\n"],"names":["assertSlots","state","value","contextValues","tagList"],"rangeMappings":";;;;;;;;;;;;;;;;;;","mappings":";;;;+BAmBEA;;;eAAAA;;;4BAnBwB;iCAGE;0CAEc;AAcxCA,MAAAA,mCAAoCC,CAAAA,OAAAA;oCAEpC,EAAAA;WAC6BC,WAAOC,GAAAA,IAAAA,eAAAA,EAAAA,mDAAqB,EAAA;6BACrDC,OAAA;;IAGJ"}
|
|
@@ -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',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useAttachmentTagList.
|
|
1
|
+
{"version":3,"sources":["useAttachmentTagList.ts"],"sourcesContent":["import type * as React from 'react';\n\nimport { getIntrinsicElementProps, slot, useArrowNavigationGroup } from '@fluentui/react-components';\nimport type { AttachmentTagListProps, AttachmentTagListState } from './AttachmentTagList.types';\n\n/**\n * Create the state required to render AttachmentTagList.\n *\n * The returned state can be modified with hooks such as useAttachmentTagListStyles_unstable,\n * before being passed to renderAttachmentTagList_unstable.\n *\n * @param props - props from this instance of AttachmentTagList\n * @param ref - reference to root HTMLElement of AttachmentTagList\n */\nexport const useAttachmentTagList_unstable = (\n props: AttachmentTagListProps,\n ref: React.Ref<HTMLDivElement>,\n): AttachmentTagListState => {\n const { onAttachmentTagDismiss } = props;\n\n const focusAttributes = useArrowNavigationGroup({\n axis: 'both',\n circular: true,\n });\n\n return {\n onAttachmentTagDismiss,\n\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n 'aria-label': 'Attachments',\n ref,\n role: 'menu',\n ...focusAttributes,\n ...props,\n }),\n { elementType: 'div' },\n ),\n };\n};\n"],"names":["onAttachmentTagDismiss","props","focusAttributes","useArrowNavigationGroup","axis","slot","role","getIntrinsicElementProps","elementType"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAkBUA;;;eAAAA;;;iCAhB8D;AAgBtE,MAAQA,gCAA2BC,CAAAA,OAAAA;UAEnC,wBACQ;UAERC,kBAAAC,IAAAA,wCAAA,EAAA;QAEAC,MAAA;kBACEJ;;;;oBAKMK;kBAEF;;mCAEAC,CAAAA,MAAM,CAAAC,IAAAA,yCAAA,EAAA,OAAA;0BACHL;;kBAGL;8BAAEM;eAAmBP,KAAA;QAEzB,IAAA;YACAO,aAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useAttachmentTagListContextValues.
|
|
1
|
+
{"version":3,"sources":["useAttachmentTagListContextValues.ts"],"sourcesContent":["import type { AttachmentTagListContextValues, AttachmentTagListState } from './AttachmentTagList.types';\n\nexport function useAttachmentTagListContextValues_unstable(\n state: AttachmentTagListState,\n): AttachmentTagListContextValues {\n const { onAttachmentTagDismiss } = state;\n\n // This context is created with \"@fluentui/react-context-selector\", there is no sense to memoize it\n const tagList = {\n onAttachmentTagDismiss,\n };\n\n return { tagList };\n}\n"],"names":["useAttachmentTagListContextValues_unstable","state","onAttachmentTagDismiss","tagList"],"rangeMappings":";;;;;;;;;;;;;;;;;","mappings":";;;;+BAEgBA;;;eAAAA;;;AAAT,SAASA,2CACdC,KAA6B;UAE7B,EAEAC,sBAAA,KACAD;uGACEC;UACFC,UAAA;QAEAD;;WAAiB;QACnBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useAttachmentTagListStyles.
|
|
1
|
+
{"version":3,"sources":["useAttachmentTagListStyles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses, tokens } from '@fluentui/react-components';\nimport type { AttachmentTagListSlots, AttachmentTagListState } from './AttachmentTagList.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const attachmentTagListClassNames: SlotClassNames<AttachmentTagListSlots> = {\n root: 'fai-AttachmentTagList',\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\n/**\n * Apply styling to the AttachmentTagList slots based on the state\n */\nexport const useAttachmentTagListStyles_unstable = (state: AttachmentTagListState): AttachmentTagListState => {\n const rootBaseClassName = useRootBaseClassName();\n state.root.className = mergeClasses(attachmentTagListClassNames.root, rootBaseClassName, state.root.className);\n\n return state;\n};\n"],"names":["attachmentTagListClassNames","flexShrink","root","useRootBaseClassName","makeResetStyles","state","flexWrap","rowGap","tokens","spacingVerticalXS","rootBaseClassName","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIaA,2BAAAA;eAAAA;;IAQXC,mCAAY;eAAZA;;;iCAZ4C;AAIvC,MAAMD,8BAAsE;UACjFE;AACF;AAEA,MAAMC,uBAAuBC,IAAAA,8BAAAA,EAAAA,YAAgB,MAAA;IAAA;CAAA;AAI3CH,MAAAA,sCAAYI,CAAAA;UACZC,oBAAUH;UACVI,IAAQC,CAAAA,SAAOC,GAAAA,IAAAA,6BAAiB,EAAAT,4BAAAE,IAAA,EAAAQ,mBAAAL,MAAAH,IAAA,CAAAS,SAAA;IAClC,OAAAN;AAEA"}
|
|
@@ -8,4 +8,7 @@ _export_star._(require("./AttachmentTagList"), exports);
|
|
|
8
8
|
_export_star._(require("./AttachmentTagItem"), exports);
|
|
9
9
|
_export_star._(require("./Attachment"), exports);
|
|
10
10
|
_export_star._(require("./AttachmentList"), exports);
|
|
11
|
+
_export_star._(require("./AttachmentOverflowMenu"), exports);
|
|
12
|
+
_export_star._(require("./AttachmentOverflowMenuButton"), exports);
|
|
13
|
+
_export_star._(require("./AttachmentOverflowMenuItem"), exports);
|
|
11
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './AttachmentTag';\nexport * from './AttachmentTagList';\nexport * from './AttachmentTagItem';\nexport * from './Attachment';\nexport * from './AttachmentList';\nexport * from './AttachmentOverflowMenu';\nexport * from './AttachmentOverflowMenuButton';\nexport * from './AttachmentOverflowMenuItem';\n"],"names":[],"rangeMappings":";;;;;;;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA;uBACA"}
|
|
@@ -21,7 +21,7 @@ function useAttachmentTagSlots(props, ref, options) {
|
|
|
21
21
|
const DismissIcon = (0, _reacticons.bundleIcon)(_reacticons.Dismiss20Filled, _reacticons.Dismiss20Regular);
|
|
22
22
|
const hasParentContext = (0, _reactcontextselector.useHasParentContext)(_attachmentTagListContext.AttachmentTagListContext);
|
|
23
23
|
const rootRole = role !== null && role !== void 0 ? role : hasParentContext ? 'menuitem' : undefined;
|
|
24
|
-
const root = _reactcomponents.slot.always((0, _reactcomponents.
|
|
24
|
+
const root = _reactcomponents.slot.always((0, _reactcomponents.getIntrinsicElementProps)(elementType.root, {
|
|
25
25
|
ref,
|
|
26
26
|
...props,
|
|
27
27
|
role: rootRole
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useAttachmentTagSlots.
|
|
1
|
+
{"version":3,"sources":["useAttachmentTagSlots.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { getIntrinsicElementProps, mergeCallbacks, slot } from '@fluentui/react-components';\nimport { useHasParentContext } from '@fluentui/react-context-selector';\nimport { Dismiss20Regular, Dismiss20Filled, bundleIcon } from '@fluentui/react-icons';\n\nimport { useAttachmentTagListContext_unstable } from '../../contexts/attachmentTagListContext';\n\nimport { AttachmentTagListContext } from '../../contexts/attachmentTagListContext';\nimport type { AttachmentTagProps, AttachmentTagState } from './../AttachmentTag/AttachmentTag.types';\nimport type { AttachmentTagItemProps, AttachmentTagItemState } from './../AttachmentTagItem/AttachmentTagItem.types';\n\n/**\n * @internal\n * Create the slots required to render AttachmentTag or AttachmentTagItem.\n */\nexport function useAttachmentTagSlots<TAttachmentTagState extends AttachmentTagState | AttachmentTagItemState>(\n props: AttachmentTagProps | AttachmentTagItemProps,\n ref: React.Ref<HTMLButtonElement | HTMLDivElement>,\n options: {\n elementType: TAttachmentTagState['components'];\n },\n): TAttachmentTagState {\n const onAttachmentTagDismiss = useAttachmentTagListContext_unstable(context => context.onAttachmentTagDismiss);\n const { children, role } = props;\n const { elementType } = options;\n\n const DismissIcon = bundleIcon(Dismiss20Filled, Dismiss20Regular);\n\n const hasParentContext = useHasParentContext(AttachmentTagListContext);\n const rootRole = role ?? (hasParentContext ? 'menuitem' : undefined);\n\n const root: TAttachmentTagState['root'] = slot.always(\n getIntrinsicElementProps(elementType.root as 'button' | 'div', {\n ref,\n ...props,\n role: rootRole,\n }),\n { elementType: elementType.root as 'button' | 'div' },\n );\n root.onClick = mergeCallbacks(\n root.onClick as React.MouseEventHandler<HTMLAnchorElement | HTMLButtonElement>,\n (ev: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) =>\n onAttachmentTagDismiss?.(ev, { content: children, media }),\n );\n\n const media: TAttachmentTagState['media'] = slot.optional(props.media, { elementType: elementType.media });\n\n const content: TAttachmentTagState['content'] = slot.always(props.content, {\n defaultProps: {\n children,\n },\n elementType: elementType.content,\n });\n\n const icon: TAttachmentTagState['icon'] = slot.always(props.icon, {\n defaultProps: {\n children: <DismissIcon />,\n },\n elementType: elementType.icon,\n });\n\n return {\n components: {\n root: elementType.root,\n media: elementType.media,\n content: elementType.content,\n icon: elementType.icon,\n },\n root,\n media,\n content,\n icon,\n } as TAttachmentTagState;\n}\n"],"names":["onAttachmentTagDismiss","useAttachmentTagListContext_unstable","props","children","DismissIcon","role","ref","rootRole","hasParentContext","useHasParentContext","AttachmentTagListContext","elementType","root","undefined","slot","always","getIntrinsicElementProps","content","media","optional","onClick","mergeCallbacks","ev","icon","defaultProps","components","createElement"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAuBQA;;;eAAAA;;;;iEAvBe;iCAEwC;sCAC3B;4BAC0B;0CAET;AAiBnD,SAAMA,sBAAyBC,KAAAA,EAAAA,GAAAA,EAAAA,OAAAA;UAC/BD,yBAA2BE,IAAAA,8DAAAA,EAAAA,CAAAA,UAAAA,QAAAA,sBAAAA;UAC3B,EAEAC,QAAMC,EAENC,IAAA,KACAH;UAEA,aAEII;UAEAD,cAAME,IAAAA,sBAAAA,EAAAA,2BAAAA,EAAAA,4BAAAA;UAERC,mBAAAC,IAAAA,yCAAA,EAAAC,kDAAA;UAAEC,WAAAA,SAAaA,QAAYC,SAAI,KAAA,IAAAP,OAAAG,mBAAA,aAAAK;UAAqBD,OAAAE,qBAAA,CAAAC,MAAA,CAAAC,IAAAA,yCAAA,EAAAL,YAAAC,IAAA,EAAA;QAEtDA;gBAGmCK;;;QAGnCN,aAAMO,YAA2CC,IAASjB;;SAA8CkB,OAAA,GAAAC,IAAAA,+BAAA,EAAAT,KAAAQ,OAAA,EAAAE,CAAAA,KAAAtB,2BAAA,QAAAA,2BAAA,KAAA,IAAA,KAAA,IAAAA,uBAAAsB,IAAA;YAExGL,SAAMA;;;UAGJC,QAAAJ,qBAAA,CAAAK,QAAA,CAAAjB,MAAAgB,KAAA,EAAA;qBACAP,YAAaA,KAAYM;;UAG3BA,UAA0CH,qBAAKC,CAAAA,MAAOb,CAAAA,MAAMqB,OAAM,EAAA;sBAChEC;;;qBAGAb,YAAaA,OAAYY;;UAG3BA,OAAOT,qBAAA,CAAAC,MAAA,CAAAb,MAAAqB,IAAA,EAAA;sBACLE;sBACEb,WAAMD,GAAAA,OAAgBe,aAAA,CAAAtB,aAAA;;qBAEtBa,YAASN,IAAYM;;WAEvB;oBACAL;kBACAM,YAAAA,IAAAA;mBACAD,YAAAA,KAAAA;qBACAM,YAAAA,OAAAA;YACFA,MAAAZ,YAAAY,IAAA;QACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["attachmentListContext.
|
|
1
|
+
{"version":3,"sources":["attachmentListContext.ts"],"sourcesContent":["import { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { Context, ContextSelector } from '@fluentui/react-context-selector';\nimport type { AttachmentListProps } from '../components/index';\n\nexport const AttachmentListContext: Context<AttachmentListContextValue> = createContext<\n AttachmentListContextValue | undefined\n>(undefined) as Context<AttachmentListContextValue>;\n\nconst attachmentListContextDefaultValue: AttachmentListContextValue = {\n onAttachmentDismiss: () => null,\n};\n\n/**\n * Context shared between AttachmentList and its children components\n */\nexport type AttachmentListContextValue = Pick<AttachmentListProps, 'onAttachmentDismiss'>;\n\nexport const AttachmentListProvider = AttachmentListContext.Provider;\n\nexport const useAttachmentListContext_unstable = <T>(selector: ContextSelector<AttachmentListContextValue, T>) =>\n useContextSelector(AttachmentListContext, (ctx = attachmentListContextDefaultValue) => selector(ctx));\n"],"names":["AttachmentListContext","AttachmentListProvider","useAttachmentListContext_unstable","createContext","undefined","attachmentListContextDefaultValue","onAttachmentDismiss","Provider","selector","useContextSelector","ctx"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIaA,qBAAAA;eAAAA;;IAaAC,sBAAAA;eAAAA;;IAEAC,iCAAAA;eAAAA;;;sCAnBqC;AAI3C,MAAMF,wBAA6DG,IAAAA,mCAAAA,EAExEC;AAEF,MAAMC,oCAAgE;yBACpEC,IAA2B;AAC7B;AAOO,MAAML,yBAAyBD,sBAAsBO,QAAQ;AAE7D,MAAML,oCAAoCM,CAAAA,WAC/CC,IAAAA,wCAAAA,EAAmBT,uBAAuB,CAACU,MAAML,iCAAiC,GAAKG,SAASE"}
|
|
@@ -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
|
+
AttachmentOverflowMenuContext: function() {
|
|
13
|
+
return AttachmentOverflowMenuContext;
|
|
14
|
+
},
|
|
15
|
+
AttachmentOverflowMenuProvider: function() {
|
|
16
|
+
return AttachmentOverflowMenuProvider;
|
|
17
|
+
},
|
|
18
|
+
useAttachmentOverflowMenuContext_unstable: function() {
|
|
19
|
+
return useAttachmentOverflowMenuContext_unstable;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
const _reactcontextselector = require("@fluentui/react-context-selector");
|
|
23
|
+
const AttachmentOverflowMenuContext = (0, _reactcontextselector.createContext)(undefined);
|
|
24
|
+
const overflowMenuContextDefaultValue = {
|
|
25
|
+
isOverflowing: false,
|
|
26
|
+
overflowButtonRef: undefined,
|
|
27
|
+
overflowCount: 0
|
|
28
|
+
};
|
|
29
|
+
const AttachmentOverflowMenuProvider = AttachmentOverflowMenuContext.Provider;
|
|
30
|
+
const useAttachmentOverflowMenuContext_unstable = (selector)=>(0, _reactcontextselector.useContextSelector)(AttachmentOverflowMenuContext, (ctx = overflowMenuContextDefaultValue)=>selector(ctx)); //# sourceMappingURL=attachmentOverflowMenuContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["attachmentOverflowMenuContext.ts"],"sourcesContent":["import { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { Context, ContextSelector } from '@fluentui/react-context-selector';\nimport type { AttachmentOverflowMenuState } from '../components/index';\n\nexport const AttachmentOverflowMenuContext: Context<AttachmentOverflowMenuContextValue> = createContext<\n AttachmentOverflowMenuContextValue | undefined\n>(undefined) as Context<AttachmentOverflowMenuContextValue>;\n\nconst overflowMenuContextDefaultValue: AttachmentOverflowMenuContextValue = {\n isOverflowing: false,\n overflowButtonRef: undefined,\n overflowCount: 0,\n};\n\n/**\n * Context shared between AttachmentOverflowMenu and its children components\n */\nexport type AttachmentOverflowMenuContextValue = Pick<\n AttachmentOverflowMenuState,\n 'isOverflowing' | 'overflowButtonRef' | 'overflowCount'\n>;\nexport const AttachmentOverflowMenuProvider = AttachmentOverflowMenuContext.Provider;\n\nexport const useAttachmentOverflowMenuContext_unstable = <T>(\n selector: ContextSelector<AttachmentOverflowMenuContextValue, T>,\n) => useContextSelector(AttachmentOverflowMenuContext, (ctx = overflowMenuContextDefaultValue) => selector(ctx));\n"],"names":["AttachmentOverflowMenuContext","AttachmentOverflowMenuProvider","useAttachmentOverflowMenuContext_unstable","createContext","undefined","overflowMenuContextDefaultValue","isOverflowing","overflowButtonRef","overflowCount","Provider","selector","useContextSelector","ctx"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIaA,6BAAAA;eAAAA;;IAiBAC,8BAAAA;eAAAA;;IAEAC,yCAAAA;eAAAA;;;sCAvBqC;AAI3C,MAAMF,gCAA6EG,IAAAA,mCAAAA,EAExFC;AAEF,MAAMC,kCAAsE;mBAC1EC;uBACAC;mBACAC;AACF;AASO,MAAMP,iCAAiCD,8BAA8BS,QAAQ;AAE7E,MAAMP,4CAA4CQ,CAAAA,WAEpDC,IAAAA,wCAAAA,EAAmBX,+BAA+B,CAACY,MAAMP,+BAA+B,GAAKK,SAASE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["attachmentTagListContext.
|
|
1
|
+
{"version":3,"sources":["attachmentTagListContext.ts"],"sourcesContent":["import { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { Context, ContextSelector } from '@fluentui/react-context-selector';\nimport type { AttachmentTagListProps } from '../components/index';\n\nexport const AttachmentTagListContext: Context<AttachmentTagListContextValue> = createContext<\n AttachmentTagListContextValue | undefined\n>(undefined) as Context<AttachmentTagListContextValue>;\n\nconst tagListContextDefaultValue: AttachmentTagListContextValue = {\n onAttachmentTagDismiss: () => null,\n};\n\n/**\n * Context shared between AttachmentTagList and its children components\n */\nexport type AttachmentTagListContextValue = Pick<AttachmentTagListProps, 'onAttachmentTagDismiss'>;\n\nexport const AttachmentTagListProvider = AttachmentTagListContext.Provider;\n\nexport const useAttachmentTagListContext_unstable = <T>(selector: ContextSelector<AttachmentTagListContextValue, T>) =>\n useContextSelector(AttachmentTagListContext, (ctx = tagListContextDefaultValue) => selector(ctx));\n"],"names":["AttachmentTagListContext","AttachmentTagListProvider","useAttachmentTagListContext_unstable","createContext","undefined","tagListContextDefaultValue","onAttachmentTagDismiss","Provider","selector","useContextSelector","ctx"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIaA,wBAAAA;eAAAA;;IAaAC,yBAAAA;eAAAA;;IAEAC,oCAAAA;eAAAA;;;sCAnBqC;AAI3C,MAAMF,2BAAmEG,IAAAA,mCAAAA,EAE9EC;AAEF,MAAMC,6BAA4D;4BAChEC,IAA8B;AAChC;AAOO,MAAML,4BAA4BD,yBAAyBO,QAAQ;AAEnE,MAAML,uCAAuCM,CAAAA,WAClDC,IAAAA,wCAAAA,EAAmBT,0BAA0B,CAACU,MAAML,0BAA0B,GAAKG,SAASE"}
|