@fluentui/react-toast 9.5.5 → 9.6.0

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.
Files changed (34) hide show
  1. package/CHANGELOG.md +14 -2
  2. package/lib/components/AriaLive/useAriaLiveStyles.styles.raw.js +25 -0
  3. package/lib/components/AriaLive/useAriaLiveStyles.styles.raw.js.map +1 -0
  4. package/lib/components/Timer/useTimerStyles.styles.raw.js +11 -0
  5. package/lib/components/Timer/useTimerStyles.styles.raw.js.map +1 -0
  6. package/lib/components/Toast/useToastStyles.styles.raw.js +33 -0
  7. package/lib/components/Toast/useToastStyles.styles.raw.js.map +1 -0
  8. package/lib/components/ToastBody/useToastBodyStyles.styles.raw.js +46 -0
  9. package/lib/components/ToastBody/useToastBodyStyles.styles.raw.js.map +1 -0
  10. package/lib/components/ToastContainer/useToastContainerStyles.styles.raw.js +24 -0
  11. package/lib/components/ToastContainer/useToastContainerStyles.styles.raw.js.map +1 -0
  12. package/lib/components/ToastFooter/useToastFooterStyles.styles.raw.js +22 -0
  13. package/lib/components/ToastFooter/useToastFooterStyles.styles.raw.js.map +1 -0
  14. package/lib/components/ToastTitle/useToastTitleStyles.styles.raw.js +87 -0
  15. package/lib/components/ToastTitle/useToastTitleStyles.styles.raw.js.map +1 -0
  16. package/lib/components/Toaster/useToasterStyles.styles.raw.js +68 -0
  17. package/lib/components/Toaster/useToasterStyles.styles.raw.js.map +1 -0
  18. package/lib-commonjs/components/AriaLive/useAriaLiveStyles.styles.raw.js +41 -0
  19. package/lib-commonjs/components/AriaLive/useAriaLiveStyles.styles.raw.js.map +1 -0
  20. package/lib-commonjs/components/Timer/useTimerStyles.styles.raw.js +21 -0
  21. package/lib-commonjs/components/Timer/useTimerStyles.styles.raw.js.map +1 -0
  22. package/lib-commonjs/components/Toast/useToastStyles.styles.raw.js +49 -0
  23. package/lib-commonjs/components/Toast/useToastStyles.styles.raw.js.map +1 -0
  24. package/lib-commonjs/components/ToastBody/useToastBodyStyles.styles.raw.js +62 -0
  25. package/lib-commonjs/components/ToastBody/useToastBodyStyles.styles.raw.js.map +1 -0
  26. package/lib-commonjs/components/ToastContainer/useToastContainerStyles.styles.raw.js +40 -0
  27. package/lib-commonjs/components/ToastContainer/useToastContainerStyles.styles.raw.js.map +1 -0
  28. package/lib-commonjs/components/ToastFooter/useToastFooterStyles.styles.raw.js +38 -0
  29. package/lib-commonjs/components/ToastFooter/useToastFooterStyles.styles.raw.js.map +1 -0
  30. package/lib-commonjs/components/ToastTitle/useToastTitleStyles.styles.raw.js +103 -0
  31. package/lib-commonjs/components/ToastTitle/useToastTitleStyles.styles.raw.js.map +1 -0
  32. package/lib-commonjs/components/Toaster/useToasterStyles.styles.raw.js +84 -0
  33. package/lib-commonjs/components/Toaster/useToasterStyles.styles.raw.js.map +1 -0
  34. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,12 +1,24 @@
1
1
  # Change Log - @fluentui/react-toast
2
2
 
