@solostylist/ui-kit 1.0.203 → 1.0.205

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 (365) hide show
  1. package/dist/ArrowUpward-CDLbIMHR.js +6 -0
  2. package/dist/Box-CCxGQYgC.js +46 -0
  3. package/dist/ButtonBase-BpUvp8ep.js +801 -0
  4. package/dist/ChevronLeft-C7DUyLoc.js +6 -0
  5. package/dist/ChevronRight-VFk57Tte.js +6 -0
  6. package/dist/Close-OtVsJy75.js +6 -0
  7. package/dist/ContentCopy-DHDP4d6g.js +6 -0
  8. package/dist/DefaultPropsProvider-DpRXvTbj.js +157 -0
  9. package/dist/Download-Bbx6BZUJ.js +6 -0
  10. package/dist/ExpandMore-BTC1yHzp.js +6 -0
  11. package/dist/Favorite-mcH9KX-m.js +6 -0
  12. package/dist/Menu-Dhh4e9H1.js +1662 -0
  13. package/dist/MenuItem-aaIy8lan.js +213 -0
  14. package/dist/Paper--8Q3qCqb.js +329 -0
  15. package/dist/Select-B5RvkbDO.js +2545 -0
  16. package/dist/Stack-D-aoKnaS.js +158 -0
  17. package/dist/Typography-CswuXQLF.js +187 -0
  18. package/dist/assets/s-carousel.css +1 -1
  19. package/dist/assets/s-overlay-scrollbar.css +10 -1
  20. package/dist/assets/stripe-input.css +1 -1
  21. package/dist/avatar-BVV8tT0K.js +10 -0
  22. package/dist/buttonBaseClasses-CzfJbQi5.js +13 -0
  23. package/dist/checkbox-Dd2nIREk.js +57 -0
  24. package/dist/chunk-efA98nb6.js +13 -0
  25. package/dist/createSimplePaletteValueFilter-dAWZ3p3z.js +14 -0
  26. package/dist/createSvgIcon-KjKEsKNV.js +153 -0
  27. package/dist/createTheme-DuS5_nJb.js +2430 -0
  28. package/dist/defaultTheme-DBynruYK.js +5 -0
  29. package/dist/entries/carousel.js +3 -4
  30. package/dist/entries/chat.js +3 -4
  31. package/dist/entries/code.js +3 -4
  32. package/dist/entries/core.js +56 -122
  33. package/dist/entries/dates.js +7 -12
  34. package/dist/entries/dropzone.js +3 -4
  35. package/dist/entries/editor.js +2 -4
  36. package/dist/entries/gallery.js +7 -13
  37. package/dist/entries/i18n.js +3 -7
  38. package/dist/entries/motion.js +14 -27
  39. package/dist/entries/scrollbar.js +2 -4
  40. package/dist/entries/stripe.js +6 -10
  41. package/dist/extendSxProp-YPyfzlEb.js +29 -0
  42. package/dist/generateUtilityClass-DdqZpZoW.js +34 -0
  43. package/dist/generateUtilityClasses-BMwEKe3O.js +10 -0
  44. package/dist/hooks/index.js +5 -11
  45. package/dist/hooks/use-count-down.js +85 -76
  46. package/dist/hooks/use-dialog.js +21 -18
  47. package/dist/hooks/use-is-passed-position.js +20 -20
  48. package/dist/hooks/use-popover.js +18 -18
  49. package/dist/hooks/use-scroll-animation.js +74 -56
  50. package/dist/iconButtonClasses-ApDUTw5e.js +27 -0
  51. package/dist/identifier-_S1f0Pg2.js +190 -0
  52. package/dist/main.js +103 -196
  53. package/dist/mergeSlotProps-BG-pTgpj.js +48 -0
  54. package/dist/objectWithoutPropertiesLoose-BdL2_POW.js +23 -0
  55. package/dist/outlinedInputClasses-bgmdcolQ.js +43 -0
  56. package/dist/resolveProps-CcZ6Bxlf.js +30 -0
  57. package/dist/s-accordion/index.js +3 -4
  58. package/dist/s-accordion/s-accordion.js +3 -949
  59. package/dist/s-accordion-Da1IZflX.js +712 -0
  60. package/dist/s-action-overlay/index.js +2 -4
  61. package/dist/s-action-overlay/s-action-overlay.js +108 -109
  62. package/dist/s-autocomplete/index.js +2 -4
  63. package/dist/s-autocomplete/s-autocomplete.js +25 -31
  64. package/dist/s-avatar/index.js +2 -4
  65. package/dist/s-avatar/s-avatar.js +32 -22
  66. package/dist/s-blur-text/index.js +2 -4
  67. package/dist/s-blur-text/s-blur-text.js +67 -81
  68. package/dist/s-breadcrumbs/index.js +2 -3
  69. package/dist/s-breadcrumbs/s-breadcrumbs.js +49 -44
  70. package/dist/s-button/index.js +2 -4
  71. package/dist/s-button/s-button.js +11 -9
  72. package/dist/s-carousel/index.js +3 -4
  73. package/dist/s-carousel/s-carousel.js +3 -2480
  74. package/dist/s-carousel-BoDg9pKU.js +125 -0
  75. package/dist/s-category-card/index.js +1 -3
  76. package/dist/s-category-card/s-category-card.js +70 -105
  77. package/dist/s-chat-input/index.js +3 -4
  78. package/dist/s-chat-input/s-chat-input.js +3 -319
  79. package/dist/s-chat-input-v_XIZVGk.js +283 -0
  80. package/dist/s-chat-message/index.js +3 -4
  81. package/dist/s-chat-message/s-chat-message.js +3 -283
  82. package/dist/s-chat-message-CWtxsicj.js +281 -0
  83. package/dist/s-checkbox/index.js +2 -4
  84. package/dist/s-checkbox/s-checkbox.js +27 -17
  85. package/dist/s-chip/index.js +2 -4
  86. package/dist/s-chip/s-chip.js +11 -9
  87. package/dist/s-chips/index.js +2 -4
  88. package/dist/s-chips/s-chips.js +91 -86
  89. package/dist/s-code-block/index.js +3 -4
  90. package/dist/s-code-block/s-code-block.js +3 -1052
  91. package/dist/s-code-block-BqYdR0Em.js +608 -0
  92. package/dist/s-comment-message/index.js +3 -4
  93. package/dist/s-comment-message/s-comment-message.js +3 -123
  94. package/dist/s-comment-message-DDAHdQqY.js +195 -0
  95. package/dist/s-copyable-text/index.js +3 -4
  96. package/dist/s-copyable-text/s-copyable-text.js +50 -54
  97. package/dist/s-countdown/index.js +3 -5
  98. package/dist/s-countdown/s-count-box.js +102 -106
  99. package/dist/s-countdown/s-count-down.js +101 -109
  100. package/dist/s-data-table/index.js +3 -4
  101. package/dist/s-data-table/s-data-table.js +3 -1291
  102. package/dist/s-data-table-BjqqIsFX.js +893 -0
  103. package/dist/s-date-picker/index.js +3 -4
  104. package/dist/s-date-picker/s-date-picker.js +3 -1521
  105. package/dist/s-date-picker-BYqxsjPU.js +581 -0
  106. package/dist/s-datetime-picker/index.js +3 -4
  107. package/dist/s-datetime-picker/s-datetime-picker.js +3 -5180
  108. package/dist/s-datetime-picker-BtwGoxL3.js +3808 -0
  109. package/dist/s-dialog/index.js +2 -3
  110. package/dist/s-dialog/s-dialog.js +44 -36
  111. package/dist/s-dialog-confirm/index.js +3 -6
  112. package/dist/s-dialog-confirm/s-dialog-confirm.js +85 -74
  113. package/dist/s-dialog-message/index.js +3 -6
  114. package/dist/s-dialog-message/s-dialog-message.js +75 -66
  115. package/dist/s-empty/index.js +1 -3
  116. package/dist/s-empty/s-empty.js +13 -8
  117. package/dist/s-error/index.js +2 -4
  118. package/dist/s-error/s-error.js +31 -20
  119. package/dist/s-error-layout/index.js +2 -4
  120. package/dist/s-error-layout/s-error-layout.js +78 -56
  121. package/dist/s-file-dropzone/index.js +3 -4
  122. package/dist/s-file-dropzone/s-file-dropzone.js +3 -124
  123. package/dist/s-file-dropzone-BJBNFC_b.js +134 -0
  124. package/dist/s-file-icon/index.js +3 -4
  125. package/dist/s-file-icon/s-file-icon.js +327 -272
  126. package/dist/s-flex-box/index.js +3 -4
  127. package/dist/s-flex-box/s-flex-box.js +12 -8
  128. package/dist/s-form/index.js +2 -4
  129. package/dist/s-form/s-form.js +23 -15
  130. package/dist/s-gallery/index.js +3 -5
  131. package/dist/s-gallery/s-gallery.js +310 -346
  132. package/dist/s-glow-button/index.js +3 -4
  133. package/dist/s-glow-button/s-glow-button.js +29 -42
  134. package/dist/s-gradient-icon/index.js +2 -4
  135. package/dist/s-gradient-icon/s-gradient-icon.js +124 -79
  136. package/dist/s-i18n-provider/index.js +2 -4
  137. package/dist/s-i18n-provider/s-i18n-provider.js +23 -27
  138. package/dist/s-icon-button/index.js +2 -4
  139. package/dist/s-icon-button/s-icon-button.js +11 -8
  140. package/dist/s-image-comparison/index.js +3 -4
  141. package/dist/s-image-comparison/s-image-comparison.js +169 -207
  142. package/dist/s-image-modal/index.js +3 -5
  143. package/dist/s-image-modal/s-image-modal.js +396 -387
  144. package/dist/s-item-not-found/index.js +1 -3
  145. package/dist/s-item-not-found/s-item-not-found.js +240 -262
  146. package/dist/s-label/index.js +3 -4
  147. package/dist/s-label/s-label.js +3 -17
  148. package/dist/s-label-Bt4vQGGN.js +30 -0
  149. package/dist/s-language-switcher/index.js +3 -6
  150. package/dist/s-language-switcher/s-language-switcher.js +3 -252
  151. package/dist/s-language-switcher-BJP1r1la.js +198 -0
  152. package/dist/s-lazy-image/index.js +2 -4
  153. package/dist/s-lazy-image/s-lazy-image.js +41 -56
  154. package/dist/s-link/index.js +2 -4
  155. package/dist/s-link/s-link.js +30 -37
  156. package/dist/s-localization-provider/index.js +3 -4
  157. package/dist/s-localization-provider/s-localization-provider.js +3 -562
  158. package/dist/s-localization-provider-CeOR72Ti.js +537 -0
  159. package/dist/s-moving-border/index.js +1 -3
  160. package/dist/s-moving-border/s-moving-border.js +117 -131
  161. package/dist/s-multi-select/index.js +3 -4
  162. package/dist/s-multi-select/s-multi-select.js +3 -82
  163. package/dist/s-multi-select-xKP4heeG.js +64 -0
  164. package/dist/s-no-ssr/index.js +2 -4
  165. package/dist/s-no-ssr/s-no-ssr.js +13 -14
  166. package/dist/s-overlay-scrollbar/index.js +2 -4
  167. package/dist/s-overlay-scrollbar/s-overlay-scrollbar.js +34 -37
  168. package/dist/s-pagination/index.js +2 -4
  169. package/dist/s-pagination/s-pagination.js +32 -15
  170. package/dist/s-pixel-reveal/index.js +3 -4
  171. package/dist/s-pixel-reveal/s-pixel-reveal.js +138 -156
  172. package/dist/s-radial-pulse-animate/index.js +3 -4
  173. package/dist/s-radial-pulse-animate/s-radial-pulse-animate.js +80 -122
  174. package/dist/s-rating/index.js +1 -3
  175. package/dist/s-rating/s-rating.js +11 -9
  176. package/dist/s-review/index.js +3 -4
  177. package/dist/s-review/s-review.js +3 -160
  178. package/dist/s-review-DOBlCEU2.js +241 -0
  179. package/dist/s-scroll-reveal/index.js +2 -4
  180. package/dist/s-scroll-reveal/s-scroll-reveal.js +68 -64
  181. package/dist/s-scroll-to-top/index.js +3 -4
  182. package/dist/s-scroll-to-top/s-scroll-to-top.js +45 -44
  183. package/dist/s-scroll-velocity/index.js +4 -8
  184. package/dist/s-scroll-velocity/s-scroll-velocity.js +14 -8
  185. package/dist/s-scroll-velocity/scroll-velocity-container.js +25 -30
  186. package/dist/s-scroll-velocity/scroll-velocity-row.js +97 -118
  187. package/dist/s-select/index.js +3 -4
  188. package/dist/s-select/s-select.js +3 -112
  189. package/dist/s-select-DXbeZ0CG.js +110 -0
  190. package/dist/s-select-list/index.js +2 -4
  191. package/dist/s-select-list/s-select-list.js +44 -49
  192. package/dist/s-skeleton/index.js +2 -4
  193. package/dist/s-skeleton/s-skeleton.js +69 -35
  194. package/dist/s-snackbar-message/index.js +2 -6
  195. package/dist/s-snackbar-message/s-snackbar-message.js +48 -61
  196. package/dist/s-spotlight-cursor/index.js +2 -4
  197. package/dist/s-spotlight-cursor/s-spotlight-cursor.js +58 -61
  198. package/dist/s-stripe/index.js +6 -10
  199. package/dist/s-stripe/s-stripe-cvc.js +14 -10
  200. package/dist/s-stripe/s-stripe-expiry.js +14 -10
  201. package/dist/s-stripe/s-stripe-number.js +14 -10
  202. package/dist/s-stripe/s-stripe.js +31 -37
  203. package/dist/s-stripe/stripe-input.js +57 -81
  204. package/dist/s-switch/index.js +1 -3
  205. package/dist/s-switch/s-switch.js +27 -17
  206. package/dist/s-tabs/index.js +4 -8
  207. package/dist/s-tabs/s-tab-panel.js +23 -29
  208. package/dist/s-tabs/s-tab.js +11 -8
  209. package/dist/s-tabs/s-tabs.js +39 -35
  210. package/dist/s-text-editor/index.js +3 -5
  211. package/dist/s-text-editor/s-text-editor-toolbar.js +3 -207
  212. package/dist/s-text-editor/s-text-editor.js +75 -81
  213. package/dist/s-text-editor-toolbar-BDDttdIt.js +177 -0
  214. package/dist/s-text-field/index.js +3 -4
  215. package/dist/s-text-field/s-text-field.js +3 -49
  216. package/dist/s-text-field-ni42E-1x.js +41 -0
  217. package/dist/s-text-shimmer/index.js +3 -4
  218. package/dist/s-text-shimmer/s-text-shimmer.js +31 -32
  219. package/dist/s-text-truncation/index.js +1 -3
  220. package/dist/s-text-truncation/s-text-truncation.js +79 -81
  221. package/dist/s-theme-demo/index.js +3 -4
  222. package/dist/s-theme-demo/s-theme-demo.js +3 -380
  223. package/dist/s-theme-demo-B4pz6fse.js +828 -0
  224. package/dist/s-theme-provider/index.js +3 -4
  225. package/dist/s-theme-provider/s-theme-provider.js +35 -50
  226. package/dist/s-theme-switch/index.js +3 -4
  227. package/dist/s-theme-switch/s-theme-switch.js +3 -41
  228. package/dist/s-theme-switch-CCEdponC.js +37 -0
  229. package/dist/s-tip/index.js +3 -4
  230. package/dist/s-tip/s-tip.js +3 -34
  231. package/dist/s-tip-CG51Q6oR.js +34 -0
  232. package/dist/s-tool-bar/index.js +3 -4
  233. package/dist/s-tool-bar/s-tool-bar.js +3 -478
  234. package/dist/s-tool-bar-C2lZhhJm.js +404 -0
  235. package/dist/s-two-pane-layout/index.js +2 -3
  236. package/dist/s-two-pane-layout/s-two-pane-layout.js +102 -101
  237. package/dist/s-typewriter-text/index.js +2 -4
  238. package/dist/s-typewriter-text/s-typewriter-text.js +39 -45
  239. package/dist/s-zoom-image/index.js +1 -3
  240. package/dist/s-zoom-image/s-zoom-image.js +62 -88
  241. package/dist/select-D9KH9LAz.js +11 -0
  242. package/dist/styled-Dz7rwAje.js +168 -0
  243. package/dist/svgIconClasses-CygVMw0E.js +20 -0
  244. package/dist/tabClasses-CIRFQ-PB.js +21 -0
  245. package/dist/theme/components/accordion-details.js +7 -8
  246. package/dist/theme/components/accordion-summary.js +12 -17
  247. package/dist/theme/components/accordion.js +24 -32
  248. package/dist/theme/components/alert.js +45 -72
  249. package/dist/theme/components/app-bar.js +12 -18
  250. package/dist/theme/components/autocomplete.js +19 -30
  251. package/dist/theme/components/avatar.js +3 -13
  252. package/dist/theme/components/backdrop.js +13 -12
  253. package/dist/theme/components/button-base.js +12 -14
  254. package/dist/theme/components/button.js +92 -138
  255. package/dist/theme/components/card-actions.js +4 -10
  256. package/dist/theme/components/card-content.js +4 -11
  257. package/dist/theme/components/card-header.js +4 -10
  258. package/dist/theme/components/card.js +23 -35
  259. package/dist/theme/components/checkbox.js +3 -65
  260. package/dist/theme/components/chip.js +67 -106
  261. package/dist/theme/components/components.js +112 -111
  262. package/dist/theme/components/container.js +4 -6
  263. package/dist/theme/components/dialog-actions.js +4 -10
  264. package/dist/theme/components/dialog.js +11 -17
  265. package/dist/theme/components/drawer.js +4 -10
  266. package/dist/theme/components/form-control.js +4 -10
  267. package/dist/theme/components/form-label.js +7 -11
  268. package/dist/theme/components/icon-button.js +82 -132
  269. package/dist/theme/components/icon.js +9 -21
  270. package/dist/theme/components/input-adornment.js +7 -13
  271. package/dist/theme/components/input-base.js +10 -16
  272. package/dist/theme/components/linear-progress.js +11 -16
  273. package/dist/theme/components/link.js +31 -37
  274. package/dist/theme/components/list-item-button.js +27 -44
  275. package/dist/theme/components/list-item-icon.js +4 -10
  276. package/dist/theme/components/list-item-text.js +14 -16
  277. package/dist/theme/components/list-item.js +12 -20
  278. package/dist/theme/components/list-subheader.js +10 -14
  279. package/dist/theme/components/list.js +9 -13
  280. package/dist/theme/components/menu-item.js +7 -8
  281. package/dist/theme/components/menu.js +20 -22
  282. package/dist/theme/components/outlined-input.js +41 -64
  283. package/dist/theme/components/pagination-item.js +8 -18
  284. package/dist/theme/components/paper.js +4 -8
  285. package/dist/theme/components/popover.js +11 -13
  286. package/dist/theme/components/rating.js +4 -8
  287. package/dist/theme/components/select.js +3 -13
  288. package/dist/theme/components/skeleton.js +4 -10
  289. package/dist/theme/components/slider.js +4 -8
  290. package/dist/theme/components/step-connector.js +9 -13
  291. package/dist/theme/components/step-icon.js +39 -46
  292. package/dist/theme/components/step-label.js +7 -13
  293. package/dist/theme/components/svg-icon.js +20 -37
  294. package/dist/theme/components/tab.js +20 -34
  295. package/dist/theme/components/table-cell.js +4 -10
  296. package/dist/theme/components/table-pagination.js +14 -18
  297. package/dist/theme/components/tabs.js +20 -24
  298. package/dist/theme/components/toggle-button-group.js +3 -23
  299. package/dist/theme/components/toggle-button.js +3 -21
  300. package/dist/theme/components/tooltip.js +23 -23
  301. package/dist/theme/theme-primitives.js +3 -410
  302. package/dist/theme-primitives-BG66N-x4.js +398 -0
  303. package/dist/toggle-button-BI6z89CX.js +26 -0
  304. package/dist/toggle-button-group-Dzzh9mXv.js +28 -0
  305. package/dist/typographyClasses-C0nDz5e6.js +32 -0
  306. package/dist/useControlled-CvWtMQJF.js +32 -0
  307. package/dist/useEnhancedEffect-NLLl34XR.js +5 -0
  308. package/dist/useFormControl-ngLNi8dL.js +11 -0
  309. package/dist/useMobilePicker-DdH0AzNe.js +10635 -0
  310. package/dist/useTheme-BES_k_99.js +34 -0
  311. package/dist/useThemeProps-CJRFdjVv.js +19 -0
  312. package/dist/utils/dayjs.js +161 -113
  313. package/dist/utils/index.js +3 -11
  314. package/dist/utils/logger.js +45 -46
  315. package/dist/utils-Cu16ybRR.js +72 -0
  316. package/dist/warning-D7iWhOZI.js +110 -0
  317. package/package.json +29 -29
  318. package/dist/ArrowUpward-D8eqD-si.js +0 -8
  319. package/dist/Box-BkXoTbe8.js +0 -62
  320. package/dist/ButtonBase-D73M0QY5.js +0 -1099
  321. package/dist/ChevronLeft-BmgmPHp9.js +0 -8
  322. package/dist/ChevronRight-DbWSr8yz.js +0 -8
  323. package/dist/Close-lHCUMitI.js +0 -8
  324. package/dist/ContentCopy-D4SuJd86.js +0 -11
  325. package/dist/DefaultPropsProvider-DPuuPIbS.js +0 -64
  326. package/dist/Download-BoRQUwCf.js +0 -8
  327. package/dist/ExpandMore-C7yRQv1-.js +0 -8
  328. package/dist/Favorite-Bz_HcMgN.js +0 -8
  329. package/dist/Menu-GVFDMHCN.js +0 -2441
  330. package/dist/MenuItem-2wG8I2HO.js +0 -269
  331. package/dist/Paper-CR019bki.js +0 -553
  332. package/dist/Select-D2l9rDWL.js +0 -3966
  333. package/dist/Stack-Dfjnuorw.js +0 -174
  334. package/dist/Typography-PcmlIqm1.js +0 -253
  335. package/dist/_commonjsHelpers-ByX85dGu.js +0 -33
  336. package/dist/buttonBaseClasses-jtnoTmPn.js +0 -10
  337. package/dist/clsx-OuTLNxxd.js +0 -16
  338. package/dist/createSimplePaletteValueFilter-B7--0ryQ.js +0 -17
  339. package/dist/createSvgIcon-BkbeLOhM.js +0 -242
  340. package/dist/createTheme-DgoJyWM-.js +0 -2929
  341. package/dist/defaultTheme-CulFxfLR.js +0 -5
  342. package/dist/extendSxProp-BJEIxcAx.js +0 -36
  343. package/dist/generateUtilityClass-BhfUaMgk.js +0 -35
  344. package/dist/generateUtilityClasses-E9gROIFd.js +0 -10
  345. package/dist/iconButtonClasses-BMfIhNTh.js +0 -10
  346. package/dist/identifier-BKLqN993.js +0 -4
  347. package/dist/index-D3G5Rwl-.js +0 -211
  348. package/dist/index-DtGYsHSv.js +0 -94
  349. package/dist/jsx-runtime-tc70JA_2.js +0 -264
  350. package/dist/mergeSlotProps-CuzBQdlp.js +0 -62
  351. package/dist/objectWithoutPropertiesLoose-DiWPeE4c.js +0 -22
  352. package/dist/outlinedInputClasses-DnwW3ujt.js +0 -19
  353. package/dist/resolveProps-BDH0VJjn.js +0 -39
  354. package/dist/styled-8Y5KoVix.js +0 -203
  355. package/dist/svgIconClasses-C6auqaBA.js +0 -10
  356. package/dist/tabClasses-DFvXsFrN.js +0 -10
  357. package/dist/typographyClasses-jmoWZuXc.js +0 -10
  358. package/dist/useControlled-D1L5tREc.js +0 -31
  359. package/dist/useEnhancedEffect-CJGo-L3B.js +0 -5
  360. package/dist/useFormControl-CatNKXAi.js +0 -10
  361. package/dist/useMobilePicker-B-bNHHXB.js +0 -13498
  362. package/dist/useTheme-CWPkv7g3.js +0 -18
  363. package/dist/useThemeProps-XYgXGzjS.js +0 -27
  364. package/dist/utils-D1UMIV0b.js +0 -40
  365. package/dist/warning-Ba-7BBAN.js +0 -135
