@fluentui-copilot/react-attachments 0.12.4 → 0.12.5-hotfix.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 +46 -1
- package/CHANGELOG.md +20 -2
- package/lib/AgentTag.js +0 -1
- package/lib/Attachment.js +0 -1
- package/lib/AttachmentList.js +0 -1
- package/lib/AttachmentOverflowMenu.js +0 -1
- package/lib/AttachmentOverflowMenuButton.js +0 -1
- package/lib/AttachmentOverflowMenuItem.js +0 -1
- package/lib/AttachmentTag.js +0 -1
- package/lib/AttachmentTagItem.js +0 -1
- package/lib/AttachmentTagList.js +0 -1
- package/lib/components/AgentTag/AgentTag.js +4 -5
- package/lib/components/AgentTag/AgentTag.types.js +1 -2
- package/lib/components/AgentTag/index.js +0 -1
- package/lib/components/AgentTag/renderAgentTag.js +3 -5
- package/lib/components/AgentTag/useAgentTag.js +7 -9
- package/lib/components/AgentTag/useAgentTagStyles.styles.raw.js +66 -0
- package/lib/components/AgentTag/useAgentTagStyles.styles.raw.js.map +1 -0
- package/lib/components/Attachment/Attachment.js +5 -6
- package/lib/components/Attachment/Attachment.types.js +1 -2
- package/lib/components/Attachment/index.js +0 -1
- package/lib/components/Attachment/renderAttachment.js +36 -31
- package/lib/components/Attachment/useAttachment.js +85 -95
- package/lib/components/Attachment/useAttachmentStyles.styles.js +34 -12
- package/lib/components/Attachment/useAttachmentStyles.styles.js.map +1 -1
- package/lib/components/Attachment/useAttachmentStyles.styles.raw.js +317 -0
- package/lib/components/Attachment/useAttachmentStyles.styles.raw.js.map +1 -0
- package/lib/components/AttachmentList/AttachmentList.js +6 -7
- package/lib/components/AttachmentList/AttachmentList.types.js +1 -2
- package/lib/components/AttachmentList/index.js +0 -1
- package/lib/components/AttachmentList/renderAttachmentList.js +25 -25
- package/lib/components/AttachmentList/useAttachmentList.js +113 -124
- package/lib/components/AttachmentList/useAttachmentListContextValues.js +10 -15
- package/lib/components/AttachmentList/useAttachmentListStyles.styles.raw.js +44 -0
- package/lib/components/AttachmentList/useAttachmentListStyles.styles.raw.js.map +1 -0
- package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js +8 -9
- package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js +1 -2
- package/lib/components/AttachmentOverflowMenu/index.js +0 -1
- package/lib/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js +8 -13
- package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js +9 -15
- package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js +10 -15
- package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js +5 -6
- package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js +1 -2
- package/lib/components/AttachmentOverflowMenuButton/index.js +0 -1
- package/lib/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js +11 -10
- package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js +51 -59
- package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js +102 -0
- package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js.map +1 -0
- package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js +4 -5
- package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js +1 -2
- package/lib/components/AttachmentOverflowMenuItem/index.js +0 -1
- package/lib/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js +9 -8
- package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +41 -49
- package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js +57 -0
- package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js.map +1 -0
- package/lib/components/AttachmentTag/AttachmentTag.js +5 -7
- package/lib/components/AttachmentTag/AttachmentTag.types.js +1 -2
- package/lib/components/AttachmentTag/index.js +0 -1
- package/lib/components/AttachmentTag/renderAttachmentTag.js +10 -8
- package/lib/components/AttachmentTag/useAttachmentTag.js +9 -11
- package/lib/components/AttachmentTag/useAttachmentTagStyles.styles.raw.js +98 -0
- package/lib/components/AttachmentTag/useAttachmentTagStyles.styles.raw.js.map +1 -0
- package/lib/components/AttachmentTagItem/AttachmentTagItem.js +4 -6
- package/lib/components/AttachmentTagItem/AttachmentTagItem.types.js +1 -2
- package/lib/components/AttachmentTagItem/index.js +0 -1
- package/lib/components/AttachmentTagItem/renderAttachmentTagItem.js +10 -8
- package/lib/components/AttachmentTagItem/useAttachmentTagItem.js +9 -11
- package/lib/components/AttachmentTagItem/useAttachmentTagItemStyles.styles.raw.js +34 -0
- package/lib/components/AttachmentTagItem/useAttachmentTagItemStyles.styles.raw.js.map +1 -0
- package/lib/components/AttachmentTagList/AttachmentTagList.js +6 -8
- package/lib/components/AttachmentTagList/AttachmentTagList.types.js +1 -2
- package/lib/components/AttachmentTagList/index.js +0 -1
- package/lib/components/AttachmentTagList/renderAttachmentTagList.js +7 -9
- package/lib/components/AttachmentTagList/useAttachmentTagList.js +21 -25
- package/lib/components/AttachmentTagList/useAttachmentTagListContextValues.js +8 -11
- package/lib/components/AttachmentTagList/useAttachmentTagListStyles.styles.raw.js +21 -0
- package/lib/components/AttachmentTagList/useAttachmentTagListStyles.styles.raw.js.map +1 -0
- package/lib/components/index.js +0 -1
- package/lib/components/utils/useAttachmentTagSlots.js +45 -52
- package/lib/components/utils/useProgressBarStyles.styles.raw.js +42 -0
- package/lib/components/utils/useProgressBarStyles.styles.raw.js.map +1 -0
- package/lib/contexts/attachmentListContext.js +4 -5
- package/lib/contexts/attachmentOverflowMenuContext.js +4 -5
- package/lib/contexts/attachmentTagListContext.js +2 -3
- package/lib/index.js +0 -1
- package/lib-commonjs/AgentTag.js +0 -1
- package/lib-commonjs/Attachment.js +0 -1
- package/lib-commonjs/AttachmentList.js +0 -1
- package/lib-commonjs/AttachmentOverflowMenu.js +0 -1
- package/lib-commonjs/AttachmentOverflowMenuButton.js +0 -1
- package/lib-commonjs/AttachmentOverflowMenuItem.js +0 -1
- package/lib-commonjs/AttachmentTag.js +0 -1
- package/lib-commonjs/AttachmentTagItem.js +0 -1
- package/lib-commonjs/AttachmentTagList.js +0 -1
- package/lib-commonjs/components/AgentTag/AgentTag.js +1 -1
- package/lib-commonjs/components/AgentTag/AgentTag.js.map +1 -1
- package/lib-commonjs/components/AgentTag/AgentTag.types.js +0 -1
- package/lib-commonjs/components/AgentTag/index.js +0 -1
- package/lib-commonjs/components/AgentTag/renderAgentTag.js +1 -1
- package/lib-commonjs/components/AgentTag/renderAgentTag.js.map +1 -1
- package/lib-commonjs/components/AgentTag/useAgentTag.js +1 -1
- package/lib-commonjs/components/AgentTag/useAgentTag.js.map +1 -1
- package/lib-commonjs/components/AgentTag/useAgentTagStyles.styles.raw.js +82 -0
- package/lib-commonjs/components/AgentTag/useAgentTagStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/Attachment/Attachment.js +1 -1
- package/lib-commonjs/components/Attachment/Attachment.js.map +1 -1
- package/lib-commonjs/components/Attachment/Attachment.types.js +0 -1
- package/lib-commonjs/components/Attachment/index.js +0 -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 +1 -1
- package/lib-commonjs/components/Attachment/useAttachment.js.map +1 -1
- package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.js +52 -26
- package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.js.map +1 -1
- package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.raw.js +336 -0
- package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/AttachmentList/AttachmentList.js +1 -1
- package/lib-commonjs/components/AttachmentList/AttachmentList.js.map +1 -1
- package/lib-commonjs/components/AttachmentList/AttachmentList.types.js +0 -1
- package/lib-commonjs/components/AttachmentList/index.js +0 -1
- package/lib-commonjs/components/AttachmentList/renderAttachmentList.js +1 -1
- package/lib-commonjs/components/AttachmentList/renderAttachmentList.js.map +1 -1
- package/lib-commonjs/components/AttachmentList/useAttachmentList.js +1 -1
- package/lib-commonjs/components/AttachmentList/useAttachmentList.js.map +1 -1
- package/lib-commonjs/components/AttachmentList/useAttachmentListContextValues.js +1 -1
- package/lib-commonjs/components/AttachmentList/useAttachmentListContextValues.js.map +1 -1
- package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.styles.raw.js +60 -0
- package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js +0 -1
- package/lib-commonjs/components/AttachmentOverflowMenu/index.js +0 -1
- package/lib-commonjs/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js +0 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/index.js +0 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js +118 -0
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js +0 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/index.js +0 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js +73 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/AttachmentTag/AttachmentTag.js +1 -1
- package/lib-commonjs/components/AttachmentTag/AttachmentTag.js.map +1 -1
- package/lib-commonjs/components/AttachmentTag/AttachmentTag.types.js +0 -1
- package/lib-commonjs/components/AttachmentTag/index.js +0 -1
- package/lib-commonjs/components/AttachmentTag/renderAttachmentTag.js +1 -1
- package/lib-commonjs/components/AttachmentTag/renderAttachmentTag.js.map +1 -1
- package/lib-commonjs/components/AttachmentTag/useAttachmentTag.js +1 -1
- package/lib-commonjs/components/AttachmentTag/useAttachmentTag.js.map +1 -1
- package/lib-commonjs/components/AttachmentTag/useAttachmentTagStyles.styles.raw.js +118 -0
- package/lib-commonjs/components/AttachmentTag/useAttachmentTagStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.js +1 -1
- package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.types.js +0 -1
- package/lib-commonjs/components/AttachmentTagItem/index.js +0 -1
- package/lib-commonjs/components/AttachmentTagItem/renderAttachmentTagItem.js +1 -1
- package/lib-commonjs/components/AttachmentTagItem/renderAttachmentTagItem.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItem.js +1 -1
- package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItem.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItemStyles.styles.raw.js +50 -0
- package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItemStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/AttachmentTagList/AttachmentTagList.js +1 -1
- package/lib-commonjs/components/AttachmentTagList/AttachmentTagList.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagList/AttachmentTagList.types.js +0 -1
- package/lib-commonjs/components/AttachmentTagList/index.js +0 -1
- package/lib-commonjs/components/AttachmentTagList/renderAttachmentTagList.js +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 +1 -1
- package/lib-commonjs/components/AttachmentTagList/useAttachmentTagListContextValues.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagList/useAttachmentTagListStyles.styles.raw.js +37 -0
- package/lib-commonjs/components/AttachmentTagList/useAttachmentTagListStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/index.js +0 -1
- package/lib-commonjs/components/utils/useAttachmentTagSlots.js +1 -1
- package/lib-commonjs/components/utils/useAttachmentTagSlots.js.map +1 -1
- package/lib-commonjs/components/utils/useProgressBarStyles.styles.raw.js +50 -0
- package/lib-commonjs/components/utils/useProgressBarStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/contexts/attachmentListContext.js +1 -1
- package/lib-commonjs/contexts/attachmentListContext.js.map +1 -1
- package/lib-commonjs/contexts/attachmentOverflowMenuContext.js +1 -1
- package/lib-commonjs/contexts/attachmentOverflowMenuContext.js.map +1 -1
- package/lib-commonjs/contexts/attachmentTagListContext.js +1 -1
- package/lib-commonjs/contexts/attachmentTagListContext.js.map +1 -1
- package/lib-commonjs/index.js +0 -1
- package/package.json +5 -9
|
@@ -26,4 +26,3 @@ const _AttachmentOverflowMenu = require("./AttachmentOverflowMenu");
|
|
|
26
26
|
const _renderAttachmentOverflowMenu = require("./renderAttachmentOverflowMenu");
|
|
27
27
|
const _useAttachmentOverflowMenu = require("./useAttachmentOverflowMenu");
|
|
28
28
|
const _useAttachmentOverflowMenuContextValues = require("./useAttachmentOverflowMenuContextValues");
|
|
29
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -18,4 +18,4 @@ const renderAttachmentOverflowMenu_unstable = (state, contextValues)=>{
|
|
|
18
18
|
value: attachmentOverflowMenuContextValues.attachmentOverflowMenu,
|
|
19
19
|
children: (0, _reactcomponents.renderMenu_unstable)(state, menuContextValues)
|
|
20
20
|
}) : null;
|
|
21
|
-
};
|
|
21
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderAttachmentOverflowMenu.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots, renderMenu_unstable } from '@fluentui/react-components';\nimport { AttachmentOverflowMenuProvider } from '../../contexts/attachmentOverflowMenuContext';\nimport type {\n AttachmentOverflowMenuState,\n AttachmentOverflowMenuSlots,\n AttachmentOverflowMenuContextValues,\n} from './AttachmentOverflowMenu.types';\nimport type { MenuContextValues } from '@fluentui/react-components';\n\n/**\n * Render the final JSX of AttachmentOverflowMenu\n */\nexport const renderAttachmentOverflowMenu_unstable = (\n state: AttachmentOverflowMenuState,\n contextValues: {\n menuContextValues: MenuContextValues;\n attachmentOverflowMenuContextValues: AttachmentOverflowMenuContextValues;\n },\n) => {\n const { menuContextValues, attachmentOverflowMenuContextValues } = contextValues;\n assertSlots<AttachmentOverflowMenuSlots>(state);\n\n return state.isOverflowing ? (\n <AttachmentOverflowMenuProvider value={attachmentOverflowMenuContextValues.attachmentOverflowMenu}>\n {renderMenu_unstable(state, menuContextValues)}\n </AttachmentOverflowMenuProvider>\n ) : null;\n};\n"],"names":["menuContextValues","attachmentOverflowMenuContextValues","assertSlots","isOverflowing","
|
|
1
|
+
{"version":3,"sources":["renderAttachmentOverflowMenu.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots, renderMenu_unstable } from '@fluentui/react-components';\nimport { AttachmentOverflowMenuProvider } from '../../contexts/attachmentOverflowMenuContext';\nimport type {\n AttachmentOverflowMenuState,\n AttachmentOverflowMenuSlots,\n AttachmentOverflowMenuContextValues,\n} from './AttachmentOverflowMenu.types';\nimport type { MenuContextValues } from '@fluentui/react-components';\n\n/**\n * Render the final JSX of AttachmentOverflowMenu\n */\nexport const renderAttachmentOverflowMenu_unstable = (\n state: AttachmentOverflowMenuState,\n contextValues: {\n menuContextValues: MenuContextValues;\n attachmentOverflowMenuContextValues: AttachmentOverflowMenuContextValues;\n },\n) => {\n const { menuContextValues, attachmentOverflowMenuContextValues } = contextValues;\n assertSlots<AttachmentOverflowMenuSlots>(state);\n\n return state.isOverflowing ? (\n <AttachmentOverflowMenuProvider value={attachmentOverflowMenuContextValues.attachmentOverflowMenu}>\n {renderMenu_unstable(state, menuContextValues)}\n </AttachmentOverflowMenuProvider>\n ) : null;\n};\n"],"names":["renderAttachmentOverflowMenu_unstable","state","contextValues","menuContextValues","attachmentOverflowMenuContextValues","assertSlots","isOverflowing","_jsx","AttachmentOverflowMenuProvider","value","attachmentOverflowMenu","renderMenu_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAeaA;;;eAAAA;;;4BAdb;iCAEiD;+CACF;AAWxC,MAAMA,wCAAwC,CACnDC,OACAC;IAKA,MAAM,EAAEC,iBAAiB,EAAEC,mCAAmC,EAAE,GAAGF;IACnEG,IAAAA,4BAAAA,EAAyCJ;IAEzC,OAAOA,MAAMK,aAAa,GAAA,WAAA,GACxBC,IAAAA,eAAA,EAACC,6DAAAA,EAAAA;QAA+BC,OAAOL,oCAAoCM,sBAAsB;kBAC9FC,IAAAA,oCAAAA,EAAoBV,OAAOE;SAE5B;AACN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useAttachmentOverflowMenu.ts"],"sourcesContent":["import { useMenu_unstable, useOverflowMenu } from '@fluentui/react-components';\nimport type { AttachmentOverflowMenuProps, AttachmentOverflowMenuState } from './AttachmentOverflowMenu.types';\n\n/**\n * Create the state required to render AttachmentOverflowMenu.\n *\n * The returned state can be modified with hooks such as useAttachmentOverflowMenuStyles_unstable,\n * before being passed to renderAttachmentOverflowMenu_unstable.\n *\n * @param props - props from this instance of AttachmentOverflowMenu\n */\nexport const useAttachmentOverflowMenu_unstable = (props: AttachmentOverflowMenuProps): AttachmentOverflowMenuState => {\n const menuState = useMenu_unstable(props);\n const { isOverflowing, ref: overflowButtonRef, overflowCount } = useOverflowMenu<HTMLButtonElement>();\n\n return {\n ...menuState,\n isOverflowing,\n overflowButtonRef,\n overflowCount,\n };\n};\n"],"names":["
|
|
1
|
+
{"version":3,"sources":["useAttachmentOverflowMenu.ts"],"sourcesContent":["import { useMenu_unstable, useOverflowMenu } from '@fluentui/react-components';\nimport type { AttachmentOverflowMenuProps, AttachmentOverflowMenuState } from './AttachmentOverflowMenu.types';\n\n/**\n * Create the state required to render AttachmentOverflowMenu.\n *\n * The returned state can be modified with hooks such as useAttachmentOverflowMenuStyles_unstable,\n * before being passed to renderAttachmentOverflowMenu_unstable.\n *\n * @param props - props from this instance of AttachmentOverflowMenu\n */\nexport const useAttachmentOverflowMenu_unstable = (props: AttachmentOverflowMenuProps): AttachmentOverflowMenuState => {\n const menuState = useMenu_unstable(props);\n const { isOverflowing, ref: overflowButtonRef, overflowCount } = useOverflowMenu<HTMLButtonElement>();\n\n return {\n ...menuState,\n isOverflowing,\n overflowButtonRef,\n overflowCount,\n };\n};\n"],"names":["useAttachmentOverflowMenu_unstable","props","menuState","useMenu_unstable","isOverflowing","ref","overflowButtonRef","overflowCount","useOverflowMenu"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;iCAXqC;AAW3C,MAAMA,qCAAqC,CAACC;IACjD,MAAMC,YAAYC,IAAAA,iCAAAA,EAAiBF;IACnC,MAAM,EAAEG,aAAa,EAAEC,KAAKC,iBAAiB,EAAEC,aAAa,EAAE,GAAGC,IAAAA,gCAAAA;IAEjE,OAAO;QACL,GAAGN,SAAS;QACZE;QACAE;QACAC;IACF;AACF"}
|
package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useAttachmentOverflowMenuContextValues.ts"],"sourcesContent":["import type { AttachmentOverflowMenuContextValues, AttachmentOverflowMenuState } from './AttachmentOverflowMenu.types';\n\nexport function useAttachmentOverflowMenuContextValues_unstable(\n state: AttachmentOverflowMenuState,\n): AttachmentOverflowMenuContextValues {\n const { isOverflowing, overflowButtonRef, overflowCount } = state;\n\n // This context is created with \"@fluentui/react-context-selector\", there is no sense to memoize it\n const attachmentOverflowMenu = {\n isOverflowing,\n overflowButtonRef,\n overflowCount,\n };\n\n return { attachmentOverflowMenu };\n}\n"],"names":["useAttachmentOverflowMenuContextValues_unstable","state","isOverflowing","overflowButtonRef","
|
|
1
|
+
{"version":3,"sources":["useAttachmentOverflowMenuContextValues.ts"],"sourcesContent":["import type { AttachmentOverflowMenuContextValues, AttachmentOverflowMenuState } from './AttachmentOverflowMenu.types';\n\nexport function useAttachmentOverflowMenuContextValues_unstable(\n state: AttachmentOverflowMenuState,\n): AttachmentOverflowMenuContextValues {\n const { isOverflowing, overflowButtonRef, overflowCount } = state;\n\n // This context is created with \"@fluentui/react-context-selector\", there is no sense to memoize it\n const attachmentOverflowMenu = {\n isOverflowing,\n overflowButtonRef,\n overflowCount,\n };\n\n return { attachmentOverflowMenu };\n}\n"],"names":["useAttachmentOverflowMenuContextValues_unstable","state","isOverflowing","overflowButtonRef","overflowCount","attachmentOverflowMenu"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAEgBA;;;eAAAA;;;AAAT,SAASA,gDACdC,KAAkC;IAElC,MAAM,EAAEC,aAAa,EAAEC,iBAAiB,EAAEC,aAAa,EAAE,GAAGH;IAE5D,mGAAmG;IACnG,MAAMI,yBAAyB;QAC7BH;QACAC;QACAC;IACF;IAEA,OAAO;QAAEC;IAAuB;AAClC"}
|
package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js
CHANGED
|
@@ -20,4 +20,4 @@ const AttachmentOverflowMenuButton = /*#__PURE__*/ _react.forwardRef((props, ref
|
|
|
20
20
|
(0, _reactprovider.useCustomStyleHook)('useAttachmentOverflowMenuButtonStyles')(state);
|
|
21
21
|
return (0, _renderAttachmentOverflowMenuButton.renderAttachmentOverflowMenuButton_unstable)(state);
|
|
22
22
|
});
|
|
23
|
-
AttachmentOverflowMenuButton.displayName = 'AttachmentOverflowMenuButton';
|
|
23
|
+
AttachmentOverflowMenuButton.displayName = 'AttachmentOverflowMenuButton';
|
package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AttachmentOverflowMenuButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentOverflowMenuButton_unstable } from './useAttachmentOverflowMenuButton';\nimport { renderAttachmentOverflowMenuButton_unstable } from './renderAttachmentOverflowMenuButton';\nimport { useAttachmentOverflowMenuButtonStyles_unstable } from './useAttachmentOverflowMenuButtonStyles.styles';\nimport type { AttachmentOverflowMenuButtonProps } from './AttachmentOverflowMenuButton.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\nexport const AttachmentOverflowMenuButton: ForwardRefComponent<AttachmentOverflowMenuButtonProps> = React.forwardRef(\n (props, ref) => {\n const state = useAttachmentOverflowMenuButton_unstable(props, ref);\n\n useAttachmentOverflowMenuButtonStyles_unstable(state);\n useCustomStyleHook('useAttachmentOverflowMenuButtonStyles')(state);\n\n return renderAttachmentOverflowMenuButton_unstable(state);\n },\n);\n\nAttachmentOverflowMenuButton.displayName = 'AttachmentOverflowMenuButton';\n"],"names":["AttachmentOverflowMenuButton","React","forwardRef","props","state","useAttachmentOverflowMenuButton_unstable","useAttachmentOverflowMenuButtonStyles_unstable","useCustomStyleHook","renderAttachmentOverflowMenuButton_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;;iEARU;iDACkC;oDACG;6DACG;+BAG5B;AAE5B,MAAMA,+BAAAA,WAAAA,
|
|
1
|
+
{"version":3,"sources":["AttachmentOverflowMenuButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentOverflowMenuButton_unstable } from './useAttachmentOverflowMenuButton';\nimport { renderAttachmentOverflowMenuButton_unstable } from './renderAttachmentOverflowMenuButton';\nimport { useAttachmentOverflowMenuButtonStyles_unstable } from './useAttachmentOverflowMenuButtonStyles.styles';\nimport type { AttachmentOverflowMenuButtonProps } from './AttachmentOverflowMenuButton.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\nexport const AttachmentOverflowMenuButton: ForwardRefComponent<AttachmentOverflowMenuButtonProps> = React.forwardRef(\n (props, ref) => {\n const state = useAttachmentOverflowMenuButton_unstable(props, ref);\n\n useAttachmentOverflowMenuButtonStyles_unstable(state);\n useCustomStyleHook('useAttachmentOverflowMenuButtonStyles')(state);\n\n return renderAttachmentOverflowMenuButton_unstable(state);\n },\n);\n\nAttachmentOverflowMenuButton.displayName = 'AttachmentOverflowMenuButton';\n"],"names":["AttachmentOverflowMenuButton","React","forwardRef","props","ref","state","useAttachmentOverflowMenuButton_unstable","useAttachmentOverflowMenuButtonStyles_unstable","useCustomStyleHook","renderAttachmentOverflowMenuButton_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;;iEARU;iDACkC;oDACG;6DACG;+BAG5B;AAE5B,MAAMA,+BAAAA,WAAAA,GAAuFC,OAAMC,UAAU,CAClH,CAACC,OAAOC;IACN,MAAMC,QAAQC,IAAAA,yEAAAA,EAAyCH,OAAOC;IAE9DG,IAAAA,2FAAAA,EAA+CF;IAC/CG,IAAAA,iCAAAA,EAAmB,yCAAyCH;IAE5D,OAAOI,IAAAA,+EAAAA,EAA4CJ;AACrD;AAGFL,6BAA6BU,WAAW,GAAG"}
|
|
@@ -29,4 +29,3 @@ const _AttachmentOverflowMenuButton = require("./AttachmentOverflowMenuButton");
|
|
|
29
29
|
const _renderAttachmentOverflowMenuButton = require("./renderAttachmentOverflowMenuButton");
|
|
30
30
|
const _useAttachmentOverflowMenuButton = require("./useAttachmentOverflowMenuButton");
|
|
31
31
|
const _useAttachmentOverflowMenuButtonStylesstyles = require("./useAttachmentOverflowMenuButtonStyles.styles");
|
|
32
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderAttachmentOverflowMenuButton.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { MenuTrigger, assertSlots } from '@fluentui/react-components';\nimport type {\n AttachmentOverflowMenuButtonState,\n AttachmentOverflowMenuButtonSlots,\n} from './AttachmentOverflowMenuButton.types';\n\n/**\n * Render the final JSX of AttachmentOverflowMenuButton\n */\nexport const renderAttachmentOverflowMenuButton_unstable = (state: AttachmentOverflowMenuButtonState) => {\n assertSlots<AttachmentOverflowMenuButtonSlots>(state);\n\n return state.isOverflowing ? (\n <MenuTrigger>\n <state.root>\n {state.root.children}\n {state.isLoading && <state.progress />}\n </state.root>\n </MenuTrigger>\n ) : null;\n};\n"],"names":["
|
|
1
|
+
{"version":3,"sources":["renderAttachmentOverflowMenuButton.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { MenuTrigger, assertSlots } from '@fluentui/react-components';\nimport type {\n AttachmentOverflowMenuButtonState,\n AttachmentOverflowMenuButtonSlots,\n} from './AttachmentOverflowMenuButton.types';\n\n/**\n * Render the final JSX of AttachmentOverflowMenuButton\n */\nexport const renderAttachmentOverflowMenuButton_unstable = (state: AttachmentOverflowMenuButtonState) => {\n assertSlots<AttachmentOverflowMenuButtonSlots>(state);\n\n return state.isOverflowing ? (\n <MenuTrigger>\n <state.root>\n {state.root.children}\n {state.isLoading && <state.progress />}\n </state.root>\n </MenuTrigger>\n ) : null;\n};\n"],"names":["renderAttachmentOverflowMenuButton_unstable","state","assertSlots","isOverflowing","_jsx","MenuTrigger","_jsxs","root","children","isLoading","progress"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAYaA;;;eAAAA;;;4BAXb;iCAEyC;AASlC,MAAMA,8CAA8C,CAACC;IAC1DC,IAAAA,4BAAAA,EAA+CD;IAE/C,OAAOA,MAAME,aAAa,GAAA,WAAA,GACxBC,IAAAA,eAAA,EAACC,4BAAAA,EAAAA;kBACC,WAAA,GAAAC,IAAAA,gBAAA,EAACL,MAAMM,IAAI,EAAA;;gBACRN,MAAMM,IAAI,CAACC,QAAQ;gBACnBP,MAAMQ,SAAS,IAAA,WAAA,GAAIL,IAAAA,eAAA,EAACH,MAAMS,QAAQ,EAAA,CAAA;;;SAGrC;AACN"}
|
package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js
CHANGED
|
@@ -69,4 +69,4 @@ function defaultButtonText(props, overflowCount, designVersion, copilotMode, ful
|
|
|
69
69
|
return /*#__PURE__*/ _react.createElement(_react.Fragment, null, copilotMode === 'canvas' ? /*#__PURE__*/ _react.createElement(_reacticons.Attach24Regular, null) : /*#__PURE__*/ _react.createElement(_reacticons.Attach20Regular, null), overflowCount);
|
|
70
70
|
}
|
|
71
71
|
return `+${overflowCount}`;
|
|
72
|
-
}
|
|
72
|
+
}
|
package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useAttachmentOverflowMenuButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { CopilotMode, DesignVersion } from '@fluentui-copilot/react-provider';\nimport { useCopilotMode, useDesignVersion } from '@fluentui-copilot/react-provider';\nimport { ProgressBar, getIntrinsicElementProps, slot, useMergedRefs } from '@fluentui/react-components';\nimport { useAttachmentOverflowMenuContext_unstable } from '../../contexts/attachmentOverflowMenuContext';\nimport type {\n AttachmentOverflowMenuButtonProps,\n AttachmentOverflowMenuButtonState,\n} from './AttachmentOverflowMenuButton.types';\nimport { Attach20Regular, Attach24Regular } from '@fluentui/react-icons';\nimport { useAttachmentListContext_unstable } from '../../contexts/attachmentListContext';\n\n/**\n * Create the state required to render AttachmentOverflowMenuButton.\n *\n * The returned state can be modified with hooks such as useAttachmentOverflowMenuButtonStyles_unstable,\n * before being passed to renderAttachmentOverflowMenuButton_unstable.\n *\n * @param props - props from this instance of AttachmentOverflowMenuButton\n * @param ref - reference to root HTMLElement of AttachmentOverflowMenuButton\n */\nexport const useAttachmentOverflowMenuButton_unstable = (\n props: AttachmentOverflowMenuButtonProps,\n ref: React.Ref<HTMLButtonElement>,\n): AttachmentOverflowMenuButtonState => {\n const { isOverflowing, overflowCount, overflowButtonRef } = useAttachmentOverflowMenuContext_unstable(\n context => context,\n );\n const { numberOfAttachments } = useAttachmentListContext_unstable(context => context);\n\n const fullyOverflowed = overflowCount >= numberOfAttachments;\n const isLoading = !!props.isLoading;\n\n const designVersion = useDesignVersion(props.designVersion);\n const mode = useCopilotMode(props.mode);\n\n const buttonText = defaultButtonText(props, overflowCount, designVersion, mode, fullyOverflowed);\n\n return {\n components: {\n root: 'button',\n progress: ProgressBar,\n },\n root: slot.always(\n getIntrinsicElementProps('button', {\n ref: useMergedRefs(ref, overflowButtonRef),\n ...props,\n }),\n {\n defaultProps: {\n children: buttonText,\n },\n elementType: 'button',\n },\n ),\n progress: slot.always(props.progress, {\n defaultProps: { value: undefined, shape: 'square', thickness: 'large', 'aria-label': 'Loading' },\n elementType: ProgressBar,\n }),\n fullyOverflowed,\n isOverflowing,\n overflowCount,\n isLoading,\n designVersion,\n mode,\n };\n};\n\nfunction defaultButtonText(\n props: AttachmentOverflowMenuButtonProps,\n overflowCount: number,\n designVersion: DesignVersion['designVersion'],\n copilotMode: CopilotMode['mode'],\n fullyOverflowed: boolean,\n) {\n if (props.children) {\n return props.children;\n }\n\n if (props.text) {\n if (typeof props.text === 'function') {\n return props.text(overflowCount);\n } else {\n return props.text;\n }\n }\n\n if (designVersion === 'next' && fullyOverflowed) {\n return (\n <>\n {copilotMode === 'canvas' ? <Attach24Regular /> : <Attach20Regular />}\n {overflowCount}\n </>\n );\n }\n\n return `+${overflowCount}`;\n}\n"],"names":["isOverflowing","overflowButtonRef","useAttachmentOverflowMenuContext_unstable","
|
|
1
|
+
{"version":3,"sources":["useAttachmentOverflowMenuButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { CopilotMode, DesignVersion } from '@fluentui-copilot/react-provider';\nimport { useCopilotMode, useDesignVersion } from '@fluentui-copilot/react-provider';\nimport { ProgressBar, getIntrinsicElementProps, slot, useMergedRefs } from '@fluentui/react-components';\nimport { useAttachmentOverflowMenuContext_unstable } from '../../contexts/attachmentOverflowMenuContext';\nimport type {\n AttachmentOverflowMenuButtonProps,\n AttachmentOverflowMenuButtonState,\n} from './AttachmentOverflowMenuButton.types';\nimport { Attach20Regular, Attach24Regular } from '@fluentui/react-icons';\nimport { useAttachmentListContext_unstable } from '../../contexts/attachmentListContext';\n\n/**\n * Create the state required to render AttachmentOverflowMenuButton.\n *\n * The returned state can be modified with hooks such as useAttachmentOverflowMenuButtonStyles_unstable,\n * before being passed to renderAttachmentOverflowMenuButton_unstable.\n *\n * @param props - props from this instance of AttachmentOverflowMenuButton\n * @param ref - reference to root HTMLElement of AttachmentOverflowMenuButton\n */\nexport const useAttachmentOverflowMenuButton_unstable = (\n props: AttachmentOverflowMenuButtonProps,\n ref: React.Ref<HTMLButtonElement>,\n): AttachmentOverflowMenuButtonState => {\n const { isOverflowing, overflowCount, overflowButtonRef } = useAttachmentOverflowMenuContext_unstable(\n context => context,\n );\n const { numberOfAttachments } = useAttachmentListContext_unstable(context => context);\n\n const fullyOverflowed = overflowCount >= numberOfAttachments;\n const isLoading = !!props.isLoading;\n\n const designVersion = useDesignVersion(props.designVersion);\n const mode = useCopilotMode(props.mode);\n\n const buttonText = defaultButtonText(props, overflowCount, designVersion, mode, fullyOverflowed);\n\n return {\n components: {\n root: 'button',\n progress: ProgressBar,\n },\n root: slot.always(\n getIntrinsicElementProps('button', {\n ref: useMergedRefs(ref, overflowButtonRef),\n ...props,\n }),\n {\n defaultProps: {\n children: buttonText,\n },\n elementType: 'button',\n },\n ),\n progress: slot.always(props.progress, {\n defaultProps: { value: undefined, shape: 'square', thickness: 'large', 'aria-label': 'Loading' },\n elementType: ProgressBar,\n }),\n fullyOverflowed,\n isOverflowing,\n overflowCount,\n isLoading,\n designVersion,\n mode,\n };\n};\n\nfunction defaultButtonText(\n props: AttachmentOverflowMenuButtonProps,\n overflowCount: number,\n designVersion: DesignVersion['designVersion'],\n copilotMode: CopilotMode['mode'],\n fullyOverflowed: boolean,\n) {\n if (props.children) {\n return props.children;\n }\n\n if (props.text) {\n if (typeof props.text === 'function') {\n return props.text(overflowCount);\n } else {\n return props.text;\n }\n }\n\n if (designVersion === 'next' && fullyOverflowed) {\n return (\n <>\n {copilotMode === 'canvas' ? <Attach24Regular /> : <Attach20Regular />}\n {overflowCount}\n </>\n );\n }\n\n return `+${overflowCount}`;\n}\n"],"names":["useAttachmentOverflowMenuButton_unstable","props","ref","isOverflowing","overflowCount","overflowButtonRef","useAttachmentOverflowMenuContext_unstable","context","numberOfAttachments","useAttachmentListContext_unstable","fullyOverflowed","isLoading","designVersion","useDesignVersion","mode","useCopilotMode","buttonText","defaultButtonText","components","root","progress","ProgressBar","slot","always","getIntrinsicElementProps","useMergedRefs","defaultProps","children","elementType","value","undefined","shape","thickness","copilotMode","text","React","createElement","Fragment","Attach24Regular","Attach20Regular"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAqBaA;;;eAAAA;;;;iEArBU;+BAE0B;iCAC0B;+CACjB;4BAKT;uCACC;AAW3C,MAAMA,2CAA2C,CACtDC,OACAC;IAEA,MAAM,EAAEC,aAAa,EAAEC,aAAa,EAAEC,iBAAiB,EAAE,GAAGC,IAAAA,wEAAAA,EAC1DC,CAAAA,UAAWA;IAEb,MAAM,EAAEC,mBAAmB,EAAE,GAAGC,IAAAA,wDAAAA,EAAkCF,CAAAA,UAAWA;IAE7E,MAAMG,kBAAkBN,iBAAiBI;IACzC,MAAMG,YAAY,CAAC,CAACV,MAAMU,SAAS;IAEnC,MAAMC,gBAAgBC,IAAAA,+BAAAA,EAAiBZ,MAAMW,aAAa;IAC1D,MAAME,OAAOC,IAAAA,6BAAAA,EAAed,MAAMa,IAAI;IAEtC,MAAME,aAAaC,kBAAkBhB,OAAOG,eAAeQ,eAAeE,MAAMJ;IAEhF,OAAO;QACLQ,YAAY;YACVC,MAAM;YACNC,UAAUC,4BAAAA;QACZ;QACAF,MAAMG,qBAAAA,CAAKC,MAAM,CACfC,IAAAA,yCAAAA,EAAyB,UAAU;YACjCtB,KAAKuB,IAAAA,8BAAAA,EAAcvB,KAAKG;YACxB,GAAGJ,KAAK;QACV,IACA;YACEyB,cAAc;gBACZC,UAAUX;YACZ;YACAY,aAAa;QACf;QAEFR,UAAUE,qBAAAA,CAAKC,MAAM,CAACtB,MAAMmB,QAAQ,EAAE;YACpCM,cAAc;gBAAEG,OAAOC;gBAAWC,OAAO;gBAAUC,WAAW;gBAAS,cAAc;YAAU;YAC/FJ,aAAaP,4BAAAA;QACf;QACAX;QACAP;QACAC;QACAO;QACAC;QACAE;IACF;AACF;AAEA,SAASG,kBACPhB,KAAwC,EACxCG,aAAqB,EACrBQ,aAA6C,EAC7CqB,WAAgC,EAChCvB,eAAwB;IAExB,IAAIT,MAAM0B,QAAQ,EAAE;QAClB,OAAO1B,MAAM0B,QAAQ;IACvB;IAEA,IAAI1B,MAAMiC,IAAI,EAAE;QACd,IAAI,OAAOjC,MAAMiC,IAAI,KAAK,YAAY;YACpC,OAAOjC,MAAMiC,IAAI,CAAC9B;QACpB,OAAO;YACL,OAAOH,MAAMiC,IAAI;QACnB;IACF;IAEA,IAAItB,kBAAkB,UAAUF,iBAAiB;QAC/C,OAAA,WAAA,GACEyB,OAAAC,aAAA,CAAAD,OAAAE,QAAA,EAAA,MACGJ,gBAAgB,WAAA,WAAA,GAAWE,OAAAC,aAAA,CAACE,2BAAAA,EAAAA,QAAAA,WAAAA,GAAqBH,OAAAC,aAAA,CAACG,2BAAAA,EAAAA,OAClDnC;IAGP;IAEA,OAAO,CAAC,CAAC,EAAEA,cAAc,CAAC;AAC5B"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
attachmentOverflowMenuButtonClassNames: function() {
|
|
13
|
+
return attachmentOverflowMenuButtonClassNames;
|
|
14
|
+
},
|
|
15
|
+
useAttachmentOverflowMenuButtonStyles_unstable: function() {
|
|
16
|
+
return useAttachmentOverflowMenuButtonStyles_unstable;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _reactcomponents = require("@fluentui/react-components");
|
|
20
|
+
const _tokens = require("@fluentui-copilot/tokens");
|
|
21
|
+
const _useProgressBarStylesstyles = require("../utils/useProgressBarStyles.styles");
|
|
22
|
+
const attachmentOverflowMenuButtonClassNames = {
|
|
23
|
+
root: 'fai-AttachmentOverflowMenuButton',
|
|
24
|
+
progress: 'fai-AttachmentOverflowMenuButton__progress'
|
|
25
|
+
};
|
|
26
|
+
const useRootBaseClassName = (0, _reactcomponents.makeResetStyles)({
|
|
27
|
+
color: _tokens.tokens.colorNeutralForeground1,
|
|
28
|
+
alignItems: 'center',
|
|
29
|
+
backgroundColor: _tokens.tokens.colorSubtleBackground,
|
|
30
|
+
border: `${_tokens.tokens.strokeWidthThin} solid ${_tokens.tokens.colorNeutralStroke1}`,
|
|
31
|
+
borderRadius: _tokens.tokens.borderRadiusMedium,
|
|
32
|
+
boxSizing: 'border-box',
|
|
33
|
+
columnGap: _tokens.tokens.spacingHorizontalSNudge,
|
|
34
|
+
cursor: 'pointer',
|
|
35
|
+
display: 'inline-flex',
|
|
36
|
+
flexWrap: 'nowrap',
|
|
37
|
+
fontFamily: _tokens.typographyStyles.body1.fontFamily,
|
|
38
|
+
fontSize: _tokens.typographyStyles.body1.fontSize,
|
|
39
|
+
fontWeight: _tokens.typographyStyles.body1.fontWeight,
|
|
40
|
+
justifyContent: 'center',
|
|
41
|
+
padding: `${_tokens.tokens.spacingVerticalXS} ${_tokens.tokens.spacingHorizontalS}`,
|
|
42
|
+
verticalAlign: 'middle',
|
|
43
|
+
position: 'relative',
|
|
44
|
+
':hover': {
|
|
45
|
+
cursor: 'pointer',
|
|
46
|
+
backgroundColor: _tokens.tokens.colorSubtleBackgroundHover,
|
|
47
|
+
color: _tokens.tokens.colorNeutralForeground2Hover
|
|
48
|
+
},
|
|
49
|
+
':active': {
|
|
50
|
+
backgroundColor: _tokens.tokens.colorSubtleBackgroundPressed,
|
|
51
|
+
color: _tokens.tokens.colorNeutralForeground2Pressed
|
|
52
|
+
},
|
|
53
|
+
'@media (forced-colors: active)': {
|
|
54
|
+
':hover': {
|
|
55
|
+
backgroundColor: 'HighlightText'
|
|
56
|
+
},
|
|
57
|
+
':active': {
|
|
58
|
+
backgroundColor: 'HighlightText'
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
const useNextStyles = (0, _reactcomponents.makeStyles)({
|
|
63
|
+
root: {
|
|
64
|
+
borderRadius: _tokens.tokens.borderRadiusXLarge,
|
|
65
|
+
..._reactcomponents.shorthands.borderColor(_tokens.tokens.colorTransparentStroke),
|
|
66
|
+
color: _tokens.tokens.colorNeutralForeground2,
|
|
67
|
+
backgroundColor: _tokens.tokens.colorNeutralBackground3,
|
|
68
|
+
':hover': {
|
|
69
|
+
cursor: 'pointer',
|
|
70
|
+
color: _tokens.tokens.colorNeutralForeground2Hover,
|
|
71
|
+
backgroundColor: _tokens.tokens.colorNeutralBackground3Hover
|
|
72
|
+
},
|
|
73
|
+
':active': {
|
|
74
|
+
color: _tokens.tokens.colorNeutralForeground2Pressed,
|
|
75
|
+
backgroundColor: _tokens.tokens.colorNeutralBackground3Pressed
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
canvas: {
|
|
79
|
+
minHeight: '40px',
|
|
80
|
+
padding: `${_tokens.tokens.spacingVerticalNone} ${_tokens.tokens.spacingHorizontalS}`
|
|
81
|
+
},
|
|
82
|
+
sidecar: {
|
|
83
|
+
minHeight: '32px',
|
|
84
|
+
padding: `${_tokens.tokens.spacingVerticalNone} ${_tokens.tokens.spacingHorizontalS}`
|
|
85
|
+
},
|
|
86
|
+
fullyOverflowed_canvas: {
|
|
87
|
+
padding: `${_tokens.tokens.spacingVerticalNone} ${_tokens.tokens.spacingHorizontalL}`,
|
|
88
|
+
..._tokens.typographyStyles.subtitle2
|
|
89
|
+
},
|
|
90
|
+
fullyOverflowed_sidecar: {
|
|
91
|
+
padding: `${_tokens.tokens.spacingVerticalNone} ${_tokens.tokens.spacingHorizontalM}`,
|
|
92
|
+
..._tokens.typographyStyles.body1Strong
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
const useAttachmentOverflowMenuButtonStyles_unstable = (state)=>{
|
|
96
|
+
'use no memo';
|
|
97
|
+
const { designVersion, mode, fullyOverflowed } = state;
|
|
98
|
+
const rootBaseClassName = useRootBaseClassName();
|
|
99
|
+
const progressBarStyles = (0, _useProgressBarStylesstyles.useProgressBarStyles)();
|
|
100
|
+
const nextStyles = useNextStyles();
|
|
101
|
+
state.root.className = (0, _reactcomponents.mergeClasses)(attachmentOverflowMenuButtonClassNames.root, rootBaseClassName, designVersion === 'next' && nextStyles.root, designVersion === 'next' && nextStyles[mode], designVersion === 'next' && fullyOverflowed && nextStyles[`fullyOverflowed_${mode}`], state.root.className);
|
|
102
|
+
if (state.progress) {
|
|
103
|
+
state.progress.className = (0, _reactcomponents.mergeClasses)(attachmentOverflowMenuButtonClassNames.progress, progressBarStyles.progress, state.progress.className);
|
|
104
|
+
const bar = _reactcomponents.slot.optional(state.progress.bar, {
|
|
105
|
+
elementType: 'div',
|
|
106
|
+
renderByDefault: true
|
|
107
|
+
});
|
|
108
|
+
if (bar) {
|
|
109
|
+
if (state.progress.value === undefined) {
|
|
110
|
+
bar.className = (0, _reactcomponents.mergeClasses)(progressBarStyles.indeterminateProgressBar, bar.className);
|
|
111
|
+
} else {
|
|
112
|
+
bar.className = (0, _reactcomponents.mergeClasses)(progressBarStyles.regularProgressBar, bar.className);
|
|
113
|
+
}
|
|
114
|
+
state.progress.bar = bar;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
return state;
|
|
118
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useAttachmentOverflowMenuButtonStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses, shorthands, slot } from '@fluentui/react-components';\nimport { tokens, typographyStyles } from '@fluentui-copilot/tokens';\nimport { useProgressBarStyles } from '../utils/useProgressBarStyles.styles';\nimport type {\n AttachmentOverflowMenuButtonSlots,\n AttachmentOverflowMenuButtonState,\n} from './AttachmentOverflowMenuButton.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const attachmentOverflowMenuButtonClassNames: SlotClassNames<AttachmentOverflowMenuButtonSlots> = {\n root: 'fai-AttachmentOverflowMenuButton',\n progress: 'fai-AttachmentOverflowMenuButton__progress',\n};\n\nconst useRootBaseClassName = makeResetStyles({\n color: tokens.colorNeutralForeground1,\n alignItems: 'center',\n backgroundColor: tokens.colorSubtleBackground,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,\n borderRadius: tokens.borderRadiusMedium,\n boxSizing: 'border-box',\n columnGap: tokens.spacingHorizontalSNudge,\n cursor: 'pointer',\n display: 'inline-flex',\n flexWrap: 'nowrap',\n fontFamily: typographyStyles.body1.fontFamily,\n fontSize: typographyStyles.body1.fontSize,\n fontWeight: typographyStyles.body1.fontWeight,\n justifyContent: 'center',\n padding: `${tokens.spacingVerticalXS} ${tokens.spacingHorizontalS}`,\n verticalAlign: 'middle',\n position: 'relative',\n\n ':hover': {\n cursor: 'pointer',\n backgroundColor: tokens.colorSubtleBackgroundHover,\n color: tokens.colorNeutralForeground2Hover,\n },\n ':active': {\n backgroundColor: tokens.colorSubtleBackgroundPressed,\n color: tokens.colorNeutralForeground2Pressed,\n },\n '@media (forced-colors: active)': {\n ':hover': {\n backgroundColor: 'HighlightText',\n },\n ':active': {\n backgroundColor: 'HighlightText',\n },\n },\n});\n\nconst useNextStyles = makeStyles({\n root: {\n borderRadius: tokens.borderRadiusXLarge,\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n color: tokens.colorNeutralForeground2,\n backgroundColor: tokens.colorNeutralBackground3,\n ':hover': {\n cursor: 'pointer',\n color: tokens.colorNeutralForeground2Hover,\n backgroundColor: tokens.colorNeutralBackground3Hover,\n },\n ':active': {\n color: tokens.colorNeutralForeground2Pressed,\n backgroundColor: tokens.colorNeutralBackground3Pressed,\n },\n },\n canvas: {\n minHeight: '40px',\n padding: `${tokens.spacingVerticalNone} ${tokens.spacingHorizontalS}`,\n },\n sidecar: {\n minHeight: '32px',\n padding: `${tokens.spacingVerticalNone} ${tokens.spacingHorizontalS}`,\n },\n fullyOverflowed_canvas: {\n padding: `${tokens.spacingVerticalNone} ${tokens.spacingHorizontalL}`,\n ...typographyStyles.subtitle2,\n },\n fullyOverflowed_sidecar: {\n padding: `${tokens.spacingVerticalNone} ${tokens.spacingHorizontalM}`,\n ...typographyStyles.body1Strong,\n },\n});\n\n/**\n * Apply styling to the AttachmentOverflowMenuButton slots based on the state\n */\nexport const useAttachmentOverflowMenuButtonStyles_unstable = (\n state: AttachmentOverflowMenuButtonState,\n): AttachmentOverflowMenuButtonState => {\n 'use no memo';\n\n const { designVersion, mode, fullyOverflowed } = state;\n\n const rootBaseClassName = useRootBaseClassName();\n const progressBarStyles = useProgressBarStyles();\n const nextStyles = useNextStyles();\n\n state.root.className = mergeClasses(\n attachmentOverflowMenuButtonClassNames.root,\n rootBaseClassName,\n designVersion === 'next' && nextStyles.root,\n designVersion === 'next' && nextStyles[mode],\n designVersion === 'next' && fullyOverflowed && nextStyles[`fullyOverflowed_${mode}`],\n state.root.className,\n );\n\n if (state.progress) {\n state.progress.className = mergeClasses(\n attachmentOverflowMenuButtonClassNames.progress,\n progressBarStyles.progress,\n state.progress.className,\n );\n\n const bar = slot.optional(state.progress.bar, { elementType: 'div', renderByDefault: true });\n if (bar) {\n if (state.progress.value === undefined) {\n bar.className = mergeClasses(progressBarStyles.indeterminateProgressBar, bar.className);\n } else {\n bar.className = mergeClasses(progressBarStyles.regularProgressBar, bar.className);\n }\n state.progress.bar = bar;\n }\n }\n\n return state;\n};\n"],"names":["attachmentOverflowMenuButtonClassNames","useAttachmentOverflowMenuButtonStyles_unstable","root","progress","useRootBaseClassName","makeResetStyles","color","tokens","colorNeutralForeground1","alignItems","backgroundColor","colorSubtleBackground","border","strokeWidthThin","colorNeutralStroke1","borderRadius","borderRadiusMedium","boxSizing","columnGap","spacingHorizontalSNudge","cursor","display","flexWrap","fontFamily","typographyStyles","body1","fontSize","fontWeight","justifyContent","padding","spacingVerticalXS","spacingHorizontalS","verticalAlign","position","colorSubtleBackgroundHover","colorNeutralForeground2Hover","colorSubtleBackgroundPressed","colorNeutralForeground2Pressed","useNextStyles","makeStyles","borderRadiusXLarge","shorthands","borderColor","colorTransparentStroke","colorNeutralForeground2","colorNeutralBackground3","colorNeutralBackground3Hover","colorNeutralBackground3Pressed","canvas","minHeight","spacingVerticalNone","sidecar","fullyOverflowed_canvas","spacingHorizontalL","subtitle2","fullyOverflowed_sidecar","spacingHorizontalM","body1Strong","state","designVersion","mode","fullyOverflowed","rootBaseClassName","progressBarStyles","useProgressBarStyles","nextStyles","className","mergeClasses","bar","slot","optional","elementType","renderByDefault","value","undefined","indeterminateProgressBar","regularProgressBar"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IASaA,sCAAAA;eAAAA;;IAgFAC,8CAAAA;eAAAA;;;iCAzF+D;wBACnC;4CACJ;AAO9B,MAAMD,yCAA4F;IACvGE,MAAM;IACNC,UAAU;AACZ;AAEA,MAAMC,uBAAuBC,IAAAA,gCAAAA,EAAgB;IAC3CC,OAAOC,cAAAA,CAAOC,uBAAuB;IACrCC,YAAY;IACZC,iBAAiBH,cAAAA,CAAOI,qBAAqB;IAC7CC,QAAQ,CAAC,EAAEL,cAAAA,CAAOM,eAAe,CAAC,OAAO,EAAEN,cAAAA,CAAOO,mBAAmB,CAAC,CAAC;IACvEC,cAAcR,cAAAA,CAAOS,kBAAkB;IACvCC,WAAW;IACXC,WAAWX,cAAAA,CAAOY,uBAAuB;IACzCC,QAAQ;IACRC,SAAS;IACTC,UAAU;IACVC,YAAYC,wBAAAA,CAAiBC,KAAK,CAACF,UAAU;IAC7CG,UAAUF,wBAAAA,CAAiBC,KAAK,CAACC,QAAQ;IACzCC,YAAYH,wBAAAA,CAAiBC,KAAK,CAACE,UAAU;IAC7CC,gBAAgB;IAChBC,SAAS,CAAC,EAAEtB,cAAAA,CAAOuB,iBAAiB,CAAC,CAAC,EAAEvB,cAAAA,CAAOwB,kBAAkB,CAAC,CAAC;IACnEC,eAAe;IACfC,UAAU;IAEV,UAAU;QACRb,QAAQ;QACRV,iBAAiBH,cAAAA,CAAO2B,0BAA0B;QAClD5B,OAAOC,cAAAA,CAAO4B,4BAA4B;IAC5C;IACA,WAAW;QACTzB,iBAAiBH,cAAAA,CAAO6B,4BAA4B;QACpD9B,OAAOC,cAAAA,CAAO8B,8BAA8B;IAC9C;IACA,kCAAkC;QAChC,UAAU;YACR3B,iBAAiB;QACnB;QACA,WAAW;YACTA,iBAAiB;QACnB;IACF;AACF;AAEA,MAAM4B,gBAAgBC,IAAAA,2BAAAA,EAAW;IAC/BrC,MAAM;QACJa,cAAcR,cAAAA,CAAOiC,kBAAkB;QACvC,GAAGC,2BAAAA,CAAWC,WAAW,CAACnC,cAAAA,CAAOoC,sBAAsB,CAAC;QACxDrC,OAAOC,cAAAA,CAAOqC,uBAAuB;QACrClC,iBAAiBH,cAAAA,CAAOsC,uBAAuB;QAC/C,UAAU;YACRzB,QAAQ;YACRd,OAAOC,cAAAA,CAAO4B,4BAA4B;YAC1CzB,iBAAiBH,cAAAA,CAAOuC,4BAA4B;QACtD;QACA,WAAW;YACTxC,OAAOC,cAAAA,CAAO8B,8BAA8B;YAC5C3B,iBAAiBH,cAAAA,CAAOwC,8BAA8B;QACxD;IACF;IACAC,QAAQ;QACNC,WAAW;QACXpB,SAAS,CAAC,EAAEtB,cAAAA,CAAO2C,mBAAmB,CAAC,CAAC,EAAE3C,cAAAA,CAAOwB,kBAAkB,CAAC,CAAC;IACvE;IACAoB,SAAS;QACPF,WAAW;QACXpB,SAAS,CAAC,EAAEtB,cAAAA,CAAO2C,mBAAmB,CAAC,CAAC,EAAE3C,cAAAA,CAAOwB,kBAAkB,CAAC,CAAC;IACvE;IACAqB,wBAAwB;QACtBvB,SAAS,CAAC,EAAEtB,cAAAA,CAAO2C,mBAAmB,CAAC,CAAC,EAAE3C,cAAAA,CAAO8C,kBAAkB,CAAC,CAAC;QACrE,GAAG7B,wBAAAA,CAAiB8B,SAAS;IAC/B;IACAC,yBAAyB;QACvB1B,SAAS,CAAC,EAAEtB,cAAAA,CAAO2C,mBAAmB,CAAC,CAAC,EAAE3C,cAAAA,CAAOiD,kBAAkB,CAAC,CAAC;QACrE,GAAGhC,wBAAAA,CAAiBiC,WAAW;IACjC;AACF;AAKO,MAAMxD,iDAAiD,CAC5DyD;IAEA;IAEA,MAAM,EAAEC,aAAa,EAAEC,IAAI,EAAEC,eAAe,EAAE,GAAGH;IAEjD,MAAMI,oBAAoB1D;IAC1B,MAAM2D,oBAAoBC,IAAAA,gDAAAA;IAC1B,MAAMC,aAAa3B;IAEnBoB,MAAMxD,IAAI,CAACgE,SAAS,GAAGC,IAAAA,6BAAAA,EACrBnE,uCAAuCE,IAAI,EAC3C4D,mBACAH,kBAAkB,UAAUM,WAAW/D,IAAI,EAC3CyD,kBAAkB,UAAUM,UAAU,CAACL,KAAK,EAC5CD,kBAAkB,UAAUE,mBAAmBI,UAAU,CAAC,CAAC,gBAAgB,EAAEL,KAAK,CAAC,CAAC,EACpFF,MAAMxD,IAAI,CAACgE,SAAS;IAGtB,IAAIR,MAAMvD,QAAQ,EAAE;QAClBuD,MAAMvD,QAAQ,CAAC+D,SAAS,GAAGC,IAAAA,6BAAAA,EACzBnE,uCAAuCG,QAAQ,EAC/C4D,kBAAkB5D,QAAQ,EAC1BuD,MAAMvD,QAAQ,CAAC+D,SAAS;QAG1B,MAAME,MAAMC,qBAAAA,CAAKC,QAAQ,CAACZ,MAAMvD,QAAQ,CAACiE,GAAG,EAAE;YAAEG,aAAa;YAAOC,iBAAiB;QAAK;QAC1F,IAAIJ,KAAK;YACP,IAAIV,MAAMvD,QAAQ,CAACsE,KAAK,KAAKC,WAAW;gBACtCN,IAAIF,SAAS,GAAGC,IAAAA,6BAAAA,EAAaJ,kBAAkBY,wBAAwB,EAAEP,IAAIF,SAAS;YACxF,OAAO;gBACLE,IAAIF,SAAS,GAAGC,IAAAA,6BAAAA,EAAaJ,kBAAkBa,kBAAkB,EAAER,IAAIF,SAAS;YAClF;YACAR,MAAMvD,QAAQ,CAACiE,GAAG,GAAGA;QACvB;IACF;IAEA,OAAOV;AACT"}
|
|
@@ -18,4 +18,4 @@ const AttachmentOverflowMenuItem = /*#__PURE__*/ _react.forwardRef((props, ref)=
|
|
|
18
18
|
(0, _useAttachmentOverflowMenuItemStylesstyles.useAttachmentOverflowMenuItemStyles_unstable)(state);
|
|
19
19
|
return (0, _renderAttachmentOverflowMenuItem.renderAttachmentOverflowMenuItem_unstable)(state);
|
|
20
20
|
});
|
|
21
|
-
AttachmentOverflowMenuItem.displayName = 'AttachmentOverflowMenuItem';
|
|
21
|
+
AttachmentOverflowMenuItem.displayName = 'AttachmentOverflowMenuItem';
|
package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AttachmentOverflowMenuItem.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentOverflowMenuItem_unstable } from './useAttachmentOverflowMenuItem';\nimport { renderAttachmentOverflowMenuItem_unstable } from './renderAttachmentOverflowMenuItem';\nimport type { AttachmentOverflowMenuItemProps } from './AttachmentOverflowMenuItem.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useAttachmentOverflowMenuItemStyles_unstable } from './useAttachmentOverflowMenuItemStyles.styles';\nexport const AttachmentOverflowMenuItem: ForwardRefComponent<AttachmentOverflowMenuItemProps> = React.forwardRef(\n (props, ref) => {\n const state = useAttachmentOverflowMenuItem_unstable(props, ref);\n useAttachmentOverflowMenuItemStyles_unstable(state);\n\n return renderAttachmentOverflowMenuItem_unstable(state);\n },\n);\n\nAttachmentOverflowMenuItem.displayName = 'AttachmentOverflowMenuItem';\n"],"names":["AttachmentOverflowMenuItem","React","forwardRef","props","state","useAttachmentOverflowMenuItem_unstable","useAttachmentOverflowMenuItemStyles_unstable","renderAttachmentOverflowMenuItem_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAMaA;;;eAAAA;;;;iEANU;+CACgC;kDACG;2DAGG;AACtD,MAAMA,6BAAAA,WAAAA,
|
|
1
|
+
{"version":3,"sources":["AttachmentOverflowMenuItem.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentOverflowMenuItem_unstable } from './useAttachmentOverflowMenuItem';\nimport { renderAttachmentOverflowMenuItem_unstable } from './renderAttachmentOverflowMenuItem';\nimport type { AttachmentOverflowMenuItemProps } from './AttachmentOverflowMenuItem.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useAttachmentOverflowMenuItemStyles_unstable } from './useAttachmentOverflowMenuItemStyles.styles';\nexport const AttachmentOverflowMenuItem: ForwardRefComponent<AttachmentOverflowMenuItemProps> = React.forwardRef(\n (props, ref) => {\n const state = useAttachmentOverflowMenuItem_unstable(props, ref);\n useAttachmentOverflowMenuItemStyles_unstable(state);\n\n return renderAttachmentOverflowMenuItem_unstable(state);\n },\n);\n\nAttachmentOverflowMenuItem.displayName = 'AttachmentOverflowMenuItem';\n"],"names":["AttachmentOverflowMenuItem","React","forwardRef","props","ref","state","useAttachmentOverflowMenuItem_unstable","useAttachmentOverflowMenuItemStyles_unstable","renderAttachmentOverflowMenuItem_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAMaA;;;eAAAA;;;;iEANU;+CACgC;kDACG;2DAGG;AACtD,MAAMA,6BAAAA,WAAAA,GAAmFC,OAAMC,UAAU,CAC9G,CAACC,OAAOC;IACN,MAAMC,QAAQC,IAAAA,qEAAAA,EAAuCH,OAAOC;IAC5DG,IAAAA,uFAAAA,EAA6CF;IAE7C,OAAOG,IAAAA,2EAAAA,EAA0CH;AACnD;AAGFL,2BAA2BS,WAAW,GAAG"}
|
|
@@ -29,4 +29,3 @@ const _AttachmentOverflowMenuItem = require("./AttachmentOverflowMenuItem");
|
|
|
29
29
|
const _renderAttachmentOverflowMenuItem = require("./renderAttachmentOverflowMenuItem");
|
|
30
30
|
const _useAttachmentOverflowMenuItem = require("./useAttachmentOverflowMenuItem");
|
|
31
31
|
const _useAttachmentOverflowMenuItemStylesstyles = require("./useAttachmentOverflowMenuItemStyles.styles");
|
|
32
|
-
//# sourceMappingURL=index.js.map
|
package/lib-commonjs/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderAttachmentOverflowMenuItem.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type {\n AttachmentOverflowMenuItemState,\n AttachmentOverflowMenuItemSlots,\n} from './AttachmentOverflowMenuItem.types';\n\n/**\n * Render the final JSX of AttachmentOverflowMenuItem\n */\nexport const renderAttachmentOverflowMenuItem_unstable = (state: AttachmentOverflowMenuItemState) => {\n assertSlots<AttachmentOverflowMenuItemSlots>(state);\n\n return !state.isVisible ? (\n <state.root>\n {state.root.children}\n {state.progress && <state.progress />}\n </state.root>\n ) : null;\n};\n"],"names":["
|
|
1
|
+
{"version":3,"sources":["renderAttachmentOverflowMenuItem.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type {\n AttachmentOverflowMenuItemState,\n AttachmentOverflowMenuItemSlots,\n} from './AttachmentOverflowMenuItem.types';\n\n/**\n * Render the final JSX of AttachmentOverflowMenuItem\n */\nexport const renderAttachmentOverflowMenuItem_unstable = (state: AttachmentOverflowMenuItemState) => {\n assertSlots<AttachmentOverflowMenuItemSlots>(state);\n\n return !state.isVisible ? (\n <state.root>\n {state.root.children}\n {state.progress && <state.progress />}\n </state.root>\n ) : null;\n};\n"],"names":["renderAttachmentOverflowMenuItem_unstable","state","assertSlots","isVisible","_jsxs","root","children","progress","_jsx"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAYaA;;;eAAAA;;;4BAXb;iCAE4B;AASrB,MAAMA,4CAA4C,CAACC;IACxDC,IAAAA,4BAAAA,EAA6CD;IAE7C,OAAO,CAACA,MAAME,SAAS,GAAA,WAAA,GACrBC,IAAAA,gBAAA,EAACH,MAAMI,IAAI,EAAA;;YACRJ,MAAMI,IAAI,CAACC,QAAQ;YACnBL,MAAMM,QAAQ,IAAA,WAAA,GAAIC,IAAAA,eAAA,EAACP,MAAMM,QAAQ,EAAA,CAAA;;SAElC;AACN"}
|
package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useAttachmentOverflowMenuItem.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n MenuItem,\n ProgressBar,\n mergeCallbacks,\n slot,\n useId,\n useIsOverflowItemVisible,\n} from '@fluentui/react-components';\nimport { Dismiss20Regular } from '@fluentui/react-icons';\nimport { useAttachmentListContext_unstable } from '../../contexts/attachmentListContext';\nimport type {\n AttachmentOverflowMenuItemProps,\n AttachmentOverflowMenuItemState,\n} from './AttachmentOverflowMenuItem.types';\nimport { useDesignVersion } from '@fluentui-copilot/react-provider';\n\n/**\n * Create the state required to render AttachmentOverflowMenuItem.\n *\n * The returned state can be modified with hooks such as useAttachmentOverflowMenuItemStyles_unstable,\n * before being passed to renderAttachmentOverflowMenuItem_unstable.\n *\n * @param props - props from this instance of AttachmentOverflowMenuItem\n * @param ref - reference to root HTMLElement of AttachmentOverflowMenuItem\n */\nexport const useAttachmentOverflowMenuItem_unstable = (\n props: AttachmentOverflowMenuItemProps,\n ref: React.Ref<HTMLDivElement>,\n): AttachmentOverflowMenuItemState => {\n 'use no memo';\n\n const { imageOnly, media } = props;\n const menuItemId = useId('attachment-', props.id);\n const isVisible = useIsOverflowItemVisible(menuItemId);\n const { onAttachmentDismiss } = useAttachmentListContext_unstable(context => context);\n const designVersion = useDesignVersion(props.designVersion);\n\n const root = slot.always(\n { ref, icon: media, secondaryContent: <Dismiss20Regular />, ...props, id: menuItemId },\n { elementType: MenuItem },\n );\n root.onClick = mergeCallbacks(root.onClick, ev => {\n onAttachmentDismiss?.(ev, { content: props.children, media, id: menuItemId });\n });\n\n const progress = slot.optional(props.progress, {\n defaultProps: {\n shape: 'square',\n thickness: 'large',\n 'aria-labelledby': props.id,\n },\n elementType: ProgressBar,\n });\n\n return {\n components: {\n root: MenuItem,\n progress: ProgressBar,\n },\n root,\n progress,\n isVisible,\n imageOnly,\n designVersion,\n };\n};\n"],"names":["useAttachmentOverflowMenuItem_unstable","props","ref","imageOnly","
|
|
1
|
+
{"version":3,"sources":["useAttachmentOverflowMenuItem.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n MenuItem,\n ProgressBar,\n mergeCallbacks,\n slot,\n useId,\n useIsOverflowItemVisible,\n} from '@fluentui/react-components';\nimport { Dismiss20Regular } from '@fluentui/react-icons';\nimport { useAttachmentListContext_unstable } from '../../contexts/attachmentListContext';\nimport type {\n AttachmentOverflowMenuItemProps,\n AttachmentOverflowMenuItemState,\n} from './AttachmentOverflowMenuItem.types';\nimport { useDesignVersion } from '@fluentui-copilot/react-provider';\n\n/**\n * Create the state required to render AttachmentOverflowMenuItem.\n *\n * The returned state can be modified with hooks such as useAttachmentOverflowMenuItemStyles_unstable,\n * before being passed to renderAttachmentOverflowMenuItem_unstable.\n *\n * @param props - props from this instance of AttachmentOverflowMenuItem\n * @param ref - reference to root HTMLElement of AttachmentOverflowMenuItem\n */\nexport const useAttachmentOverflowMenuItem_unstable = (\n props: AttachmentOverflowMenuItemProps,\n ref: React.Ref<HTMLDivElement>,\n): AttachmentOverflowMenuItemState => {\n 'use no memo';\n\n const { imageOnly, media } = props;\n const menuItemId = useId('attachment-', props.id);\n const isVisible = useIsOverflowItemVisible(menuItemId);\n const { onAttachmentDismiss } = useAttachmentListContext_unstable(context => context);\n const designVersion = useDesignVersion(props.designVersion);\n\n const root = slot.always(\n { ref, icon: media, secondaryContent: <Dismiss20Regular />, ...props, id: menuItemId },\n { elementType: MenuItem },\n );\n root.onClick = mergeCallbacks(root.onClick, ev => {\n onAttachmentDismiss?.(ev, { content: props.children, media, id: menuItemId });\n });\n\n const progress = slot.optional(props.progress, {\n defaultProps: {\n shape: 'square',\n thickness: 'large',\n 'aria-labelledby': props.id,\n },\n elementType: ProgressBar,\n });\n\n return {\n components: {\n root: MenuItem,\n progress: ProgressBar,\n },\n root,\n progress,\n isVisible,\n imageOnly,\n designVersion,\n };\n};\n"],"names":["useAttachmentOverflowMenuItem_unstable","props","ref","imageOnly","media","menuItemId","useId","id","isVisible","useIsOverflowItemVisible","onAttachmentDismiss","useAttachmentListContext_unstable","context","designVersion","useDesignVersion","root","slot","always","icon","secondaryContent","React","createElement","Dismiss20Regular","elementType","MenuItem","onClick","mergeCallbacks","ev","content","children","progress","optional","defaultProps","shape","thickness","ProgressBar","components"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BA0BaA;;;eAAAA;;;;iEA1BU;iCAQhB;4BAC0B;uCACiB;+BAKjB;AAW1B,MAAMA,yCAAyC,CACpDC,OACAC;IAEA;IAEA,MAAM,EAAEC,SAAS,EAAEC,KAAK,EAAE,GAAGH;IAC7B,MAAMI,aAAaC,IAAAA,sBAAAA,EAAM,eAAeL,MAAMM,EAAE;IAChD,MAAMC,YAAYC,IAAAA,yCAAAA,EAAyBJ;IAC3C,MAAM,EAAEK,mBAAmB,EAAE,GAAGC,IAAAA,wDAAAA,EAAkCC,CAAAA,UAAWA;IAC7E,MAAMC,gBAAgBC,IAAAA,+BAAAA,EAAiBb,MAAMY,aAAa;IAE1D,MAAME,OAAOC,qBAAAA,CAAKC,MAAM,CACtB;QAAEf;QAAKgB,MAAMd;QAAOe,kBAAAA,WAAAA,GAAkBC,OAAAC,aAAA,CAACC,4BAAAA,EAAAA;QAAqB,GAAGrB,KAAK;QAAEM,IAAIF;IAAW,GACrF;QAAEkB,aAAaC,yBAAAA;IAAS;IAE1BT,KAAKU,OAAO,GAAGC,IAAAA,+BAAAA,EAAeX,KAAKU,OAAO,EAAEE,CAAAA;QAC1CjB,wBAAAA,QAAAA,wBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,oBAAsBiB,IAAI;YAAEC,SAAS3B,MAAM4B,QAAQ;YAAEzB;YAAOG,IAAIF;QAAW;IAC7E;IAEA,MAAMyB,WAAWd,qBAAAA,CAAKe,QAAQ,CAAC9B,MAAM6B,QAAQ,EAAE;QAC7CE,cAAc;YACZC,OAAO;YACPC,WAAW;YACX,mBAAmBjC,MAAMM,EAAE;QAC7B;QACAgB,aAAaY,4BAAAA;IACf;IAEA,OAAO;QACLC,YAAY;YACVrB,MAAMS,yBAAAA;YACNM,UAAUK,4BAAAA;QACZ;QACApB;QACAe;QACAtB;QACAL;QACAU;IACF;AACF"}
|
|
@@ -0,0 +1,73 @@
|
|
|
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 _useProgressBarStylesstyles = require("../utils/useProgressBarStyles.styles");
|
|
21
|
+
const attachmentOverflowMenuItemClassNames = {
|
|
22
|
+
root: 'fai-AttachmentOverflowMenuItem',
|
|
23
|
+
progress: 'fai-AttachmentOverflowMenuItem__progress'
|
|
24
|
+
};
|
|
25
|
+
const FOCUS_VISIBLE_ATTR = 'data-fui-focus-visible';
|
|
26
|
+
const useStyles = (0, _reactcomponents.makeStyles)({
|
|
27
|
+
imageOnly: {
|
|
28
|
+
alignItems: 'center'
|
|
29
|
+
},
|
|
30
|
+
secondaryContent: {
|
|
31
|
+
display: 'flex',
|
|
32
|
+
alignItems: 'center'
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
const useNextStyles = (0, _reactcomponents.makeStyles)({
|
|
36
|
+
nextStyles: {
|
|
37
|
+
[`[${FOCUS_VISIBLE_ATTR}]::after`]: {
|
|
38
|
+
borderRadius: _reactcomponents.tokens.borderRadiusXLarge
|
|
39
|
+
},
|
|
40
|
+
outline: `${_reactcomponents.tokens.strokeWidthThin} solid ${_reactcomponents.tokens.colorTransparentStroke}`
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
const useAttachmentOverflowMenuItemStyles_unstable = (state)=>{
|
|
44
|
+
'use no memo';
|
|
45
|
+
const { imageOnly, designVersion } = state;
|
|
46
|
+
const styles = useStyles();
|
|
47
|
+
const nextStyles = useNextStyles();
|
|
48
|
+
const progressBarStyles = (0, _useProgressBarStylesstyles.useProgressBarStyles)();
|
|
49
|
+
state.root.className = (0, _reactcomponents.mergeClasses)(attachmentOverflowMenuItemClassNames.root, imageOnly && styles.imageOnly, designVersion === 'next' && nextStyles.nextStyles, state.root.className);
|
|
50
|
+
const secondaryContent = _reactcomponents.slot.optional(state.root.secondaryContent, {
|
|
51
|
+
elementType: 'span'
|
|
52
|
+
});
|
|
53
|
+
if (secondaryContent) {
|
|
54
|
+
secondaryContent.className = (0, _reactcomponents.mergeClasses)(styles.secondaryContent, secondaryContent.className);
|
|
55
|
+
state.root.secondaryContent = secondaryContent;
|
|
56
|
+
}
|
|
57
|
+
if (state.progress) {
|
|
58
|
+
state.progress.className = (0, _reactcomponents.mergeClasses)(attachmentOverflowMenuItemClassNames.progress, progressBarStyles.progress, state.progress.className);
|
|
59
|
+
const bar = _reactcomponents.slot.optional(state.progress.bar, {
|
|
60
|
+
elementType: 'div',
|
|
61
|
+
renderByDefault: true
|
|
62
|
+
});
|
|
63
|
+
if (bar) {
|
|
64
|
+
if (state.progress.value === undefined) {
|
|
65
|
+
bar.className = (0, _reactcomponents.mergeClasses)(progressBarStyles.indeterminateProgressBar, bar.className);
|
|
66
|
+
} else {
|
|
67
|
+
bar.className = (0, _reactcomponents.mergeClasses)(progressBarStyles.regularProgressBar, bar.className);
|
|
68
|
+
}
|
|
69
|
+
state.progress.bar = bar;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return state;
|
|
73
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useAttachmentOverflowMenuItemStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, slot, tokens } from '@fluentui/react-components';\nimport { useProgressBarStyles } from '../utils/useProgressBarStyles.styles';\nimport type {\n AttachmentOverflowMenuItemSlots,\n AttachmentOverflowMenuItemState,\n} from './AttachmentOverflowMenuItem.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const attachmentOverflowMenuItemClassNames: SlotClassNames<AttachmentOverflowMenuItemSlots> = {\n root: 'fai-AttachmentOverflowMenuItem',\n progress: 'fai-AttachmentOverflowMenuItem__progress',\n};\n\nconst FOCUS_VISIBLE_ATTR = 'data-fui-focus-visible';\n\nconst useStyles = makeStyles({\n imageOnly: {\n alignItems: 'center',\n },\n secondaryContent: {\n display: 'flex',\n alignItems: 'center',\n },\n});\n\nconst useNextStyles = makeStyles({\n nextStyles: {\n [`[${FOCUS_VISIBLE_ATTR}]::after`]: {\n borderRadius: tokens.borderRadiusXLarge,\n },\n outline: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,\n },\n});\n\n/**\n * Apply styling to the AttachmentList slots based on the state\n */\nexport const useAttachmentOverflowMenuItemStyles_unstable = (\n state: AttachmentOverflowMenuItemState,\n): AttachmentOverflowMenuItemState => {\n 'use no memo';\n\n const { imageOnly, designVersion } = state;\n const styles = useStyles();\n const nextStyles = useNextStyles();\n const progressBarStyles = useProgressBarStyles();\n\n state.root.className = mergeClasses(\n attachmentOverflowMenuItemClassNames.root,\n imageOnly && styles.imageOnly,\n designVersion === 'next' && nextStyles.nextStyles,\n state.root.className,\n );\n\n const secondaryContent = slot.optional(state.root.secondaryContent, {\n elementType: 'span',\n });\n if (secondaryContent) {\n secondaryContent.className = mergeClasses(styles.secondaryContent, secondaryContent.className);\n state.root.secondaryContent = secondaryContent;\n }\n\n if (state.progress) {\n state.progress.className = mergeClasses(\n attachmentOverflowMenuItemClassNames.progress,\n progressBarStyles.progress,\n state.progress.className,\n );\n\n const bar = slot.optional(state.progress.bar, { elementType: 'div', renderByDefault: true });\n if (bar) {\n if (state.progress.value === undefined) {\n bar.className = mergeClasses(progressBarStyles.indeterminateProgressBar, bar.className);\n } else {\n bar.className = mergeClasses(progressBarStyles.regularProgressBar, bar.className);\n }\n state.progress.bar = bar;\n }\n }\n\n return state;\n};\n"],"names":["attachmentOverflowMenuItemClassNames","useAttachmentOverflowMenuItemStyles_unstable","root","progress","FOCUS_VISIBLE_ATTR","useStyles","makeStyles","imageOnly","alignItems","secondaryContent","display","useNextStyles","nextStyles","borderRadius","tokens","borderRadiusXLarge","outline","strokeWidthThin","colorTransparentStroke","state","designVersion","styles","progressBarStyles","useProgressBarStyles","className","mergeClasses","slot","optional","elementType","bar","renderByDefault","value","undefined","indeterminateProgressBar","regularProgressBar"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAQaA,oCAAAA;eAAAA;;IA6BAC,4CAAAA;eAAAA;;;iCArC0C;4CAClB;AAO9B,MAAMD,uCAAwF;IACnGE,MAAM;IACNC,UAAU;AACZ;AAEA,MAAMC,qBAAqB;AAE3B,MAAMC,YAAYC,IAAAA,2BAAAA,EAAW;IAC3BC,WAAW;QACTC,YAAY;IACd;IACAC,kBAAkB;QAChBC,SAAS;QACTF,YAAY;IACd;AACF;AAEA,MAAMG,gBAAgBL,IAAAA,2BAAAA,EAAW;IAC/BM,YAAY;QACV,CAAC,CAAC,CAAC,EAAER,mBAAmB,QAAQ,CAAC,CAAC,EAAE;YAClCS,cAAcC,uBAAAA,CAAOC,kBAAkB;QACzC;QACAC,SAAS,CAAC,EAAEF,uBAAAA,CAAOG,eAAe,CAAC,OAAO,EAAEH,uBAAAA,CAAOI,sBAAsB,CAAC,CAAC;IAC7E;AACF;AAKO,MAAMjB,+CAA+C,CAC1DkB;IAEA;IAEA,MAAM,EAAEZ,SAAS,EAAEa,aAAa,EAAE,GAAGD;IACrC,MAAME,SAAShB;IACf,MAAMO,aAAaD;IACnB,MAAMW,oBAAoBC,IAAAA,gDAAAA;IAE1BJ,MAAMjB,IAAI,CAACsB,SAAS,GAAGC,IAAAA,6BAAAA,EACrBzB,qCAAqCE,IAAI,EACzCK,aAAac,OAAOd,SAAS,EAC7Ba,kBAAkB,UAAUR,WAAWA,UAAU,EACjDO,MAAMjB,IAAI,CAACsB,SAAS;IAGtB,MAAMf,mBAAmBiB,qBAAAA,CAAKC,QAAQ,CAACR,MAAMjB,IAAI,CAACO,gBAAgB,EAAE;QAClEmB,aAAa;IACf;IACA,IAAInB,kBAAkB;QACpBA,iBAAiBe,SAAS,GAAGC,IAAAA,6BAAAA,EAAaJ,OAAOZ,gBAAgB,EAAEA,iBAAiBe,SAAS;QAC7FL,MAAMjB,IAAI,CAACO,gBAAgB,GAAGA;IAChC;IAEA,IAAIU,MAAMhB,QAAQ,EAAE;QAClBgB,MAAMhB,QAAQ,CAACqB,SAAS,GAAGC,IAAAA,6BAAAA,EACzBzB,qCAAqCG,QAAQ,EAC7CmB,kBAAkBnB,QAAQ,EAC1BgB,MAAMhB,QAAQ,CAACqB,SAAS;QAG1B,MAAMK,MAAMH,qBAAAA,CAAKC,QAAQ,CAACR,MAAMhB,QAAQ,CAAC0B,GAAG,EAAE;YAAED,aAAa;YAAOE,iBAAiB;QAAK;QAC1F,IAAID,KAAK;YACP,IAAIV,MAAMhB,QAAQ,CAAC4B,KAAK,KAAKC,WAAW;gBACtCH,IAAIL,SAAS,GAAGC,IAAAA,6BAAAA,EAAaH,kBAAkBW,wBAAwB,EAAEJ,IAAIL,SAAS;YACxF,OAAO;gBACLK,IAAIL,SAAS,GAAGC,IAAAA,6BAAAA,EAAaH,kBAAkBY,kBAAkB,EAAEL,IAAIL,SAAS;YAClF;YACAL,MAAMhB,QAAQ,CAAC0B,GAAG,GAAGA;QACvB;IACF;IAEA,OAAOV;AACT"}
|
|
@@ -20,4 +20,4 @@ const AttachmentTag = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
|
20
20
|
(0, _reactprovider.useCustomStyleHook)('useAttachmentTagStyles')(state);
|
|
21
21
|
return (0, _renderAttachmentTag.renderAttachmentTag_unstable)(state);
|
|
22
22
|
});
|
|
23
|
-
AttachmentTag.displayName = 'AttachmentTag';
|
|
23
|
+
AttachmentTag.displayName = 'AttachmentTag';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AttachmentTag.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentTag_unstable } from './useAttachmentTag';\nimport { renderAttachmentTag_unstable } from './renderAttachmentTag';\nimport { useAttachmentTagStyles_unstable } from './useAttachmentTagStyles.styles';\nimport type { AttachmentTagProps } from './AttachmentTag.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\n/**\n * @deprecated use new Attachment component exported from \\@fluentui-copilot/react-attachments package instead.\n * Deprecated on 4/9/2024.\n */\nexport const AttachmentTag: ForwardRefComponent<AttachmentTagProps> = React.forwardRef((props, ref) => {\n const state = useAttachmentTag_unstable(props, ref);\n\n useAttachmentTagStyles_unstable(state);\n useCustomStyleHook('useAttachmentTagStyles')(state);\n\n return renderAttachmentTag_unstable(state);\n});\n\nAttachmentTag.displayName = 'AttachmentTag';\n"],"names":["
|
|
1
|
+
{"version":3,"sources":["AttachmentTag.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentTag_unstable } from './useAttachmentTag';\nimport { renderAttachmentTag_unstable } from './renderAttachmentTag';\nimport { useAttachmentTagStyles_unstable } from './useAttachmentTagStyles.styles';\nimport type { AttachmentTagProps } from './AttachmentTag.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\n/**\n * @deprecated use new Attachment component exported from \\@fluentui-copilot/react-attachments package instead.\n * Deprecated on 4/9/2024.\n */\nexport const AttachmentTag: ForwardRefComponent<AttachmentTagProps> = React.forwardRef((props, ref) => {\n const state = useAttachmentTag_unstable(props, ref);\n\n useAttachmentTagStyles_unstable(state);\n useCustomStyleHook('useAttachmentTagStyles')(state);\n\n return renderAttachmentTag_unstable(state);\n});\n\nAttachmentTag.displayName = 'AttachmentTag';\n"],"names":["AttachmentTag","React","forwardRef","props","ref","state","useAttachmentTag_unstable","useAttachmentTagStyles_unstable","useCustomStyleHook","renderAttachmentTag_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAYaA;;;eAAAA;;;;iEAZU;kCACmB;qCACG;8CACG;+BAGb;AAM5B,MAAMA,gBAAAA,WAAAA,GAAyDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC7F,MAAMC,QAAQC,IAAAA,2CAAAA,EAA0BH,OAAOC;IAE/CG,IAAAA,6DAAAA,EAAgCF;IAChCG,IAAAA,iCAAAA,EAAmB,0BAA0BH;IAE7C,OAAOI,IAAAA,iDAAAA,EAA6BJ;AACtC;AAEAL,cAAcU,WAAW,GAAG"}
|
|
@@ -41,4 +41,3 @@ const _AttachmentTag = require("./AttachmentTag");
|
|
|
41
41
|
const _renderAttachmentTag = require("./renderAttachmentTag");
|
|
42
42
|
const _useAttachmentTag = require("./useAttachmentTag");
|
|
43
43
|
const _useAttachmentTagStylesstyles = require("./useAttachmentTagStyles.styles");
|
|
44
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
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":["
|
|
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":["renderAttachmentTag_unstable","state","assertSlots","_jsxs","root","media","_jsx","content","icon"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;4BARb;iCAE4B;AAMrB,MAAMA,+BAA+B,CAACC;IAC3CC,IAAAA,4BAAAA,EAAgCD;IAEhC,OAAA,WAAA,GACEE,IAAAA,gBAAA,EAACF,MAAMG,IAAI,EAAA;;YACRH,MAAMI,KAAK,IAAA,WAAA,GAAIC,IAAAA,eAAA,EAACL,MAAMI,KAAK,EAAA,CAAA;0BAC5BC,IAAAA,eAAA,EAACL,MAAMM,OAAO,EAAA,CAAA;0BACdD,IAAAA,eAAA,EAACL,MAAMO,IAAI,EAAA,CAAA;;;AAGjB"}
|
|
@@ -1 +1 @@
|
|
|
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":["
|
|
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":["useAttachmentTag_unstable","props","ref","useAttachmentTagSlots","elementType","root","media","content","icon"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAaaA;;;eAAAA;;;uCAZyB;AAY/B,MAAMA,4BAA4B,CACvCC,OACAC;IAEA,OAAOC,IAAAA,4CAAAA,EAAsBF,OAAOC,KAAK;QACvCE,aAAa;YAAEC,MAAM;YAAUC,OAAO;YAAQC,SAAS;YAAQC,MAAM;QAAO;IAC9E;AACF"}
|