@pisell/date-picker 1.0.129 → 1.0.130

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 (482) hide show
  1. package/es/ActionBar/index.d.ts +21 -17
  2. package/es/ActionBar/index.js +101 -152
  3. package/es/AdapterDateFns/index.d.ts +2 -1
  4. package/es/AdapterDateFns/index.js +3 -1
  5. package/es/AdapterDateFnsJalali/index.d.ts +2 -1
  6. package/es/AdapterDateFnsJalali/index.js +3 -1
  7. package/es/AdapterDayjs/index.d.ts +2 -1
  8. package/es/AdapterDayjs/index.js +3 -1
  9. package/es/AdapterLuxon/index.d.ts +2 -1
  10. package/es/AdapterLuxon/index.js +3 -1
  11. package/es/AdapterMoment/index.d.ts +2 -1
  12. package/es/AdapterMoment/index.js +3 -1
  13. package/es/AdapterMomentHijri/index.d.ts +2 -1
  14. package/es/AdapterMomentHijri/index.js +3 -1
  15. package/es/AdapterMomentJalaali/index.d.ts +2 -1
  16. package/es/AdapterMomentJalaali/index.js +3 -1
  17. package/es/CustomCalendarHeader/index.d.ts +6 -2
  18. package/es/CustomCalendarHeader/index.js +45 -51
  19. package/es/DatePickerLocales/index.d.ts +1 -1
  20. package/es/DatePickerLocales/index.js +3 -1
  21. package/es/DateRangeCalendar/DateRangeCalendar.d.ts +8 -5
  22. package/es/DateRangeCalendar/DateRangeCalendar.js +427 -683
  23. package/es/DateRangeCalendar/DateRangeCalendar.types.d.ts +125 -118
  24. package/es/DateRangeCalendar/DateRangeCalendar.types.js +1 -1
  25. package/es/DateRangeCalendar/dateRangeCalendarClasses.d.ts +13 -10
  26. package/es/DateRangeCalendar/dateRangeCalendarClasses.js +12 -5
  27. package/es/DateRangeCalendar/index.d.ts +4 -4
  28. package/es/DateRangeCalendar/index.js +4 -2
  29. package/es/DateRangeCalendar/useDragRange.d.ts +38 -27
  30. package/es/DateRangeCalendar/useDragRange.js +168 -255
  31. package/es/DateRangePicker/DateRangePicker.d.ts +8 -5
  32. package/es/DateRangePicker/DateRangePicker.js +104 -326
  33. package/es/DateRangePicker/DateRangePicker.types.d.ts +40 -36
  34. package/es/DateRangePicker/DateRangePicker.types.js +1 -1
  35. package/es/DateRangePicker/DateRangePickerToolbar.d.ts +14 -11
  36. package/es/DateRangePicker/DateRangePickerToolbar.js +76 -113
  37. package/es/DateRangePicker/dateRangePickerToolbarClasses.d.ts +11 -8
  38. package/es/DateRangePicker/dateRangePickerToolbarClasses.js +9 -4
  39. package/es/DateRangePicker/index.d.ts +5 -6
  40. package/es/DateRangePicker/index.js +5 -3
  41. package/es/DateRangePicker/shared.d.ts +54 -48
  42. package/es/DateRangePicker/shared.js +35 -45
  43. package/es/DateRangePickerDay/DateRangePickerDay.d.ts +42 -39
  44. package/es/DateRangePickerDay/DateRangePickerDay.js +222 -363
  45. package/es/DateRangePickerDay/dateRangePickerDayClasses.d.ts +43 -40
  46. package/es/DateRangePickerDay/dateRangePickerDayClasses.js +28 -4
  47. package/es/DateRangePickerDay/index.d.ts +3 -4
  48. package/es/DateRangePickerDay/index.js +4 -2
  49. package/es/DesktopDateRangePicker/DesktopDateRangePicker.d.ts +8 -5
  50. package/es/DesktopDateRangePicker/DesktopDateRangePicker.js +123 -344
  51. package/es/DesktopDateRangePicker/DesktopDateRangePicker.types.d.ts +38 -35
  52. package/es/DesktopDateRangePicker/DesktopDateRangePicker.types.js +1 -1
  53. package/es/DesktopDateRangePicker/index.d.ts +3 -2
  54. package/es/DesktopDateRangePicker/index.js +3 -1
  55. package/es/Dialog/index.d.ts +6 -2
  56. package/es/Dialog/index.js +24 -24
  57. package/es/Drawer/index.d.ts +10 -7
  58. package/es/Drawer/index.js +18 -30
  59. package/es/MobileDateRangePicker/MobileDateRangePicker.d.ts +8 -5
  60. package/es/MobileDateRangePicker/MobileDateRangePicker.js +125 -350
  61. package/es/MobileDateRangePicker/MobileDateRangePicker.types.d.ts +38 -35
  62. package/es/MobileDateRangePicker/MobileDateRangePicker.types.js +1 -1
  63. package/es/MobileDateRangePicker/index.d.ts +3 -2
  64. package/es/MobileDateRangePicker/index.js +3 -1
  65. package/es/MultiInputDateRangeField/MultiInputDateRangeField.d.ts +8 -5
  66. package/es/MultiInputDateRangeField/MultiInputDateRangeField.js +188 -323
  67. package/es/MultiInputDateRangeField/MultiInputDateRangeField.types.d.ts +69 -65
  68. package/es/MultiInputDateRangeField/MultiInputDateRangeField.types.js +1 -1
  69. package/es/MultiInputDateRangeField/index.d.ts +4 -3
  70. package/es/MultiInputDateRangeField/index.js +4 -2
  71. package/es/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.d.ts +8 -5
  72. package/es/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +197 -372
  73. package/es/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.types.d.ts +70 -66
  74. package/es/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.types.js +1 -1
  75. package/es/MultiInputDateTimeRangeField/index.d.ts +4 -3
  76. package/es/MultiInputDateTimeRangeField/index.js +4 -2
  77. package/es/MultiInputTimeRangeField/MultiInputTimeRangeField.d.ts +8 -5
  78. package/es/MultiInputTimeRangeField/MultiInputTimeRangeField.js +192 -348
  79. package/es/MultiInputTimeRangeField/MultiInputTimeRangeField.types.d.ts +70 -66
  80. package/es/MultiInputTimeRangeField/MultiInputTimeRangeField.types.js +1 -1
  81. package/es/MultiInputTimeRangeField/index.d.ts +4 -3
  82. package/es/MultiInputTimeRangeField/index.js +4 -2
  83. package/es/OldActionBar/index.d.ts +18 -14
  84. package/es/OldActionBar/index.js +67 -109
  85. package/es/OldPisellDateRangePicker/index.d.ts +81 -78
  86. package/es/OldPisellDateRangePicker/index.js +175 -261
  87. package/es/PisellDateRangePicker/LocaleContext.d.ts +8 -4
  88. package/es/PisellDateRangePicker/LocaleContext.js +9 -6
  89. package/es/PisellDateRangePicker/index.d.ts +85 -82
  90. package/es/PisellDateRangePicker/index.js +258 -387
  91. package/es/PisellDateRangePicker/useCssVariables.d.ts +7 -5
  92. package/es/PisellDateRangePicker/useCssVariables.js +14 -19
  93. package/es/Shortcuts/index.d.ts +15 -11
  94. package/es/Shortcuts/index.js +22 -36
  95. package/es/SingleInputDateRangeField/SingleInputDateRangeField.d.ts +9 -6
  96. package/es/SingleInputDateRangeField/SingleInputDateRangeField.js +143 -319
  97. package/es/SingleInputDateRangeField/SingleInputDateRangeField.types.d.ts +49 -45
  98. package/es/SingleInputDateRangeField/SingleInputDateRangeField.types.js +1 -1
  99. package/es/SingleInputDateRangeField/index.d.ts +4 -3
  100. package/es/SingleInputDateRangeField/index.js +4 -2
  101. package/es/SingleInputDateRangeField/useSingleInputDateRangeField.d.ts +11 -3
  102. package/es/SingleInputDateRangeField/useSingleInputDateRangeField.js +32 -37
  103. package/es/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.d.ts +9 -6
  104. package/es/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +152 -368
  105. package/es/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.types.d.ts +50 -46
  106. package/es/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.types.js +1 -1
  107. package/es/SingleInputDateTimeRangeField/index.d.ts +4 -3
  108. package/es/SingleInputDateTimeRangeField/index.js +4 -2
  109. package/es/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.d.ts +11 -3
  110. package/es/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.js +36 -42
  111. package/es/SingleInputTimeRangeField/SingleInputTimeRangeField.d.ts +9 -6
  112. package/es/SingleInputTimeRangeField/SingleInputTimeRangeField.js +147 -344
  113. package/es/SingleInputTimeRangeField/SingleInputTimeRangeField.types.d.ts +50 -46
  114. package/es/SingleInputTimeRangeField/SingleInputTimeRangeField.types.js +1 -1
  115. package/es/SingleInputTimeRangeField/index.d.ts +4 -3
  116. package/es/SingleInputTimeRangeField/index.js +4 -2
  117. package/es/SingleInputTimeRangeField/useSingleInputTimeRangeField.d.ts +11 -3
  118. package/es/SingleInputTimeRangeField/useSingleInputTimeRangeField.js +30 -36
  119. package/es/StaticDateRangePicker/StaticDateRangePicker.d.ts +8 -5
  120. package/es/StaticDateRangePicker/StaticDateRangePicker.js +88 -277
  121. package/es/StaticDateRangePicker/StaticDateRangePicker.types.d.ts +33 -30
  122. package/es/StaticDateRangePicker/StaticDateRangePicker.types.js +1 -1
  123. package/es/StaticDateRangePicker/index.d.ts +3 -2
  124. package/es/StaticDateRangePicker/index.js +3 -1
  125. package/es/Toolbar/index.d.ts +7 -3
  126. package/es/Toolbar/index.js +110 -168
  127. package/es/_virtual/_@oxc-project_runtime@0.108.0/helpers/defineProperty.js +14 -0
  128. package/es/_virtual/_@oxc-project_runtime@0.108.0/helpers/objectSpread2.js +27 -0
  129. package/es/_virtual/_@oxc-project_runtime@0.108.0/helpers/objectWithoutProperties.js +15 -0
  130. package/es/_virtual/_@oxc-project_runtime@0.108.0/helpers/objectWithoutPropertiesLoose.js +13 -0
  131. package/es/_virtual/_@oxc-project_runtime@0.108.0/helpers/toPrimitive.js +16 -0
  132. package/es/_virtual/_@oxc-project_runtime@0.108.0/helpers/toPropertyKey.js +11 -0
  133. package/es/_virtual/_@oxc-project_runtime@0.108.0/helpers/typeof.js +12 -0
  134. package/es/browserSelect/index.d.ts +6 -3
  135. package/es/browserSelect/index.js +34 -31
  136. package/es/constants.d.ts +61 -57
  137. package/es/constants.js +86 -127
  138. package/es/dateRangeViewRenderers/dateRangeViewRenderers.d.ts +50 -7
  139. package/es/dateRangeViewRenderers/dateRangeViewRenderers.js +48 -81
  140. package/es/dateRangeViewRenderers/index.d.ts +2 -2
  141. package/es/dateRangeViewRenderers/index.js +3 -1
  142. package/es/hooks/useDocumentVisibility.d.ts +3 -1
  143. package/es/hooks/useDocumentVisibility.js +20 -26
  144. package/es/hooks/useNextDay.d.ts +3 -1
  145. package/es/hooks/useNextDay.js +18 -13
  146. package/es/hooks/useUpdateEffect.d.ts +3 -1
  147. package/es/hooks/useUpdateEffect.js +13 -10
  148. package/es/icon/ChevronLeft.d.ts +8 -4
  149. package/es/icon/ChevronLeft.js +25 -21
  150. package/es/icon/ChevronLeftDouble.d.ts +8 -4
  151. package/es/icon/ChevronLeftDouble.js +25 -21
  152. package/es/icon/ChevronRight.d.ts +8 -4
  153. package/es/icon/ChevronRight.js +25 -21
  154. package/es/icon/ChevronRightDouble.d.ts +8 -4
  155. package/es/icon/ChevronRightDouble.js +25 -21
  156. package/es/icon/CloseCircle.d.ts +8 -4
  157. package/es/icon/CloseCircle.js +28 -24
  158. package/es/index.d.ts +53 -25
  159. package/es/index.js +28 -28
  160. package/es/internals/hooks/useDesktopRangePicker/index.d.ts +3 -2
  161. package/es/internals/hooks/useDesktopRangePicker/index.js +3 -1
  162. package/es/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.d.ts +12 -4
  163. package/es/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +95 -133
  164. package/es/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.types.d.ts +35 -30
  165. package/es/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.types.js +1 -1
  166. package/es/internals/hooks/useEnrichedRangePickerFieldProps.d.ts +58 -51
  167. package/es/internals/hooks/useEnrichedRangePickerFieldProps.js +126 -203
  168. package/es/internals/hooks/useMobileRangePicker/index.d.ts +3 -2
  169. package/es/internals/hooks/useMobileRangePicker/index.js +3 -1
  170. package/es/internals/hooks/useMobileRangePicker/useMobileRangePicker.d.ts +12 -4
  171. package/es/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +95 -138
  172. package/es/internals/hooks/useMobileRangePicker/useMobileRangePicker.types.d.ts +31 -27
  173. package/es/internals/hooks/useMobileRangePicker/useMobileRangePicker.types.js +1 -1
  174. package/es/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.d.ts +15 -3
  175. package/es/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js +78 -111
  176. package/es/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.d.ts +16 -4
  177. package/es/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js +86 -117
  178. package/es/internals/hooks/useMultiInputRangeField/useMultiInputRangeField.types.d.ts +19 -15
  179. package/es/internals/hooks/useMultiInputRangeField/useMultiInputRangeField.types.js +1 -1
  180. package/es/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.d.ts +16 -4
  181. package/es/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +80 -111
  182. package/es/internals/hooks/useRangePosition.d.ts +30 -26
  183. package/es/internals/hooks/useRangePosition.js +33 -43
  184. package/es/internals/hooks/useStaticRangePicker/index.d.ts +3 -2
  185. package/es/internals/hooks/useStaticRangePicker/index.js +3 -1
  186. package/es/internals/hooks/useStaticRangePicker/useStaticRangePicker.d.ts +13 -4
  187. package/es/internals/hooks/useStaticRangePicker/useStaticRangePicker.js +53 -83
  188. package/es/internals/hooks/useStaticRangePicker/useStaticRangePicker.types.d.ts +32 -30
  189. package/es/internals/hooks/useStaticRangePicker/useStaticRangePicker.types.js +1 -1
  190. package/es/internals/models/dateRange.d.ts +25 -22
  191. package/es/internals/models/dateRange.js +1 -1
  192. package/es/internals/models/dateTimeRange.d.ts +16 -12
  193. package/es/internals/models/dateTimeRange.js +1 -1
  194. package/es/internals/models/fields.d.ts +33 -29
  195. package/es/internals/models/fields.js +1 -1
  196. package/es/internals/models/index.d.ts +7 -6
  197. package/es/internals/models/index.js +1 -6
  198. package/es/internals/models/range.d.ts +6 -3
  199. package/es/internals/models/range.js +1 -1
  200. package/es/internals/models/rangePickerProps.d.ts +16 -12
  201. package/es/internals/models/rangePickerProps.js +1 -1
  202. package/es/internals/models/timeRange.d.ts +16 -12
  203. package/es/internals/models/timeRange.js +1 -1
  204. package/es/internals/utils/date-fields-utils.d.ts +28 -23
  205. package/es/internals/utils/date-fields-utils.js +21 -30
  206. package/es/internals/utils/date-range-manager.d.ts +26 -17
  207. package/es/internals/utils/date-range-manager.js +38 -57
  208. package/es/internals/utils/date-utils.d.ts +10 -6
  209. package/es/internals/utils/date-utils.js +13 -9
  210. package/es/internals/utils/releaseInfo.d.ts +4 -1
  211. package/es/internals/utils/releaseInfo.js +13 -13
  212. package/es/internals/utils/validation/validateDateRange.d.ts +12 -7
  213. package/es/internals/utils/validation/validateDateRange.js +26 -55
  214. package/es/internals/utils/validation/validateDateTimeRange.d.ts +11 -8
  215. package/es/internals/utils/validation/validateDateTimeRange.js +26 -55
  216. package/es/internals/utils/validation/validateTimeRange.d.ts +10 -7
  217. package/es/internals/utils/validation/validateTimeRange.js +22 -36
  218. package/es/internals/utils/valueManagers.d.ts +11 -7
  219. package/es/internals/utils/valueManagers.js +89 -148
  220. package/es/locales/en-US.d.ts +26 -24
  221. package/es/locales/en-US.js +29 -25
  222. package/es/locales/index.d.ts +5 -2
  223. package/es/locales/index.js +27 -29
  224. package/es/locales/zh-CN.d.ts +26 -24
  225. package/es/locales/zh-CN.js +29 -25
  226. package/es/locales/zh-TW.d.ts +26 -24
  227. package/es/locales/zh-TW.js +29 -25
  228. package/es/models/index.d.ts +2 -1
  229. package/es/models/index.js +1 -1
  230. package/es/models/validation.d.ts +9 -9
  231. package/es/models/validation.js +1 -1
  232. package/es/themeAugmentation/components.d.ts +16 -20
  233. package/es/themeAugmentation/index.d.ts +4 -3
  234. package/es/themeAugmentation/index.js +1 -1
  235. package/es/themeAugmentation/overrides.d.ts +14 -18
  236. package/es/themeAugmentation/props.d.ts +31 -28
  237. package/es/themeAugmentation/themeAugmentation.spec.d.ts +1 -0
  238. package/es/themeAugmentation/themeAugmentation.spec.js +90 -0
  239. package/es/utils/index.d.ts +19 -15
  240. package/es/utils/index.js +70 -97
  241. package/lib/ActionBar/index.d.ts +20 -17
  242. package/lib/ActionBar/index.js +104 -186
  243. package/lib/AdapterDateFns/index.d.ts +2 -1
  244. package/lib/AdapterDateFns/index.js +8 -28
  245. package/lib/AdapterDateFnsJalali/index.d.ts +2 -1
  246. package/lib/AdapterDateFnsJalali/index.js +8 -28
  247. package/lib/AdapterDayjs/index.d.ts +2 -1
  248. package/lib/AdapterDayjs/index.js +8 -28
  249. package/lib/AdapterLuxon/index.d.ts +2 -1
  250. package/lib/AdapterLuxon/index.js +8 -28
  251. package/lib/AdapterMoment/index.d.ts +2 -1
  252. package/lib/AdapterMoment/index.js +8 -28
  253. package/lib/AdapterMomentHijri/index.d.ts +2 -1
  254. package/lib/AdapterMomentHijri/index.js +8 -28
  255. package/lib/AdapterMomentJalaali/index.d.ts +2 -1
  256. package/lib/AdapterMomentJalaali/index.js +8 -28
  257. package/lib/CustomCalendarHeader/index.d.ts +5 -2
  258. package/lib/CustomCalendarHeader/index.js +48 -54
  259. package/lib/DatePickerLocales/index.d.ts +1 -1
  260. package/lib/DatePickerLocales/index.js +7 -21
  261. package/lib/DateRangeCalendar/DateRangeCalendar.d.ts +8 -5
  262. package/lib/DateRangeCalendar/DateRangeCalendar.js +432 -672
  263. package/lib/DateRangeCalendar/DateRangeCalendar.types.d.ts +123 -118
  264. package/lib/DateRangeCalendar/DateRangeCalendar.types.js +0 -17
  265. package/lib/DateRangeCalendar/dateRangeCalendarClasses.d.ts +13 -10
  266. package/lib/DateRangeCalendar/dateRangeCalendarClasses.js +13 -35
  267. package/lib/DateRangeCalendar/index.d.ts +4 -4
  268. package/lib/DateRangeCalendar/index.js +5 -33
  269. package/lib/DateRangeCalendar/useDragRange.d.ts +37 -27
  270. package/lib/DateRangeCalendar/useDragRange.js +169 -271
  271. package/lib/DateRangePicker/DateRangePicker.d.ts +8 -5
  272. package/lib/DateRangePicker/DateRangePicker.js +109 -368
  273. package/lib/DateRangePicker/DateRangePicker.types.d.ts +38 -36
  274. package/lib/DateRangePicker/DateRangePicker.types.js +0 -17
  275. package/lib/DateRangePicker/DateRangePickerToolbar.d.ts +13 -11
  276. package/lib/DateRangePicker/DateRangePickerToolbar.js +81 -136
  277. package/lib/DateRangePicker/dateRangePickerToolbarClasses.d.ts +11 -8
  278. package/lib/DateRangePicker/dateRangePickerToolbarClasses.js +9 -35
  279. package/lib/DateRangePicker/index.d.ts +5 -6
  280. package/lib/DateRangePicker/index.js +7 -36
  281. package/lib/DateRangePicker/shared.d.ts +51 -48
  282. package/lib/DateRangePicker/shared.js +34 -70
  283. package/lib/DateRangePickerDay/DateRangePickerDay.d.ts +42 -39
  284. package/lib/DateRangePickerDay/DateRangePickerDay.js +226 -469
  285. package/lib/DateRangePickerDay/dateRangePickerDayClasses.d.ts +43 -40
  286. package/lib/DateRangePickerDay/dateRangePickerDayClasses.js +28 -54
  287. package/lib/DateRangePickerDay/index.d.ts +3 -4
  288. package/lib/DateRangePickerDay/index.js +5 -33
  289. package/lib/DesktopDateRangePicker/DesktopDateRangePicker.d.ts +8 -5
  290. package/lib/DesktopDateRangePicker/DesktopDateRangePicker.js +126 -402
  291. package/lib/DesktopDateRangePicker/DesktopDateRangePicker.types.d.ts +37 -35
  292. package/lib/DesktopDateRangePicker/DesktopDateRangePicker.types.js +0 -17
  293. package/lib/DesktopDateRangePicker/index.d.ts +3 -2
  294. package/lib/DesktopDateRangePicker/index.js +2 -28
  295. package/lib/Dialog/index.d.ts +5 -2
  296. package/lib/Dialog/index.js +26 -62
  297. package/lib/Drawer/index.d.ts +9 -7
  298. package/lib/Drawer/index.js +23 -59
  299. package/lib/MobileDateRangePicker/MobileDateRangePicker.d.ts +8 -5
  300. package/lib/MobileDateRangePicker/MobileDateRangePicker.js +128 -402
  301. package/lib/MobileDateRangePicker/MobileDateRangePicker.types.d.ts +37 -35
  302. package/lib/MobileDateRangePicker/MobileDateRangePicker.types.js +0 -17
  303. package/lib/MobileDateRangePicker/index.d.ts +3 -2
  304. package/lib/MobileDateRangePicker/index.js +2 -28
  305. package/lib/MultiInputDateRangeField/MultiInputDateRangeField.d.ts +8 -5
  306. package/lib/MultiInputDateRangeField/MultiInputDateRangeField.js +197 -374
  307. package/lib/MultiInputDateRangeField/MultiInputDateRangeField.types.d.ts +69 -65
  308. package/lib/MultiInputDateRangeField/MultiInputDateRangeField.types.js +0 -17
  309. package/lib/MultiInputDateRangeField/index.d.ts +4 -3
  310. package/lib/MultiInputDateRangeField/index.js +4 -31
  311. package/lib/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.d.ts +8 -5
  312. package/lib/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.js +206 -423
  313. package/lib/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.types.d.ts +70 -66
  314. package/lib/MultiInputDateTimeRangeField/MultiInputDateTimeRangeField.types.js +0 -17
  315. package/lib/MultiInputDateTimeRangeField/index.d.ts +4 -3
  316. package/lib/MultiInputDateTimeRangeField/index.js +4 -31
  317. package/lib/MultiInputTimeRangeField/MultiInputTimeRangeField.d.ts +8 -5
  318. package/lib/MultiInputTimeRangeField/MultiInputTimeRangeField.js +201 -399
  319. package/lib/MultiInputTimeRangeField/MultiInputTimeRangeField.types.d.ts +70 -66
  320. package/lib/MultiInputTimeRangeField/MultiInputTimeRangeField.types.js +0 -17
  321. package/lib/MultiInputTimeRangeField/index.d.ts +4 -3
  322. package/lib/MultiInputTimeRangeField/index.js +4 -31
  323. package/lib/OldActionBar/index.d.ts +16 -13
  324. package/lib/OldActionBar/index.js +72 -126
  325. package/lib/OldPisellDateRangePicker/index.d.ts +78 -78
  326. package/lib/OldPisellDateRangePicker/index.js +177 -276
  327. package/lib/PisellDateRangePicker/LocaleContext.d.ts +8 -4
  328. package/lib/PisellDateRangePicker/LocaleContext.js +10 -35
  329. package/lib/PisellDateRangePicker/index.d.ts +82 -82
  330. package/lib/PisellDateRangePicker/index.js +261 -379
  331. package/lib/PisellDateRangePicker/useCssVariables.d.ts +6 -5
  332. package/lib/PisellDateRangePicker/useCssVariables.js +14 -32
  333. package/lib/Shortcuts/index.d.ts +15 -11
  334. package/lib/Shortcuts/index.js +26 -58
  335. package/lib/SingleInputDateRangeField/SingleInputDateRangeField.d.ts +9 -6
  336. package/lib/SingleInputDateRangeField/SingleInputDateRangeField.js +147 -351
  337. package/lib/SingleInputDateRangeField/SingleInputDateRangeField.types.d.ts +48 -45
  338. package/lib/SingleInputDateRangeField/SingleInputDateRangeField.types.js +0 -17
  339. package/lib/SingleInputDateRangeField/index.d.ts +4 -3
  340. package/lib/SingleInputDateRangeField/index.js +4 -31
  341. package/lib/SingleInputDateRangeField/useSingleInputDateRangeField.d.ts +11 -3
  342. package/lib/SingleInputDateRangeField/useSingleInputDateRangeField.js +32 -58
  343. package/lib/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.d.ts +9 -6
  344. package/lib/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.js +156 -403
  345. package/lib/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.types.d.ts +49 -46
  346. package/lib/SingleInputDateTimeRangeField/SingleInputDateTimeRangeField.types.js +0 -17
  347. package/lib/SingleInputDateTimeRangeField/index.d.ts +4 -3
  348. package/lib/SingleInputDateTimeRangeField/index.js +4 -31
  349. package/lib/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.d.ts +11 -3
  350. package/lib/SingleInputDateTimeRangeField/useSingleInputDateTimeRangeField.js +36 -63
  351. package/lib/SingleInputTimeRangeField/SingleInputTimeRangeField.d.ts +9 -6
  352. package/lib/SingleInputTimeRangeField/SingleInputTimeRangeField.js +151 -376
  353. package/lib/SingleInputTimeRangeField/SingleInputTimeRangeField.types.d.ts +49 -46
  354. package/lib/SingleInputTimeRangeField/SingleInputTimeRangeField.types.js +0 -17
  355. package/lib/SingleInputTimeRangeField/index.d.ts +4 -3
  356. package/lib/SingleInputTimeRangeField/index.js +4 -31
  357. package/lib/SingleInputTimeRangeField/useSingleInputTimeRangeField.d.ts +11 -3
  358. package/lib/SingleInputTimeRangeField/useSingleInputTimeRangeField.js +30 -57
  359. package/lib/StaticDateRangePicker/StaticDateRangePicker.d.ts +8 -5
  360. package/lib/StaticDateRangePicker/StaticDateRangePicker.js +92 -314
  361. package/lib/StaticDateRangePicker/StaticDateRangePicker.types.d.ts +32 -30
  362. package/lib/StaticDateRangePicker/StaticDateRangePicker.types.js +0 -17
  363. package/lib/StaticDateRangePicker/index.d.ts +3 -2
  364. package/lib/StaticDateRangePicker/index.js +2 -28
  365. package/lib/Toolbar/index.d.ts +6 -3
  366. package/lib/Toolbar/index.js +112 -194
  367. package/lib/_virtual/_@oxc-project_runtime@0.108.0/helpers/defineProperty.js +14 -0
  368. package/lib/_virtual/_@oxc-project_runtime@0.108.0/helpers/objectSpread2.js +27 -0
  369. package/lib/_virtual/_@oxc-project_runtime@0.108.0/helpers/objectWithoutProperties.js +15 -0
  370. package/lib/_virtual/_@oxc-project_runtime@0.108.0/helpers/objectWithoutPropertiesLoose.js +14 -0
  371. package/lib/_virtual/_@oxc-project_runtime@0.108.0/helpers/toPrimitive.js +16 -0
  372. package/lib/_virtual/_@oxc-project_runtime@0.108.0/helpers/toPropertyKey.js +11 -0
  373. package/lib/_virtual/_@oxc-project_runtime@0.108.0/helpers/typeof.js +18 -0
  374. package/lib/_virtual/rolldown_runtime.js +29 -0
  375. package/lib/browserSelect/index.d.ts +5 -3
  376. package/lib/browserSelect/index.js +39 -56
  377. package/lib/constants.d.ts +61 -57
  378. package/lib/constants.js +87 -213
  379. package/lib/dateRangeViewRenderers/dateRangeViewRenderers.d.ts +49 -7
  380. package/lib/dateRangeViewRenderers/dateRangeViewRenderers.js +49 -116
  381. package/lib/dateRangeViewRenderers/index.d.ts +2 -2
  382. package/lib/dateRangeViewRenderers/index.js +2 -28
  383. package/lib/hooks/useDocumentVisibility.d.ts +2 -1
  384. package/lib/hooks/useDocumentVisibility.js +19 -37
  385. package/lib/hooks/useNextDay.d.ts +2 -1
  386. package/lib/hooks/useNextDay.js +19 -46
  387. package/lib/hooks/useUpdateEffect.d.ts +2 -1
  388. package/lib/hooks/useUpdateEffect.js +12 -32
  389. package/lib/icon/ChevronLeft.d.ts +7 -4
  390. package/lib/icon/ChevronLeft.js +26 -57
  391. package/lib/icon/ChevronLeftDouble.d.ts +7 -4
  392. package/lib/icon/ChevronLeftDouble.js +26 -57
  393. package/lib/icon/ChevronRight.d.ts +7 -4
  394. package/lib/icon/ChevronRight.js +26 -57
  395. package/lib/icon/ChevronRightDouble.d.ts +7 -4
  396. package/lib/icon/ChevronRightDouble.js +26 -57
  397. package/lib/icon/CloseCircle.d.ts +7 -4
  398. package/lib/icon/CloseCircle.js +29 -64
  399. package/lib/index.d.ts +41 -25
  400. package/lib/index.js +71 -89
  401. package/lib/internals/hooks/useDesktopRangePicker/index.d.ts +3 -2
  402. package/lib/internals/hooks/useDesktopRangePicker/index.js +2 -28
  403. package/lib/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.d.ts +12 -4
  404. package/lib/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.js +95 -168
  405. package/lib/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.types.d.ts +34 -30
  406. package/lib/internals/hooks/useDesktopRangePicker/useDesktopRangePicker.types.js +0 -17
  407. package/lib/internals/hooks/useEnrichedRangePickerFieldProps.d.ts +57 -51
  408. package/lib/internals/hooks/useEnrichedRangePickerFieldProps.js +128 -240
  409. package/lib/internals/hooks/useMobileRangePicker/index.d.ts +3 -2
  410. package/lib/internals/hooks/useMobileRangePicker/index.js +2 -28
  411. package/lib/internals/hooks/useMobileRangePicker/useMobileRangePicker.d.ts +12 -4
  412. package/lib/internals/hooks/useMobileRangePicker/useMobileRangePicker.js +96 -171
  413. package/lib/internals/hooks/useMobileRangePicker/useMobileRangePicker.types.d.ts +30 -27
  414. package/lib/internals/hooks/useMobileRangePicker/useMobileRangePicker.types.js +0 -17
  415. package/lib/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.d.ts +15 -3
  416. package/lib/internals/hooks/useMultiInputRangeField/useMultiInputDateRangeField.js +79 -140
  417. package/lib/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.d.ts +16 -4
  418. package/lib/internals/hooks/useMultiInputRangeField/useMultiInputDateTimeRangeField.js +88 -148
  419. package/lib/internals/hooks/useMultiInputRangeField/useMultiInputRangeField.types.d.ts +19 -15
  420. package/lib/internals/hooks/useMultiInputRangeField/useMultiInputRangeField.types.js +0 -17
  421. package/lib/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.d.ts +16 -4
  422. package/lib/internals/hooks/useMultiInputRangeField/useMultiInputTimeRangeField.js +82 -142
  423. package/lib/internals/hooks/useRangePosition.d.ts +30 -26
  424. package/lib/internals/hooks/useRangePosition.js +36 -63
  425. package/lib/internals/hooks/useStaticRangePicker/index.d.ts +3 -2
  426. package/lib/internals/hooks/useStaticRangePicker/index.js +2 -28
  427. package/lib/internals/hooks/useStaticRangePicker/useStaticRangePicker.d.ts +13 -4
  428. package/lib/internals/hooks/useStaticRangePicker/useStaticRangePicker.js +55 -94
  429. package/lib/internals/hooks/useStaticRangePicker/useStaticRangePicker.types.d.ts +32 -30
  430. package/lib/internals/hooks/useStaticRangePicker/useStaticRangePicker.types.js +0 -17
  431. package/lib/internals/models/dateRange.d.ts +25 -22
  432. package/lib/internals/models/dateRange.js +0 -17
  433. package/lib/internals/models/dateTimeRange.d.ts +16 -12
  434. package/lib/internals/models/dateTimeRange.js +0 -17
  435. package/lib/internals/models/fields.d.ts +33 -29
  436. package/lib/internals/models/fields.js +0 -17
  437. package/lib/internals/models/index.d.ts +7 -6
  438. package/lib/internals/models/index.js +0 -33
  439. package/lib/internals/models/range.d.ts +6 -3
  440. package/lib/internals/models/range.js +0 -17
  441. package/lib/internals/models/rangePickerProps.d.ts +16 -12
  442. package/lib/internals/models/rangePickerProps.js +0 -17
  443. package/lib/internals/models/timeRange.d.ts +16 -12
  444. package/lib/internals/models/timeRange.js +0 -17
  445. package/lib/internals/utils/date-fields-utils.d.ts +28 -23
  446. package/lib/internals/utils/date-fields-utils.js +20 -45
  447. package/lib/internals/utils/date-range-manager.d.ts +26 -17
  448. package/lib/internals/utils/date-range-manager.js +37 -53
  449. package/lib/internals/utils/date-utils.d.ts +10 -6
  450. package/lib/internals/utils/date-utils.js +15 -41
  451. package/lib/internals/utils/releaseInfo.d.ts +4 -1
  452. package/lib/internals/utils/releaseInfo.js +12 -36
  453. package/lib/internals/utils/validation/validateDateRange.d.ts +11 -7
  454. package/lib/internals/utils/validation/validateDateRange.js +26 -60
  455. package/lib/internals/utils/validation/validateDateTimeRange.d.ts +11 -8
  456. package/lib/internals/utils/validation/validateDateTimeRange.js +26 -60
  457. package/lib/internals/utils/validation/validateTimeRange.d.ts +10 -7
  458. package/lib/internals/utils/validation/validateTimeRange.js +22 -53
  459. package/lib/internals/utils/valueManagers.d.ts +11 -7
  460. package/lib/internals/utils/valueManagers.js +89 -146
  461. package/lib/locales/en-US.d.ts +25 -24
  462. package/lib/locales/en-US.js +27 -46
  463. package/lib/locales/index.d.ts +5 -2
  464. package/lib/locales/index.js +26 -65
  465. package/lib/locales/zh-CN.d.ts +25 -24
  466. package/lib/locales/zh-CN.js +27 -46
  467. package/lib/locales/zh-TW.d.ts +25 -24
  468. package/lib/locales/zh-TW.js +27 -46
  469. package/lib/models/index.d.ts +2 -1
  470. package/lib/models/index.js +0 -23
  471. package/lib/models/validation.d.ts +9 -9
  472. package/lib/models/validation.js +0 -17
  473. package/lib/themeAugmentation/components.d.ts +16 -20
  474. package/lib/themeAugmentation/index.d.ts +4 -3
  475. package/lib/themeAugmentation/index.js +0 -17
  476. package/lib/themeAugmentation/overrides.d.ts +11 -18
  477. package/lib/themeAugmentation/props.d.ts +21 -28
  478. package/lib/themeAugmentation/themeAugmentation.spec.d.ts +1 -0
  479. package/lib/themeAugmentation/themeAugmentation.spec.js +90 -0
  480. package/lib/utils/index.d.ts +19 -15
  481. package/lib/utils/index.js +81 -102
  482. package/package.json +2 -2