3
- This log was last generated on Wed, 16 Jul 2025 13:51:52 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 17 Jul 2025 13:45:50 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.6.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-toast_v9.6.0)
8
+
9
+ Thu, 17 Jul 2025 13:45:50 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-toast_v9.5.5..@fluentui/react-toast_v9.6.0)
11
+
12
+ ### Minor changes
13
+
14
+ - feat: enable griffel raw styles ([PR #34853](https://github.com/microsoft/fluentui/pull/34853) by martinhochel@microsoft.com)
15
+ - Bump @fluentui/react-aria to v9.15.4 ([PR #34862](https://github.com/microsoft/fluentui/pull/34862) by beachball)
16
+ - Bump @fluentui/react-portal to v9.7.0 ([PR #34862](https://github.com/microsoft/fluentui/pull/34862) by beachball)
17
+ - Bump @fluentui/react-tabster to v9.26.0 ([PR #34862](https://github.com/microsoft/fluentui/pull/34862) by beachball)
18
+
7
19
  ## [9.5.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-toast_v9.5.5)
8
20
 
9
- Wed, 16 Jul 2025 13:51:52 GMT
21
+ Wed, 16 Jul 2025 13:52:50 GMT
10
22
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-toast_v9.5.4..@fluentui/react-toast_v9.5.5)
11
23
 
12
24
  ### Patches
@@ -0,0 +1,25 @@
1
+ import { mergeClasses, makeResetStyles } from '@griffel/react';
2
+ export const ariaLiveClassNames = {
3
+ assertive: 'fui-AriaLive__assertive',
4
+ polite: 'fui-AriaLive__polite'
5
+ };
6
+ /**
7
+ * Styles for the root slot
8
+ */ const useResetStyles = makeResetStyles({
9
+ clip: 'rect(0px, 0px, 0px, 0px)',
10
+ height: '1px',
11
+ margin: '-1px',
12
+ overflow: 'hidden',
13
+ padding: '0px',
14
+ width: '1px',
15
+ position: 'absolute'
16
+ });
17
+ /**
18
+ * Apply styling to the AriaLive slots based on the state
19
+ */ export const useAriaLiveStyles_unstable = (state)=>{
20
+ 'use no memo';
21
+ const visuallyHidden = useResetStyles();
22
+ state.assertive.className = mergeClasses(visuallyHidden, ariaLiveClassNames.assertive, state.assertive.className);
23
+ state.polite.className = mergeClasses(visuallyHidden, ariaLiveClassNames.polite, state.polite.className);
24
+ return state;
25
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/AriaLive/useAriaLiveStyles.styles.ts"],"sourcesContent":["import { mergeClasses, makeResetStyles } from '@griffel/react';\nimport type { AriaLiveSlots, AriaLiveState } from './AriaLive.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const ariaLiveClassNames: SlotClassNames<AriaLiveSlots> = {\n assertive: 'fui-AriaLive__assertive',\n polite: 'fui-AriaLive__polite',\n};\n\n/**\n * Styles for the root slot\n */\nconst useResetStyles = makeResetStyles({\n clip: 'rect(0px, 0px, 0px, 0px)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: '0px',\n width: '1px',\n position: 'absolute',\n});\n\n/**\n * Apply styling to the AriaLive slots based on the state\n */\nexport const useAriaLiveStyles_unstable = (state: AriaLiveState): AriaLiveState => {\n 'use no memo';\n\n const visuallyHidden = useResetStyles();\n state.assertive.className = mergeClasses(visuallyHidden, ariaLiveClassNames.assertive, state.assertive.className);\n state.polite.className = mergeClasses(visuallyHidden, ariaLiveClassNames.polite, state.polite.className);\n\n return state;\n};\n"],"names":["mergeClasses","makeResetStyles","ariaLiveClassNames","assertive","polite","useResetStyles","clip","height","margin","overflow","padding","width","position","useAriaLiveStyles_unstable","state","visuallyHidden","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,YAAY,EAAEC,eAAe,QAAQ,iBAAiB;AAI/D,OAAO,MAAMC,qBAAoD;IAC/DC,WAAW;IACXC,QAAQ;AACV,EAAE;AAEF;;CAEC,GACD,MAAMC,iBAAiBJ,gBAAgB;IACrCK,MAAM;IACNC,QAAQ;IACRC,QAAQ;IACRC,UAAU;IACVC,SAAS;IACTC,OAAO;IACPC,UAAU;AACZ;AAEA;;CAEC,GACD,OAAO,MAAMC,6BAA6B,CAACC;IACzC;IAEA,MAAMC,iBAAiBV;IACvBS,MAAMX,SAAS,CAACa,SAAS,GAAGhB,aAAae,gBAAgBb,mBAAmBC,SAAS,EAAEW,MAAMX,SAAS,CAACa,SAAS;IAChHF,MAAMV,MAAM,CAACY,SAAS,GAAGhB,aAAae,gBAAgBb,mBAAmBE,MAAM,EAAEU,MAAMV,MAAM,CAACY,SAAS;IAEvG,OAAOF;AACT,EAAE"}
@@ -0,0 +1,11 @@
1
+ import { makeResetStyles } from '@griffel/react';
2
+ export const useBaseAnimationStyles = makeResetStyles({
3
+ animationName: {
4
+ from: {
5
+ opacity: 0
6
+ },
7
+ to: {
8
+ opacity: 0
9
+ }
10
+ }
11
+ });
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/Timer/useTimerStyles.styles.ts"],"sourcesContent":["import { makeResetStyles } from '@griffel/react';\n\nexport const useBaseAnimationStyles = makeResetStyles({\n animationName: {\n from: {\n opacity: 0,\n },\n to: {\n opacity: 0,\n },\n },\n});\n"],"names":["makeResetStyles","useBaseAnimationStyles","animationName","from","opacity","to"],"rangeMappings":";;;;;;;;;;","mappings":"AAAA,SAASA,eAAe,QAAQ,iBAAiB;AAEjD,OAAO,MAAMC,yBAAyBD,gBAAgB;IACpDE,eAAe;QACbC,MAAM;YACJC,SAAS;QACX;QACAC,IAAI;YACFD,SAAS;QACX;IACF;AACF,GAAG"}
@@ -0,0 +1,33 @@
1
+ import { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';
2
+ import { tokens } from '@fluentui/react-theme';
3
+ export const toastClassNames = {
4
+ root: 'fui-Toast'
5
+ };
6
+ const useRootBaseClassName = makeResetStyles({
7
+ display: 'grid',
8
+ gridTemplateColumns: 'auto 1fr auto',
9
+ padding: '12px',
10
+ borderRadius: tokens.borderRadiusMedium,
11
+ border: `1px solid ${tokens.colorTransparentStroke}`,
12
+ boxShadow: tokens.shadow8,
13
+ fontSize: tokens.fontSizeBase300,
14
+ lineHeight: '20px',
15
+ fontWeight: tokens.fontWeightSemibold,
16
+ color: tokens.colorNeutralForeground1,
17
+ backgroundColor: tokens.colorNeutralBackground1
18
+ });
19
+ const useStyles = makeStyles({
20
+ inverted: {
21
+ color: tokens.colorNeutralForegroundInverted2,
22
+ backgroundColor: tokens.colorNeutralBackgroundInverted
23
+ }
24
+ });
25
+ /**
26
+ * Apply styling to the Toast slots based on the state
27
+ */ export const useToastStyles_unstable = (state)=>{
28
+ 'use no memo';
29
+ const rootBaseClassName = useRootBaseClassName();
30
+ const styles = useStyles();
31
+ state.root.className = mergeClasses(toastClassNames.root, rootBaseClassName, state.backgroundAppearance === 'inverted' && styles.inverted, state.root.className);
32
+ return state;
33
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/Toast/useToastStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { ToastSlots, ToastState } from './Toast.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const toastClassNames: SlotClassNames<ToastSlots> = {\n root: 'fui-Toast',\n};\n\nconst useRootBaseClassName = makeResetStyles({\n display: 'grid',\n gridTemplateColumns: 'auto 1fr auto',\n padding: '12px',\n borderRadius: tokens.borderRadiusMedium,\n border: `1px solid ${tokens.colorTransparentStroke}`,\n boxShadow: tokens.shadow8,\n fontSize: tokens.fontSizeBase300,\n lineHeight: '20px',\n fontWeight: tokens.fontWeightSemibold,\n color: tokens.colorNeutralForeground1,\n backgroundColor: tokens.colorNeutralBackground1,\n});\n\nconst useStyles = makeStyles({\n inverted: {\n color: tokens.colorNeutralForegroundInverted2,\n backgroundColor: tokens.colorNeutralBackgroundInverted,\n },\n});\n\n/**\n * Apply styling to the Toast slots based on the state\n */\nexport const useToastStyles_unstable = (state: ToastState): ToastState => {\n 'use no memo';\n\n const rootBaseClassName = useRootBaseClassName();\n const styles = useStyles();\n state.root.className = mergeClasses(\n toastClassNames.root,\n rootBaseClassName,\n state.backgroundAppearance === 'inverted' && styles.inverted,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["makeResetStyles","makeStyles","mergeClasses","tokens","toastClassNames","root","useRootBaseClassName","display","gridTemplateColumns","padding","borderRadius","borderRadiusMedium","border","colorTransparentStroke","boxShadow","shadow8","fontSize","fontSizeBase300","lineHeight","fontWeight","fontWeightSemibold","color","colorNeutralForeground1","backgroundColor","colorNeutralBackground1","useStyles","inverted","colorNeutralForegroundInverted2","colorNeutralBackgroundInverted","useToastStyles_unstable","state","rootBaseClassName","styles","className","backgroundAppearance"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,eAAe,EAAEC,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAC3E,SAASC,MAAM,QAAQ,wBAAwB;AAI/C,OAAO,MAAMC,kBAA8C;IACzDC,MAAM;AACR,EAAE;AAEF,MAAMC,uBAAuBN,gBAAgB;IAC3CO,SAAS;IACTC,qBAAqB;IACrBC,SAAS;IACTC,cAAcP,OAAOQ,kBAAkB;IACvCC,QAAQ,CAAC,UAAU,EAAET,OAAOU,sBAAsB,CAAC,CAAC;IACpDC,WAAWX,OAAOY,OAAO;IACzBC,UAAUb,OAAOc,eAAe;IAChCC,YAAY;IACZC,YAAYhB,OAAOiB,kBAAkB;IACrCC,OAAOlB,OAAOmB,uBAAuB;IACrCC,iBAAiBpB,OAAOqB,uBAAuB;AACjD;AAEA,MAAMC,YAAYxB,WAAW;IAC3ByB,UAAU;QACRL,OAAOlB,OAAOwB,+BAA+B;QAC7CJ,iBAAiBpB,OAAOyB,8BAA8B;IACxD;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,0BAA0B,CAACC;IACtC;IAEA,MAAMC,oBAAoBzB;IAC1B,MAAM0B,SAASP;IACfK,MAAMzB,IAAI,CAAC4B,SAAS,GAAG/B,aACrBE,gBAAgBC,IAAI,EACpB0B,mBACAD,MAAMI,oBAAoB,KAAK,cAAcF,OAAON,QAAQ,EAC5DI,MAAMzB,IAAI,CAAC4B,SAAS;IAGtB,OAAOH;AACT,EAAE"}
@@ -0,0 +1,46 @@
1
+ import { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';
2
+ import { tokens } from '@fluentui/react-theme';
3
+ export const toastBodyClassNames = {
4
+ root: 'fui-ToastBody',
5
+ subtitle: 'fui-ToastBody__subtitle'
6
+ };
7
+ const useRootBaseClassName = makeResetStyles({
8
+ gridColumnStart: 2,
9
+ gridColumnEnd: 3,
10
+ paddingTop: '6px',
11
+ fontSize: tokens.fontSizeBase300,
12
+ lineHeight: tokens.fontSizeBase300,
13
+ fontWeight: tokens.fontWeightRegular,
14
+ color: tokens.colorNeutralForeground1,
15
+ wordBreak: 'break-word'
16
+ });
17
+ const useSubtitleBaseClassName = makeResetStyles({
18
+ paddingTop: '4px',
19
+ gridColumnStart: 2,
20
+ gridColumnEnd: 3,
21
+ fontSize: tokens.fontSizeBase200,
22
+ lineHeight: tokens.fontSizeBase200,
23
+ fontWeight: tokens.fontWeightRegular,
24
+ color: tokens.colorNeutralForeground2
25
+ });
26
+ const useInvertedStyles = makeStyles({
27
+ root: {
28
+ color: tokens.colorNeutralForegroundInverted2
29
+ },
30
+ subtitle: {
31
+ color: tokens.colorNeutralForegroundInverted2
32
+ }
33
+ });
34
+ /**
35
+ * Apply styling to the ToastBody slots based on the state
36
+ */ export const useToastBodyStyles_unstable = (state)=>{
37
+ 'use no memo';
38
+ const rootBaseClassName = useRootBaseClassName();
39
+ const subtitleBaseClassName = useSubtitleBaseClassName();
40
+ const invertedStyles = useInvertedStyles();
41
+ state.root.className = mergeClasses(toastBodyClassNames.root, rootBaseClassName, state.backgroundAppearance === 'inverted' && invertedStyles.root, state.root.className);
42
+ if (state.subtitle) {
43
+ state.subtitle.className = mergeClasses(toastBodyClassNames.subtitle, subtitleBaseClassName, state.backgroundAppearance === 'inverted' && invertedStyles.subtitle, state.subtitle.className);
44
+ }
45
+ return state;
46
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/ToastBody/useToastBodyStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { ToastBodySlots, ToastBodyState } from './ToastBody.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const toastBodyClassNames: SlotClassNames<ToastBodySlots> = {\n root: 'fui-ToastBody',\n subtitle: 'fui-ToastBody__subtitle',\n};\n\nconst useRootBaseClassName = makeResetStyles({\n gridColumnStart: 2,\n gridColumnEnd: 3,\n paddingTop: '6px',\n fontSize: tokens.fontSizeBase300,\n lineHeight: tokens.fontSizeBase300,\n fontWeight: tokens.fontWeightRegular,\n color: tokens.colorNeutralForeground1,\n wordBreak: 'break-word',\n});\n\nconst useSubtitleBaseClassName = makeResetStyles({\n paddingTop: '4px',\n gridColumnStart: 2,\n gridColumnEnd: 3,\n fontSize: tokens.fontSizeBase200,\n lineHeight: tokens.fontSizeBase200,\n fontWeight: tokens.fontWeightRegular,\n color: tokens.colorNeutralForeground2,\n});\n\nconst useInvertedStyles = makeStyles({\n root: {\n color: tokens.colorNeutralForegroundInverted2,\n },\n subtitle: {\n color: tokens.colorNeutralForegroundInverted2,\n },\n});\n\n/**\n * Apply styling to the ToastBody slots based on the state\n */\nexport const useToastBodyStyles_unstable = (state: ToastBodyState): ToastBodyState => {\n 'use no memo';\n\n const rootBaseClassName = useRootBaseClassName();\n const subtitleBaseClassName = useSubtitleBaseClassName();\n const invertedStyles = useInvertedStyles();\n state.root.className = mergeClasses(\n toastBodyClassNames.root,\n rootBaseClassName,\n state.backgroundAppearance === 'inverted' && invertedStyles.root,\n state.root.className,\n );\n\n if (state.subtitle) {\n state.subtitle.className = mergeClasses(\n toastBodyClassNames.subtitle,\n subtitleBaseClassName,\n state.backgroundAppearance === 'inverted' && invertedStyles.subtitle,\n state.subtitle.className,\n );\n }\n\n return state;\n};\n"],"names":["makeResetStyles","makeStyles","mergeClasses","tokens","toastBodyClassNames","root","subtitle","useRootBaseClassName","gridColumnStart","gridColumnEnd","paddingTop","fontSize","fontSizeBase300","lineHeight","fontWeight","fontWeightRegular","color","colorNeutralForeground1","wordBreak","useSubtitleBaseClassName","fontSizeBase200","colorNeutralForeground2","useInvertedStyles","colorNeutralForegroundInverted2","useToastBodyStyles_unstable","state","rootBaseClassName","subtitleBaseClassName","invertedStyles","className","backgroundAppearance"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,eAAe,EAAEC,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAC3E,SAASC,MAAM,QAAQ,wBAAwB;AAI/C,OAAO,MAAMC,sBAAsD;IACjEC,MAAM;IACNC,UAAU;AACZ,EAAE;AAEF,MAAMC,uBAAuBP,gBAAgB;IAC3CQ,iBAAiB;IACjBC,eAAe;IACfC,YAAY;IACZC,UAAUR,OAAOS,eAAe;IAChCC,YAAYV,OAAOS,eAAe;IAClCE,YAAYX,OAAOY,iBAAiB;IACpCC,OAAOb,OAAOc,uBAAuB;IACrCC,WAAW;AACb;AAEA,MAAMC,2BAA2BnB,gBAAgB;IAC/CU,YAAY;IACZF,iBAAiB;IACjBC,eAAe;IACfE,UAAUR,OAAOiB,eAAe;IAChCP,YAAYV,OAAOiB,eAAe;IAClCN,YAAYX,OAAOY,iBAAiB;IACpCC,OAAOb,OAAOkB,uBAAuB;AACvC;AAEA,MAAMC,oBAAoBrB,WAAW;IACnCI,MAAM;QACJW,OAAOb,OAAOoB,+BAA+B;IAC/C;IACAjB,UAAU;QACRU,OAAOb,OAAOoB,+BAA+B;IAC/C;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,8BAA8B,CAACC;IAC1C;IAEA,MAAMC,oBAAoBnB;IAC1B,MAAMoB,wBAAwBR;IAC9B,MAAMS,iBAAiBN;IACvBG,MAAMpB,IAAI,CAACwB,SAAS,GAAG3B,aACrBE,oBAAoBC,IAAI,EACxBqB,mBACAD,MAAMK,oBAAoB,KAAK,cAAcF,eAAevB,IAAI,EAChEoB,MAAMpB,IAAI,CAACwB,SAAS;IAGtB,IAAIJ,MAAMnB,QAAQ,EAAE;QAClBmB,MAAMnB,QAAQ,CAACuB,SAAS,GAAG3B,aACzBE,oBAAoBE,QAAQ,EAC5BqB,uBACAF,MAAMK,oBAAoB,KAAK,cAAcF,eAAetB,QAAQ,EACpEmB,MAAMnB,QAAQ,CAACuB,SAAS;IAE5B;IAEA,OAAOJ;AACT,EAAE"}
@@ -0,0 +1,24 @@
1
+ import { makeResetStyles, mergeClasses } from '@griffel/react';
2
+ import { tokens } from '@fluentui/react-theme';
3
+ import { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';
4
+ export const toastContainerClassNames = {
5
+ root: 'fui-ToastContainer',
6
+ timer: 'fui-ToastContainer__timer'
7
+ };
8
+ const useRootBaseClassName = makeResetStyles({
9
+ boxSizing: 'border-box',
10
+ marginTop: '16px',
11
+ pointerEvents: 'all',
12
+ borderRadius: tokens.borderRadiusMedium,
13
+ ...createCustomFocusIndicatorStyle({
14
+ outline: `${tokens.strokeWidthThick} solid ${tokens.colorStrokeFocus2}`
15
+ })
16
+ });
17
+ /**
18
+ * Apply styling to the ToastContainer slots based on the state
19
+ */ export const useToastContainerStyles_unstable = (state)=>{
20
+ 'use no memo';
21
+ const rootBaseClassName = useRootBaseClassName();
22
+ state.root.className = mergeClasses(toastContainerClassNames.root, rootBaseClassName, state.root.className);
23
+ return state;
24
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/ToastContainer/useToastContainerStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport type { ToastContainerSlots, ToastContainerState } from './ToastContainer.types';\n\nexport const toastContainerClassNames: SlotClassNames<ToastContainerSlots> = {\n root: 'fui-ToastContainer',\n timer: 'fui-ToastContainer__timer',\n};\n\nconst useRootBaseClassName = makeResetStyles({\n boxSizing: 'border-box',\n marginTop: '16px',\n pointerEvents: 'all',\n borderRadius: tokens.borderRadiusMedium,\n ...createCustomFocusIndicatorStyle({\n outline: `${tokens.strokeWidthThick} solid ${tokens.colorStrokeFocus2}`,\n }),\n});\n\n/**\n * Apply styling to the ToastContainer slots based on the state\n */\nexport const useToastContainerStyles_unstable = (state: ToastContainerState): ToastContainerState => {\n 'use no memo';\n\n const rootBaseClassName = useRootBaseClassName();\n state.root.className = mergeClasses(toastContainerClassNames.root, rootBaseClassName, state.root.className);\n\n return state;\n};\n"],"names":["makeResetStyles","mergeClasses","tokens","createCustomFocusIndicatorStyle","toastContainerClassNames","root","timer","useRootBaseClassName","boxSizing","marginTop","pointerEvents","borderRadius","borderRadiusMedium","outline","strokeWidthThick","colorStrokeFocus2","useToastContainerStyles_unstable","state","rootBaseClassName","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,eAAe,EAAEC,YAAY,QAAQ,iBAAiB;AAC/D,SAASC,MAAM,QAAQ,wBAAwB;AAE/C,SAASC,+BAA+B,QAAQ,0BAA0B;AAG1E,OAAO,MAAMC,2BAAgE;IAC3EC,MAAM;IACNC,OAAO;AACT,EAAE;AAEF,MAAMC,uBAAuBP,gBAAgB;IAC3CQ,WAAW;IACXC,WAAW;IACXC,eAAe;IACfC,cAAcT,OAAOU,kBAAkB;IACvC,GAAGT,gCAAgC;QACjCU,SAAS,CAAC,EAAEX,OAAOY,gBAAgB,CAAC,OAAO,EAAEZ,OAAOa,iBAAiB,CAAC,CAAC;IACzE,EAAE;AACJ;AAEA;;CAEC,GACD,OAAO,MAAMC,mCAAmC,CAACC;IAC/C;IAEA,MAAMC,oBAAoBX;IAC1BU,MAAMZ,IAAI,CAACc,SAAS,GAAGlB,aAAaG,yBAAyBC,IAAI,EAAEa,mBAAmBD,MAAMZ,IAAI,CAACc,SAAS;IAE1G,OAAOF;AACT,EAAE"}
@@ -0,0 +1,22 @@
1
+ import { makeResetStyles, mergeClasses } from '@griffel/react';
2
+ export const toastFooterClassNames = {
3
+ root: 'fui-ToastFooter'
4
+ };
5
+ /**
6
+ * Styles for the root slot
7
+ */ const useRootBaseClassName = makeResetStyles({
8
+ paddingTop: '16px',
9
+ gridColumnStart: 2,
10
+ gridColumnEnd: 3,
11
+ display: 'flex',
12
+ alignItems: 'center',
13
+ gap: '14px'
14
+ });
15
+ /**
16
+ * Apply styling to the ToastFooter slots based on the state
17
+ */ export const useToastFooterStyles_unstable = (state)=>{
18
+ 'use no memo';
19
+ const rootBaseClassName = useRootBaseClassName();
20
+ state.root.className = mergeClasses(toastFooterClassNames.root, rootBaseClassName, state.root.className);
21
+ return state;
22
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/ToastFooter/useToastFooterStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses } from '@griffel/react';\nimport type { ToastFooterSlots, ToastFooterState } from './ToastFooter.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const toastFooterClassNames: SlotClassNames<ToastFooterSlots> = {\n root: 'fui-ToastFooter',\n};\n\n/**\n * Styles for the root slot\n */\nconst useRootBaseClassName = makeResetStyles({\n paddingTop: '16px',\n gridColumnStart: 2,\n gridColumnEnd: 3,\n display: 'flex',\n alignItems: 'center',\n gap: '14px',\n});\n\n/**\n * Apply styling to the ToastFooter slots based on the state\n */\nexport const useToastFooterStyles_unstable = (state: ToastFooterState): ToastFooterState => {\n 'use no memo';\n\n const rootBaseClassName = useRootBaseClassName();\n state.root.className = mergeClasses(toastFooterClassNames.root, rootBaseClassName, state.root.className);\n\n return state;\n};\n"],"names":["makeResetStyles","mergeClasses","toastFooterClassNames","root","useRootBaseClassName","paddingTop","gridColumnStart","gridColumnEnd","display","alignItems","gap","useToastFooterStyles_unstable","state","rootBaseClassName","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,eAAe,EAAEC,YAAY,QAAQ,iBAAiB;AAI/D,OAAO,MAAMC,wBAA0D;IACrEC,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,uBAAuBJ,gBAAgB;IAC3CK,YAAY;IACZC,iBAAiB;IACjBC,eAAe;IACfC,SAAS;IACTC,YAAY;IACZC,KAAK;AACP;AAEA;;CAEC,GACD,OAAO,MAAMC,gCAAgC,CAACC;IAC5C;IAEA,MAAMC,oBAAoBT;IAC1BQ,MAAMT,IAAI,CAACW,SAAS,GAAGb,aAAaC,sBAAsBC,IAAI,EAAEU,mBAAmBD,MAAMT,IAAI,CAACW,SAAS;IAEvG,OAAOF;AACT,EAAE"}
@@ -0,0 +1,87 @@
1
+ import { makeStyles, makeResetStyles, mergeClasses } from '@griffel/react';
2
+ import { tokens } from '@fluentui/react-theme';
3
+ export const toastTitleClassNames = {
4
+ root: 'fui-ToastTitle',
5
+ media: 'fui-ToastTitle__media',
6
+ action: 'fui-ToastTitle__action'
7
+ };
8
+ const useRootBaseClassName = makeResetStyles({
9
+ display: 'flex',
10
+ gridColumnEnd: 3,
11
+ color: tokens.colorNeutralForeground1,
12
+ wordBreak: 'break-word'
13
+ });
14
+ const useMediaBaseClassName = makeResetStyles({
15
+ display: 'flex',
16
+ paddingTop: '2px',
17
+ gridColumnEnd: 2,
18
+ paddingRight: '8px',
19
+ fontSize: '16px',
20
+ color: tokens.colorNeutralForeground1
21
+ });
22
+ const useActionBaseClassName = makeResetStyles({
23
+ display: 'flex',
24
+ alignItems: 'start',
25
+ paddingLeft: '12px',
26
+ gridColumnEnd: -1,
27
+ color: tokens.colorBrandForeground1
28
+ });
29
+ const useInvertedStyles = makeStyles({
30
+ root: {
31
+ color: tokens.colorNeutralForegroundInverted2
32
+ },
33
+ action: {
34
+ color: tokens.colorBrandForegroundInverted
35
+ },
36
+ media: {
37
+ color: tokens.colorNeutralForegroundInverted
38
+ }
39
+ });
40
+ const useIntentIconStyles = makeStyles({
41
+ success: {
42
+ color: tokens.colorStatusSuccessForeground1
43
+ },
44
+ error: {
45
+ color: tokens.colorStatusDangerForeground1
46
+ },
47
+ warning: {
48
+ color: tokens.colorStatusWarningForeground1
49
+ },
50
+ info: {
51
+ color: tokens.colorNeutralForeground2
52
+ }
53
+ });
54
+ const useIntentIconStylesInverted = makeStyles({
55
+ success: {
56
+ color: tokens.colorStatusSuccessForegroundInverted
57
+ },
58
+ error: {
59
+ color: tokens.colorStatusDangerForegroundInverted
60
+ },
61
+ warning: {
62
+ color: tokens.colorStatusWarningForegroundInverted
63
+ },
64
+ info: {
65
+ color: tokens.colorNeutralForegroundInverted2
66
+ }
67
+ });
68
+ /**
69
+ * Apply styling to the ToastTitle slots based on the state
70
+ */ export const useToastTitleStyles_unstable = (state)=>{
71
+ 'use no memo';
72
+ const rootBaseClassName = useRootBaseClassName();
73
+ const actionBaseClassName = useActionBaseClassName();
74
+ const mediaBaseClassName = useMediaBaseClassName();
75
+ const intentIconStyles = useIntentIconStyles();
76
+ const intentIconStylesInverted = useIntentIconStylesInverted();
77
+ const { intent } = state;
78
+ const invertedStyles = useInvertedStyles();
79
+ state.root.className = mergeClasses(toastTitleClassNames.root, rootBaseClassName, state.backgroundAppearance === 'inverted' && invertedStyles.root, state.root.className);
80
+ if (state.media) {
81
+ state.media.className = mergeClasses(toastTitleClassNames.media, mediaBaseClassName, state.backgroundAppearance === 'inverted' && invertedStyles.media, intent && intentIconStyles[intent], intent && state.backgroundAppearance === 'inverted' && intentIconStylesInverted[intent], state.media.className);
82
+ }
83
+ if (state.action) {
84
+ state.action.className = mergeClasses(toastTitleClassNames.action, actionBaseClassName, state.backgroundAppearance === 'inverted' && invertedStyles.action, state.action.className);
85
+ }
86
+ return state;
87
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/ToastTitle/useToastTitleStyles.styles.ts"],"sourcesContent":["import { makeStyles, makeResetStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { ToastTitleSlots, ToastTitleState } from './ToastTitle.types';\n\nexport const toastTitleClassNames: SlotClassNames<ToastTitleSlots> = {\n root: 'fui-ToastTitle',\n media: 'fui-ToastTitle__media',\n action: 'fui-ToastTitle__action',\n};\n\nconst useRootBaseClassName = makeResetStyles({\n display: 'flex',\n gridColumnEnd: 3,\n color: tokens.colorNeutralForeground1,\n wordBreak: 'break-word',\n});\n\nconst useMediaBaseClassName = makeResetStyles({\n display: 'flex',\n paddingTop: '2px',\n gridColumnEnd: 2,\n paddingRight: '8px',\n fontSize: '16px',\n color: tokens.colorNeutralForeground1,\n});\n\nconst useActionBaseClassName = makeResetStyles({\n display: 'flex',\n alignItems: 'start',\n paddingLeft: '12px',\n gridColumnEnd: -1,\n color: tokens.colorBrandForeground1,\n});\n\nconst useInvertedStyles = makeStyles({\n root: {\n color: tokens.colorNeutralForegroundInverted2,\n },\n\n action: {\n color: tokens.colorBrandForegroundInverted,\n },\n\n media: {\n color: tokens.colorNeutralForegroundInverted,\n },\n});\n\nconst useIntentIconStyles = makeStyles({\n success: {\n color: tokens.colorStatusSuccessForeground1,\n },\n error: {\n color: tokens.colorStatusDangerForeground1,\n },\n warning: {\n color: tokens.colorStatusWarningForeground1,\n },\n info: {\n color: tokens.colorNeutralForeground2,\n },\n});\n\nconst useIntentIconStylesInverted = makeStyles({\n success: {\n color: tokens.colorStatusSuccessForegroundInverted,\n },\n error: {\n color: tokens.colorStatusDangerForegroundInverted,\n },\n warning: {\n color: tokens.colorStatusWarningForegroundInverted,\n },\n info: {\n color: tokens.colorNeutralForegroundInverted2,\n },\n});\n\n/**\n * Apply styling to the ToastTitle slots based on the state\n */\nexport const useToastTitleStyles_unstable = (state: ToastTitleState): ToastTitleState => {\n 'use no memo';\n\n const rootBaseClassName = useRootBaseClassName();\n const actionBaseClassName = useActionBaseClassName();\n const mediaBaseClassName = useMediaBaseClassName();\n const intentIconStyles = useIntentIconStyles();\n const intentIconStylesInverted = useIntentIconStylesInverted();\n const { intent } = state;\n const invertedStyles = useInvertedStyles();\n state.root.className = mergeClasses(\n toastTitleClassNames.root,\n rootBaseClassName,\n state.backgroundAppearance === 'inverted' && invertedStyles.root,\n state.root.className,\n );\n\n if (state.media) {\n state.media.className = mergeClasses(\n toastTitleClassNames.media,\n mediaBaseClassName,\n state.backgroundAppearance === 'inverted' && invertedStyles.media,\n intent && intentIconStyles[intent],\n intent && state.backgroundAppearance === 'inverted' && intentIconStylesInverted[intent],\n state.media.className,\n );\n }\n\n if (state.action) {\n state.action.className = mergeClasses(\n toastTitleClassNames.action,\n actionBaseClassName,\n state.backgroundAppearance === 'inverted' && invertedStyles.action,\n state.action.className,\n );\n }\n\n return state;\n};\n"],"names":["makeStyles","makeResetStyles","mergeClasses","tokens","toastTitleClassNames","root","media","action","useRootBaseClassName","display","gridColumnEnd","color","colorNeutralForeground1","wordBreak","useMediaBaseClassName","paddingTop","paddingRight","fontSize","useActionBaseClassName","alignItems","paddingLeft","colorBrandForeground1","useInvertedStyles","colorNeutralForegroundInverted2","colorBrandForegroundInverted","colorNeutralForegroundInverted","useIntentIconStyles","success","colorStatusSuccessForeground1","error","colorStatusDangerForeground1","warning","colorStatusWarningForeground1","info","colorNeutralForeground2","useIntentIconStylesInverted","colorStatusSuccessForegroundInverted","colorStatusDangerForegroundInverted","colorStatusWarningForegroundInverted","useToastTitleStyles_unstable","state","rootBaseClassName","actionBaseClassName","mediaBaseClassName","intentIconStyles","intentIconStylesInverted","intent","invertedStyles","className","backgroundAppearance"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,UAAU,EAAEC,eAAe,EAAEC,YAAY,QAAQ,iBAAiB;AAC3E,SAASC,MAAM,QAAQ,wBAAwB;AAI/C,OAAO,MAAMC,uBAAwD;IACnEC,MAAM;IACNC,OAAO;IACPC,QAAQ;AACV,EAAE;AAEF,MAAMC,uBAAuBP,gBAAgB;IAC3CQ,SAAS;IACTC,eAAe;IACfC,OAAOR,OAAOS,uBAAuB;IACrCC,WAAW;AACb;AAEA,MAAMC,wBAAwBb,gBAAgB;IAC5CQ,SAAS;IACTM,YAAY;IACZL,eAAe;IACfM,cAAc;IACdC,UAAU;IACVN,OAAOR,OAAOS,uBAAuB;AACvC;AAEA,MAAMM,yBAAyBjB,gBAAgB;IAC7CQ,SAAS;IACTU,YAAY;IACZC,aAAa;IACbV,eAAe,CAAC;IAChBC,OAAOR,OAAOkB,qBAAqB;AACrC;AAEA,MAAMC,oBAAoBtB,WAAW;IACnCK,MAAM;QACJM,OAAOR,OAAOoB,+BAA+B;IAC/C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cJ,wBAAwB,CAACC,OAAO,EACvFN,MAAMlC,KAAK,CAAC0C,SAAS;IAEzB;IAEA,IAAIR,MAAMjC,MAAM,EAAE;QAChBiC,MAAMjC,MAAM,CAACyC,SAAS,GAAG9C,aACvBE,qBAAqBG,MAAM,EAC3BmC,qBACAF,MAAMS,oBAAoB,KAAK,cAAcF,eAAexC,MAAM,EAClEiC,MAAMjC,MAAM,CAACyC,SAAS;IAE1B;IAEA,OAAOR;AACT,EAAE"}
@@ -0,0 +1,68 @@
1
+ import { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';
2
+ import { TOAST_POSITIONS, getPositionStyles } from '../../state/index';
3
+ export const toasterClassNames = {
4
+ root: 'fui-Toaster'
5
+ };
6
+ /**
7
+ * Styles for the root slot
8
+ */ const useRootBaseClassName = makeResetStyles({
9
+ position: 'fixed',
10
+ width: '292px',
11
+ pointerEvents: 'none'
12
+ });
13
+ const useToasterStyles = makeStyles({
14
+ inline: {
15
+ position: 'absolute'
16
+ }
17
+ });
18
+ /**
19
+ * Apply styling to the Toaster slots based on the state
20
+ */ export const useToasterStyles_unstable = (state)=>{
21
+ 'use no memo';
22
+ const rootBaseClassName = useRootBaseClassName();
23
+ const styles = useToasterStyles();
24
+ const className = mergeClasses(toasterClassNames.root, rootBaseClassName, state.inline && styles.inline, state.root.className);
25
+ if (state.bottomStart) {
26
+ var _state_bottomStart;
27
+ state.bottomStart.className = className;
28
+ var _style;
29
+ (_style = (_state_bottomStart = state.bottomStart).style) !== null && _style !== void 0 ? _style : _state_bottomStart.style = {};
30
+ Object.assign(state.bottomStart.style, getPositionStyles(TOAST_POSITIONS.bottomStart, state.dir, state.offset));
31
+ }
32
+ if (state.bottomEnd) {
33
+ var _state_bottomEnd;
34
+ state.bottomEnd.className = className;
35
+ var _style1;
36
+ (_style1 = (_state_bottomEnd = state.bottomEnd).style) !== null && _style1 !== void 0 ? _style1 : _state_bottomEnd.style = {};
37
+ Object.assign(state.bottomEnd.style, getPositionStyles(TOAST_POSITIONS.bottomEnd, state.dir, state.offset));
38
+ }
39
+ if (state.topStart) {
40
+ var _state_topStart;
41
+ state.topStart.className = className;
42
+ var _style2;
43
+ (_style2 = (_state_topStart = state.topStart).style) !== null && _style2 !== void 0 ? _style2 : _state_topStart.style = {};
44
+ Object.assign(state.topStart.style, getPositionStyles(TOAST_POSITIONS.topStart, state.dir, state.offset));
45
+ }
46
+ if (state.topEnd) {
47
+ var _state_topEnd;
48
+ state.topEnd.className = className;
49
+ var _style3;
50
+ (_style3 = (_state_topEnd = state.topEnd).style) !== null && _style3 !== void 0 ? _style3 : _state_topEnd.style = {};
51
+ Object.assign(state.topEnd.style, getPositionStyles(TOAST_POSITIONS.topEnd, state.dir, state.offset));
52
+ }
53
+ if (state.top) {
54
+ var _state_top;
55
+ state.top.className = className;
56
+ var _style4;
57
+ (_style4 = (_state_top = state.top).style) !== null && _style4 !== void 0 ? _style4 : _state_top.style = {};
58
+ Object.assign(state.top.style, getPositionStyles(TOAST_POSITIONS.top, state.dir, state.offset));
59
+ }
60
+ if (state.bottom) {
61
+ var _state_bottom;
62
+ state.bottom.className = className;
63
+ var _style5;
64
+ (_style5 = (_state_bottom = state.bottom).style) !== null && _style5 !== void 0 ? _style5 : _state_bottom.style = {};
65
+ Object.assign(state.bottom.style, getPositionStyles(TOAST_POSITIONS.bottom, state.dir, state.offset));
66
+ }
67
+ return state;
68
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/Toaster/useToasterStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport type { ToasterSlots, ToasterState } from './Toaster.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { TOAST_POSITIONS, getPositionStyles } from '../../state/index';\n\nexport const toasterClassNames: SlotClassNames<ToasterSlots> = {\n root: 'fui-Toaster',\n};\n\n/**\n * Styles for the root slot\n */\nconst useRootBaseClassName = makeResetStyles({\n position: 'fixed',\n width: '292px',\n pointerEvents: 'none',\n});\n\nconst useToasterStyles = makeStyles({\n inline: {\n position: 'absolute',\n },\n});\n\n/**\n * Apply styling to the Toaster slots based on the state\n */\nexport const useToasterStyles_unstable = (state: ToasterState): ToasterState => {\n 'use no memo';\n\n const rootBaseClassName = useRootBaseClassName();\n const styles = useToasterStyles();\n const className = mergeClasses(\n toasterClassNames.root,\n rootBaseClassName,\n state.inline && styles.inline,\n state.root.className,\n );\n if (state.bottomStart) {\n state.bottomStart.className = className;\n state.bottomStart.style ??= {};\n Object.assign(state.bottomStart.style, getPositionStyles(TOAST_POSITIONS.bottomStart, state.dir, state.offset));\n }\n\n if (state.bottomEnd) {\n state.bottomEnd.className = className;\n state.bottomEnd.style ??= {};\n Object.assign(state.bottomEnd.style, getPositionStyles(TOAST_POSITIONS.bottomEnd, state.dir, state.offset));\n }\n\n if (state.topStart) {\n state.topStart.className = className;\n state.topStart.style ??= {};\n Object.assign(state.topStart.style, getPositionStyles(TOAST_POSITIONS.topStart, state.dir, state.offset));\n }\n\n if (state.topEnd) {\n state.topEnd.className = className;\n state.topEnd.style ??= {};\n Object.assign(state.topEnd.style, getPositionStyles(TOAST_POSITIONS.topEnd, state.dir, state.offset));\n }\n\n if (state.top) {\n state.top.className = className;\n state.top.style ??= {};\n Object.assign(state.top.style, getPositionStyles(TOAST_POSITIONS.top, state.dir, state.offset));\n }\n\n if (state.bottom) {\n state.bottom.className = className;\n state.bottom.style ??= {};\n Object.assign(state.bottom.style, getPositionStyles(TOAST_POSITIONS.bottom, state.dir, state.offset));\n }\n\n return state;\n};\n"],"names":["makeResetStyles","makeStyles","mergeClasses","TOAST_POSITIONS","getPositionStyles","toasterClassNames","root","useRootBaseClassName","position","width","pointerEvents","useToasterStyles","inline","useToasterStyles_unstable","state","rootBaseClassName","styles","className","bottomStart","style","Object","assign","dir","offset","bottomEnd","topStart","topEnd","top","bottom"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAA,kBAAAA,MAAMW,QAAQ,EAACN,kDAAfL,gBAAeK,QAAU,CAAC;QAC1BC,OAAOC,MAAM,CAACP,MAAMW,QAAQ,CAACN,KAAK,EAAEf,kBAAkBD,gBAAgBsB,QAAQ,EAAEX,MAAMQ,GAAG,EAAER,MAAMS,MAAM;IACzG;IAEA,IAAIT,MAAMY,MAAM,EAAE;YAEhBZ;QADAA,MAAMY,MAAM,CAACT,SAAS,GAAGA;;QACzBH,YAAAA,gBAAAA,MAAMY,MAAM,EAACP,kDAAbL,cAAaK,QAAU,CAAC;QACxBC,OAAOC,MAAM,CAACP,MAAMY,MAAM,CAACP,KAAK,EAAEf,kBAAkBD,gBAAgBuB,MAAM,EAAEZ,MAAMQ,GAAG,EAAER,MAAMS,MAAM;IACrG;IAEA,IAAIT,MAAMa,GAAG,EAAE;YAEbb;QADAA,MAAMa,GAAG,CAACV,SAAS,GAAGA;;QACtBH,YAAAA,aAAAA,MAAMa,GAAG,EAACR,kDAAVL,WAAUK,QAAU,CAAC;QACrBC,OAAOC,MAAM,CAACP,MAAMa,GAAG,CAACR,KAAK,EAAEf,kBAAkBD,gBAAgBwB,GAAG,EAAEb,MAAMQ,GAAG,EAAER,MAAMS,MAAM;IAC/F;IAEA,IAAIT,MAAMc,MAAM,EAAE;YAEhBd;QADAA,MAAMc,MAAM,CAACX,SAAS,GAAGA;;QACzBH,YAAAA,gBAAAA,MAAMc,MAAM,EAACT,kDAAbL,cAAaK,QAAU,CAAC;QACxBC,OAAOC,MAAM,CAACP,MAAMc,MAAM,CAACT,KAAK,EAAEf,kBAAkBD,gBAAgByB,MAAM,EAAEd,MAAMQ,GAAG,EAAER,MAAMS,MAAM;IACrG;IAEA,OAAOT;AACT,EAAE"}
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ ariaLiveClassNames: function() {
13
+ return ariaLiveClassNames;
14
+ },
15
+ useAriaLiveStyles_unstable: function() {
16
+ return useAriaLiveStyles_unstable;
17
+ }
18
+ });
19
+ const _react = require("@griffel/react");
20
+ const ariaLiveClassNames = {
21
+ assertive: 'fui-AriaLive__assertive',
22
+ polite: 'fui-AriaLive__polite'
23
+ };
24
+ /**
25
+ * Styles for the root slot
26
+ */ const useResetStyles = (0, _react.makeResetStyles)({
27
+ clip: 'rect(0px, 0px, 0px, 0px)',
28
+ height: '1px',
29
+ margin: '-1px',
30
+ overflow: 'hidden',
31
+ padding: '0px',
32
+ width: '1px',
33
+ position: 'absolute'
34
+ });
35
+ const useAriaLiveStyles_unstable = (state)=>{
36
+ 'use no memo';
37
+ const visuallyHidden = useResetStyles();
38
+ state.assertive.className = (0, _react.mergeClasses)(visuallyHidden, ariaLiveClassNames.assertive, state.assertive.className);
39
+ state.polite.className = (0, _react.mergeClasses)(visuallyHidden, ariaLiveClassNames.polite, state.polite.className);
40
+ return state;
41
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/AriaLive/useAriaLiveStyles.styles.ts"],"sourcesContent":["import { mergeClasses, makeResetStyles } from '@griffel/react';\nimport type { AriaLiveSlots, AriaLiveState } from './AriaLive.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const ariaLiveClassNames: SlotClassNames<AriaLiveSlots> = {\n assertive: 'fui-AriaLive__assertive',\n polite: 'fui-AriaLive__polite',\n};\n\n/**\n * Styles for the root slot\n */\nconst useResetStyles = makeResetStyles({\n clip: 'rect(0px, 0px, 0px, 0px)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: '0px',\n width: '1px',\n position: 'absolute',\n});\n\n/**\n * Apply styling to the AriaLive slots based on the state\n */\nexport const useAriaLiveStyles_unstable = (state: AriaLiveState): AriaLiveState => {\n 'use no memo';\n\n const visuallyHidden = useResetStyles();\n state.assertive.className = mergeClasses(visuallyHidden, ariaLiveClassNames.assertive, state.assertive.className);\n state.polite.className = mergeClasses(visuallyHidden, ariaLiveClassNames.polite, state.polite.className);\n\n return state;\n};\n"],"names":["ariaLiveClassNames","useAriaLiveStyles_unstable","assertive","polite","useResetStyles","makeResetStyles","clip","height","margin","overflow","padding","width","position","state","visuallyHidden","className","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIaA,kBAAAA;eAAAA;;IAqBAC,0BAAAA;eAAAA;;;uBAzBiC;AAIvC,MAAMD,qBAAoD;IAC/DE,WAAW;IACXC,QAAQ;AACV;AAEA;;CAEC,GACD,MAAMC,iBAAiBC,IAAAA,sBAAAA,EAAgB;IACrCC,MAAM;IACNC,QAAQ;IACRC,QAAQ;IACRC,UAAU;IACVC,SAAS;IACTC,OAAO;IACPC,UAAU;AACZ;AAKO,MAAMX,6BAA6B,CAACY;IACzC;IAEA,MAAMC,iBAAiBV;IACvBS,MAAMX,SAAS,CAACa,SAAS,GAAGC,IAAAA,mBAAAA,EAAaF,gBAAgBd,mBAAmBE,SAAS,EAAEW,MAAMX,SAAS,CAACa,SAAS;IAChHF,MAAMV,MAAM,CAACY,SAAS,GAAGC,IAAAA,mBAAAA,EAAaF,gBAAgBd,mBAAmBG,MAAM,EAAEU,MAAMV,MAAM,CAACY,SAAS;IAEvG,OAAOF;AACT"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "useBaseAnimationStyles", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return useBaseAnimationStyles;
9
+ }
10
+ });
11
+ const _react = require("@griffel/react");
12
+ const useBaseAnimationStyles = (0, _react.makeResetStyles)({
13
+ animationName: {
14
+ from: {
15
+ opacity: 0
16
+ },
17
+ to: {
18
+ opacity: 0
19
+ }
20
+ }
21
+ });
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/Timer/useTimerStyles.styles.ts"],"sourcesContent":["import { makeResetStyles } from '@griffel/react';\n\nexport const useBaseAnimationStyles = makeResetStyles({\n animationName: {\n from: {\n opacity: 0,\n },\n to: {\n opacity: 0,\n },\n },\n});\n"],"names":["useBaseAnimationStyles","makeResetStyles","animationName","from","opacity","to"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAEaA;;;eAAAA;;;uBAFmB;AAEzB,MAAMA,yBAAyBC,IAAAA,sBAAAA,EAAgB;IACpDC,eAAe;QACbC,MAAM;YACJC,SAAS;QACX;QACAC,IAAI;YACFD,SAAS;QACX;IACF;AACF"}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ toastClassNames: function() {
13
+ return toastClassNames;
14
+ },
15
+ useToastStyles_unstable: function() {
16
+ return useToastStyles_unstable;
17
+ }
18
+ });
19
+ const _react = require("@griffel/react");
20
+ const _reacttheme = require("@fluentui/react-theme");
21
+ const toastClassNames = {
22
+ root: 'fui-Toast'
23
+ };
24
+ const useRootBaseClassName = (0, _react.makeResetStyles)({
25
+ display: 'grid',
26
+ gridTemplateColumns: 'auto 1fr auto',
27
+ padding: '12px',
28
+ borderRadius: _reacttheme.tokens.borderRadiusMedium,
29
+ border: `1px solid ${_reacttheme.tokens.colorTransparentStroke}`,
30
+ boxShadow: _reacttheme.tokens.shadow8,
31
+ fontSize: _reacttheme.tokens.fontSizeBase300,
32
+ lineHeight: '20px',
33
+ fontWeight: _reacttheme.tokens.fontWeightSemibold,
34
+ color: _reacttheme.tokens.colorNeutralForeground1,
35
+ backgroundColor: _reacttheme.tokens.colorNeutralBackground1
36
+ });
37
+ const useStyles = (0, _react.makeStyles)({
38
+ inverted: {
39
+ color: _reacttheme.tokens.colorNeutralForegroundInverted2,
40
+ backgroundColor: _reacttheme.tokens.colorNeutralBackgroundInverted
41
+ }
42
+ });
43
+ const useToastStyles_unstable = (state)=>{
44
+ 'use no memo';
45
+ const rootBaseClassName = useRootBaseClassName();
46
+ const styles = useStyles();
47
+ state.root.className = (0, _react.mergeClasses)(toastClassNames.root, rootBaseClassName, state.backgroundAppearance === 'inverted' && styles.inverted, state.root.className);
48
+ return state;
49
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/Toast/useToastStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { ToastSlots, ToastState } from './Toast.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const toastClassNames: SlotClassNames<ToastSlots> = {\n root: 'fui-Toast',\n};\n\nconst useRootBaseClassName = makeResetStyles({\n display: 'grid',\n gridTemplateColumns: 'auto 1fr auto',\n padding: '12px',\n borderRadius: tokens.borderRadiusMedium,\n border: `1px solid ${tokens.colorTransparentStroke}`,\n boxShadow: tokens.shadow8,\n fontSize: tokens.fontSizeBase300,\n lineHeight: '20px',\n fontWeight: tokens.fontWeightSemibold,\n color: tokens.colorNeutralForeground1,\n backgroundColor: tokens.colorNeutralBackground1,\n});\n\nconst useStyles = makeStyles({\n inverted: {\n color: tokens.colorNeutralForegroundInverted2,\n backgroundColor: tokens.colorNeutralBackgroundInverted,\n },\n});\n\n/**\n * Apply styling to the Toast slots based on the state\n */\nexport const useToastStyles_unstable = (state: ToastState): ToastState => {\n 'use no memo';\n\n const rootBaseClassName = useRootBaseClassName();\n const styles = useStyles();\n state.root.className = mergeClasses(\n toastClassNames.root,\n rootBaseClassName,\n state.backgroundAppearance === 'inverted' && styles.inverted,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["toastClassNames","useToastStyles_unstable","root","useRootBaseClassName","makeResetStyles","display","gridTemplateColumns","padding","borderRadius","tokens","borderRadiusMedium","border","colorTransparentStroke","boxShadow","shadow8","fontSize","fontSizeBase300","lineHeight","fontWeight","fontWeightSemibold","color","colorNeutralForeground1","backgroundColor","colorNeutralBackground1","useStyles","makeStyles","inverted","colorNeutralForegroundInverted2","colorNeutralBackgroundInverted","state","rootBaseClassName","styles","className","mergeClasses","backgroundAppearance"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAKaA,eAAAA;eAAAA;;IA4BAC,uBAAAA;eAAAA;;;uBAjC6C;4BACnC;AAIhB,MAAMD,kBAA8C;IACzDE,MAAM;AACR;AAEA,MAAMC,uBAAuBC,IAAAA,sBAAAA,EAAgB;IAC3CC,SAAS;IACTC,qBAAqB;IACrBC,SAAS;IACTC,cAAcC,kBAAAA,CAAOC,kBAAkB;IACvCC,QAAQ,CAAC,UAAU,EAAEF,kBAAAA,CAAOG,sBAAsB,CAAC,CAAC;IACpDC,WAAWJ,kBAAAA,CAAOK,OAAO;IACzBC,UAAUN,kBAAAA,CAAOO,eAAe;IAChCC,YAAY;IACZC,YAAYT,kBAAAA,CAAOU,kBAAkB;IACrCC,OAAOX,kBAAAA,CAAOY,uBAAuB;IACrCC,iBAAiBb,kBAAAA,CAAOc,uBAAuB;AACjD;AAEA,MAAMC,YAAYC,IAAAA,iBAAAA,EAAW;IAC3BC,UAAU;QACRN,OAAOX,kBAAAA,CAAOkB,+BAA+B;QAC7CL,iBAAiBb,kBAAAA,CAAOmB,8BAA8B;IACxD;AACF;AAKO,MAAM3B,0BAA0B,CAAC4B;IACtC;IAEA,MAAMC,oBAAoB3B;IAC1B,MAAM4B,SAASP;IACfK,MAAM3B,IAAI,CAAC8B,SAAS,GAAGC,IAAAA,mBAAAA,EACrBjC,gBAAgBE,IAAI,EACpB4B,mBACAD,MAAMK,oBAAoB,KAAK,cAAcH,OAAOL,QAAQ,EAC5DG,MAAM3B,IAAI,CAAC8B,SAAS;IAGtB,OAAOH;AACT"}
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ toastBodyClassNames: function() {
13
+ return toastBodyClassNames;
14
+ },
15
+ useToastBodyStyles_unstable: function() {
16
+ return useToastBodyStyles_unstable;
17
+ }
18
+ });
19
+ const _react = require("@griffel/react");
20
+ const _reacttheme = require("@fluentui/react-theme");
21
+ const toastBodyClassNames = {
22
+ root: 'fui-ToastBody',
23
+ subtitle: 'fui-ToastBody__subtitle'
24
+ };
25
+ const useRootBaseClassName = (0, _react.makeResetStyles)({
26
+ gridColumnStart: 2,
27
+ gridColumnEnd: 3,
28
+ paddingTop: '6px',
29
+ fontSize: _reacttheme.tokens.fontSizeBase300,
30
+ lineHeight: _reacttheme.tokens.fontSizeBase300,
31
+ fontWeight: _reacttheme.tokens.fontWeightRegular,
32
+ color: _reacttheme.tokens.colorNeutralForeground1,
33
+ wordBreak: 'break-word'
34
+ });
35
+ const useSubtitleBaseClassName = (0, _react.makeResetStyles)({
36
+ paddingTop: '4px',
37
+ gridColumnStart: 2,
38
+ gridColumnEnd: 3,
39
+ fontSize: _reacttheme.tokens.fontSizeBase200,
40
+ lineHeight: _reacttheme.tokens.fontSizeBase200,
41
+ fontWeight: _reacttheme.tokens.fontWeightRegular,
42
+ color: _reacttheme.tokens.colorNeutralForeground2
43
+ });
44
+ const useInvertedStyles = (0, _react.makeStyles)({
45
+ root: {
46
+ color: _reacttheme.tokens.colorNeutralForegroundInverted2
47
+ },
48
+ subtitle: {
49
+ color: _reacttheme.tokens.colorNeutralForegroundInverted2
50
+ }
51
+ });
52
+ const useToastBodyStyles_unstable = (state)=>{
53
+ 'use no memo';
54
+ const rootBaseClassName = useRootBaseClassName();
55
+ const subtitleBaseClassName = useSubtitleBaseClassName();
56
+ const invertedStyles = useInvertedStyles();
57
+ state.root.className = (0, _react.mergeClasses)(toastBodyClassNames.root, rootBaseClassName, state.backgroundAppearance === 'inverted' && invertedStyles.root, state.root.className);
58
+ if (state.subtitle) {
59
+ state.subtitle.className = (0, _react.mergeClasses)(toastBodyClassNames.subtitle, subtitleBaseClassName, state.backgroundAppearance === 'inverted' && invertedStyles.subtitle, state.subtitle.className);
60
+ }
61
+ return state;
62
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/ToastBody/useToastBodyStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { ToastBodySlots, ToastBodyState } from './ToastBody.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const toastBodyClassNames: SlotClassNames<ToastBodySlots> = {\n root: 'fui-ToastBody',\n subtitle: 'fui-ToastBody__subtitle',\n};\n\nconst useRootBaseClassName = makeResetStyles({\n gridColumnStart: 2,\n gridColumnEnd: 3,\n paddingTop: '6px',\n fontSize: tokens.fontSizeBase300,\n lineHeight: tokens.fontSizeBase300,\n fontWeight: tokens.fontWeightRegular,\n color: tokens.colorNeutralForeground1,\n wordBreak: 'break-word',\n});\n\nconst useSubtitleBaseClassName = makeResetStyles({\n paddingTop: '4px',\n gridColumnStart: 2,\n gridColumnEnd: 3,\n fontSize: tokens.fontSizeBase200,\n lineHeight: tokens.fontSizeBase200,\n fontWeight: tokens.fontWeightRegular,\n color: tokens.colorNeutralForeground2,\n});\n\nconst useInvertedStyles = makeStyles({\n root: {\n color: tokens.colorNeutralForegroundInverted2,\n },\n subtitle: {\n color: tokens.colorNeutralForegroundInverted2,\n },\n});\n\n/**\n * Apply styling to the ToastBody slots based on the state\n */\nexport const useToastBodyStyles_unstable = (state: ToastBodyState): ToastBodyState => {\n 'use no memo';\n\n const rootBaseClassName = useRootBaseClassName();\n const subtitleBaseClassName = useSubtitleBaseClassName();\n const invertedStyles = useInvertedStyles();\n state.root.className = mergeClasses(\n toastBodyClassNames.root,\n rootBaseClassName,\n state.backgroundAppearance === 'inverted' && invertedStyles.root,\n state.root.className,\n );\n\n if (state.subtitle) {\n state.subtitle.className = mergeClasses(\n toastBodyClassNames.subtitle,\n subtitleBaseClassName,\n state.backgroundAppearance === 'inverted' && invertedStyles.subtitle,\n state.subtitle.className,\n );\n }\n\n return state;\n};\n"],"names":["toastBodyClassNames","useToastBodyStyles_unstable","root","subtitle","useRootBaseClassName","makeResetStyles","gridColumnStart","gridColumnEnd","paddingTop","fontSize","tokens","fontSizeBase300","lineHeight","fontWeight","fontWeightRegular","color","colorNeutralForeground1","wordBreak","useSubtitleBaseClassName","fontSizeBase200","colorNeutralForeground2","useInvertedStyles","makeStyles","colorNeutralForegroundInverted2","state","rootBaseClassName","subtitleBaseClassName","invertedStyles","className","mergeClasses","backgroundAppearance"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAKaA,mBAAAA;eAAAA;;IAsCAC,2BAAAA;eAAAA;;;uBA3C6C;4BACnC;AAIhB,MAAMD,sBAAsD;IACjEE,MAAM;IACNC,UAAU;AACZ;AAEA,MAAMC,uBAAuBC,IAAAA,sBAAAA,EAAgB;IAC3CC,iBAAiB;IACjBC,eAAe;IACfC,YAAY;IACZC,UAAUC,kBAAAA,CAAOC,eAAe;IAChCC,YAAYF,kBAAAA,CAAOC,eAAe;IAClCE,YAAYH,kBAAAA,CAAOI,iBAAiB;IACpCC,OAAOL,kBAAAA,CAAOM,uBAAuB;IACrCC,WAAW;AACb;AAEA,MAAMC,2BAA2Bb,IAAAA,sBAAAA,EAAgB;IAC/CG,YAAY;IACZF,iBAAiB;IACjBC,eAAe;IACfE,UAAUC,kBAAAA,CAAOS,eAAe;IAChCP,YAAYF,kBAAAA,CAAOS,eAAe;IAClCN,YAAYH,kBAAAA,CAAOI,iBAAiB;IACpCC,OAAOL,kBAAAA,CAAOU,uBAAuB;AACvC;AAEA,MAAMC,oBAAoBC,IAAAA,iBAAAA,EAAW;IACnCpB,MAAM;QACJa,OAAOL,kBAAAA,CAAOa,+BAA+B;IAC/C;IACApB,UAAU;QACRY,OAAOL,kBAAAA,CAAOa,+BAA+B;IAC/C;AACF;AAKO,MAAMtB,8BAA8B,CAACuB;IAC1C;IAEA,MAAMC,oBAAoBrB;IAC1B,MAAMsB,wBAAwBR;IAC9B,MAAMS,iBAAiBN;IACvBG,MAAMtB,IAAI,CAAC0B,SAAS,GAAGC,IAAAA,mBAAAA,EACrB7B,oBAAoBE,IAAI,EACxBuB,mBACAD,MAAMM,oBAAoB,KAAK,cAAcH,eAAezB,IAAI,EAChEsB,MAAMtB,IAAI,CAAC0B,SAAS;IAGtB,IAAIJ,MAAMrB,QAAQ,EAAE;QAClBqB,MAAMrB,QAAQ,CAACyB,SAAS,GAAGC,IAAAA,mBAAAA,EACzB7B,oBAAoBG,QAAQ,EAC5BuB,uBACAF,MAAMM,oBAAoB,KAAK,cAAcH,eAAexB,QAAQ,EACpEqB,MAAMrB,QAAQ,CAACyB,SAAS;IAE5B;IAEA,OAAOJ;AACT"}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ toastContainerClassNames: function() {
13
+ return toastContainerClassNames;
14
+ },
15
+ useToastContainerStyles_unstable: function() {
16
+ return useToastContainerStyles_unstable;
17
+ }
18
+ });
19
+ const _react = require("@griffel/react");
20
+ const _reacttheme = require("@fluentui/react-theme");
21
+ const _reacttabster = require("@fluentui/react-tabster");
22
+ const toastContainerClassNames = {
23
+ root: 'fui-ToastContainer',
24
+ timer: 'fui-ToastContainer__timer'
25
+ };
26
+ const useRootBaseClassName = (0, _react.makeResetStyles)({
27
+ boxSizing: 'border-box',
28
+ marginTop: '16px',
29
+ pointerEvents: 'all',
30
+ borderRadius: _reacttheme.tokens.borderRadiusMedium,
31
+ ...(0, _reacttabster.createCustomFocusIndicatorStyle)({
32
+ outline: `${_reacttheme.tokens.strokeWidthThick} solid ${_reacttheme.tokens.colorStrokeFocus2}`
33
+ })
34
+ });
35
+ const useToastContainerStyles_unstable = (state)=>{
36
+ 'use no memo';
37
+ const rootBaseClassName = useRootBaseClassName();
38
+ state.root.className = (0, _react.mergeClasses)(toastContainerClassNames.root, rootBaseClassName, state.root.className);
39
+ return state;
40
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/ToastContainer/useToastContainerStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport type { ToastContainerSlots, ToastContainerState } from './ToastContainer.types';\n\nexport const toastContainerClassNames: SlotClassNames<ToastContainerSlots> = {\n root: 'fui-ToastContainer',\n timer: 'fui-ToastContainer__timer',\n};\n\nconst useRootBaseClassName = makeResetStyles({\n boxSizing: 'border-box',\n marginTop: '16px',\n pointerEvents: 'all',\n borderRadius: tokens.borderRadiusMedium,\n ...createCustomFocusIndicatorStyle({\n outline: `${tokens.strokeWidthThick} solid ${tokens.colorStrokeFocus2}`,\n }),\n});\n\n/**\n * Apply styling to the ToastContainer slots based on the state\n */\nexport const useToastContainerStyles_unstable = (state: ToastContainerState): ToastContainerState => {\n 'use no memo';\n\n const rootBaseClassName = useRootBaseClassName();\n state.root.className = mergeClasses(toastContainerClassNames.root, rootBaseClassName, state.root.className);\n\n return state;\n};\n"],"names":["toastContainerClassNames","useToastContainerStyles_unstable","root","timer","useRootBaseClassName","makeResetStyles","boxSizing","marginTop","pointerEvents","borderRadius","tokens","borderRadiusMedium","createCustomFocusIndicatorStyle","outline","strokeWidthThick","colorStrokeFocus2","state","rootBaseClassName","className","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAMaA,wBAAAA;eAAAA;;IAkBAC,gCAAAA;eAAAA;;;uBAxBiC;4BACvB;8BAEyB;AAGzC,MAAMD,2BAAgE;IAC3EE,MAAM;IACNC,OAAO;AACT;AAEA,MAAMC,uBAAuBC,IAAAA,sBAAAA,EAAgB;IAC3CC,WAAW;IACXC,WAAW;IACXC,eAAe;IACfC,cAAcC,kBAAAA,CAAOC,kBAAkB;IACvC,GAAGC,IAAAA,6CAAAA,EAAgC;QACjCC,SAAS,CAAC,EAAEH,kBAAAA,CAAOI,gBAAgB,CAAC,OAAO,EAAEJ,kBAAAA,CAAOK,iBAAiB,CAAC,CAAC;IACzE,EAAE;AACJ;AAKO,MAAMd,mCAAmC,CAACe;IAC/C;IAEA,MAAMC,oBAAoBb;IAC1BY,MAAMd,IAAI,CAACgB,SAAS,GAAGC,IAAAA,mBAAAA,EAAanB,yBAAyBE,IAAI,EAAEe,mBAAmBD,MAAMd,IAAI,CAACgB,SAAS;IAE1G,OAAOF;AACT"}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ toastFooterClassNames: function() {
13
+ return toastFooterClassNames;
14
+ },
15
+ useToastFooterStyles_unstable: function() {
16
+ return useToastFooterStyles_unstable;
17
+ }
18
+ });
19
+ const _react = require("@griffel/react");
20
+ const toastFooterClassNames = {
21
+ root: 'fui-ToastFooter'
22
+ };
23
+ /**
24
+ * Styles for the root slot
25
+ */ const useRootBaseClassName = (0, _react.makeResetStyles)({
26
+ paddingTop: '16px',
27
+ gridColumnStart: 2,
28
+ gridColumnEnd: 3,
29
+ display: 'flex',
30
+ alignItems: 'center',
31
+ gap: '14px'
32
+ });
33
+ const useToastFooterStyles_unstable = (state)=>{
34
+ 'use no memo';
35
+ const rootBaseClassName = useRootBaseClassName();
36
+ state.root.className = (0, _react.mergeClasses)(toastFooterClassNames.root, rootBaseClassName, state.root.className);
37
+ return state;
38
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/ToastFooter/useToastFooterStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses } from '@griffel/react';\nimport type { ToastFooterSlots, ToastFooterState } from './ToastFooter.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const toastFooterClassNames: SlotClassNames<ToastFooterSlots> = {\n root: 'fui-ToastFooter',\n};\n\n/**\n * Styles for the root slot\n */\nconst useRootBaseClassName = makeResetStyles({\n paddingTop: '16px',\n gridColumnStart: 2,\n gridColumnEnd: 3,\n display: 'flex',\n alignItems: 'center',\n gap: '14px',\n});\n\n/**\n * Apply styling to the ToastFooter slots based on the state\n */\nexport const useToastFooterStyles_unstable = (state: ToastFooterState): ToastFooterState => {\n 'use no memo';\n\n const rootBaseClassName = useRootBaseClassName();\n state.root.className = mergeClasses(toastFooterClassNames.root, rootBaseClassName, state.root.className);\n\n return state;\n};\n"],"names":["toastFooterClassNames","useToastFooterStyles_unstable","root","useRootBaseClassName","makeResetStyles","paddingTop","gridColumnStart","gridColumnEnd","display","alignItems","gap","state","rootBaseClassName","className","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIaA,qBAAAA;eAAAA;;IAmBAC,6BAAAA;eAAAA;;;uBAvBiC;AAIvC,MAAMD,wBAA0D;IACrEE,MAAM;AACR;AAEA;;CAEC,GACD,MAAMC,uBAAuBC,IAAAA,sBAAAA,EAAgB;IAC3CC,YAAY;IACZC,iBAAiB;IACjBC,eAAe;IACfC,SAAS;IACTC,YAAY;IACZC,KAAK;AACP;AAKO,MAAMT,gCAAgC,CAACU;IAC5C;IAEA,MAAMC,oBAAoBT;IAC1BQ,MAAMT,IAAI,CAACW,SAAS,GAAGC,IAAAA,mBAAAA,EAAad,sBAAsBE,IAAI,EAAEU,mBAAmBD,MAAMT,IAAI,CAACW,SAAS;IAEvG,OAAOF;AACT"}
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ toastTitleClassNames: function() {
13
+ return toastTitleClassNames;
14
+ },
15
+ useToastTitleStyles_unstable: function() {
16
+ return useToastTitleStyles_unstable;
17
+ }
18
+ });
19
+ const _react = require("@griffel/react");
20
+ const _reacttheme = require("@fluentui/react-theme");
21
+ const toastTitleClassNames = {
22
+ root: 'fui-ToastTitle',
23
+ media: 'fui-ToastTitle__media',
24
+ action: 'fui-ToastTitle__action'
25
+ };
26
+ const useRootBaseClassName = (0, _react.makeResetStyles)({
27
+ display: 'flex',
28
+ gridColumnEnd: 3,
29
+ color: _reacttheme.tokens.colorNeutralForeground1,
30
+ wordBreak: 'break-word'
31
+ });
32
+ const useMediaBaseClassName = (0, _react.makeResetStyles)({
33
+ display: 'flex',
34
+ paddingTop: '2px',
35
+ gridColumnEnd: 2,
36
+ paddingRight: '8px',
37
+ fontSize: '16px',
38
+ color: _reacttheme.tokens.colorNeutralForeground1
39
+ });
40
+ const useActionBaseClassName = (0, _react.makeResetStyles)({
41
+ display: 'flex',
42
+ alignItems: 'start',
43
+ paddingLeft: '12px',
44
+ gridColumnEnd: -1,
45
+ color: _reacttheme.tokens.colorBrandForeground1
46
+ });
47
+ const useInvertedStyles = (0, _react.makeStyles)({
48
+ root: {
49
+ color: _reacttheme.tokens.colorNeutralForegroundInverted2
50
+ },
51
+ action: {
52
+ color: _reacttheme.tokens.colorBrandForegroundInverted
53
+ },
54
+ media: {
55
+ color: _reacttheme.tokens.colorNeutralForegroundInverted
56
+ }
57
+ });
58
+ const useIntentIconStyles = (0, _react.makeStyles)({
59
+ success: {
60
+ color: _reacttheme.tokens.colorStatusSuccessForeground1
61
+ },
62
+ error: {
63
+ color: _reacttheme.tokens.colorStatusDangerForeground1
64
+ },
65
+ warning: {
66
+ color: _reacttheme.tokens.colorStatusWarningForeground1
67
+ },
68
+ info: {
69
+ color: _reacttheme.tokens.colorNeutralForeground2
70
+ }
71
+ });
72
+ const useIntentIconStylesInverted = (0, _react.makeStyles)({
73
+ success: {
74
+ color: _reacttheme.tokens.colorStatusSuccessForegroundInverted
75
+ },
76
+ error: {
77
+ color: _reacttheme.tokens.colorStatusDangerForegroundInverted
78
+ },
79
+ warning: {
80
+ color: _reacttheme.tokens.colorStatusWarningForegroundInverted
81
+ },
82
+ info: {
83
+ color: _reacttheme.tokens.colorNeutralForegroundInverted2
84
+ }
85
+ });
86
+ const useToastTitleStyles_unstable = (state)=>{
87
+ 'use no memo';
88
+ const rootBaseClassName = useRootBaseClassName();
89
+ const actionBaseClassName = useActionBaseClassName();
90
+ const mediaBaseClassName = useMediaBaseClassName();
91
+ const intentIconStyles = useIntentIconStyles();
92
+ const intentIconStylesInverted = useIntentIconStylesInverted();
93
+ const { intent } = state;
94
+ const invertedStyles = useInvertedStyles();
95
+ state.root.className = (0, _react.mergeClasses)(toastTitleClassNames.root, rootBaseClassName, state.backgroundAppearance === 'inverted' && invertedStyles.root, state.root.className);
96
+ if (state.media) {
97
+ state.media.className = (0, _react.mergeClasses)(toastTitleClassNames.media, mediaBaseClassName, state.backgroundAppearance === 'inverted' && invertedStyles.media, intent && intentIconStyles[intent], intent && state.backgroundAppearance === 'inverted' && intentIconStylesInverted[intent], state.media.className);
98
+ }
99
+ if (state.action) {
100
+ state.action.className = (0, _react.mergeClasses)(toastTitleClassNames.action, actionBaseClassName, state.backgroundAppearance === 'inverted' && invertedStyles.action, state.action.className);
101
+ }
102
+ return state;
103
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/ToastTitle/useToastTitleStyles.styles.ts"],"sourcesContent":["import { makeStyles, makeResetStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { ToastTitleSlots, ToastTitleState } from './ToastTitle.types';\n\nexport const toastTitleClassNames: SlotClassNames<ToastTitleSlots> = {\n root: 'fui-ToastTitle',\n media: 'fui-ToastTitle__media',\n action: 'fui-ToastTitle__action',\n};\n\nconst useRootBaseClassName = makeResetStyles({\n display: 'flex',\n gridColumnEnd: 3,\n color: tokens.colorNeutralForeground1,\n wordBreak: 'break-word',\n});\n\nconst useMediaBaseClassName = makeResetStyles({\n display: 'flex',\n paddingTop: '2px',\n gridColumnEnd: 2,\n paddingRight: '8px',\n fontSize: '16px',\n color: tokens.colorNeutralForeground1,\n});\n\nconst useActionBaseClassName = makeResetStyles({\n display: 'flex',\n alignItems: 'start',\n paddingLeft: '12px',\n gridColumnEnd: -1,\n color: tokens.colorBrandForeground1,\n});\n\nconst useInvertedStyles = makeStyles({\n root: {\n color: tokens.colorNeutralForegroundInverted2,\n },\n\n action: {\n color: tokens.colorBrandForegroundInverted,\n },\n\n media: {\n color: tokens.colorNeutralForegroundInverted,\n },\n});\n\nconst useIntentIconStyles = makeStyles({\n success: {\n color: tokens.colorStatusSuccessForeground1,\n },\n error: {\n color: tokens.colorStatusDangerForeground1,\n },\n warning: {\n color: tokens.colorStatusWarningForeground1,\n },\n info: {\n color: tokens.colorNeutralForeground2,\n },\n});\n\nconst useIntentIconStylesInverted = makeStyles({\n success: {\n color: tokens.colorStatusSuccessForegroundInverted,\n },\n error: {\n color: tokens.colorStatusDangerForegroundInverted,\n },\n warning: {\n color: tokens.colorStatusWarningForegroundInverted,\n },\n info: {\n color: tokens.colorNeutralForegroundInverted2,\n },\n});\n\n/**\n * Apply styling to the ToastTitle slots based on the state\n */\nexport const useToastTitleStyles_unstable = (state: ToastTitleState): ToastTitleState => {\n 'use no memo';\n\n const rootBaseClassName = useRootBaseClassName();\n const actionBaseClassName = useActionBaseClassName();\n const mediaBaseClassName = useMediaBaseClassName();\n const intentIconStyles = useIntentIconStyles();\n const intentIconStylesInverted = useIntentIconStylesInverted();\n const { intent } = state;\n const invertedStyles = useInvertedStyles();\n state.root.className = mergeClasses(\n toastTitleClassNames.root,\n rootBaseClassName,\n state.backgroundAppearance === 'inverted' && invertedStyles.root,\n state.root.className,\n );\n\n if (state.media) {\n state.media.className = mergeClasses(\n toastTitleClassNames.media,\n mediaBaseClassName,\n state.backgroundAppearance === 'inverted' && invertedStyles.media,\n intent && intentIconStyles[intent],\n intent && state.backgroundAppearance === 'inverted' && intentIconStylesInverted[intent],\n state.media.className,\n );\n }\n\n if (state.action) {\n state.action.className = mergeClasses(\n toastTitleClassNames.action,\n actionBaseClassName,\n state.backgroundAppearance === 'inverted' && invertedStyles.action,\n state.action.className,\n );\n }\n\n return state;\n};\n"],"names":["toastTitleClassNames","useToastTitleStyles_unstable","root","media","action","useRootBaseClassName","makeResetStyles","display","gridColumnEnd","color","tokens","colorNeutralForeground1","wordBreak","useMediaBaseClassName","paddingTop","paddingRight","fontSize","useActionBaseClassName","alignItems","paddingLeft","colorBrandForeground1","useInvertedStyles","makeStyles","colorNeutralForegroundInverted2","colorBrandForegroundInverted","colorNeutralForegroundInverted","useIntentIconStyles","success","colorStatusSuccessForeground1","error","colorStatusDangerForeground1","warning","colorStatusWarningForeground1","info","colorNeutralForeground2","useIntentIconStylesInverted","colorStatusSuccessForegroundInverted","colorStatusDangerForegroundInverted","colorStatusWarningForegroundInverted","state","rootBaseClassName","actionBaseClassName","mediaBaseClassName","intentIconStyles","intentIconStylesInverted","intent","invertedStyles","className","mergeClasses","backgroundAppearance"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ toasterClassNames: function() {
13
+ return toasterClassNames;
14
+ },
15
+ useToasterStyles_unstable: function() {
16
+ return useToasterStyles_unstable;
17
+ }
18
+ });
19
+ const _react = require("@griffel/react");
20
+ const _index = require("../../state/index");
21
+ const toasterClassNames = {
22
+ root: 'fui-Toaster'
23
+ };
24
+ /**
25
+ * Styles for the root slot
26
+ */ const useRootBaseClassName = (0, _react.makeResetStyles)({
27
+ position: 'fixed',
28
+ width: '292px',
29
+ pointerEvents: 'none'
30
+ });
31
+ const useToasterStyles = (0, _react.makeStyles)({
32
+ inline: {
33
+ position: 'absolute'
34
+ }
35
+ });
36
+ const useToasterStyles_unstable = (state)=>{
37
+ 'use no memo';
38
+ const rootBaseClassName = useRootBaseClassName();
39
+ const styles = useToasterStyles();
40
+ const className = (0, _react.mergeClasses)(toasterClassNames.root, rootBaseClassName, state.inline && styles.inline, state.root.className);
41
+ if (state.bottomStart) {
42
+ var _state_bottomStart;
43
+ state.bottomStart.className = className;
44
+ var _style;
45
+ (_style = (_state_bottomStart = state.bottomStart).style) !== null && _style !== void 0 ? _style : _state_bottomStart.style = {};
46
+ Object.assign(state.bottomStart.style, (0, _index.getPositionStyles)(_index.TOAST_POSITIONS.bottomStart, state.dir, state.offset));
47
+ }
48
+ if (state.bottomEnd) {
49
+ var _state_bottomEnd;
50
+ state.bottomEnd.className = className;
51
+ var _style1;
52
+ (_style1 = (_state_bottomEnd = state.bottomEnd).style) !== null && _style1 !== void 0 ? _style1 : _state_bottomEnd.style = {};
53
+ Object.assign(state.bottomEnd.style, (0, _index.getPositionStyles)(_index.TOAST_POSITIONS.bottomEnd, state.dir, state.offset));
54
+ }
55
+ if (state.topStart) {
56
+ var _state_topStart;
57
+ state.topStart.className = className;
58
+ var _style2;
59
+ (_style2 = (_state_topStart = state.topStart).style) !== null && _style2 !== void 0 ? _style2 : _state_topStart.style = {};
60
+ Object.assign(state.topStart.style, (0, _index.getPositionStyles)(_index.TOAST_POSITIONS.topStart, state.dir, state.offset));
61
+ }
62
+ if (state.topEnd) {
63
+ var _state_topEnd;
64
+ state.topEnd.className = className;
65
+ var _style3;
66
+ (_style3 = (_state_topEnd = state.topEnd).style) !== null && _style3 !== void 0 ? _style3 : _state_topEnd.style = {};
67
+ Object.assign(state.topEnd.style, (0, _index.getPositionStyles)(_index.TOAST_POSITIONS.topEnd, state.dir, state.offset));
68
+ }
69
+ if (state.top) {
70
+ var _state_top;
71
+ state.top.className = className;
72
+ var _style4;
73
+ (_style4 = (_state_top = state.top).style) !== null && _style4 !== void 0 ? _style4 : _state_top.style = {};
74
+ Object.assign(state.top.style, (0, _index.getPositionStyles)(_index.TOAST_POSITIONS.top, state.dir, state.offset));
75
+ }
76
+ if (state.bottom) {
77
+ var _state_bottom;
78
+ state.bottom.className = className;
79
+ var _style5;
80
+ (_style5 = (_state_bottom = state.bottom).style) !== null && _style5 !== void 0 ? _style5 : _state_bottom.style = {};
81
+ Object.assign(state.bottom.style, (0, _index.getPositionStyles)(_index.TOAST_POSITIONS.bottom, state.dir, state.offset));
82
+ }
83
+ return state;
84
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/Toaster/useToasterStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport type { ToasterSlots, ToasterState } from './Toaster.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { TOAST_POSITIONS, getPositionStyles } from '../../state/index';\n\nexport const toasterClassNames: SlotClassNames<ToasterSlots> = {\n root: 'fui-Toaster',\n};\n\n/**\n * Styles for the root slot\n */\nconst useRootBaseClassName = makeResetStyles({\n position: 'fixed',\n width: '292px',\n pointerEvents: 'none',\n});\n\nconst useToasterStyles = makeStyles({\n inline: {\n position: 'absolute',\n },\n});\n\n/**\n * Apply styling to the Toaster slots based on the state\n */\nexport const useToasterStyles_unstable = (state: ToasterState): ToasterState => {\n 'use no memo';\n\n const rootBaseClassName = useRootBaseClassName();\n const styles = useToasterStyles();\n const className = mergeClasses(\n toasterClassNames.root,\n rootBaseClassName,\n state.inline && styles.inline,\n state.root.className,\n );\n if (state.bottomStart) {\n state.bottomStart.className = className;\n state.bottomStart.style ??= {};\n Object.assign(state.bottomStart.style, getPositionStyles(TOAST_POSITIONS.bottomStart, state.dir, state.offset));\n }\n\n if (state.bottomEnd) {\n state.bottomEnd.className = className;\n state.bottomEnd.style ??= {};\n Object.assign(state.bottomEnd.style, getPositionStyles(TOAST_POSITIONS.bottomEnd, state.dir, state.offset));\n }\n\n if (state.topStart) {\n state.topStart.className = className;\n state.topStart.style ??= {};\n Object.assign(state.topStart.style, getPositionStyles(TOAST_POSITIONS.topStart, state.dir, state.offset));\n }\n\n if (state.topEnd) {\n state.topEnd.className = className;\n state.topEnd.style ??= {};\n Object.assign(state.topEnd.style, getPositionStyles(TOAST_POSITIONS.topEnd, state.dir, state.offset));\n }\n\n if (state.top) {\n state.top.className = className;\n state.top.style ??= {};\n Object.assign(state.top.style, getPositionStyles(TOAST_POSITIONS.top, state.dir, state.offset));\n }\n\n if (state.bottom) {\n state.bottom.className = className;\n state.bottom.style ??= {};\n Object.assign(state.bottom.style, getPositionStyles(TOAST_POSITIONS.bottom, state.dir, state.offset));\n }\n\n return state;\n};\n"],"names":["toasterClassNames","useToasterStyles_unstable","root","useRootBaseClassName","makeResetStyles","position","width","pointerEvents","useToasterStyles","makeStyles","inline","state","rootBaseClassName","styles","className","mergeClasses","bottomStart","style","Object","assign","getPositionStyles","TOAST_POSITIONS","dir","offset","bottomEnd","topStart","topEnd","top","bottom"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAKaA,iBAAAA;eAAAA;;IAsBAC,yBAAAA;eAAAA;;;uBA3B6C;uBAGP;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,gBAAAA,MAAMiB,MAAM,AAANA,EAAOX,KAAAA,MAAAA,QAAAA,YAAAA,KAAAA,IAAAA,UAAbN,cAAaM,KAAAA,GAAU,CAAC;QACxBC,OAAOC,MAAM,CAACR,MAAMiB,MAAM,CAACX,KAAK,EAAEG,IAAAA,wBAAAA,EAAkBC,sBAAAA,CAAgBO,MAAM,EAAEjB,MAAMW,GAAG,EAAEX,MAAMY,MAAM;IACrG;IAEA,OAAOZ;AACT"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-toast",
3
- "version": "9.5.5",
3
+ "version": "9.6.0",
4
4
  "description": "Toast component for Fluent UI",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -21,14 +21,14 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@fluentui/keyboard-keys": "^9.0.8",
24
- "@fluentui/react-aria": "^9.15.3",
24
+ "@fluentui/react-aria": "^9.15.4",
25
25
  "@fluentui/react-icons": "^2.0.245",
26
26
  "@fluentui/react-jsx-runtime": "^9.1.2",
27
27
  "@fluentui/react-motion": "^9.9.0",
28
28
  "@fluentui/react-motion-components-preview": "^0.7.0",
29
- "@fluentui/react-portal": "^9.6.4",
29
+ "@fluentui/react-portal": "^9.7.0",
30
30
  "@fluentui/react-shared-contexts": "^9.24.0",
31
- "@fluentui/react-tabster": "^9.25.3",
31
+ "@fluentui/react-tabster": "^9.26.0",
32
32
  "@fluentui/react-theme": "^9.1.24",
33
33
  "@fluentui/react-utilities": "^9.22.0",
34
34
  "@griffel/react": "^1.5.22",