@fluentui/react-message-bar 0.0.0-nightly-20240516-0406.1 → 0.0.0-nightly-20240517-0405.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.md +21 -11
- package/dist/index.d.ts +6 -1
- package/lib/components/MessageBarActions/MessageBarActions.types.js.map +1 -1
- package/lib/components/MessageBarActions/useMessageBarActions.js +2 -1
- package/lib/components/MessageBarActions/useMessageBarActions.js.map +1 -1
- package/lib/components/MessageBarActions/useMessageBarActionsStyles.styles.js +5 -2
- package/lib/components/MessageBarActions/useMessageBarActionsStyles.styles.js.map +1 -1
- package/lib-commonjs/components/MessageBarActions/useMessageBarActions.js +2 -1
- package/lib-commonjs/components/MessageBarActions/useMessageBarActions.js.map +1 -1
- package/lib-commonjs/components/MessageBarActions/useMessageBarActionsStyles.styles.js +6 -2
- package/lib-commonjs/components/MessageBarActions/useMessageBarActionsStyles.styles.js.map +1 -1
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,24 +1,34 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-message-bar
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Fri, 17 May 2024 04:20:44 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## [0.0.0-nightly-
|
|
7
|
+
## [0.0.0-nightly-20240517-0405.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-message-bar_v0.0.0-nightly-20240517-0405.1)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-message-bar_v9.1.
|
|
9
|
+
Fri, 17 May 2024 04:20:44 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-message-bar_v9.1.1..@fluentui/react-message-bar_v0.0.0-nightly-20240517-0405.1)
|
|
11
11
|
|
|
12
12
|
### Changes
|
|
13
13
|
|
|
14
14
|
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by fluentui-internal@service.microsoft.com)
|
|
15
|
-
- Bump @fluentui/react-button to v0.0.0-nightly-
|
|
16
|
-
- Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-
|
|
17
|
-
- Bump @fluentui/react-shared-contexts to v0.0.0-nightly-
|
|
18
|
-
- Bump @fluentui/react-theme to v0.0.0-nightly-
|
|
19
|
-
- Bump @fluentui/react-utilities to v0.0.0-nightly-
|
|
20
|
-
- Bump @fluentui/react-conformance to v0.0.0-nightly-
|
|
21
|
-
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-
|
|
15
|
+
- Bump @fluentui/react-button to v0.0.0-nightly-20240517-0405.1 ([commit](https://github.com/microsoft/fluentui/commit/4c363b45d0336c09595c7855916edb8be1147f90) by beachball)
|
|
16
|
+
- Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20240517-0405.1 ([commit](https://github.com/microsoft/fluentui/commit/4c363b45d0336c09595c7855916edb8be1147f90) by beachball)
|
|
17
|
+
- Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20240517-0405.1 ([commit](https://github.com/microsoft/fluentui/commit/4c363b45d0336c09595c7855916edb8be1147f90) by beachball)
|
|
18
|
+
- Bump @fluentui/react-theme to v0.0.0-nightly-20240517-0405.1 ([commit](https://github.com/microsoft/fluentui/commit/4c363b45d0336c09595c7855916edb8be1147f90) by beachball)
|
|
19
|
+
- Bump @fluentui/react-utilities to v0.0.0-nightly-20240517-0405.1 ([commit](https://github.com/microsoft/fluentui/commit/4c363b45d0336c09595c7855916edb8be1147f90) by beachball)
|
|
20
|
+
- Bump @fluentui/react-conformance to v0.0.0-nightly-20240517-0405.1 ([commit](https://github.com/microsoft/fluentui/commit/4c363b45d0336c09595c7855916edb8be1147f90) by beachball)
|
|
21
|
+
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20240517-0405.1 ([commit](https://github.com/microsoft/fluentui/commit/4c363b45d0336c09595c7855916edb8be1147f90) by beachball)
|
|
22
|
+
|
|
23
|
+
## [9.1.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-message-bar_v9.1.1)
|
|
24
|
+
|
|
25
|
+
Thu, 16 May 2024 09:25:15 GMT
|
|
26
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-message-bar_v9.1.0..@fluentui/react-message-bar_v9.1.1)
|
|
27
|
+
|
|
28
|
+
### Patches
|
|
29
|
+
|
|
30
|
+
- chore: Upgrade react-icons version to 2.0.239 to pick up provider export map fix. ([PR #31287](https://github.com/microsoft/fluentui/pull/31287) by ololubek@microsoft.com)
|
|
31
|
+
- Bump @fluentui/react-button to v9.3.80 ([PR #31390](https://github.com/microsoft/fluentui/pull/31390) by beachball)
|
|
22
32
|
|
|
23
33
|
## [9.1.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-message-bar_v9.1.0)
|
|
24
34
|
|
package/dist/index.d.ts
CHANGED
|
@@ -40,7 +40,12 @@ export declare type MessageBarActionsSlots = {
|
|
|
40
40
|
/**
|
|
41
41
|
* State used in rendering MessageBarActions
|
|
42
42
|
*/
|
|
43
|
-
export declare type MessageBarActionsState = ComponentState<MessageBarActionsSlots> & Pick<Required<MessageBarContextValue>, 'layout'
|
|
43
|
+
export declare type MessageBarActionsState = ComponentState<MessageBarActionsSlots> & Pick<Required<MessageBarContextValue>, 'layout'> & {
|
|
44
|
+
/**
|
|
45
|
+
* Whether there are actions as children of this component
|
|
46
|
+
*/
|
|
47
|
+
hasActions: boolean;
|
|
48
|
+
};
|
|
44
49
|
|
|
45
50
|
/**
|
|
46
51
|
* MessageBarBody component
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["MessageBarActions.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { ButtonContextValue } from '@fluentui/react-button';\nimport type { MessageBarContextValue } from '../../contexts/messageBarContext';\n\nexport type MessageBarActionsSlots = {\n root: Slot<'div'>;\n /**\n * Generally the 'Dismiss' button for the MessageBar\n */\n containerAction?: Slot<'div'>;\n};\n\nexport type MessageBarActionsContextValues = {\n button: ButtonContextValue;\n};\n\n/**\n * MessageBarActions Props\n */\nexport type MessageBarActionsProps = ComponentProps<MessageBarActionsSlots>;\n\n/**\n * State used in rendering MessageBarActions\n */\nexport type MessageBarActionsState = ComponentState<MessageBarActionsSlots> &\n Pick<Required<MessageBarContextValue>, 'layout'
|
|
1
|
+
{"version":3,"sources":["MessageBarActions.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { ButtonContextValue } from '@fluentui/react-button';\nimport type { MessageBarContextValue } from '../../contexts/messageBarContext';\n\nexport type MessageBarActionsSlots = {\n root: Slot<'div'>;\n /**\n * Generally the 'Dismiss' button for the MessageBar\n */\n containerAction?: Slot<'div'>;\n};\n\nexport type MessageBarActionsContextValues = {\n button: ButtonContextValue;\n};\n\n/**\n * MessageBarActions Props\n */\nexport type MessageBarActionsProps = ComponentProps<MessageBarActionsSlots>;\n\n/**\n * State used in rendering MessageBarActions\n */\nexport type MessageBarActionsState = ComponentState<MessageBarActionsSlots> &\n Pick<Required<MessageBarContextValue>, 'layout'> & {\n /**\n * Whether there are actions as children of this component\n */\n hasActions: boolean;\n };\n"],"names":[],"mappings":"AAAA,WA8BI"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useMessageBarActions.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot, useMergedRefs } from '@fluentui/react-utilities';\nimport type { MessageBarActionsProps, MessageBarActionsState } from './MessageBarActions.types';\nimport { useMessageBarContext } from '../../contexts/messageBarContext';\n\n/**\n * Create the state required to render MessageBarActions.\n *\n * The returned state can be modified with hooks such as useMessageBarActionsStyles_unstable,\n * before being passed to renderMessageBarActions_unstable.\n *\n * @param props - props from this instance of MessageBarActions\n * @param ref - reference to root HTMLElement of MessageBarActions\n */\nexport const useMessageBarActions_unstable = (\n props: MessageBarActionsProps,\n ref: React.Ref<HTMLDivElement>,\n): MessageBarActionsState => {\n const { layout = 'singleline', actionsRef } = useMessageBarContext();\n return {\n components: {\n root: 'div',\n containerAction: 'div',\n },\n containerAction: slot.optional(props.containerAction, { renderByDefault: false, elementType: 'div' }),\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref: useMergedRefs(ref, actionsRef),\n ...props,\n }),\n { elementType: 'div' },\n ),\n layout,\n };\n};\n"],"names":["React","getIntrinsicElementProps","slot","useMergedRefs","useMessageBarContext","useMessageBarActions_unstable","props","ref","layout","actionsRef","components","root","containerAction","optional","renderByDefault","elementType","always"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,IAAI,EAAEC,aAAa,QAAQ,4BAA4B;AAE1F,SAASC,oBAAoB,QAAQ,mCAAmC;AAExE;;;;;;;;CAQC,GACD,OAAO,MAAMC,gCAAgC,CAC3CC,OACAC;IAEA,MAAM,EAAEC,SAAS,YAAY,EAAEC,UAAU,EAAE,GAAGL;IAC9C,OAAO;QACLM,YAAY;YACVC,MAAM;YACNC,iBAAiB;QACnB;QACAA,iBAAiBV,KAAKW,QAAQ,CAACP,MAAMM,eAAe,EAAE;YAAEE,iBAAiB;YAAOC,aAAa;QAAM;QACnGJ,MAAMT,KAAKc,MAAM,CACff,yBAAyB,OAAO;YAC9BM,KAAKJ,cAAcI,KAAKE;YACxB,GAAGH,KAAK;QACV,IACA;YAAES,aAAa;QAAM;QAEvBP;
|
|
1
|
+
{"version":3,"sources":["useMessageBarActions.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot, useMergedRefs } from '@fluentui/react-utilities';\nimport type { MessageBarActionsProps, MessageBarActionsState } from './MessageBarActions.types';\nimport { useMessageBarContext } from '../../contexts/messageBarContext';\n\n/**\n * Create the state required to render MessageBarActions.\n *\n * The returned state can be modified with hooks such as useMessageBarActionsStyles_unstable,\n * before being passed to renderMessageBarActions_unstable.\n *\n * @param props - props from this instance of MessageBarActions\n * @param ref - reference to root HTMLElement of MessageBarActions\n */\nexport const useMessageBarActions_unstable = (\n props: MessageBarActionsProps,\n ref: React.Ref<HTMLDivElement>,\n): MessageBarActionsState => {\n const { layout = 'singleline', actionsRef } = useMessageBarContext();\n return {\n components: {\n root: 'div',\n containerAction: 'div',\n },\n containerAction: slot.optional(props.containerAction, { renderByDefault: false, elementType: 'div' }),\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref: useMergedRefs(ref, actionsRef),\n ...props,\n }),\n { elementType: 'div' },\n ),\n layout,\n hasActions: !!props.children,\n };\n};\n"],"names":["React","getIntrinsicElementProps","slot","useMergedRefs","useMessageBarContext","useMessageBarActions_unstable","props","ref","layout","actionsRef","components","root","containerAction","optional","renderByDefault","elementType","always","hasActions","children"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,IAAI,EAAEC,aAAa,QAAQ,4BAA4B;AAE1F,SAASC,oBAAoB,QAAQ,mCAAmC;AAExE;;;;;;;;CAQC,GACD,OAAO,MAAMC,gCAAgC,CAC3CC,OACAC;IAEA,MAAM,EAAEC,SAAS,YAAY,EAAEC,UAAU,EAAE,GAAGL;IAC9C,OAAO;QACLM,YAAY;YACVC,MAAM;YACNC,iBAAiB;QACnB;QACAA,iBAAiBV,KAAKW,QAAQ,CAACP,MAAMM,eAAe,EAAE;YAAEE,iBAAiB;YAAOC,aAAa;QAAM;QACnGJ,MAAMT,KAAKc,MAAM,CACff,yBAAyB,OAAO;YAC9BM,KAAKJ,cAAcI,KAAKE;YACxB,GAAGH,KAAK;QACV,IACA;YAAES,aAAa;QAAM;QAEvBP;QACAS,YAAY,CAAC,CAACX,MAAMY,QAAQ;IAC9B;AACF,EAAE"}
|
|
@@ -16,9 +16,12 @@ const useMultilineStyles = /*#__PURE__*/__styles({
|
|
|
16
16
|
jrapky: "fqcjy3b",
|
|
17
17
|
t21cq0: ["fibjyge", "f9yszdx"],
|
|
18
18
|
z189sj: ["f1p3vkop", "f8cewkv"]
|
|
19
|
+
},
|
|
20
|
+
noActions: {
|
|
21
|
+
mc9l5x: "fjseox"
|
|
19
22
|
}
|
|
20
23
|
}, {
|
|
21
|
-
d: [".f1e8xxv9{justify-content:end;}", ".f1gaxbfw{margin-top:var(--spacingVerticalMNudge);}", ".fqcjy3b{margin-bottom:var(--spacingVerticalS);}", ".fibjyge{margin-right:0px;}", ".f9yszdx{margin-left:0px;}", ".f1p3vkop{padding-right:var(--spacingVerticalM);}", ".f8cewkv{padding-left:var(--spacingVerticalM);}"]
|
|
24
|
+
d: [".f1e8xxv9{justify-content:end;}", ".f1gaxbfw{margin-top:var(--spacingVerticalMNudge);}", ".fqcjy3b{margin-bottom:var(--spacingVerticalS);}", ".fibjyge{margin-right:0px;}", ".f9yszdx{margin-left:0px;}", ".f1p3vkop{padding-right:var(--spacingVerticalM);}", ".f8cewkv{padding-left:var(--spacingVerticalM);}", ".fjseox{display:none;}"]
|
|
22
25
|
});
|
|
23
26
|
/**
|
|
24
27
|
* Apply styling to the MessageBarActions slots based on the state
|
|
@@ -27,7 +30,7 @@ export const useMessageBarActionsStyles_unstable = state => {
|
|
|
27
30
|
const rootBaseStyles = useRootBaseStyles();
|
|
28
31
|
const containerActionBaseStyles = useContainerActionBaseStyles();
|
|
29
32
|
const multilineStyles = useMultilineStyles();
|
|
30
|
-
state.root.className = mergeClasses(messageBarActionsClassNames.root, rootBaseStyles, state.layout === 'multiline' && multilineStyles.root, state.root.className);
|
|
33
|
+
state.root.className = mergeClasses(messageBarActionsClassNames.root, rootBaseStyles, state.layout === 'multiline' && multilineStyles.root, !state.hasActions && multilineStyles.noActions, state.root.className);
|
|
31
34
|
if (state.containerAction) {
|
|
32
35
|
state.containerAction.className = mergeClasses(messageBarActionsClassNames.containerAction, containerActionBaseStyles, state.containerAction.className);
|
|
33
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__resetStyles","__styles","mergeClasses","tokens","messageBarActionsClassNames","root","containerAction","useRootBaseStyles","useContainerActionBaseStyles","useMultilineStyles","Brf1p80","B6of3ja","jrapky","t21cq0","z189sj","d","useMessageBarActionsStyles_unstable","state","rootBaseStyles","containerActionBaseStyles","multilineStyles","className","layout"],"sources":["useMessageBarActionsStyles.styles.js"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nexport const messageBarActionsClassNames = {\n root: 'fui-MessageBarActions',\n containerAction: 'fui-MessageBarActions__containerAction'\n};\n/**\n * Styles for the root slot\n */ const useRootBaseStyles = makeResetStyles({\n gridArea: 'secondaryActions',\n display: 'flex',\n columnGap: tokens.spacingHorizontalM,\n paddingRight: tokens.spacingHorizontalM\n});\nconst useContainerActionBaseStyles = makeResetStyles({\n gridArea: 'actions',\n paddingRight: tokens.spacingHorizontalM\n});\nconst useMultilineStyles = makeStyles({\n root: {\n justifyContent: 'end',\n marginTop: tokens.spacingVerticalMNudge,\n marginBottom: tokens.spacingVerticalS,\n marginRight: '0px',\n paddingRight: tokens.spacingVerticalM\n }\n});\n/**\n * Apply styling to the MessageBarActions slots based on the state\n */ export const useMessageBarActionsStyles_unstable = (state)=>{\n const rootBaseStyles = useRootBaseStyles();\n const containerActionBaseStyles = useContainerActionBaseStyles();\n const multilineStyles = useMultilineStyles();\n state.root.className = mergeClasses(messageBarActionsClassNames.root, rootBaseStyles, state.layout === 'multiline' && multilineStyles.root, state.root.className);\n if (state.containerAction) {\n state.containerAction.className = mergeClasses(messageBarActionsClassNames.containerAction, containerActionBaseStyles, state.containerAction.className);\n }\n return state;\n};\n"],"mappings":"AAAA,SAAAA,aAAA,EAAAC,QAAA,EAAsCC,YAAY,QAAQ,gBAAgB;AAC1E,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,OAAO,MAAMC,2BAA2B,GAAG;EACvCC,IAAI,EAAE,uBAAuB;EAC7BC,eAAe,EAAE;AACrB,CAAC;AACD;AACA;AACA;AAAI,MAAMC,iBAAiB,gBAAGP,aAAA,gSAK7B,CAAC;AACF,MAAMQ,4BAA4B,gBAAGR,aAAA,wKAGpC,CAAC;AACF,MAAMS,kBAAkB,gBAAGR,QAAA;EAAAI,IAAA;IAAAK,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,
|
|
1
|
+
{"version":3,"names":["__resetStyles","__styles","mergeClasses","tokens","messageBarActionsClassNames","root","containerAction","useRootBaseStyles","useContainerActionBaseStyles","useMultilineStyles","Brf1p80","B6of3ja","jrapky","t21cq0","z189sj","noActions","mc9l5x","d","useMessageBarActionsStyles_unstable","state","rootBaseStyles","containerActionBaseStyles","multilineStyles","className","layout","hasActions"],"sources":["useMessageBarActionsStyles.styles.js"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nexport const messageBarActionsClassNames = {\n root: 'fui-MessageBarActions',\n containerAction: 'fui-MessageBarActions__containerAction'\n};\n/**\n * Styles for the root slot\n */ const useRootBaseStyles = makeResetStyles({\n gridArea: 'secondaryActions',\n display: 'flex',\n columnGap: tokens.spacingHorizontalM,\n paddingRight: tokens.spacingHorizontalM\n});\nconst useContainerActionBaseStyles = makeResetStyles({\n gridArea: 'actions',\n paddingRight: tokens.spacingHorizontalM\n});\nconst useMultilineStyles = makeStyles({\n root: {\n justifyContent: 'end',\n marginTop: tokens.spacingVerticalMNudge,\n marginBottom: tokens.spacingVerticalS,\n marginRight: '0px',\n paddingRight: tokens.spacingVerticalM\n },\n noActions: {\n display: 'none'\n }\n});\n/**\n * Apply styling to the MessageBarActions slots based on the state\n */ export const useMessageBarActionsStyles_unstable = (state)=>{\n const rootBaseStyles = useRootBaseStyles();\n const containerActionBaseStyles = useContainerActionBaseStyles();\n const multilineStyles = useMultilineStyles();\n state.root.className = mergeClasses(messageBarActionsClassNames.root, rootBaseStyles, state.layout === 'multiline' && multilineStyles.root, !state.hasActions && multilineStyles.noActions, state.root.className);\n if (state.containerAction) {\n state.containerAction.className = mergeClasses(messageBarActionsClassNames.containerAction, containerActionBaseStyles, state.containerAction.className);\n }\n return state;\n};\n"],"mappings":"AAAA,SAAAA,aAAA,EAAAC,QAAA,EAAsCC,YAAY,QAAQ,gBAAgB;AAC1E,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,OAAO,MAAMC,2BAA2B,GAAG;EACvCC,IAAI,EAAE,uBAAuB;EAC7BC,eAAe,EAAE;AACrB,CAAC;AACD;AACA;AACA;AAAI,MAAMC,iBAAiB,gBAAGP,aAAA,gSAK7B,CAAC;AACF,MAAMQ,4BAA4B,gBAAGR,aAAA,wKAGpC,CAAC;AACF,MAAMS,kBAAkB,gBAAGR,QAAA;EAAAI,IAAA;IAAAK,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;EAAA;EAAAC,SAAA;IAAAC,MAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,CAW1B,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMC,mCAAmC,GAAIC,KAAK,IAAG;EAC5D,MAAMC,cAAc,GAAGb,iBAAiB,CAAC,CAAC;EAC1C,MAAMc,yBAAyB,GAAGb,4BAA4B,CAAC,CAAC;EAChE,MAAMc,eAAe,GAAGb,kBAAkB,CAAC,CAAC;EAC5CU,KAAK,CAACd,IAAI,CAACkB,SAAS,GAAGrB,YAAY,CAACE,2BAA2B,CAACC,IAAI,EAAEe,cAAc,EAAED,KAAK,CAACK,MAAM,KAAK,WAAW,IAAIF,eAAe,CAACjB,IAAI,EAAE,CAACc,KAAK,CAACM,UAAU,IAAIH,eAAe,CAACP,SAAS,EAAEI,KAAK,CAACd,IAAI,CAACkB,SAAS,CAAC;EACjN,IAAIJ,KAAK,CAACb,eAAe,EAAE;IACvBa,KAAK,CAACb,eAAe,CAACiB,SAAS,GAAGrB,YAAY,CAACE,2BAA2B,CAACE,eAAe,EAAEe,yBAAyB,EAAEF,KAAK,CAACb,eAAe,CAACiB,SAAS,CAAC;EAC3J;EACA,OAAOJ,KAAK;AAChB,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useMessageBarActions.js"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot, useMergedRefs } from '@fluentui/react-utilities';\nimport { useMessageBarContext } from '../../contexts/messageBarContext';\n/**\n * Create the state required to render MessageBarActions.\n *\n * The returned state can be modified with hooks such as useMessageBarActionsStyles_unstable,\n * before being passed to renderMessageBarActions_unstable.\n *\n * @param props - props from this instance of MessageBarActions\n * @param ref - reference to root HTMLElement of MessageBarActions\n */ export const useMessageBarActions_unstable = (props, ref)=>{\n const { layout = 'singleline', actionsRef } = useMessageBarContext();\n return {\n components: {\n root: 'div',\n containerAction: 'div'\n },\n containerAction: slot.optional(props.containerAction, {\n renderByDefault: false,\n elementType: 'div'\n }),\n root: slot.always(getIntrinsicElementProps('div', {\n ref: useMergedRefs(ref, actionsRef),\n ...props\n }), {\n elementType: 'div'\n }),\n layout\n };\n};\n"],"names":["useMessageBarActions_unstable","props","ref","layout","actionsRef","useMessageBarContext","components","root","containerAction","slot","optional","renderByDefault","elementType","always","getIntrinsicElementProps","useMergedRefs"],"mappings":";;;;+BAWiBA;;;eAAAA;;;;iEAXM;gCACuC;mCACzB;AAS1B,MAAMA,gCAAgC,CAACC,OAAOC;IACrD,MAAM,EAAEC,SAAS,YAAY,EAAEC,UAAU,EAAE,GAAGC,IAAAA,uCAAoB;IAClE,OAAO;QACHC,YAAY;YACRC,MAAM;YACNC,iBAAiB;QACrB;QACAA,iBAAiBC,oBAAI,CAACC,QAAQ,CAACT,MAAMO,eAAe,EAAE;YAClDG,iBAAiB;YACjBC,aAAa;QACjB;QACAL,MAAME,oBAAI,CAACI,MAAM,CAACC,IAAAA,wCAAwB,EAAC,OAAO;YAC9CZ,KAAKa,IAAAA,6BAAa,EAACb,KAAKE;YACxB,GAAGH,KAAK;QACZ,IAAI;YACAW,aAAa;QACjB;QACAT;
|
|
1
|
+
{"version":3,"sources":["useMessageBarActions.js"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot, useMergedRefs } from '@fluentui/react-utilities';\nimport { useMessageBarContext } from '../../contexts/messageBarContext';\n/**\n * Create the state required to render MessageBarActions.\n *\n * The returned state can be modified with hooks such as useMessageBarActionsStyles_unstable,\n * before being passed to renderMessageBarActions_unstable.\n *\n * @param props - props from this instance of MessageBarActions\n * @param ref - reference to root HTMLElement of MessageBarActions\n */ export const useMessageBarActions_unstable = (props, ref)=>{\n const { layout = 'singleline', actionsRef } = useMessageBarContext();\n return {\n components: {\n root: 'div',\n containerAction: 'div'\n },\n containerAction: slot.optional(props.containerAction, {\n renderByDefault: false,\n elementType: 'div'\n }),\n root: slot.always(getIntrinsicElementProps('div', {\n ref: useMergedRefs(ref, actionsRef),\n ...props\n }), {\n elementType: 'div'\n }),\n layout,\n hasActions: !!props.children\n };\n};\n"],"names":["useMessageBarActions_unstable","props","ref","layout","actionsRef","useMessageBarContext","components","root","containerAction","slot","optional","renderByDefault","elementType","always","getIntrinsicElementProps","useMergedRefs","hasActions","children"],"mappings":";;;;+BAWiBA;;;eAAAA;;;;iEAXM;gCACuC;mCACzB;AAS1B,MAAMA,gCAAgC,CAACC,OAAOC;IACrD,MAAM,EAAEC,SAAS,YAAY,EAAEC,UAAU,EAAE,GAAGC,IAAAA,uCAAoB;IAClE,OAAO;QACHC,YAAY;YACRC,MAAM;YACNC,iBAAiB;QACrB;QACAA,iBAAiBC,oBAAI,CAACC,QAAQ,CAACT,MAAMO,eAAe,EAAE;YAClDG,iBAAiB;YACjBC,aAAa;QACjB;QACAL,MAAME,oBAAI,CAACI,MAAM,CAACC,IAAAA,wCAAwB,EAAC,OAAO;YAC9CZ,KAAKa,IAAAA,6BAAa,EAACb,KAAKE;YACxB,GAAGH,KAAK;QACZ,IAAI;YACAW,aAAa;QACjB;QACAT;QACAa,YAAY,CAAC,CAACf,MAAMgB,QAAQ;IAChC;AACJ"}
|
|
@@ -44,6 +44,9 @@ const useMultilineStyles = /*#__PURE__*/ (0, _react.__styles)({
|
|
|
44
44
|
"f1p3vkop",
|
|
45
45
|
"f8cewkv"
|
|
46
46
|
]
|
|
47
|
+
},
|
|
48
|
+
noActions: {
|
|
49
|
+
mc9l5x: "fjseox"
|
|
47
50
|
}
|
|
48
51
|
}, {
|
|
49
52
|
d: [
|
|
@@ -53,14 +56,15 @@ const useMultilineStyles = /*#__PURE__*/ (0, _react.__styles)({
|
|
|
53
56
|
".fibjyge{margin-right:0px;}",
|
|
54
57
|
".f9yszdx{margin-left:0px;}",
|
|
55
58
|
".f1p3vkop{padding-right:var(--spacingVerticalM);}",
|
|
56
|
-
".f8cewkv{padding-left:var(--spacingVerticalM);}"
|
|
59
|
+
".f8cewkv{padding-left:var(--spacingVerticalM);}",
|
|
60
|
+
".fjseox{display:none;}"
|
|
57
61
|
]
|
|
58
62
|
});
|
|
59
63
|
const useMessageBarActionsStyles_unstable = (state)=>{
|
|
60
64
|
const rootBaseStyles = useRootBaseStyles();
|
|
61
65
|
const containerActionBaseStyles = useContainerActionBaseStyles();
|
|
62
66
|
const multilineStyles = useMultilineStyles();
|
|
63
|
-
state.root.className = (0, _react.mergeClasses)(messageBarActionsClassNames.root, rootBaseStyles, state.layout === 'multiline' && multilineStyles.root, state.root.className);
|
|
67
|
+
state.root.className = (0, _react.mergeClasses)(messageBarActionsClassNames.root, rootBaseStyles, state.layout === 'multiline' && multilineStyles.root, !state.hasActions && multilineStyles.noActions, state.root.className);
|
|
64
68
|
if (state.containerAction) {
|
|
65
69
|
state.containerAction.className = (0, _react.mergeClasses)(messageBarActionsClassNames.containerAction, containerActionBaseStyles, state.containerAction.className);
|
|
66
70
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useMessageBarActionsStyles.styles.js"],"sourcesContent":["import { __resetStyles, __styles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nexport const messageBarActionsClassNames = {\n root: 'fui-MessageBarActions',\n containerAction: 'fui-MessageBarActions__containerAction'\n};\n/**\n * Styles for the root slot\n */\nconst useRootBaseStyles = /*#__PURE__*/__resetStyles(\"r1t4x98y\", \"r15utzv5\", [\".r1t4x98y{grid-area:secondaryActions;display:flex;column-gap:var(--spacingHorizontalM);padding-right:var(--spacingHorizontalM);}\", \".r15utzv5{grid-area:secondaryActions;display:flex;column-gap:var(--spacingHorizontalM);padding-left:var(--spacingHorizontalM);}\"]);\nconst useContainerActionBaseStyles = /*#__PURE__*/__resetStyles(\"rgzw8nq\", \"r13ur29z\", [\".rgzw8nq{grid-area:actions;padding-right:var(--spacingHorizontalM);}\", \".r13ur29z{grid-area:actions;padding-left:var(--spacingHorizontalM);}\"]);\nconst useMultilineStyles = /*#__PURE__*/__styles({\n root: {\n Brf1p80: \"f1e8xxv9\",\n B6of3ja: \"f1gaxbfw\",\n jrapky: \"fqcjy3b\",\n t21cq0: [\"fibjyge\", \"f9yszdx\"],\n z189sj: [\"f1p3vkop\", \"f8cewkv\"]\n }\n}, {\n d: [\".f1e8xxv9{justify-content:end;}\", \".f1gaxbfw{margin-top:var(--spacingVerticalMNudge);}\", \".fqcjy3b{margin-bottom:var(--spacingVerticalS);}\", \".fibjyge{margin-right:0px;}\", \".f9yszdx{margin-left:0px;}\", \".f1p3vkop{padding-right:var(--spacingVerticalM);}\", \".f8cewkv{padding-left:var(--spacingVerticalM);}\"]\n});\n/**\n * Apply styling to the MessageBarActions slots based on the state\n */\nexport const useMessageBarActionsStyles_unstable = state => {\n const rootBaseStyles = useRootBaseStyles();\n const containerActionBaseStyles = useContainerActionBaseStyles();\n const multilineStyles = useMultilineStyles();\n state.root.className = mergeClasses(messageBarActionsClassNames.root, rootBaseStyles, state.layout === 'multiline' && multilineStyles.root, state.root.className);\n if (state.containerAction) {\n state.containerAction.className = mergeClasses(messageBarActionsClassNames.containerAction, containerActionBaseStyles, state.containerAction.className);\n }\n return state;\n};\n//# sourceMappingURL=useMessageBarActionsStyles.styles.js.map"],"names":["messageBarActionsClassNames","useMessageBarActionsStyles_unstable","root","containerAction","useRootBaseStyles","__resetStyles","useContainerActionBaseStyles","useMultilineStyles","__styles","Brf1p80","B6of3ja","jrapky","t21cq0","z189sj","d","state","rootBaseStyles","containerActionBaseStyles","multilineStyles","className","mergeClasses","layout"],"mappings":";;;;;;;;;;;IAEaA,2BAA2B;eAA3BA;;
|
|
1
|
+
{"version":3,"sources":["useMessageBarActionsStyles.styles.js"],"sourcesContent":["import { __resetStyles, __styles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nexport const messageBarActionsClassNames = {\n root: 'fui-MessageBarActions',\n containerAction: 'fui-MessageBarActions__containerAction'\n};\n/**\n * Styles for the root slot\n */\nconst useRootBaseStyles = /*#__PURE__*/__resetStyles(\"r1t4x98y\", \"r15utzv5\", [\".r1t4x98y{grid-area:secondaryActions;display:flex;column-gap:var(--spacingHorizontalM);padding-right:var(--spacingHorizontalM);}\", \".r15utzv5{grid-area:secondaryActions;display:flex;column-gap:var(--spacingHorizontalM);padding-left:var(--spacingHorizontalM);}\"]);\nconst useContainerActionBaseStyles = /*#__PURE__*/__resetStyles(\"rgzw8nq\", \"r13ur29z\", [\".rgzw8nq{grid-area:actions;padding-right:var(--spacingHorizontalM);}\", \".r13ur29z{grid-area:actions;padding-left:var(--spacingHorizontalM);}\"]);\nconst useMultilineStyles = /*#__PURE__*/__styles({\n root: {\n Brf1p80: \"f1e8xxv9\",\n B6of3ja: \"f1gaxbfw\",\n jrapky: \"fqcjy3b\",\n t21cq0: [\"fibjyge\", \"f9yszdx\"],\n z189sj: [\"f1p3vkop\", \"f8cewkv\"]\n },\n noActions: {\n mc9l5x: \"fjseox\"\n }\n}, {\n d: [\".f1e8xxv9{justify-content:end;}\", \".f1gaxbfw{margin-top:var(--spacingVerticalMNudge);}\", \".fqcjy3b{margin-bottom:var(--spacingVerticalS);}\", \".fibjyge{margin-right:0px;}\", \".f9yszdx{margin-left:0px;}\", \".f1p3vkop{padding-right:var(--spacingVerticalM);}\", \".f8cewkv{padding-left:var(--spacingVerticalM);}\", \".fjseox{display:none;}\"]\n});\n/**\n * Apply styling to the MessageBarActions slots based on the state\n */\nexport const useMessageBarActionsStyles_unstable = state => {\n const rootBaseStyles = useRootBaseStyles();\n const containerActionBaseStyles = useContainerActionBaseStyles();\n const multilineStyles = useMultilineStyles();\n state.root.className = mergeClasses(messageBarActionsClassNames.root, rootBaseStyles, state.layout === 'multiline' && multilineStyles.root, !state.hasActions && multilineStyles.noActions, state.root.className);\n if (state.containerAction) {\n state.containerAction.className = mergeClasses(messageBarActionsClassNames.containerAction, containerActionBaseStyles, state.containerAction.className);\n }\n return state;\n};\n//# sourceMappingURL=useMessageBarActionsStyles.styles.js.map"],"names":["messageBarActionsClassNames","useMessageBarActionsStyles_unstable","root","containerAction","useRootBaseStyles","__resetStyles","useContainerActionBaseStyles","useMultilineStyles","__styles","Brf1p80","B6of3ja","jrapky","t21cq0","z189sj","noActions","mc9l5x","d","state","rootBaseStyles","containerActionBaseStyles","multilineStyles","className","mergeClasses","layout","hasActions"],"mappings":";;;;;;;;;;;IAEaA,2BAA2B;eAA3BA;;IA0BAC,mCAAmC;eAAnCA;;;uBA5ByC;AAE/C,MAAMD,8BAA8B;IACzCE,MAAM;IACNC,iBAAiB;AACnB;AACA;;CAEC,GACD,MAAMC,oBAAoB,WAAW,GAAEC,IAAAA,oBAAa,EAAC,YAAY,YAAY;IAAC;IAAoI;CAAkI;AACpV,MAAMC,+BAA+B,WAAW,GAAED,IAAAA,oBAAa,EAAC,WAAW,YAAY;IAAC;IAAwE;CAAuE;AACvO,MAAME,qBAAqB,WAAW,GAAEC,IAAAA,eAAQ,EAAC;IAC/CN,MAAM;QACJO,SAAS;QACTC,SAAS;QACTC,QAAQ;QACRC,QAAQ;YAAC;YAAW;SAAU;QAC9BC,QAAQ;YAAC;YAAY;SAAU;IACjC;IACAC,WAAW;QACTC,QAAQ;IACV;AACF,GAAG;IACDC,GAAG;QAAC;QAAmC;QAAuD;QAAoD;QAA+B;QAA8B;QAAqD;QAAmD;KAAyB;AAClV;AAIO,MAAMf,sCAAsCgB,CAAAA;IACjD,MAAMC,iBAAiBd;IACvB,MAAMe,4BAA4Bb;IAClC,MAAMc,kBAAkBb;IACxBU,MAAMf,IAAI,CAACmB,SAAS,GAAGC,IAAAA,mBAAY,EAACtB,4BAA4BE,IAAI,EAAEgB,gBAAgBD,MAAMM,MAAM,KAAK,eAAeH,gBAAgBlB,IAAI,EAAE,CAACe,MAAMO,UAAU,IAAIJ,gBAAgBN,SAAS,EAAEG,MAAMf,IAAI,CAACmB,SAAS;IAChN,IAAIJ,MAAMd,eAAe,EAAE;QACzBc,MAAMd,eAAe,CAACkB,SAAS,GAAGC,IAAAA,mBAAY,EAACtB,4BAA4BG,eAAe,EAAEgB,2BAA2BF,MAAMd,eAAe,CAACkB,SAAS;IACxJ;IACA,OAAOJ;AACT,GACA,6DAA6D"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-message-bar",
|
|
3
|
-
"version": "0.0.0-nightly-
|
|
3
|
+
"version": "0.0.0-nightly-20240517-0405.1",
|
|
4
4
|
"description": "Fluent UI MessageBar component",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -25,18 +25,18 @@
|
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@fluentui/eslint-plugin": "*",
|
|
28
|
-
"@fluentui/react-conformance": "0.0.0-nightly-
|
|
29
|
-
"@fluentui/react-conformance-griffel": "0.0.0-nightly-
|
|
28
|
+
"@fluentui/react-conformance": "0.0.0-nightly-20240517-0405.1",
|
|
29
|
+
"@fluentui/react-conformance-griffel": "0.0.0-nightly-20240517-0405.1",
|
|
30
30
|
"@fluentui/scripts-api-extractor": "*",
|
|
31
31
|
"@fluentui/scripts-tasks": "*"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@fluentui/react-button": "0.0.0-nightly-
|
|
34
|
+
"@fluentui/react-button": "0.0.0-nightly-20240517-0405.1",
|
|
35
35
|
"@fluentui/react-icons": "^2.0.239",
|
|
36
|
-
"@fluentui/react-jsx-runtime": "0.0.0-nightly-
|
|
37
|
-
"@fluentui/react-shared-contexts": "0.0.0-nightly-
|
|
38
|
-
"@fluentui/react-theme": "0.0.0-nightly-
|
|
39
|
-
"@fluentui/react-utilities": "0.0.0-nightly-
|
|
36
|
+
"@fluentui/react-jsx-runtime": "0.0.0-nightly-20240517-0405.1",
|
|
37
|
+
"@fluentui/react-shared-contexts": "0.0.0-nightly-20240517-0405.1",
|
|
38
|
+
"@fluentui/react-theme": "0.0.0-nightly-20240517-0405.1",
|
|
39
|
+
"@fluentui/react-utilities": "0.0.0-nightly-20240517-0405.1",
|
|
40
40
|
"@griffel/react": "^1.5.14",
|
|
41
41
|
"@swc/helpers": "^0.5.1",
|
|
42
42
|
"react-transition-group": "^4.4.1"
|