@fluentui-copilot/react-attachments 0.8.1 → 0.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +37 -1
- package/CHANGELOG.md +21 -2
- package/dist/index.d.ts +112 -1
- package/lib/Attachment.js +2 -0
- package/lib/Attachment.js.map +1 -0
- package/lib/AttachmentList.js +2 -0
- package/lib/AttachmentList.js.map +1 -0
- package/lib/components/Attachment/Attachment.js +12 -0
- package/lib/components/Attachment/Attachment.js.map +1 -0
- package/lib/components/Attachment/Attachment.types.js +2 -0
- package/lib/components/Attachment/Attachment.types.js.map +1 -0
- package/lib/components/Attachment/index.js +6 -0
- package/lib/components/Attachment/index.js.map +1 -0
- package/lib/components/Attachment/renderAttachment.js +16 -0
- package/lib/components/Attachment/renderAttachment.js.map +1 -0
- package/lib/components/Attachment/useAttachment.js +71 -0
- package/lib/components/Attachment/useAttachment.js.map +1 -0
- package/lib/components/Attachment/useAttachmentStyles.js +82 -0
- package/lib/components/Attachment/useAttachmentStyles.js.map +1 -0
- 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/index.js +2 -0
- package/lib/components/index.js.map +1 -1
- package/lib/contexts/attachmentListContext.js +8 -0
- package/lib/contexts/attachmentListContext.js.map +1 -0
- package/lib/index.js +3 -0
- package/lib/index.js.map +1 -1
- package/lib-commonjs/Attachment.js +7 -0
- package/lib-commonjs/Attachment.js.map +1 -0
- package/lib-commonjs/AttachmentList.js +7 -0
- package/lib-commonjs/AttachmentList.js.map +1 -0
- package/lib-commonjs/components/Attachment/Attachment.js +21 -0
- package/lib-commonjs/components/Attachment/Attachment.js.map +1 -0
- package/lib-commonjs/components/Attachment/Attachment.types.js +5 -0
- package/lib-commonjs/components/Attachment/Attachment.types.js.map +1 -0
- package/lib-commonjs/components/Attachment/index.js +11 -0
- package/lib-commonjs/components/Attachment/index.js.map +1 -0
- package/lib-commonjs/components/Attachment/renderAttachment.js +28 -0
- package/lib-commonjs/components/Attachment/renderAttachment.js.map +1 -0
- package/lib-commonjs/components/Attachment/useAttachment.js +72 -0
- package/lib-commonjs/components/Attachment/useAttachment.js.map +1 -0
- package/lib-commonjs/components/Attachment/useAttachmentStyles.js +139 -0
- package/lib-commonjs/components/Attachment/useAttachmentStyles.js.map +1 -0
- 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/index.js +2 -0
- package/lib-commonjs/components/index.js.map +1 -1
- package/lib-commonjs/contexts/attachmentListContext.js +28 -0
- package/lib-commonjs/contexts/attachmentListContext.js.map +1 -0
- package/lib-commonjs/index.js +42 -0
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.js"],"sourcesContent":["export * from './AttachmentList';\nexport * from './AttachmentList.types';\nexport * from './renderAttachmentList';\nexport * from './useAttachmentList';\nexport * from './useAttachmentListStyles';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA;CACd,iCAAiC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "renderAttachmentList_unstable", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return renderAttachmentList_unstable;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
|
|
12
|
+
const _reactcomponents = require("@fluentui/react-components");
|
|
13
|
+
const _attachmentListContext = require("../../contexts/attachmentListContext");
|
|
14
|
+
const renderAttachmentList_unstable = (state, contextValues)=>{
|
|
15
|
+
(0, _reactcomponents.assertSlots)(state);
|
|
16
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_attachmentListContext.AttachmentListProvider, {
|
|
17
|
+
value: contextValues.attachmentList,
|
|
18
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(state.root, {})
|
|
19
|
+
});
|
|
20
|
+
}; //# sourceMappingURL=renderAttachmentList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["renderAttachmentList.js"],"sourcesContent":["import { jsx as _jsx } from \"@fluentui/react-jsx-runtime/jsx-runtime\";\nimport { assertSlots } from '@fluentui/react-components';\nimport { AttachmentListProvider } from '../../contexts/attachmentListContext';\n/**\n * Render the final JSX of AttachmentList\n */\nexport const renderAttachmentList_unstable = (state, contextValues) => {\n assertSlots(state);\n return /*#__PURE__*/_jsx(AttachmentListProvider, {\n value: contextValues.attachmentList,\n children: /*#__PURE__*/_jsx(state.root, {})\n });\n};\n//# sourceMappingURL=renderAttachmentList.js.map"],"names":["renderAttachmentList_unstable","state","contextValues","assertSlots","_jsx","AttachmentListProvider","value","attachmentList","children","root"],"mappings":";;;;+BAMaA;;;eAAAA;;;4BANe;iCACA;uCACW;AAIhC,MAAMA,gCAAgC,CAACC,OAAOC;IACnDC,IAAAA,4BAAW,EAACF;IACZ,OAAO,WAAW,GAAEG,IAAAA,eAAI,EAACC,6CAAsB,EAAE;QAC/CC,OAAOJ,cAAcK,cAAc;QACnCC,UAAU,WAAW,GAAEJ,IAAAA,eAAI,EAACH,MAAMQ,IAAI,EAAE,CAAC;IAC3C;AACF,GACA,gDAAgD"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "useAttachmentList_unstable", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return useAttachmentList_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 _reactsharedcontexts = require("@fluentui/react-shared-contexts");
|
|
15
|
+
const _reactoverflow = require("@fluentui/react-overflow");
|
|
16
|
+
const useAttachmentList_unstable = (props, ref)=>{
|
|
17
|
+
const { onAttachmentDismiss } = props;
|
|
18
|
+
const attachmentsVisibilityStatus = (0, _reactoverflow.useOverflowContext)((context)=>context.itemVisibility);
|
|
19
|
+
const innerRef = _react.useRef(null);
|
|
20
|
+
const { targetDocument } = (0, _reactsharedcontexts.useFluent_unstable)();
|
|
21
|
+
const { findNextFocusable, findPrevFocusable } = (0, _reactcomponents.useFocusFinders)();
|
|
22
|
+
const handleAttachmentDismiss = (0, _reactcomponents.useEventCallback)((e, data)=>{
|
|
23
|
+
var _innerRef_current;
|
|
24
|
+
if (!onAttachmentDismiss) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
onAttachmentDismiss(e, data);
|
|
28
|
+
// Remove attachment from overflow context
|
|
29
|
+
attachmentsVisibilityStatus === null || attachmentsVisibilityStatus === void 0 ? true : delete attachmentsVisibilityStatus[data.id];
|
|
30
|
+
// set focus after attachment dismiss
|
|
31
|
+
const activeElement = targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.activeElement;
|
|
32
|
+
if ((_innerRef_current = innerRef.current) === null || _innerRef_current === void 0 ? void 0 : _innerRef_current.contains(activeElement)) {
|
|
33
|
+
// focus on next attachment only if the active element is within the current attachment list
|
|
34
|
+
const next = findNextFocusable(activeElement, {
|
|
35
|
+
container: innerRef.current
|
|
36
|
+
});
|
|
37
|
+
if (next) {
|
|
38
|
+
next.focus();
|
|
39
|
+
return;
|
|
40
|
+
} else {
|
|
41
|
+
const prev = findPrevFocusable(activeElement === null || activeElement === void 0 ? void 0 : activeElement.parentElement, {
|
|
42
|
+
container: innerRef.current
|
|
43
|
+
});
|
|
44
|
+
prev === null || prev === void 0 ? void 0 : prev.focus();
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
const arrowNavigationProps = (0, _reactcomponents.useArrowNavigationGroup)({
|
|
49
|
+
circular: true,
|
|
50
|
+
axis: 'both',
|
|
51
|
+
memorizeCurrent: true
|
|
52
|
+
});
|
|
53
|
+
return {
|
|
54
|
+
onAttachmentDismiss: handleAttachmentDismiss,
|
|
55
|
+
components: {
|
|
56
|
+
root: 'div'
|
|
57
|
+
},
|
|
58
|
+
root: _reactcomponents.slot.always((0, _reactcomponents.getIntrinsicElementProps)('div', {
|
|
59
|
+
'aria-label': 'Attachments',
|
|
60
|
+
ref: (0, _reactcomponents.useMergedRefs)(ref, innerRef),
|
|
61
|
+
role: 'toolbar',
|
|
62
|
+
...arrowNavigationProps,
|
|
63
|
+
...props
|
|
64
|
+
}), {
|
|
65
|
+
elementType: 'div'
|
|
66
|
+
})
|
|
67
|
+
};
|
|
68
|
+
}; //# sourceMappingURL=useAttachmentList.js.map
|
|
@@ -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"}
|
|
@@ -6,4 +6,6 @@ const _export_star = require("@swc/helpers/_/_export_star");
|
|
|
6
6
|
_export_star._(require("./AttachmentTag"), exports);
|
|
7
7
|
_export_star._(require("./AttachmentTagList"), exports);
|
|
8
8
|
_export_star._(require("./AttachmentTagItem"), exports);
|
|
9
|
+
_export_star._(require("./Attachment"), exports);
|
|
10
|
+
_export_star._(require("./AttachmentList"), exports);
|
|
9
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.js"],"sourcesContent":["export * from './AttachmentTag';\nexport * from './AttachmentTagList';\nexport * from './AttachmentTagItem';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;CACd,iCAAiC"}
|
|
1
|
+
{"version":3,"sources":["index.js"],"sourcesContent":["export * from './AttachmentTag';\nexport * from './AttachmentTagList';\nexport * from './AttachmentTagItem';\nexport * from './Attachment';\nexport * from './AttachmentList';\n//# sourceMappingURL=index.js.map"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA;CACd,iCAAiC"}
|
|
@@ -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
|
+
AttachmentListContext: function() {
|
|
13
|
+
return AttachmentListContext;
|
|
14
|
+
},
|
|
15
|
+
AttachmentListProvider: function() {
|
|
16
|
+
return AttachmentListProvider;
|
|
17
|
+
},
|
|
18
|
+
useAttachmentListContext_unstable: function() {
|
|
19
|
+
return useAttachmentListContext_unstable;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
const _reactcontextselector = require("@fluentui/react-context-selector");
|
|
23
|
+
const AttachmentListContext = (0, _reactcontextselector.createContext)(undefined);
|
|
24
|
+
const attachmentListContextDefaultValue = {
|
|
25
|
+
onAttachmentDismiss: ()=>null
|
|
26
|
+
};
|
|
27
|
+
const AttachmentListProvider = AttachmentListContext.Provider;
|
|
28
|
+
const useAttachmentListContext_unstable = (selector)=>(0, _reactcontextselector.useContextSelector)(AttachmentListContext, (ctx = attachmentListContextDefaultValue)=>selector(ctx)); //# sourceMappingURL=attachmentListContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["attachmentListContext.js"],"sourcesContent":["import { createContext, useContextSelector } from '@fluentui/react-context-selector';\nexport const AttachmentListContext = createContext(undefined);\nconst attachmentListContextDefaultValue = {\n onAttachmentDismiss: () => null\n};\nexport const AttachmentListProvider = AttachmentListContext.Provider;\nexport const useAttachmentListContext_unstable = selector => useContextSelector(AttachmentListContext, (ctx = attachmentListContextDefaultValue) => selector(ctx));\n//# sourceMappingURL=attachmentListContext.js.map"],"names":["AttachmentListContext","AttachmentListProvider","useAttachmentListContext_unstable","createContext","undefined","attachmentListContextDefaultValue","onAttachmentDismiss","Provider","selector","useContextSelector","ctx"],"mappings":";;;;;;;;;;;IACaA,qBAAqB;eAArBA;;IAIAC,sBAAsB;eAAtBA;;IACAC,iCAAiC;eAAjCA;;;sCANqC;AAC3C,MAAMF,wBAAwBG,IAAAA,mCAAa,EAACC;AACnD,MAAMC,oCAAoC;IACxCC,qBAAqB,IAAM;AAC7B;AACO,MAAML,yBAAyBD,sBAAsBO,QAAQ;AAC7D,MAAML,oCAAoCM,CAAAA,WAAYC,IAAAA,wCAAkB,EAACT,uBAAuB,CAACU,MAAML,iCAAiC,GAAKG,SAASE,OAC7J,iDAAiD"}
|
package/lib-commonjs/index.js
CHANGED
|
@@ -53,9 +53,51 @@ _export(exports, {
|
|
|
53
53
|
},
|
|
54
54
|
useAttachmentTagItem_unstable: function() {
|
|
55
55
|
return _AttachmentTagItem.useAttachmentTagItem_unstable;
|
|
56
|
+
},
|
|
57
|
+
AttachmentList: function() {
|
|
58
|
+
return _AttachmentList.AttachmentList;
|
|
59
|
+
},
|
|
60
|
+
attachmentListClassNames: function() {
|
|
61
|
+
return _AttachmentList.attachmentListClassNames;
|
|
62
|
+
},
|
|
63
|
+
renderAttachmentList_unstable: function() {
|
|
64
|
+
return _AttachmentList.renderAttachmentList_unstable;
|
|
65
|
+
},
|
|
66
|
+
useAttachmentListStyles_unstable: function() {
|
|
67
|
+
return _AttachmentList.useAttachmentListStyles_unstable;
|
|
68
|
+
},
|
|
69
|
+
useAttachmentList_unstable: function() {
|
|
70
|
+
return _AttachmentList.useAttachmentList_unstable;
|
|
71
|
+
},
|
|
72
|
+
AttachmentListContext: function() {
|
|
73
|
+
return _attachmentListContext.AttachmentListContext;
|
|
74
|
+
},
|
|
75
|
+
AttachmentListProvider: function() {
|
|
76
|
+
return _attachmentListContext.AttachmentListProvider;
|
|
77
|
+
},
|
|
78
|
+
useAttachmentListContext_unstable: function() {
|
|
79
|
+
return _attachmentListContext.useAttachmentListContext_unstable;
|
|
80
|
+
},
|
|
81
|
+
Attachment: function() {
|
|
82
|
+
return _Attachment.Attachment;
|
|
83
|
+
},
|
|
84
|
+
attachmentClassNames: function() {
|
|
85
|
+
return _Attachment.attachmentClassNames;
|
|
86
|
+
},
|
|
87
|
+
renderAttachment_unstable: function() {
|
|
88
|
+
return _Attachment.renderAttachment_unstable;
|
|
89
|
+
},
|
|
90
|
+
useAttachmentStyles_unstable: function() {
|
|
91
|
+
return _Attachment.useAttachmentStyles_unstable;
|
|
92
|
+
},
|
|
93
|
+
useAttachment_unstable: function() {
|
|
94
|
+
return _Attachment.useAttachment_unstable;
|
|
56
95
|
}
|
|
57
96
|
});
|
|
58
97
|
const _AttachmentTag = require("./AttachmentTag");
|
|
59
98
|
const _AttachmentTagList = require("./AttachmentTagList");
|
|
60
99
|
const _AttachmentTagItem = require("./AttachmentTagItem");
|
|
100
|
+
const _AttachmentList = require("./AttachmentList");
|
|
101
|
+
const _attachmentListContext = require("./contexts/attachmentListContext");
|
|
102
|
+
const _Attachment = require("./Attachment");
|
|
61
103
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.js"],"sourcesContent":["export { AttachmentTag, attachmentTagClassNames, renderAttachmentTag_unstable, useAttachmentTagStyles_unstable, useAttachmentTag_unstable } from './AttachmentTag';\nexport { AttachmentTagList, attachmentTagListClassNames, renderAttachmentTagList_unstable, useAttachmentTagListStyles_unstable, useAttachmentTagList_unstable } from './AttachmentTagList';\nexport { AttachmentTagItem, attachmentTagItemClassNames, renderAttachmentTagItem_unstable, useAttachmentTagItemStyles_unstable, useAttachmentTagItem_unstable } from './AttachmentTagItem';\n//# sourceMappingURL=index.js.map"],"names":["AttachmentTag","attachmentTagClassNames","renderAttachmentTag_unstable","useAttachmentTagStyles_unstable","useAttachmentTag_unstable","AttachmentTagList","attachmentTagListClassNames","renderAttachmentTagList_unstable","useAttachmentTagListStyles_unstable","useAttachmentTagList_unstable","AttachmentTagItem","attachmentTagItemClassNames","renderAttachmentTagItem_unstable","useAttachmentTagItemStyles_unstable","useAttachmentTagItem_unstable"],"mappings":";;;;;;;;;;;IAASA,aAAa;eAAbA,4BAAa;;IAAEC,uBAAuB;eAAvBA,sCAAuB;;IAAEC,4BAA4B;eAA5BA,2CAA4B;;IAAEC,+BAA+B;eAA/BA,8CAA+B;;IAAEC,yBAAyB;eAAzBA,wCAAyB;;IAChIC,iBAAiB;eAAjBA,oCAAiB;;IAAEC,2BAA2B;eAA3BA,8CAA2B;;IAAEC,gCAAgC;eAAhCA,mDAAgC;;IAAEC,mCAAmC;eAAnCA,sDAAmC;;IAAEC,6BAA6B;eAA7BA,gDAA6B;;IACpJC,iBAAiB;eAAjBA,oCAAiB;;IAAEC,2BAA2B;eAA3BA,8CAA2B;;IAAEC,gCAAgC;eAAhCA,mDAAgC;;IAAEC,mCAAmC;eAAnCA,sDAAmC;;IAAEC,6BAA6B;eAA7BA,gDAA6B;;;+
|
|
1
|
+
{"version":3,"sources":["index.js"],"sourcesContent":["export { AttachmentTag, attachmentTagClassNames, renderAttachmentTag_unstable, useAttachmentTagStyles_unstable, useAttachmentTag_unstable } from './AttachmentTag';\nexport { AttachmentTagList, attachmentTagListClassNames, renderAttachmentTagList_unstable, useAttachmentTagListStyles_unstable, useAttachmentTagList_unstable } from './AttachmentTagList';\nexport { AttachmentTagItem, attachmentTagItemClassNames, renderAttachmentTagItem_unstable, useAttachmentTagItemStyles_unstable, useAttachmentTagItem_unstable } from './AttachmentTagItem';\nexport { AttachmentList, attachmentListClassNames, renderAttachmentList_unstable, useAttachmentListStyles_unstable, useAttachmentList_unstable } from './AttachmentList';\nexport { AttachmentListContext, AttachmentListProvider, useAttachmentListContext_unstable } from './contexts/attachmentListContext';\nexport { Attachment, attachmentClassNames, renderAttachment_unstable, useAttachmentStyles_unstable, useAttachment_unstable } from './Attachment';\n//# sourceMappingURL=index.js.map"],"names":["AttachmentTag","attachmentTagClassNames","renderAttachmentTag_unstable","useAttachmentTagStyles_unstable","useAttachmentTag_unstable","AttachmentTagList","attachmentTagListClassNames","renderAttachmentTagList_unstable","useAttachmentTagListStyles_unstable","useAttachmentTagList_unstable","AttachmentTagItem","attachmentTagItemClassNames","renderAttachmentTagItem_unstable","useAttachmentTagItemStyles_unstable","useAttachmentTagItem_unstable","AttachmentList","attachmentListClassNames","renderAttachmentList_unstable","useAttachmentListStyles_unstable","useAttachmentList_unstable","AttachmentListContext","AttachmentListProvider","useAttachmentListContext_unstable","Attachment","attachmentClassNames","renderAttachment_unstable","useAttachmentStyles_unstable","useAttachment_unstable"],"mappings":";;;;;;;;;;;IAASA,aAAa;eAAbA,4BAAa;;IAAEC,uBAAuB;eAAvBA,sCAAuB;;IAAEC,4BAA4B;eAA5BA,2CAA4B;;IAAEC,+BAA+B;eAA/BA,8CAA+B;;IAAEC,yBAAyB;eAAzBA,wCAAyB;;IAChIC,iBAAiB;eAAjBA,oCAAiB;;IAAEC,2BAA2B;eAA3BA,8CAA2B;;IAAEC,gCAAgC;eAAhCA,mDAAgC;;IAAEC,mCAAmC;eAAnCA,sDAAmC;;IAAEC,6BAA6B;eAA7BA,gDAA6B;;IACpJC,iBAAiB;eAAjBA,oCAAiB;;IAAEC,2BAA2B;eAA3BA,8CAA2B;;IAAEC,gCAAgC;eAAhCA,mDAAgC;;IAAEC,mCAAmC;eAAnCA,sDAAmC;;IAAEC,6BAA6B;eAA7BA,gDAA6B;;IACpJC,cAAc;eAAdA,8BAAc;;IAAEC,wBAAwB;eAAxBA,wCAAwB;;IAAEC,6BAA6B;eAA7BA,6CAA6B;;IAAEC,gCAAgC;eAAhCA,gDAAgC;;IAAEC,0BAA0B;eAA1BA,0CAA0B;;IACrIC,qBAAqB;eAArBA,4CAAqB;;IAAEC,sBAAsB;eAAtBA,6CAAsB;;IAAEC,iCAAiC;eAAjCA,wDAAiC;;IAChFC,UAAU;eAAVA,sBAAU;;IAAEC,oBAAoB;eAApBA,gCAAoB;;IAAEC,yBAAyB;eAAzBA,qCAAyB;;IAAEC,4BAA4B;eAA5BA,wCAA4B;;IAAEC,sBAAsB;eAAtBA,kCAAsB;;;+BALuB;mCACoB;mCACA;gCACf;uCACrD;4BACiC;CAClI,iCAAiC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-copilot/react-attachments",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.3",
|
|
4
4
|
"description": "A set of components related to attaching files in Copilot experiences.",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"@fluentui/react-context-selector": ">=9.1.34 <10.0.0",
|
|
22
22
|
"@fluentui/react-icons": ">=2.0.217 <3.0.0",
|
|
23
23
|
"@fluentui/react-jsx-runtime": ">=9.0.18 <10.0.0",
|
|
24
|
+
"@fluentui/react-overflow": ">=9.0.18 <10.0.0",
|
|
24
25
|
"@fluentui/react-shared-contexts": ">=9.11.1 <10.0.0",
|
|
25
26
|
"@types/react": ">=16.14.0 <19.0.0",
|
|
26
27
|
"@types/react-dom": ">=16.9.8 <19.0.0",
|