@@ -1,19 +1,23 @@
1
- import { ButtonProps } from 'antd';
2
- import { Dayjs } from 'dayjs';
3
- import './index.less';
1
+ import { Dayjs } from "dayjs";
2
+ import { ButtonProps } from "antd";
3
+ import React from "react";
4
+ import "./index.less";
5
+
6
+ //#region src/ActionBar/index.d.ts
4
7
  interface ActionBarProps {
5
- ownerState: any;
6
- onCancel: () => void;
7
- onChange: (val: any[], type?: 'time') => void;
8
- onOk: () => void;
9
- value: any[];
10
- showTime?: boolean | {
11
- defaultValue: Dayjs;
12
- [key: string]: any;
13
- }[];
14
- okButtonProps?: ButtonProps;
15
- cancelButtonProps?: ButtonProps;
16
- isDesktop: boolean;
8
+ ownerState: any;
9
+ onCancel: () => void;
10
+ onChange: (val: any[], type?: 'time') => void;
11
+ onOk: () => void;
12
+ value: any[];
13
+ showTime?: boolean | {
14
+ defaultValue: Dayjs;
15
+ [key: string]: any;
16
+ }[];
17
+ okButtonProps?: ButtonProps;
18
+ cancelButtonProps?: ButtonProps;
19
+ isDesktop: boolean;
17
20
  }
