@fluentui-copilot/react-attachments 0.12.3 → 0.12.5
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 +52 -1
- package/CHANGELOG.md +21 -2
- package/dist/index.d.ts +11 -5
- package/lib/components/Attachment/useAttachmentStyles.styles.js +34 -12
- package/lib/components/Attachment/useAttachmentStyles.styles.js.map +1 -1
- package/lib/components/AttachmentList/AttachmentList.types.js.map +1 -1
- package/lib/components/AttachmentList/useAttachmentList.js +1 -0
- package/lib/components/AttachmentList/useAttachmentList.js.map +1 -1
- package/lib/components/AttachmentList/useAttachmentListContextValues.js +2 -0
- package/lib/components/AttachmentList/useAttachmentListContextValues.js.map +1 -1
- package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js.map +1 -1
- package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js +26 -6
- package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js.map +1 -1
- package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.js +37 -25
- package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.js.map +1 -1
- package/lib/contexts/attachmentListContext.js +2 -1
- package/lib/contexts/attachmentListContext.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/AttachmentList/AttachmentList.types.js.map +1 -1
- package/lib-commonjs/components/AttachmentList/useAttachmentList.js +1 -0
- package/lib-commonjs/components/AttachmentList/useAttachmentList.js.map +1 -1
- package/lib-commonjs/components/AttachmentList/useAttachmentListContextValues.js +2 -1
- package/lib-commonjs/components/AttachmentList/useAttachmentListContextValues.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js +26 -4
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.js +57 -26
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.js.map +1 -1
- package/lib-commonjs/contexts/attachmentListContext.js +2 -1
- package/lib-commonjs/contexts/attachmentListContext.js.map +1 -1
- package/package.json +6 -6
package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useAttachmentOverflowMenuButton.
|
|
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","fullyOverflowed","overflowCount","isLoading","designVersion","context","numberOfAttachments","progress","ProgressBar","useDesignVersion","props","root","slot","getIntrinsicElementProps","useMergedRefs","defaultProps","children","buttonText","elementType","ref","value","shape","mode","defaultButtonText","copilotMode","text"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAyBUA;;;eAAAA;;;;iEAzBa;+BAE0B;iCAC0B;+CACjB;4BAKT;uCACC;AAehD,MAAQA,2CAA8BC,CAAAA,OAAsBC;UAG5D,EAEAF,aAAMG,EACNC,aAAMC,EAENJ,iBAAMK,KACNJ,IAAAA,wEAAsC,EAAAK,CAAAA,UAAAA;UAEtC,EAEAC,mBAAO,iEACO,EAAAD,CAAAA,UAAAA;4BACJH,iBAAAI;sBACNC,CAAAA,CAAUC,MAAAA,SAAAA;UACZJ,gBAAAK,IAAAA,+BAAA,EAAAC,MAAAN,aAAA;UACAO,OAAMC,IAAAA,6BACJC,EAAAA,MAAAA,IAAAA;uBACOC,kBAAmBf,OAAAA,eAAAA,eAAAA,MAAAA;;oBAG1B;kBACEgB;sBACEC,4BAAUC;;mCAEZC,CAAAA,MAAAA,CAAAA,IAAAA,yCAAa,EAAA,UAAA;iBACfJ,IAAAA,8BAAA,EAAAK,KAAApB;eAEFQ,KAAAA;;0BACkBa;0BAAkBC;;yBAAqC;;kBACvEH,qBAAAA,CAAAA,MAAaV,CAAAA,MAAAA,QAAAA,EAAAA;0BACf;gBACAP,OAAAA;gBACAH,OAAAA;gBACAI,WAAAA;gBACAC,cAAAA;;yBAEAmB,4BAAAA;QACF;QACArB;QAEFH;QAOEI;;QAEAE;QAEAkB;;;SAGEC,kBAAOb,KAAA,EAAAR,aAAA,EAAAE,aAAA,EAAAoB,WAAA,EAAAvB,eAAA;cACLe,QAAON,EAAAA;eACTA,MAAAM,QAAA;;QAGFN,MAAIN,IAAAA,EAAAA;YACF,OAAAM,MAAAe,IAAA,KACE,YAAA;YAKJ,OAAAf,MAAAe,IAAA,CAAAvB;QAEA,OAAO;YACT,OAAAQ,MAAAe,IAAA"}
|
|
@@ -39,23 +39,16 @@ const useNextStyles = (0, _reactcomponents.__styles)({
|
|
|
39
39
|
Btl43ni: 0,
|
|
40
40
|
B7oj6ja: 0,
|
|
41
41
|
Dimara: "f1kijzfu",
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
vrafjx: 0,
|
|
53
|
-
Bekrc4i: 0,
|
|
54
|
-
i8vvqc: 0,
|
|
55
|
-
g2u3we: 0,
|
|
56
|
-
icvyot: 0,
|
|
57
|
-
B4j52fo: 0,
|
|
58
|
-
irswps: "f3bhgqh",
|
|
42
|
+
g2u3we: "fghlq4f",
|
|
43
|
+
h3c5rm: [
|
|
44
|
+
"f1gn591s",
|
|
45
|
+
"fjscplz"
|
|
46
|
+
],
|
|
47
|
+
B9xav0g: "fb073pr",
|
|
48
|
+
zhjwy3: [
|
|
49
|
+
"fjscplz",
|
|
50
|
+
"f1gn591s"
|
|
51
|
+
],
|
|
59
52
|
sj55zd: "fkfq4zb",
|
|
60
53
|
De3pzq: "f16xq7d1",
|
|
61
54
|
eoavqd: "f8491dx",
|
|
@@ -79,6 +72,28 @@ const useNextStyles = (0, _reactcomponents.__styles)({
|
|
|
79
72
|
z189sj: 0,
|
|
80
73
|
z8tnut: 0,
|
|
81
74
|
B0ocmuz: "f1nm7172"
|
|
75
|
+
},
|
|
76
|
+
fullyOverflowed_canvas: {
|
|
77
|
+
Byoj8tv: 0,
|
|
78
|
+
uwmqm3: 0,
|
|
79
|
+
z189sj: 0,
|
|
80
|
+
z8tnut: 0,
|
|
81
|
+
B0ocmuz: "fuva4e2",
|
|
82
|
+
Bahqtrf: "fk6fouc",
|
|
83
|
+
Be2twd7: "fod5ikn",
|
|
84
|
+
Bhrd7zp: "fl43uef",
|
|
85
|
+
Bg96gwp: "f1anucx2"
|
|
86
|
+
},
|
|
87
|
+
fullyOverflowed_sidecar: {
|
|
88
|
+
Byoj8tv: 0,
|
|
89
|
+
uwmqm3: 0,
|
|
90
|
+
z189sj: 0,
|
|
91
|
+
z8tnut: 0,
|
|
92
|
+
B0ocmuz: "ffysxzw",
|
|
93
|
+
Bahqtrf: "fk6fouc",
|
|
94
|
+
Be2twd7: "fkhj508",
|
|
95
|
+
Bhrd7zp: "fl43uef",
|
|
96
|
+
Bg96gwp: "f1i3iumi"
|
|
82
97
|
}
|
|
83
98
|
}, {
|
|
84
99
|
d: [
|
|
@@ -88,12 +103,10 @@ const useNextStyles = (0, _reactcomponents.__styles)({
|
|
|
88
103
|
p: -1
|
|
89
104
|
}
|
|
90
105
|
],
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
],
|
|
106
|
+
".fghlq4f{border-top-color:var(--colorTransparentStroke);}",
|
|
107
|
+
".f1gn591s{border-right-color:var(--colorTransparentStroke);}",
|
|
108
|
+
".fjscplz{border-left-color:var(--colorTransparentStroke);}",
|
|
109
|
+
".fb073pr{border-bottom-color:var(--colorTransparentStroke);}",
|
|
97
110
|
".fkfq4zb{color:var(--colorNeutralForeground2);}",
|
|
98
111
|
".f16xq7d1{background-color:var(--colorNeutralBackground3);}",
|
|
99
112
|
".f1w5jphr{min-height:40px;}",
|
|
@@ -109,7 +122,25 @@ const useNextStyles = (0, _reactcomponents.__styles)({
|
|
|
109
122
|
{
|
|
110
123
|
p: -1
|
|
111
124
|
}
|
|
112
|
-
]
|
|
125
|
+
],
|
|
126
|
+
[
|
|
127
|
+
".fuva4e2{padding:var(--spacingVerticalNone) var(--spacingHorizontalL);}",
|
|
128
|
+
{
|
|
129
|
+
p: -1
|
|
130
|
+
}
|
|
131
|
+
],
|
|
132
|
+
".fk6fouc{font-family:var(--fontFamilyBase);}",
|
|
133
|
+
".fod5ikn{font-size:var(--fontSizeBase400);}",
|
|
134
|
+
".fl43uef{font-weight:var(--fontWeightSemibold);}",
|
|
135
|
+
".f1anucx2{line-height:var(--lineHeightBase450);}",
|
|
136
|
+
[
|
|
137
|
+
".ffysxzw{padding:var(--spacingVerticalNone) var(--spacingHorizontalM);}",
|
|
138
|
+
{
|
|
139
|
+
p: -1
|
|
140
|
+
}
|
|
141
|
+
],
|
|
142
|
+
".fkhj508{font-size:var(--fontSizeBase300);}",
|
|
143
|
+
".f1i3iumi{line-height:var(--lineHeightBase300);}"
|
|
113
144
|
],
|
|
114
145
|
h: [
|
|
115
146
|
".f8491dx:hover{cursor:pointer;}",
|
|
@@ -123,11 +154,11 @@ const useNextStyles = (0, _reactcomponents.__styles)({
|
|
|
123
154
|
});
|
|
124
155
|
const useAttachmentOverflowMenuButtonStyles_unstable = (state)=>{
|
|
125
156
|
'use no memo';
|
|
126
|
-
const { designVersion, mode } = state;
|
|
157
|
+
const { designVersion, mode, fullyOverflowed } = state;
|
|
127
158
|
const rootBaseClassName = useRootBaseClassName();
|
|
128
159
|
const progressBarStyles = (0, _useProgressBarStylesstyles.useProgressBarStyles)();
|
|
129
160
|
const nextStyles = useNextStyles();
|
|
130
|
-
state.root.className = (0, _reactcomponents.mergeClasses)(attachmentOverflowMenuButtonClassNames.root, rootBaseClassName, designVersion === 'next' && nextStyles.root, designVersion === 'next' && nextStyles[mode], state.root.className);
|
|
161
|
+
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);
|
|
131
162
|
if (state.progress) {
|
|
132
163
|
state.progress.className = (0, _reactcomponents.mergeClasses)(attachmentOverflowMenuButtonClassNames.progress, progressBarStyles.progress, state.progress.className);
|
|
133
164
|
const bar = _reactcomponents.slot.optional(state.progress.bar, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useAttachmentOverflowMenuButtonStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses,
|
|
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","state","root","progress","useRootBaseClassName","makeResetStyles","color","alignItems","border","strokeWidthThin","borderRadius","boxSizing","columnGap","cursor","display","flexWrap","fontFamily","fontSize","typographyStyles","body1","fontWeight","justifyContent","padding","verticalAlign","position","Bi91k9c","backgroundColor","uwmqm3","z189sj","z8tnut","useNextStyles","borderColor","Byoj8tv","canvas","minHeight","B0ocmuz","sidecar","Bg96gwp","p","fullyOverflowed_sidecar","body1Strong","fullyOverflowed","className","progressBarStyles","bar","mergeClasses","elementType"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IASaA,sCAAAA;eAAAA;;IAqGTC,8CACED;eADFC;;;iCA9GgE;4CAE/B;AAO9B,MAAMD,yCAA4F;UACvGE;cACAC;AACF;AAEA,MAAMC,uBAAuBC,IAAAA,8BAAAA,EAAAA,YAAgB,MAAA;OAC3CC;QAAAA;QAAqC;QAAA;KAAA;OACrCC;QAAAA;KAAY;;MAEZC,gBAAkBC,IAAAA,yBAAAA,EAAAA;UAClBC;QACAC,SAAAA;QACAC,SAAAA;QACAC,SAAQ;QACRC,SAAS;QACTC,QAAAA;QACAC,QAAAA;QACAC,QAAAA;YAAAA;YAAUC;SAAiBC;QAC3BC,SAAAA;QACAC,QAAAA;YAAAA;YAAgB;SAAA;QAChBC,QAAAA;QACAC,QAAAA;QACAC,QAAAA;QAEAC,SAAA;gBACEZ;gBACAa;gBACApB;;YAEF;gBACEoB;iBACApB;QACFqB,QAAA;QACAC,QAAA;gBACE;iBACEF;;aAEF;gBACEA;iBACF;QACFC,QAAA;QACFC,QAAA;QAEAC,QAAMC;QACJ5B,SAAM;;4BAEU6B;iBACdzB;gBACAoB;gBACA;gBACEb;iBACAP;iBACAoB;iBACF;iBACA;iBACEpB;;6BAEF;QACF0B,SAAA;QACAC,QAAQ;gBACNC;gBACAZ;QACFa,SAAA;QACAC,SAAS;iBACPF;iBACAZ;QACFe,SAAA;;;;;;YAG+B;gBAC/BC,GAAA,CAAA;;SACAC;QAAAA;QAAyB;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;YAAA;YAAA;oBACvBjB;;;;QACoBkB;YAAAA;YAAW;gBACjCF,GAAA,CAAA;YACF;SAAA;QAAA;YAAA;YAAA;gBAEAA,GAAA,CAAA;;;;;;;;;;gBAGAA,GAAA,CAAA;;SAGE;QAAA;QAAA;KAAA;OAEA;QAAA;QAA6BG;QAAoBxC;KAAAA;OAEjD;QAAA;QAA0BG;KAAAA;;MAcxBH,iDACED,CAAAA;;yBAKwF,MAC1F,iBACMC;8BAEGG;8BACDsC,IAAAA,gDAAyBC;uBAC/Bb;cACA7B,CAAAA,SAAME,GAAAA,IAAAA,6BAAeyC,EAAAA,uCAAAA,IAAAA,EAAAA,mBAAAA,kBAAAA,UAAAA,WAAAA,IAAAA,EAAAA,kBAAAA,UAAAA,UAAAA,CAAAA,KAAAA,EAAAA,kBAAAA,UAAAA,mBAAAA,UAAAA,CAAAA,CAAAA,gBAAAA,EAAAA,KAAAA,CAAAA,CAAAA,EAAAA,MAAAA,IAAAA,CAAAA,SAAAA;cACvBzC,QAAA,EAAA;QACFF,MAAAE,QAAA,CAAAuC,SAAA,GAAAG,IAAAA,6BAAA,EAAA7C,uCAAAG,QAAA,EAAAwC,kBAAAxC,QAAA,EAAAF,MAAAE,QAAA,CAAAuC,SAAA;QAEA,MAAAE,MAAO3C,qBAAAA,CAAAA,QAAAA,CAAAA,MAAAA,QAAAA,CAAAA,GAAAA,EAAAA;YACP6C,aAAA"}
|
|
@@ -23,7 +23,8 @@ const _reactcontextselector = require("@fluentui/react-context-selector");
|
|
|
23
23
|
const AttachmentListContext = (0, _reactcontextselector.createContext)(undefined);
|
|
24
24
|
const attachmentListContextDefaultValue = {
|
|
25
25
|
onAttachmentDismiss: ()=>null,
|
|
26
|
-
shouldUseOverflow: false
|
|
26
|
+
shouldUseOverflow: false,
|
|
27
|
+
numberOfAttachments: 0
|
|
27
28
|
};
|
|
28
29
|
const AttachmentListProvider = AttachmentListContext.Provider;
|
|
29
30
|
const useAttachmentListContext_unstable = (selector)=>(0, _reactcontextselector.useContextSelector)(AttachmentListContext, (ctx = attachmentListContextDefaultValue)=>selector(ctx)); //# sourceMappingURL=attachmentListContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["attachmentListContext.ts"],"sourcesContent":["import { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { Context, ContextSelector } from '@fluentui/react-context-selector';\nimport type { AttachmentListState } from '../components/index';\n\nexport const AttachmentListContext: Context<AttachmentListContextValue> = createContext<\n AttachmentListContextValue | undefined\n>(undefined) as Context<AttachmentListContextValue>;\n\nconst attachmentListContextDefaultValue: AttachmentListContextValue = {\n onAttachmentDismiss: () => null,\n shouldUseOverflow: false,\n};\n\n/**\n * Context shared between AttachmentList and its children components\n */\nexport type AttachmentListContextValue = Pick
|
|
1
|
+
{"version":3,"sources":["attachmentListContext.ts"],"sourcesContent":["import { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { Context, ContextSelector } from '@fluentui/react-context-selector';\nimport type { AttachmentListState } from '../components/index';\n\nexport const AttachmentListContext: Context<AttachmentListContextValue> = createContext<\n AttachmentListContextValue | undefined\n>(undefined) as Context<AttachmentListContextValue>;\n\nconst attachmentListContextDefaultValue: AttachmentListContextValue = {\n onAttachmentDismiss: () => null,\n shouldUseOverflow: false,\n numberOfAttachments: 0,\n};\n\n/**\n * Context shared between AttachmentList and its children components\n */\nexport type AttachmentListContextValue = Pick<\n AttachmentListState,\n 'onAttachmentDismiss' | 'shouldUseOverflow' | 'numberOfAttachments'\n>;\n\nexport const AttachmentListProvider = AttachmentListContext.Provider;\n\nexport const useAttachmentListContext_unstable = <T>(selector: ContextSelector<AttachmentListContextValue, T>) =>\n useContextSelector(AttachmentListContext, (ctx = attachmentListContextDefaultValue) => selector(ctx));\n"],"names":["AttachmentListContext","AttachmentListProvider","useAttachmentListContext_unstable","createContext","undefined","attachmentListContextDefaultValue","onAttachmentDismiss","shouldUseOverflow","numberOfAttachments","Provider","selector","useContextSelector","ctx"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIaA,qBAAAA;eAAAA;;IAkBAC,sBAAAA;eAAAA;;IAEAC,iCAAAA;eAAAA;;;sCAxBqC;AAI3C,MAAMF,wBAA6DG,IAAAA,mCAAAA,EAExEC;AAEF,MAAMC,oCAAgE;yBACpEC,IAA2B;uBAC3BC;yBACAC;AACF;AAUO,MAAMP,yBAAyBD,sBAAsBS,QAAQ;AAE7D,MAAMP,oCAAoCQ,CAAAA,WAC/CC,IAAAA,wCAAAA,EAAmBX,uBAAuB,CAACY,MAAMP,iCAAiC,GAAKK,SAASE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-copilot/react-attachments",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.5",
|
|
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",
|
|
@@ -12,17 +12,17 @@
|
|
|
12
12
|
},
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@fluentui-copilot/react-provider": "^0.11.
|
|
16
|
-
"@fluentui-copilot/react-utilities": "^0.0.
|
|
17
|
-
"@fluentui-copilot/tokens": "^0.3.
|
|
15
|
+
"@fluentui-copilot/react-provider": "^0.11.3",
|
|
16
|
+
"@fluentui-copilot/react-utilities": "^0.0.8",
|
|
17
|
+
"@fluentui-copilot/tokens": "^0.3.11",
|
|
18
18
|
"@swc/helpers": "^0.5.1"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"@fluentui/keyboard-keys": ">=9.0.8 <10.0.0",
|
|
22
|
-
"@fluentui/react-components": ">=9.
|
|
22
|
+
"@fluentui/react-components": ">=9.63.0 <10.0.0",
|
|
23
23
|
"@fluentui/react-context-selector": ">=9.1.76 <10.0.0",
|
|
24
24
|
"@fluentui/react-icons": ">=2.0.260 <3.0.0",
|
|
25
|
-
"@fluentui/react-jsx-runtime": ">=9.0.
|
|
25
|
+
"@fluentui/react-jsx-runtime": ">=9.0.54 <10.0.0",
|
|
26
26
|
"@fluentui/react-shared-contexts": ">=9.23.1 <10.0.0",
|
|
27
27
|
"@fluentui/react-utilities": ">=9.19.0 <10.0.0",
|
|
28
28
|
"@types/react": ">=16.14.0 <19.0.0",
|