@fluentui/react-toast 9.1.6 → 9.2.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.
Files changed (212) hide show
  1. package/CHANGELOG.json +115 -1
  2. package/CHANGELOG.md +34 -2
  3. package/dist/index.d.ts +3 -2
  4. package/lib/components/AriaLive/AriaLive.js.map +1 -1
  5. package/lib/components/AriaLive/renderAriaLive.js +7 -2
  6. package/lib/components/AriaLive/renderAriaLive.js.map +1 -1
  7. package/lib/components/AriaLive/useAriaLive.js +6 -4
  8. package/lib/components/AriaLive/useAriaLive.js.map +1 -1
  9. package/lib/components/Timer/Timer.js +1 -1
  10. package/lib/components/Timer/Timer.js.map +1 -1
  11. package/lib/components/Toast/Toast.js.map +1 -1
  12. package/lib/components/Toast/renderToast.js +5 -4
  13. package/lib/components/Toast/renderToast.js.map +1 -1
  14. package/lib/components/Toast/useToast.js.map +1 -1
  15. package/lib/components/Toast/useToastContextValues.js +1 -1
  16. package/lib/components/Toast/useToastContextValues.js.map +1 -1
  17. package/lib/components/ToastBody/ToastBody.js.map +1 -1
  18. package/lib/components/ToastBody/renderToastBody.js +7 -2
  19. package/lib/components/ToastBody/renderToastBody.js.map +1 -1
  20. package/lib/components/ToastBody/useToastBody.js +1 -1
  21. package/lib/components/ToastBody/useToastBody.js.map +1 -1
  22. package/lib/components/ToastContainer/ToastContainer.js.map +1 -1
  23. package/lib/components/ToastContainer/renderToastContainer.js +12 -7
  24. package/lib/components/ToastContainer/renderToastContainer.js.map +1 -1
  25. package/lib/components/ToastContainer/useToastContainer.js +15 -15
  26. package/lib/components/ToastContainer/useToastContainer.js.map +1 -1
  27. package/lib/components/ToastContainer/useToastContainerContextValues.js +1 -1
  28. package/lib/components/ToastContainer/useToastContainerContextValues.js.map +1 -1
  29. package/lib/components/ToastFooter/ToastFooter.js.map +1 -1
  30. package/lib/components/ToastFooter/renderToastFooter.js +2 -2
  31. package/lib/components/ToastFooter/renderToastFooter.js.map +1 -1
  32. package/lib/components/ToastFooter/useToastFooter.js.map +1 -1
  33. package/lib/components/ToastTitle/ToastTitle.js.map +1 -1
  34. package/lib/components/ToastTitle/renderToastTitle.js +8 -2
  35. package/lib/components/ToastTitle/renderToastTitle.js.map +1 -1
  36. package/lib/components/ToastTitle/useToastTitle.js +1 -1
  37. package/lib/components/ToastTitle/useToastTitle.js.map +1 -1
  38. package/lib/components/ToastTitle/useToastTitleStyles.styles.js.map +1 -1
  39. package/lib/components/ToastTrigger/ToastTrigger.js.map +1 -1
  40. package/lib/components/ToastTrigger/useToastTrigger.js +8 -7
  41. package/lib/components/ToastTrigger/useToastTrigger.js.map +1 -1
  42. package/lib/components/Toaster/Toaster.js.map +1 -1
  43. package/lib/components/Toaster/Toaster.types.js.map +1 -1
  44. package/lib/components/Toaster/renderToaster.js +18 -5
  45. package/lib/components/Toaster/renderToaster.js.map +1 -1
  46. package/lib/components/Toaster/useToastAnnounce.js.map +1 -1
  47. package/lib/components/Toaster/useToaster.js +7 -6
  48. package/lib/components/Toaster/useToaster.js.map +1 -1
  49. package/lib/components/Toaster/useToasterFocusManagement.js +2 -2
  50. package/lib/components/Toaster/useToasterFocusManagement.js.map +1 -1
  51. package/lib/contexts/toastContainerContext.js.map +1 -1
  52. package/lib/state/useToastController.js +3 -2
  53. package/lib/state/useToastController.js.map +1 -1
  54. package/lib/state/useToaster.js +15 -11
  55. package/lib/state/useToaster.js.map +1 -1
  56. package/lib/state/vanilla/createToaster.js +7 -7
  57. package/lib/state/vanilla/createToaster.js.map +1 -1
  58. package/lib/state/vanilla/dismissAllToasts.js.map +1 -1
  59. package/lib/state/vanilla/dismissToast.js.map +1 -1
  60. package/lib/state/vanilla/dispatchToast.js.map +1 -1
  61. package/lib/state/vanilla/getPositionStyles.js +1 -1
  62. package/lib/state/vanilla/getPositionStyles.js.map +1 -1
  63. package/lib/state/vanilla/pauseToast.js.map +1 -1
  64. package/lib/state/vanilla/playToast.js.map +1 -1
  65. package/lib/state/vanilla/updateToast.js.map +1 -1
  66. package/lib-commonjs/AriaLive.js +2 -2
  67. package/lib-commonjs/AriaLive.js.map +1 -1
  68. package/lib-commonjs/Toast.js +2 -2
  69. package/lib-commonjs/Toast.js.map +1 -1
  70. package/lib-commonjs/ToastBody.js +2 -2
  71. package/lib-commonjs/ToastBody.js.map +1 -1
  72. package/lib-commonjs/ToastContainer.js +2 -2
  73. package/lib-commonjs/ToastContainer.js.map +1 -1
  74. package/lib-commonjs/ToastFooter.js +2 -2
  75. package/lib-commonjs/ToastFooter.js.map +1 -1
  76. package/lib-commonjs/ToastTitle.js +2 -2
  77. package/lib-commonjs/ToastTitle.js.map +1 -1
  78. package/lib-commonjs/ToastTrigger.js +2 -2
  79. package/lib-commonjs/ToastTrigger.js.map +1 -1
  80. package/lib-commonjs/Toaster.js +2 -2
  81. package/lib-commonjs/Toaster.js.map +1 -1
  82. package/lib-commonjs/components/AriaLive/AriaLive.js +7 -5
  83. package/lib-commonjs/components/AriaLive/AriaLive.js.map +1 -1
  84. package/lib-commonjs/components/AriaLive/AriaLive.types.js +2 -2
  85. package/lib-commonjs/components/AriaLive/AriaLive.types.js.map +1 -1
  86. package/lib-commonjs/components/AriaLive/index.js +6 -6
  87. package/lib-commonjs/components/AriaLive/index.js.map +1 -1
  88. package/lib-commonjs/components/AriaLive/renderAriaLive.js +13 -6
  89. package/lib-commonjs/components/AriaLive/renderAriaLive.js.map +1 -1
  90. package/lib-commonjs/components/AriaLive/useAriaLive.js +16 -12
  91. package/lib-commonjs/components/AriaLive/useAriaLive.js.map +1 -1
  92. package/lib-commonjs/components/AriaLive/useAriaLiveStyles.styles.js +7 -3
  93. package/lib-commonjs/components/AriaLive/useAriaLiveStyles.styles.js.map +1 -1
  94. package/lib-commonjs/components/Timer/Timer.js +8 -6
  95. package/lib-commonjs/components/Timer/Timer.js.map +1 -1
  96. package/lib-commonjs/components/Timer/index.js +2 -2
  97. package/lib-commonjs/components/Timer/index.js.map +1 -1
  98. package/lib-commonjs/components/Timer/useTimerStyles.styles.js +4 -2
  99. package/lib-commonjs/components/Timer/useTimerStyles.styles.js.map +1 -1
  100. package/lib-commonjs/components/Toast/Toast.js +7 -5
  101. package/lib-commonjs/components/Toast/Toast.js.map +1 -1
  102. package/lib-commonjs/components/Toast/index.js +6 -6
  103. package/lib-commonjs/components/Toast/index.js.map +1 -1
  104. package/lib-commonjs/components/Toast/renderToast.js +12 -9
  105. package/lib-commonjs/components/Toast/renderToast.js.map +1 -1
  106. package/lib-commonjs/components/Toast/useToast.js +7 -5
  107. package/lib-commonjs/components/Toast/useToast.js.map +1 -1
  108. package/lib-commonjs/components/Toast/useToastContextValues.js +4 -2
  109. package/lib-commonjs/components/Toast/useToastContextValues.js.map +1 -1
  110. package/lib-commonjs/components/Toast/useToastStyles.styles.js +8 -4
  111. package/lib-commonjs/components/Toast/useToastStyles.styles.js.map +1 -1
  112. package/lib-commonjs/components/ToastBody/ToastBody.js +7 -5
  113. package/lib-commonjs/components/ToastBody/ToastBody.js.map +1 -1
  114. package/lib-commonjs/components/ToastBody/index.js +6 -6
  115. package/lib-commonjs/components/ToastBody/index.js.map +1 -1
  116. package/lib-commonjs/components/ToastBody/renderToastBody.js +13 -6
  117. package/lib-commonjs/components/ToastBody/renderToastBody.js.map +1 -1
  118. package/lib-commonjs/components/ToastBody/useToastBody.js +11 -9
  119. package/lib-commonjs/components/ToastBody/useToastBody.js.map +1 -1
  120. package/lib-commonjs/components/ToastBody/useToastBodyStyles.styles.js +9 -5
  121. package/lib-commonjs/components/ToastBody/useToastBodyStyles.styles.js.map +1 -1
  122. package/lib-commonjs/components/ToastContainer/ToastContainer.js +7 -5
  123. package/lib-commonjs/components/ToastContainer/ToastContainer.js.map +1 -1
  124. package/lib-commonjs/components/ToastContainer/ToastContainer.types.js +2 -2
  125. package/lib-commonjs/components/ToastContainer/ToastContainer.types.js.map +1 -1
  126. package/lib-commonjs/components/ToastContainer/index.js +7 -7
  127. package/lib-commonjs/components/ToastContainer/index.js.map +1 -1
  128. package/lib-commonjs/components/ToastContainer/renderToastContainer.js +19 -12
  129. package/lib-commonjs/components/ToastContainer/renderToastContainer.js.map +1 -1
  130. package/lib-commonjs/components/ToastContainer/useToastContainer.js +42 -40
  131. package/lib-commonjs/components/ToastContainer/useToastContainer.js.map +1 -1
  132. package/lib-commonjs/components/ToastContainer/useToastContainerContextValues.js +6 -4
  133. package/lib-commonjs/components/ToastContainer/useToastContainerContextValues.js.map +1 -1
  134. package/lib-commonjs/components/ToastContainer/useToastContainerStyles.styles.js +8 -4
  135. package/lib-commonjs/components/ToastContainer/useToastContainerStyles.styles.js.map +1 -1
  136. package/lib-commonjs/components/ToastFooter/ToastFooter.js +7 -5
  137. package/lib-commonjs/components/ToastFooter/ToastFooter.js.map +1 -1
  138. package/lib-commonjs/components/ToastFooter/index.js +6 -6
  139. package/lib-commonjs/components/ToastFooter/index.js.map +1 -1
  140. package/lib-commonjs/components/ToastFooter/renderToastFooter.js +8 -6
  141. package/lib-commonjs/components/ToastFooter/renderToastFooter.js.map +1 -1
  142. package/lib-commonjs/components/ToastFooter/useToastFooter.js +7 -5
  143. package/lib-commonjs/components/ToastFooter/useToastFooter.js.map +1 -1
  144. package/lib-commonjs/components/ToastFooter/useToastFooterStyles.styles.js +7 -3
  145. package/lib-commonjs/components/ToastFooter/useToastFooterStyles.styles.js.map +1 -1
  146. package/lib-commonjs/components/ToastTitle/ToastTitle.js +7 -5
  147. package/lib-commonjs/components/ToastTitle/ToastTitle.js.map +1 -1
  148. package/lib-commonjs/components/ToastTitle/index.js +6 -6
  149. package/lib-commonjs/components/ToastTitle/index.js.map +1 -1
  150. package/lib-commonjs/components/ToastTitle/renderToastTitle.js +14 -6
  151. package/lib-commonjs/components/ToastTitle/renderToastTitle.js.map +1 -1
  152. package/lib-commonjs/components/ToastTitle/useToastTitle.js +17 -15
  153. package/lib-commonjs/components/ToastTitle/useToastTitle.js.map +1 -1
  154. package/lib-commonjs/components/ToastTitle/useToastTitleStyles.styles.js +13 -9
  155. package/lib-commonjs/components/ToastTitle/useToastTitleStyles.styles.js.map +1 -1
  156. package/lib-commonjs/components/ToastTrigger/ToastTrigger.js +5 -3
  157. package/lib-commonjs/components/ToastTrigger/ToastTrigger.js.map +1 -1
  158. package/lib-commonjs/components/ToastTrigger/ToastTrigger.types.js +2 -2
  159. package/lib-commonjs/components/ToastTrigger/ToastTrigger.types.js.map +1 -1
  160. package/lib-commonjs/components/ToastTrigger/index.js +5 -5
  161. package/lib-commonjs/components/ToastTrigger/index.js.map +1 -1
  162. package/lib-commonjs/components/ToastTrigger/renderToastTrigger.js +3 -1
  163. package/lib-commonjs/components/ToastTrigger/renderToastTrigger.js.map +1 -1
  164. package/lib-commonjs/components/ToastTrigger/useToastTrigger.js +18 -15
  165. package/lib-commonjs/components/ToastTrigger/useToastTrigger.js.map +1 -1
  166. package/lib-commonjs/components/Toaster/Toaster.js +7 -5
  167. package/lib-commonjs/components/Toaster/Toaster.js.map +1 -1
  168. package/lib-commonjs/components/Toaster/index.js +6 -6
  169. package/lib-commonjs/components/Toaster/index.js.map +1 -1
  170. package/lib-commonjs/components/Toaster/renderToaster.js +26 -11
  171. package/lib-commonjs/components/Toaster/renderToaster.js.map +1 -1
  172. package/lib-commonjs/components/Toaster/useToastAnnounce.js +8 -6
  173. package/lib-commonjs/components/Toaster/useToastAnnounce.js.map +1 -1
  174. package/lib-commonjs/components/Toaster/useToaster.js +25 -22
  175. package/lib-commonjs/components/Toaster/useToaster.js.map +1 -1
  176. package/lib-commonjs/components/Toaster/useToasterFocusManagement.js +19 -17
  177. package/lib-commonjs/components/Toaster/useToasterFocusManagement.js.map +1 -1
  178. package/lib-commonjs/components/Toaster/useToasterStyles.styles.js +7 -3
  179. package/lib-commonjs/components/Toaster/useToasterStyles.styles.js.map +1 -1
  180. package/lib-commonjs/contexts/toastContainerContext.js +8 -4
  181. package/lib-commonjs/contexts/toastContainerContext.js.map +1 -1
  182. package/lib-commonjs/index.js +93 -35
  183. package/lib-commonjs/index.js.map +1 -1
  184. package/lib-commonjs/state/constants.js +6 -2
  185. package/lib-commonjs/state/constants.js.map +1 -1
  186. package/lib-commonjs/state/index.js +10 -6
  187. package/lib-commonjs/state/index.js.map +1 -1
  188. package/lib-commonjs/state/types.js +2 -2
  189. package/lib-commonjs/state/types.js.map +1 -1
  190. package/lib-commonjs/state/useToastController.js +9 -6
  191. package/lib-commonjs/state/useToastController.js.map +1 -1
  192. package/lib-commonjs/state/useToaster.js +26 -20
  193. package/lib-commonjs/state/useToaster.js.map +1 -1
  194. package/lib-commonjs/state/vanilla/createToaster.js +14 -12
  195. package/lib-commonjs/state/vanilla/createToaster.js.map +1 -1
  196. package/lib-commonjs/state/vanilla/dismissAllToasts.js +3 -1
  197. package/lib-commonjs/state/vanilla/dismissAllToasts.js.map +1 -1
  198. package/lib-commonjs/state/vanilla/dismissToast.js +3 -1
  199. package/lib-commonjs/state/vanilla/dismissToast.js.map +1 -1
  200. package/lib-commonjs/state/vanilla/dispatchToast.js +3 -1
  201. package/lib-commonjs/state/vanilla/dispatchToast.js.map +1 -1
  202. package/lib-commonjs/state/vanilla/getPositionStyles.js +4 -2
  203. package/lib-commonjs/state/vanilla/getPositionStyles.js.map +1 -1
  204. package/lib-commonjs/state/vanilla/index.js +9 -9
  205. package/lib-commonjs/state/vanilla/index.js.map +1 -1
  206. package/lib-commonjs/state/vanilla/pauseToast.js +3 -1
  207. package/lib-commonjs/state/vanilla/pauseToast.js.map +1 -1
  208. package/lib-commonjs/state/vanilla/playToast.js +3 -1
  209. package/lib-commonjs/state/vanilla/playToast.js.map +1 -1
  210. package/lib-commonjs/state/vanilla/updateToast.js +3 -1
  211. package/lib-commonjs/state/vanilla/updateToast.js.map +1 -1
  212. package/package.json +14 -14