18
- declare const ActionBar: (props: ActionBarProps) => JSX.Element;
19
- export default ActionBar;
21
+ declare const ActionBar: (props: ActionBarProps) => React.JSX.Element;
22
+ //#endregion
23
+ export { ActionBar as default };
@@ -1,154 +1,103 @@
1
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
8
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
9
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
10
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
11
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
12
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
13
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
14
- import React, { useMemo, useContext } from 'react';
15
- import classNames from 'classnames';
16
- import { Button, TimePicker } from 'antd';
17
- import { MuiPickersAdapterContext } from '@mui/x-date-pickers';
18
- import { isArr, isMobile } from '@pisell/utils';
19
- import dayjs from 'dayjs';
20
- import { getText, pLocaleMap } from "../locales";
1
+ import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.108.0/helpers/objectSpread2.js";
2
+ import { getText, pLocaleMap } from "../locales/index.js";
3
+ import dayjs from "dayjs";
4
+ import { isArr, isMobile } from "@pisell/utils";
5
+ import { Button, TimePicker } from "antd";
6
+ import React, { useContext, useMemo } from "react";
7
+ import classNames from "classnames";
8
+ import { MuiPickersAdapterContext } from "@mui/x-date-pickers";
21
9
  import "./index.less";
22
- var ActionBar = function ActionBar(props) {
23
- var _value$, _value$2;
24
- var ownerState = props.ownerState,
25
- onCancel = props.onCancel,
26
- onOk = props.onOk,
27
- onChange = props.onChange,
28
- showTime = props.showTime,
29
- _props$value = props.value,
30
- value = _props$value === void 0 ? [] : _props$value,
31
- okButtonProps = props.okButtonProps,
32
- cancelButtonProps = props.cancelButtonProps,
33
- isDesktop = props.isDesktop;
34
- var local = useContext(MuiPickersAdapterContext);
35
- var locale = useMemo(function () {
36
- return local.utils.locale || 'en';
37
- }, [local.utils.locale]);
38
- var slotProps = ownerState.slotProps;
39
- var _ref = (slotProps === null || slotProps === void 0 ? void 0 : slotProps.shortcuts) || {},
40
- items = _ref.items;
41
- var hasShortcuts = !!items.length;
42
- var handleStartChange = function handleStartChange(val) {
43
- var _start$set;
44
- var newValue = _toConsumableArray(value);
45
- var start = newValue[0] || dayjs();
46
- newValue[0] = (start === null || start === void 0 || (_start$set = start.set('hour', (val === null || val === void 0 ? void 0 : val.get('hour')) || 0)) === null || _start$set === void 0 || (_start$set = _start$set.set('minute', (val === null || val === void 0 ? void 0 : val.get('minute')) || 0)) === null || _start$set === void 0 ? void 0 : _start$set.set('second', (val === null || val === void 0 ? void 0 : val.get('second')) || 0)) || null;
47
- onChange(newValue, 'time');
48
- };
49
- var handleEndChange = function handleEndChange(val) {
50
- var _end$set;
51
- var newValue = _toConsumableArray(value);
52
- var end = newValue[1] || dayjs();
53
- newValue[1] = (end === null || end === void 0 || (_end$set = end.set('hour', (val === null || val === void 0 ? void 0 : val.get('hour')) || 0)) === null || _end$set === void 0 || (_end$set = _end$set.set('minute', (val === null || val === void 0 ? void 0 : val.get('minute')) || 0)) === null || _end$set === void 0 ? void 0 : _end$set.set('second', (val === null || val === void 0 ? void 0 : val.get('second')) || 0)) || null;
54
- onChange(newValue, 'time');
55
- };
56
- var spaceStyle = useMemo(function () {
57
- return isMobile() ? {
58
- display: 'flex',
59
- justifyContent: 'end',
60
- gap: 16
61
- } : {
62
- display: 'flex'
63
- };
64
- }, []);
65
- var buttonStyle = useMemo(function () {
66
- return isMobile() ? {
67
- display: 'flex',
68
- justifyContent: 'end',
69
- marginBottom: 12
70
- } : {
71
- display: 'flex'
72
- };
73
- }, []);
74
- var startTimeProps = useMemo(function () {
75
- if (isArr(showTime) && showTime[0]) {
76
- return showTime[0];
77
- }
78
- return {
79
- format: 'HH:mm'
80
- };
81
- }, [showTime]);
82
- var endTimeProps = useMemo(function () {
83
- if (isArr(showTime) && showTime[1]) {
84
- return showTime[1];
85
- }
86
- return {
87
- format: 'HH:mm'
88
- };
89
- }, [showTime]);
90
- return /*#__PURE__*/React.createElement(React.Fragment, null, showTime ? /*#__PURE__*/React.createElement("div", {
91
- className: "date-picker-action-time"
92
- }, /*#__PURE__*/React.createElement("div", {
93
- className: "date-picker-action-time-item"
94
- }, /*#__PURE__*/React.createElement("div", {
95
- className: "date-picker-action-time-item-label"
96
- }, getText('action-bar-start.time', pLocaleMap[locale])), isDesktop ? /*#__PURE__*/React.createElement(TimePicker, _extends({
97
- placeholder: getText('action-bar-start.time', pLocaleMap[locale])
98
- }, startTimeProps, {
99
- changeOnBlur: true,
100
- value: value[0],
101
- size: "large",
102
- popupClassName: "date-picker-action-bar-time-picker-popup",
103
- onChange: handleStartChange,
104
- inputReadOnly: true
105
- })) : /*#__PURE__*/React.createElement("input", {
106
- type: "time",
107
- onChange: function onChange(e) {
108
- var val = e.target.value;
109
- handleStartChange(dayjs(val, 'HH:mm'));
110
- },
111
- className: "date-picker-input-time",
112
- value: (_value$ = value[0]) === null || _value$ === void 0 ? void 0 : _value$.format('HH:mm')
113
- })), /*#__PURE__*/React.createElement("div", {
114
- className: "date-picker-action-time-item"
115
- }, /*#__PURE__*/React.createElement("div", {
116
- className: "date-picker-action-time-item-label"
117
- }, getText('action-bar-end.time', pLocaleMap[locale])), isDesktop ? /*#__PURE__*/React.createElement(TimePicker, _extends({
118
- placeholder: getText('action-bar-end.time', pLocaleMap[locale])
119
- }, endTimeProps, {
120
- changeOnBlur: true,
121
- value: value[1],
122
- size: "large",
123
- popupClassName: "date-picker-action-bar-time-picker-popup",
124
- onChange: handleEndChange,
125
- inputReadOnly: true
126
- })) : /*#__PURE__*/React.createElement("input", {
127
- type: "time",
128
- onChange: function onChange(e) {
129
- var val = e.target.value;
130
- handleEndChange(dayjs(val, 'HH:mm'));
131
- },
132
- className: "date-picker-input-time",
133
- value: (_value$2 = value[1]) === null || _value$2 === void 0 ? void 0 : _value$2.format('HH:mm')
134
- }))) : null, /*#__PURE__*/React.createElement("div", {
135
- className: classNames(props.className, 'date-picker-action-bar')
136
- }, /*#__PURE__*/React.createElement("div", {
137
- className: "date-picker-action-bar-right",
138
- style: _objectSpread(_objectSpread({}, spaceStyle), {}, {
139
- margin: 0
140
- })
141
- }, /*#__PURE__*/React.createElement(Button, _extends({
142
- block: isMobile(),
143
- size: "large"
144
- }, cancelButtonProps || {}, {
145
- onClick: onCancel
146
- }), getText('action-bar-cancel', pLocaleMap[locale])), /*#__PURE__*/React.createElement(Button, _extends({
147
- type: "primary",
148
- size: "large",
149
- block: isMobile()
150
- }, okButtonProps || {}, {
151
- onClick: onOk
152
- }), getText('action-bar-apply', pLocaleMap[locale])))));
10
+
11
+ //#region src/ActionBar/index.tsx
12
+ const ActionBar = (props) => {
13
+ var _value$, _value$2;
14
+ const { ownerState, onCancel, onOk, onChange, showTime, value = [], okButtonProps, cancelButtonProps, isDesktop } = props;
15
+ const local = useContext(MuiPickersAdapterContext);
16
+ const locale = useMemo(() => {
17
+ return local.utils.locale || "en";
18
+ }, [local.utils.locale]);
19
+ const { slotProps } = ownerState;
20
+ const { items } = (slotProps === null || slotProps === void 0 ? void 0 : slotProps.shortcuts) || {};
21
+ items.length;
22
+ const handleStartChange = (val) => {
23
+ var _start$set;
24
+ const newValue = [...value];
25
+ const start = newValue[0] || dayjs();
26
+ newValue[0] = (start === null || start === void 0 || (_start$set = start.set("hour", (val === null || val === void 0 ? void 0 : val.get("hour")) || 0)) === null || _start$set === void 0 || (_start$set = _start$set.set("minute", (val === null || val === void 0 ? void 0 : val.get("minute")) || 0)) === null || _start$set === void 0 ? void 0 : _start$set.set("second", (val === null || val === void 0 ? void 0 : val.get("second")) || 0)) || null;
27
+ onChange(newValue, "time");
28
+ };
29
+ const handleEndChange = (val) => {
30
+ var _end$set;
31
+ const newValue = [...value];
32
+ const end = newValue[1] || dayjs();
33
+ newValue[1] = (end === null || end === void 0 || (_end$set = end.set("hour", (val === null || val === void 0 ? void 0 : val.get("hour")) || 0)) === null || _end$set === void 0 || (_end$set = _end$set.set("minute", (val === null || val === void 0 ? void 0 : val.get("minute")) || 0)) === null || _end$set === void 0 ? void 0 : _end$set.set("second", (val === null || val === void 0 ? void 0 : val.get("second")) || 0)) || null;
34
+ onChange(newValue, "time");
35
+ };
36
+ const spaceStyle = useMemo(() => {
37
+ return isMobile() ? {
38
+ display: "flex",
39
+ justifyContent: "end",
40
+ gap: 16
41
+ } : { display: "flex" };
42
+ }, []);
43
+ useMemo(() => {
44
+ return isMobile() ? {
45
+ display: "flex",
46
+ justifyContent: "end",
47
+ marginBottom: 12
48
+ } : { display: "flex" };
49
+ }, []);
50
+ const startTimeProps = useMemo(() => {
51
+ if (isArr(showTime) && showTime[0]) return showTime[0];
52
+ return { format: "HH:mm" };
53
+ }, [showTime]);
54
+ const endTimeProps = useMemo(() => {
55
+ if (isArr(showTime) && showTime[1]) return showTime[1];
56
+ return { format: "HH:mm" };
57
+ }, [showTime]);
58
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, showTime ? /* @__PURE__ */ React.createElement("div", { className: "date-picker-action-time" }, /* @__PURE__ */ React.createElement("div", { className: "date-picker-action-time-item" }, /* @__PURE__ */ React.createElement("div", { className: "date-picker-action-time-item-label" }, getText("action-bar-start.time", pLocaleMap[locale])), isDesktop ? /* @__PURE__ */ React.createElement(TimePicker, _objectSpread2(_objectSpread2({ placeholder: getText("action-bar-start.time", pLocaleMap[locale]) }, startTimeProps), {}, {
59
+ changeOnBlur: true,
60
+ value: value[0],
61
+ size: "large",
62
+ popupClassName: "date-picker-action-bar-time-picker-popup",
63
+ onChange: handleStartChange,
64
+ inputReadOnly: true
65
+ })) : /* @__PURE__ */ React.createElement("input", {
66
+ type: "time",
67
+ onChange: (e) => {
68
+ const val = e.target.value;
69
+ handleStartChange(dayjs(val, "HH:mm"));
70
+ },
71
+ className: "date-picker-input-time",
72
+ value: (_value$ = value[0]) === null || _value$ === void 0 ? void 0 : _value$.format("HH:mm")
73
+ })), /* @__PURE__ */ React.createElement("div", { className: "date-picker-action-time-item" }, /* @__PURE__ */ React.createElement("div", { className: "date-picker-action-time-item-label" }, getText("action-bar-end.time", pLocaleMap[locale])), isDesktop ? /* @__PURE__ */ React.createElement(TimePicker, _objectSpread2(_objectSpread2({ placeholder: getText("action-bar-end.time", pLocaleMap[locale]) }, endTimeProps), {}, {
74
+ changeOnBlur: true,
75
+ value: value[1],
76
+ size: "large",
77
+ popupClassName: "date-picker-action-bar-time-picker-popup",
78
+ onChange: handleEndChange,
79
+ inputReadOnly: true
80
+ })) : /* @__PURE__ */ React.createElement("input", {
81
+ type: "time",
82
+ onChange: (e) => {
83
+ const val = e.target.value;
84
+ handleEndChange(dayjs(val, "HH:mm"));
85
+ },
86
+ className: "date-picker-input-time",
87
+ value: (_value$2 = value[1]) === null || _value$2 === void 0 ? void 0 : _value$2.format("HH:mm")
88
+ }))) : null, /* @__PURE__ */ React.createElement("div", { className: classNames(props.className, "date-picker-action-bar") }, /* @__PURE__ */ React.createElement("div", {
89
+ className: "date-picker-action-bar-right",
90
+ style: _objectSpread2(_objectSpread2({}, spaceStyle), {}, { margin: 0 })
91
+ }, /* @__PURE__ */ React.createElement(Button, _objectSpread2(_objectSpread2({
92
+ block: isMobile(),
93
+ size: "large"
94
+ }, cancelButtonProps || {}), {}, { onClick: onCancel }), getText("action-bar-cancel", pLocaleMap[locale])), /* @__PURE__ */ React.createElement(Button, _objectSpread2(_objectSpread2({
95
+ type: "primary",
96
+ size: "large",
97
+ block: isMobile()
98
+ }, okButtonProps || {}), {}, { onClick: onOk }), getText("action-bar-apply", pLocaleMap[locale])))));
153
99
  };
