@fluentui/react-toast 0.0.0-nightly-20230728-0413.1 → 0.0.0-nightly-20230801-0416.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.json CHANGED
@@ -2,9 +2,9 @@
2
2
  "name": "@fluentui/react-toast",
3
3
  "entries": [
4
4
  {
5
- "date": "Fri, 28 Jul 2023 04:20:03 GMT",
6
- "tag": "@fluentui/react-toast_v0.0.0-nightly-20230728-0413.1",
7
- "version": "0.0.0-nightly-20230728-0413.1",
5
+ "date": "Tue, 01 Aug 2023 04:22:48 GMT",
6
+ "tag": "@fluentui/react-toast_v0.0.0-nightly-20230801-0416.1",
7
+ "version": "0.0.0-nightly-20230801-0416.1",
8
8
  "comments": {
9
9
  "prerelease": [
10
10
  {
@@ -16,56 +16,56 @@
16
16
  {
17
17
  "author": "beachball",
18
18
  "package": "@fluentui/react-toast",
19
- "comment": "Bump @fluentui/react-aria to v0.0.0-nightly-20230728-0413.1",
20
- "commit": "abb789904d8103254aa1a6918a91dd515481b571"
19
+ "comment": "Bump @fluentui/react-aria to v0.0.0-nightly-20230801-0416.1",
20
+ "commit": "c709049b745bb4a6e1729b2b47ed2f44aee2f308"
21
21
  },
22
22
  {
23
23
  "author": "beachball",
24
24
  "package": "@fluentui/react-toast",
25
- "comment": "Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20230728-0413.1",
26
- "commit": "abb789904d8103254aa1a6918a91dd515481b571"
25
+ "comment": "Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20230801-0416.1",
26
+ "commit": "c709049b745bb4a6e1729b2b47ed2f44aee2f308"
27
27
  },
28
28
  {
29
29
  "author": "beachball",
30
30
  "package": "@fluentui/react-toast",
31
- "comment": "Bump @fluentui/react-portal to v0.0.0-nightly-20230728-0413.1",
32
- "commit": "abb789904d8103254aa1a6918a91dd515481b571"
31
+ "comment": "Bump @fluentui/react-portal to v0.0.0-nightly-20230801-0416.1",
32
+ "commit": "c709049b745bb4a6e1729b2b47ed2f44aee2f308"
33
33
  },
34
34
  {
35
35
  "author": "beachball",
36
36
  "package": "@fluentui/react-toast",
37
- "comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230728-0413.1",
38
- "commit": "abb789904d8103254aa1a6918a91dd515481b571"
37
+ "comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230801-0416.1",
38
+ "commit": "c709049b745bb4a6e1729b2b47ed2f44aee2f308"
39
39
  },
40
40
  {
41
41
  "author": "beachball",
42
42
  "package": "@fluentui/react-toast",
43
- "comment": "Bump @fluentui/react-tabster to v0.0.0-nightly-20230728-0413.1",
44
- "commit": "abb789904d8103254aa1a6918a91dd515481b571"
43
+ "comment": "Bump @fluentui/react-tabster to v0.0.0-nightly-20230801-0416.1",
44
+ "commit": "c709049b745bb4a6e1729b2b47ed2f44aee2f308"
45
45
  },
46
46
  {
47
47
  "author": "beachball",
48
48
  "package": "@fluentui/react-toast",
49
- "comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20230728-0413.1",
50
- "commit": "abb789904d8103254aa1a6918a91dd515481b571"
49
+ "comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20230801-0416.1",
50
+ "commit": "c709049b745bb4a6e1729b2b47ed2f44aee2f308"
51
51
  },
52
52
  {
53
53
  "author": "beachball",
54
54
  "package": "@fluentui/react-toast",
55
- "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20230728-0413.1",
56
- "commit": "abb789904d8103254aa1a6918a91dd515481b571"
55
+ "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20230801-0416.1",
56
+ "commit": "c709049b745bb4a6e1729b2b47ed2f44aee2f308"
57
57
  },
58
58
  {
59
59
  "author": "beachball",
60
60
  "package": "@fluentui/react-toast",
61
- "comment": "Bump @fluentui/react-conformance to v0.0.0-nightly-20230728-0413.1",
62
- "commit": "abb789904d8103254aa1a6918a91dd515481b571"
61
+ "comment": "Bump @fluentui/react-conformance to v0.0.0-nightly-20230801-0416.1",
62
+ "commit": "c709049b745bb4a6e1729b2b47ed2f44aee2f308"
63
63
  },
64
64
  {
65
65
  "author": "beachball",
66
66
  "package": "@fluentui/react-toast",
67
- "comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230728-0413.1",
68
- "commit": "abb789904d8103254aa1a6918a91dd515481b571"
67
+ "comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230801-0416.1",
68
+ "commit": "c709049b745bb4a6e1729b2b47ed2f44aee2f308"
69
69
  }
70
70
  ]
71
71
  }
package/CHANGELOG.md CHANGED
@@ -1,26 +1,26 @@
1
1
  # Change Log - @fluentui/react-toast
2
2
 
3
- This log was last generated on Fri, 28 Jul 2023 04:20:03 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 01 Aug 2023 04:22:48 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## [0.0.0-nightly-20230728-0413.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-toast_v0.0.0-nightly-20230728-0413.1)
7
+ ## [0.0.0-nightly-20230801-0416.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-toast_v0.0.0-nightly-20230801-0416.1)
8
8
 
9
- Fri, 28 Jul 2023 04:20:03 GMT
10
- [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-toast_v9.0.5..@fluentui/react-toast_v0.0.0-nightly-20230728-0413.1)
9
+ Tue, 01 Aug 2023 04:22:48 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-toast_v9.0.5..@fluentui/react-toast_v0.0.0-nightly-20230801-0416.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-aria to v0.0.0-nightly-20230728-0413.1 ([commit](https://github.com/microsoft/fluentui/commit/abb789904d8103254aa1a6918a91dd515481b571) by beachball)
16
- - Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20230728-0413.1 ([commit](https://github.com/microsoft/fluentui/commit/abb789904d8103254aa1a6918a91dd515481b571) by beachball)
17
- - Bump @fluentui/react-portal to v0.0.0-nightly-20230728-0413.1 ([commit](https://github.com/microsoft/fluentui/commit/abb789904d8103254aa1a6918a91dd515481b571) by beachball)
18
- - Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230728-0413.1 ([commit](https://github.com/microsoft/fluentui/commit/abb789904d8103254aa1a6918a91dd515481b571) by beachball)
19
- - Bump @fluentui/react-tabster to v0.0.0-nightly-20230728-0413.1 ([commit](https://github.com/microsoft/fluentui/commit/abb789904d8103254aa1a6918a91dd515481b571) by beachball)
20
- - Bump @fluentui/react-theme to v0.0.0-nightly-20230728-0413.1 ([commit](https://github.com/microsoft/fluentui/commit/abb789904d8103254aa1a6918a91dd515481b571) by beachball)
21
- - Bump @fluentui/react-utilities to v0.0.0-nightly-20230728-0413.1 ([commit](https://github.com/microsoft/fluentui/commit/abb789904d8103254aa1a6918a91dd515481b571) by beachball)
22
- - Bump @fluentui/react-conformance to v0.0.0-nightly-20230728-0413.1 ([commit](https://github.com/microsoft/fluentui/commit/abb789904d8103254aa1a6918a91dd515481b571) by beachball)
23
- - Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230728-0413.1 ([commit](https://github.com/microsoft/fluentui/commit/abb789904d8103254aa1a6918a91dd515481b571) by beachball)
15
+ - Bump @fluentui/react-aria to v0.0.0-nightly-20230801-0416.1 ([commit](https://github.com/microsoft/fluentui/commit/c709049b745bb4a6e1729b2b47ed2f44aee2f308) by beachball)
16
+ - Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20230801-0416.1 ([commit](https://github.com/microsoft/fluentui/commit/c709049b745bb4a6e1729b2b47ed2f44aee2f308) by beachball)
17
+ - Bump @fluentui/react-portal to v0.0.0-nightly-20230801-0416.1 ([commit](https://github.com/microsoft/fluentui/commit/c709049b745bb4a6e1729b2b47ed2f44aee2f308) by beachball)
18
+ - Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230801-0416.1 ([commit](https://github.com/microsoft/fluentui/commit/c709049b745bb4a6e1729b2b47ed2f44aee2f308) by beachball)
19
+ - Bump @fluentui/react-tabster to v0.0.0-nightly-20230801-0416.1 ([commit](https://github.com/microsoft/fluentui/commit/c709049b745bb4a6e1729b2b47ed2f44aee2f308) by beachball)
20
+ - Bump @fluentui/react-theme to v0.0.0-nightly-20230801-0416.1 ([commit](https://github.com/microsoft/fluentui/commit/c709049b745bb4a6e1729b2b47ed2f44aee2f308) by beachball)
21
+ - Bump @fluentui/react-utilities to v0.0.0-nightly-20230801-0416.1 ([commit](https://github.com/microsoft/fluentui/commit/c709049b745bb4a6e1729b2b47ed2f44aee2f308) by beachball)
22
+ - Bump @fluentui/react-conformance to v0.0.0-nightly-20230801-0416.1 ([commit](https://github.com/microsoft/fluentui/commit/c709049b745bb4a6e1729b2b47ed2f44aee2f308) by beachball)
23
+ - Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230801-0416.1 ([commit](https://github.com/microsoft/fluentui/commit/c709049b745bb4a6e1729b2b47ed2f44aee2f308) by beachball)
24
24
 
25
25
  ## [9.0.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-toast_v9.0.5)
26
26
 
@@ -16,7 +16,7 @@ import { useToastContainerContext } from '../../contexts/toastContainerContext';
16
16
  const child = getTriggerChild(children);
17
17
  const handleClick = useEventCallback((e)=>{
18
18
  var _child_props, _child_props_onClick;
19
- (_child_props_onClick = (_child_props = child === null || child === void 0 ? void 0 : child.props).onClick) === null || _child_props_onClick === void 0 ? void 0 : _child_props_onClick.call(_child_props, e);
19
+ (_child_props_onClick = _child_props = child === null || child === void 0 ? void 0 : child.props.onClick) === null || _child_props_onClick === void 0 ? void 0 : _child_props_onClick.call(_child_props, e);
20
20
  if (!e.isDefaultPrevented()) {
21
21
  close();
22
22
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["useToastTrigger.ts"],"sourcesContent":["import * as React from 'react';\nimport { applyTriggerPropsToChildren, getTriggerChild, useEventCallback } from '@fluentui/react-utilities';\nimport { useARIAButtonProps } from '@fluentui/react-aria';\nimport type { ToastTriggerProps, ToastTriggerState } from './ToastTrigger.types';\nimport { useToastContainerContext } from '../../contexts/toastContainerContext';\n\n/**\n * A non-visual component that wraps its child\n * and configures them to be the trigger that will close a `Toast`.\n * This component should only accept one child.\n *\n * This component sole purpose is to avoid opting out of the internal controlled open state of a `Toast`\n * Besides being a trigger that closes a toast through context this component doesn't do much,\n * making it basically unnecessary in cases where the trigger is outside of a toast.\n */\nexport const useToastTrigger_unstable = (props: ToastTriggerProps): ToastTriggerState => {\n const { children, disableButtonEnhancement = false } = props;\n const { close } = useToastContainerContext();\n\n const child = getTriggerChild(children);\n\n const handleClick = useEventCallback(\n (e: React.MouseEvent<HTMLButtonElement & HTMLAnchorElement & HTMLDivElement>) => {\n child?.props.onClick?.(e);\n if (!e.isDefaultPrevented()) {\n close();\n }\n },\n );\n\n const triggerChildProps = {\n ...child?.props,\n ref: child?.ref,\n onClick: handleClick,\n };\n\n const ariaButtonTriggerChildProps = useARIAButtonProps(\n child?.type === 'button' || child?.type === 'a' ? child.type : 'div',\n {\n ...triggerChildProps,\n type: 'button',\n },\n );\n\n return {\n children: applyTriggerPropsToChildren(\n children,\n disableButtonEnhancement ? triggerChildProps : ariaButtonTriggerChildProps,\n ),\n };\n};\n"],"names":["React","applyTriggerPropsToChildren","getTriggerChild","useEventCallback","useARIAButtonProps","useToastContainerContext","useToastTrigger_unstable","props","children","disableButtonEnhancement","close","child","handleClick","e","onClick","isDefaultPrevented","triggerChildProps","ref","ariaButtonTriggerChildProps","type"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,2BAA2B,EAAEC,eAAe,EAAEC,gBAAgB,QAAQ,4BAA4B;AAC3G,SAASC,kBAAkB,QAAQ,uBAAuB;AAE1D,SAASC,wBAAwB,QAAQ,uCAAuC;AAEhF;;;;;;;;CAQC,GACD,OAAO,MAAMC,2BAA2B,CAACC,QAAgD;IACvF,MAAM,EAAEC,SAAQ,EAAEC,0BAA2B,KAAK,CAAA,EAAE,GAAGF;IACvD,MAAM,EAAEG,MAAK,EAAE,GAAGL;IAElB,MAAMM,QAAQT,gBAAgBM;IAE9B,MAAMI,cAAcT,iBAClB,CAACU,IAAgF;YAC/EF,cAAAA;QAAAA,CAAAA,uBAAAA,CAAAA,eAAAA,kBAAAA,mBAAAA,KAAAA,IAAAA,MAAOJ,KAAK,EAACO,OAAO,cAApBH,kCAAAA,KAAAA,IAAAA,qBAAAA,KAAAA,cAAuBE;QACvB,IAAI,CAACA,EAAEE,kBAAkB,IAAI;YAC3BL;QACF,CAAC;IACH;IAGF,MAAMM,oBAAoB;QACxB,GAAGL,kBAAAA,mBAAAA,KAAAA,IAAAA,MAAOJ,KAAK;QACfU,KAAKN,kBAAAA,mBAAAA,KAAAA,IAAAA,MAAOM,GAAG;QACfH,SAASF;IACX;IAEA,MAAMM,8BAA8Bd,mBAClCO,CAAAA,kBAAAA,mBAAAA,KAAAA,IAAAA,MAAOQ,IAAI,AAAD,MAAM,YAAYR,CAAAA,kBAAAA,mBAAAA,KAAAA,IAAAA,MAAOQ,IAAI,AAAD,MAAM,MAAMR,MAAMQ,IAAI,GAAG,KAAK,EACpE;QACE,GAAGH,iBAAiB;QACpBG,MAAM;IACR;IAGF,OAAO;QACLX,UAAUP,4BACRO,UACAC,2BAA2BO,oBAAoBE,2BAA2B;IAE9E;AACF,EAAE"}
1
+ {"version":3,"sources":["useToastTrigger.ts"],"sourcesContent":["import * as React from 'react';\nimport { applyTriggerPropsToChildren, getTriggerChild, useEventCallback } from '@fluentui/react-utilities';\nimport { useARIAButtonProps } from '@fluentui/react-aria';\nimport type { ToastTriggerProps, ToastTriggerState } from './ToastTrigger.types';\nimport { useToastContainerContext } from '../../contexts/toastContainerContext';\n\n/**\n * A non-visual component that wraps its child\n * and configures them to be the trigger that will close a `Toast`.\n * This component should only accept one child.\n *\n * This component sole purpose is to avoid opting out of the internal controlled open state of a `Toast`\n * Besides being a trigger that closes a toast through context this component doesn't do much,\n * making it basically unnecessary in cases where the trigger is outside of a toast.\n */\nexport const useToastTrigger_unstable = (props: ToastTriggerProps): ToastTriggerState => {\n const { children, disableButtonEnhancement = false } = props;\n const { close } = useToastContainerContext();\n\n const child = getTriggerChild(children);\n\n const handleClick = useEventCallback(\n (e: React.MouseEvent<HTMLButtonElement & HTMLAnchorElement & HTMLDivElement>) => {\n child?.props.onClick?.(e);\n if (!e.isDefaultPrevented()) {\n close();\n }\n },\n );\n\n const triggerChildProps = {\n ...child?.props,\n ref: child?.ref,\n onClick: handleClick,\n };\n\n const ariaButtonTriggerChildProps = useARIAButtonProps(\n child?.type === 'button' || child?.type === 'a' ? child.type : 'div',\n {\n ...triggerChildProps,\n type: 'button',\n },\n );\n\n return {\n children: applyTriggerPropsToChildren(\n children,\n disableButtonEnhancement ? triggerChildProps : ariaButtonTriggerChildProps,\n ),\n };\n};\n"],"names":["React","applyTriggerPropsToChildren","getTriggerChild","useEventCallback","useARIAButtonProps","useToastContainerContext","useToastTrigger_unstable","props","children","disableButtonEnhancement","close","child","handleClick","e","onClick","isDefaultPrevented","triggerChildProps","ref","ariaButtonTriggerChildProps","type"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,2BAA2B,EAAEC,eAAe,EAAEC,gBAAgB,QAAQ,4BAA4B;AAC3G,SAASC,kBAAkB,QAAQ,uBAAuB;AAE1D,SAASC,wBAAwB,QAAQ,uCAAuC;AAEhF;;;;;;;;CAQC,GACD,OAAO,MAAMC,2BAA2B,CAACC,QAAgD;IACvF,MAAM,EAAEC,SAAQ,EAAEC,0BAA2B,KAAK,CAAA,EAAE,GAAGF;IACvD,MAAM,EAAEG,MAAK,EAAE,GAAGL;IAElB,MAAMM,QAAQT,gBAAgBM;IAE9B,MAAMI,cAAcT,iBAClB,CAACU,IAAgF;YAC/EF,cAAAA;QAAAA,CAAAA,uBAAAA,eAAAA,kBAAAA,mBAAAA,KAAAA,IAAAA,MAAOJ,KAAK,CAACO,OAAO,cAApBH,kCAAAA,KAAAA,IAAAA,qBAAAA,KAAAA,cAAuBE;QACvB,IAAI,CAACA,EAAEE,kBAAkB,IAAI;YAC3BL;QACF,CAAC;IACH;IAGF,MAAMM,oBAAoB;QACxB,GAAGL,kBAAAA,mBAAAA,KAAAA,IAAAA,MAAOJ,KAAK;QACfU,KAAKN,kBAAAA,mBAAAA,KAAAA,IAAAA,MAAOM,GAAG;QACfH,SAASF;IACX;IAEA,MAAMM,8BAA8Bd,mBAClCO,CAAAA,kBAAAA,mBAAAA,KAAAA,IAAAA,MAAOQ,IAAI,AAAD,MAAM,YAAYR,CAAAA,kBAAAA,mBAAAA,KAAAA,IAAAA,MAAOQ,IAAI,AAAD,MAAM,MAAMR,MAAMQ,IAAI,GAAG,KAAK,EACpE;QACE,GAAGH,iBAAiB;QACpBG,MAAM;IACR;IAGF,OAAO;QACLX,UAAUP,4BACRO,UACAC,2BAA2BO,oBAAoBE,2BAA2B;IAE9E;AACF,EAAE"}
@@ -1,4 +1,3 @@
1
- var _state_bottomStart, _state_bottomEnd, _state_topStart, _state_topEnd;
2
1
  import { __resetStyles, mergeClasses } from '@griffel/react';
3
2
  import { TOAST_POSITIONS, getPositionStyles } from '../../state/index';
4
3
  export const toasterClassNames = {
@@ -15,24 +14,28 @@ export const useToasterStyles_unstable = state => {
15
14
  const rootBaseClassName = useRootBaseClassName();
16
15
  const className = mergeClasses(toasterClassNames.root, rootBaseClassName, state.root.className);
17
16
  if (state.bottomStart) {
17
+ var _state_bottomStart;
18
18
  state.bottomStart.className = className;
19
19
  var _style;
20
20
  (_style = (_state_bottomStart = state.bottomStart).style) !== null && _style !== void 0 ? _style : _state_bottomStart.style = {};
21
21
  Object.assign(state.bottomStart.style, getPositionStyles(TOAST_POSITIONS.bottomStart, state.dir, state.offset));
22
22
  }
23
23
  if (state.bottomEnd) {
24
+ var _state_bottomEnd;
24
25
  state.bottomEnd.className = className;
25
26
  var _style1;
26
27
  (_style1 = (_state_bottomEnd = state.bottomEnd).style) !== null && _style1 !== void 0 ? _style1 : _state_bottomEnd.style = {};
27
28
  Object.assign(state.bottomEnd.style, getPositionStyles(TOAST_POSITIONS.bottomEnd, state.dir, state.offset));
28
29
  }
29
30
  if (state.topStart) {
31
+ var _state_topStart;
30
32
  state.topStart.className = className;
31
33
  var _style2;
32
34
  (_style2 = (_state_topStart = state.topStart).style) !== null && _style2 !== void 0 ? _style2 : _state_topStart.style = {};
33
35
  Object.assign(state.topStart.style, getPositionStyles(TOAST_POSITIONS.topStart, state.dir, state.offset));
34
36
  }
35
37
  if (state.topEnd) {
38
+ var _state_topEnd;
36
39
  state.topEnd.className = className;
37
40
  var _style3;
38
41
  (_style3 = (_state_topEnd = state.topEnd).style) !== null && _style3 !== void 0 ? _style3 : _state_topEnd.style = {};
@@ -1 +1 @@
1
- {"version":3,"names":["_state_bottomStart","_state_bottomEnd","_state_topStart","_state_topEnd","__resetStyles","mergeClasses","TOAST_POSITIONS","getPositionStyles","toasterClassNames","root","useRootBaseClassName","useToasterStyles_unstable","state","rootBaseClassName","className","bottomStart","_style","style","Object","assign","dir","offset","bottomEnd","_style1","topStart","_style2","topEnd","_style3"],"sources":["useToasterStyles.styles.js"],"sourcesContent":["var _state_bottomStart, _state_bottomEnd, _state_topStart, _state_topEnd;\nimport { makeResetStyles, mergeClasses } from '@griffel/react';\nimport { TOAST_POSITIONS, getPositionStyles } from '../../state/index';\nexport const toasterClassNames = {\n root: 'fui-Toaster'\n};\n/**\n * Styles for the root slot\n */ const useRootBaseClassName = makeResetStyles({\n position: 'fixed',\n width: '292px',\n pointerEvents: 'none'\n});\n/**\n * Apply styling to the Toaster slots based on the state\n */ export const useToasterStyles_unstable = (state)=>{\n const rootBaseClassName = useRootBaseClassName();\n const className = mergeClasses(toasterClassNames.root, rootBaseClassName, state.root.className);\n if (state.bottomStart) {\n state.bottomStart.className = className;\n var _style;\n (_style = (_state_bottomStart = state.bottomStart).style) !== null && _style !== void 0 ? _style : _state_bottomStart.style = {};\n Object.assign(state.bottomStart.style, getPositionStyles(TOAST_POSITIONS.bottomStart, state.dir, state.offset));\n }\n if (state.bottomEnd) {\n state.bottomEnd.className = className;\n var _style1;\n (_style1 = (_state_bottomEnd = state.bottomEnd).style) !== null && _style1 !== void 0 ? _style1 : _state_bottomEnd.style = {};\n Object.assign(state.bottomEnd.style, getPositionStyles(TOAST_POSITIONS.bottomEnd, state.dir, state.offset));\n }\n if (state.topStart) {\n state.topStart.className = className;\n var _style2;\n (_style2 = (_state_topStart = state.topStart).style) !== null && _style2 !== void 0 ? _style2 : _state_topStart.style = {};\n Object.assign(state.topStart.style, getPositionStyles(TOAST_POSITIONS.topStart, state.dir, state.offset));\n }\n if (state.topEnd) {\n state.topEnd.className = className;\n var _style3;\n (_style3 = (_state_topEnd = state.topEnd).style) !== null && _style3 !== void 0 ? _style3 : _state_topEnd.style = {};\n Object.assign(state.topEnd.style, getPositionStyles(TOAST_POSITIONS.topEnd, state.dir, state.offset));\n }\n return state;\n};\n"],"mappings":"AAAA,IAAIA,kBAAkB,EAAEC,gBAAgB,EAAEC,eAAe,EAAEC,aAAa;AACxE,SAAAC,aAAA,EAA0BC,YAAY,QAAQ,gBAAgB;AAC9D,SAASC,eAAe,EAAEC,iBAAiB,QAAQ,mBAAmB;AACtE,OAAO,MAAMC,iBAAiB,GAAG;EAC7BC,IAAI,EAAE;AACV,CAAC;AACD;AACA;AACA;AAAI,MAAMC,oBAAoB,gBAAGN,aAAA,+EAIhC,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMO,yBAAyB,GAAIC,KAAK,IAAG;EAClD,MAAMC,iBAAiB,GAAGH,oBAAoB,CAAC,CAAC;EAChD,MAAMI,SAAS,GAAGT,YAAY,CAACG,iBAAiB,CAACC,IAAI,EAAEI,iBAAiB,EAAED,KAAK,CAACH,IAAI,CAACK,SAAS,CAAC;EAC/F,IAAI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,CAACY,QAAQ,CAACP,KAAK,EAAEV,iBAAiB,CAACD,eAAe,CAACkB,QAAQ,EAAEZ,KAAK,CAACQ,GAAG,EAAER,KAAK,CAACS,MAAM,CAAC,CAAC;EAC7G;EACA,IAAIT,KAAK,CAACc,MAAM,EAAE;IACdd,KAAK,CAACc,MAAM,CAACZ,SAAS,GAAGA,SAAS;IAClC,IAAIa,OAAO;IACX,CAACA,OAAO,GAAG,CAACxB,aAAa,GAAGS,KAAK,CAACc,MAAM,EAAET,KAAK,MAAM,IAAI,IAAIU,OAAO,KAAK,KAAK,CAAC,GAAGA,OAAO,GAAGxB,aAAa,CAACc,KAAK,GAAG,CAAC,CAAC;IACpHC,MAAM,CAACC,MAAM,CAACP,KAAK,CAACc,MAAM,CAACT,KAAK,EAAEV,iBAAiB,CAACD,eAAe,CAACoB,MAAM,EAAEd,KAAK,CAACQ,GAAG,EAAER,KAAK,CAACS,MAAM,CAAC,CAAC;EACzG;EACA,OAAOT,KAAK;AAChB,CAAC"}
1
+ {"version":3,"names":["__resetStyles","mergeClasses","TOAST_POSITIONS","getPositionStyles","toasterClassNames","root","useRootBaseClassName","useToasterStyles_unstable","state","rootBaseClassName","className","bottomStart","_state_bottomStart","_style","style","Object","assign","dir","offset","bottomEnd","_state_bottomEnd","_style1","topStart","_state_topStart","_style2","topEnd","_state_topEnd","_style3"],"sources":["useToasterStyles.styles.js"],"sourcesContent":["import { makeResetStyles, mergeClasses } from '@griffel/react';\nimport { TOAST_POSITIONS, getPositionStyles } from '../../state/index';\nexport const toasterClassNames = {\n root: 'fui-Toaster'\n};\n/**\n * Styles for the root slot\n */ const useRootBaseClassName = makeResetStyles({\n position: 'fixed',\n width: '292px',\n pointerEvents: 'none'\n});\n/**\n * Apply styling to the Toaster slots based on the state\n */ export const useToasterStyles_unstable = (state)=>{\n const rootBaseClassName = useRootBaseClassName();\n const className = mergeClasses(toasterClassNames.root, rootBaseClassName, state.root.className);\n if (state.bottomStart) {\n var _state_bottomStart;\n state.bottomStart.className = className;\n var _style;\n (_style = (_state_bottomStart = state.bottomStart).style) !== null && _style !== void 0 ? _style : _state_bottomStart.style = {};\n Object.assign(state.bottomStart.style, getPositionStyles(TOAST_POSITIONS.bottomStart, state.dir, state.offset));\n }\n if (state.bottomEnd) {\n var _state_bottomEnd;\n state.bottomEnd.className = className;\n var _style1;\n (_style1 = (_state_bottomEnd = state.bottomEnd).style) !== null && _style1 !== void 0 ? _style1 : _state_bottomEnd.style = {};\n Object.assign(state.bottomEnd.style, getPositionStyles(TOAST_POSITIONS.bottomEnd, state.dir, state.offset));\n }\n if (state.topStart) {\n var _state_topStart;\n state.topStart.className = className;\n var _style2;\n (_style2 = (_state_topStart = state.topStart).style) !== null && _style2 !== void 0 ? _style2 : _state_topStart.style = {};\n Object.assign(state.topStart.style, getPositionStyles(TOAST_POSITIONS.topStart, state.dir, state.offset));\n }\n if (state.topEnd) {\n var _state_topEnd;\n state.topEnd.className = className;\n var _style3;\n (_style3 = (_state_topEnd = state.topEnd).style) !== null && _style3 !== void 0 ? _style3 : _state_topEnd.style = {};\n Object.assign(state.topEnd.style, getPositionStyles(TOAST_POSITIONS.topEnd, state.dir, state.offset));\n }\n return state;\n};\n"],"mappings":"AAAA,SAAAA,aAAA,EAA0BC,YAAY,QAAQ,gBAAgB;AAC9D,SAASC,eAAe,EAAEC,iBAAiB,QAAQ,mBAAmB;AACtE,OAAO,MAAMC,iBAAiB,GAAG;EAC7BC,IAAI,EAAE;AACV,CAAC;AACD;AACA;AACA;AAAI,MAAMC,oBAAoB,gBAAGN,aAAA,+EAIhC,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMO,yBAAyB,GAAIC,KAAK,IAAG;EAClD,MAAMC,iBAAiB,GAAGH,oBAAoB,CAAC,CAAC;EAChD,MAAMI,SAAS,GAAGT,YAAY,CAACG,iBAAiB,CAACC,IAAI,EAAEI,iBAAiB,EAAED,KAAK,CAACH,IAAI,CAACK,SAAS,CAAC;EAC/F,IAAIF,KAAK,CA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AAC;IAC1HC,MAAM,CAACC,MAAM,CAACR,KAAK,CAACc,QAAQ,CAACR,KAAK,EAAEX,iBAAiB,CAACD,eAAe,CAACoB,QAAQ,EAAEd,KAAK,CAACS,GAAG,EAAET,KAAK,CAACU,MAAM,CAAC,CAAC;EAC7G;EACA,IAAIV,KAAK,CAACiB,MAAM,EAAE;IACd,IAAIC,aAAa;IACjBlB,KAAK,CAACiB,MAAM,CAACf,SAAS,GAAGA,SAAS;IAClC,IAAIiB,OAAO;IACX,CAACA,OAAO,GAAG,CAACD,aAAa,GAAGlB,KAAK,CAACiB,MAAM,EAAEX,KAAK,MAAM,IAAI,IAAIa,OAAO,KAAK,KAAK,CAAC,GAAGA,OAAO,GAAGD,aAAa,CAACZ,KAAK,GAAG,CAAC,CAAC;IACpHC,MAAM,CAACC,MAAM,CAACR,KAAK,CAACiB,MAAM,CAACX,KAAK,EAAEX,iBAAiB,CAACD,eAAe,CAACuB,MAAM,EAAEjB,KAAK,CAACS,GAAG,EAAET,KAAK,CAACU,MAAM,CAAC,CAAC;EACzG;EACA,OAAOV,KAAK;AAChB,CAAC"}
@@ -17,7 +17,7 @@ const useToastTrigger_unstable = (props)=>{
17
17
  const child = (0, _reactUtilities.getTriggerChild)(children);
18
18
  const handleClick = (0, _reactUtilities.useEventCallback)((e)=>{
19
19
  var _child_props, _child_props_onClick;
20
- (_child_props_onClick = (_child_props = child === null || child === void 0 ? void 0 : child.props).onClick) === null || _child_props_onClick === void 0 ? void 0 : _child_props_onClick.call(_child_props, e);
20
+ (_child_props_onClick = _child_props = child === null || child === void 0 ? void 0 : child.props.onClick) === null || _child_props_onClick === void 0 ? void 0 : _child_props_onClick.call(_child_props, e);
21
21
  if (!e.isDefaultPrevented()) {
22
22
  close();
23
23
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["useToastTrigger.js"],"sourcesContent":["import * as React from 'react';\nimport { applyTriggerPropsToChildren, getTriggerChild, useEventCallback } from '@fluentui/react-utilities';\nimport { useARIAButtonProps } from '@fluentui/react-aria';\nimport { useToastContainerContext } from '../../contexts/toastContainerContext';\n/**\n * A non-visual component that wraps its child\n * and configures them to be the trigger that will close a `Toast`.\n * This component should only accept one child.\n *\n * This component sole purpose is to avoid opting out of the internal controlled open state of a `Toast`\n * Besides being a trigger that closes a toast through context this component doesn't do much,\n * making it basically unnecessary in cases where the trigger is outside of a toast.\n */ export const useToastTrigger_unstable = (props)=>{\n const { children , disableButtonEnhancement =false } = props;\n const { close } = useToastContainerContext();\n const child = getTriggerChild(children);\n const handleClick = useEventCallback((e)=>{\n var _child_props, _child_props_onClick;\n (_child_props_onClick = (_child_props = child === null || child === void 0 ? void 0 : child.props).onClick) === null || _child_props_onClick === void 0 ? void 0 : _child_props_onClick.call(_child_props, e);\n if (!e.isDefaultPrevented()) {\n close();\n }\n });\n const triggerChildProps = {\n ...child === null || child === void 0 ? void 0 : child.props,\n ref: child === null || child === void 0 ? void 0 : child.ref,\n onClick: handleClick\n };\n const ariaButtonTriggerChildProps = useARIAButtonProps((child === null || child === void 0 ? void 0 : child.type) === 'button' || (child === null || child === void 0 ? void 0 : child.type) === 'a' ? child.type : 'div', {\n ...triggerChildProps,\n type: 'button'\n });\n return {\n children: applyTriggerPropsToChildren(children, disableButtonEnhancement ? triggerChildProps : ariaButtonTriggerChildProps)\n };\n};\n"],"names":["useToastTrigger_unstable","props","children","disableButtonEnhancement","close","useToastContainerContext","child","getTriggerChild","handleClick","useEventCallback","e","_child_props","_child_props_onClick","onClick","call","isDefaultPrevented","triggerChildProps","ref","ariaButtonTriggerChildProps","useARIAButtonProps","type","applyTriggerPropsToChildren"],"mappings":";;;;+BAYiBA;;aAAAA;;;6DAZM;gCACwD;2BAC5C;uCACM;AAS9B,MAAMA,2BAA2B,CAACC,QAAQ;IACjD,MAAM,EAAEC,SAAQ,EAAGC,0BAA0B,KAAK,CAAA,EAAG,GAAGF;IACxD,MAAM,EAAEG,MAAK,EAAG,GAAGC,IAAAA,+CAAwB;IAC3C,MAAMC,QAAQC,IAAAA,+BAAe,EAACL;IAC9B,MAAMM,cAAcC,IAAAA,gCAAgB,EAAC,CAACC,IAAI;QACtC,IAAIC,cAAcC;QACjBA,CAAAA,uBAAuB,AAACD,CAAAA,eAAeL,UAAU,IAAI,IAAIA,UAAU,KAAK,IAAI,KAAK,IAAIA,MAAML,KAAK,AAAD,EAAGY,OAAO,AAAD,MAAO,IAAI,IAAID,yBAAyB,KAAK,IAAI,KAAK,IAAIA,qBAAqBE,IAAI,CAACH,cAAcD,EAAE;QAC7M,IAAI,CAACA,EAAEK,kBAAkB,IAAI;YACzBX;QACJ,CAAC;IACL;IACA,MAAMY,oBAAoB;QACtB,GAAGV,UAAU,IAAI,IAAIA,UAAU,KAAK,IAAI,KAAK,IAAIA,MAAML,KAAK;QAC5DgB,KAAKX,UAAU,IAAI,IAAIA,UAAU,KAAK,IAAI,KAAK,IAAIA,MAAMW,GAAG;QAC5DJ,SAASL;IACb;IACA,MAAMU,8BAA8BC,IAAAA,6BAAkB,EAAC,AAACb,CAAAA,UAAU,IAAI,IAAIA,UAAU,KAAK,IAAI,KAAK,IAAIA,MAAMc,IAAI,AAAD,MAAO,YAAY,AAACd,CAAAA,UAAU,IAAI,IAAIA,UAAU,KAAK,IAAI,KAAK,IAAIA,MAAMc,IAAI,AAAD,MAAO,MAAMd,MAAMc,IAAI,GAAG,KAAK,EAAE;QACvN,GAAGJ,iBAAiB;QACpBI,MAAM;IACV;IACA,OAAO;QACHlB,UAAUmB,IAAAA,2CAA2B,EAACnB,UAAUC,2BAA2Ba,oBAAoBE,2BAA2B;IAC9H;AACJ"}
1
+ {"version":3,"sources":["useToastTrigger.js"],"sourcesContent":["import * as React from 'react';\nimport { applyTriggerPropsToChildren, getTriggerChild, useEventCallback } from '@fluentui/react-utilities';\nimport { useARIAButtonProps } from '@fluentui/react-aria';\nimport { useToastContainerContext } from '../../contexts/toastContainerContext';\n/**\n * A non-visual component that wraps its child\n * and configures them to be the trigger that will close a `Toast`.\n * This component should only accept one child.\n *\n * This component sole purpose is to avoid opting out of the internal controlled open state of a `Toast`\n * Besides being a trigger that closes a toast through context this component doesn't do much,\n * making it basically unnecessary in cases where the trigger is outside of a toast.\n */ export const useToastTrigger_unstable = (props)=>{\n const { children , disableButtonEnhancement =false } = props;\n const { close } = useToastContainerContext();\n const child = getTriggerChild(children);\n const handleClick = useEventCallback((e)=>{\n var _child_props, _child_props_onClick;\n (_child_props_onClick = _child_props = child === null || child === void 0 ? void 0 : child.props.onClick) === null || _child_props_onClick === void 0 ? void 0 : _child_props_onClick.call(_child_props, e);\n if (!e.isDefaultPrevented()) {\n close();\n }\n });\n const triggerChildProps = {\n ...child === null || child === void 0 ? void 0 : child.props,\n ref: child === null || child === void 0 ? void 0 : child.ref,\n onClick: handleClick\n };\n const ariaButtonTriggerChildProps = useARIAButtonProps((child === null || child === void 0 ? void 0 : child.type) === 'button' || (child === null || child === void 0 ? void 0 : child.type) === 'a' ? child.type : 'div', {\n ...triggerChildProps,\n type: 'button'\n });\n return {\n children: applyTriggerPropsToChildren(children, disableButtonEnhancement ? triggerChildProps : ariaButtonTriggerChildProps)\n };\n};\n"],"names":["useToastTrigger_unstable","props","children","disableButtonEnhancement","close","useToastContainerContext","child","getTriggerChild","handleClick","useEventCallback","e","_child_props","_child_props_onClick","onClick","call","isDefaultPrevented","triggerChildProps","ref","ariaButtonTriggerChildProps","useARIAButtonProps","type","applyTriggerPropsToChildren"],"mappings":";;;;+BAYiBA;;aAAAA;;;6DAZM;gCACwD;2BAC5C;uCACM;AAS9B,MAAMA,2BAA2B,CAACC,QAAQ;IACjD,MAAM,EAAEC,SAAQ,EAAGC,0BAA0B,KAAK,CAAA,EAAG,GAAGF;IACxD,MAAM,EAAEG,MAAK,EAAG,GAAGC,IAAAA,+CAAwB;IAC3C,MAAMC,QAAQC,IAAAA,+BAAe,EAACL;IAC9B,MAAMM,cAAcC,IAAAA,gCAAgB,EAAC,CAACC,IAAI;QACtC,IAAIC,cAAcC;QACjBA,CAAAA,uBAAuBD,eAAeL,UAAU,IAAI,IAAIA,UAAU,KAAK,IAAI,KAAK,IAAIA,MAAML,KAAK,CAACY,OAAO,AAAD,MAAO,IAAI,IAAID,yBAAyB,KAAK,IAAI,KAAK,IAAIA,qBAAqBE,IAAI,CAACH,cAAcD,EAAE;QAC3M,IAAI,CAACA,EAAEK,kBAAkB,IAAI;YACzBX;QACJ,CAAC;IACL;IACA,MAAMY,oBAAoB;QACtB,GAAGV,UAAU,IAAI,IAAIA,UAAU,KAAK,IAAI,KAAK,IAAIA,MAAML,KAAK;QAC5DgB,KAAKX,UAAU,IAAI,IAAIA,UAAU,KAAK,IAAI,KAAK,IAAIA,MAAMW,GAAG;QAC5DJ,SAASL;IACb;IACA,MAAMU,8BAA8BC,IAAAA,6BAAkB,EAAC,AAACb,CAAAA,UAAU,IAAI,IAAIA,UAAU,KAAK,IAAI,KAAK,IAAIA,MAAMc,IAAI,AAAD,MAAO,YAAY,AAACd,CAAAA,UAAU,IAAI,IAAIA,UAAU,KAAK,IAAI,KAAK,IAAIA,MAAMc,IAAI,AAAD,MAAO,MAAMd,MAAMc,IAAI,GAAG,KAAK,EAAE;QACvN,GAAGJ,iBAAiB;QACpBI,MAAM;IACV;IACA,OAAO;QACHlB,UAAUmB,IAAAA,2CAA2B,EAACnB,UAAUC,2BAA2Ba,oBAAoBE,2BAA2B;IAC9H;AACJ"}
@@ -14,7 +14,6 @@ _export(exports, {
14
14
  });
15
15
  const _react = require("@griffel/react");
16
16
  const _index = require("../../state/index");
17
- var _state_bottomStart, _state_bottomEnd, _state_topStart, _state_topEnd;
18
17
  const toasterClassNames = {
19
18
  root: 'fui-Toaster'
20
19
  };
@@ -27,24 +26,28 @@ const useToasterStyles_unstable = (state)=>{
27
26
  const rootBaseClassName = useRootBaseClassName();
28
27
  const className = (0, _react.mergeClasses)(toasterClassNames.root, rootBaseClassName, state.root.className);
29
28
  if (state.bottomStart) {
29
+ var _state_bottomStart;
30
30
  state.bottomStart.className = className;
31
31
  var _style;
32
32
  (_style = (_state_bottomStart = state.bottomStart).style) !== null && _style !== void 0 ? _style : _state_bottomStart.style = {};
33
33
  Object.assign(state.bottomStart.style, (0, _index.getPositionStyles)(_index.TOAST_POSITIONS.bottomStart, state.dir, state.offset));
34
34
  }
35
35
  if (state.bottomEnd) {
36
+ var _state_bottomEnd;
36
37
  state.bottomEnd.className = className;
37
38
  var _style1;
38
39
  (_style1 = (_state_bottomEnd = state.bottomEnd).style) !== null && _style1 !== void 0 ? _style1 : _state_bottomEnd.style = {};
39
40
  Object.assign(state.bottomEnd.style, (0, _index.getPositionStyles)(_index.TOAST_POSITIONS.bottomEnd, state.dir, state.offset));
40
41
  }
41
42
  if (state.topStart) {
43
+ var _state_topStart;
42
44
  state.topStart.className = className;
43
45
  var _style2;
44
46
  (_style2 = (_state_topStart = state.topStart).style) !== null && _style2 !== void 0 ? _style2 : _state_topStart.style = {};
45
47
  Object.assign(state.topStart.style, (0, _index.getPositionStyles)(_index.TOAST_POSITIONS.topStart, state.dir, state.offset));
46
48
  }
47
49
  if (state.topEnd) {
50
+ var _state_topEnd;
48
51
  state.topEnd.className = className;
49
52
  var _style3;
50
53
  (_style3 = (_state_topEnd = state.topEnd).style) !== null && _style3 !== void 0 ? _style3 : _state_topEnd.style = {};
@@ -1 +1 @@
1
- {"version":3,"sources":["useToasterStyles.styles.js"],"sourcesContent":["var _state_bottomStart, _state_bottomEnd, _state_topStart, _state_topEnd;\nimport { __resetStyles, mergeClasses } from '@griffel/react';\nimport { TOAST_POSITIONS, getPositionStyles } from '../../state/index';\nexport const toasterClassNames = {\n root: 'fui-Toaster'\n};\n/**\n * Styles for the root slot\n */\nconst useRootBaseClassName = /*#__PURE__*/__resetStyles(\"r3hfdjz\", null, [\".r3hfdjz{position:fixed;width:292px;pointer-events:none;}\"]);\n/**\n * Apply styling to the Toaster slots based on the state\n */\nexport const useToasterStyles_unstable = state => {\n const rootBaseClassName = useRootBaseClassName();\n const className = mergeClasses(toasterClassNames.root, rootBaseClassName, state.root.className);\n if (state.bottomStart) {\n state.bottomStart.className = className;\n var _style;\n (_style = (_state_bottomStart = state.bottomStart).style) !== null && _style !== void 0 ? _style : _state_bottomStart.style = {};\n Object.assign(state.bottomStart.style, getPositionStyles(TOAST_POSITIONS.bottomStart, state.dir, state.offset));\n }\n if (state.bottomEnd) {\n state.bottomEnd.className = className;\n var _style1;\n (_style1 = (_state_bottomEnd = state.bottomEnd).style) !== null && _style1 !== void 0 ? _style1 : _state_bottomEnd.style = {};\n Object.assign(state.bottomEnd.style, getPositionStyles(TOAST_POSITIONS.bottomEnd, state.dir, state.offset));\n }\n if (state.topStart) {\n state.topStart.className = className;\n var _style2;\n (_style2 = (_state_topStart = state.topStart).style) !== null && _style2 !== void 0 ? _style2 : _state_topStart.style = {};\n Object.assign(state.topStart.style, getPositionStyles(TOAST_POSITIONS.topStart, state.dir, state.offset));\n }\n if (state.topEnd) {\n state.topEnd.className = className;\n var _style3;\n (_style3 = (_state_topEnd = state.topEnd).style) !== null && _style3 !== void 0 ? _style3 : _state_topEnd.style = {};\n Object.assign(state.topEnd.style, getPositionStyles(TOAST_POSITIONS.topEnd, state.dir, state.offset));\n }\n return state;\n};\n//# sourceMappingURL=useToasterStyles.styles.js.map"],"names":["toasterClassNames","useToasterStyles_unstable","_state_bottomStart","_state_bottomEnd","_state_topStart","_state_topEnd","root","useRootBaseClassName","__resetStyles","state","rootBaseClassName","className","mergeClasses","bottomStart","_style","style","Object","assign","getPositionStyles","TOAST_POSITIONS","dir","offset","bottomEnd","_style1","topStart","_style2","topEnd","_style3"],"mappings":";;;;;;;;;;;IAGaA,iBAAiB,MAAjBA;IAUAC,yBAAyB,MAAzBA;;uBAZ+B;uBACO;AAFnD,IAAIC,oBAAoBC,kBAAkBC,iBAAiBC;AAGpD,MAAML,oBAAoB;IAC/BM,MAAM;AACR;AACA;;CAEC,GACD,MAAMC,uBAAuB,WAAW,GAAEC,IAAAA,uBAAa,EAAC,WAAW,IAAI,EAAE;IAAC;CA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C1HC,OAAOC,MAAM,CAACR,MAAMe,QAAQ,CAACT,KAAK,EAAEG,IAAAA,wBAAiB,EAACC,sBAAe,CAACK,QAAQ,EAAEf,MAAMW,GAAG,EAAEX,MAAMY,MAAM;IACzG,CAAC;IACD,IAAIZ,MAAMiB,MAAM,EAAE;QAChBjB,MAAMiB,MAAM,CAACf,SAAS,GAAGA;QACzB,IAAIgB;QACHA,CAAAA,UAAU,AAACtB,CAAAA,gBAAgBI,MAAMiB,MAAM,AAAD,EAAGX,KAAK,AAAD,MAAO,IAAI,IAAIY,YAAY,KAAK,IAAIA,UAAUtB,cAAcU,KAAK,GAAG,CAAC,CAAC;QACpHC,OAAOC,MAAM,CAACR,MAAMiB,MAAM,CAACX,KAAK,EAAEG,IAAAA,wBAAiB,EAACC,sBAAe,CAACO,MAAM,EAAEjB,MAAMW,GAAG,EAAEX,MAAMY,MAAM;IACrG,CAAC;IACD,OAAOZ;AACT,GACA,mDAAmD"}
1
+ {"version":3,"sources":["useToasterStyles.styles.js"],"sourcesContent":["import { __resetStyles, mergeClasses } from '@griffel/react';\nimport { TOAST_POSITIONS, getPositionStyles } from '../../state/index';\nexport const toasterClassNames = {\n root: 'fui-Toaster'\n};\n/**\n * Styles for the root slot\n */\nconst useRootBaseClassName = /*#__PURE__*/__resetStyles(\"r3hfdjz\", null, [\".r3hfdjz{position:fixed;width:292px;pointer-events:none;}\"]);\n/**\n * Apply styling to the Toaster slots based on the state\n */\nexport const useToasterStyles_unstable = state => {\n const rootBaseClassName = useRootBaseClassName();\n const className = mergeClasses(toasterClassNames.root, rootBaseClassName, state.root.className);\n if (state.bottomStart) {\n var _state_bottomStart;\n state.bottomStart.className = className;\n var _style;\n (_style = (_state_bottomStart = state.bottomStart).style) !== null && _style !== void 0 ? _style : _state_bottomStart.style = {};\n Object.assign(state.bottomStart.style, getPositionStyles(TOAST_POSITIONS.bottomStart, state.dir, state.offset));\n }\n if (state.bottomEnd) {\n var _state_bottomEnd;\n state.bottomEnd.className = className;\n var _style1;\n (_style1 = (_state_bottomEnd = state.bottomEnd).style) !== null && _style1 !== void 0 ? _style1 : _state_bottomEnd.style = {};\n Object.assign(state.bottomEnd.style, getPositionStyles(TOAST_POSITIONS.bottomEnd, state.dir, state.offset));\n }\n if (state.topStart) {\n var _state_topStart;\n state.topStart.className = className;\n var _style2;\n (_style2 = (_state_topStart = state.topStart).style) !== null && _style2 !== void 0 ? _style2 : _state_topStart.style = {};\n Object.assign(state.topStart.style, getPositionStyles(TOAST_POSITIONS.topStart, state.dir, state.offset));\n }\n if (state.topEnd) {\n var _state_topEnd;\n state.topEnd.className = className;\n var _style3;\n (_style3 = (_state_topEnd = state.topEnd).style) !== null && _style3 !== void 0 ? _style3 : _state_topEnd.style = {};\n Object.assign(state.topEnd.style, getPositionStyles(TOAST_POSITIONS.topEnd, state.dir, state.offset));\n }\n return state;\n};\n//# sourceMappingURL=useToasterStyles.styles.js.map"],"names":["toasterClassNames","useToasterStyles_unstable","root","useRootBaseClassName","__resetStyles","state","rootBaseClassName","className","mergeClasses","bottomStart","_state_bottomStart","_style","style","Object","assign","getPositionStyles","TOAST_POSITIONS","dir","offset","bottomEnd","_state_bottomEnd","_style1","topStart","_state_topStart","_style2","topEnd","_state_topEnd","_style3"],"mappings":";;;;;;;;;;;IAEaA,iBAAiB,MAAjBA;IAUAC,yBAAyB,MAAzBA;;uBAZ+B;uBACO;AAC5C,MAAMD,oBAAoB;IAC/BE,MAAM;AACR;AACA;;CAEC,GACD,MAAMC,uBAAuB,WAAW,GAAEC,IAAAA,uBAAa,EAAC,WAAW,IAAI,EAAE;IAAC;CAA4D;AAI/H,MAAMH,4BAA4BI,CAAAA,QAAS;IAChD,MAAMC,oBAAoBH;IAC1B,MAAMI,YAAYC,IAAAA,mBAAY,EAACR,kBAAkBE,IAAI,EAAEI,mBAAmBD,MAAMH,IAAI,CAACK,SAAS;IAC9F,IAAIF,MAAMI,WAAW,EAAE;QACrB,IAAIC;QACJL,MAAMI,WAAW,CAACF,SA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B,MAAMoB,MAAM,CAAClB,SAAS,GAAGA;QACzB,IAAIoB;QACHA,CAAAA,UAAU,AAACD,CAAAA,gBAAgBrB,MAAMoB,MAAM,AAAD,EAAGb,KAAK,AAAD,MAAO,IAAI,IAAIe,YAAY,KAAK,IAAIA,UAAUD,cAAcd,KAAK,GAAG,CAAC,CAAC;QACpHC,OAAOC,MAAM,CAACT,MAAMoB,MAAM,CAACb,KAAK,EAAEG,IAAAA,wBAAiB,EAACC,sBAAe,CAACS,MAAM,EAAEpB,MAAMY,GAAG,EAAEZ,MAAMa,MAAM;IACrG,CAAC;IACD,OAAOb;AACT,GACA,mDAAmD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-toast",
3
- "version": "0.0.0-nightly-20230728-0413.1",
3
+ "version": "0.0.0-nightly-20230801-0416.1",
4
4
  "description": "Toast component for Fluent UI",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -29,21 +29,21 @@
29
29
  },
30
30
  "devDependencies": {
31
31
  "@fluentui/eslint-plugin": "*",
32
- "@fluentui/react-conformance": "0.0.0-nightly-20230728-0413.1",
33
- "@fluentui/react-conformance-griffel": "0.0.0-nightly-20230728-0413.1",
32
+ "@fluentui/react-conformance": "0.0.0-nightly-20230801-0416.1",
33
+ "@fluentui/react-conformance-griffel": "0.0.0-nightly-20230801-0416.1",
34
34
  "@fluentui/scripts-api-extractor": "*",
35
35
  "@fluentui/scripts-tasks": "*"
36
36
  },
37
37
  "dependencies": {
38
38
  "react-transition-group": "^4.4.1",
39
- "@fluentui/react-aria": "0.0.0-nightly-20230728-0413.1",
39
+ "@fluentui/react-aria": "0.0.0-nightly-20230801-0416.1",
40
40
  "@fluentui/react-icons": "^2.0.207",
41
- "@fluentui/react-jsx-runtime": "0.0.0-nightly-20230728-0413.1",
42
- "@fluentui/react-portal": "0.0.0-nightly-20230728-0413.1",
43
- "@fluentui/react-shared-contexts": "0.0.0-nightly-20230728-0413.1",
44
- "@fluentui/react-tabster": "0.0.0-nightly-20230728-0413.1",
45
- "@fluentui/react-theme": "0.0.0-nightly-20230728-0413.1",
46
- "@fluentui/react-utilities": "0.0.0-nightly-20230728-0413.1",
41
+ "@fluentui/react-jsx-runtime": "0.0.0-nightly-20230801-0416.1",
42
+ "@fluentui/react-portal": "0.0.0-nightly-20230801-0416.1",
43
+ "@fluentui/react-shared-contexts": "0.0.0-nightly-20230801-0416.1",
44
+ "@fluentui/react-tabster": "0.0.0-nightly-20230801-0416.1",
45
+ "@fluentui/react-theme": "0.0.0-nightly-20230801-0416.1",
46
+ "@fluentui/react-utilities": "0.0.0-nightly-20230801-0416.1",
47
47
  "@griffel/react": "^1.5.7",
48
48
  "@swc/helpers": "^0.4.14"
49
49
  },