@@ -4,25 +4,29 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  Object.defineProperty(exports, "useAriaLive_unstable", {
6
6
  enumerable: true,
7
- get: ()=>useAriaLive_unstable
7
+ get: function() {
8
+ return useAriaLive_unstable;
9
+ }
8
10
  });
9
- const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
- const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
- const _reactUtilities = require("@fluentui/react-utilities");
11
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
+ const _reactutilities = require("@fluentui/react-utilities");
12
14
  /** The duration the message needs to be in present in DOM for screen readers to register a change and announce */ const MESSAGE_DURATION = 500;
13
15
  const useAriaLive_unstable = (props)=>{
16
+ var _currentMessage, _currentMessage1;
14
17
  const [currentMessage, setCurrentMessage] = _react.useState(undefined);
15
18
  // Can't rely on Date.now() if user invokes announce more than once in a code block
16
19
  const order = _react.useRef(0);
17
- const [messageQueue] = _react.useState(()=>(0, _reactUtilities.createPriorityQueue)((a, b)=>{
20
+ const [messageQueue] = _react.useState(()=>(0, _reactutilities.createPriorityQueue)((a, b)=>{
18
21
  if (a.politeness === b.politeness) {
19
22
  return a.createdAt - b.createdAt;
20
23
  }
21
24
  return a.politeness === 'assertive' ? -1 : 1;
22
25
  }));
23
- const announce = (0, _reactUtilities.useEventCallback)((message, options)=>{
24
- const { politeness } = options;
25
- if (message === (currentMessage === null || currentMessage === void 0 ? void 0 : currentMessage.message)) {
26
+ const announce = (0, _reactutilities.useEventCallback)((message, options)=>{
27
+ var _currentMessage;
28
+ const { politeness } = options;
29
+ if (message === ((_currentMessage = currentMessage) === null || _currentMessage === void 0 ? void 0 : _currentMessage.message)) {
26
30
  return;
27
31
  }
28
32
  const liveMessage = {
@@ -50,21 +54,21 @@ const useAriaLive_unstable = (props)=>{
50
54
  messageQueue
51
55
  ]);
52
56
  _react.useImperativeHandle(props.announceRef, ()=>announce);
53
- const politeMessage = (currentMessage === null || currentMessage === void 0 ? void 0 : currentMessage.politeness) === 'polite' ? currentMessage.message : undefined;
54
- const assertiveMessage = (currentMessage === null || currentMessage === void 0 ? void 0 : currentMessage.politeness) === 'assertive' ? currentMessage.message : undefined;
57
+ const politeMessage = ((_currentMessage = currentMessage) === null || _currentMessage === void 0 ? void 0 : _currentMessage.politeness) === 'polite' ? currentMessage.message : undefined;
58
+ const assertiveMessage = ((_currentMessage1 = currentMessage) === null || _currentMessage1 === void 0 ? void 0 : _currentMessage1.politeness) === 'assertive' ? currentMessage.message : undefined;
55
59
  return {
56
60
  components: {
57
61
  assertive: 'div',
58
62
  polite: 'div'
59
63
  },
60
- assertive: _reactUtilities.slot.always(props.assertive, {
64
+ assertive: _reactutilities.slot.always(props.assertive, {
61
65
  defaultProps: {
62
66
  'aria-live': 'assertive',
63
67
  children: assertiveMessage
64
68
  },
65
69
  elementType: 'div'
66
70
  }),
67
- polite: _reactUtilities.slot.always(props.polite, {
71
+ polite: _reactutilities.slot.always(props.polite, {
68
72
  defaultProps: {
69
73
  'aria-live': 'polite',
70
74
  children: politeMessage
@@ -1 +1 @@
1
- {"version":3,"sources":["useAriaLive.js"],"sourcesContent":["import * as React from 'react';\nimport { createPriorityQueue, useEventCallback, slot } from '@fluentui/react-utilities';\n/** The duration the message needs to be in present in DOM for screen readers to register a change and announce */ const MESSAGE_DURATION = 500;\n/**\n * Create the state required to render AriaLive.\n *\n * The returned state can be modified with hooks such as useAriaLiveStyles_unstable,\n * before being passed to renderAriaLive_unstable.\n *\n * @param props - props from this instance of AriaLive\n */ export const useAriaLive_unstable = (props)=>{\n const [currentMessage, setCurrentMessage] = React.useState(undefined);\n // Can't rely on Date.now() if user invokes announce more than once in a code block\n const order = React.useRef(0);\n const [messageQueue] = React.useState(()=>createPriorityQueue((a, b)=>{\n if (a.politeness === b.politeness) {\n return a.createdAt - b.createdAt;\n }\n return a.politeness === 'assertive' ? -1 : 1;\n }));\n const announce = useEventCallback((message, options)=>{\n const { politeness } = options;\n if (message === (currentMessage === null || currentMessage === void 0 ? void 0 : currentMessage.message)) {\n return;\n }\n const liveMessage = {\n message,\n politeness,\n createdAt: order.current++\n };\n if (!currentMessage) {\n setCurrentMessage(liveMessage);\n } else {\n messageQueue.enqueue(liveMessage);\n }\n });\n React.useEffect(()=>{\n const timeout = setTimeout(()=>{\n if (messageQueue.peek()) {\n setCurrentMessage(messageQueue.dequeue());\n } else {\n setCurrentMessage(undefined);\n }\n }, MESSAGE_DURATION);\n return ()=>clearTimeout(timeout);\n }, [\n currentMessage,\n messageQueue\n ]);\n React.useImperativeHandle(props.announceRef, ()=>announce);\n const politeMessage = (currentMessage === null || currentMessage === void 0 ? void 0 : currentMessage.politeness) === 'polite' ? currentMessage.message : undefined;\n const assertiveMessage = (currentMessage === null || currentMessage === void 0 ? void 0 : currentMessage.politeness) === 'assertive' ? currentMessage.message : undefined;\n return {\n components: {\n assertive: 'div',\n polite: 'div'\n },\n assertive: slot.always(props.assertive, {\n defaultProps: {\n 'aria-live': 'assertive',\n children: assertiveMessage\n },\n elementType: 'div'\n }),\n polite: slot.always(props.polite, {\n defaultProps: {\n 'aria-live': 'polite',\n children: politeMessage\n },\n elementType: 'div'\n })\n };\n};\n"],"names":["useAriaLive_unstable","MESSAGE_DURATION","props","currentMessage","setCurrentMessage","React","useState","undefined","order","useRef","messageQueue","createPriorityQueue","a","b","politeness","createdAt","announce","useEventCallback","message","options","liveMessage","current","enqueue","useEffect","timeout","setTimeout","peek","dequeue","clearTimeout","useImperativeHandle","announceRef","politeMessage","assertiveMessage","components","assertive","polite","slot","always","defaultProps","children","elementType"],"mappings":";;;;+BAUiBA;;aAAAA;;;6DAVM;gCACqC;AAC5D,gHAAgH,GAAG,MAAMC,mBAAmB;AAQjI,MAAMD,uBAAuB,CAACE,QAAQ;IAC7C,MAAM,CAACC,gBAAgBC,kBAAkB,GAAGC,OAAMC,QAAQ,CAACC;IAC3D,mFAAmF;IACnF,MAAMC,QAAQH,OAAMI,MAAM,CAAC;IAC3B,MAAM,CAACC,aAAa,GAAGL,OAAMC,QAAQ,CAAC,IAAIK,IAAAA,mCAAmB,EAAC,CAACC,GAAGC,IAAI;YAC9D,IAAID,EAAEE,UAAU,KAAKD,EAAEC,UAAU,EAAE;gBAC/B,OAAOF,EAAEG,SAAS,GAAGF,EAAEE,SAAS;YACpC,CAAC;YACD,OAAOH,EAAEE,UAAU,KAAK,cAAc,CAAC,IAAI,CAAC;QAChD;IACJ,MAAME,WAAWC,IAAAA,gCAAgB,EAAC,CAACC,SAASC,UAAU;QAClD,MAAM,EAAEL,WAAU,EAAG,GAAGK;QACxB,IAAID,YAAaf,CAAAA,mBAAmB,IAAI,IAAIA,mBAAmB,KAAK,IAAI,KAAK,IAAIA,eAAee,OAAO,AAAD,GAAI;YACtG;QACJ,CAAC;QACD,MAAME,cAAc;YAChBF;YACAJ;YACAC,WAAWP,MAAMa,OAAO;QAC5B;QACA,IAAI,CAAClB,gBAAgB;YACjBC,kBAAkBgB;QACtB,OAAO;YACHV,aAAaY,OAAO,CAACF;QACzB,CAAC;IACL;IACAf,OAAMkB,SAAS,CAAC,IAAI;QAChB,MAAMC,UAAUC,WAAW,IAAI;YAC3B,IAAIf,aAAagB,IAAI,IAAI;gBACrBtB,kBAAkBM,aAAaiB,OAAO;YAC1C,OAAO;gBACHvB,kBAAkBG;YACtB,CAAC;QACL,GAAGN;QACH,OAAO,IAAI2B,aAAaJ;IAC5B,GAAG;QACCrB;QACAO;KACH;IACDL,OAAMwB,mBAAmB,CAAC3B,MAAM4B,WAAW,EAAE,IAAId;IACjD,MAAMe,gBAAgB,AAAC5B,CAAAA,mBAAmB,IAAI,IAAIA,mBAAmB,KAAK,IAAI,KAAK,IAAIA,eAAeW,UAAU,AAAD,MAAO,WAAWX,eAAee,OAAO,GAAGX,SAAS;IACnK,MAAMyB,mBAAmB,AAAC7B,CAAAA,mBAAmB,IAAI,IAAIA,mBAAmB,KAAK,IAAI,KAAK,IAAIA,eAAeW,UAAU,AAAD,MAAO,cAAcX,eAAee,OAAO,GAAGX,SAAS;IACzK,OAAO;QACH0B,YAAY;YACRC,WAAW;YACXC,QAAQ;QACZ;QACAD,WAAWE,oBAAI,CAACC,MAAM,CAACnC,MAAMgC,SAAS,EAAE;YACpCI,cAAc;gBACV,aAAa;gBACbC,UAAUP;YACd;YACAQ,aAAa;QACjB;QACAL,QAAQC,oBAAI,CAACC,MAAM,CAACnC,MAAMiC,MAAM,EAAE;YAC9BG,cAAc;gBACV,aAAa;gBACbC,UAAUR;YACd;YACAS,aAAa;QACjB;IACJ;AACJ"}
1
+ {"version":3,"sources":["useAriaLive.js"],"sourcesContent":["import * as React from 'react';\nimport { createPriorityQueue, useEventCallback, slot } from '@fluentui/react-utilities';\n/** The duration the message needs to be in present in DOM for screen readers to register a change and announce */ const MESSAGE_DURATION = 500;\n/**\n * Create the state required to render AriaLive.\n *\n * The returned state can be modified with hooks such as useAriaLiveStyles_unstable,\n * before being passed to renderAriaLive_unstable.\n *\n * @param props - props from this instance of AriaLive\n */ export const useAriaLive_unstable = (props)=>{\n var _currentMessage, _currentMessage1;\n const [currentMessage, setCurrentMessage] = React.useState(undefined);\n // Can't rely on Date.now() if user invokes announce more than once in a code block\n const order = React.useRef(0);\n const [messageQueue] = React.useState(()=>createPriorityQueue((a, b)=>{\n if (a.politeness === b.politeness) {\n return a.createdAt - b.createdAt;\n }\n return a.politeness === 'assertive' ? -1 : 1;\n }));\n const announce = useEventCallback((message, options)=>{\n var _currentMessage;\n const { politeness } = options;\n if (message === ((_currentMessage = currentMessage) === null || _currentMessage === void 0 ? void 0 : _currentMessage.message)) {\n return;\n }\n const liveMessage = {\n message,\n politeness,\n createdAt: order.current++\n };\n if (!currentMessage) {\n setCurrentMessage(liveMessage);\n } else {\n messageQueue.enqueue(liveMessage);\n }\n });\n React.useEffect(()=>{\n const timeout = setTimeout(()=>{\n if (messageQueue.peek()) {\n setCurrentMessage(messageQueue.dequeue());\n } else {\n setCurrentMessage(undefined);\n }\n }, MESSAGE_DURATION);\n return ()=>clearTimeout(timeout);\n }, [\n currentMessage,\n messageQueue\n ]);\n React.useImperativeHandle(props.announceRef, ()=>announce);\n const politeMessage = ((_currentMessage = currentMessage) === null || _currentMessage === void 0 ? void 0 : _currentMessage.politeness) === 'polite' ? currentMessage.message : undefined;\n const assertiveMessage = ((_currentMessage1 = currentMessage) === null || _currentMessage1 === void 0 ? void 0 : _currentMessage1.politeness) === 'assertive' ? currentMessage.message : undefined;\n return {\n components: {\n assertive: 'div',\n polite: 'div'\n },\n assertive: slot.always(props.assertive, {\n defaultProps: {\n 'aria-live': 'assertive',\n children: assertiveMessage\n },\n elementType: 'div'\n }),\n polite: slot.always(props.polite, {\n defaultProps: {\n 'aria-live': 'polite',\n children: politeMessage\n },\n elementType: 'div'\n })\n };\n};\n"],"names":["useAriaLive_unstable","MESSAGE_DURATION","props","_currentMessage","_currentMessage1","currentMessage","setCurrentMessage","React","useState","undefined","order","useRef","messageQueue","createPriorityQueue","a","b","politeness","createdAt","announce","useEventCallback","message","options","liveMessage","current","enqueue","useEffect","timeout","setTimeout","peek","dequeue","clearTimeout","useImperativeHandle","announceRef","politeMessage","assertiveMessage","components","assertive","polite","slot","always","defaultProps","children","elementType"],"mappings":";;;;+BAUiBA;;;eAAAA;;;;iEAVM;gCACqC;AAC5D,gHAAgH,GAAG,MAAMC,mBAAmB;AAQjI,MAAMD,uBAAuB,CAACE;IACrC,IAAIC,iBAAiBC;IACrB,MAAM,CAACC,gBAAgBC,kBAAkB,GAAGC,OAAMC,QAAQ,CAACC;IAC3D,mFAAmF;IACnF,MAAMC,QAAQH,OAAMI,MAAM,CAAC;IAC3B,MAAM,CAACC,aAAa,GAAGL,OAAMC,QAAQ,CAAC,IAAIK,IAAAA,mCAAmB,EAAC,CAACC,GAAGC;YAC1D,IAAID,EAAEE,UAAU,KAAKD,EAAEC,UAAU,EAAE;gBAC/B,OAAOF,EAAEG,SAAS,GAAGF,EAAEE,SAAS;YACpC;YACA,OAAOH,EAAEE,UAAU,KAAK,cAAc,CAAC,IAAI;QAC/C;IACJ,MAAME,WAAWC,IAAAA,gCAAgB,EAAC,CAACC,SAASC;QACxC,IAAIlB;QACJ,MAAM,EAAEa,UAAU,EAAE,GAAGK;QACvB,IAAID,YAAa,CAAA,AAACjB,CAAAA,kBAAkBE,cAAa,MAAO,QAAQF,oBAAoB,KAAK,IAAI,KAAK,IAAIA,gBAAgBiB,OAAO,AAAD,GAAI;YAC5H;QACJ;QACA,MAAME,cAAc;YAChBF;YACAJ;YACAC,WAAWP,MAAMa,OAAO;QAC5B;QACA,IAAI,CAAClB,gBAAgB;YACjBC,kBAAkBgB;QACtB,OAAO;YACHV,aAAaY,OAAO,CAACF;QACzB;IACJ;IACAf,OAAMkB,SAAS,CAAC;QACZ,MAAMC,UAAUC,WAAW;YACvB,IAAIf,aAAagB,IAAI,IAAI;gBACrBtB,kBAAkBM,aAAaiB,OAAO;YAC1C,OAAO;gBACHvB,kBAAkBG;YACtB;QACJ,GAAGR;QACH,OAAO,IAAI6B,aAAaJ;IAC5B,GAAG;QACCrB;QACAO;KACH;IACDL,OAAMwB,mBAAmB,CAAC7B,MAAM8B,WAAW,EAAE,IAAId;IACjD,MAAMe,gBAAgB,AAAC,CAAA,AAAC9B,CAAAA,kBAAkBE,cAAa,MAAO,QAAQF,oBAAoB,KAAK,IAAI,KAAK,IAAIA,gBAAgBa,UAAU,AAAD,MAAO,WAAWX,eAAee,OAAO,GAAGX;IAChL,MAAMyB,mBAAmB,AAAC,CAAA,AAAC9B,CAAAA,mBAAmBC,cAAa,MAAO,QAAQD,qBAAqB,KAAK,IAAI,KAAK,IAAIA,iBAAiBY,UAAU,AAAD,MAAO,cAAcX,eAAee,OAAO,GAAGX;IACzL,OAAO;QACH0B,YAAY;YACRC,WAAW;YACXC,QAAQ;QACZ;QACAD,WAAWE,oBAAI,CAACC,MAAM,CAACrC,MAAMkC,SAAS,EAAE;YACpCI,cAAc;gBACV,aAAa;gBACbC,UAAUP;YACd;YACAQ,aAAa;QACjB;QACAL,QAAQC,oBAAI,CAACC,MAAM,CAACrC,MAAMmC,MAAM,EAAE;YAC9BG,cAAc;gBACV,aAAa;gBACbC,UAAUR;YACd;YACAS,aAAa;QACjB;IACJ;AACJ"}
@@ -9,8 +9,12 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- ariaLiveClassNames: ()=>ariaLiveClassNames,
13
- useAriaLiveStyles_unstable: ()=>useAriaLiveStyles_unstable
12
+ ariaLiveClassNames: function() {
13
+ return ariaLiveClassNames;
14
+ },
15
+ useAriaLiveStyles_unstable: function() {
16
+ return useAriaLiveStyles_unstable;
17
+ }
14
18
  });
15
19
  const _react = require("@griffel/react");
16
20
  const ariaLiveClassNames = {
@@ -19,7 +23,7 @@ const ariaLiveClassNames = {
19
23
  };
20
24
  /**
21
25
  * Styles for the root slot
22
- */ const useResetStyles = /*#__PURE__*/ (0, _react["__resetStyles"])("rsuwu0d", "r1m1grr4", [
26
+ */ const useResetStyles = /*#__PURE__*/ (0, _react.__resetStyles)("rsuwu0d", "r1m1grr4", [
23
27
  ".rsuwu0d{clip:rect(0px, 0px, 0px, 0px);height:1px;margin-top:-1px;margin-right:-1px;margin-bottom:-1px;margin-left:-1px;overflow-x:hidden;overflow-y:hidden;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;width:1px;position:absolute;}",
24
28
  ".r1m1grr4{clip:rect(0px, 0px, 0px, 0px);height:1px;margin-top:-1px;margin-left:-1px;margin-bottom:-1px;margin-right:-1px;overflow-x:hidden;overflow-y:hidden;padding-top:0px;padding-left:0px;padding-bottom:0px;padding-right:0px;width:1px;position:absolute;}"
25
29
  ]);
@@ -1 +1 @@
1
- {"version":3,"sources":["useAriaLiveStyles.styles.js"],"sourcesContent":["import { mergeClasses, shorthands, __resetStyles } from '@griffel/react';\nexport const ariaLiveClassNames = {\n assertive: 'fui-AriaLive__assertive',\n polite: 'fui-AriaLive__polite'\n};\n/**\n * Styles for the root slot\n */\nconst useResetStyles = /*#__PURE__*/__resetStyles(\"rsuwu0d\", \"r1m1grr4\", [\".rsuwu0d{clip:rect(0px, 0px, 0px, 0px);height:1px;margin-top:-1px;margin-right:-1px;margin-bottom:-1px;margin-left:-1px;overflow-x:hidden;overflow-y:hidden;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;width:1px;position:absolute;}\", \".r1m1grr4{clip:rect(0px, 0px, 0px, 0px);height:1px;margin-top:-1px;margin-left:-1px;margin-bottom:-1px;margin-right:-1px;overflow-x:hidden;overflow-y:hidden;padding-top:0px;padding-left:0px;padding-bottom:0px;padding-right:0px;width:1px;position:absolute;}\"]);\n/**\n * Apply styling to the AriaLive slots based on the state\n */\nexport const useAriaLiveStyles_unstable = state => {\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 return state;\n};\n//# sourceMappingURL=useAriaLiveStyles.styles.js.map"],"names":["ariaLiveClassNames","useAriaLiveStyles_unstable","assertive","polite","useResetStyles","__resetStyles","state","visuallyHidden","className","mergeClasses"],"mappings":";;;;;;;;;;;IACaA,kBAAkB,MAAlBA;IAWAC,0BAA0B,MAA1BA;;uBAZ2C;AACjD,MAAMD,qBAAqB;IAChCE,WAAW;IACXC,QAAQ;AACV;AACA;;CAEC,GACD,MAAMC,iBAAiB,WAAW,GAAEC,IAAAA,uBAAa,EAAC,WAAW,YAAY;IAAC;IAAmQ;CAAmQ;AAIzkB,MAAMJ,6BAA6BK,CAAAA,QAAS;IACjD,MAAMC,iBAAiBH;IACvBE,MAAMJ,SAAS,CAACM,SAAS,GAAGC,IAAAA,mBAAY,EAACF,gBAAgBP,mBAAmBE,SAAS,EAAEI,MAAMJ,SAAS,CAACM,SAAS;IAChHF,MAAMH,MAAM,CAACK,SAAS,GAAGC,IAAAA,mBAAY,EAACF,gBAAgBP,mBAAmBG,MAAM,EAAEG,MAAMH,MAAM,CAACK,SAAS;IACvG,OAAOF;AACT,GACA,oDAAoD"}
1
+ {"version":3,"sources":["useAriaLiveStyles.styles.js"],"sourcesContent":["import { mergeClasses, shorthands, __resetStyles } from '@griffel/react';\nexport const ariaLiveClassNames = {\n assertive: 'fui-AriaLive__assertive',\n polite: 'fui-AriaLive__polite'\n};\n/**\n * Styles for the root slot\n */\nconst useResetStyles = /*#__PURE__*/__resetStyles(\"rsuwu0d\", \"r1m1grr4\", [\".rsuwu0d{clip:rect(0px, 0px, 0px, 0px);height:1px;margin-top:-1px;margin-right:-1px;margin-bottom:-1px;margin-left:-1px;overflow-x:hidden;overflow-y:hidden;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;width:1px;position:absolute;}\", \".r1m1grr4{clip:rect(0px, 0px, 0px, 0px);height:1px;margin-top:-1px;margin-left:-1px;margin-bottom:-1px;margin-right:-1px;overflow-x:hidden;overflow-y:hidden;padding-top:0px;padding-left:0px;padding-bottom:0px;padding-right:0px;width:1px;position:absolute;}\"]);\n/**\n * Apply styling to the AriaLive slots based on the state\n */\nexport const useAriaLiveStyles_unstable = state => {\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 return state;\n};\n//# sourceMappingURL=useAriaLiveStyles.styles.js.map"],"names":["ariaLiveClassNames","useAriaLiveStyles_unstable","assertive","polite","useResetStyles","__resetStyles","state","visuallyHidden","className","mergeClasses"],"mappings":";;;;;;;;;;;IACaA,kBAAkB;eAAlBA;;IAWAC,0BAA0B;eAA1BA;;;uBAZ2C;AACjD,MAAMD,qBAAqB;IAChCE,WAAW;IACXC,QAAQ;AACV;AACA;;CAEC,GACD,MAAMC,iBAAiB,WAAW,GAAEC,IAAAA,oBAAa,EAAC,WAAW,YAAY;IAAC;IAAmQ;CAAmQ;AAIzkB,MAAMJ,6BAA6BK,CAAAA;IACxC,MAAMC,iBAAiBH;IACvBE,MAAMJ,SAAS,CAACM,SAAS,GAAGC,IAAAA,mBAAY,EAACF,gBAAgBP,mBAAmBE,SAAS,EAAEI,MAAMJ,SAAS,CAACM,SAAS;IAChHF,MAAMH,MAAM,CAACK,SAAS,GAAGC,IAAAA,mBAAY,EAACF,gBAAgBP,mBAAmBG,MAAM,EAAEG,MAAMH,MAAM,CAACK,SAAS;IACvG,OAAOF;AACT,GACA,oDAAoD"}
@@ -4,14 +4,16 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  Object.defineProperty(exports, "Timer", {
6
6
  enumerable: true,
7
- get: ()=>Timer
7
+ get: function() {
8
+ return Timer;
9
+ }
8
10
  });
9
- const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
- const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
- const _useTimerStylesStyles = require("./useTimerStyles.styles");
11
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
+ const _useTimerStylesstyles = require("./useTimerStyles.styles");
12
14
  const Timer = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
13
- const baseAnimationStyles = (0, _useTimerStylesStyles.useBaseAnimationStyles)();
14
- const { running , timeout , onTimeout } = props;
15
+ const baseAnimationStyles = (0, _useTimerStylesstyles.useBaseAnimationStyles)();
16
+ const { running, timeout, onTimeout } = props;
15
17
  const style = {
16
18
  animationDuration: `${timeout}ms`,
17
19
  animationPlayState: running ? 'running' : 'paused'
@@ -1 +1 @@
1
- {"version":3,"sources":["Timer.js"],"sourcesContent":["import * as React from 'react';\nimport { useBaseAnimationStyles } from './useTimerStyles.styles';\nexport const Timer = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const baseAnimationStyles = useBaseAnimationStyles();\n const { running , timeout , onTimeout } = props;\n const style = {\n animationDuration: `${timeout}ms`,\n animationPlayState: running ? 'running' : 'paused'\n };\n if (timeout < 0) {\n return null;\n }\n return /*#__PURE__*/ React.createElement(\"span\", {\n onAnimationEnd: onTimeout,\n \"data-timer-status\": style.animationPlayState,\n ref: ref,\n style: style,\n className: baseAnimationStyles\n });\n});\nTimer.displayName = 'Timer';\n"],"names":["Timer","React","forwardRef","props","ref","baseAnimationStyles","useBaseAnimationStyles","running","timeout","onTimeout","style","animationDuration","animationPlayState","createElement","onAnimationEnd","className","displayName"],"mappings":";;;;+BAEaA;;aAAAA;;;6DAFU;sCACgB;AAChC,MAAMA,QAAQ,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAM;IAC9D,MAAMC,sBAAsBC,IAAAA,4CAAsB;IAClD,MAAM,EAAEC,QAAO,EAAGC,QAAO,EAAGC,UAAS,EAAG,GAAGN;IAC3C,MAAMO,QAAQ;QACVC,mBAAmB,CAAC,EAAEH,QAAQ,EAAE,CAAC;QACjCI,oBAAoBL,UAAU,YAAY,QAAQ;IACtD;IACA,IAAIC,UAAU,GAAG;QACb,OAAO,IAAI;IACf,CAAC;IACD,OAAO,WAAW,GAAGP,OAAMY,aAAa,CAAC,QAAQ;QAC7CC,gBAAgBL;QAChB,qBAAqBC,MAAME,kBAAkB;QAC7CR,KAAKA;QACLM,OAAOA;QACPK,WAAWV;IACf;AACJ;AACAL,MAAMgB,WAAW,GAAG"}
1
+ {"version":3,"sources":["Timer.js"],"sourcesContent":["import * as React from 'react';\nimport { useBaseAnimationStyles } from './useTimerStyles.styles';\nexport const Timer = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const baseAnimationStyles = useBaseAnimationStyles();\n const { running, timeout, onTimeout } = props;\n const style = {\n animationDuration: `${timeout}ms`,\n animationPlayState: running ? 'running' : 'paused'\n };\n if (timeout < 0) {\n return null;\n }\n return /*#__PURE__*/ React.createElement(\"span\", {\n onAnimationEnd: onTimeout,\n \"data-timer-status\": style.animationPlayState,\n ref: ref,\n style: style,\n className: baseAnimationStyles\n });\n});\nTimer.displayName = 'Timer';\n"],"names":["Timer","React","forwardRef","props","ref","baseAnimationStyles","useBaseAnimationStyles","running","timeout","onTimeout","style","animationDuration","animationPlayState","createElement","onAnimationEnd","className","displayName"],"mappings":";;;;+BAEaA;;;eAAAA;;;;iEAFU;sCACgB;AAChC,MAAMA,QAAQ,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACxD,MAAMC,sBAAsBC,IAAAA,4CAAsB;IAClD,MAAM,EAAEC,OAAO,EAAEC,OAAO,EAAEC,SAAS,EAAE,GAAGN;IACxC,MAAMO,QAAQ;QACVC,mBAAmB,CAAC,EAAEH,QAAQ,EAAE,CAAC;QACjCI,oBAAoBL,UAAU,YAAY;IAC9C;IACA,IAAIC,UAAU,GAAG;QACb,OAAO;IACX;IACA,OAAO,WAAW,GAAGP,OAAMY,aAAa,CAAC,QAAQ;QAC7CC,gBAAgBL;QAChB,qBAAqBC,MAAME,kBAAkB;QAC7CR,KAAKA;QACLM,OAAOA;QACPK,WAAWV;IACf;AACJ;AACAL,MAAMgB,WAAW,GAAG"}
@@ -2,5 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
- _exportStar(require("./Timer"), exports);
5
+ const _export_star = require("@swc/helpers/_/_export_star");
6
+ _export_star._(require("./Timer"), exports);
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export * from './Timer';\n"],"names":[],"mappings":";;;;;oBAAc"}
1
+ {"version":3,"sources":["index.js"],"sourcesContent":["export * from './Timer';\n"],"names":[],"mappings":";;;;;uBAAc"}
@@ -4,10 +4,12 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  Object.defineProperty(exports, "useBaseAnimationStyles", {
6
6
  enumerable: true,
7
- get: ()=>useBaseAnimationStyles
7
+ get: function() {
8
+ return useBaseAnimationStyles;
9
+ }
8
10
  });
9
11
  const _react = require("@griffel/react");
10
- const useBaseAnimationStyles = /*#__PURE__*/ (0, _react["__resetStyles"])("r16zaflb", "r75casi", [
12
+ const useBaseAnimationStyles = /*#__PURE__*/ (0, _react.__resetStyles)("r16zaflb", "r75casi", [
11
13
  ".r16zaflb{animation-name:rsacmq1;}",
12
14
  "@keyframes rsacmq1{from{opacity:0;}to{opacity:0;}}",
13
15
  ".r75casi{animation-name:rsacmq1;}"
@@ -1 +1 @@
1
- {"version":3,"sources":["useTimerStyles.styles.js"],"sourcesContent":["import { __resetStyles } from '@griffel/react';\nexport const useBaseAnimationStyles = /*#__PURE__*/__resetStyles(\"r16zaflb\", \"r75casi\", [\".r16zaflb{animation-name:rsacmq1;}\", \"@keyframes rsacmq1{from{opacity:0;}to{opacity:0;}}\", \".r75casi{animation-name:rsacmq1;}\"]);\n//# sourceMappingURL=useTimerStyles.styles.js.map"],"names":["useBaseAnimationStyles","__resetStyles"],"mappings":";;;;+BACaA;;aAAAA;;uBADiB;AACvB,MAAMA,yBAAyB,WAAW,GAAEC,IAAAA,uBAAa,EAAC,YAAY,WAAW;IAAC;IAAsC;IAAsD;CAAoC,GACzN,iDAAiD"}
1
+ {"version":3,"sources":["useTimerStyles.styles.js"],"sourcesContent":["import { __resetStyles } from '@griffel/react';\nexport const useBaseAnimationStyles = /*#__PURE__*/__resetStyles(\"r16zaflb\", \"r75casi\", [\".r16zaflb{animation-name:rsacmq1;}\", \"@keyframes rsacmq1{from{opacity:0;}to{opacity:0;}}\", \".r75casi{animation-name:rsacmq1;}\"]);\n//# sourceMappingURL=useTimerStyles.styles.js.map"],"names":["useBaseAnimationStyles","__resetStyles"],"mappings":";;;;+BACaA;;;eAAAA;;;uBADiB;AACvB,MAAMA,yBAAyB,WAAW,GAAEC,IAAAA,oBAAa,EAAC,YAAY,WAAW;IAAC;IAAsC;IAAsD;CAAoC,GACzN,iDAAiD"}
@@ -4,17 +4,19 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  Object.defineProperty(exports, "Toast", {
6
6
  enumerable: true,
7
- get: ()=>Toast
7
+ get: function() {
8
+ return Toast;
9
+ }
8
10
  });
9
- const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
- const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
11
13
  const _useToast = require("./useToast");
12
14
  const _renderToast = require("./renderToast");
13
- const _useToastStylesStyles = require("./useToastStyles.styles");
15
+ const _useToastStylesstyles = require("./useToastStyles.styles");
14
16
  const _useToastContextValues = require("./useToastContextValues");
15
17
  const Toast = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
16
18
  const state = (0, _useToast.useToast_unstable)(props, ref);
17
- (0, _useToastStylesStyles.useToastStyles_unstable)(state);
19
+ (0, _useToastStylesstyles.useToastStyles_unstable)(state);
18
20
  return (0, _renderToast.renderToast_unstable)(state, (0, _useToastContextValues.useToastContextValues_unstable)(state));
19
21
  });
20
22
  Toast.displayName = 'Toast';
@@ -1 +1 @@
1
- {"version":3,"sources":["Toast.js"],"sourcesContent":["import * as React from 'react';\nimport { useToast_unstable } from './useToast';\nimport { renderToast_unstable } from './renderToast';\nimport { useToastStyles_unstable } from './useToastStyles.styles';\nimport { useToastContextValues_unstable } from './useToastContextValues';\n/**\n * Toast component\n */ export const Toast = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useToast_unstable(props, ref);\n useToastStyles_unstable(state);\n return renderToast_unstable(state, useToastContextValues_unstable(state));\n});\nToast.displayName = 'Toast';\n"],"names":["Toast","React","forwardRef","props","ref","state","useToast_unstable","useToastStyles_unstable","renderToast_unstable","useToastContextValues_unstable","displayName"],"mappings":";;;;+BAOiBA;;aAAAA;;;6DAPM;0BACW;6BACG;sCACG;uCACO;AAGpC,MAAMA,QAAQ,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAM;IAClE,MAAMC,QAAQC,IAAAA,2BAAiB,EAACH,OAAOC;IACvCG,IAAAA,6CAAuB,EAACF;IACxB,OAAOG,IAAAA,iCAAoB,EAACH,OAAOI,IAAAA,qDAA8B,EAACJ;AACtE;AACAL,MAAMU,WAAW,GAAG"}
1
+ {"version":3,"sources":["Toast.js"],"sourcesContent":["import * as React from 'react';\nimport { useToast_unstable } from './useToast';\nimport { renderToast_unstable } from './renderToast';\nimport { useToastStyles_unstable } from './useToastStyles.styles';\nimport { useToastContextValues_unstable } from './useToastContextValues';\n/**\n * Toast component\n */ export const Toast = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useToast_unstable(props, ref);\n useToastStyles_unstable(state);\n return renderToast_unstable(state, useToastContextValues_unstable(state));\n});\nToast.displayName = 'Toast';\n"],"names":["Toast","React","forwardRef","props","ref","state","useToast_unstable","useToastStyles_unstable","renderToast_unstable","useToastContextValues_unstable","displayName"],"mappings":";;;;+BAOiBA;;;eAAAA;;;;iEAPM;0BACW;6BACG;sCACG;uCACO;AAGpC,MAAMA,QAAQ,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC5D,MAAMC,QAAQC,IAAAA,2BAAiB,EAACH,OAAOC;IACvCG,IAAAA,6CAAuB,EAACF;IACxB,OAAOG,IAAAA,iCAAoB,EAACH,OAAOI,IAAAA,qDAA8B,EAACJ;AACtE;AACAL,MAAMU,WAAW,GAAG"}
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
- _exportStar(require("./Toast"), exports);
7
- _exportStar(require("./Toast.types"), exports);
8
- _exportStar(require("./renderToast"), exports);
9
- _exportStar(require("./useToast"), exports);
10
- _exportStar(require("./useToastStyles.styles"), exports);
5
+ const _export_star = require("@swc/helpers/_/_export_star");
6
+ _export_star._(require("./Toast"), exports);
7
+ _export_star._(require("./Toast.types"), exports);
8
+ _export_star._(require("./renderToast"), exports);
9
+ _export_star._(require("./useToast"), exports);
10
+ _export_star._(require("./useToastStyles.styles"), exports);
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export * from './Toast';\nexport * from './Toast.types';\nexport * from './renderToast';\nexport * from './useToast';\nexport * from './useToastStyles.styles';\n"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA"}
1
+ {"version":3,"sources":["index.js"],"sourcesContent":["export * from './Toast';\nexport * from './Toast.types';\nexport * from './renderToast';\nexport * from './useToast';\nexport * from './useToastStyles.styles';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
@@ -1,17 +1,20 @@
1
- /** @jsxRuntime classic */ /** @jsx createElement */ "use strict";
1
+ /** @jsxRuntime automatic */ /** @jsxImportSource @fluentui/react-jsx-runtime */ "use strict";
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
5
  Object.defineProperty(exports, "renderToast_unstable", {
6
6
  enumerable: true,
7
- get: ()=>renderToast_unstable
7
+ get: function() {
8
+ return renderToast_unstable;
9
+ }
8
10
  });
9
- const _reactJsxRuntime = require("@fluentui/react-jsx-runtime");
10
- const _reactUtilities = require("@fluentui/react-utilities");
11
- const _reactSharedContexts = require("@fluentui/react-shared-contexts");
11
+ const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
12
+ const _reactutilities = require("@fluentui/react-utilities");
13
+ const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
12
14
  const renderToast_unstable = (state, contextValues)=>{
13
- (0, _reactUtilities.assertSlots)(state);
14
- return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(_reactSharedContexts.BackgroundAppearanceProvider, {
15
- value: contextValues.backgroundAppearance
16
- }, /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.root, null));
15
+ (0, _reactutilities.assertSlots)(state);
16
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_reactsharedcontexts.BackgroundAppearanceProvider, {
17
+ value: contextValues.backgroundAppearance,
18
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(state.root, {})
19
+ });
17
20
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderToast.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport { assertSlots } from '@fluentui/react-utilities';\nimport { BackgroundAppearanceProvider } from '@fluentui/react-shared-contexts';\n/**\n * Render the final JSX of Toast\n */ export const renderToast_unstable = (state, contextValues)=>{\n assertSlots(state);\n return /*#__PURE__*/ createElement(BackgroundAppearanceProvider, {\n value: contextValues.backgroundAppearance\n }, /*#__PURE__*/ createElement(state.root, null));\n};\n"],"names":["renderToast_unstable","state","contextValues","assertSlots","createElement","BackgroundAppearanceProvider","value","backgroundAppearance","root"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAKjCA;;aAAAA;;iCALkE;gCACvD;qCACiB;AAGlC,MAAMA,uBAAuB,CAACC,OAAOC,gBAAgB;IAC5DC,IAAAA,2BAAW,EAACF;IACZ,OAAO,WAAW,GAAGG,IAAAA,8BAAa,EAACC,iDAA4B,EAAE;QAC7DC,OAAOJ,cAAcK,oBAAoB;IAC7C,GAAG,WAAW,GAAGH,IAAAA,8BAAa,EAACH,MAAMO,IAAI,EAAE,IAAI;AACnD"}
1
+ {"version":3,"sources":["renderToast.js"],"sourcesContent":["/** @jsxRuntime automatic */ /** @jsxImportSource @fluentui/react-jsx-runtime */ import { jsx as _jsx } from \"@fluentui/react-jsx-runtime/jsx-runtime\";\nimport { assertSlots } from '@fluentui/react-utilities';\nimport { BackgroundAppearanceProvider } from '@fluentui/react-shared-contexts';\n/**\n * Render the final JSX of Toast\n */ export const renderToast_unstable = (state, contextValues)=>{\n assertSlots(state);\n return /*#__PURE__*/ _jsx(BackgroundAppearanceProvider, {\n value: contextValues.backgroundAppearance,\n children: /*#__PURE__*/ _jsx(state.root, {})\n });\n};\n"],"names":["renderToast_unstable","state","contextValues","assertSlots","_jsx","BackgroundAppearanceProvider","value","backgroundAppearance","children","root"],"mappings":"AAAA,0BAA0B,GAAG,iDAAiD;;;;+BAK7DA;;;eAAAA;;;4BAL4F;gCACjF;qCACiB;AAGlC,MAAMA,uBAAuB,CAACC,OAAOC;IAC5CC,IAAAA,2BAAW,EAACF;IACZ,OAAO,WAAW,GAAGG,IAAAA,eAAI,EAACC,iDAA4B,EAAE;QACpDC,OAAOJ,cAAcK,oBAAoB;QACzCC,UAAU,WAAW,GAAGJ,IAAAA,eAAI,EAACH,MAAMQ,IAAI,EAAE,CAAC;IAC9C;AACJ"}
@@ -4,17 +4,19 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  Object.defineProperty(exports, "useToast_unstable", {
6
6
  enumerable: true,
7
- get: ()=>useToast_unstable
7
+ get: function() {
8
+ return useToast_unstable;
9
+ }
8
10
  });
9
- const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
- const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
- const _reactUtilities = require("@fluentui/react-utilities");
11
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
+ const _reactutilities = require("@fluentui/react-utilities");
12
14
  const useToast_unstable = (props, ref)=>{
13
15
  return {
14
16
  components: {
15
17
  root: 'div'
16
18
  },
17
- root: _reactUtilities.slot.always((0, _reactUtilities.getNativeElementProps)('div', {
19
+ root: _reactutilities.slot.always((0, _reactutilities.getNativeElementProps)('div', {
18
20
  ref,
19
21
  ...props
20
22
  }), {
@@ -1 +1 @@
1
- {"version":3,"sources":["useToast.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, slot } from '@fluentui/react-utilities';\n/**\n * Create the state required to render Toast.\n *\n * The returned state can be modified with hooks such as useToastStyles_unstable,\n * before being passed to renderToast_unstable.\n *\n * @param props - props from this instance of Toast\n * @param ref - reference to root HTMLElement of Toast\n */ export const useToast_unstable = (props, ref)=>{\n return {\n components: {\n root: 'div'\n },\n root: slot.always(getNativeElementProps('div', {\n ref,\n ...props\n }), {\n elementType: 'div'\n }),\n backgroundAppearance: props.appearance\n };\n};\n"],"names":["useToast_unstable","props","ref","components","root","slot","always","getNativeElementProps","elementType","backgroundAppearance","appearance"],"mappings":";;;;+BAUiBA;;aAAAA;;;6DAVM;gCACqB;AASjC,MAAMA,oBAAoB,CAACC,OAAOC,MAAM;IAC/C,OAAO;QACHC,YAAY;YACRC,MAAM;QACV;QACAA,MAAMC,oBAAI,CAACC,MAAM,CAACC,IAAAA,qCAAqB,EAAC,OAAO;YAC3CL;YACA,GAAGD,KAAK;QACZ,IAAI;YACAO,aAAa;QACjB;QACAC,sBAAsBR,MAAMS,UAAU;IAC1C;AACJ"}
1
+ {"version":3,"sources":["useToast.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, slot } from '@fluentui/react-utilities';\n/**\n * Create the state required to render Toast.\n *\n * The returned state can be modified with hooks such as useToastStyles_unstable,\n * before being passed to renderToast_unstable.\n *\n * @param props - props from this instance of Toast\n * @param ref - reference to root HTMLElement of Toast\n */ export const useToast_unstable = (props, ref)=>{\n return {\n components: {\n root: 'div'\n },\n root: slot.always(getNativeElementProps('div', {\n ref,\n ...props\n }), {\n elementType: 'div'\n }),\n backgroundAppearance: props.appearance\n };\n};\n"],"names":["useToast_unstable","props","ref","components","root","slot","always","getNativeElementProps","elementType","backgroundAppearance","appearance"],"mappings":";;;;+BAUiBA;;;eAAAA;;;;iEAVM;gCACqB;AASjC,MAAMA,oBAAoB,CAACC,OAAOC;IACzC,OAAO;QACHC,YAAY;YACRC,MAAM;QACV;QACAA,MAAMC,oBAAI,CAACC,MAAM,CAACC,IAAAA,qCAAqB,EAAC,OAAO;YAC3CL;YACA,GAAGD,KAAK;QACZ,IAAI;YACAO,aAAa;QACjB;QACAC,sBAAsBR,MAAMS,UAAU;IAC1C;AACJ"}
@@ -4,10 +4,12 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  Object.defineProperty(exports, "useToastContextValues_unstable", {
6
6
  enumerable: true,
7
- get: ()=>useToastContextValues_unstable
7
+ get: function() {
8
+ return useToastContextValues_unstable;
9
+ }
8
10
  });
9
11
  function useToastContextValues_unstable(state) {
10
- const { backgroundAppearance } = state;
12
+ const { backgroundAppearance } = state;
11
13
  return {
12
14
  backgroundAppearance
13
15
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["useToastContextValues.js"],"sourcesContent":["export function useToastContextValues_unstable(state) {\n const { backgroundAppearance } = state;\n return {\n backgroundAppearance\n };\n}\n"],"names":["useToastContextValues_unstable","state","backgroundAppearance"],"mappings":";;;;+BAAgBA;;aAAAA;;AAAT,SAASA,+BAA+BC,KAAK,EAAE;IAClD,MAAM,EAAEC,qBAAoB,EAAG,GAAGD;IAClC,OAAO;QACHC;IACJ;AACJ"}
1
+ {"version":3,"sources":["useToastContextValues.js"],"sourcesContent":["export function useToastContextValues_unstable(state) {\n const { backgroundAppearance } = state;\n return {\n backgroundAppearance\n };\n}\n"],"names":["useToastContextValues_unstable","state","backgroundAppearance"],"mappings":";;;;+BAAgBA;;;eAAAA;;;AAAT,SAASA,+BAA+BC,KAAK;IAChD,MAAM,EAAEC,oBAAoB,EAAE,GAAGD;IACjC,OAAO;QACHC;IACJ;AACJ"}
@@ -9,18 +9,22 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- toastClassNames: ()=>toastClassNames,
13
- useToastStyles_unstable: ()=>useToastStyles_unstable
12
+ toastClassNames: function() {
13
+ return toastClassNames;
14
+ },
15
+ useToastStyles_unstable: function() {
16
+ return useToastStyles_unstable;
17
+ }
14
18
  });
15
19
  const _react = require("@griffel/react");
16
20
  const toastClassNames = {
17
21
  root: 'fui-Toast'
18
22
  };
19
- const useRootBaseClassName = /*#__PURE__*/ (0, _react["__resetStyles"])("rzyoxeq", "r1lipnsg", [
23
+ const useRootBaseClassName = /*#__PURE__*/ (0, _react.__resetStyles)("rzyoxeq", "r1lipnsg", [
20
24
  ".rzyoxeq{display:grid;grid-template-columns:auto 1fr auto;padding-top:12px;padding-right:12px;padding-bottom:12px;padding-left:12px;border-bottom-right-radius:var(--borderRadiusMedium);border-bottom-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:var(--colorTransparentStroke);border-right-color:var(--colorTransparentStroke);border-bottom-color:var(--colorTransparentStroke);border-left-color:var(--colorTransparentStroke);box-shadow:var(--shadow8);font-size:var(--fontSizeBase300);line-height:20px;font-weight:var(--fontWeightSemibold);color:var(--colorNeutralForeground1);background-color:var(--colorNeutralBackground1);}",
21
25
  ".r1lipnsg{display:grid;grid-template-columns:auto 1fr auto;padding-top:12px;padding-left:12px;padding-bottom:12px;padding-right:12px;border-bottom-left-radius:var(--borderRadiusMedium);border-bottom-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);border-top-width:1px;border-left-width:1px;border-bottom-width:1px;border-right-width:1px;border-top-style:solid;border-left-style:solid;border-bottom-style:solid;border-right-style:solid;border-top-color:var(--colorTransparentStroke);border-left-color:var(--colorTransparentStroke);border-bottom-color:var(--colorTransparentStroke);border-right-color:var(--colorTransparentStroke);box-shadow:var(--shadow8);font-size:var(--fontSizeBase300);line-height:20px;font-weight:var(--fontWeightSemibold);color:var(--colorNeutralForeground1);background-color:var(--colorNeutralBackground1);}"
22
26
  ]);
23
- const useStyles = /*#__PURE__*/ (0, _react["__styles"])({
27
+ const useStyles = /*#__PURE__*/ (0, _react.__styles)({
24
28
  inverted: {
25
29
  sj55zd: "f1w7i9ko",
26
30
  De3pzq: "f5pduvr"
@@ -1 +1 @@
1
- {"version":3,"sources":["useToastStyles.styles.js"],"sourcesContent":["import { __resetStyles, __styles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nexport const toastClassNames = {\n root: 'fui-Toast'\n};\nconst useRootBaseClassName = /*#__PURE__*/__resetStyles(\"rzyoxeq\", \"r1lipnsg\", [\".rzyoxeq{display:grid;grid-template-columns:auto 1fr auto;padding-top:12px;padding-right:12px;padding-bottom:12px;padding-left:12px;border-bottom-right-radius:var(--borderRadiusMedium);border-bottom-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:var(--colorTransparentStroke);border-right-color:var(--colorTransparentStroke);border-bottom-color:var(--colorTransparentStroke);border-left-color:var(--colorTransparentStroke);box-shadow:var(--shadow8);font-size:var(--fontSizeBase300);line-height:20px;font-weight:var(--fontWeightSemibold);color:var(--colorNeutralForeground1);background-color:var(--colorNeutralBackground1);}\", \".r1lipnsg{display:grid;grid-template-columns:auto 1fr auto;padding-top:12px;padding-left:12px;padding-bottom:12px;padding-right:12px;border-bottom-left-radius:var(--borderRadiusMedium);border-bottom-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);border-top-width:1px;border-left-width:1px;border-bottom-width:1px;border-right-width:1px;border-top-style:solid;border-left-style:solid;border-bottom-style:solid;border-right-style:solid;border-top-color:var(--colorTransparentStroke);border-left-color:var(--colorTransparentStroke);border-bottom-color:var(--colorTransparentStroke);border-right-color:var(--colorTransparentStroke);box-shadow:var(--shadow8);font-size:var(--fontSizeBase300);line-height:20px;font-weight:var(--fontWeightSemibold);color:var(--colorNeutralForeground1);background-color:var(--colorNeutralBackground1);}\"]);\nconst useStyles = /*#__PURE__*/__styles({\n inverted: {\n sj55zd: \"f1w7i9ko\",\n De3pzq: \"f5pduvr\"\n }\n}, {\n d: [\".f1w7i9ko{color:var(--colorNeutralForegroundInverted2);}\", \".f5pduvr{background-color:var(--colorNeutralBackgroundInverted);}\"]\n});\n/**\n * Apply styling to the Toast slots based on the state\n */\nexport const useToastStyles_unstable = state => {\n const rootBaseClassName = useRootBaseClassName();\n const styles = useStyles();\n state.root.className = mergeClasses(toastClassNames.root, rootBaseClassName, state.backgroundAppearance === 'inverted' && styles.inverted, state.root.className);\n return state;\n};\n//# sourceMappingURL=useToastStyles.styles.js.map"],"names":["toastClassNames","useToastStyles_unstable","root","useRootBaseClassName","__resetStyles","useStyles","__styles","inverted","sj55zd","De3pzq","d","state","rootBaseClassName","styles","className","mergeClasses","backgroundAppearance"],"mappings":";;;;;;;;;;;IAEaA,eAAe,MAAfA;IAeAC,uBAAuB,MAAvBA;;uBAjBqD;AAE3D,MAAMD,kBAAkB;IAC7BE,MAAM;AACR;AACA,MAAMC,uBAAuB,WAAW,GAAEC,IAAAA,uBAAa,EAAC,WAAW,YAAY;IAAC;IAA05B;CAA05B;AACp4D,MAAMC,YAAY,WAAW,GAAEC,IAAAA,kBAAQ,EAAC;IACtCC,UAAU;QACRC,QAAQ;QACRC,QAAQ;IACV;AACF,GAAG;IACDC,GAAG;QAAC;QAA4D;KAAoE;AACtI;AAIO,MAAMT,0BAA0BU,CAAAA,QAAS;IAC9C,MAAMC,oBAAoBT;IAC1B,MAAMU,SAASR;IACfM,MAAMT,IAAI,CAACY,SAAS,GAAGC,IAAAA,mBAAY,EAACf,gBAAgBE,IAAI,EAAEU,mBAAmBD,MAAMK,oBAAoB,KAAK,cAAcH,OAAON,QAAQ,EAAEI,MAAMT,IAAI,CAACY,SAAS;IAC/J,OAAOH;AACT,GACA,iDAAiD"}
1
+ {"version":3,"sources":["useToastStyles.styles.js"],"sourcesContent":["import { __resetStyles, __styles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nexport const toastClassNames = {\n root: 'fui-Toast'\n};\nconst useRootBaseClassName = /*#__PURE__*/__resetStyles(\"rzyoxeq\", \"r1lipnsg\", [\".rzyoxeq{display:grid;grid-template-columns:auto 1fr auto;padding-top:12px;padding-right:12px;padding-bottom:12px;padding-left:12px;border-bottom-right-radius:var(--borderRadiusMedium);border-bottom-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:var(--colorTransparentStroke);border-right-color:var(--colorTransparentStroke);border-bottom-color:var(--colorTransparentStroke);border-left-color:var(--colorTransparentStroke);box-shadow:var(--shadow8);font-size:var(--fontSizeBase300);line-height:20px;font-weight:var(--fontWeightSemibold);color:var(--colorNeutralForeground1);background-color:var(--colorNeutralBackground1);}\", \".r1lipnsg{display:grid;grid-template-columns:auto 1fr auto;padding-top:12px;padding-left:12px;padding-bottom:12px;padding-right:12px;border-bottom-left-radius:var(--borderRadiusMedium);border-bottom-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);border-top-width:1px;border-left-width:1px;border-bottom-width:1px;border-right-width:1px;border-top-style:solid;border-left-style:solid;border-bottom-style:solid;border-right-style:solid;border-top-color:var(--colorTransparentStroke);border-left-color:var(--colorTransparentStroke);border-bottom-color:var(--colorTransparentStroke);border-right-color:var(--colorTransparentStroke);box-shadow:var(--shadow8);font-size:var(--fontSizeBase300);line-height:20px;font-weight:var(--fontWeightSemibold);color:var(--colorNeutralForeground1);background-color:var(--colorNeutralBackground1);}\"]);\nconst useStyles = /*#__PURE__*/__styles({\n inverted: {\n sj55zd: \"f1w7i9ko\",\n De3pzq: \"f5pduvr\"\n }\n}, {\n d: [\".f1w7i9ko{color:var(--colorNeutralForegroundInverted2);}\", \".f5pduvr{background-color:var(--colorNeutralBackgroundInverted);}\"]\n});\n/**\n * Apply styling to the Toast slots based on the state\n */\nexport const useToastStyles_unstable = state => {\n const rootBaseClassName = useRootBaseClassName();\n const styles = useStyles();\n state.root.className = mergeClasses(toastClassNames.root, rootBaseClassName, state.backgroundAppearance === 'inverted' && styles.inverted, state.root.className);\n return state;\n};\n//# sourceMappingURL=useToastStyles.styles.js.map"],"names":["toastClassNames","useToastStyles_unstable","root","useRootBaseClassName","__resetStyles","useStyles","__styles","inverted","sj55zd","De3pzq","d","state","rootBaseClassName","styles","className","mergeClasses","backgroundAppearance"],"mappings":";;;;;;;;;;;IAEaA,eAAe;eAAfA;;IAeAC,uBAAuB;eAAvBA;;;uBAjBqD;AAE3D,MAAMD,kBAAkB;IAC7BE,MAAM;AACR;AACA,MAAMC,uBAAuB,WAAW,GAAEC,IAAAA,oBAAa,EAAC,WAAW,YAAY;IAAC;IAA05B;CAA05B;AACp4D,MAAMC,YAAY,WAAW,GAAEC,IAAAA,eAAQ,EAAC;IACtCC,UAAU;QACRC,QAAQ;QACRC,QAAQ;IACV;AACF,GAAG;IACDC,GAAG;QAAC;QAA4D;KAAoE;AACtI;AAIO,MAAMT,0BAA0BU,CAAAA;IACrC,MAAMC,oBAAoBT;IAC1B,MAAMU,SAASR;IACfM,MAAMT,IAAI,CAACY,SAAS,GAAGC,IAAAA,mBAAY,EAACf,gBAAgBE,IAAI,EAAEU,mBAAmBD,MAAMK,oBAAoB,KAAK,cAAcH,OAAON,QAAQ,EAAEI,MAAMT,IAAI,CAACY,SAAS;IAC/J,OAAOH;AACT,GACA,iDAAiD"}
@@ -4,16 +4,18 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  Object.defineProperty(exports, "ToastBody", {
6
6
  enumerable: true,
7
- get: ()=>ToastBody
7
+ get: function() {
8
+ return ToastBody;
9
+ }
8
10
  });
9
- const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
- const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
11
13
  const _useToastBody = require("./useToastBody");
12
14
  const _renderToastBody = require("./renderToastBody");
13
- const _useToastBodyStylesStyles = require("./useToastBodyStyles.styles");
15
+ const _useToastBodyStylesstyles = require("./useToastBodyStyles.styles");
14
16
  const ToastBody = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
15
17
  const state = (0, _useToastBody.useToastBody_unstable)(props, ref);
16
- (0, _useToastBodyStylesStyles.useToastBodyStyles_unstable)(state);
18
+ (0, _useToastBodyStylesstyles.useToastBodyStyles_unstable)(state);
17
19
  return (0, _renderToastBody.renderToastBody_unstable)(state);
18
20
  });
19
21
  ToastBody.displayName = 'ToastBody';
@@ -1 +1 @@
1
- {"version":3,"sources":["ToastBody.js"],"sourcesContent":["import * as React from 'react';\nimport { useToastBody_unstable } from './useToastBody';\nimport { renderToastBody_unstable } from './renderToastBody';\nimport { useToastBodyStyles_unstable } from './useToastBodyStyles.styles';\n/**\n * ToastBody component\n */ export const ToastBody = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useToastBody_unstable(props, ref);\n useToastBodyStyles_unstable(state);\n return renderToastBody_unstable(state);\n});\nToastBody.displayName = 'ToastBody';\n"],"names":["ToastBody","React","forwardRef","props","ref","state","useToastBody_unstable","useToastBodyStyles_unstable","renderToastBody_unstable","displayName"],"mappings":";;;;+BAMiBA;;aAAAA;;;6DANM;8BACe;iCACG;0CACG;AAGjC,MAAMA,YAAY,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAM;IACtE,MAAMC,QAAQC,IAAAA,mCAAqB,EAACH,OAAOC;IAC3CG,IAAAA,qDAA2B,EAACF;IAC5B,OAAOG,IAAAA,yCAAwB,EAACH;AACpC;AACAL,UAAUS,WAAW,GAAG"}
1
+ {"version":3,"sources":["ToastBody.js"],"sourcesContent":["import * as React from 'react';\nimport { useToastBody_unstable } from './useToastBody';\nimport { renderToastBody_unstable } from './renderToastBody';\nimport { useToastBodyStyles_unstable } from './useToastBodyStyles.styles';\n/**\n * ToastBody component\n */ export const ToastBody = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useToastBody_unstable(props, ref);\n useToastBodyStyles_unstable(state);\n return renderToastBody_unstable(state);\n});\nToastBody.displayName = 'ToastBody';\n"],"names":["ToastBody","React","forwardRef","props","ref","state","useToastBody_unstable","useToastBodyStyles_unstable","renderToastBody_unstable","displayName"],"mappings":";;;;+BAMiBA;;;eAAAA;;;;iEANM;8BACe;iCACG;0CACG;AAGjC,MAAMA,YAAY,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAChE,MAAMC,QAAQC,IAAAA,mCAAqB,EAACH,OAAOC;IAC3CG,IAAAA,qDAA2B,EAACF;IAC5B,OAAOG,IAAAA,yCAAwB,EAACH;AACpC;AACAL,UAAUS,WAAW,GAAG"}
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
- _exportStar(require("./ToastBody"), exports);
7
- _exportStar(require("./ToastBody.types"), exports);
8
- _exportStar(require("./renderToastBody"), exports);
9
- _exportStar(require("./useToastBody"), exports);
10
- _exportStar(require("./useToastBodyStyles.styles"), exports);
5
+ const _export_star = require("@swc/helpers/_/_export_star");
6
+ _export_star._(require("./ToastBody"), exports);
7
+ _export_star._(require("./ToastBody.types"), exports);
8
+ _export_star._(require("./renderToastBody"), exports);
9
+ _export_star._(require("./useToastBody"), exports);
10
+ _export_star._(require("./useToastBodyStyles.styles"), exports);
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export * from './ToastBody';\nexport * from './ToastBody.types';\nexport * from './renderToastBody';\nexport * from './useToastBody';\nexport * from './useToastBodyStyles.styles';\n"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA"}
1
+ {"version":3,"sources":["index.js"],"sourcesContent":["export * from './ToastBody';\nexport * from './ToastBody.types';\nexport * from './renderToastBody';\nexport * from './useToastBody';\nexport * from './useToastBodyStyles.styles';\n"],"names":[],"mappings":";;;;;uBAAc;uBACA;uBACA;uBACA;uBACA"}
@@ -1,14 +1,21 @@
1
- /** @jsxRuntime classic */ /** @jsxFrag Fragment */ /** @jsx createElement */ "use strict";
1
+ /** @jsxRuntime automatic */ /** @jsxImportSource @fluentui/react-jsx-runtime */ "use strict";
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
5
  Object.defineProperty(exports, "renderToastBody_unstable", {
6
6
  enumerable: true,
7
- get: ()=>renderToastBody_unstable
7
+ get: function() {
8
+ return renderToastBody_unstable;
9
+ }
8
10
  });
9
- const _reactJsxRuntime = require("@fluentui/react-jsx-runtime");
10
- const _reactUtilities = require("@fluentui/react-utilities");
11
+ const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
12
+ const _reactutilities = require("@fluentui/react-utilities");
11
13
  const renderToastBody_unstable = (state)=>{
12
- (0, _reactUtilities.assertSlots)(state);
13
- return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(_reactJsxRuntime.Fragment, null, /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.root, null), state.subtitle ? /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.subtitle, null) : null);
14
+ (0, _reactutilities.assertSlots)(state);
15
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
16
+ children: [
17
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(state.root, {}),
18
+ state.subtitle ? /*#__PURE__*/ (0, _jsxruntime.jsx)(state.subtitle, {}) : null
19
+ ]
20
+ });
14
21
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderToastBody.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsxFrag Fragment */ /** @jsx createElement */ import { createElement, Fragment } from '@fluentui/react-jsx-runtime';\nimport { assertSlots } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of ToastBody\n */ export const renderToastBody_unstable = (state)=>{\n assertSlots(state);\n return /*#__PURE__*/ createElement(Fragment, null, /*#__PURE__*/ createElement(state.root, null), state.subtitle ? /*#__PURE__*/ createElement(state.subtitle, null) : null);\n};\n"],"names":["renderToastBody_unstable","state","assertSlots","createElement","Fragment","root","subtitle"],"mappings":"AAAA,wBAAwB,GAAG,sBAAsB,GAAG,uBAAuB;;;;+BAI1DA;;aAAAA;;iCAJqG;gCAC1F;AAGjB,MAAMA,2BAA2B,CAACC,QAAQ;IACjDC,IAAAA,2BAAW,EAACD;IACZ,OAAO,WAAW,GAAGE,IAAAA,8BAAa,EAACC,yBAAQ,EAAE,IAAI,EAAE,WAAW,GAAGD,IAAAA,8BAAa,EAACF,MAAMI,IAAI,EAAE,IAAI,GAAGJ,MAAMK,QAAQ,GAAG,WAAW,GAAGH,IAAAA,8BAAa,EAACF,MAAMK,QAAQ,EAAE,IAAI,IAAI,IAAI;AAC/K"}
1
+ {"version":3,"sources":["renderToastBody.js"],"sourcesContent":["/** @jsxRuntime automatic */ /** @jsxImportSource @fluentui/react-jsx-runtime */ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"@fluentui/react-jsx-runtime/jsx-runtime\";\nimport { assertSlots } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of ToastBody\n */ export const renderToastBody_unstable = (state)=>{\n assertSlots(state);\n return /*#__PURE__*/ _jsxs(_Fragment, {\n children: [\n /*#__PURE__*/ _jsx(state.root, {}),\n state.subtitle ? /*#__PURE__*/ _jsx(state.subtitle, {}) : null\n ]\n });\n};\n"],"names":["renderToastBody_unstable","state","assertSlots","_jsxs","_Fragment","children","_jsx","root","subtitle"],"mappings":"AAAA,0BAA0B,GAAG,iDAAiD;;;;+BAI7DA;;;eAAAA;;;4BAJkI;gCACvH;AAGjB,MAAMA,2BAA2B,CAACC;IACzCC,IAAAA,2BAAW,EAACD;IACZ,OAAO,WAAW,GAAGE,IAAAA,gBAAK,EAACC,oBAAS,EAAE;QAClCC,UAAU;YACN,WAAW,GAAGC,IAAAA,eAAI,EAACL,MAAMM,IAAI,EAAE,CAAC;YAChCN,MAAMO,QAAQ,GAAG,WAAW,GAAGF,IAAAA,eAAI,EAACL,MAAMO,QAAQ,EAAE,CAAC,KAAK;SAC7D;IACL;AACJ"}
@@ -4,25 +4,27 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  Object.defineProperty(exports, "useToastBody_unstable", {
6
6
  enumerable: true,
7
- get: ()=>useToastBody_unstable
7
+ get: function() {
8
+ return useToastBody_unstable;
9
+ }
8
10
  });
9
- const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
- const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
- const _reactUtilities = require("@fluentui/react-utilities");
11
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
+ const _reactutilities = require("@fluentui/react-utilities");
12
14
  const _toastContainerContext = require("../../contexts/toastContainerContext");
13
- const _reactSharedContexts = require("@fluentui/react-shared-contexts");
15
+ const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
14
16
  const useToastBody_unstable = (props, ref)=>{
15
- const backgroundAppearance = (0, _reactSharedContexts.useBackgroundAppearance)();
16
- const { bodyId } = (0, _toastContainerContext.useToastContainerContext)();
17
+ const backgroundAppearance = (0, _reactsharedcontexts.useBackgroundAppearance)();
18
+ const { bodyId } = (0, _toastContainerContext.useToastContainerContext)();
17
19
  return {
18
20
  components: {
19
21
  root: 'div',
20
22
  subtitle: 'div'
21
23
  },
22
- subtitle: _reactUtilities.slot.optional(props.subtitle, {
24
+ subtitle: _reactutilities.slot.optional(props.subtitle, {
23
25
  elementType: 'div'
24
26
  }),
25
- root: _reactUtilities.slot.always((0, _reactUtilities.getNativeElementProps)('div', {
27
+ root: _reactutilities.slot.always((0, _reactutilities.getNativeElementProps)('div', {
26
28
  ref,
27
29
  id: bodyId,
28
30
  ...props
@@ -1 +1 @@
1
- {"version":3,"sources":["useToastBody.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, slot } from '@fluentui/react-utilities';\nimport { useToastContainerContext } from '../../contexts/toastContainerContext';\nimport { useBackgroundAppearance } from '@fluentui/react-shared-contexts';\n/**\n * Create the state required to render ToastBody.\n *\n * The returned state can be modified with hooks such as useToastBodyStyles_unstable,\n * before being passed to renderToastBody_unstable.\n *\n * @param props - props from this instance of ToastBody\n * @param ref - reference to root HTMLElement of ToastBody\n */ export const useToastBody_unstable = (props, ref)=>{\n const backgroundAppearance = useBackgroundAppearance();\n const { bodyId } = useToastContainerContext();\n return {\n components: {\n root: 'div',\n subtitle: 'div'\n },\n subtitle: slot.optional(props.subtitle, {\n elementType: 'div'\n }),\n root: slot.always(getNativeElementProps('div', {\n ref,\n id: bodyId,\n ...props\n }), {\n elementType: 'div'\n }),\n backgroundAppearance\n };\n};\n"],"names":["useToastBody_unstable","props","ref","backgroundAppearance","useBackgroundAppearance","bodyId","useToastContainerContext","components","root","subtitle","slot","optional","elementType","always","getNativeElementProps","id"],"mappings":";;;;+BAYiBA;;aAAAA;;;6DAZM;gCACqB;uCACH;qCACD;AAS7B,MAAMA,wBAAwB,CAACC,OAAOC,MAAM;IACnD,MAAMC,uBAAuBC,IAAAA,4CAAuB;IACpD,MAAM,EAAEC,OAAM,EAAG,GAAGC,IAAAA,+CAAwB;IAC5C,OAAO;QACHC,YAAY;YACRC,MAAM;YACNC,UAAU;QACd;QACAA,UAAUC,oBAAI,CAACC,QAAQ,CAACV,MAAMQ,QAAQ,EAAE;YACpCG,aAAa;QACjB;QACAJ,MAAME,oBAAI,CAACG,MAAM,CAACC,IAAAA,qCAAqB,EAAC,OAAO;YAC3CZ;YACAa,IAAIV;YACJ,GAAGJ,KAAK;QACZ,IAAI;YACAW,aAAa;QACjB;QACAT;IACJ;AACJ"}
1
+ {"version":3,"sources":["useToastBody.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, slot } from '@fluentui/react-utilities';\nimport { useToastContainerContext } from '../../contexts/toastContainerContext';\nimport { useBackgroundAppearance } from '@fluentui/react-shared-contexts';\n/**\n * Create the state required to render ToastBody.\n *\n * The returned state can be modified with hooks such as useToastBodyStyles_unstable,\n * before being passed to renderToastBody_unstable.\n *\n * @param props - props from this instance of ToastBody\n * @param ref - reference to root HTMLElement of ToastBody\n */ export const useToastBody_unstable = (props, ref)=>{\n const backgroundAppearance = useBackgroundAppearance();\n const { bodyId } = useToastContainerContext();\n return {\n components: {\n root: 'div',\n subtitle: 'div'\n },\n subtitle: slot.optional(props.subtitle, {\n elementType: 'div'\n }),\n root: slot.always(getNativeElementProps('div', {\n ref,\n id: bodyId,\n ...props\n }), {\n elementType: 'div'\n }),\n backgroundAppearance\n };\n};\n"],"names":["useToastBody_unstable","props","ref","backgroundAppearance","useBackgroundAppearance","bodyId","useToastContainerContext","components","root","subtitle","slot","optional","elementType","always","getNativeElementProps","id"],"mappings":";;;;+BAYiBA;;;eAAAA;;;;iEAZM;gCACqB;uCACH;qCACD;AAS7B,MAAMA,wBAAwB,CAACC,OAAOC;IAC7C,MAAMC,uBAAuBC,IAAAA,4CAAuB;IACpD,MAAM,EAAEC,MAAM,EAAE,GAAGC,IAAAA,+CAAwB;IAC3C,OAAO;QACHC,YAAY;YACRC,MAAM;YACNC,UAAU;QACd;QACAA,UAAUC,oBAAI,CAACC,QAAQ,CAACV,MAAMQ,QAAQ,EAAE;YACpCG,aAAa;QACjB;QACAJ,MAAME,oBAAI,CAACG,MAAM,CAACC,IAAAA,qCAAqB,EAAC,OAAO;YAC3CZ;YACAa,IAAIV;YACJ,GAAGJ,KAAK;QACZ,IAAI;YACAW,aAAa;QACjB;QACAT;IACJ;AACJ"}