154
- export default ActionBar;
100
+ var ActionBar_default = ActionBar;
101
+
102
+ //#endregion
103
+ export { ActionBar_default as default };
@@ -1 +1,2 @@
1
- export { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns';
1
+ import { AdapterDateFns } from "@mui/x-date-pickers/AdapterDateFns";
2
+ export { AdapterDateFns };
@@ -1 +1,3 @@
1
- export { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns';
1
+ import { AdapterDateFns } from "@mui/x-date-pickers/AdapterDateFns";
2
+
3
+ export { AdapterDateFns };
@@ -1 +1,2 @@
1
- export { AdapterDateFnsJalali } from '@mui/x-date-pickers/AdapterDateFnsJalali';
1
+ import { AdapterDateFnsJalali } from "@mui/x-date-pickers/AdapterDateFnsJalali";
2
+ export { AdapterDateFnsJalali };
@@ -1 +1,3 @@
1
- export { AdapterDateFnsJalali } from '@mui/x-date-pickers/AdapterDateFnsJalali';
1
+ import { AdapterDateFnsJalali } from "@mui/x-date-pickers/AdapterDateFnsJalali";
2
+
3
+ export { AdapterDateFnsJalali };
@@ -1 +1,2 @@
1
- export { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
1
+ import { AdapterDayjs } from "@mui/x-date-pickers/AdapterDayjs";
2
+ export { AdapterDayjs };
@@ -1 +1,3 @@
1
- export { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
1
+ import { AdapterDayjs } from "@mui/x-date-pickers/AdapterDayjs";
2
+
3
+ export { AdapterDayjs };
@@ -1 +1,2 @@
1
- export { AdapterLuxon } from '@mui/x-date-pickers/AdapterLuxon';
1
+ import { AdapterLuxon } from "@mui/x-date-pickers/AdapterLuxon";
2
+ export { AdapterLuxon };
@@ -1 +1,3 @@
1
- export { AdapterLuxon } from '@mui/x-date-pickers/AdapterLuxon';
1
+ import { AdapterLuxon } from "@mui/x-date-pickers/AdapterLuxon";
2
+
3
+ export { AdapterLuxon };
@@ -1 +1,2 @@
1
- export { AdapterMoment } from '@mui/x-date-pickers/AdapterMoment';
1
+ import { AdapterMoment } from "@mui/x-date-pickers/AdapterMoment";
2
+ export { AdapterMoment };
@@ -1 +1,3 @@
1
- export { AdapterMoment } from '@mui/x-date-pickers/AdapterMoment';
1
+ import { AdapterMoment } from "@mui/x-date-pickers/AdapterMoment";
2
+
3
+ export { AdapterMoment };
@@ -1 +1,2 @@
1
- export { AdapterMomentHijri } from '@mui/x-date-pickers/AdapterMomentHijri';
1
+ import { AdapterMomentHijri } from "@mui/x-date-pickers/AdapterMomentHijri";
2
+ export { AdapterMomentHijri };
@@ -1 +1,3 @@
1
- export { AdapterMomentHijri } from '@mui/x-date-pickers/AdapterMomentHijri';
1
+ import { AdapterMomentHijri } from "@mui/x-date-pickers/AdapterMomentHijri";
2
+
3
+ export { AdapterMomentHijri };
@@ -1 +1,2 @@
1
- export { AdapterMomentJalaali } from '@mui/x-date-pickers/AdapterMomentJalaali';
1
+ import { AdapterMomentJalaali } from "@mui/x-date-pickers/AdapterMomentJalaali";
2
+ export { AdapterMomentJalaali };
@@ -1 +1,3 @@
1
- export { AdapterMomentJalaali } from '@mui/x-date-pickers/AdapterMomentJalaali';
1
+ import { AdapterMomentJalaali } from "@mui/x-date-pickers/AdapterMomentJalaali";
2
+
3
+ export { AdapterMomentJalaali };
@@ -1,2 +1,6 @@
1
- declare const CustomCalendarHeader: (props: any) => JSX.Element;
2
- export default CustomCalendarHeader;
1
+ import React from "react";
2
+
3
+ //#region src/CustomCalendarHeader/index.d.ts
4
+ declare const CustomCalendarHeader: (props: any) => React.JSX.Element;
5
+ //#endregion
6
+ export { CustomCalendarHeader as default };
@@ -1,53 +1,47 @@
1
- import React from 'react';
2
- import Stack from '@mui/material/Stack';
3
- import IconButton from '@mui/material/IconButton';
4
- import Typography from '@mui/material/Typography';
5
- import { styled } from '@mui/material/styles';
6
- import ChevronLeft from "../icon/ChevronLeft";
7
- import ChevronLeftDouble from "../icon/ChevronLeftDouble";
8
- import ChevronRight from "../icon/ChevronRight";
9
- import ChevronRightDouble from "../icon/ChevronRightDouble";
10
- var CustomCalendarHeaderRoot = styled('div')({
11
- display: 'flex',
12
- justifyContent: 'space-between',
13
- padding: '8px 16px',
14
- alignItems: 'center'
1
+ import ChevronLeft_default from "../icon/ChevronLeft.js";
2
+ import ChevronLeftDouble_default from "../icon/ChevronLeftDouble.js";
3
+ import ChevronRight_default from "../icon/ChevronRight.js";
4
+ import ChevronRightDouble_default from "../icon/ChevronRightDouble.js";
5
+ import React from "react";
6
+ import { styled } from "@mui/material/styles";
7
+ import Typography from "@mui/material/Typography";
8
+ import Stack from "@mui/material/Stack";
9
+ import IconButton from "@mui/material/IconButton";
10
+
11
+ //#region src/CustomCalendarHeader/index.tsx
12
+ const CustomCalendarHeaderRoot = styled("div")({
13
+ display: "flex",
14
+ justifyContent: "space-between",
15
+ padding: "8px 16px",
16
+ alignItems: "center"
15
17
  });
16
- var CustomCalendarHeader = function CustomCalendarHeader(props) {
17
- var currentMonth = props.currentMonth,
18
- onMonthChange = props.onMonthChange;
19
- var selectNextMonth = function selectNextMonth() {
20
- return onMonthChange(currentMonth.add(1, 'month'), 'left');
21
- };
22
- var selectNextYear = function selectNextYear() {
23
- return onMonthChange(currentMonth.add(1, 'year'), 'left');
24
- };
25
- var selectPreviousMonth = function selectPreviousMonth() {
26
- return onMonthChange(currentMonth.subtract(1, 'month'), 'right');
27
- };
28
- var selectPreviousYear = function selectPreviousYear() {
29
- return onMonthChange(currentMonth.subtract(1, 'year'), 'right');
30
- };
31
- return /*#__PURE__*/React.createElement(CustomCalendarHeaderRoot, null, /*#__PURE__*/React.createElement(Stack, {
32
- spacing: 1,
33
- direction: "row"
34
- }, /*#__PURE__*/React.createElement(IconButton, {
35
- onClick: selectPreviousYear,
36
- title: "Previous year"
37
- }, /*#__PURE__*/React.createElement(ChevronLeftDouble, null)), /*#__PURE__*/React.createElement(IconButton, {
38
- onClick: selectPreviousMonth,
39
- title: "Previous month"
40
- }, /*#__PURE__*/React.createElement(ChevronLeft, null))), /*#__PURE__*/React.createElement(Typography, {
41
- variant: "body2"
42
- }, currentMonth.format('MMMM YYYY')), /*#__PURE__*/React.createElement(Stack, {
43
- spacing: 1,
44
- direction: "row"
45
- }, /*#__PURE__*/React.createElement(IconButton, {
46
- onClick: selectNextMonth,
47
- title: "Next month"
48
- }, /*#__PURE__*/React.createElement(ChevronRight, null)), /*#__PURE__*/React.createElement(IconButton, {
49
- onClick: selectNextYear,
50
- title: "Next year"
51
- }, /*#__PURE__*/React.createElement(ChevronRightDouble, null))));
18
+ const CustomCalendarHeader = (props) => {
19
+ const { currentMonth, onMonthChange } = props;
20
+ const selectNextMonth = () => onMonthChange(currentMonth.add(1, "month"), "left");
21
+ const selectNextYear = () => onMonthChange(currentMonth.add(1, "year"), "left");
22
+ const selectPreviousMonth = () => onMonthChange(currentMonth.subtract(1, "month"), "right");
23
+ const selectPreviousYear = () => onMonthChange(currentMonth.subtract(1, "year"), "right");
24
+ return /* @__PURE__ */ React.createElement(CustomCalendarHeaderRoot, null, /* @__PURE__ */ React.createElement(Stack, {
25
+ spacing: 1,
26
+ direction: "row"
27
+ }, /* @__PURE__ */ React.createElement(IconButton, {
28
+ onClick: selectPreviousYear,
29
+ title: "Previous year"
30
+ }, /* @__PURE__ */ React.createElement(ChevronLeftDouble_default, null)), /* @__PURE__ */ React.createElement(IconButton, {
31
+ onClick: selectPreviousMonth,
32
+ title: "Previous month"
33
+ }, /* @__PURE__ */ React.createElement(ChevronLeft_default, null))), /* @__PURE__ */ React.createElement(Typography, { variant: "body2" }, currentMonth.format("MMMM YYYY")), /* @__PURE__ */ React.createElement(Stack, {
34
+ spacing: 1,
35
+ direction: "row"
36
+ }, /* @__PURE__ */ React.createElement(IconButton, {
37
+ onClick: selectNextMonth,
38
+ title: "Next month"
39
+ }, /* @__PURE__ */ React.createElement(ChevronRight_default, null)), /* @__PURE__ */ React.createElement(IconButton, {
40
+ onClick: selectNextYear,
41
+ title: "Next year"
42
+ }, /* @__PURE__ */ React.createElement(ChevronRightDouble_default, null))));
52
43
  };
53
- export default CustomCalendarHeader;
44
+ var CustomCalendarHeader_default = CustomCalendarHeader;
45
+
46
+ //#endregion
47
+ export { CustomCalendarHeader_default as default };
@@ -1 +1 @@
1
- export * from "@mui/x-date-pickers/locales";
1
+ export * from "@mui/x-date-pickers/locales";
@@ -1 +1,3 @@
1
- export * from "@mui/x-date-pickers/locales";
1
+ export * from "@mui/x-date-pickers/locales"
2
+
3
+ export { };
@@ -1,7 +1,10 @@
1
- import * as React from 'react';
2
- import { DateRangeCalendarProps } from './DateRangeCalendar.types';
3
- declare type DateRangeCalendarComponent = (<TDate>(props: DateRangeCalendarProps<TDate> & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
4
- propTypes?: any;
1
+ import { DateRangeCalendarProps } from "./DateRangeCalendar.types.js";
2
+ import * as React$1 from "react";
3
+
4
+ //#region src/DateRangeCalendar/DateRangeCalendar.d.ts
5
+ type DateRangeCalendarComponent = (<TDate>(props: DateRangeCalendarProps<TDate> & React$1.RefAttributes<HTMLDivElement>) => JSX.Element) & {
6
+ propTypes?: any;
5
7
  };
6
8
  declare const DateRangeCalendar: DateRangeCalendarComponent;
7
- export { DateRangeCalendar };
9
+ //#endregion
10
+ export { DateRangeCalendar };