@fluentui/react-message-bar 9.2.11 → 9.2.13
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.md +23 -2
- package/dist/index.d.ts +7 -1
- package/lib/components/MessageBar/useMessageBarReflow.js +2 -2
- package/lib/components/MessageBar/useMessageBarReflow.js.map +1 -1
- package/lib/components/MessageBarBody/MessageBarBody.js +3 -1
- package/lib/components/MessageBarBody/MessageBarBody.js.map +1 -1
- package/lib/components/MessageBarBody/MessageBarBody.types.js.map +1 -1
- package/lib/components/MessageBarBody/renderMessageBarBody.js +6 -2
- package/lib/components/MessageBarBody/renderMessageBarBody.js.map +1 -1
- package/lib/components/MessageBarBody/useMessageBarBodyContextValues.js +9 -0
- package/lib/components/MessageBarBody/useMessageBarBodyContextValues.js.map +1 -0
- package/lib-commonjs/components/MessageBar/useMessageBarReflow.js +2 -2
- package/lib-commonjs/components/MessageBar/useMessageBarReflow.js.map +1 -1
- package/lib-commonjs/components/MessageBarBody/MessageBarBody.js +3 -1
- package/lib-commonjs/components/MessageBarBody/MessageBarBody.js.map +1 -1
- package/lib-commonjs/components/MessageBarBody/MessageBarBody.types.js.map +1 -1
- package/lib-commonjs/components/MessageBarBody/renderMessageBarBody.js +6 -2
- package/lib-commonjs/components/MessageBarBody/renderMessageBarBody.js.map +1 -1
- package/lib-commonjs/components/MessageBarBody/useMessageBarBodyContextValues.js +20 -0
- package/lib-commonjs/components/MessageBarBody/useMessageBarBodyContextValues.js.map +1 -0
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,33 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-message-bar
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Tue, 08 Oct 2024 22:02:31 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.2.13](https://github.com/microsoft/fluentui/tree/@fluentui/react-message-bar_v9.2.13)
|
|
8
|
+
|
|
9
|
+
Tue, 08 Oct 2024 22:02:31 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-message-bar_v9.2.12..@fluentui/react-message-bar_v9.2.13)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- fix: add null check in ResizeObserver callback ([PR #32971](https://github.com/microsoft/fluentui/pull/32971) by seanmonahan@microsoft.com)
|
|
15
|
+
- fix: use LinkContextProvider to force all links inside MessageBody to be underlined ([PR #32850](https://github.com/microsoft/fluentui/pull/32850) by vgenaev@gmail.com)
|
|
16
|
+
- Bump @fluentui/react-button to v9.3.93 ([PR #33007](https://github.com/microsoft/fluentui/pull/33007) by beachball)
|
|
17
|
+
- Bump @fluentui/react-link to v9.3.0 ([PR #33007](https://github.com/microsoft/fluentui/pull/33007) by beachball)
|
|
18
|
+
|
|
19
|
+
## [9.2.12](https://github.com/microsoft/fluentui/tree/@fluentui/react-message-bar_v9.2.12)
|
|
20
|
+
|
|
21
|
+
Thu, 26 Sep 2024 14:15:28 GMT
|
|
22
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-message-bar_v9.2.11..@fluentui/react-message-bar_v9.2.12)
|
|
23
|
+
|
|
24
|
+
### Patches
|
|
25
|
+
|
|
26
|
+
- Bump @fluentui/react-button to v9.3.92 ([PR #32924](https://github.com/microsoft/fluentui/pull/32924) by beachball)
|
|
27
|
+
|
|
7
28
|
## [9.2.11](https://github.com/microsoft/fluentui/tree/@fluentui/react-message-bar_v9.2.11)
|
|
8
29
|
|
|
9
|
-
Mon, 23 Sep 2024 12:
|
|
30
|
+
Mon, 23 Sep 2024 12:40:17 GMT
|
|
10
31
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-message-bar_v9.2.10..@fluentui/react-message-bar_v9.2.11)
|
|
11
32
|
|
|
12
33
|
### Patches
|
package/dist/index.d.ts
CHANGED
|
@@ -54,6 +54,12 @@ export declare const MessageBarBody: ForwardRefComponent<MessageBarBodyProps>;
|
|
|
54
54
|
|
|
55
55
|
export declare const messageBarBodyClassNames: SlotClassNames<MessageBarBodySlots>;
|
|
56
56
|
|
|
57
|
+
declare type MessageBarBodyContextValues = {
|
|
58
|
+
link: {
|
|
59
|
+
inline?: boolean;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
|
|
57
63
|
/**
|
|
58
64
|
* MessageBarBody Props
|
|
59
65
|
*/
|
|
@@ -206,7 +212,7 @@ export declare const renderMessageBarActions_unstable: (state: MessageBarActions
|
|
|
206
212
|
/**
|
|
207
213
|
* Render the final JSX of MessageBarBody
|
|
208
214
|
*/
|
|
209
|
-
export declare const renderMessageBarBody_unstable: (state: MessageBarBodyState) => JSX.Element;
|
|
215
|
+
export declare const renderMessageBarBody_unstable: (state: MessageBarBodyState, contextValues: MessageBarBodyContextValues) => JSX.Element;
|
|
210
216
|
|
|
211
217
|
/**
|
|
212
218
|
* Render the final JSX of MessageBarGroup
|
|
@@ -10,7 +10,7 @@ export function useMessageBarReflow(enabled = false) {
|
|
|
10
10
|
const resizeObserverRef = React.useRef(null);
|
|
11
11
|
const prevInlineSizeRef = React.useRef(-1);
|
|
12
12
|
const handleResize = React.useCallback((entries)=>{
|
|
13
|
-
var _entry_borderBoxSize;
|
|
13
|
+
var _entry_borderBoxSize_, _entry_borderBoxSize;
|
|
14
14
|
// Resize observer is only owned by this component - one resize observer entry expected
|
|
15
15
|
// No need to support multiple fragments - one border box entry expected
|
|
16
16
|
if (process.env.NODE_ENV !== 'production' && entries.length > 1) {
|
|
@@ -24,7 +24,7 @@ export function useMessageBarReflow(enabled = false) {
|
|
|
24
24
|
const entry = entries[0];
|
|
25
25
|
var _entry_borderBoxSize__inlineSize;
|
|
26
26
|
// `borderBoxSize` is not supported before Chrome 84, Firefox 92, nor Safari 15.4
|
|
27
|
-
const inlineSize = (_entry_borderBoxSize__inlineSize = entry === null || entry === void 0 ? void 0 : (_entry_borderBoxSize = entry.borderBoxSize) === null || _entry_borderBoxSize === void 0 ? void 0 : _entry_borderBoxSize[0].inlineSize) !== null && _entry_borderBoxSize__inlineSize !== void 0 ? _entry_borderBoxSize__inlineSize : entry === null || entry === void 0 ? void 0 : entry.target.getBoundingClientRect().width;
|
|
27
|
+
const inlineSize = (_entry_borderBoxSize__inlineSize = entry === null || entry === void 0 ? void 0 : (_entry_borderBoxSize = entry.borderBoxSize) === null || _entry_borderBoxSize === void 0 ? void 0 : (_entry_borderBoxSize_ = _entry_borderBoxSize[0]) === null || _entry_borderBoxSize_ === void 0 ? void 0 : _entry_borderBoxSize_.inlineSize) !== null && _entry_borderBoxSize__inlineSize !== void 0 ? _entry_borderBoxSize__inlineSize : entry === null || entry === void 0 ? void 0 : entry.target.getBoundingClientRect().width;
|
|
28
28
|
if (inlineSize === undefined || !entry) {
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useMessageBarReflow.ts"],"sourcesContent":["import * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { isHTMLElement } from '@fluentui/react-utilities';\n\nexport function useMessageBarReflow(enabled: boolean = false) {\n const { targetDocument } = useFluent();\n const forceUpdate = React.useReducer(() => ({}), {})[1];\n const reflowingRef = React.useRef(false);\n // TODO: exclude types from this lint rule: https://github.com/microsoft/fluentui/issues/31286\n // eslint-disable-next-line no-restricted-globals\n const resizeObserverRef = React.useRef<ResizeObserver | null>(null);\n const prevInlineSizeRef = React.useRef(-1);\n\n const handleResize: ResizeObserverCallback = React.useCallback(\n entries => {\n // Resize observer is only owned by this component - one resize observer entry expected\n // No need to support multiple fragments - one border box entry expected\n if (process.env.NODE_ENV !== 'production' && entries.length > 1) {\n // eslint-disable-next-line no-console\n console.error(\n [\n 'useMessageBarReflow: Resize observer should only have one entry. ',\n 'If multiple entries are observed, the first entry will be used.',\n 'This is a bug, please report it to the Fluent UI team.',\n ].join(' '),\n );\n }\n\n const entry = entries[0];\n // `borderBoxSize` is not supported before Chrome 84, Firefox 92, nor Safari 15.4\n const inlineSize = entry?.borderBoxSize?.[0]
|
|
1
|
+
{"version":3,"sources":["useMessageBarReflow.ts"],"sourcesContent":["import * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { isHTMLElement } from '@fluentui/react-utilities';\n\nexport function useMessageBarReflow(enabled: boolean = false) {\n const { targetDocument } = useFluent();\n const forceUpdate = React.useReducer(() => ({}), {})[1];\n const reflowingRef = React.useRef(false);\n // TODO: exclude types from this lint rule: https://github.com/microsoft/fluentui/issues/31286\n // eslint-disable-next-line no-restricted-globals\n const resizeObserverRef = React.useRef<ResizeObserver | null>(null);\n const prevInlineSizeRef = React.useRef(-1);\n\n const handleResize: ResizeObserverCallback = React.useCallback(\n entries => {\n // Resize observer is only owned by this component - one resize observer entry expected\n // No need to support multiple fragments - one border box entry expected\n if (process.env.NODE_ENV !== 'production' && entries.length > 1) {\n // eslint-disable-next-line no-console\n console.error(\n [\n 'useMessageBarReflow: Resize observer should only have one entry. ',\n 'If multiple entries are observed, the first entry will be used.',\n 'This is a bug, please report it to the Fluent UI team.',\n ].join(' '),\n );\n }\n\n const entry = entries[0];\n // `borderBoxSize` is not supported before Chrome 84, Firefox 92, nor Safari 15.4\n const inlineSize = entry?.borderBoxSize?.[0]?.inlineSize ?? entry?.target.getBoundingClientRect().width;\n\n if (inlineSize === undefined || !entry) {\n return;\n }\n\n const { target } = entry;\n\n if (!isHTMLElement(target)) {\n return;\n }\n\n let nextReflowing: boolean | undefined;\n\n // No easy way to really determine when the single line layout will fit\n // Just keep try to set single line layout as long as the size is growing\n // Will cause flickering when size is being adjusted gradually (i.e. drag) - but this should not be a common case\n if (reflowingRef.current) {\n if (prevInlineSizeRef.current < inlineSize) {\n nextReflowing = false;\n }\n } else {\n const scrollWidth = target.scrollWidth;\n if (inlineSize < scrollWidth) {\n nextReflowing = true;\n }\n }\n\n prevInlineSizeRef.current = inlineSize;\n if (typeof nextReflowing !== 'undefined' && reflowingRef.current !== nextReflowing) {\n reflowingRef.current = nextReflowing;\n forceUpdate();\n }\n },\n [forceUpdate],\n );\n\n const ref = React.useCallback(\n (el: HTMLElement | null) => {\n if (!enabled || !el || !targetDocument?.defaultView) {\n return;\n }\n\n resizeObserverRef.current?.disconnect();\n\n const win = targetDocument.defaultView;\n const resizeObserver = new win.ResizeObserver(handleResize);\n resizeObserverRef.current = resizeObserver;\n resizeObserver.observe(el, { box: 'border-box' });\n },\n [targetDocument, handleResize, enabled],\n );\n\n React.useEffect(() => {\n return () => {\n resizeObserverRef.current?.disconnect();\n };\n }, []);\n\n return { ref, reflowing: reflowingRef.current };\n}\n"],"names":["React","useFluent_unstable","useFluent","isHTMLElement","useMessageBarReflow","enabled","targetDocument","forceUpdate","useReducer","reflowingRef","useRef","resizeObserverRef","prevInlineSizeRef","handleResize","useCallback","entries","entry","process","env","NODE_ENV","length","console","error","join","inlineSize","borderBoxSize","target","getBoundingClientRect","width","undefined","nextReflowing","current","scrollWidth","ref","el","defaultView","disconnect","win","resizeObserver","ResizeObserver","observe","box","useEffect","reflowing"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,sBAAsBC,SAAS,QAAQ,kCAAkC;AAClF,SAASC,aAAa,QAAQ,4BAA4B;AAE1D,OAAO,SAASC,oBAAoBC,UAAmB,KAAK;IAC1D,MAAM,EAAEC,cAAc,EAAE,GAAGJ;IAC3B,MAAMK,cAAcP,MAAMQ,UAAU,CAAC,IAAO,CAAA,CAAC,CAAA,GAAI,CAAC,EAAE,CAAC,EAAE;IACvD,MAAMC,eAAeT,MAAMU,MAAM,CAAC;IAClC,8FAA8F;IAC9F,iDAAiD;IACjD,MAAMC,oBAAoBX,MAAMU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KCvB;QAJA,IAAI,CAACN,WAAW,CAAC6B,MAAM,EAAC5B,2BAAAA,qCAAAA,eAAgB6B,WAAW,GAAE;YACnD;QACF;SAEAxB,6BAAAA,kBAAkBoB,OAAO,cAAzBpB,iDAAAA,2BAA2ByB,UAAU;QAErC,MAAMC,MAAM/B,eAAe6B,WAAW;QACtC,MAAMG,iBAAiB,IAAID,IAAIE,cAAc,CAAC1B;QAC9CF,kBAAkBoB,OAAO,GAAGO;QAC5BA,eAAeE,OAAO,CAACN,IAAI;YAAEO,KAAK;QAAa;IACjD,GACA;QAACnC;QAAgBO;QAAcR;KAAQ;IAGzCL,MAAM0C,SAAS,CAAC;QACd,OAAO;gBACL/B;aAAAA,6BAAAA,kBAAkBoB,OAAO,cAAzBpB,iDAAAA,2BAA2ByB,UAAU;QACvC;IACF,GAAG,EAAE;IAEL,OAAO;QAAEH;QAAKU,WAAWlC,aAAasB,OAAO;IAAC;AAChD"}
|
|
@@ -3,12 +3,14 @@ import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
|
|
|
3
3
|
import { useMessageBarBody_unstable } from './useMessageBarBody';
|
|
4
4
|
import { renderMessageBarBody_unstable } from './renderMessageBarBody';
|
|
5
5
|
import { useMessageBarBodyStyles_unstable } from './useMessageBarBodyStyles.styles';
|
|
6
|
+
import { useMessageBarBodyContextValues_unstable } from './useMessageBarBodyContextValues';
|
|
6
7
|
/**
|
|
7
8
|
* MessageBarBody component
|
|
8
9
|
*/ export const MessageBarBody = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
9
10
|
const state = useMessageBarBody_unstable(props, ref);
|
|
11
|
+
const ctx = useMessageBarBodyContextValues_unstable(state);
|
|
10
12
|
useMessageBarBodyStyles_unstable(state);
|
|
11
13
|
useCustomStyleHook_unstable('useMessageBarBodyStyles_unstable')(state);
|
|
12
|
-
return renderMessageBarBody_unstable(state);
|
|
14
|
+
return renderMessageBarBody_unstable(state, ctx);
|
|
13
15
|
});
|
|
14
16
|
MessageBarBody.displayName = 'MessageBarBody';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["MessageBarBody.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\nimport { useMessageBarBody_unstable } from './useMessageBarBody';\nimport { renderMessageBarBody_unstable } from './renderMessageBarBody';\nimport { useMessageBarBodyStyles_unstable } from './useMessageBarBodyStyles.styles';\nimport type { MessageBarBodyProps } from './MessageBarBody.types';\n\n/**\n * MessageBarBody component\n */\nexport const MessageBarBody: ForwardRefComponent<MessageBarBodyProps> = React.forwardRef((props, ref) => {\n const state = useMessageBarBody_unstable(props, ref);\n\n useMessageBarBodyStyles_unstable(state);\n useCustomStyleHook_unstable('useMessageBarBodyStyles_unstable')(state);\n return renderMessageBarBody_unstable(state);\n});\n\nMessageBarBody.displayName = 'MessageBarBody';\n"],"names":["React","useCustomStyleHook_unstable","useMessageBarBody_unstable","renderMessageBarBody_unstable","useMessageBarBodyStyles_unstable","MessageBarBody","forwardRef","props","ref","state","displayName"],"rangeMappings":"
|
|
1
|
+
{"version":3,"sources":["MessageBarBody.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\nimport { useMessageBarBody_unstable } from './useMessageBarBody';\nimport { renderMessageBarBody_unstable } from './renderMessageBarBody';\nimport { useMessageBarBodyStyles_unstable } from './useMessageBarBodyStyles.styles';\nimport { useMessageBarBodyContextValues_unstable } from './useMessageBarBodyContextValues';\nimport type { MessageBarBodyProps } from './MessageBarBody.types';\n\n/**\n * MessageBarBody component\n */\nexport const MessageBarBody: ForwardRefComponent<MessageBarBodyProps> = React.forwardRef((props, ref) => {\n const state = useMessageBarBody_unstable(props, ref);\n const ctx = useMessageBarBodyContextValues_unstable(state);\n\n useMessageBarBodyStyles_unstable(state);\n useCustomStyleHook_unstable('useMessageBarBodyStyles_unstable')(state);\n return renderMessageBarBody_unstable(state, ctx);\n});\n\nMessageBarBody.displayName = 'MessageBarBody';\n"],"names":["React","useCustomStyleHook_unstable","useMessageBarBody_unstable","renderMessageBarBody_unstable","useMessageBarBodyStyles_unstable","useMessageBarBodyContextValues_unstable","MessageBarBody","forwardRef","props","ref","state","ctx","displayName"],"rangeMappings":";;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,2BAA2B,QAAQ,kCAAkC;AAC9E,SAASC,0BAA0B,QAAQ,sBAAsB;AACjE,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,gCAAgC,QAAQ,mCAAmC;AACpF,SAASC,uCAAuC,QAAQ,mCAAmC;AAG3F;;CAEC,GACD,OAAO,MAAMC,+BAA2DN,MAAMO,UAAU,CAAC,CAACC,OAAOC;IAC/F,MAAMC,QAAQR,2BAA2BM,OAAOC;IAChD,MAAME,MAAMN,wCAAwCK;IAEpDN,iCAAiCM;IACjCT,4BAA4B,oCAAoCS;IAChE,OAAOP,8BAA8BO,OAAOC;AAC9C,GAAG;AAEHL,eAAeM,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["MessageBarBody.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type MessageBarBodySlots = {\n root: Slot<'div'>;\n};\n\n/**\n * MessageBarBody Props\n */\nexport type MessageBarBodyProps = ComponentProps<MessageBarBodySlots>;\n\n/**\n * State used in rendering MessageBarBody\n */\nexport type MessageBarBodyState = ComponentState<MessageBarBodySlots>;\n"],"names":[],"rangeMappings":";;","mappings":"
|
|
1
|
+
{"version":3,"sources":["MessageBarBody.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type MessageBarBodyContextValues = {\n link: {\n inline?: boolean;\n };\n};\n\nexport type MessageBarBodySlots = {\n root: Slot<'div'>;\n};\n\n/**\n * MessageBarBody Props\n */\nexport type MessageBarBodyProps = ComponentProps<MessageBarBodySlots>;\n\n/**\n * State used in rendering MessageBarBody\n */\nexport type MessageBarBodyState = ComponentState<MessageBarBodySlots>;\n"],"names":[],"rangeMappings":";;","mappings":"AAiBA;;CAEC,GACD,WAAsE"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
2
2
|
import { assertSlots } from '@fluentui/react-utilities';
|
|
3
|
+
import { LinkContextProvider } from '@fluentui/react-link';
|
|
3
4
|
/**
|
|
4
5
|
* Render the final JSX of MessageBarBody
|
|
5
|
-
*/ export const renderMessageBarBody_unstable = (state)=>{
|
|
6
|
+
*/ export const renderMessageBarBody_unstable = (state, contextValues)=>{
|
|
6
7
|
assertSlots(state);
|
|
7
|
-
return /*#__PURE__*/ _jsx(
|
|
8
|
+
return /*#__PURE__*/ _jsx(LinkContextProvider, {
|
|
9
|
+
value: contextValues.link,
|
|
10
|
+
children: /*#__PURE__*/ _jsx(state.root, {})
|
|
11
|
+
});
|
|
8
12
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderMessageBarBody.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { MessageBarBodyState, MessageBarBodySlots } from './MessageBarBody.types';\n\n/**\n * Render the final JSX of MessageBarBody\n */\nexport const renderMessageBarBody_unstable = (state: MessageBarBodyState) => {\n assertSlots<MessageBarBodySlots>(state);\n\n return <state.root
|
|
1
|
+
{"version":3,"sources":["renderMessageBarBody.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { MessageBarBodyState, MessageBarBodySlots, MessageBarBodyContextValues } from './MessageBarBody.types';\nimport { LinkContextProvider } from '@fluentui/react-link';\n\n/**\n * Render the final JSX of MessageBarBody\n */\nexport const renderMessageBarBody_unstable = (\n state: MessageBarBodyState,\n contextValues: MessageBarBodyContextValues,\n) => {\n assertSlots<MessageBarBodySlots>(state);\n\n return (\n <LinkContextProvider value={contextValues.link}>\n <state.root />\n </LinkContextProvider>\n );\n};\n"],"names":["assertSlots","LinkContextProvider","renderMessageBarBody_unstable","state","contextValues","value","link","root"],"rangeMappings":";;;;;;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAExD,SAASC,mBAAmB,QAAQ,uBAAuB;AAE3D;;CAEC,GACD,OAAO,MAAMC,gCAAgC,CAC3CC,OACAC;IAEAJ,YAAiCG;IAEjC,qBACE,KAACF;QAAoBI,OAAOD,cAAcE,IAAI;kBAC5C,cAAA,KAACH,MAAMI,IAAI;;AAGjB,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useMessageBarBodyContextValues.ts"],"sourcesContent":["import * as React from 'react';\nimport type { MessageBarBodyState, MessageBarBodyContextValues } from './MessageBarBody.types';\n\nexport function useMessageBarBodyContextValues_unstable(state: MessageBarBodyState): MessageBarBodyContextValues {\n const link = React.useMemo(\n () => ({\n inline: true,\n }),\n [],\n );\n\n return {\n link,\n };\n}\n"],"names":["React","useMessageBarBodyContextValues_unstable","state","link","useMemo","inline"],"rangeMappings":";;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAG/B,OAAO,SAASC,wCAAwCC,KAA0B;IAChF,MAAMC,OAAOH,MAAMI,OAAO,CACxB,IAAO,CAAA;YACLC,QAAQ;QACV,CAAA,GACA,EAAE;IAGJ,OAAO;QACLF;IACF;AACF"}
|
|
@@ -21,7 +21,7 @@ function useMessageBarReflow(enabled = false) {
|
|
|
21
21
|
const resizeObserverRef = _react.useRef(null);
|
|
22
22
|
const prevInlineSizeRef = _react.useRef(-1);
|
|
23
23
|
const handleResize = _react.useCallback((entries)=>{
|
|
24
|
-
var _entry_borderBoxSize;
|
|
24
|
+
var _entry_borderBoxSize_, _entry_borderBoxSize;
|
|
25
25
|
// Resize observer is only owned by this component - one resize observer entry expected
|
|
26
26
|
// No need to support multiple fragments - one border box entry expected
|
|
27
27
|
if (process.env.NODE_ENV !== 'production' && entries.length > 1) {
|
|
@@ -35,7 +35,7 @@ function useMessageBarReflow(enabled = false) {
|
|
|
35
35
|
const entry = entries[0];
|
|
36
36
|
var _entry_borderBoxSize__inlineSize;
|
|
37
37
|
// `borderBoxSize` is not supported before Chrome 84, Firefox 92, nor Safari 15.4
|
|
38
|
-
const inlineSize = (_entry_borderBoxSize__inlineSize = entry === null || entry === void 0 ? void 0 : (_entry_borderBoxSize = entry.borderBoxSize) === null || _entry_borderBoxSize === void 0 ? void 0 : _entry_borderBoxSize[0].inlineSize) !== null && _entry_borderBoxSize__inlineSize !== void 0 ? _entry_borderBoxSize__inlineSize : entry === null || entry === void 0 ? void 0 : entry.target.getBoundingClientRect().width;
|
|
38
|
+
const inlineSize = (_entry_borderBoxSize__inlineSize = entry === null || entry === void 0 ? void 0 : (_entry_borderBoxSize = entry.borderBoxSize) === null || _entry_borderBoxSize === void 0 ? void 0 : (_entry_borderBoxSize_ = _entry_borderBoxSize[0]) === null || _entry_borderBoxSize_ === void 0 ? void 0 : _entry_borderBoxSize_.inlineSize) !== null && _entry_borderBoxSize__inlineSize !== void 0 ? _entry_borderBoxSize__inlineSize : entry === null || entry === void 0 ? void 0 : entry.target.getBoundingClientRect().width;
|
|
39
39
|
if (inlineSize === undefined || !entry) {
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useMessageBarReflow.ts"],"sourcesContent":["import * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { isHTMLElement } from '@fluentui/react-utilities';\n\nexport function useMessageBarReflow(enabled: boolean = false) {\n const { targetDocument } = useFluent();\n const forceUpdate = React.useReducer(() => ({}), {})[1];\n const reflowingRef = React.useRef(false);\n // TODO: exclude types from this lint rule: https://github.com/microsoft/fluentui/issues/31286\n // eslint-disable-next-line no-restricted-globals\n const resizeObserverRef = React.useRef<ResizeObserver | null>(null);\n const prevInlineSizeRef = React.useRef(-1);\n\n const handleResize: ResizeObserverCallback = React.useCallback(\n entries => {\n // Resize observer is only owned by this component - one resize observer entry expected\n // No need to support multiple fragments - one border box entry expected\n if (process.env.NODE_ENV !== 'production' && entries.length > 1) {\n // eslint-disable-next-line no-console\n console.error(\n [\n 'useMessageBarReflow: Resize observer should only have one entry. ',\n 'If multiple entries are observed, the first entry will be used.',\n 'This is a bug, please report it to the Fluent UI team.',\n ].join(' '),\n );\n }\n\n const entry = entries[0];\n // `borderBoxSize` is not supported before Chrome 84, Firefox 92, nor Safari 15.4\n const inlineSize = entry?.borderBoxSize?.[0]
|
|
1
|
+
{"version":3,"sources":["useMessageBarReflow.ts"],"sourcesContent":["import * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { isHTMLElement } from '@fluentui/react-utilities';\n\nexport function useMessageBarReflow(enabled: boolean = false) {\n const { targetDocument } = useFluent();\n const forceUpdate = React.useReducer(() => ({}), {})[1];\n const reflowingRef = React.useRef(false);\n // TODO: exclude types from this lint rule: https://github.com/microsoft/fluentui/issues/31286\n // eslint-disable-next-line no-restricted-globals\n const resizeObserverRef = React.useRef<ResizeObserver | null>(null);\n const prevInlineSizeRef = React.useRef(-1);\n\n const handleResize: ResizeObserverCallback = React.useCallback(\n entries => {\n // Resize observer is only owned by this component - one resize observer entry expected\n // No need to support multiple fragments - one border box entry expected\n if (process.env.NODE_ENV !== 'production' && entries.length > 1) {\n // eslint-disable-next-line no-console\n console.error(\n [\n 'useMessageBarReflow: Resize observer should only have one entry. ',\n 'If multiple entries are observed, the first entry will be used.',\n 'This is a bug, please report it to the Fluent UI team.',\n ].join(' '),\n );\n }\n\n const entry = entries[0];\n // `borderBoxSize` is not supported before Chrome 84, Firefox 92, nor Safari 15.4\n const inlineSize = entry?.borderBoxSize?.[0]?.inlineSize ?? entry?.target.getBoundingClientRect().width;\n\n if (inlineSize === undefined || !entry) {\n return;\n }\n\n const { target } = entry;\n\n if (!isHTMLElement(target)) {\n return;\n }\n\n let nextReflowing: boolean | undefined;\n\n // No easy way to really determine when the single line layout will fit\n // Just keep try to set single line layout as long as the size is growing\n // Will cause flickering when size is being adjusted gradually (i.e. drag) - but this should not be a common case\n if (reflowingRef.current) {\n if (prevInlineSizeRef.current < inlineSize) {\n nextReflowing = false;\n }\n } else {\n const scrollWidth = target.scrollWidth;\n if (inlineSize < scrollWidth) {\n nextReflowing = true;\n }\n }\n\n prevInlineSizeRef.current = inlineSize;\n if (typeof nextReflowing !== 'undefined' && reflowingRef.current !== nextReflowing) {\n reflowingRef.current = nextReflowing;\n forceUpdate();\n }\n },\n [forceUpdate],\n );\n\n const ref = React.useCallback(\n (el: HTMLElement | null) => {\n if (!enabled || !el || !targetDocument?.defaultView) {\n return;\n }\n\n resizeObserverRef.current?.disconnect();\n\n const win = targetDocument.defaultView;\n const resizeObserver = new win.ResizeObserver(handleResize);\n resizeObserverRef.current = resizeObserver;\n resizeObserver.observe(el, { box: 'border-box' });\n },\n [targetDocument, handleResize, enabled],\n );\n\n React.useEffect(() => {\n return () => {\n resizeObserverRef.current?.disconnect();\n };\n }, []);\n\n return { ref, reflowing: reflowingRef.current };\n}\n"],"names":["useMessageBarReflow","enabled","targetDocument","useFluent","forceUpdate","React","useReducer","reflowingRef","useRef","resizeObserverRef","prevInlineSizeRef","handleResize","useCallback","entries","entry","process","env","NODE_ENV","length","console","error","join","inlineSize","borderBoxSize","target","getBoundingClientRect","width","undefined","isHTMLElement","nextReflowing","current","scrollWidth","ref","el","defaultView","disconnect","win","resizeObserver","ResizeObserver","observe","box","useEffect","reflowing"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;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,KAAAA,IAAAA,KAAAA,IAAAA,2BAA2B0B,UAAU;QACvC;IACF,GAAG,EAAE;IAEL,OAAO;QAAEH;QAAKU,WAAWnC,aAAauB,OAAO;IAAC;AAChD"}
|
|
@@ -14,10 +14,12 @@ const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
|
|
|
14
14
|
const _useMessageBarBody = require("./useMessageBarBody");
|
|
15
15
|
const _renderMessageBarBody = require("./renderMessageBarBody");
|
|
16
16
|
const _useMessageBarBodyStylesstyles = require("./useMessageBarBodyStyles.styles");
|
|
17
|
+
const _useMessageBarBodyContextValues = require("./useMessageBarBodyContextValues");
|
|
17
18
|
const MessageBarBody = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
18
19
|
const state = (0, _useMessageBarBody.useMessageBarBody_unstable)(props, ref);
|
|
20
|
+
const ctx = (0, _useMessageBarBodyContextValues.useMessageBarBodyContextValues_unstable)(state);
|
|
19
21
|
(0, _useMessageBarBodyStylesstyles.useMessageBarBodyStyles_unstable)(state);
|
|
20
22
|
(0, _reactsharedcontexts.useCustomStyleHook_unstable)('useMessageBarBodyStyles_unstable')(state);
|
|
21
|
-
return (0, _renderMessageBarBody.renderMessageBarBody_unstable)(state);
|
|
23
|
+
return (0, _renderMessageBarBody.renderMessageBarBody_unstable)(state, ctx);
|
|
22
24
|
});
|
|
23
25
|
MessageBarBody.displayName = 'MessageBarBody';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["MessageBarBody.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\nimport { useMessageBarBody_unstable } from './useMessageBarBody';\nimport { renderMessageBarBody_unstable } from './renderMessageBarBody';\nimport { useMessageBarBodyStyles_unstable } from './useMessageBarBodyStyles.styles';\nimport type { MessageBarBodyProps } from './MessageBarBody.types';\n\n/**\n * MessageBarBody component\n */\nexport const MessageBarBody: ForwardRefComponent<MessageBarBodyProps> = React.forwardRef((props, ref) => {\n const state = useMessageBarBody_unstable(props, ref);\n\n useMessageBarBodyStyles_unstable(state);\n useCustomStyleHook_unstable('useMessageBarBodyStyles_unstable')(state);\n return renderMessageBarBody_unstable(state);\n});\n\nMessageBarBody.displayName = 'MessageBarBody';\n"],"names":["MessageBarBody","React","forwardRef","props","ref","state","useMessageBarBody_unstable","useMessageBarBodyStyles_unstable","useCustomStyleHook_unstable","renderMessageBarBody_unstable","displayName"],"rangeMappings":"
|
|
1
|
+
{"version":3,"sources":["MessageBarBody.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\nimport { useMessageBarBody_unstable } from './useMessageBarBody';\nimport { renderMessageBarBody_unstable } from './renderMessageBarBody';\nimport { useMessageBarBodyStyles_unstable } from './useMessageBarBodyStyles.styles';\nimport { useMessageBarBodyContextValues_unstable } from './useMessageBarBodyContextValues';\nimport type { MessageBarBodyProps } from './MessageBarBody.types';\n\n/**\n * MessageBarBody component\n */\nexport const MessageBarBody: ForwardRefComponent<MessageBarBodyProps> = React.forwardRef((props, ref) => {\n const state = useMessageBarBody_unstable(props, ref);\n const ctx = useMessageBarBodyContextValues_unstable(state);\n\n useMessageBarBodyStyles_unstable(state);\n useCustomStyleHook_unstable('useMessageBarBodyStyles_unstable')(state);\n return renderMessageBarBody_unstable(state, ctx);\n});\n\nMessageBarBody.displayName = 'MessageBarBody';\n"],"names":["MessageBarBody","React","forwardRef","props","ref","state","useMessageBarBody_unstable","ctx","useMessageBarBodyContextValues_unstable","useMessageBarBodyStyles_unstable","useCustomStyleHook_unstable","renderMessageBarBody_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAYaA;;;eAAAA;;;;iEAZU;qCAEqB;mCACD;sCACG;+CACG;gDACO;AAMjD,MAAMA,iBAAAA,WAAAA,GAA2DC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC/F,MAAMC,QAAQC,IAAAA,6CAAAA,EAA2BH,OAAOC;IAChD,MAAMG,MAAMC,IAAAA,uEAAAA,EAAwCH;IAEpDI,IAAAA,+DAAAA,EAAiCJ;IACjCK,IAAAA,gDAAAA,EAA4B,oCAAoCL;IAChE,OAAOM,IAAAA,mDAAAA,EAA8BN,OAAOE;AAC9C;AAEAP,eAAeY,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["MessageBarBody.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type MessageBarBodySlots = {\n root: Slot<'div'>;\n};\n\n/**\n * MessageBarBody Props\n */\nexport type MessageBarBodyProps = ComponentProps<MessageBarBodySlots>;\n\n/**\n * State used in rendering MessageBarBody\n */\nexport type MessageBarBodyState = ComponentState<MessageBarBodySlots>;\n"],"names":[],"rangeMappings":";;","mappings":"
|
|
1
|
+
{"version":3,"sources":["MessageBarBody.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type MessageBarBodyContextValues = {\n link: {\n inline?: boolean;\n };\n};\n\nexport type MessageBarBodySlots = {\n root: Slot<'div'>;\n};\n\n/**\n * MessageBarBody Props\n */\nexport type MessageBarBodyProps = ComponentProps<MessageBarBodySlots>;\n\n/**\n * State used in rendering MessageBarBody\n */\nexport type MessageBarBodyState = ComponentState<MessageBarBodySlots>;\n"],"names":[],"rangeMappings":";;","mappings":"AAiBA;;CAEC"}
|
|
@@ -10,7 +10,11 @@ Object.defineProperty(exports, "renderMessageBarBody_unstable", {
|
|
|
10
10
|
});
|
|
11
11
|
const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
|
|
12
12
|
const _reactutilities = require("@fluentui/react-utilities");
|
|
13
|
-
const
|
|
13
|
+
const _reactlink = require("@fluentui/react-link");
|
|
14
|
+
const renderMessageBarBody_unstable = (state, contextValues)=>{
|
|
14
15
|
(0, _reactutilities.assertSlots)(state);
|
|
15
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
16
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_reactlink.LinkContextProvider, {
|
|
17
|
+
value: contextValues.link,
|
|
18
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(state.root, {})
|
|
19
|
+
});
|
|
16
20
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderMessageBarBody.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { MessageBarBodyState, MessageBarBodySlots } from './MessageBarBody.types';\n\n/**\n * Render the final JSX of MessageBarBody\n */\nexport const renderMessageBarBody_unstable = (state: MessageBarBodyState) => {\n assertSlots<MessageBarBodySlots>(state);\n\n return <state.root
|
|
1
|
+
{"version":3,"sources":["renderMessageBarBody.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { MessageBarBodyState, MessageBarBodySlots, MessageBarBodyContextValues } from './MessageBarBody.types';\nimport { LinkContextProvider } from '@fluentui/react-link';\n\n/**\n * Render the final JSX of MessageBarBody\n */\nexport const renderMessageBarBody_unstable = (\n state: MessageBarBodyState,\n contextValues: MessageBarBodyContextValues,\n) => {\n assertSlots<MessageBarBodySlots>(state);\n\n return (\n <LinkContextProvider value={contextValues.link}>\n <state.root />\n </LinkContextProvider>\n );\n};\n"],"names":["renderMessageBarBody_unstable","state","contextValues","assertSlots","_jsx","LinkContextProvider","value","link","root"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAUaA;;;eAAAA;;;4BATb;gCAE4B;2BAEQ;AAK7B,MAAMA,gCAAgC,CAC3CC,OACAC;IAEAC,IAAAA,2BAAAA,EAAiCF;IAEjC,OAAA,WAAA,GACEG,IAAAA,eAAA,EAACC,8BAAAA,EAAAA;QAAoBC,OAAOJ,cAAcK,IAAI;kBAC5C,WAAA,GAAAH,IAAAA,eAAA,EAACH,MAAMO,IAAI,EAAA,CAAA;;AAGjB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "useMessageBarBodyContextValues_unstable", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return useMessageBarBodyContextValues_unstable;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
|
+
function useMessageBarBodyContextValues_unstable(state) {
|
|
14
|
+
const link = _react.useMemo(()=>({
|
|
15
|
+
inline: true
|
|
16
|
+
}), []);
|
|
17
|
+
return {
|
|
18
|
+
link
|
|
19
|
+
};
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useMessageBarBodyContextValues.ts"],"sourcesContent":["import * as React from 'react';\nimport type { MessageBarBodyState, MessageBarBodyContextValues } from './MessageBarBody.types';\n\nexport function useMessageBarBodyContextValues_unstable(state: MessageBarBodyState): MessageBarBodyContextValues {\n const link = React.useMemo(\n () => ({\n inline: true,\n }),\n [],\n );\n\n return {\n link,\n };\n}\n"],"names":["useMessageBarBodyContextValues_unstable","state","link","React","useMemo","inline"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAGgBA;;;eAAAA;;;;iEAHO;AAGhB,SAASA,wCAAwCC,KAA0B;IAChF,MAAMC,OAAOC,OAAMC,OAAO,CACxB,IAAO,CAAA;YACLC,QAAQ;QACV,CAAA,GACA,EAAE;IAGJ,OAAO;QACLH;IACF;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-message-bar",
|
|
3
|
-
"version": "9.2.
|
|
3
|
+
"version": "9.2.13",
|
|
4
4
|
"description": "Fluent UI MessageBar component",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -30,10 +30,11 @@
|
|
|
30
30
|
"@fluentui/scripts-tasks": "*"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@fluentui/react-button": "^9.3.
|
|
33
|
+
"@fluentui/react-button": "^9.3.93",
|
|
34
34
|
"@fluentui/react-icons": "^2.0.245",
|
|
35
35
|
"@fluentui/react-jsx-runtime": "^9.0.44",
|
|
36
36
|
"@fluentui/react-shared-contexts": "^9.20.1",
|
|
37
|
+
"@fluentui/react-link": "^9.3.0",
|
|
37
38
|
"@fluentui/react-theme": "^9.1.20",
|
|
38
39
|
"@fluentui/react-utilities": "^9.18.15",
|
|
39
40
|
"@griffel/react": "^1.5.22",
|