@clearstory/drywall-react 2.2.0 → 2.3.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 (236) hide show
  1. package/dist/{Accordion-Bjv72dwO.js → Accordion-DCOykts4.js} +8 -7
  2. package/dist/{AccordionActions-OpMdCn2Z.js → AccordionActions-BAiH7fCc.js} +10 -9
  3. package/dist/{AccordionDetails-CgLf6g7z.js → AccordionDetails-m2yw4JWL.js} +12 -11
  4. package/dist/{AccordionSummary-C2WduOvw.js → AccordionSummary-Bcz3kHL3.js} +11 -10
  5. package/dist/{AdapterDayjs-BOLWylMD.js → AdapterDayjs-BrkWLsMH.js} +3 -3
  6. package/dist/{Alert-4WYM0NA5.js → Alert-BAwPio4K.js} +15 -14
  7. package/dist/{AlertTitle-BJh7YkkD.js → AlertTitle-DmUXFJub.js} +13 -12
  8. package/dist/{ArrowDropDown-1q6M8Obd.js → ArrowDropDown-CHZToUze.js} +4 -4
  9. package/dist/{Autocomplete-C9jR7Gz3.js → Autocomplete-BnNe-Ocu.js} +20 -19
  10. package/dist/{Avatar-BW1coVo5.js → Avatar-C331iVZj.js} +14 -13
  11. package/dist/{AvatarGroup-Cymumkbs.js → AvatarGroup-CguRmDSR.js} +15 -14
  12. package/dist/{Backdrop-D9hYyloM.js → Backdrop-DLtFFTHy.js} +13 -12
  13. package/dist/{Badge-CKX_N8SZ.js → Badge-CVhZHphu.js} +13 -12
  14. package/dist/{Box-O7SvtIw8.js → Box-CKDKtm7F.js} +19 -18
  15. package/dist/{Breadcrumbs-BCuC1VRi.js → Breadcrumbs-ze8mc2Zg.js} +9 -8
  16. package/dist/{Button-D5FpepiD.js → Button-B4158Ttr.js} +15 -14
  17. package/dist/{ButtonBase-t_kdVaqI.js → ButtonBase-COzHF9dg.js} +14 -13
  18. package/dist/{ButtonGroup-DejD8J4b.js → ButtonGroup-D-4yW6k2.js} +11 -10
  19. package/dist/{Card-C4KBUbxB.js → Card-Cqms7NUL.js} +13 -12
  20. package/dist/{CardActionArea-CJoEgqCm.js → CardActionArea-B2Ix5eDP.js} +19 -18
  21. package/dist/{CardActions-pYmlOEiI.js → CardActions-CMKGIQ5P.js} +8 -7
  22. package/dist/{CardContent-DeEDpoJu.js → CardContent-BEE7_vOd.js} +12 -11
  23. package/dist/{CardHeader-kp6aSapw.js → CardHeader-CeJ4xLV1.js} +13 -12
  24. package/dist/{CardMedia-CCgHX4bc.js → CardMedia-CjIGijkw.js} +10 -9
  25. package/dist/{Checkbox-BlVkkvFG.js → Checkbox-BlCrwG_a.js} +14 -13
  26. package/dist/{Chip-Dald_f2Y.js → Chip-BzXGbbX1.js} +14 -13
  27. package/dist/{CircularProgress-CjDaz1a_.js → CircularProgress-CE-gUslP.js} +14 -13
  28. package/dist/{Clear-Cp_Sfbwo.js → Clear-ABzw_mBN.js} +1 -1
  29. package/dist/ClickAwayListener-BhNP8Zmy.js +104 -0
  30. package/dist/{Close-CXMaN7wz.js → Close-sCOhjzLZ.js} +1 -1
  31. package/dist/{Collapse-Dled_24V.js → Collapse-54fTKYrR.js} +13 -12
  32. package/dist/{CssBaseline-B8z8Y0X2.js → CssBaseline-dhNsGT6h.js} +3 -3
  33. package/dist/{Datepicker-CqhyyHOO.js → Datepicker-DYDSgJ7Y.js} +90 -89
  34. package/dist/{DefaultPropsProvider-B3clbJFR.js → DefaultPropsProvider-972kdsvD.js} +1 -1
  35. package/dist/{DefaultPropsProvider-PBxTVeaD.js → DefaultPropsProvider-Hks9kyHW.js} +2 -2
  36. package/dist/{Dialog-CgBDoc1Q.js → Dialog-DVIwe9ZI.js} +12 -11
  37. package/dist/{DialogActions-B9aTR1RT.js → DialogActions-CPDvDLrR.js} +19 -18
  38. package/dist/{DialogContent-BQeFmie3.js → DialogContent-CKtOueUR.js} +13 -12
  39. package/dist/{DialogContentText-DTcw2F2t.js → DialogContentText-4wkWrNzG.js} +13 -12
  40. package/dist/{DialogTitle-BKSAT2jz.js → DialogTitle-CKBNYMcR.js} +5 -5
  41. package/dist/{Divider-CN1iZXpV.js → Divider-DANmFTyq.js} +5 -5
  42. package/dist/{Drawer-u9qup5a9.js → Drawer-SY5DxFp0.js} +44 -43
  43. package/dist/{FormControl-D-rAmw3r.js → FormControl-CuHXXTcL.js} +21 -20
  44. package/dist/{FormControlLabel-Dc1NyaPl.js → FormControlLabel-DfKMLiFM.js} +20 -19
  45. package/dist/{FormGroup-C6hX5Rxp.js → FormGroup-CclOJ_ni.js} +10 -9
  46. package/dist/{FormHelperText-BWHhdCfT.js → FormHelperText-wucHHOG8.js} +14 -13
  47. package/dist/{FormLabel-DNn2gpAc.js → FormLabel-CgNd8XLN.js} +21 -20
  48. package/dist/{GlobalStyles-ChwRSWsx.js → GlobalStyles-BEfXiUlZ.js} +3 -3
  49. package/dist/{Grow-DR-owdbZ.js → Grow-C0dChpKD.js} +4 -4
  50. package/dist/{IconButton-CMvCM_Lp.js → IconButton-rSBl8wjc.js} +20 -19
  51. package/dist/{Info-Nc5BG3Yc.js → Info-DtWHV9kz.js} +1 -1
  52. package/dist/{InputAdornment-DbMMP6fx.js → InputAdornment-BpuZG6da.js} +35 -34
  53. package/dist/{InputBase-B6OIIVG0.js → InputBase-CfVedJZK.js} +20 -19
  54. package/dist/{LinearProgress-BhzXKKHq.js → LinearProgress-C7E3wvv7.js} +22 -21
  55. package/dist/{Link-BMYQsA2J.js → Link-DuB1TakW.js} +21 -20
  56. package/dist/{List-BQ82y_D2.js → List-R1y2rt2I.js} +12 -11
  57. package/dist/{ListItem-BTJrs0xk.js → ListItem-YdhXS7jh.js} +10 -9
  58. package/dist/{ListItemAvatar-DMY5yneH.js → ListItemAvatar-Zov7uhBa.js} +16 -15
  59. package/dist/{ListItemButton-DuUhNIFe.js → ListItemButton-Dd8ymeh-.js} +6 -6
  60. package/dist/{ListItemIcon-Cwg5u5_e.js → ListItemIcon-C48tLADF.js} +5 -5
  61. package/dist/{ListItemText-BRX2EYOb.js → ListItemText-C4IUFTAh.js} +5 -5
  62. package/dist/{ListSubheader-CHpW48wG.js → ListSubheader-B2dYS-AB.js} +15 -14
  63. package/dist/Menu-DSTbuLGZ.js +289 -0
  64. package/dist/{MenuItem-B2uAesJs.js → MenuItem-B2Y2sEBv.js} +15 -14
  65. package/dist/{MenuList-G9HnfsX2.js → MenuList-DHWy1THR.js} +3 -2
  66. package/dist/{Modal-DLT528-9.js → Modal-quA3LOv8.js} +15 -14
  67. package/dist/{Paper-DeGJAQE9.js → Paper-DpGDlTnE.js} +17 -16
  68. package/dist/Popover-C4UMEZFM.js +485 -0
  69. package/dist/{Popper-706X-ixW.js → Popper-CEmc3hgj.js} +10 -8
  70. package/dist/{Portal-CkohOYPG.js → Portal-BD1qgEF2.js} +1 -1
  71. package/dist/{Radio-JRcvAFCw.js → Radio-CWGlqtWa.js} +38 -37
  72. package/dist/{RadioGroup-C0A6busY.js → RadioGroup-BA0CQX02.js} +17 -16
  73. package/dist/{Select-tNyTsCta.js → Select-G7DzAygS.js} +17 -16
  74. package/dist/{SelectControl-Bz5THtuf.js → SelectControl-DGAnDeHt.js} +9 -9
  75. package/dist/{Skeleton-B8pM1f3a.js → Skeleton-D9qDjbaT.js} +23 -22
  76. package/dist/Snackbar-B4ylEaa1.js +576 -0
  77. package/dist/{Step-CwOFbDz2.js → Step-C3KsW_sV.js} +13 -12
  78. package/dist/{StepButton-DSXTT103.js → StepButton-Cm9DhOQx.js} +14 -13
  79. package/dist/{StepConnector-BMHzfsfk.js → StepConnector-DK4MJqzZ.js} +15 -14
  80. package/dist/{StepContent-w8xvdrAQ.js → StepContent-Dl6UHgdu.js} +21 -20
  81. package/dist/{StepIcon-Cukq5aE2.js → StepIcon-ElSTT-7B.js} +26 -25
  82. package/dist/{StepLabel-Cy2krTW-.js → StepLabel-B_4bjXGA.js} +12 -11
  83. package/dist/{Stepper-Bm6IDco_.js → Stepper-CMQnaky0.js} +11 -10
  84. package/dist/{SvgIcon-ChnoHwqF.js → SvgIcon-CAF-TTUy.js} +24 -23
  85. package/dist/{Switch-Cvd5G-7l.js → Switch-C72ijhRh.js} +15 -14
  86. package/dist/{SwitchBase-CufBsptm.js → SwitchBase-BxwR-ITa.js} +11 -10
  87. package/dist/{Tab-zSeGVRiK.js → Tab-DpKBtsUw.js} +10 -9
  88. package/dist/{Tabs-Cksd8YLg.js → Tabs-SKtYSjnS.js} +11 -10
  89. package/dist/{ThemeProviderWithVars-bg3WT8UX.js → ThemeProviderWithVars-Cd9Vwf-U.js} +10 -9
  90. package/dist/{Toolbar-UdVSl6Kk.js → Toolbar-Dmu2ceP6.js} +10 -9
  91. package/dist/{Tooltip-CsdchI1h.js → Tooltip-BJmTHiZe.js} +14 -13
  92. package/dist/{Typography-DPs_xiDb.js → Typography-DnNWmNen.js} +16 -15
  93. package/dist/{WarningAmberOutlined-YV5tlDPZ.js → WarningAmberOutlined-Bip82sqV.js} +1 -1
  94. package/dist/{ZoomOut-CoqaIFxD.js → ZoomOut-BsqVAKgf.js} +1 -1
  95. package/dist/components/Accordion/index.js +1 -1
  96. package/dist/components/AccordionActions/index.js +1 -1
  97. package/dist/components/AccordionDetails/index.js +1 -1
  98. package/dist/components/AccordionSummary/index.js +1 -1
  99. package/dist/components/Alert/index.js +1 -1
  100. package/dist/components/AlertTitle/index.js +1 -1
  101. package/dist/components/Autocomplete/Autocomplete.js +2 -2
  102. package/dist/components/Autocomplete/index.js +1 -1
  103. package/dist/components/AutocompleteControl/AutocompleteControl.js +9 -9
  104. package/dist/components/AutocompleteControl/index.js +1 -1
  105. package/dist/components/Avatar/index.js +1 -1
  106. package/dist/components/AvatarGroup/index.js +1 -1
  107. package/dist/components/Backdrop/index.js +1 -1
  108. package/dist/components/Badge/index.js +1 -1
  109. package/dist/components/Box/index.js +1 -1
  110. package/dist/components/Breadcrumbs/index.js +1 -1
  111. package/dist/components/Button/index.js +1 -1
  112. package/dist/components/ButtonBase/index.js +1 -1
  113. package/dist/components/ButtonGroup/index.js +1 -1
  114. package/dist/components/Card/index.js +1 -1
  115. package/dist/components/CardActionArea/index.js +1 -1
  116. package/dist/components/CardActions/index.js +1 -1
  117. package/dist/components/CardContent/index.js +1 -1
  118. package/dist/components/CardHeader/index.js +1 -1
  119. package/dist/components/CardMedia/index.js +1 -1
  120. package/dist/components/Checkbox/index.js +1 -1
  121. package/dist/components/Chip/index.js +1 -1
  122. package/dist/components/CircularProgress/index.js +1 -1
  123. package/dist/components/ClickAwayListener/index.d.ts +2 -0
  124. package/dist/components/ClickAwayListener/index.js +4 -0
  125. package/dist/components/Container/index.js +1 -1
  126. package/dist/components/CssBaseline/index.js +1 -1
  127. package/dist/components/Datepicker/Datepicker.js +3 -3
  128. package/dist/components/Datepicker/index.js +2 -2
  129. package/dist/components/DatepickerControl/DatepickerControl.js +9 -9
  130. package/dist/components/DatepickerControl/index.js +1 -1
  131. package/dist/components/Dialog/index.js +1 -1
  132. package/dist/components/DialogActions/index.js +1 -1
  133. package/dist/components/DialogContent/index.js +1 -1
  134. package/dist/components/DialogContentText/index.js +1 -1
  135. package/dist/components/DialogTitle/index.js +2 -2
  136. package/dist/components/Divider/index.js +2 -2
  137. package/dist/components/Drawer/index.js +1 -1
  138. package/dist/components/FormControl/index.js +1 -1
  139. package/dist/components/FormControlLabel/index.js +1 -1
  140. package/dist/components/FormGroup/index.js +1 -1
  141. package/dist/components/FormHelperText/index.js +1 -1
  142. package/dist/components/FormLabel/index.js +1 -1
  143. package/dist/components/FormSublabel/FormSublabel.js +5 -5
  144. package/dist/components/FormSublabel/index.js +1 -1
  145. package/dist/components/IconButton/index.js +1 -1
  146. package/dist/components/Input/Input.js +1 -1
  147. package/dist/components/InputAdornment/index.js +1 -1
  148. package/dist/components/InputControl/InputControl.js +9 -9
  149. package/dist/components/InputControl/index.js +1 -1
  150. package/dist/components/LinearProgress/index.js +1 -1
  151. package/dist/components/Link/index.js +1 -1
  152. package/dist/components/List/index.js +1 -1
  153. package/dist/components/ListItem/index.js +1 -1
  154. package/dist/components/ListItemAvatar/index.js +1 -1
  155. package/dist/components/ListItemButton/index.js +2 -2
  156. package/dist/components/ListItemIcon/index.js +2 -2
  157. package/dist/components/ListItemText/index.js +2 -2
  158. package/dist/components/ListSubheader/index.js +1 -1
  159. package/dist/components/Menu/index.js +1 -1
  160. package/dist/components/MenuItem/index.js +1 -1
  161. package/dist/components/MenuList/index.js +1 -1
  162. package/dist/components/Paper/index.js +1 -1
  163. package/dist/components/Popover/index.d.ts +2 -0
  164. package/dist/components/Popover/index.js +10 -0
  165. package/dist/components/Popper/index.d.ts +2 -0
  166. package/dist/components/Popper/index.js +5 -0
  167. package/dist/components/Radio/index.js +1 -1
  168. package/dist/components/RadioGroup/index.js +1 -1
  169. package/dist/components/Select/Select.js +1 -1
  170. package/dist/components/Select/index.js +1 -1
  171. package/dist/components/SelectControl/SelectControl.js +9 -9
  172. package/dist/components/SelectControl/index.js +1 -1
  173. package/dist/components/Skeleton/index.js +1 -1
  174. package/dist/components/Snackbar/index.js +1 -1
  175. package/dist/components/Stack/index.js +1 -1
  176. package/dist/components/Step/index.js +1 -1
  177. package/dist/components/StepButton/index.js +1 -1
  178. package/dist/components/StepConnector/index.js +1 -1
  179. package/dist/components/StepContent/index.js +1 -1
  180. package/dist/components/StepIcon/index.js +1 -1
  181. package/dist/components/StepLabel/index.js +1 -1
  182. package/dist/components/Stepper/index.js +1 -1
  183. package/dist/components/SvgIcon/index.js +1 -1
  184. package/dist/components/Switch/index.js +1 -1
  185. package/dist/components/Tab/index.js +1 -1
  186. package/dist/components/Tabs/index.js +1 -1
  187. package/dist/components/ThemeProvider/ThemeProvider.js +1 -1
  188. package/dist/components/ToastContainer/ToastContainer.js +1 -1
  189. package/dist/components/ToastContainer/useToast.js +4 -4
  190. package/dist/components/Toolbar/index.js +1 -1
  191. package/dist/components/Tooltip/index.js +1 -1
  192. package/dist/components/Typography/index.js +1 -1
  193. package/dist/{containerClasses-CeRyE1e2.js → containerClasses-BzFNrSIR.js} +20 -19
  194. package/dist/{createSvgIcon-D1SROVbP.js → createSvgIcon-DHWmMfd-.js} +1 -1
  195. package/dist/createTheme-BnGUhbht.js +2328 -0
  196. package/dist/defaultTheme-B960IsQ-.js +5 -0
  197. package/dist/{dialogTitleClasses-L_U38KY4.js → dialogTitleClasses-Y20vamk3.js} +2 -2
  198. package/dist/{dividerClasses-3YRwzxAH.js → dividerClasses-C13nqEzJ.js} +2 -2
  199. package/dist/{elementAcceptingRef-DYOMXWeA.js → elementAcceptingRef-C0N4y82j.js} +1 -1
  200. package/dist/{elementTypeAcceptingRef-CnEbk7Q_.js → elementTypeAcceptingRef-B2d5_Vhf.js} +1 -1
  201. package/dist/{emotion-react.browser.esm-CNRN7WoC.js → emotion-react.browser.esm-VKtuqypl.js} +1 -1
  202. package/dist/{extendSxProp-BJVEtb89.js → extendSxProp-Ch2FDJvf.js} +1 -1
  203. package/dist/{generateUtilityClasses-CwzvHfCm.js → generateUtilityClasses-njw3KdKN.js} +1 -1
  204. package/dist/{getThemeProps-DT8XKnCO.js → getThemeProps-EVOScHVn.js} +1 -1
  205. package/dist/icons/ClearstoryIcon.js +1 -1
  206. package/dist/icons/InternalOnlyIcon.js +1 -1
  207. package/dist/icons/MoneyBucketIcon.js +1 -1
  208. package/dist/icons/MoreCircleOutlineIcon.js +1 -1
  209. package/dist/icons/index.js +4 -4
  210. package/dist/index-CyAhC1RZ.js +672 -0
  211. package/dist/{index-CcV0p0bw.js → index-D2IRntbh.js} +1 -1
  212. package/dist/{index-RvUJzkTI.js → index-De_dzPp4.js} +4 -4
  213. package/dist/{index-D7UP9u8i.js → index-JqwbD7Nb.js} +2 -2
  214. package/dist/{listItemButtonClasses-DY7lE6xx.js → listItemButtonClasses-B_nV0YiI.js} +2 -2
  215. package/dist/{listItemIconClasses-DZarNdF_.js → listItemIconClasses-CMPPJSFR.js} +2 -2
  216. package/dist/{listItemTextClasses-CMDvgiXw.js → listItemTextClasses-BUDn-rsR.js} +2 -2
  217. package/dist/main.d.ts +3 -0
  218. package/dist/main.js +223 -210
  219. package/dist/{memoTheme-DqlI3JW3.js → memoTheme-R-LnLD8I.js} +1 -1
  220. package/dist/{refType-CCckNw0a.js → refType-CedFpkve.js} +1 -1
  221. package/dist/{stackClasses-DqA89FGy.js → stackClasses-BGzeCt42.js} +22 -21
  222. package/dist/styled-DKUIcd6R.js +5 -0
  223. package/dist/{styled-bJ6DXD3Z.js → styled-fvngWWLy.js} +2 -2
  224. package/dist/theme/colorSchemes.js +1 -1
  225. package/dist/theme/index.js +25 -24
  226. package/dist/theme/internal.js +1 -1
  227. package/dist/{useTheme-BB-P11R3.js → useTheme-CbsaMxqD.js} +2 -2
  228. package/dist/{useTheme-DTBpB7d-.js → useTheme-Cz5y14_g.js} +1 -1
  229. package/dist/{useThemeProps-Dll6b3d8.js → useThemeProps-FvXli9RO.js} +2 -2
  230. package/dist/{utils-OCLAA0Ck.js → utils-CAuCuXQr.js} +1 -1
  231. package/package.json +1 -1
  232. package/dist/Menu-CA0hNHG8.js +0 -752
  233. package/dist/Snackbar-6S8FLk-7.js +0 -672
  234. package/dist/createTheme-D79OrE1w.js +0 -2997
  235. package/dist/defaultTheme-BmQF15Jm.js +0 -5
  236. package/dist/styled-w_4QIfiM.js +0 -5