@@ -1,1521 +1,3 @@
1
- import { j as c } from "../jsx-runtime-tc70JA_2.js";
2
- import { useTheme as I, TextField as z } from "@mui/material";
3
- import { SForm as L } from "../s-form/s-form.js";
4
- import { _ as D, a as s } from "../objectWithoutPropertiesLoose-DiWPeE4c.js";
5
- import * as f from "react";
6
- import { P as e } from "../createTheme-DgoJyWM-.js";
7
- import { g as U, a as Y, u as O, b as q, c as B, d as Q, r as T, e as H, P as $, f as K, h as Z, i as G, j as J, k as X, l as ee, m as oe, C as te, n as m, o as p, p as M, q as F, s as se, v as R, t as N, w as ae, D as ne, x as re } from "../useMobilePicker-B-bNHHXB.js";
8
- import { u as y } from "../warning-Ba-7BBAN.js";
9
- import { c as le } from "../clsx-OuTLNxxd.js";
10
- import { s as C } from "../styled-8Y5KoVix.js";
11
- import { T as ie } from "../Typography-PcmlIqm1.js";
12
- function ce(l) {
13
- return U("MuiDatePickerToolbar", l);
14
- }
15
- Y("MuiDatePickerToolbar", ["root", "title"]);
16
- const de = ["toolbarFormat", "toolbarPlaceholder", "className", "classes"], ue = (l) => H({
17
- root: ["root"],
18
- title: ["title"]
19
- }, ce, l), fe = C($, {
20
- name: "MuiDatePickerToolbar",
21
- slot: "Root"
22
- })({}), pe = C(ie, {
23
- name: "MuiDatePickerToolbar",
24
- slot: "Title"
25
- })({
26
- variants: [{
27
- props: {
28
- pickerOrientation: "landscape"
29
- },
30
- style: {
31
- margin: "auto 16px auto auto"
32
- }
33
- }]
34
- }), g = /* @__PURE__ */ f.forwardRef(function(a, t) {
35
- const n = y({
36
- props: a,
37
- name: "MuiDatePickerToolbar"
38
- }), {
39
- toolbarFormat: o,
40
- toolbarPlaceholder: r = "––",
41
- className: i,
42
- classes: d
43
- } = n, u = D(n, de), b = O(), {
44
- value: P,
45
- views: v,
46
- orientation: E
47
- } = q(), V = B(), _ = Q(), w = ue(d), A = f.useMemo(() => {
48
- if (!b.isValid(P))
49
- return r;
50
- const W = T(b, {
51
- format: o,
52
- views: v
53
- }, !0);
54
- return b.formatByString(P, W);
55
- }, [P, o, r, b, v]);
56
- return /* @__PURE__ */ c.jsx(fe, s({
57
- ref: t,
58
- toolbarTitle: V.datePickerToolbarTitle,
59
- className: le(w.root, i)
60
- }, u, {
61
- children: /* @__PURE__ */ c.jsx(pe, {
62
- variant: "h4",
63
- align: E === "landscape" ? "left" : "center",
64
- ownerState: _,
65
- className: w.title,
66
- children: A
67
- })
68
- }));
69
- });
70
- process.env.NODE_ENV !== "production" && (g.displayName = "DatePickerToolbar");
71
- process.env.NODE_ENV !== "production" && (g.propTypes = {
72
- // ----------------------------- Warning --------------------------------
73
- // | These PropTypes are generated from the TypeScript type definitions |
74
- // | To update them edit the TypeScript types and run "pnpm proptypes" |
75
- // ----------------------------------------------------------------------
76
- /**
77
- * Override or extend the styles applied to the component.
78
- */
79
- classes: e.object,
80
- className: e.string,
81
- /**
82
- * If `true`, show the toolbar even in desktop mode.
83
- * @default `true` for Desktop, `false` for Mobile.
84
- */
85
- hidden: e.bool,
86
- /**
87
- * The system prop that allows defining system overrides as well as additional CSS styles.
88
- */
89
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
90
- titleId: e.string,
91
- /**
92
- * Toolbar date format.
93
- */
94
- toolbarFormat: e.string,
95
- /**
96
- * Toolbar value placeholder—it is displayed when the value is empty.
97
- * @default "––"
98
- */
99
- toolbarPlaceholder: e.node
100
- });
101
- function S(l, a) {
102
- const t = y({
103
- props: l,
104
- name: a
105
- }), n = K(t), o = f.useMemo(() => t.localeText?.toolbarTitle == null ? t.localeText : s({}, t.localeText, {
106
- datePickerToolbarTitle: t.localeText.toolbarTitle
107
- }), [t.localeText]);
108
- return s({}, t, n, {
109
- localeText: o
110
- }, Z({
111
- views: t.views,
112
- openTo: t.openTo,
113
- defaultViews: ["year", "day"],
114
- defaultOpenTo: "day"
115
- }), {
116
- slots: s({
117
- toolbar: g
118
- }, t.slots)
119
- });
120
- }
121
- const be = (l) => {
122
- const a = G(l);
123
- return J({
124
- manager: a,
125
- props: l
126
- });
127
- }, me = ["slots", "slotProps"], h = /* @__PURE__ */ f.forwardRef(function(a, t) {
128
- const n = y({
129
- props: a,
130
- name: "MuiDateField"
131
- }), {
132
- slots: o,
133
- slotProps: r
134
- } = n, i = D(n, me), d = X({
135
- slotProps: r,
136
- ref: t,
137
- externalForwardedProps: i
138
- }), u = be(d);
139
- return /* @__PURE__ */ c.jsx(ee, {
140
- slots: o,
141
- slotProps: r,
142
- inputRef: i.inputRef,
143
- children: /* @__PURE__ */ c.jsx(oe, {
144
- fieldResponse: u,
145
- defaultOpenPickerIcon: te
146
- })
147
- });
148
- });
149
- process.env.NODE_ENV !== "production" && (h.displayName = "DateField");
150
- process.env.NODE_ENV !== "production" && (h.propTypes = {
151
- // ----------------------------- Warning --------------------------------
152
- // | These PropTypes are generated from the TypeScript type definitions |
153
- // | To update them edit the TypeScript types and run "pnpm proptypes" |
154
- // ----------------------------------------------------------------------
155
- /**
156
- * If `true`, the `input` element is focused during the first mount.
157
- * @default false
158
- */
159
- autoFocus: e.bool,
160
- className: e.string,
161
- /**
162
- * If `true`, a clear button will be shown in the field allowing value clearing.
163
- * @default false
164
- */
165
- clearable: e.bool,
166
- /**
167
- * The position at which the clear button is placed.
168
- * If the field is not clearable, the button is not rendered.
169
- * @default 'end'
170
- */
171
- clearButtonPosition: e.oneOf(["end", "start"]),
172
- /**
173
- * The color of the component.
174
- * It supports both default and custom theme colors, which can be added as shown in the
175
- * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
176
- * @default 'primary'
177
- */
178
- color: e.oneOf(["error", "info", "primary", "secondary", "success", "warning"]),
179
- component: e.elementType,
180
- /**
181
- * The default value. Use when the component is not controlled.
182
- */
183
- defaultValue: e.object,
184
- /**
185
- * If `true`, the component is disabled.
186
- * When disabled, the value cannot be changed and no interaction is possible.
187
- * @default false
188
- */
189
- disabled: e.bool,
190
- /**
191
- * If `true`, disable values after the current date for date components, time for time components and both for date time components.
192
- * @default false
193
- */
194
- disableFuture: e.bool,
195
- /**
196
- * If `true`, disable values before the current date for date components, time for time components and both for date time components.
197
- * @default false
198
- */
199
- disablePast: e.bool,
200
- /**
201
- * @default true
202
- */
203
- enableAccessibleFieldDOMStructure: e.bool,
204
- /**
205
- * If `true`, the component is displayed in focused state.
206
- */
207
- focused: e.bool,
208
- /**
209
- * Format of the date when rendered in the input(s).
210
- */
211
- format: e.string,
212
- /**
213
- * Density of the format when rendered in the input.
214
- * Setting `formatDensity` to `"spacious"` will add a space before and after each `/`, `-` and `.` character.
215
- * @default "dense"
216
- */
217
- formatDensity: e.oneOf(["dense", "spacious"]),
218
- /**
219
- * Props applied to the [`FormHelperText`](https://mui.com/material-ui/api/form-helper-text/) element.
220
- * @deprecated Use `slotProps.formHelperText` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
221
- */
222
- FormHelperTextProps: e.object,
223
- /**
224
- * If `true`, the input will take up the full width of its container.
225
- * @default false
226
- */
227
- fullWidth: e.bool,
228
- /**
229
- * The helper text content.
230
- */
231
- helperText: e.node,
232
- /**
233
- * If `true`, the label is hidden.
234
- * This is used to increase density for a `FilledInput`.
235
- * Be sure to add `aria-label` to the `input` element.
236
- * @default false
237
- */
238
- hiddenLabel: e.bool,
239
- /**
240
- * The id of the `input` element.
241
- * Use this prop to make `label` and `helperText` accessible for screen readers.
242
- */
243
- id: e.string,
244
- /**
245
- * Props applied to the [`InputLabel`](https://mui.com/material-ui/api/input-label/) element.
246
- * Pointer events like `onClick` are enabled if and only if `shrink` is `true`.
247
- * @deprecated Use `slotProps.inputLabel` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
248
- */
249
- InputLabelProps: e.object,
250
- /**
251
- * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#attributes) applied to the `input` element.
252
- * @deprecated Use `slotProps.htmlInput` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
253
- */
254
- inputProps: e.object,
255
- /**
256
- * Props applied to the Input element.
257
- * It will be a [`FilledInput`](https://mui.com/material-ui/api/filled-input/),
258
- * [`OutlinedInput`](https://mui.com/material-ui/api/outlined-input/) or [`Input`](https://mui.com/material-ui/api/input/)
259
- * component depending on the `variant` prop value.
260
- * @deprecated Use `slotProps.input` instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
261
- */
262
- InputProps: e.object,
263
- /**
264
- * Pass a ref to the `input` element.
265
- */
266
- inputRef: m,
267
- /**
268
- * The label content.
269
- */
270
- label: e.node,
271
- /**
272
- * If `dense` or `normal`, will adjust vertical spacing of this and contained components.
273
- * @default 'none'
274
- */
275
- margin: e.oneOf(["dense", "none", "normal"]),
276
- /**
277
- * Maximal selectable date.
278
- * @default 2099-12-31
279
- */
280
- maxDate: e.object,
281
- /**
282
- * Minimal selectable date.
283
- * @default 1900-01-01
284
- */
285
- minDate: e.object,
286
- /**
287
- * Name attribute of the `input` element.
288
- */
289
- name: e.string,
290
- onBlur: e.func,
291
- /**
292
- * Callback fired when the value changes.
293
- * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
294
- * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
295
- * @param {TValue} value The new value.
296
- * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.
297
- */
298
- onChange: e.func,
299
- /**
300
- * Callback fired when the clear button is clicked.
301
- */
302
- onClear: e.func,
303
- /**
304
- * Callback fired when the error associated with the current value changes.
305
- * When a validation error is detected, the `error` parameter contains a non-null value.
306
- * This can be used to render an appropriate form error.
307
- * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
308
- * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
309
- * @param {TError} error The reason why the current value is not valid.
310
- * @param {TValue} value The value associated with the error.
311
- */
312
- onError: e.func,
313
- onFocus: e.func,
314
- /**
315
- * Callback fired when the selected sections change.
316
- * @param {FieldSelectedSections} newValue The new selected sections.
317
- */
318
- onSelectedSectionsChange: e.func,
319
- /**
320
- * The position at which the opening button is placed.
321
- * If there is no Picker to open, the button is not rendered
322
- * @default 'end'
323
- */
324
- openPickerButtonPosition: e.oneOf(["end", "start"]),
325
- /**
326
- * If `true`, the component is read-only.
327
- * When read-only, the value cannot be changed but the user can interact with the interface.
328
- * @default false
329
- */
330
- readOnly: e.bool,
331
- /**
332
- * The date used to generate a part of the new value that is not present in the format when both `value` and `defaultValue` are empty.
333
- * For example, on time fields it will be used to determine the date to set.
334
- * @default The closest valid date using the validation props, except callbacks such as `shouldDisableDate`. Value is rounded to the most granular section used.
335
- */
336
- referenceDate: e.object,
337
- /**
338
- * If `true`, the label is displayed as required and the `input` element is required.
339
- * @default false
340
- */
341
- required: e.bool,
342
- /**
343
- * The currently selected sections.
344
- * This prop accepts four formats:
345
- * 1. If a number is provided, the section at this index will be selected.
346
- * 2. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.
347
- * 3. If `"all"` is provided, all the sections will be selected.
348
- * 4. If `null` is provided, no section will be selected.
349
- * If not provided, the selected sections will be handled internally.
350
- */
351
- selectedSections: e.oneOfType([e.oneOf(["all", "day", "empty", "hours", "meridiem", "minutes", "month", "seconds", "weekDay", "year"]), e.number]),
352
- /**
353
- * Disable specific date.
354
- *
355
- * Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.
356
- *
357
- * @param {PickerValidDate} day The date to test.
358
- * @returns {boolean} If `true` the date will be disabled.
359
- */
360
- shouldDisableDate: e.func,
361
- /**
362
- * Disable specific month.
363
- * @param {PickerValidDate} month The month to test.
364
- * @returns {boolean} If `true`, the month will be disabled.
365
- */
366
- shouldDisableMonth: e.func,
367
- /**
368
- * Disable specific year.
369
- * @param {PickerValidDate} year The year to test.
370
- * @returns {boolean} If `true`, the year will be disabled.
371
- */
372
- shouldDisableYear: e.func,
373
- /**
374
- * If `true`, the format will respect the leading zeroes (for example on dayjs, the format `M/D/YYYY` will render `8/16/2018`)
375
- * If `false`, the format will always add leading zeroes (for example on dayjs, the format `M/D/YYYY` will render `08/16/2018`)
376
- *
377
- * Warning n°1: Luxon is not able to respect the leading zeroes when using macro tokens (for example "DD"), so `shouldRespectLeadingZeros={true}` might lead to inconsistencies when using `AdapterLuxon`.
378
- *
379
- * Warning n°2: When `shouldRespectLeadingZeros={true}`, the field will add an invisible character on the sections containing a single digit to make sure `onChange` is fired.
380
- * If you need to get the clean value from the input, you can remove this character using `input.value.replace(/\u200e/g, '')`.
381
- *
382
- * Warning n°3: When used in strict mode, dayjs and moment require to respect the leading zeros.
383
- * This mean that when using `shouldRespectLeadingZeros={false}`, if you retrieve the value directly from the input (not listening to `onChange`) and your format contains tokens without leading zeros, the value will not be parsed by your library.
384
- *
385
- * @default false
386
- */
387
- shouldRespectLeadingZeros: e.bool,
388
- /**
389
- * The size of the component.
390
- * @default 'medium'
391
- */
392
- size: e.oneOf(["medium", "small"]),
393
- /**
394
- * The props used for each component slot.
395
- * @default {}
396
- */
397
- slotProps: e.object,
398
- /**
399
- * Overridable component slots.
400
- * @default {}
401
- */
402
- slots: e.object,
403
- style: e.object,
404
- /**
405
- * The system prop that allows defining system overrides as well as additional CSS styles.
406
- */
407
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
408
- /**
409
- * Choose which timezone to use for the value.
410
- * Example: "default", "system", "UTC", "America/New_York".
411
- * If you pass values from other timezones to some props, they will be converted to this timezone before being used.
412
- * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documentation} for more details.
413
- * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.
414
- */
415
- timezone: e.string,
416
- /**
417
- * The ref object used to imperatively interact with the field.
418
- */
419
- unstableFieldRef: e.oneOfType([e.func, e.object]),
420
- /**
421
- * The selected value.
422
- * Used when the component is controlled.
423
- */
424
- value: e.object,
425
- /**
426
- * The variant to use.
427
- * @default 'outlined'
428
- */
429
- variant: e.oneOf(["filled", "outlined", "standard"])
430
- });
431
- const k = /* @__PURE__ */ f.forwardRef(function(a, t) {
432
- const n = O(), o = S(a, "MuiDesktopDatePicker"), r = s({
433
- day: p,
434
- month: p,
435
- year: p
436
- }, o.viewRenderers), i = s({}, o, {
437
- closeOnSelect: o.closeOnSelect ?? !0,
438
- viewRenderers: r,
439
- format: T(n, o, !1),
440
- yearsPerRow: o.yearsPerRow ?? 4,
441
- slots: s({
442
- field: h
443
- }, o.slots),
444
- slotProps: s({}, o.slotProps, {
445
- field: (u) => s({}, M(o.slotProps?.field, u), F(o)),
446
- toolbar: s({
447
- hidden: !0
448
- }, o.slotProps?.toolbar)
449
- })
450
- }), {
451
- renderPicker: d
452
- } = se({
453
- ref: t,
454
- props: i,
455
- valueManager: N,
456
- valueType: "date",
457
- validator: R,
458
- steps: null
459
- });
460
- return d();
461
- });
462
- process.env.NODE_ENV !== "production" && (k.displayName = "DesktopDatePicker");
463
- k.propTypes = {
464
- // ----------------------------- Warning --------------------------------
465
- // | These PropTypes are generated from the TypeScript type definitions |
466
- // | To update them edit the TypeScript types and run "pnpm proptypes" |
467
- // ----------------------------------------------------------------------
468
- /**
469
- * If `true`, the main element is focused during the first mount.
470
- * This main element is:
471
- * - the element chosen by the visible view if any (i.e: the selected day on the `day` view).
472
- * - the `input` element if there is a field rendered.
473
- */
474
- autoFocus: e.bool,
475
- className: e.string,
476
- /**
477
- * If `true`, the Picker will close after submitting the full date.
478
- * @default true
479
- */
480
- closeOnSelect: e.bool,
481
- /**
482
- * Formats the day of week displayed in the calendar header.
483
- * @param {PickerValidDate} date The date of the day of week provided by the adapter.
484
- * @returns {string} The name to display.
485
- * @default (date: PickerValidDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
486
- */
487
- dayOfWeekFormatter: e.func,
488
- /**
489
- * The default value.
490
- * Used when the component is not controlled.
491
- */
492
- defaultValue: e.object,
493
- /**
494
- * If `true`, the component is disabled.
495
- * When disabled, the value cannot be changed and no interaction is possible.
496
- * @default false
497
- */
498
- disabled: e.bool,
499
- /**
500
- * If `true`, disable values after the current date for date components, time for time components and both for date time components.
501
- * @default false
502
- */
503
- disableFuture: e.bool,
504
- /**
505
- * If `true`, today's date is rendering without highlighting with circle.
506
- * @default false
507
- */
508
- disableHighlightToday: e.bool,
509
- /**
510
- * If `true`, the button to open the Picker will not be rendered (it will only render the field).
511
- * @deprecated Use the [field component](https://mui.com/x/react-date-pickers/fields/) instead.
512
- * @default false
513
- */
514
- disableOpenPicker: e.bool,
515
- /**
516
- * If `true`, disable values before the current date for date components, time for time components and both for date time components.
517
- * @default false
518
- */
519
- disablePast: e.bool,
520
- /**
521
- * If `true`, the week number will be display in the calendar.
522
- */
523
- displayWeekNumber: e.bool,
524
- /**
525
- * @default true
526
- */
527
- enableAccessibleFieldDOMStructure: e.any,
528
- /**
529
- * The day view will show as many weeks as needed after the end of the current month to match this value.
530
- * Put it to 6 to have a fixed number of weeks in Gregorian calendars
531
- */
532
- fixedWeekNumber: e.number,
533
- /**
534
- * Format of the date when rendered in the input(s).
535
- * Defaults to localized format based on the used `views`.
536
- */
537
- format: e.string,
538
- /**
539
- * Density of the format when rendered in the input.
540
- * Setting `formatDensity` to `"spacious"` will add a space before and after each `/`, `-` and `.` character.
541
- * @default "dense"
542
- */
543
- formatDensity: e.oneOf(["dense", "spacious"]),
544
- /**
545
- * Pass a ref to the `input` element.
546
- */
547
- inputRef: m,
548
- /**
549
- * The label content.
550
- */
551
- label: e.node,
552
- /**
553
- * If `true`, calls `renderLoading` instead of rendering the day calendar.
554
- * Can be used to preload information and show it in calendar.
555
- * @default false
556
- */
557
- loading: e.bool,
558
- /**
559
- * Locale for components texts.
560
- * Allows overriding texts coming from `LocalizationProvider` and `theme`.
561
- */
562
- localeText: e.object,
563
- /**
564
- * Maximal selectable date.
565
- * @default 2099-12-31
566
- */
567
- maxDate: e.object,
568
- /**
569
- * Minimal selectable date.
570
- * @default 1900-01-01
571
- */
572
- minDate: e.object,
573
- /**
574
- * Months rendered per row.
575
- * @default 3
576
- */
577
- monthsPerRow: e.oneOf([3, 4]),
578
- /**
579
- * Name attribute used by the `input` element in the Field.
580
- */
581
- name: e.string,
582
- /**
583
- * Callback fired when the value is accepted.
584
- * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
585
- * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
586
- * @param {TValue} value The value that was just accepted.
587
- * @param {FieldChangeHandlerContext<TError>} context Context about this acceptance:
588
- * - `validationError`: validation result of the current value
589
- * - `source`: source of the acceptance. One of 'field' | 'view' | 'unknown'
590
- * - `shortcut` (optional): the shortcut metadata if the value was accepted via a shortcut selection
591
- */
592
- onAccept: e.func,
593
- /**
594
- * Callback fired when the value changes.
595
- * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
596
- * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
597
- * @param {TValue} value The new value.
598
- * @param {FieldChangeHandlerContext<TError>} context Context about this change:
599
- * - `validationError`: validation result of the current value
600
- * - `source`: source of the change. One of 'field' | 'view' | 'unknown'
601
- * - `shortcut` (optional): the shortcut metadata if the change was triggered by a shortcut selection
602
- */
603
- onChange: e.func,
604
- /**
605
- * Callback fired when the popup requests to be closed.
606
- * Use in controlled mode (see `open`).
607
- */
608
- onClose: e.func,
609
- /**
610
- * Callback fired when the error associated with the current value changes.
611
- * When a validation error is detected, the `error` parameter contains a non-null value.
612
- * This can be used to render an appropriate form error.
613
- * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
614
- * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
615
- * @param {TError} error The reason why the current value is not valid.
616
- * @param {TValue} value The value associated with the error.
617
- */
618
- onError: e.func,
619
- /**
620
- * Callback fired on month change.
621
- * @param {PickerValidDate} month The new month.
622
- */
623
- onMonthChange: e.func,
624
- /**
625
- * Callback fired when the popup requests to be opened.
626
- * Use in controlled mode (see `open`).
627
- */
628
- onOpen: e.func,
629
- /**
630
- * Callback fired when the selected sections change.
631
- * @param {FieldSelectedSections} newValue The new selected sections.
632
- */
633
- onSelectedSectionsChange: e.func,
634
- /**
635
- * Callback fired on view change.
636
- * @template TView Type of the view. It will vary based on the Picker type and the `views` it uses.
637
- * @param {TView} view The new view.
638
- */
639
- onViewChange: e.func,
640
- /**
641
- * Callback fired on year change.
642
- * @param {PickerValidDate} year The new year.
643
- */
644
- onYearChange: e.func,
645
- /**
646
- * Control the popup or dialog open state.
647
- * @default false
648
- */
649
- open: e.bool,
650
- /**
651
- * The default visible view.
652
- * Used when the component view is not controlled.
653
- * Must be a valid option from `views` list.
654
- */
655
- openTo: e.oneOf(["day", "month", "year"]),
656
- /**
657
- * Force rendering in particular orientation.
658
- */
659
- orientation: e.oneOf(["landscape", "portrait"]),
660
- /**
661
- * If `true`, the component is read-only.
662
- * When read-only, the value cannot be changed but the user can interact with the interface.
663
- * @default false
664
- */
665
- readOnly: e.bool,
666
- /**
667
- * If `true`, disable heavy animations.
668
- * @default `@media(prefers-reduced-motion: reduce)` || `navigator.userAgent` matches Android <10 or iOS <13
669
- */
670
- reduceAnimations: e.bool,
671
- /**
672
- * The date used to generate the new value when both `value` and `defaultValue` are empty.
673
- * @default The closest valid date-time using the validation props, except callbacks like `shouldDisable<...>`.
674
- */
675
- referenceDate: e.object,
676
- /**
677
- * Component displaying when passed `loading` true.
678
- * @returns {React.ReactNode} The node to render when loading.
679
- * @default () => <span>...</span>
680
- */
681
- renderLoading: e.func,
682
- /**
683
- * The currently selected sections.
684
- * This prop accepts four formats:
685
- * 1. If a number is provided, the section at this index will be selected.
686
- * 2. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.
687
- * 3. If `"all"` is provided, all the sections will be selected.
688
- * 4. If `null` is provided, no section will be selected.
689
- * If not provided, the selected sections will be handled internally.
690
- */
691
- selectedSections: e.oneOfType([e.oneOf(["all", "day", "empty", "hours", "meridiem", "minutes", "month", "seconds", "weekDay", "year"]), e.number]),
692
- /**
693
- * Disable specific date.
694
- *
695
- * Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.
696
- *
697
- * @param {PickerValidDate} day The date to test.
698
- * @returns {boolean} If `true` the date will be disabled.
699
- */
700
- shouldDisableDate: e.func,
701
- /**
702
- * Disable specific month.
703
- * @param {PickerValidDate} month The month to test.
704
- * @returns {boolean} If `true`, the month will be disabled.
705
- */
706
- shouldDisableMonth: e.func,
707
- /**
708
- * Disable specific year.
709
- * @param {PickerValidDate} year The year to test.
710
- * @returns {boolean} If `true`, the year will be disabled.
711
- */
712
- shouldDisableYear: e.func,
713
- /**
714
- * If `true`, days outside the current month are rendered:
715
- *
716
- * - if `fixedWeekNumber` is defined, renders days to have the weeks requested.
717
- *
718
- * - if `fixedWeekNumber` is not defined, renders day to fill the first and last week of the current month.
719
- *
720
- * - ignored if `calendars` equals more than `1` on range pickers.
721
- * @default false
722
- */
723
- showDaysOutsideCurrentMonth: e.bool,
724
- /**
725
- * The props used for each component slot.
726
- * @default {}
727
- */
728
- slotProps: e.object,
729
- /**
730
- * Overridable component slots.
731
- * @default {}
732
- */
733
- slots: e.object,
734
- /**
735
- * The system prop that allows defining system overrides as well as additional CSS styles.
736
- */
737
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
738
- /**
739
- * Choose which timezone to use for the value.
740
- * Example: "default", "system", "UTC", "America/New_York".
741
- * If you pass values from other timezones to some props, they will be converted to this timezone before being used.
742
- * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documentation} for more details.
743
- * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.
744
- */
745
- timezone: e.string,
746
- /**
747
- * The selected value.
748
- * Used when the component is controlled.
749
- */
750
- value: e.object,
751
- /**
752
- * The visible view.
753
- * Used when the component view is controlled.
754
- * Must be a valid option from `views` list.
755
- */
756
- view: e.oneOf(["day", "month", "year"]),
757
- /**
758
- * Define custom view renderers for each section.
759
- * If `null`, the section will only have field editing.
760
- * If `undefined`, internally defined view will be used.
761
- */
762
- viewRenderers: e.shape({
763
- day: e.func,
764
- month: e.func,
765
- year: e.func
766
- }),
767
- /**
768
- * Available views.
769
- */
770
- views: e.arrayOf(e.oneOf(["day", "month", "year"]).isRequired),
771
- /**
772
- * Years are displayed in ascending (chronological) order by default.
773
- * If `desc`, years are displayed in descending order.
774
- * @default 'asc'
775
- */
776
- yearsOrder: e.oneOf(["asc", "desc"]),
777
- /**
778
- * Years rendered per row.
779
- * @default 4
780
- */
781
- yearsPerRow: e.oneOf([3, 4])
782
- };
783
- const j = /* @__PURE__ */ f.forwardRef(function(a, t) {
784
- const n = O(), o = S(a, "MuiMobileDatePicker"), r = s({
785
- day: p,
786
- month: p,
787
- year: p
788
- }, o.viewRenderers), i = s({}, o, {
789
- viewRenderers: r,
790
- format: T(n, o, !1),
791
- slots: s({
792
- field: h
793
- }, o.slots),
794
- slotProps: s({}, o.slotProps, {
795
- field: (u) => s({}, M(o.slotProps?.field, u), F(o)),
796
- toolbar: s({
797
- hidden: !1
798
- }, o.slotProps?.toolbar)
799
- })
800
- }), {
801
- renderPicker: d
802
- } = ae({
803
- ref: t,
804
- props: i,
805
- valueManager: N,
806
- valueType: "date",
807
- validator: R,
808
- steps: null
809
- });
810
- return d();
811
- });
812
- process.env.NODE_ENV !== "production" && (j.displayName = "MobileDatePicker");
813
- j.propTypes = {
814
- // ----------------------------- Warning --------------------------------
815
- // | These PropTypes are generated from the TypeScript type definitions |
816
- // | To update them edit the TypeScript types and run "pnpm proptypes" |
817
- // ----------------------------------------------------------------------
818
- /**
819
- * If `true`, the main element is focused during the first mount.
820
- * This main element is:
821
- * - the element chosen by the visible view if any (i.e: the selected day on the `day` view).
822
- * - the `input` element if there is a field rendered.
823
- */
824
- autoFocus: e.bool,
825
- className: e.string,
826
- /**
827
- * If `true`, the Picker will close after submitting the full date.
828
- * @default false
829
- */
830
- closeOnSelect: e.bool,
831
- /**
832
- * Formats the day of week displayed in the calendar header.
833
- * @param {PickerValidDate} date The date of the day of week provided by the adapter.
834
- * @returns {string} The name to display.
835
- * @default (date: PickerValidDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
836
- */
837
- dayOfWeekFormatter: e.func,
838
- /**
839
- * The default value.
840
- * Used when the component is not controlled.
841
- */
842
- defaultValue: e.object,
843
- /**
844
- * If `true`, the component is disabled.
845
- * When disabled, the value cannot be changed and no interaction is possible.
846
- * @default false
847
- */
848
- disabled: e.bool,
849
- /**
850
- * If `true`, disable values after the current date for date components, time for time components and both for date time components.
851
- * @default false
852
- */
853
- disableFuture: e.bool,
854
- /**
855
- * If `true`, today's date is rendering without highlighting with circle.
856
- * @default false
857
- */
858
- disableHighlightToday: e.bool,
859
- /**
860
- * If `true`, the button to open the Picker will not be rendered (it will only render the field).
861
- * @deprecated Use the [field component](https://mui.com/x/react-date-pickers/fields/) instead.
862
- * @default false
863
- */
864
- disableOpenPicker: e.bool,
865
- /**
866
- * If `true`, disable values before the current date for date components, time for time components and both for date time components.
867
- * @default false
868
- */
869
- disablePast: e.bool,
870
- /**
871
- * If `true`, the week number will be display in the calendar.
872
- */
873
- displayWeekNumber: e.bool,
874
- /**
875
- * @default true
876
- */
877
- enableAccessibleFieldDOMStructure: e.any,
878
- /**
879
- * The day view will show as many weeks as needed after the end of the current month to match this value.
880
- * Put it to 6 to have a fixed number of weeks in Gregorian calendars
881
- */
882
- fixedWeekNumber: e.number,
883
- /**
884
- * Format of the date when rendered in the input(s).
885
- * Defaults to localized format based on the used `views`.
886
- */
887
- format: e.string,
888
- /**
889
- * Density of the format when rendered in the input.
890
- * Setting `formatDensity` to `"spacious"` will add a space before and after each `/`, `-` and `.` character.
891
- * @default "dense"
892
- */
893
- formatDensity: e.oneOf(["dense", "spacious"]),
894
- /**
895
- * Pass a ref to the `input` element.
896
- */
897
- inputRef: m,
898
- /**
899
- * The label content.
900
- */
901
- label: e.node,
902
- /**
903
- * If `true`, calls `renderLoading` instead of rendering the day calendar.
904
- * Can be used to preload information and show it in calendar.
905
- * @default false
906
- */
907
- loading: e.bool,
908
- /**
909
- * Locale for components texts.
910
- * Allows overriding texts coming from `LocalizationProvider` and `theme`.
911
- */
912
- localeText: e.object,
913
- /**
914
- * Maximal selectable date.
915
- * @default 2099-12-31
916
- */
917
- maxDate: e.object,
918
- /**
919
- * Minimal selectable date.
920
- * @default 1900-01-01
921
- */
922
- minDate: e.object,
923
- /**
924
- * Months rendered per row.
925
- * @default 3
926
- */
927
- monthsPerRow: e.oneOf([3, 4]),
928
- /**
929
- * Name attribute used by the `input` element in the Field.
930
- */
931
- name: e.string,
932
- /**
933
- * Callback fired when the value is accepted.
934
- * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
935
- * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
936
- * @param {TValue} value The value that was just accepted.
937
- * @param {FieldChangeHandlerContext<TError>} context Context about this acceptance:
938
- * - `validationError`: validation result of the current value
939
- * - `source`: source of the acceptance. One of 'field' | 'view' | 'unknown'
940
- * - `shortcut` (optional): the shortcut metadata if the value was accepted via a shortcut selection
941
- */
942
- onAccept: e.func,
943
- /**
944
- * Callback fired when the value changes.
945
- * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
946
- * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
947
- * @param {TValue} value The new value.
948
- * @param {FieldChangeHandlerContext<TError>} context Context about this change:
949
- * - `validationError`: validation result of the current value
950
- * - `source`: source of the change. One of 'field' | 'view' | 'unknown'
951
- * - `shortcut` (optional): the shortcut metadata if the change was triggered by a shortcut selection
952
- */
953
- onChange: e.func,
954
- /**
955
- * Callback fired when the popup requests to be closed.
956
- * Use in controlled mode (see `open`).
957
- */
958
- onClose: e.func,
959
- /**
960
- * Callback fired when the error associated with the current value changes.
961
- * When a validation error is detected, the `error` parameter contains a non-null value.
962
- * This can be used to render an appropriate form error.
963
- * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
964
- * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
965
- * @param {TError} error The reason why the current value is not valid.
966
- * @param {TValue} value The value associated with the error.
967
- */
968
- onError: e.func,
969
- /**
970
- * Callback fired on month change.
971
- * @param {PickerValidDate} month The new month.
972
- */
973
- onMonthChange: e.func,
974
- /**
975
- * Callback fired when the popup requests to be opened.
976
- * Use in controlled mode (see `open`).
977
- */
978
- onOpen: e.func,
979
- /**
980
- * Callback fired when the selected sections change.
981
- * @param {FieldSelectedSections} newValue The new selected sections.
982
- */
983
- onSelectedSectionsChange: e.func,
984
- /**
985
- * Callback fired on view change.
986
- * @template TView Type of the view. It will vary based on the Picker type and the `views` it uses.
987
- * @param {TView} view The new view.
988
- */
989
- onViewChange: e.func,
990
- /**
991
- * Callback fired on year change.
992
- * @param {PickerValidDate} year The new year.
993
- */
994
- onYearChange: e.func,
995
- /**
996
- * Control the popup or dialog open state.
997
- * @default false
998
- */
999
- open: e.bool,
1000
- /**
1001
- * The default visible view.
1002
- * Used when the component view is not controlled.
1003
- * Must be a valid option from `views` list.
1004
- */
1005
- openTo: e.oneOf(["day", "month", "year"]),
1006
- /**
1007
- * Force rendering in particular orientation.
1008
- */
1009
- orientation: e.oneOf(["landscape", "portrait"]),
1010
- /**
1011
- * If `true`, the component is read-only.
1012
- * When read-only, the value cannot be changed but the user can interact with the interface.
1013
- * @default false
1014
- */
1015
- readOnly: e.bool,
1016
- /**
1017
- * If `true`, disable heavy animations.
1018
- * @default `@media(prefers-reduced-motion: reduce)` || `navigator.userAgent` matches Android <10 or iOS <13
1019
- */
1020
- reduceAnimations: e.bool,
1021
- /**
1022
- * The date used to generate the new value when both `value` and `defaultValue` are empty.
1023
- * @default The closest valid date-time using the validation props, except callbacks like `shouldDisable<...>`.
1024
- */
1025
- referenceDate: e.object,
1026
- /**
1027
- * Component displaying when passed `loading` true.
1028
- * @returns {React.ReactNode} The node to render when loading.
1029
- * @default () => <span>...</span>
1030
- */
1031
- renderLoading: e.func,
1032
- /**
1033
- * The currently selected sections.
1034
- * This prop accepts four formats:
1035
- * 1. If a number is provided, the section at this index will be selected.
1036
- * 2. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.
1037
- * 3. If `"all"` is provided, all the sections will be selected.
1038
- * 4. If `null` is provided, no section will be selected.
1039
- * If not provided, the selected sections will be handled internally.
1040
- */
1041
- selectedSections: e.oneOfType([e.oneOf(["all", "day", "empty", "hours", "meridiem", "minutes", "month", "seconds", "weekDay", "year"]), e.number]),
1042
- /**
1043
- * Disable specific date.
1044
- *
1045
- * Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.
1046
- *
1047
- * @param {PickerValidDate} day The date to test.
1048
- * @returns {boolean} If `true` the date will be disabled.
1049
- */
1050
- shouldDisableDate: e.func,
1051
- /**
1052
- * Disable specific month.
1053
- * @param {PickerValidDate} month The month to test.
1054
- * @returns {boolean} If `true`, the month will be disabled.
1055
- */
1056
- shouldDisableMonth: e.func,
1057
- /**
1058
- * Disable specific year.
1059
- * @param {PickerValidDate} year The year to test.
1060
- * @returns {boolean} If `true`, the year will be disabled.
1061
- */
1062
- shouldDisableYear: e.func,
1063
- /**
1064
- * If `true`, days outside the current month are rendered:
1065
- *
1066
- * - if `fixedWeekNumber` is defined, renders days to have the weeks requested.
1067
- *
1068
- * - if `fixedWeekNumber` is not defined, renders day to fill the first and last week of the current month.
1069
- *
1070
- * - ignored if `calendars` equals more than `1` on range pickers.
1071
- * @default false
1072
- */
1073
- showDaysOutsideCurrentMonth: e.bool,
1074
- /**
1075
- * The props used for each component slot.
1076
- * @default {}
1077
- */
1078
- slotProps: e.object,
1079
- /**
1080
- * Overridable component slots.
1081
- * @default {}
1082
- */
1083
- slots: e.object,
1084
- /**
1085
- * The system prop that allows defining system overrides as well as additional CSS styles.
1086
- */
1087
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
1088
- /**
1089
- * Choose which timezone to use for the value.
1090
- * Example: "default", "system", "UTC", "America/New_York".
1091
- * If you pass values from other timezones to some props, they will be converted to this timezone before being used.
1092
- * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documentation} for more details.
1093
- * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.
1094
- */
1095
- timezone: e.string,
1096
- /**
1097
- * The selected value.
1098
- * Used when the component is controlled.
1099
- */
1100
- value: e.object,
1101
- /**
1102
- * The visible view.
1103
- * Used when the component view is controlled.
1104
- * Must be a valid option from `views` list.
1105
- */
1106
- view: e.oneOf(["day", "month", "year"]),
1107
- /**
1108
- * Define custom view renderers for each section.
1109
- * If `null`, the section will only have field editing.
1110
- * If `undefined`, internally defined view will be used.
1111
- */
1112
- viewRenderers: e.shape({
1113
- day: e.func,
1114
- month: e.func,
1115
- year: e.func
1116
- }),
1117
- /**
1118
- * Available views.
1119
- */
1120
- views: e.arrayOf(e.oneOf(["day", "month", "year"]).isRequired),
1121
- /**
1122
- * Years are displayed in ascending (chronological) order by default.
1123
- * If `desc`, years are displayed in descending order.
1124
- * @default 'asc'
1125
- */
1126
- yearsOrder: e.oneOf(["asc", "desc"]),
1127
- /**
1128
- * Years rendered per row.
1129
- * @default 3
1130
- */
1131
- yearsPerRow: e.oneOf([3, 4])
1132
- };
1133
- const ye = ["desktopModeMediaQuery"], x = /* @__PURE__ */ f.forwardRef(function(a, t) {
1134
- const n = y({
1135
- props: a,
1136
- name: "MuiDatePicker"
1137
- }), {
1138
- desktopModeMediaQuery: o = ne
1139
- } = n, r = D(n, ye);
1140
- return re(o, {
1141
- defaultMatches: !0
1142
- }) ? /* @__PURE__ */ c.jsx(k, s({
1143
- ref: t
1144
- }, r)) : /* @__PURE__ */ c.jsx(j, s({
1145
- ref: t
1146
- }, r));
1147
- });
1148
- process.env.NODE_ENV !== "production" && (x.displayName = "DatePicker");
1149
- process.env.NODE_ENV !== "production" && (x.propTypes = {
1150
- // ----------------------------- Warning --------------------------------
1151
- // | These PropTypes are generated from the TypeScript type definitions |
1152
- // | To update them edit the TypeScript types and run "pnpm proptypes" |
1153
- // ----------------------------------------------------------------------
1154
- /**
1155
- * If `true`, the main element is focused during the first mount.
1156
- * This main element is:
1157
- * - the element chosen by the visible view if any (i.e: the selected day on the `day` view).
1158
- * - the `input` element if there is a field rendered.
1159
- */
1160
- autoFocus: e.bool,
1161
- className: e.string,
1162
- /**
1163
- * If `true`, the Picker will close after submitting the full date.
1164
- * @default `true` for desktop, `false` for mobile (based on the chosen wrapper and `desktopModeMediaQuery` prop).
1165
- */
1166
- closeOnSelect: e.bool,
1167
- /**
1168
- * Formats the day of week displayed in the calendar header.
1169
- * @param {PickerValidDate} date The date of the day of week provided by the adapter.
1170
- * @returns {string} The name to display.
1171
- * @default (date: PickerValidDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()
1172
- */
1173
- dayOfWeekFormatter: e.func,
1174
- /**
1175
- * The default value.
1176
- * Used when the component is not controlled.
1177
- */
1178
- defaultValue: e.object,
1179
- /**
1180
- * CSS media query when `Mobile` mode will be changed to `Desktop`.
1181
- * @default '@media (pointer: fine)'
1182
- * @example '@media (min-width: 720px)' or theme.breakpoints.up("sm")
1183
- */
1184
- desktopModeMediaQuery: e.string,
1185
- /**
1186
- * If `true`, the component is disabled.
1187
- * When disabled, the value cannot be changed and no interaction is possible.
1188
- * @default false
1189
- */
1190
- disabled: e.bool,
1191
- /**
1192
- * If `true`, disable values after the current date for date components, time for time components and both for date time components.
1193
- * @default false
1194
- */
1195
- disableFuture: e.bool,
1196
- /**
1197
- * If `true`, today's date is rendering without highlighting with circle.
1198
- * @default false
1199
- */
1200
- disableHighlightToday: e.bool,
1201
- /**
1202
- * If `true`, the button to open the Picker will not be rendered (it will only render the field).
1203
- * @deprecated Use the [field component](https://mui.com/x/react-date-pickers/fields/) instead.
1204
- * @default false
1205
- */
1206
- disableOpenPicker: e.bool,
1207
- /**
1208
- * If `true`, disable values before the current date for date components, time for time components and both for date time components.
1209
- * @default false
1210
- */
1211
- disablePast: e.bool,
1212
- /**
1213
- * If `true`, the week number will be display in the calendar.
1214
- */
1215
- displayWeekNumber: e.bool,
1216
- /**
1217
- * @default true
1218
- */
1219
- enableAccessibleFieldDOMStructure: e.any,
1220
- /**
1221
- * The day view will show as many weeks as needed after the end of the current month to match this value.
1222
- * Put it to 6 to have a fixed number of weeks in Gregorian calendars
1223
- */
1224
- fixedWeekNumber: e.number,
1225
- /**
1226
- * Format of the date when rendered in the input(s).
1227
- * Defaults to localized format based on the used `views`.
1228
- */
1229
- format: e.string,
1230
- /**
1231
- * Density of the format when rendered in the input.
1232
- * Setting `formatDensity` to `"spacious"` will add a space before and after each `/`, `-` and `.` character.
1233
- * @default "dense"
1234
- */
1235
- formatDensity: e.oneOf(["dense", "spacious"]),
1236
- /**
1237
- * Pass a ref to the `input` element.
1238
- */
1239
- inputRef: m,
1240
- /**
1241
- * The label content.
1242
- */
1243
- label: e.node,
1244
- /**
1245
- * If `true`, calls `renderLoading` instead of rendering the day calendar.
1246
- * Can be used to preload information and show it in calendar.
1247
- * @default false
1248
- */
1249
- loading: e.bool,
1250
- /**
1251
- * Locale for components texts.
1252
- * Allows overriding texts coming from `LocalizationProvider` and `theme`.
1253
- */
1254
- localeText: e.object,
1255
- /**
1256
- * Maximal selectable date.
1257
- * @default 2099-12-31
1258
- */
1259
- maxDate: e.object,
1260
- /**
1261
- * Minimal selectable date.
1262
- * @default 1900-01-01
1263
- */
1264
- minDate: e.object,
1265
- /**
1266
- * Months rendered per row.
1267
- * @default 3
1268
- */
1269
- monthsPerRow: e.oneOf([3, 4]),
1270
- /**
1271
- * Name attribute used by the `input` element in the Field.
1272
- */
1273
- name: e.string,
1274
- /**
1275
- * Callback fired when the value is accepted.
1276
- * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
1277
- * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
1278
- * @param {TValue} value The value that was just accepted.
1279
- * @param {FieldChangeHandlerContext<TError>} context Context about this acceptance:
1280
- * - `validationError`: validation result of the current value
1281
- * - `source`: source of the acceptance. One of 'field' | 'view' | 'unknown'
1282
- * - `shortcut` (optional): the shortcut metadata if the value was accepted via a shortcut selection
1283
- */
1284
- onAccept: e.func,
1285
- /**
1286
- * Callback fired when the value changes.
1287
- * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
1288
- * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
1289
- * @param {TValue} value The new value.
1290
- * @param {FieldChangeHandlerContext<TError>} context Context about this change:
1291
- * - `validationError`: validation result of the current value
1292
- * - `source`: source of the change. One of 'field' | 'view' | 'unknown'
1293
- * - `shortcut` (optional): the shortcut metadata if the change was triggered by a shortcut selection
1294
- */
1295
- onChange: e.func,
1296
- /**
1297
- * Callback fired when the popup requests to be closed.
1298
- * Use in controlled mode (see `open`).
1299
- */
1300
- onClose: e.func,
1301
- /**
1302
- * Callback fired when the error associated with the current value changes.
1303
- * When a validation error is detected, the `error` parameter contains a non-null value.
1304
- * This can be used to render an appropriate form error.
1305
- * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.
1306
- * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.
1307
- * @param {TError} error The reason why the current value is not valid.
1308
- * @param {TValue} value The value associated with the error.
1309
- */
1310
- onError: e.func,
1311
- /**
1312
- * Callback fired on month change.
1313
- * @param {PickerValidDate} month The new month.
1314
- */
1315
- onMonthChange: e.func,
1316
- /**
1317
- * Callback fired when the popup requests to be opened.
1318
- * Use in controlled mode (see `open`).
1319
- */
1320
- onOpen: e.func,
1321
- /**
1322
- * Callback fired when the selected sections change.
1323
- * @param {FieldSelectedSections} newValue The new selected sections.
1324
- */
1325
- onSelectedSectionsChange: e.func,
1326
- /**
1327
- * Callback fired on view change.
1328
- * @template TView Type of the view. It will vary based on the Picker type and the `views` it uses.
1329
- * @param {TView} view The new view.
1330
- */
1331
- onViewChange: e.func,
1332
- /**
1333
- * Callback fired on year change.
1334
- * @param {PickerValidDate} year The new year.
1335
- */
1336
- onYearChange: e.func,
1337
- /**
1338
- * Control the popup or dialog open state.
1339
- * @default false
1340
- */
1341
- open: e.bool,
1342
- /**
1343
- * The default visible view.
1344
- * Used when the component view is not controlled.
1345
- * Must be a valid option from `views` list.
1346
- */
1347
- openTo: e.oneOf(["day", "month", "year"]),
1348
- /**
1349
- * Force rendering in particular orientation.
1350
- */
1351
- orientation: e.oneOf(["landscape", "portrait"]),
1352
- /**
1353
- * If `true`, the component is read-only.
1354
- * When read-only, the value cannot be changed but the user can interact with the interface.
1355
- * @default false
1356
- */
1357
- readOnly: e.bool,
1358
- /**
1359
- * If `true`, disable heavy animations.
1360
- * @default `@media(prefers-reduced-motion: reduce)` || `navigator.userAgent` matches Android <10 or iOS <13
1361
- */
1362
- reduceAnimations: e.bool,
1363
- /**
1364
- * The date used to generate the new value when both `value` and `defaultValue` are empty.
1365
- * @default The closest valid date-time using the validation props, except callbacks like `shouldDisable<...>`.
1366
- */
1367
- referenceDate: e.object,
1368
- /**
1369
- * Component displaying when passed `loading` true.
1370
- * @returns {React.ReactNode} The node to render when loading.
1371
- * @default () => <span>...</span>
1372
- */
1373
- renderLoading: e.func,
1374
- /**
1375
- * The currently selected sections.
1376
- * This prop accepts four formats:
1377
- * 1. If a number is provided, the section at this index will be selected.
1378
- * 2. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.
1379
- * 3. If `"all"` is provided, all the sections will be selected.
1380
- * 4. If `null` is provided, no section will be selected.
1381
- * If not provided, the selected sections will be handled internally.
1382
- */
1383
- selectedSections: e.oneOfType([e.oneOf(["all", "day", "empty", "hours", "meridiem", "minutes", "month", "seconds", "weekDay", "year"]), e.number]),
1384
- /**
1385
- * Disable specific date.
1386
- *
1387
- * Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.
1388
- *
1389
- * @param {PickerValidDate} day The date to test.
1390
- * @returns {boolean} If `true` the date will be disabled.
1391
- */
1392
- shouldDisableDate: e.func,
1393
- /**
1394
- * Disable specific month.
1395
- * @param {PickerValidDate} month The month to test.
1396
- * @returns {boolean} If `true`, the month will be disabled.
1397
- */
1398
- shouldDisableMonth: e.func,
1399
- /**
1400
- * Disable specific year.
1401
- * @param {PickerValidDate} year The year to test.
1402
- * @returns {boolean} If `true`, the year will be disabled.
1403
- */
1404
- shouldDisableYear: e.func,
1405
- /**
1406
- * If `true`, days outside the current month are rendered:
1407
- *
1408
- * - if `fixedWeekNumber` is defined, renders days to have the weeks requested.
1409
- *
1410
- * - if `fixedWeekNumber` is not defined, renders day to fill the first and last week of the current month.
1411
- *
1412
- * - ignored if `calendars` equals more than `1` on range pickers.
1413
- * @default false
1414
- */
1415
- showDaysOutsideCurrentMonth: e.bool,
1416
- /**
1417
- * The props used for each component slot.
1418
- * @default {}
1419
- */
1420
- slotProps: e.object,
1421
- /**
1422
- * Overridable component slots.
1423
- * @default {}
1424
- */
1425
- slots: e.object,
1426
- /**
1427
- * The system prop that allows defining system overrides as well as additional CSS styles.
1428
- */
1429
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
1430
- /**
1431
- * Choose which timezone to use for the value.
1432
- * Example: "default", "system", "UTC", "America/New_York".
1433
- * If you pass values from other timezones to some props, they will be converted to this timezone before being used.
1434
- * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documentation} for more details.
1435
- * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.
1436
- */
1437
- timezone: e.string,
1438
- /**
1439
- * The selected value.
1440
- * Used when the component is controlled.
1441
- */
1442
- value: e.object,
1443
- /**
1444
- * The visible view.
1445
- * Used when the component view is controlled.
1446
- * Must be a valid option from `views` list.
1447
- */
1448
- view: e.oneOf(["day", "month", "year"]),
1449
- /**
1450
- * Define custom view renderers for each section.
1451
- * If `null`, the section will only have field editing.
1452
- * If `undefined`, internally defined view will be used.
1453
- */
1454
- viewRenderers: e.shape({
1455
- day: e.func,
1456
- month: e.func,
1457
- year: e.func
1458
- }),
1459
- /**
1460
- * Available views.
1461
- */
1462
- views: e.arrayOf(e.oneOf(["day", "month", "year"]).isRequired),
1463
- /**
1464
- * Years are displayed in ascending (chronological) order by default.
1465
- * If `desc`, years are displayed in descending order.
1466
- * @default 'asc'
1467
- */
1468
- yearsOrder: e.oneOf(["asc", "desc"]),
1469
- /**
1470
- * Years rendered per row.
1471
- * @default 4 on desktop, 3 on mobile
1472
- */
1473
- yearsPerRow: e.oneOf([3, 4])
1474
- });
1475
- const he = ({
1476
- label: l,
1477
- required: a = !1,
1478
- error: t,
1479
- htmlFor: n,
1480
- hint: o,
1481
- ...r
1482
- }) => {
1483
- const i = I();
1484
- return /* @__PURE__ */ c.jsx(L, { label: l, required: a, error: t, htmlFor: n, hint: o, children: /* @__PURE__ */ c.jsx(
1485
- x,
1486
- {
1487
- enableAccessibleFieldDOMStructure: !1,
1488
- slots: {
1489
- textField: z,
1490
- // Use Material-UI TextField as input
1491
- ...r.slots ?? {}
1492
- // Allow user to override slots if needed
1493
- },
1494
- slotProps: {
1495
- openPickerButton: {
1496
- edge: "end",
1497
- sx: { my: -1 }
1498
- },
1499
- popper: {
1500
- sx: {
1501
- "& .MuiPaper-root": {
1502
- border: "1px solid",
1503
- borderColor: (i.vars ?? i).palette.divider,
1504
- borderRadius: (i.vars ?? i).shape.borderRadius,
1505
- boxShadow: "none",
1506
- backgroundImage: "none"
1507
- }
1508
- }
1509
- },
1510
- ...r.slotProps ?? {}
1511
- // Allow user to override slotProps if needed
1512
- },
1513
- ...r
1514
- }
1515
- ) });
1516
- };
1517
- he.displayName = "SDatePicker";
1518
- export {
1519
- he as SDatePicker,
1520
- he as default
1521
- };
1
+ import "../createTheme-DuS5_nJb.js";
2
+ import { t as e } from "../s-date-picker-BYqxsjPU.js";
3
+ export { e as SDatePicker, e as default };