@@ -1,672 +0,0 @@
1
- import * as l from "react";
2
- import { P as e, c as $, e as U, j as R } from "./createTheme-D79OrE1w.js";
3
- import { u as me } from "./useTimeout-DRd4LBXb.js";
4
- import { u as A } from "./useEventCallback-BAQJJ3ye.js";
5
- import { e as W } from "./mergeSlotProps-6s0dXxkk.js";
6
- import { u as be } from "./useTheme-BB-P11R3.js";
7
- import { jsxs as ge, jsx as S } from "react/jsx-runtime";
8
- import { s as x } from "./styled-bJ6DXD3Z.js";
9
- import { m as q } from "./memoTheme-DqlI3JW3.js";
10
- import { g as G } from "./generateUtilityClasses-CwzvHfCm.js";
11
- import { u as O } from "./useSlot-BVGwJA4b.js";
12
- import { u as V } from "./DefaultPropsProvider-PBxTVeaD.js";
13
- import { u as ye } from "./useForkRef-9kN4DArm.js";
14
- import { g as he } from "./getReactElementRef-DA-Xf2PF.js";
15
- import { o as M } from "./ownerDocument-CUrv0DIK.js";
16
- import { e as ke } from "./elementAcceptingRef-DYOMXWeA.js";
17
- import { e as Ce } from "./exactProp-C1Lmtwf_.js";
18
- import { c as ve } from "./clsx-OuTLNxxd.js";
19
- import { c as _ } from "./composeClasses-2Ou-RZJr.js";
20
- import { P as we } from "./Paper-DeGJAQE9.js";
21
- import { G as Ee } from "./Grow-DR-owdbZ.js";
22
- function I(n) {
23
- return n.substring(2).toLowerCase();
24
- }
25
- function Te(n, t) {
26
- return t.documentElement.clientWidth < n.clientX || t.documentElement.clientHeight < n.clientY;
27
- }
28
- function L(n) {
29
- const {
30
- children: t,
31
- disableReactTree: i = !1,
32
- mouseEvent: r = "onClick",
33
- onClickAway: u,
34
- touchEvent: p = "onTouchEnd"
35
- } = n, b = l.useRef(!1), f = l.useRef(null), g = l.useRef(!1), y = l.useRef(!1);
36
- l.useEffect(() => (setTimeout(() => {
37
- g.current = !0;
38
- }, 0), () => {
39
- g.current = !1;
40
- }), []);
41
- const m = ye(he(t), f), d = A((a) => {
42
- const c = y.current;
43
- y.current = !1;
44
- const k = M(f.current);
45
- if (!g.current || !f.current || "clientX" in a && Te(a, k))
46
- return;
47
- if (b.current) {
48
- b.current = !1;
49
- return;
50
- }
51
- let o;
52
- a.composedPath ? o = a.composedPath().includes(f.current) : o = !k.documentElement.contains(
53
- // @ts-expect-error returns `false` as intended when not dispatched from a Node
54
- a.target
55
- ) || f.current.contains(
56
- // @ts-expect-error returns `false` as intended when not dispatched from a Node
57
- a.target
58
- ), !o && (i || !c) && u(a);
59
- }), E = (a) => (c) => {
60
- y.current = !0;
61
- const k = t.props[a];
62
- k && k(c);
63
- }, w = {
64
- ref: m
65
- };
66
- return p !== !1 && (w[p] = E(p)), l.useEffect(() => {
67
- if (p !== !1) {
68
- const a = I(p), c = M(f.current), k = () => {
69
- b.current = !0;
70
- };
71
- return c.addEventListener(a, d), c.addEventListener("touchmove", k), () => {
72
- c.removeEventListener(a, d), c.removeEventListener("touchmove", k);
73
- };
74
- }
75
- }, [d, p]), r !== !1 && (w[r] = E(r)), l.useEffect(() => {
76
- if (r !== !1) {
77
- const a = I(r), c = M(f.current);
78
- return c.addEventListener(a, d), () => {
79
- c.removeEventListener(a, d);
80
- };
81
- }
82
- }, [d, r]), /* @__PURE__ */ l.cloneElement(t, w);
83
- }
84
- process.env.NODE_ENV !== "production" && (L.propTypes = {
85
- // ┌────────────────────────────── Warning ──────────────────────────────┐
86
- // │ These PropTypes are generated from the TypeScript type definitions. │
87
- // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
88
- // └─────────────────────────────────────────────────────────────────────┘
89
- /**
90
- * The wrapped element.
91
- */
92
- children: ke.isRequired,
93
- /**
94
- * If `true`, the React tree is ignored and only the DOM tree is considered.
95
- * This prop changes how portaled elements are handled.
96
- * @default false
97
- */
98
- disableReactTree: e.bool,
99
- /**
100
- * The mouse event to listen to. You can disable the listener by providing `false`.
101
- * @default 'onClick'
102
- */
103
- mouseEvent: e.oneOf(["onClick", "onMouseDown", "onMouseUp", "onPointerDown", "onPointerUp", !1]),
104
- /**
105
- * Callback fired when a "click away" event is detected.
106
- */
107
- onClickAway: e.func.isRequired,
108
- /**
109
- * The touch event to listen to. You can disable the listener by providing `false`.
110
- * @default 'onTouchEnd'
111
- */
112
- touchEvent: e.oneOf(["onTouchEnd", "onTouchStart", !1])
113
- });
114
- process.env.NODE_ENV !== "production" && (L.propTypes = Ce(L.propTypes));
115
- function Se(n = {}) {
116
- const {
117
- autoHideDuration: t = null,
118
- disableWindowBlurListener: i = !1,
119
- onClose: r,
120
- open: u,
121
- resumeHideDuration: p
122
- } = n, b = me();
123
- l.useEffect(() => {
124
- if (!u)
125
- return;
126
- function o(s) {
127
- s.defaultPrevented || s.key === "Escape" && r?.(s, "escapeKeyDown");
128
- }
129
- return document.addEventListener("keydown", o), () => {
130
- document.removeEventListener("keydown", o);
131
- };
132
- }, [u, r]);
133
- const f = A((o, s) => {
134
- r?.(o, s);
135
- }), g = A((o) => {
136
- !r || o == null || b.start(o, () => {
137
- f(null, "timeout");
138
- });
139
- });
140
- l.useEffect(() => (u && g(t), b.clear), [u, t, g, b]);
141
- const y = (o) => {
142
- r?.(o, "clickaway");
143
- }, m = b.clear, d = l.useCallback(() => {
144
- t != null && g(p ?? t * 0.5);
145
- }, [t, p, g]), E = (o) => (s) => {
146
- const C = o.onBlur;
147
- C?.(s), d();
148
- }, w = (o) => (s) => {
149
- const C = o.onFocus;
150
- C?.(s), m();
151
- }, a = (o) => (s) => {
152
- const C = o.onMouseEnter;
153
- C?.(s), m();
154
- }, c = (o) => (s) => {
155
- const C = o.onMouseLeave;
156
- C?.(s), d();
157
- };
158
- return l.useEffect(() => {
159
- if (!i && u)
160
- return window.addEventListener("focus", d), window.addEventListener("blur", m), () => {
161
- window.removeEventListener("focus", d), window.removeEventListener("blur", m);
162
- };
163
- }, [i, u, d, m]), {
164
- getRootProps: (o = {}) => {
165
- const s = {
166
- ...W(n),
167
- ...W(o)
168
- };
169
- return {
170
- // ClickAwayListener adds an `onClick` prop which results in the alert not being announced.
171
- // See https://github.com/mui/material-ui/issues/29080
172
- role: "presentation",
173
- ...o,
174
- ...s,
175
- onBlur: E(s),
176
- onFocus: w(s),
177
- onMouseEnter: a(s),
178
- onMouseLeave: c(s)
179
- };
180
- },
181
- onClickAway: y
182
- };
183
- }
184
- function Pe(n) {
185
- return $("MuiSnackbarContent", n);
186
- }
187
- G("MuiSnackbarContent", ["root", "message", "action"]);
188
- const Oe = (n) => {
189
- const {
190
- classes: t
191
- } = n;
192
- return _({
193
- root: ["root"],
194
- action: ["action"],
195
- message: ["message"]
196
- }, Pe, t);
197
- }, Re = x(we, {
198
- name: "MuiSnackbarContent",
199
- slot: "Root"
200
- })(q(({
201
- theme: n
202
- }) => {
203
- const t = n.palette.mode === "light" ? 0.8 : 0.98;
204
- return {
205
- ...n.typography.body2,
206
- color: n.vars ? n.vars.palette.SnackbarContent.color : n.palette.getContrastText(U(n.palette.background.default, t)),
207
- backgroundColor: n.vars ? n.vars.palette.SnackbarContent.bg : U(n.palette.background.default, t),
208
- display: "flex",
209
- alignItems: "center",
210
- flexWrap: "wrap",
211
- padding: "6px 16px",
212
- flexGrow: 1,
213
- [n.breakpoints.up("sm")]: {
214
- flexGrow: "initial",
215
- minWidth: 288
216
- }
217
- };
218
- })), Le = x("div", {
219
- name: "MuiSnackbarContent",
220
- slot: "Message"
221
- })({
222
- padding: "8px 0"
223
- }), xe = x("div", {
224
- name: "MuiSnackbarContent",
225
- slot: "Action"
226
- })({
227
- display: "flex",
228
- alignItems: "center",
229
- marginLeft: "auto",
230
- paddingLeft: 16,
231
- marginRight: -8
232
- }), X = /* @__PURE__ */ l.forwardRef(function(t, i) {
233
- const r = V({
234
- props: t,
235
- name: "MuiSnackbarContent"
236
- }), {
237
- action: u,
238
- className: p,
239
- message: b,
240
- role: f = "alert",
241
- ...g
242
- } = r, y = r, m = Oe(y);
243
- return /* @__PURE__ */ ge(Re, {
244
- role: f,
245
- elevation: 6,
246
- className: ve(m.root, p),
247
- ownerState: y,
248
- ref: i,
249
- ...g,
250
- children: [/* @__PURE__ */ S(Le, {
251
- className: m.message,
252
- ownerState: y,
253
- children: b
254
- }), u ? /* @__PURE__ */ S(xe, {
255
- className: m.action,
256
- ownerState: y,
257
- children: u
258
- }) : null]
259
- });
260
- });
261
- process.env.NODE_ENV !== "production" && (X.propTypes = {
262
- // ┌────────────────────────────── Warning ──────────────────────────────┐
263
- // │ These PropTypes are generated from the TypeScript type definitions. │
264
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
265
- // └─────────────────────────────────────────────────────────────────────┘
266
- /**
267
- * The action to display. It renders after the message, at the end of the snackbar.
268
- */
269
- action: e.node,
270
- /**
271
- * Override or extend the styles applied to the component.
272
- */
273
- classes: e.object,
274
- /**
275
- * @ignore
276
- */
277
- className: e.string,
278
- /**
279
- * The message to display.
280
- */
281
- message: e.node,
282
- /**
283
- * The ARIA role attribute of the element.
284
- * @default 'alert'
285
- */
286
- role: e.string,
287
- /**
288
- * The system prop that allows defining system overrides as well as additional CSS styles.
289
- */
290
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
291
- });
292
- function Me(n) {
293
- return $("MuiSnackbar", n);
294
- }
295
- const on = G("MuiSnackbar", ["root", "anchorOriginTopCenter", "anchorOriginBottomCenter", "anchorOriginTopRight", "anchorOriginBottomRight", "anchorOriginTopLeft", "anchorOriginBottomLeft"]), Ae = (n) => {
296
- const {
297
- classes: t,
298
- anchorOrigin: i
299
- } = n, r = {
300
- root: ["root", `anchorOrigin${R(i.vertical)}${R(i.horizontal)}`]
301
- };
302
- return _(r, Me, t);
303
- }, je = x("div", {
304
- name: "MuiSnackbar",
305
- slot: "Root",
306
- overridesResolver: (n, t) => {
307
- const {
308
- ownerState: i
309
- } = n;
310
- return [t.root, t[`anchorOrigin${R(i.anchorOrigin.vertical)}${R(i.anchorOrigin.horizontal)}`]];
311
- }
312
- })(q(({
313
- theme: n
314
- }) => ({
315
- zIndex: (n.vars || n).zIndex.snackbar,
316
- position: "fixed",
317
- display: "flex",
318
- left: 8,
319
- right: 8,
320
- justifyContent: "center",
321
- alignItems: "center",
322
- variants: [{
323
- props: ({
324
- ownerState: t
325
- }) => t.anchorOrigin.vertical === "top",
326
- style: {
327
- top: 8,
328
- [n.breakpoints.up("sm")]: {
329
- top: 24
330
- }
331
- }
332
- }, {
333
- props: ({
334
- ownerState: t
335
- }) => t.anchorOrigin.vertical !== "top",
336
- style: {
337
- bottom: 8,
338
- [n.breakpoints.up("sm")]: {
339
- bottom: 24
340
- }
341
- }
342
- }, {
343
- props: ({
344
- ownerState: t
345
- }) => t.anchorOrigin.horizontal === "left",
346
- style: {
347
- justifyContent: "flex-start",
348
- [n.breakpoints.up("sm")]: {
349
- left: 24,
350
- right: "auto"
351
- }
352
- }
353
- }, {
354
- props: ({
355
- ownerState: t
356
- }) => t.anchorOrigin.horizontal === "right",
357
- style: {
358
- justifyContent: "flex-end",
359
- [n.breakpoints.up("sm")]: {
360
- right: 24,
361
- left: "auto"
362
- }
363
- }
364
- }, {
365
- props: ({
366
- ownerState: t
367
- }) => t.anchorOrigin.horizontal === "center",
368
- style: {
369
- [n.breakpoints.up("sm")]: {
370
- left: "50%",
371
- right: "auto",
372
- transform: "translateX(-50%)"
373
- }
374
- }
375
- }]
376
- }))), De = /* @__PURE__ */ l.forwardRef(function(t, i) {
377
- const r = V({
378
- props: t,
379
- name: "MuiSnackbar"
380
- }), u = be(), p = {
381
- enter: u.transitions.duration.enteringScreen,
382
- exit: u.transitions.duration.leavingScreen
383
- }, {
384
- action: b,
385
- anchorOrigin: {
386
- vertical: f,
387
- horizontal: g
388
- } = {
389
- vertical: "bottom",
390
- horizontal: "left"
391
- },
392
- autoHideDuration: y = null,
393
- children: m,
394
- className: d,
395
- ClickAwayListenerProps: E,
396
- ContentProps: w,
397
- disableWindowBlurListener: a = !1,
398
- message: c,
399
- onBlur: k,
400
- onClose: o,
401
- onFocus: s,
402
- onMouseEnter: C,
403
- onMouseLeave: Ne,
404
- open: j,
405
- resumeHideDuration: He,
406
- slots: D = {},
407
- slotProps: K = {},
408
- TransitionComponent: N,
409
- transitionDuration: H = p,
410
- TransitionProps: {
411
- onEnter: z,
412
- onExited: B,
413
- ...Y
414
- } = {},
415
- ...J
416
- } = r, T = {
417
- ...r,
418
- anchorOrigin: {
419
- vertical: f,
420
- horizontal: g
421
- },
422
- autoHideDuration: y,
423
- disableWindowBlurListener: a,
424
- TransitionComponent: N,
425
- transitionDuration: H
426
- }, Q = Ae(T), {
427
- getRootProps: Z,
428
- onClickAway: ee
429
- } = Se({
430
- ...T
431
- }), [ne, F] = l.useState(!0), te = (v) => {
432
- F(!0), B && B(v);
433
- }, oe = (v, h) => {
434
- F(!1), z && z(v, h);
435
- }, P = {
436
- slots: {
437
- transition: N,
438
- ...D
439
- },
440
- slotProps: {
441
- content: w,
442
- clickAwayListener: E,
443
- transition: Y,
444
- ...K
445
- }
446
- }, [re, se] = O("root", {
447
- ref: i,
448
- className: [Q.root, d],
449
- elementType: je,
450
- getSlotProps: Z,
451
- externalForwardedProps: {
452
- ...P,
453
- ...J
454
- },
455
- ownerState: T
456
- }), [ae, {
457
- ownerState: ie,
458
- ...ce
459
- }] = O("clickAwayListener", {
460
- elementType: L,
461
- externalForwardedProps: P,
462
- getSlotProps: (v) => ({
463
- onClickAway: (...h) => {
464
- const de = h[0];
465
- v.onClickAway?.(...h), !de?.defaultMuiPrevented && ee(...h);
466
- }
467
- }),
468
- ownerState: T
469
- }), [le, ue] = O("content", {
470
- elementType: X,
471
- shouldForwardComponentProp: !0,
472
- externalForwardedProps: P,
473
- additionalProps: {
474
- message: c,
475
- action: b
476
- },
477
- ownerState: T
478
- }), [pe, fe] = O("transition", {
479
- elementType: Ee,
480
- externalForwardedProps: P,
481
- getSlotProps: (v) => ({
482
- onEnter: (...h) => {
483
- v.onEnter?.(...h), oe(...h);
484
- },
485
- onExited: (...h) => {
486
- v.onExited?.(...h), te(...h);
487
- }
488
- }),
489
- additionalProps: {
490
- appear: !0,
491
- in: j,
492
- timeout: H,
493
- direction: f === "top" ? "down" : "up"
494
- },
495
- ownerState: T
496
- });
497
- return !j && ne ? null : /* @__PURE__ */ S(ae, {
498
- ...ce,
499
- ...D.clickAwayListener && {
500
- ownerState: ie
501
- },
502
- children: /* @__PURE__ */ S(re, {
503
- ...se,
504
- children: /* @__PURE__ */ S(pe, {
505
- ...fe,
506
- children: m || /* @__PURE__ */ S(le, {
507
- ...ue
508
- })
509
- })
510
- })
511
- });
512
- });
513
- process.env.NODE_ENV !== "production" && (De.propTypes = {
514
- // ┌────────────────────────────── Warning ──────────────────────────────┐
515
- // │ These PropTypes are generated from the TypeScript type definitions. │
516
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
517
- // └─────────────────────────────────────────────────────────────────────┘
518
- /**
519
- * The action to display. It renders after the message, at the end of the snackbar.
520
- */
521
- action: e.node,
522
- /**
523
- * The anchor of the `Snackbar`.
524
- * On smaller screens, the component grows to occupy all the available width,
525
- * the horizontal alignment is ignored.
526
- * @default { vertical: 'bottom', horizontal: 'left' }
527
- */
528
- anchorOrigin: e.shape({
529
- horizontal: e.oneOf(["center", "left", "right"]).isRequired,
530
- vertical: e.oneOf(["bottom", "top"]).isRequired
531
- }),
532
- /**
533
- * The number of milliseconds to wait before automatically calling the
534
- * `onClose` function. `onClose` should then set the state of the `open`
535
- * prop to hide the Snackbar. This behavior is disabled by default with
536
- * the `null` value.
537
- * @default null
538
- */
539
- autoHideDuration: e.number,
540
- /**
541
- * Replace the `SnackbarContent` component.
542
- */
543
- children: e.element,
544
- /**
545
- * Override or extend the styles applied to the component.
546
- */
547
- classes: e.object,
548
- /**
549
- * @ignore
550
- */
551
- className: e.string,
552
- /**
553
- * Props applied to the `ClickAwayListener` element.
554
- * @deprecated Use `slotProps.clickAwayListener` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
555
- */
556
- ClickAwayListenerProps: e.object,
557
- /**
558
- * Props applied to the [`SnackbarContent`](https://mui.com/material-ui/api/snackbar-content/) element.
559
- * @deprecated Use `slotProps.content` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
560
- */
561
- ContentProps: e.object,
562
- /**
563
- * If `true`, the `autoHideDuration` timer will expire even if the window is not focused.
564
- * @default false
565
- */
566
- disableWindowBlurListener: e.bool,
567
- /**
568
- * When displaying multiple consecutive snackbars using a single parent-rendered
569
- * `<Snackbar/>`, add the `key` prop to ensure independent treatment of each message.
570
- * For instance, use `<Snackbar key={message} />`. Otherwise, messages might update
571
- * in place, and features like `autoHideDuration` could be affected.
572
- */
573
- key: () => null,
574
- /**
575
- * The message to display.
576
- */
577
- message: e.node,
578
- /**
579
- * @ignore
580
- */
581
- onBlur: e.func,
582
- /**
583
- * Callback fired when the component requests to be closed.
584
- * Typically `onClose` is used to set state in the parent component,
585
- * which is used to control the `Snackbar` `open` prop.
586
- * The `reason` parameter can optionally be used to control the response to `onClose`,
587
- * for example ignoring `clickaway`.
588
- *
589
- * @param {React.SyntheticEvent<any> | Event} event The event source of the callback.
590
- * @param {string} reason Can be: `"timeout"` (`autoHideDuration` expired), `"clickaway"`, or `"escapeKeyDown"`.
591
- */
592
- onClose: e.func,
593
- /**
594
- * @ignore
595
- */
596
- onFocus: e.func,
597
- /**
598
- * @ignore
599
- */
600
- onMouseEnter: e.func,
601
- /**
602
- * @ignore
603
- */
604
- onMouseLeave: e.func,
605
- /**
606
- * If `true`, the component is shown.
607
- */
608
- open: e.bool,
609
- /**
610
- * The number of milliseconds to wait before dismissing after user interaction.
611
- * If `autoHideDuration` prop isn't specified, it does nothing.
612
- * If `autoHideDuration` prop is specified but `resumeHideDuration` isn't,
613
- * we default to `autoHideDuration / 2` ms.
614
- */
615
- resumeHideDuration: e.number,
616
- /**
617
- * The props used for each slot inside.
618
- * @default {}
619
- */
620
- slotProps: e.shape({
621
- clickAwayListener: e.oneOfType([e.func, e.object]),
622
- content: e.oneOfType([e.func, e.object]),
623
- root: e.oneOfType([e.func, e.object]),
624
- transition: e.oneOfType([e.func, e.object])
625
- }),
626
- /**
627
- * The components used for each slot inside.
628
- * @default {}
629
- */
630
- slots: e.shape({
631
- clickAwayListener: e.elementType,
632
- content: e.elementType,
633
- root: e.elementType,
634
- transition: e.elementType
635
- }),
636
- /**
637
- * The system prop that allows defining system overrides as well as additional CSS styles.
638
- */
639
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
640
- /**
641
- * The component used for the transition.
642
- * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
643
- * @deprecated Use `slots.transition` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
644
- * @default Grow
645
- */
646
- TransitionComponent: e.elementType,
647
- /**
648
- * The duration for the transition, in milliseconds.
649
- * You may specify a single timeout for all transitions, or individually with an object.
650
- * @default {
651
- * enter: theme.transitions.duration.enteringScreen,
652
- * exit: theme.transitions.duration.leavingScreen,
653
- * }
654
- */
655
- transitionDuration: e.oneOfType([e.number, e.shape({
656
- appear: e.number,
657
- enter: e.number,
658
- exit: e.number
659
- })]),
660
- /**
661
- * Props applied to the transition element.
662
- * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
663
- * @deprecated Use `slotProps.transition` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
664
- * @default {}
665
- */
666
- TransitionProps: e.object
667
- });
668
- export {
669
- De as S,
670
- Me as g,
671
- on as s
672
- };