@ck-ui/component-library 2.0.3 → 2.0.4

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 (333) hide show
  1. package/dist/{CalendarGrid-DzsGX04L.js → CalendarGrid-Cu-E76sM.js} +1 -1
  2. package/dist/DropdownFooter-W4D9bbd6.js +98 -0
  3. package/dist/IconSlot-lz-E7RIY.js +33 -0
  4. package/dist/{MenuItem-DlaRT10y.js → MenuItem-jNWNRrDR.js} +1 -1
  5. package/dist/ScrollDropdown-gfB7tdTr.js +80 -0
  6. package/dist/assets/DateRangePicker-FyjycaFJ.css +1 -0
  7. package/dist/assets/DropdownFooter-DTuzF-cp.css +1 -0
  8. package/dist/assets/IconSlot-BhpCcM3C.css +1 -0
  9. package/dist/assets/ScrollDropdown-Dq3Kic27.css +1 -0
  10. package/dist/assets/Sidebar-CrD-rucg.css +1 -0
  11. package/dist/assets/ToastContent-B0d7ZeVJ.css +1 -0
  12. package/dist/assets/index-050F7Cq1.css +1 -0
  13. package/dist/assets/index-BE0-nPjX.css +1 -0
  14. package/dist/assets/index-BFoXf6nS.css +1 -0
  15. package/dist/assets/index-BIccl6ps.css +1 -0
  16. package/dist/assets/index-BJ3ki-dZ.css +1 -0
  17. package/dist/assets/index-BZUn0Wdm.css +1 -0
  18. package/dist/assets/index-BcYUvt6V.css +1 -0
  19. package/dist/assets/index-Bcdauu8Y.css +1 -0
  20. package/dist/assets/index-BcfUGu_y.css +1 -0
  21. package/dist/assets/index-BqELPvtv.css +1 -0
  22. package/dist/assets/index-C44rlX6h.css +1 -0
  23. package/dist/assets/index-CAGY1l6E.css +1 -0
  24. package/dist/assets/index-CCTeose3.css +1 -0
  25. package/dist/assets/{index-BbJZjGLb.css → index-CV06CpqV.css} +1 -1
  26. package/dist/assets/index-Cj3VbHpe.css +1 -0
  27. package/dist/assets/{index-BXwGxK7I.css → index-CmfUag81.css} +1 -1
  28. package/dist/assets/index-CuOeYu7b.css +1 -0
  29. package/dist/assets/index-CuopEZmw.css +1 -0
  30. package/dist/assets/index-CwPQKjpa.css +1 -0
  31. package/dist/assets/index-D0X2hwMU.css +1 -0
  32. package/dist/assets/{index-BgFw4AMY.css → index-DVtITeZI.css} +1 -1
  33. package/dist/assets/index-DWMUQAdQ.css +1 -0
  34. package/dist/assets/index-DXeEmcnJ.css +1 -0
  35. package/dist/assets/index-DZaWJ3P3.css +1 -0
  36. package/dist/assets/index-DaV0QrZW.css +1 -0
  37. package/dist/assets/index-DePIj7wn.css +1 -0
  38. package/dist/assets/index-DhtWNfIJ.css +1 -0
  39. package/dist/assets/{index-zWDnehqu.css → index-DlcdXqx_.css} +1 -1
  40. package/dist/assets/index-Dmo2W49y.css +1 -0
  41. package/dist/assets/index-DoRanRth.css +1 -0
  42. package/dist/assets/index-DoTtYYv9.css +1 -0
  43. package/dist/assets/index-F_VkoiK8.css +1 -0
  44. package/dist/assets/index-V_YjVwnC.css +1 -0
  45. package/dist/assets/index-cVRrZueX.css +1 -0
  46. package/dist/assets/{index-rrYSS2rl.css → index-t1PYEt2I.css} +1 -1
  47. package/dist/assets/index-tNRjcWyS.css +1 -0
  48. package/dist/assets/main-PzmpqYzB.css +1 -0
  49. package/dist/assets/styles-B4HnRCM5.css +1 -0
  50. package/dist/assets/styles-BWiKngtQ.css +1 -0
  51. package/dist/assets/{styles-0GdZsGyi.css → styles-CBX41mCH.css} +1 -1
  52. package/dist/assets/{styles-CwZG1jzB.css → styles-CnUruVcX.css} +1 -1
  53. package/dist/assets/styles-DGuBVeco.css +1 -0
  54. package/dist/assets/{styles-DrYTmjez.css → styles-DIZ9K_K2.css} +1 -1
  55. package/dist/assets/styles-DJ1QnJSM.css +1 -0
  56. package/dist/assets/styles-DVAtoUQM.css +1 -0
  57. package/dist/assets/styles-DzivbMl0.css +1 -0
  58. package/dist/assets/styles-Ias6f7--.css +1 -0
  59. package/dist/assets/styles-ak9WG2cT.css +1 -0
  60. package/dist/assets/styles-dHWZnWrb.css +1 -0
  61. package/dist/assets/theme-CzZnUu2H.css +1 -0
  62. package/dist/components/Avatar/index.js +19 -19
  63. package/dist/components/Breadcrumb/index.js +45 -45
  64. package/dist/components/Button/index.js +18 -18
  65. package/dist/components/CKBadge/_types/ckBadge.types.d.ts +15 -0
  66. package/dist/components/CKBadge/_types/ckBadge.types.d.ts.map +1 -0
  67. package/dist/components/CKBadge/_types/ckBadge.types.js +4 -0
  68. package/dist/components/CKBadge/index.d.ts +6 -0
  69. package/dist/components/CKBadge/index.d.ts.map +1 -0
  70. package/dist/components/CKBadge/index.js +54 -0
  71. package/dist/components/CKButton/_helper/ComboLayout.js +1 -1
  72. package/dist/components/CKButton/_helper/IconSlot.js +1 -1
  73. package/dist/components/CKButton/_helper/StandardLayout.js +1 -1
  74. package/dist/components/CKButton/index.js +1 -1
  75. package/dist/components/CKCheckbox/index.js +30 -30
  76. package/dist/components/CKTag/index.js +38 -38
  77. package/dist/components/CardBox/index.js +20 -20
  78. package/dist/components/Checkbox/index.js +11 -11
  79. package/dist/components/CostComparatorTable/_helpers/CostCell.js +1 -1
  80. package/dist/components/CostComparatorTable/_helpers/HeaderCheckbox.js +1 -1
  81. package/dist/components/CostComparatorTable/index.js +1 -1
  82. package/dist/components/DateRangePicker/Calendar/CalendarGrid.js +2 -2
  83. package/dist/components/DateRangePicker/Calendar/ScrollDropdown.js +1 -1
  84. package/dist/components/DateRangePicker/DateRangePicker.d.ts.map +1 -1
  85. package/dist/components/DateRangePicker/DateRangePicker.js +298 -206
  86. package/dist/components/DeviationTag/index.js +19 -19
  87. package/dist/components/EmptyState/index.js +5 -5
  88. package/dist/components/FusionChart/index.js +217 -217
  89. package/dist/components/GroupedMultiSelect/_helpers/DropdownFooter.js +1 -1
  90. package/dist/components/GroupedMultiSelect/_helpers/MenuItem.js +1 -1
  91. package/dist/components/GroupedMultiSelect/_helpers/MenuList.js +1 -1
  92. package/dist/components/GroupedMultiSelect/_helpers/OptionRow.js +1 -1
  93. package/dist/components/GroupedMultiSelect/_helpers/OptionsList.js +1 -1
  94. package/dist/components/GroupedMultiSelect/_helpers/SearchResult.js +1 -1
  95. package/dist/components/GroupedMultiSelect/_helpers/TagContent.js +1 -1
  96. package/dist/components/GroupedMultiSelect/_helpers/TriggerButton.js +1 -1
  97. package/dist/components/GroupedMultiSelect/index.js +1 -1
  98. package/dist/components/GroupedSingleSelect/_helpers/DropdownFooter.js +1 -1
  99. package/dist/components/GroupedSingleSelect/_helpers/OptionRow.js +1 -1
  100. package/dist/components/GroupedSingleSelect/_helpers/OptionsList.js +1 -1
  101. package/dist/components/GroupedSingleSelect/_helpers/TriggerButton.js +1 -1
  102. package/dist/components/GroupedSingleSelect/index.js +1 -1
  103. package/dist/components/IconButton/_types/iconButton.type.d.ts +1 -1
  104. package/dist/components/IconButton/_types/iconButton.type.d.ts.map +1 -1
  105. package/dist/components/IconButton/index.js +28 -28
  106. package/dist/components/MAVDropdown/index.js +65 -65
  107. package/dist/components/MenuOptions/MenuOptionsWrapper.js +1 -1
  108. package/dist/components/MenuOptions/_helpers/MenuItem.js +2 -2
  109. package/dist/components/MenuOptions/_helpers/RadioMenuItem.js +1 -1
  110. package/dist/components/MenuOptions/_helpers/SubMenu.js +2 -2
  111. package/dist/components/MenuOptions/index.js +2 -2
  112. package/dist/components/MetricCards/Component/CardWithIconAndForecast/index.js +28 -28
  113. package/dist/components/MultiSelect/SimpleMultiSelect.js +1 -1
  114. package/dist/components/MultiSelect/_helpers/DropdownFooter.js +1 -1
  115. package/dist/components/MultiSelect/_helpers/OptionRow.js +1 -1
  116. package/dist/components/MultiSelect/_helpers/OverflowMenu.js +1 -1
  117. package/dist/components/MultiSelect/_helpers/OverflowMenuItem.js +1 -1
  118. package/dist/components/MultiSelect/_helpers/SearchResult.js +1 -1
  119. package/dist/components/MultiSelect/_helpers/TagContent.js +1 -1
  120. package/dist/components/MultiSelect/_helpers/TriggerButton.js +1 -1
  121. package/dist/components/MultiSelect/index.js +1 -1
  122. package/dist/components/Pagination/index.js +37 -37
  123. package/dist/components/Popover/index.js +2 -2
  124. package/dist/components/PopupAndDialogBox/_types/popupAndDialog.types.d.ts +3 -0
  125. package/dist/components/PopupAndDialogBox/_types/popupAndDialog.types.d.ts.map +1 -1
  126. package/dist/components/PopupAndDialogBox/components/DialogContent.d.ts +1 -0
  127. package/dist/components/PopupAndDialogBox/components/DialogContent.d.ts.map +1 -1
  128. package/dist/components/PopupAndDialogBox/components/DialogContent.js +5 -4
  129. package/dist/components/PopupAndDialogBox/components/DialogFooter.d.ts.map +1 -1
  130. package/dist/components/PopupAndDialogBox/components/DialogFooter.js +32 -31
  131. package/dist/components/PopupAndDialogBox/components/DialogHeader.d.ts.map +1 -1
  132. package/dist/components/PopupAndDialogBox/components/DialogHeader.js +18 -15
  133. package/dist/components/PopupAndDialogBox/index.js +1 -1
  134. package/dist/components/ProfileDropdown/index.js +42 -42
  135. package/dist/components/ProgressBar/index.js +24 -24
  136. package/dist/components/RadioButton/index.js +25 -25
  137. package/dist/components/RangeSlider/_types/rangeSlider.types.d.ts +31 -0
  138. package/dist/components/RangeSlider/_types/rangeSlider.types.d.ts.map +1 -0
  139. package/dist/components/RangeSlider/_types/rangeSlider.types.js +1 -0
  140. package/dist/components/RangeSlider/index.d.ts +3 -0
  141. package/dist/components/RangeSlider/index.d.ts.map +1 -0
  142. package/dist/components/RangeSlider/index.js +190 -0
  143. package/dist/components/Search/index.js +33 -33
  144. package/dist/components/Sidebar/Sidebar.d.ts +1 -1
  145. package/dist/components/Sidebar/Sidebar.d.ts.map +1 -1
  146. package/dist/components/Sidebar/Sidebar.js +103 -99
  147. package/dist/components/Sidebar/Sidebar.types.d.ts +1 -1
  148. package/dist/components/Sidebar/Sidebar.types.d.ts.map +1 -1
  149. package/dist/components/Sidebar/Sidebar.utils.d.ts.map +1 -1
  150. package/dist/components/Sidebar/Sidebar.utils.js +3 -1
  151. package/dist/components/Sidebar/_helpers/TruncatedLabel.d.ts +15 -0
  152. package/dist/components/Sidebar/_helpers/TruncatedLabel.d.ts.map +1 -0
  153. package/dist/components/Sidebar/_helpers/TruncatedLabel.js +26 -0
  154. package/dist/components/Sidebar/_helpers/animateScroll.d.ts +2 -0
  155. package/dist/components/Sidebar/_helpers/animateScroll.d.ts.map +1 -0
  156. package/dist/components/Sidebar/_helpers/animateScroll.js +12 -0
  157. package/dist/components/Sidebar/_helpers/index.d.ts +3 -0
  158. package/dist/components/Sidebar/_helpers/index.d.ts.map +1 -0
  159. package/dist/components/Sidebar/_helpers/index.js +6 -0
  160. package/dist/components/Sidebar/components/CollapsedTooltip/index.d.ts +3 -4
  161. package/dist/components/Sidebar/components/CollapsedTooltip/index.d.ts.map +1 -1
  162. package/dist/components/Sidebar/components/CollapsedTooltip/index.js +5 -3
  163. package/dist/components/Sidebar/components/ContactUsButton/index.d.ts +1 -1
  164. package/dist/components/Sidebar/components/ContactUsButton/index.d.ts.map +1 -1
  165. package/dist/components/Sidebar/components/ContactUsButton/index.js +60 -14
  166. package/dist/components/Sidebar/components/ExploreSection/index.d.ts +1 -1
  167. package/dist/components/Sidebar/components/ExploreSection/index.d.ts.map +1 -1
  168. package/dist/components/Sidebar/components/ExploreSection/index.js +47 -20
  169. package/dist/components/Sidebar/components/GptCard/index.d.ts +3 -2
  170. package/dist/components/Sidebar/components/GptCard/index.d.ts.map +1 -1
  171. package/dist/components/Sidebar/components/GptCard/index.js +132 -29
  172. package/dist/components/Sidebar/components/IconRenderer/index.d.ts +7 -1
  173. package/dist/components/Sidebar/components/IconRenderer/index.d.ts.map +1 -1
  174. package/dist/components/Sidebar/components/IconRenderer/index.js +82 -13
  175. package/dist/components/Sidebar/components/MenuItemWrapper/index.d.ts +2 -1
  176. package/dist/components/Sidebar/components/MenuItemWrapper/index.d.ts.map +1 -1
  177. package/dist/components/Sidebar/components/MenuItemWrapper/index.js +57 -27
  178. package/dist/components/Sidebar/components/MenuRenderer/CollapsedMenu.d.ts +1 -1
  179. package/dist/components/Sidebar/components/MenuRenderer/CollapsedMenu.d.ts.map +1 -1
  180. package/dist/components/Sidebar/components/MenuRenderer/CollapsedMenu.js +162 -75
  181. package/dist/components/Sidebar/components/MenuRenderer/ExpandedMenu.d.ts +2 -4
  182. package/dist/components/Sidebar/components/MenuRenderer/ExpandedMenu.d.ts.map +1 -1
  183. package/dist/components/Sidebar/components/MenuRenderer/ExpandedMenu.js +74 -52
  184. package/dist/components/Sidebar/components/MenuRenderer/index.d.ts +2 -1
  185. package/dist/components/Sidebar/components/MenuRenderer/index.d.ts.map +1 -1
  186. package/dist/components/Sidebar/components/MenuRenderer/index.js +135 -24
  187. package/dist/components/Sidebar/components/ModuleSwitchButton/index.d.ts +1 -1
  188. package/dist/components/Sidebar/components/ModuleSwitchButton/index.d.ts.map +1 -1
  189. package/dist/components/Sidebar/components/ModuleSwitchButton/index.js +36 -18
  190. package/dist/components/Sidebar/components/SectionLabel/index.js +4 -4
  191. package/dist/components/Sidebar/components/SubMenuWrapper/index.d.ts +2 -1
  192. package/dist/components/Sidebar/components/SubMenuWrapper/index.d.ts.map +1 -1
  193. package/dist/components/Sidebar/components/SubMenuWrapper/index.js +132 -47
  194. package/dist/components/Sidebar/components/index.js +1 -1
  195. package/dist/components/Sidebar/hooks/useActiveDetection.d.ts +1 -1
  196. package/dist/components/Sidebar/hooks/useActiveDetection.d.ts.map +1 -1
  197. package/dist/components/Sidebar/hooks/useActiveDetection.js +4 -1
  198. package/dist/components/Sidebar/hooks/useMenuState.d.ts +2 -2
  199. package/dist/components/Sidebar/hooks/useMenuState.d.ts.map +1 -1
  200. package/dist/components/Sidebar/hooks/useMenuState.js +116 -59
  201. package/dist/components/Sidebar/hooks/useModuleSwitch.d.ts.map +1 -1
  202. package/dist/components/Sidebar/hooks/useOverlayScrollbar.d.ts +7 -0
  203. package/dist/components/Sidebar/hooks/useOverlayScrollbar.d.ts.map +1 -0
  204. package/dist/components/Sidebar/hooks/useOverlayScrollbar.js +98 -0
  205. package/dist/components/Sidebar/index.d.ts +3 -3
  206. package/dist/components/Sidebar/index.d.ts.map +1 -1
  207. package/dist/components/Sidebar/index.js +1 -1
  208. package/dist/components/Sidebar/types/gpt.types.d.ts +38 -0
  209. package/dist/components/Sidebar/types/gpt.types.d.ts.map +1 -1
  210. package/dist/components/Sidebar/types/index.d.ts +1 -1
  211. package/dist/components/Sidebar/types/index.d.ts.map +1 -1
  212. package/dist/components/Sidebar/types/sidebar.types.d.ts +8 -1
  213. package/dist/components/Sidebar/types/sidebar.types.d.ts.map +1 -1
  214. package/dist/components/SingleSelectDropdown/_helpers/DropdownFooter.js +7 -5
  215. package/dist/components/SingleSelectDropdown/index.js +14 -12
  216. package/dist/components/Stepper/_helper/StepIcon.js +1 -1
  217. package/dist/components/Stepper/_helper/StepText.js +1 -1
  218. package/dist/components/Stepper/index.js +1 -1
  219. package/dist/components/Switch/index.js +6 -6
  220. package/dist/components/Tab/index.js +38 -38
  221. package/dist/components/Table/_helpers/ColumnManager/index.js +1 -1
  222. package/dist/components/Table/_helpers/TableFilterModal/RangeSelector.d.ts.map +1 -1
  223. package/dist/components/Table/_helpers/TableFilterModal/RangeSelector.js +31 -1528
  224. package/dist/components/Table/_helpers/TableFilterModal/index.js +1 -1
  225. package/dist/components/Table/_helpers/TableRows.d.ts.map +1 -1
  226. package/dist/components/Table/_helpers/TableRows.js +395 -201
  227. package/dist/components/Table/_hooks/useFilterColumnState.d.ts.map +1 -1
  228. package/dist/components/Table/_hooks/useFilterColumnState.js +26 -11
  229. package/dist/components/Table/_types/table.types.d.ts +6 -0
  230. package/dist/components/Table/_types/table.types.d.ts.map +1 -1
  231. package/dist/components/Table/index.js +1 -1
  232. package/dist/components/Tag/index.js +20 -20
  233. package/dist/components/TextArea/index.js +31 -31
  234. package/dist/components/TextField/index.d.ts.map +1 -1
  235. package/dist/components/TextField/index.js +165 -7351
  236. package/dist/components/Toast/_helper/ToastContent.js +36 -36
  237. package/dist/components/Toast/_helper/ToastProvider.js +1 -1
  238. package/dist/components/Toast/_hooks/useToast.js +1 -1
  239. package/dist/components/Toggle/index.js +18 -18
  240. package/dist/components/Tooltip/_helpers/calculatePosition.d.ts +7 -0
  241. package/dist/components/Tooltip/_helpers/calculatePosition.d.ts.map +1 -0
  242. package/dist/components/Tooltip/_helpers/calculatePosition.js +27 -0
  243. package/dist/components/Tooltip/_helpers/index.d.ts +4 -0
  244. package/dist/components/Tooltip/_helpers/index.d.ts.map +1 -0
  245. package/dist/components/Tooltip/_helpers/index.js +6 -0
  246. package/dist/components/Tooltip/_helpers/mergeRef.d.ts +3 -0
  247. package/dist/components/Tooltip/_helpers/mergeRef.d.ts.map +1 -0
  248. package/dist/components/Tooltip/_helpers/mergeRef.js +6 -0
  249. package/dist/components/Tooltip/_types/tooltip.types.d.ts +1 -2
  250. package/dist/components/Tooltip/_types/tooltip.types.d.ts.map +1 -1
  251. package/dist/components/Tooltip/index.d.ts +5 -1
  252. package/dist/components/Tooltip/index.d.ts.map +1 -1
  253. package/dist/components/Tooltip/index.js +59 -2041
  254. package/dist/components/Typography/index.js +23 -23
  255. package/dist/down-arrow-Con-s3fU.js +5 -0
  256. package/dist/index-BAG5O9tQ.js +97 -0
  257. package/dist/{index-BR6M9zUI.js → index-Cc3gWc2P.js} +166 -154
  258. package/dist/main.d.ts +2 -0
  259. package/dist/main.d.ts.map +1 -1
  260. package/dist/main.js +87 -83
  261. package/dist/styles.module-BhZ_Dm1P.js +16 -0
  262. package/dist/styles.module-Bxs1UJxF.js +15 -0
  263. package/dist/styles.module-CRMuLY4A.js +13 -0
  264. package/dist/styles.module-DBuEcddZ.js +29 -0
  265. package/dist/styles.module-DKDRix10.js +39 -0
  266. package/dist/styles.module-DjiC2kYs.js +20 -0
  267. package/dist/styles.module-Xxs9bBCg.js +56 -0
  268. package/dist/styles.module-aSzD4I4G.js +19 -0
  269. package/dist/theme/Theme.js +1 -1
  270. package/dist/theme/theme.css +1 -1
  271. package/package.json +1 -1
  272. package/dist/DropdownFooter-DIxlKK1Y.js +0 -96
  273. package/dist/Grow-gzixxVwK.js +0 -789
  274. package/dist/IconSlot-DvUwY6Do.js +0 -33
  275. package/dist/ScrollDropdown-B6iVjMy_.js +0 -80
  276. package/dist/assets/DateRangePicker-BJW-EAys.css +0 -1
  277. package/dist/assets/DropdownFooter-CRxQRvLY.css +0 -1
  278. package/dist/assets/IconSlot-BWv5PQN_.css +0 -1
  279. package/dist/assets/ScrollDropdown-zzvVGbzo.css +0 -1
  280. package/dist/assets/Sidebar-D5jVJ-ln.css +0 -1
  281. package/dist/assets/ToastContent-DpF5zCks.css +0 -1
  282. package/dist/assets/index-0R9p-l95.css +0 -1
  283. package/dist/assets/index-31u7i502.css +0 -1
  284. package/dist/assets/index-B5N2Zvs1.css +0 -1
  285. package/dist/assets/index-B6Mg98vm.css +0 -1
  286. package/dist/assets/index-B8lwBNV9.css +0 -1
  287. package/dist/assets/index-BD0OawaZ.css +0 -1
  288. package/dist/assets/index-BD0iilmm.css +0 -1
  289. package/dist/assets/index-BLz-9Nuk.css +0 -1
  290. package/dist/assets/index-BOXxnraF.css +0 -1
  291. package/dist/assets/index-BZgvXFWW.css +0 -1
  292. package/dist/assets/index-BkNXS5fR.css +0 -1
  293. package/dist/assets/index-Bo4Tx8px.css +0 -1
  294. package/dist/assets/index-BoQKDmZt.css +0 -1
  295. package/dist/assets/index-C3K5UCMn.css +0 -1
  296. package/dist/assets/index-C4-S_v9y.css +0 -1
  297. package/dist/assets/index-C6j9Ze5V.css +0 -1
  298. package/dist/assets/index-CSofT_ix.css +0 -1
  299. package/dist/assets/index-C_Tn9jS-.css +0 -1
  300. package/dist/assets/index-D2HelNRV.css +0 -1
  301. package/dist/assets/index-DDdi2wxl.css +0 -1
  302. package/dist/assets/index-DRigR6XT.css +0 -1
  303. package/dist/assets/index-Dpv0OAoW.css +0 -1
  304. package/dist/assets/index-EOsQwhza.css +0 -1
  305. package/dist/assets/index-UphWJR2V.css +0 -1
  306. package/dist/assets/index-_Kh8p9R0.css +0 -1
  307. package/dist/assets/index-eZS6kms7.css +0 -1
  308. package/dist/assets/index-t78owPAF.css +0 -1
  309. package/dist/assets/index-tIl-UucG.css +0 -1
  310. package/dist/assets/index-xlbz19JS.css +0 -1
  311. package/dist/assets/main-3OqLSdPm.css +0 -1
  312. package/dist/assets/styles-BS1nwHmS.css +0 -1
  313. package/dist/assets/styles-Be-tqCP9.css +0 -1
  314. package/dist/assets/styles-C5uYY4fL.css +0 -1
  315. package/dist/assets/styles-C9rG0Alp.css +0 -1
  316. package/dist/assets/styles-CZCmGNUn.css +0 -1
  317. package/dist/assets/styles-CwEfypOd.css +0 -1
  318. package/dist/assets/styles-DAFhOzfn.css +0 -1
  319. package/dist/assets/styles-DGlqPkdv.css +0 -1
  320. package/dist/assets/theme-CDdq9khQ.css +0 -1
  321. package/dist/clsx-OuTLNxxd.js +0 -16
  322. package/dist/createSimplePaletteValueFilter-BqxST_wX.js +0 -24
  323. package/dist/index-CSxlVCTW.js +0 -52
  324. package/dist/isFocusVisible-BzX3wEi7.js +0 -12
  325. package/dist/styles.module-B5fY7mP8.js +0 -20
  326. package/dist/styles.module-BXby6f8d.js +0 -16
  327. package/dist/styles.module-DGDgpLAB.js +0 -29
  328. package/dist/styles.module-DSbSTQeV.js +0 -56
  329. package/dist/styles.module-ZyeVE7KZ.js +0 -39
  330. package/dist/styles.module-r_cdKgD9.js +0 -19
  331. package/dist/styles.module-xqgv3wwP.js +0 -12
  332. package/dist/styles.module-yNDMDNO-.js +0 -14
  333. package/dist/useSlot-BAOpgsKZ.js +0 -4687
@@ -1,1535 +1,38 @@
1
- import { jsxs as O, jsx as w } from "react/jsx-runtime";
2
- import * as h from "react";
3
- import { u as ke, a as rt, c as le, b as nt, d as at, o as ue, e as je, g as ot, f as st, P as t, h as it, i as lt, j as G, s as ae, k as Ue, l as Re, m as ct, n as de, p as Ge, q as Ke } from "../../../../useSlot-BAOpgsKZ.js";
4
- import { c as xe } from "../../../../clsx-OuTLNxxd.js";
5
- import { a as Ye, c as qe } from "../../../../createSimplePaletteValueFilter-BqxST_wX.js";
6
- import { i as _e } from "../../../../isFocusVisible-BzX3wEi7.js";
7
- const ut = {
8
- border: 0,
9
- clip: "rect(0 0 0 0)",
10
- height: "1px",
11
- margin: "-1px",
12
- overflow: "hidden",
13
- padding: 0,
14
- position: "absolute",
15
- whiteSpace: "nowrap",
16
- width: "1px"
17
- };
18
- function dt(e, a, i = (c, p) => c === p) {
19
- return e.length === a.length && e.every((c, p) => i(c, a[p]));
20
- }
21
- const pt = 2, ft = [], Me = {};
22
- function ce(e, a, i, c, p) {
23
- return i === 1 ? Math.min(e + a, p) : Math.max(e - a, c);
24
- }
25
- function Je(e, a) {
26
- return e - a;
27
- }
28
- function Be(e, a, i = -1) {
29
- const c = e.reduce((y, S, f) => {
30
- const u = Math.abs(a - S);
31
- return y == null || u <= y.distance ? {
32
- distance: u,
33
- index: f
34
- } : y;
35
- }, null) ?? Me, {
36
- index: p
37
- } = c;
38
- return p == null ? p : i >= 0 && e[i] === e[p] ? i : p;
39
- }
40
- function Ne(e, a) {
41
- if (a.current != null && e.changedTouches) {
42
- const i = e;
43
- for (let c = 0; c < i.changedTouches.length; c += 1) {
44
- const p = i.changedTouches[c];
45
- if (p.identifier === a.current)
46
- return {
47
- x: p.clientX,
48
- y: p.clientY
49
- };
50
- }
51
- return !1;
52
- }
53
- return {
54
- x: e.clientX,
55
- y: e.clientY
56
- };
57
- }
58
- function Pe(e, a, i) {
59
- return (e - a) * 100 / (i - a);
60
- }
61
- function mt(e, a, i) {
62
- return (i - a) * e + a;
63
- }
64
- function bt(e) {
65
- if (Math.abs(e) < 1) {
66
- const i = e.toExponential().split("e-"), c = i[0].split(".")[1];
67
- return (c ? c.length : 0) + parseInt(i[1], 10);
68
- }
69
- const a = e.toString().split(".")[1];
70
- return a ? a.length : 0;
71
- }
72
- function ht(e, a, i) {
73
- const c = Math.round((e - i) / a) * a + i;
74
- return Number(c.toFixed(bt(a)));
75
- }
76
- function We(e, a, i) {
77
- const c = e.slice();
78
- return c[i] = a, c.sort(Je);
79
- }
80
- function Ae(e, a, i, c) {
81
- const p = ue(e.current), y = Ye(p);
82
- if (!e.current?.contains(y) || Number(y?.getAttribute("data-index")) !== a) {
83
- const S = e.current?.querySelector(`[type="range"][data-index="${a}"]`);
84
- S != null && (c == null ? S.focus({
85
- preventScroll: !0
86
- }) : S.focus({
87
- preventScroll: !0,
88
- // Prevent pointer-driven focus rings in browsers that support this option.
89
- // Chrome 144+ supports `focusVisible` in `HTMLElement.focus()` options.
90
- // @ts-expect-error `focusVisible` is not yet in TypeScript's lib.dom FocusOptions.
91
- focusVisible: c
92
- }));
93
- }
94
- i && i(a);
95
- }
96
- function Ie(e, a) {
97
- return typeof e == "number" && typeof a == "number" ? e === a : typeof e == "object" && typeof a == "object" ? dt(e, a) : !1;
98
- }
99
- const gt = {
100
- horizontal: {
101
- offset: (e) => ({
102
- left: `${e}%`
103
- }),
104
- leap: (e) => ({
105
- width: `${e}%`
106
- })
107
- },
108
- "horizontal-reverse": {
109
- offset: (e) => ({
110
- right: `${e}%`
111
- }),
112
- leap: (e) => ({
113
- width: `${e}%`
114
- })
115
- },
116
- vertical: {
117
- offset: (e) => ({
118
- bottom: `${e}%`
119
- }),
120
- leap: (e) => ({
121
- height: `${e}%`
122
- })
123
- }
124
- }, vt = (e) => e;
125
- function yt(e) {
126
- const {
127
- "aria-labelledby": a,
128
- defaultValue: i,
129
- disabled: c = !1,
130
- disableSwap: p = !1,
131
- isRtl: y = !1,
132
- marks: S = !1,
133
- max: f = 100,
134
- min: u = 0,
135
- name: K,
136
- onChange: H,
137
- onChangeCommitted: _,
138
- orientation: D = "horizontal",
139
- rootRef: z,
140
- scale: v = vt,
141
- step: b = 1,
142
- shiftStep: k = 10,
143
- tabIndex: T,
144
- value: E
145
- } = e, M = h.useRef(void 0), oe = h.useRef(null), [B, J] = h.useState(-1), [Oe, Q] = h.useState(-1), [Z, we] = h.useState(!1), se = h.useRef(0), ie = h.useRef(-1), W = h.useRef(!1), pe = h.useRef(-1), $ = ke(() => {
146
- oe.current != null && (cancelAnimationFrame(oe.current), oe.current = null);
147
- }), F = h.useRef(null), [P, L] = rt({
148
- controlled: E,
149
- default: i ?? u,
150
- name: "Slider"
151
- }), j = ke((n, r, o) => {
152
- const l = "nativeEvent" in n ? n.nativeEvent : n, s = new l.constructor(l.type, l);
153
- Object.defineProperty(s, "target", {
154
- writable: !0,
155
- value: {
156
- value: r,
157
- name: K
158
- }
159
- }), F.current = r, H?.(s, r, o);
160
- }), ee = Array.isArray(P), A = h.useMemo(() => {
161
- if (typeof P == "number")
162
- return [le(P, u, f)];
163
- if (P == null)
164
- return [u];
165
- const n = P.slice().sort(Je);
166
- for (let r = 0; r < n.length; r += 1) {
167
- const o = n[r];
168
- n[r] = o == null ? u : le(o, u, f);
169
- }
170
- return n;
171
- }, [P, u, f]), U = h.useMemo(() => {
172
- if (S === !0 && b != null) {
173
- const n = new Array(Math.floor((f - u) / b) + 1);
174
- for (let r = 0; r < n.length; r += 1)
175
- n[r] = {
176
- value: u + b * r
177
- };
178
- return n;
179
- }
180
- return Array.isArray(S) ? S : ft;
181
- }, [S, b, u, f]), C = h.useMemo(() => {
182
- const n = new Array(U.length);
183
- for (let r = 0; r < U.length; r += 1)
184
- n[r] = U[r].value;
185
- return n;
186
- }, [U]), [fe, Y] = h.useState(-1), x = h.useRef(null), me = nt(z, x), Ve = (n) => (r) => {
187
- const o = Number(r.currentTarget.getAttribute("data-index"));
188
- _e(r.target) && Y(o), Q(o), n?.onFocus?.(r);
189
- }, be = (n) => (r) => {
190
- _e(r.target) || Y(-1), Q(-1), n?.onBlur?.(r);
191
- }, I = (n, r) => {
192
- const o = Number(n.currentTarget.getAttribute("data-index")), l = A[o], s = C.indexOf(l);
193
- let d = r;
194
- if (U && b == null) {
195
- const m = C[C.length - 1];
196
- d >= m ? d = m : d <= C[0] ? d = C[0] : d = d < l ? C[s - 1] : C[s + 1];
197
- }
198
- if (d = le(d, u, f), ee) {
199
- p && (d = le(d, A[o - 1] || -1 / 0, A[o + 1] || 1 / 0));
200
- const m = d;
201
- d = We(A, d, o);
202
- let g = o;
203
- p || (g = d.indexOf(m)), Ae(x, g);
204
- }
205
- L(d), Y(o), H && !Ie(d, P) && j(n, d, o), _ && _(n, F.current ?? d);
206
- }, De = (n) => (r) => {
207
- if (["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "PageUp", "PageDown", "Home", "End"].includes(r.key)) {
208
- r.preventDefault();
209
- const o = Number(r.currentTarget.getAttribute("data-index")), l = A[o];
210
- let s = null;
211
- if (b != null) {
212
- const d = r.shiftKey ? k : b;
213
- switch (r.key) {
214
- case "ArrowUp":
215
- s = ce(l, d, 1, u, f);
216
- break;
217
- case "ArrowRight":
218
- s = ce(l, d, y ? -1 : 1, u, f);
219
- break;
220
- case "ArrowDown":
221
- s = ce(l, d, -1, u, f);
222
- break;
223
- case "ArrowLeft":
224
- s = ce(l, d, y ? 1 : -1, u, f);
225
- break;
226
- case "PageUp":
227
- s = ce(l, k, 1, u, f);
228
- break;
229
- case "PageDown":
230
- s = ce(l, k, -1, u, f);
231
- break;
232
- case "Home":
233
- s = u;
234
- break;
235
- case "End":
236
- s = f;
237
- break;
238
- }
239
- } else if (U) {
240
- const d = C[C.length - 1], m = C.indexOf(l), g = [y ? "ArrowRight" : "ArrowLeft", "ArrowDown", "PageDown", "Home"], q = [y ? "ArrowLeft" : "ArrowRight", "ArrowUp", "PageUp", "End"];
241
- g.includes(r.key) ? m === 0 ? s = C[0] : s = C[m - 1] : q.includes(r.key) && (m === C.length - 1 ? s = d : s = C[m + 1]);
242
- }
243
- s != null && I(r, s);
244
- }
245
- n?.onKeyDown?.(r);
246
- };
247
- at(() => {
248
- const n = Ye(ue(x.current));
249
- c && x.current?.contains(n) && n != null && "blur" in n && n.blur();
250
- }, [c]), c && B !== -1 && J(-1), c && fe !== -1 && Y(-1);
251
- const ze = (n) => (r) => {
252
- n.onChange?.(r), I(r, r.currentTarget.valueAsNumber);
253
- }, te = h.useRef(void 0);
254
- let N = D;
255
- y && D === "horizontal" && (N += "-reverse");
256
- const R = (n) => {
257
- const {
258
- current: r
259
- } = x;
260
- if (!r)
261
- return null;
262
- const {
263
- width: o,
264
- height: l,
265
- bottom: s,
266
- left: d
267
- } = r.getBoundingClientRect();
268
- let m;
269
- N.startsWith("vertical") ? m = (s - n.y) / l : m = (n.x - d) / o, N.includes("-reverse") && (m = 1 - m);
270
- let g;
271
- if (g = mt(m, u, f), b)
272
- g = ht(g, b, u);
273
- else {
274
- const Ce = Be(C, g);
275
- g = C[Ce];
276
- }
277
- g = le(g, u, f);
278
- let q = 0;
279
- if (ee) {
280
- const Ce = te.current !== -1;
281
- q = Ce ? te.current : Be(A, g, ie.current), p && (g = le(g, A[q - 1] || -1 / 0, A[q + 1] || 1 / 0));
282
- const tt = g;
283
- g = We(A, g, q), p && Ce || (q = g.indexOf(tt), te.current = q);
284
- }
285
- return {
286
- newValue: g,
287
- activeIndex: q
288
- };
289
- }, re = ke((n) => {
290
- if ("pointerId" in n && n.pointerId !== pe.current)
291
- return;
292
- const r = Ne(n, M);
293
- if (!r)
294
- return;
295
- if (se.current += 1, n.type === "pointermove" && n.buttons === 0) {
296
- X(n);
297
- return;
298
- }
299
- const o = R(r);
300
- o && (Ae(x, o.activeIndex, J, !1), ie.current = o.activeIndex, L(o.newValue), !Z && se.current > pt && we(!0), H && !Ie(o.newValue, P) && j(n, o.newValue, o.activeIndex));
301
- }), X = ke((n) => {
302
- if ("pointerId" in n && n.pointerId !== pe.current)
303
- return;
304
- const r = Ne(n, M);
305
- if (we(!1), !r)
306
- return;
307
- const o = R(r);
308
- J(-1), n.type === "touchend" && Q(-1), o && _ && _(n, F.current ?? o.newValue), "pointerType" in n && x.current?.hasPointerCapture(n.pointerId) && x.current.releasePointerCapture(n.pointerId), M.current = void 0, pe.current = -1, ne();
309
- }), he = ke((n) => {
310
- if (c)
311
- return;
312
- if (W.current) {
313
- W.current = !1;
314
- const s = n.changedTouches[0];
315
- s != null && (M.current = s.identifier);
316
- return;
317
- }
318
- const r = n.changedTouches[0];
319
- r != null && (M.current = r.identifier);
320
- const o = Ne(n, M);
321
- if (o !== !1) {
322
- te.current = -1;
323
- const s = R(o);
324
- s && (Ae(x, s.activeIndex, J, !1), ie.current = s.activeIndex, L(s.newValue), H && !Ie(s.newValue, P) && j(n, s.newValue, s.activeIndex));
325
- }
326
- se.current = 0;
327
- const l = ue(x.current);
328
- l.addEventListener("touchmove", re, {
329
- passive: !0
330
- }), l.addEventListener("touchend", X, {
331
- passive: !0
332
- });
333
- }), ne = h.useCallback(() => {
334
- const n = ue(x.current);
335
- n.removeEventListener("pointermove", re), n.removeEventListener("pointerup", X), n.removeEventListener("touchmove", re), n.removeEventListener("touchend", X);
336
- }, [X, re]);
337
- h.useEffect(() => {
338
- const n = x.current;
339
- if (n)
340
- return n.addEventListener("touchstart", he, {
341
- passive: !0
342
- }), () => {
343
- n.removeEventListener("touchstart", he), $(), ne();
344
- };
345
- }, [ne, he, $]), h.useEffect(() => {
346
- c && (ne(), $());
347
- }, [c, ne, $]);
348
- const Ee = (n) => (r) => {
349
- if (n.onPointerDown?.(r), r.pointerType === "touch" && (W.current = !0), c || r.defaultPrevented || r.button !== 0)
350
- return;
351
- const o = Ne(r, M);
352
- if (o !== !1) {
353
- te.current = -1;
354
- const s = R(o);
355
- if (s) {
356
- const d = x.current?.querySelector(`input[type="range"][data-index="${s.activeIndex}"]`), m = ue(x.current), g = d != null && d === Ye(m);
357
- J(s.activeIndex), ie.current = s.activeIndex, g ? r.preventDefault() : ($(), oe.current = requestAnimationFrame(() => {
358
- oe.current = null, Ae(x, s.activeIndex, void 0, !1);
359
- })), L(s.newValue), H && !Ie(s.newValue, P) && j(r, s.newValue, s.activeIndex);
360
- }
361
- }
362
- se.current = 0, pe.current = r.pointerId;
363
- const l = ue(x.current);
364
- try {
365
- r.currentTarget.setPointerCapture(r.pointerId);
366
- } catch {
367
- }
368
- l.addEventListener("pointermove", re, {
369
- passive: !0
370
- }), l.addEventListener("pointerup", X);
371
- }, Se = Pe(ee ? A[0] : u, u, f), $e = Pe(A[A.length - 1], u, f) - Se, ge = (n = Me) => {
372
- const r = je(n), o = {
373
- onPointerDown: Ee(r)
374
- }, l = {
375
- ...r,
376
- ...o
377
- };
378
- return {
379
- ...n,
380
- ref: me,
381
- ...l
382
- };
383
- }, He = (n) => (r) => {
384
- n.onMouseOver?.(r);
385
- const o = Number(r.currentTarget.getAttribute("data-index"));
386
- Q(o);
387
- }, Fe = (n) => (r) => {
388
- n.onMouseLeave?.(r), Q(-1);
389
- }, Te = (n = Me) => {
390
- const r = je(n), o = {
391
- onMouseOver: He(r),
392
- onMouseLeave: Fe(r)
393
- };
394
- return {
395
- ...n,
396
- ...r,
397
- ...o
398
- };
399
- }, ve = (n) => {
400
- let r;
401
- return ee ? B === n ? r = 2 : ie.current === n && (r = 1) : B === n && (r = 1), {
402
- // So the non active thumb doesn't show its label on hover.
403
- pointerEvents: B !== -1 && B !== n ? "none" : void 0,
404
- zIndex: r
405
- };
406
- };
407
- let ye;
408
- return D === "vertical" && (ye = y ? "vertical-rl" : "vertical-lr"), {
409
- active: B,
410
- axis: N,
411
- axisProps: gt,
412
- dragging: Z,
413
- focusedThumbIndex: fe,
414
- getHiddenInputProps: (n = Me) => {
415
- const r = je(n), o = {
416
- onChange: ze(r),
417
- onFocus: Ve(r),
418
- onBlur: be(r),
419
- onKeyDown: De(r)
420
- }, l = {
421
- ...r,
422
- ...o
423
- };
424
- return {
425
- tabIndex: T,
426
- "aria-labelledby": a,
427
- "aria-orientation": D,
428
- "aria-valuemax": v(f),
429
- "aria-valuemin": v(u),
430
- name: K,
431
- type: "range",
432
- min: e.min,
433
- max: e.max,
434
- step: e.step === null && e.marks ? "any" : e.step ?? void 0,
435
- disabled: c,
436
- ...n,
437
- ...l,
438
- style: {
439
- ...ut,
440
- direction: y ? "rtl" : "ltr",
441
- // So that VoiceOver's focus indicator matches the thumb's dimensions
442
- width: "100%",
443
- height: "100%",
444
- writingMode: ye
445
- }
446
- };
447
- },
448
- getRootProps: ge,
449
- getThumbProps: Te,
450
- marks: U,
451
- open: Oe,
452
- range: ee,
453
- rootRef: me,
454
- trackLeap: $e,
455
- trackOffset: Se,
456
- values: A,
457
- getThumbStyle: ve
458
- };
459
- }
460
- function kt(e) {
461
- return st("MuiSlider", e);
462
- }
463
- const V = ot("MuiSlider", ["root", "active", "colorPrimary", "colorSecondary", "colorError", "colorInfo", "colorSuccess", "colorWarning", "disabled", "dragging", "focusVisible", "mark", "markActive", "marked", "markLabel", "markLabelActive", "rail", "sizeSmall", "thumb", "track", "trackInverted", "trackFalse", "valueLabel", "valueLabelOpen", "valueLabelCircle", "valueLabelLabel", "vertical"]), xt = (e) => {
464
- const {
465
- open: a
466
- } = e;
467
- return {
468
- offset: xe(a && V.valueLabelOpen),
469
- circle: V.valueLabelCircle,
470
- label: V.valueLabelLabel
471
- };
472
- };
473
- function Qe(e) {
474
- const {
475
- children: a,
476
- className: i,
477
- value: c
478
- } = e, p = xt(e);
479
- return a ? /* @__PURE__ */ h.cloneElement(a, {
480
- className: a.props.className
481
- }, /* @__PURE__ */ O(h.Fragment, {
482
- children: [a.props.children, /* @__PURE__ */ w("span", {
483
- className: xe(p.offset, i),
484
- "aria-hidden": !0,
485
- children: /* @__PURE__ */ w("span", {
486
- className: p.circle,
487
- children: /* @__PURE__ */ w("span", {
488
- className: p.label,
489
- children: c
490
- })
491
- })
492
- })]
493
- })) : null;
494
- }
495
- process.env.NODE_ENV !== "production" && (Qe.propTypes = {
496
- children: t.element.isRequired,
497
- className: t.string,
498
- value: t.node
499
- });
500
- function Xe(e) {
501
- return e;
502
- }
503
- const wt = ae("span", {
504
- name: "MuiSlider",
505
- slot: "Root",
506
- overridesResolver: (e, a) => {
507
- const {
508
- ownerState: i
509
- } = e;
510
- return [a.root, a[`color${Re(i.color)}`], i.size !== "medium" && a[`size${Re(i.size)}`], i.marked && a.marked, i.orientation === "vertical" && a.vertical, i.track === "inverted" && a.trackInverted, i.track === !1 && a.trackFalse];
511
- }
512
- })(de(({
513
- theme: e
514
- }) => ({
515
- borderRadius: 12,
516
- boxSizing: "content-box",
517
- display: "inline-block",
518
- position: "relative",
519
- cursor: "pointer",
520
- touchAction: "none",
521
- WebkitTapHighlightColor: "transparent",
522
- "@media print": {
523
- colorAdjust: "exact"
524
- },
525
- [`&.${V.disabled}`]: {
526
- pointerEvents: "none",
527
- cursor: "default",
528
- color: (e.vars || e).palette.grey[400]
529
- },
530
- [`&.${V.dragging}`]: {
531
- [`& .${V.thumb}, & .${V.track}`]: {
532
- transition: "none"
533
- }
534
- },
535
- variants: [...Object.entries(e.palette).filter(qe()).map(([a]) => ({
536
- props: {
537
- color: a
538
- },
539
- style: {
540
- color: (e.vars || e).palette[a].main
541
- }
542
- })), {
543
- props: {
544
- orientation: "horizontal"
545
- },
546
- style: {
547
- height: 4,
548
- width: "100%",
549
- padding: "13px 0",
550
- // The primary input mechanism of the device includes a pointing device of limited accuracy.
551
- "@media (pointer: coarse)": {
552
- // Reach 42px touch target, about ~8mm on screen.
553
- padding: "20px 0"
554
- }
555
- }
556
- }, {
557
- props: {
558
- orientation: "horizontal",
559
- size: "small"
560
- },
561
- style: {
562
- height: 2
563
- }
564
- }, {
565
- props: {
566
- orientation: "horizontal",
567
- marked: !0
568
- },
569
- style: {
570
- marginBottom: 20
571
- }
572
- }, {
573
- props: {
574
- orientation: "vertical"
575
- },
576
- style: {
577
- height: "100%",
578
- width: 4,
579
- padding: "0 13px",
580
- // The primary input mechanism of the device includes a pointing device of limited accuracy.
581
- "@media (pointer: coarse)": {
582
- // Reach 42px touch target, about ~8mm on screen.
583
- padding: "0 20px"
584
- }
585
- }
586
- }, {
587
- props: {
588
- orientation: "vertical",
589
- size: "small"
590
- },
591
- style: {
592
- width: 2
593
- }
594
- }, {
595
- props: {
596
- orientation: "vertical",
597
- marked: !0
598
- },
599
- style: {
600
- marginRight: 44
601
- }
602
- }]
603
- }))), St = ae("span", {
604
- name: "MuiSlider",
605
- slot: "Rail"
606
- })({
607
- display: "block",
608
- position: "absolute",
609
- borderRadius: "inherit",
610
- backgroundColor: "currentColor",
611
- opacity: 0.38,
612
- variants: [{
613
- props: {
614
- orientation: "horizontal"
615
- },
616
- style: {
617
- width: "100%",
618
- height: "inherit",
619
- top: "50%",
620
- transform: "translateY(-50%)"
621
- }
622
- }, {
623
- props: {
624
- orientation: "vertical"
625
- },
626
- style: {
627
- height: "100%",
628
- width: "inherit",
629
- left: "50%",
630
- transform: "translateX(-50%)"
631
- }
632
- }, {
633
- props: {
634
- track: "inverted"
635
- },
636
- style: {
637
- opacity: 1
638
- }
639
- }]
640
- }), Tt = ae("span", {
641
- name: "MuiSlider",
642
- slot: "Track"
643
- })(de(({
644
- theme: e
645
- }) => ({
646
- display: "block",
647
- position: "absolute",
648
- borderRadius: "inherit",
649
- border: "1px solid currentColor",
650
- backgroundColor: "currentColor",
651
- transition: e.transitions.create(["left", "width", "bottom", "height"], {
652
- duration: e.transitions.duration.shortest
653
- }),
654
- variants: [{
655
- props: {
656
- size: "small"
657
- },
658
- style: {
659
- border: "none"
660
- }
661
- }, {
662
- props: {
663
- orientation: "horizontal"
664
- },
665
- style: {
666
- height: "inherit",
667
- top: "50%",
668
- transform: "translateY(-50%)"
669
- }
670
- }, {
671
- props: {
672
- orientation: "vertical"
673
- },
674
- style: {
675
- width: "inherit",
676
- left: "50%",
677
- transform: "translateX(-50%)"
678
- }
679
- }, {
680
- props: {
681
- track: !1
682
- },
683
- style: {
684
- display: "none"
685
- }
686
- }, ...Object.entries(e.palette).filter(qe()).map(([a]) => ({
687
- props: {
688
- color: a,
689
- track: "inverted"
690
- },
691
- style: {
692
- ...e.vars ? {
693
- backgroundColor: e.vars.palette.Slider[`${a}Track`],
694
- borderColor: e.vars.palette.Slider[`${a}Track`]
695
- } : {
696
- backgroundColor: e.lighten(e.palette[a].main, 0.62),
697
- borderColor: e.lighten(e.palette[a].main, 0.62),
698
- ...e.applyStyles("dark", {
699
- backgroundColor: e.darken(e.palette[a].main, 0.5)
700
- }),
701
- ...e.applyStyles("dark", {
702
- borderColor: e.darken(e.palette[a].main, 0.5)
703
- })
704
- }
705
- }
706
- }))]
707
- }))), Lt = ae("span", {
708
- name: "MuiSlider",
709
- slot: "Thumb"
710
- })(de(({
711
- theme: e
712
- }) => ({
713
- position: "absolute",
714
- width: 20,
715
- height: 20,
716
- boxSizing: "border-box",
717
- borderRadius: "50%",
718
- outline: 0,
719
- backgroundColor: "currentColor",
720
- display: "flex",
721
- alignItems: "center",
722
- justifyContent: "center",
723
- transition: e.transitions.create(["box-shadow", "left", "bottom"], {
724
- duration: e.transitions.duration.shortest
725
- }),
726
- "&::before": {
727
- position: "absolute",
728
- content: '""',
729
- borderRadius: "inherit",
730
- width: "100%",
731
- height: "100%",
732
- boxShadow: (e.vars || e).shadows[2]
733
- },
734
- "&::after": {
735
- position: "absolute",
736
- content: '""',
737
- borderRadius: "50%",
738
- // 42px is the hit target
739
- width: 42,
740
- height: 42,
741
- top: "50%",
742
- left: "50%",
743
- transform: "translate(-50%, -50%)"
744
- },
745
- [`&.${V.disabled}`]: {
746
- "&:hover": {
747
- boxShadow: "none"
748
- }
749
- },
750
- variants: [{
751
- props: {
752
- size: "small"
753
- },
754
- style: {
755
- width: 12,
756
- height: 12,
757
- "&::before": {
758
- boxShadow: "none"
759
- }
760
- }
761
- }, {
762
- props: {
763
- orientation: "horizontal"
764
- },
765
- style: {
766
- top: "50%",
767
- transform: "translate(-50%, -50%)"
768
- }
769
- }, {
770
- props: {
771
- orientation: "vertical"
772
- },
773
- style: {
774
- left: "50%",
775
- transform: "translate(-50%, 50%)"
776
- }
777
- }, ...Object.entries(e.palette).filter(qe()).map(([a]) => ({
778
- props: {
779
- color: a
780
- },
781
- style: {
782
- [`&:hover, &.${V.focusVisible}`]: {
783
- boxShadow: `0px 0px 0px 8px ${e.alpha((e.vars || e).palette[a].main, 0.16)}`,
784
- "@media (hover: none)": {
785
- boxShadow: "none"
786
- }
787
- },
788
- [`&.${V.active}`]: {
789
- boxShadow: `0px 0px 0px 14px ${e.alpha((e.vars || e).palette[a].main, 0.16)}`
790
- }
791
- }
792
- }))]
793
- }))), Ze = ae(Qe, {
794
- name: "MuiSlider",
795
- slot: "ValueLabel"
796
- })(de(({
797
- theme: e
798
- }) => ({
799
- zIndex: 1,
800
- whiteSpace: "nowrap",
801
- ...e.typography.body2,
802
- fontWeight: 500,
803
- transition: e.transitions.create(["transform"], {
804
- duration: e.transitions.duration.shortest
805
- }),
806
- position: "absolute",
807
- backgroundColor: (e.vars || e).palette.grey[600],
808
- borderRadius: 2,
809
- color: (e.vars || e).palette.common.white,
810
- display: "flex",
811
- alignItems: "center",
812
- justifyContent: "center",
813
- padding: "0.25rem 0.75rem",
814
- variants: [{
815
- props: {
816
- orientation: "horizontal"
817
- },
818
- style: {
819
- transform: "translateY(-100%) scale(0)",
820
- top: "-10px",
821
- transformOrigin: "bottom center",
822
- "&::before": {
823
- position: "absolute",
824
- content: '""',
825
- width: 8,
826
- height: 8,
827
- transform: "translate(-50%, 50%) rotate(45deg)",
828
- backgroundColor: "inherit",
829
- bottom: 0,
830
- left: "50%"
831
- },
832
- [`&.${V.valueLabelOpen}`]: {
833
- transform: "translateY(-100%) scale(1)"
834
- }
835
- }
836
- }, {
837
- props: {
838
- orientation: "vertical"
839
- },
840
- style: {
841
- transform: "translateY(-50%) scale(0)",
842
- right: "30px",
843
- top: "50%",
844
- transformOrigin: "right center",
845
- "&::before": {
846
- position: "absolute",
847
- content: '""',
848
- width: 8,
849
- height: 8,
850
- transform: "translate(-50%, -50%) rotate(45deg)",
851
- backgroundColor: "inherit",
852
- right: -8,
853
- top: "50%"
854
- },
855
- [`&.${V.valueLabelOpen}`]: {
856
- transform: "translateY(-50%) scale(1)"
857
- }
858
- }
859
- }, {
860
- props: {
861
- size: "small"
862
- },
863
- style: {
864
- fontSize: e.typography.pxToRem(12),
865
- padding: "0.25rem 0.5rem"
866
- }
867
- }, {
868
- props: {
869
- orientation: "vertical",
870
- size: "small"
871
- },
872
- style: {
873
- right: "20px"
874
- }
875
- }]
876
- })));
877
- process.env.NODE_ENV !== "production" && (Ze.propTypes = {
878
- // ┌────────────────────────────── Warning ──────────────────────────────┐
879
- // │ These PropTypes are generated from the TypeScript type definitions. │
880
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
881
- // └─────────────────────────────────────────────────────────────────────┘
882
- /**
883
- * @ignore
884
- */
885
- children: t.element.isRequired,
886
- /**
887
- * @ignore
888
- */
889
- index: t.number.isRequired,
890
- /**
891
- * @ignore
892
- */
893
- open: t.bool.isRequired,
894
- /**
895
- * @ignore
896
- */
897
- value: t.node
898
- });
899
- const Ct = ae("span", {
900
- name: "MuiSlider",
901
- slot: "Mark",
902
- shouldForwardProp: (e) => Ge(e) && e !== "markActive",
903
- overridesResolver: (e, a) => {
904
- const {
905
- markActive: i
906
- } = e;
907
- return [a.mark, i && a.markActive];
908
- }
909
- })(de(({
910
- theme: e
911
- }) => ({
912
- position: "absolute",
913
- width: 2,
914
- height: 2,
915
- borderRadius: 1,
916
- backgroundColor: "currentColor",
917
- variants: [{
918
- props: {
919
- orientation: "horizontal"
920
- },
921
- style: {
922
- top: "50%",
923
- transform: "translate(-1px, -50%)"
924
- }
925
- }, {
926
- props: {
927
- orientation: "vertical"
928
- },
929
- style: {
930
- left: "50%",
931
- transform: "translate(-50%, 1px)"
932
- }
933
- }, {
934
- props: {
935
- markActive: !0
936
- },
937
- style: {
938
- backgroundColor: (e.vars || e).palette.background.paper,
939
- opacity: 0.8
940
- }
941
- }]
942
- }))), Nt = ae("span", {
943
- name: "MuiSlider",
944
- slot: "MarkLabel",
945
- shouldForwardProp: (e) => Ge(e) && e !== "markLabelActive"
946
- })(de(({
947
- theme: e
948
- }) => ({
949
- ...e.typography.body2,
950
- color: (e.vars || e).palette.text.secondary,
951
- position: "absolute",
952
- whiteSpace: "nowrap",
953
- variants: [{
954
- props: {
955
- orientation: "horizontal"
956
- },
957
- style: {
958
- top: 30,
959
- transform: "translateX(-50%)",
960
- "@media (pointer: coarse)": {
961
- top: 40
962
- }
963
- }
964
- }, {
965
- props: {
966
- orientation: "vertical"
967
- },
968
- style: {
969
- left: 36,
970
- transform: "translateY(50%)",
971
- "@media (pointer: coarse)": {
972
- left: 44
973
- }
974
- }
975
- }, {
976
- props: {
977
- markLabelActive: !0
978
- },
979
- style: {
980
- color: (e.vars || e).palette.text.primary
981
- }
982
- }]
983
- }))), At = (e) => {
984
- const {
985
- disabled: a,
986
- dragging: i,
987
- marked: c,
988
- orientation: p,
989
- track: y,
990
- classes: S,
991
- color: f,
992
- size: u
993
- } = e, K = {
994
- root: ["root", a && "disabled", i && "dragging", c && "marked", p === "vertical" && "vertical", y === "inverted" && "trackInverted", y === !1 && "trackFalse", f && `color${Re(f)}`, u && `size${Re(u)}`],
995
- rail: ["rail"],
996
- track: ["track"],
997
- mark: ["mark"],
998
- markActive: ["markActive"],
999
- markLabel: ["markLabel"],
1000
- markLabelActive: ["markLabelActive"],
1001
- valueLabel: ["valueLabel"],
1002
- thumb: ["thumb", a && "disabled"],
1003
- active: ["active"],
1004
- disabled: ["disabled"],
1005
- focusVisible: ["focusVisible"]
1006
- };
1007
- return ct(K, kt, S);
1008
- }, It = ({
1009
- children: e
1010
- }) => e, et = /* @__PURE__ */ h.forwardRef(function(a, i) {
1011
- const c = it({
1012
- props: a,
1013
- name: "MuiSlider"
1014
- }), p = lt(), {
1015
- "aria-label": y,
1016
- "aria-valuetext": S,
1017
- "aria-labelledby": f,
1018
- color: u = "primary",
1019
- classes: K,
1020
- className: H,
1021
- disableSwap: _ = !1,
1022
- disabled: D = !1,
1023
- getAriaLabel: z,
1024
- getAriaValueText: v,
1025
- marks: b = !1,
1026
- max: k = 100,
1027
- min: T = 0,
1028
- name: E,
1029
- onChange: M,
1030
- onChangeCommitted: oe,
1031
- orientation: B = "horizontal",
1032
- shiftStep: J = 10,
1033
- size: Oe = "medium",
1034
- step: Q = 1,
1035
- scale: Z = Xe,
1036
- slotProps: we = {},
1037
- slots: se = {},
1038
- tabIndex: ie,
1039
- track: W = "normal",
1040
- value: pe,
1041
- valueLabelDisplay: $ = "off",
1042
- valueLabelFormat: F = Xe,
1043
- ...P
1044
- } = c, L = {
1045
- ...c,
1046
- isRtl: p,
1047
- max: k,
1048
- min: T,
1049
- classes: K,
1050
- disabled: D,
1051
- disableSwap: _,
1052
- orientation: B,
1053
- marks: b,
1054
- color: u,
1055
- size: Oe,
1056
- step: Q,
1057
- shiftStep: J,
1058
- scale: Z,
1059
- track: W,
1060
- valueLabelDisplay: $,
1061
- valueLabelFormat: F
1062
- }, {
1063
- axisProps: j,
1064
- getRootProps: ee,
1065
- getHiddenInputProps: A,
1066
- getThumbProps: U,
1067
- open: C,
1068
- active: fe,
1069
- axis: Y,
1070
- focusedThumbIndex: x,
1071
- range: me,
1072
- dragging: Ve,
1073
- marks: be,
1074
- values: I,
1075
- trackOffset: De,
1076
- trackLeap: ze,
1077
- getThumbStyle: te
1078
- } = yt({
1079
- ...L,
1080
- rootRef: i
1081
- });
1082
- L.marked = be.length > 0 && be.some((o) => o.label), L.dragging = Ve, L.focusedThumbIndex = x;
1083
- const N = At(L), R = {
1084
- slots: se,
1085
- slotProps: we
1086
- }, [re, X] = G("root", {
1087
- elementType: wt,
1088
- getSlotProps: ee,
1089
- externalForwardedProps: {
1090
- ...R,
1091
- ...P
1092
- },
1093
- ownerState: L,
1094
- className: [N.root, H]
1095
- }), [he, ne] = G("rail", {
1096
- elementType: St,
1097
- externalForwardedProps: R,
1098
- ownerState: L,
1099
- className: N.rail
1100
- }), [Ee, Se] = G("track", {
1101
- elementType: Tt,
1102
- externalForwardedProps: R,
1103
- additionalProps: {
1104
- style: {
1105
- ...j[Y].offset(De),
1106
- ...j[Y].leap(ze)
1107
- }
1108
- },
1109
- ownerState: L,
1110
- className: N.track
1111
- }), [$e, ge] = G("thumb", {
1112
- elementType: Lt,
1113
- getSlotProps: U,
1114
- externalForwardedProps: R,
1115
- ownerState: L,
1116
- className: N.thumb
1117
- }), [He, Fe] = G("valueLabel", {
1118
- elementType: Ze,
1119
- externalForwardedProps: R,
1120
- ownerState: L,
1121
- className: N.valueLabel
1122
- }), [Te, ve] = G("mark", {
1123
- elementType: Ct,
1124
- externalForwardedProps: R,
1125
- ownerState: L,
1126
- className: N.mark
1127
- }), [ye, Le] = G("markLabel", {
1128
- elementType: Nt,
1129
- externalForwardedProps: R,
1130
- ownerState: L,
1131
- className: N.markLabel
1132
- }), [n, r] = G("input", {
1133
- elementType: "input",
1134
- getSlotProps: A,
1135
- externalForwardedProps: R,
1136
- ownerState: L
1137
- });
1138
- return /* @__PURE__ */ O(re, {
1139
- ...X,
1140
- children: [/* @__PURE__ */ w(he, {
1141
- ...ne
1142
- }), /* @__PURE__ */ w(Ee, {
1143
- ...Se
1144
- }), be.filter((o) => o.value >= T && o.value <= k).map((o, l) => {
1145
- const s = Pe(o.value, T, k), d = j[Y].offset(s);
1146
- let m;
1147
- return W === !1 ? m = I.includes(o.value) : m = W === "normal" && (me ? o.value >= I[0] && o.value <= I[I.length - 1] : o.value <= I[0]) || W === "inverted" && (me ? o.value <= I[0] || o.value >= I[I.length - 1] : o.value >= I[0]), /* @__PURE__ */ O(h.Fragment, {
1148
- children: [/* @__PURE__ */ w(Te, {
1149
- "data-index": l,
1150
- ...ve,
1151
- ...!Ue(Te) && {
1152
- markActive: m
1153
- },
1154
- style: {
1155
- ...d,
1156
- ...ve.style
1157
- },
1158
- className: xe(ve.className, m && N.markActive)
1159
- }), o.label != null ? /* @__PURE__ */ w(ye, {
1160
- "aria-hidden": !0,
1161
- "data-index": l,
1162
- ...Le,
1163
- ...!Ue(ye) && {
1164
- markLabelActive: m
1165
- },
1166
- style: {
1167
- ...d,
1168
- ...Le.style
1169
- },
1170
- className: xe(N.markLabel, Le.className, m && N.markLabelActive),
1171
- children: o.label
1172
- }) : null]
1173
- }, l);
1174
- }), I.map((o, l) => {
1175
- const s = Pe(o, T, k), d = j[Y].offset(s), m = $ === "off" ? It : He;
1176
- return (
1177
- /* TODO v6: Change component structure. It will help in avoiding the complicated React.cloneElement API added in SliderValueLabel component. Should be: Thumb -> Input, ValueLabel. Follow Joy UI's Slider structure. */
1178
- /* @__PURE__ */ w(m, {
1179
- ...!Ue(m) && {
1180
- valueLabelFormat: F,
1181
- valueLabelDisplay: $,
1182
- value: typeof F == "function" ? F(Z(o), l) : F,
1183
- index: l,
1184
- open: C === l || fe === l || $ === "on",
1185
- disabled: D
1186
- },
1187
- ...Fe,
1188
- children: /* @__PURE__ */ w($e, {
1189
- "data-index": l,
1190
- ...ge,
1191
- className: xe(N.thumb, ge.className, fe === l && N.active, x === l && N.focusVisible),
1192
- style: {
1193
- ...d,
1194
- ...te(l),
1195
- ...ge.style
1196
- },
1197
- children: /* @__PURE__ */ w(n, {
1198
- "data-index": l,
1199
- "aria-label": z ? z(l) : y,
1200
- "aria-valuenow": Z(o),
1201
- "aria-labelledby": f,
1202
- "aria-valuetext": v ? v(Z(o), l) : S,
1203
- value: I[l],
1204
- ...r
1205
- })
1206
- })
1207
- }, l)
1208
- );
1209
- })]
1210
- });
1211
- });
1212
- process.env.NODE_ENV !== "production" && (et.propTypes = {
1213
- // ┌────────────────────────────── Warning ──────────────────────────────┐
1214
- // │ These PropTypes are generated from the TypeScript type definitions. │
1215
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
1216
- // └─────────────────────────────────────────────────────────────────────┘
1217
- /**
1218
- * The label of the slider.
1219
- */
1220
- "aria-label": Ke(t.string, (e) => Array.isArray(e.value || e.defaultValue) && e["aria-label"] != null ? new Error("MUI: You need to use the `getAriaLabel` prop instead of `aria-label` when using a range slider.") : null),
1221
- /**
1222
- * The id of the element containing a label for the slider.
1223
- */
1224
- "aria-labelledby": t.string,
1225
- /**
1226
- * A string value that provides a user-friendly name for the current value of the slider.
1227
- */
1228
- "aria-valuetext": Ke(t.string, (e) => Array.isArray(e.value || e.defaultValue) && e["aria-valuetext"] != null ? new Error("MUI: You need to use the `getAriaValueText` prop instead of `aria-valuetext` when using a range slider.") : null),
1229
- /**
1230
- * @ignore
1231
- */
1232
- children: t.node,
1233
- /**
1234
- * Override or extend the styles applied to the component.
1235
- */
1236
- classes: t.object,
1237
- /**
1238
- * @ignore
1239
- */
1240
- className: t.string,
1241
- /**
1242
- * The color of the component.
1243
- * It supports both default and custom theme colors, which can be added as shown in the
1244
- * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
1245
- * @default 'primary'
1246
- */
1247
- color: t.oneOfType([t.oneOf(["primary", "secondary", "error", "info", "success", "warning"]), t.string]),
1248
- /**
1249
- * The default value. Use when the component is not controlled.
1250
- */
1251
- defaultValue: t.oneOfType([t.arrayOf(t.number), t.number]),
1252
- /**
1253
- * If `true`, the component is disabled.
1254
- * @default false
1255
- */
1256
- disabled: t.bool,
1257
- /**
1258
- * If `true`, the active thumb doesn't swap when moving pointer over a thumb while dragging another thumb.
1259
- * @default false
1260
- */
1261
- disableSwap: t.bool,
1262
- /**
1263
- * Accepts a function which returns a string value that provides a user-friendly name for the thumb labels of the slider.
1264
- * This is important for screen reader users.
1265
- * @param {number} index The thumb label's index to format.
1266
- * @returns {string}
1267
- */
1268
- getAriaLabel: t.func,
1269
- /**
1270
- * Accepts a function which returns a string value that provides a user-friendly name for the current value of the slider.
1271
- * This is important for screen reader users.
1272
- * @param {number} value The thumb label's value to format.
1273
- * @param {number} index The thumb label's index to format.
1274
- * @returns {string}
1275
- */
1276
- getAriaValueText: t.func,
1277
- /**
1278
- * Marks indicate predetermined values to which the user can move the slider.
1279
- * If `true` the marks are spaced according the value of the `step` prop.
1280
- * If an array, it should contain objects with `value` and an optional `label` keys.
1281
- * @default false
1282
- */
1283
- marks: t.oneOfType([t.arrayOf(t.shape({
1284
- label: t.node,
1285
- value: t.number.isRequired
1286
- })), t.bool]),
1287
- /**
1288
- * The maximum allowed value of the slider.
1289
- * Should not be equal to min.
1290
- * @default 100
1291
- */
1292
- max: t.number,
1293
- /**
1294
- * The minimum allowed value of the slider.
1295
- * Should not be equal to max.
1296
- * @default 0
1297
- */
1298
- min: t.number,
1299
- /**
1300
- * Name attribute of the hidden `input` element.
1301
- */
1302
- name: t.string,
1303
- /**
1304
- * Callback function that is fired when the slider's value changed.
1305
- *
1306
- * @param {Event} event The event source of the callback.
1307
- * You can pull out the new value by accessing `event.target.value` (any).
1308
- * **Warning**: This is a generic event not a change event.
1309
- * @param {Value} value The new value.
1310
- * @param {number} activeThumb Index of the currently moved thumb.
1311
- */
1312
- onChange: t.func,
1313
- /**
1314
- * Callback function that is fired when the pointer or touch interaction ends.
1315
- *
1316
- * @param {React.SyntheticEvent | Event} event The event source of the callback. **Warning**: This is a generic event not a change event.
1317
- * @param {Value} value The new value.
1318
- */
1319
- onChangeCommitted: t.func,
1320
- /**
1321
- * The component orientation.
1322
- * @default 'horizontal'
1323
- */
1324
- orientation: t.oneOf(["horizontal", "vertical"]),
1325
- /**
1326
- * A transformation function, to change the scale of the slider.
1327
- * @param {any} x
1328
- * @returns {any}
1329
- * @default function Identity(x) {
1330
- * return x;
1331
- * }
1332
- */
1333
- scale: t.func,
1334
- /**
1335
- * The granularity with which the slider can step through values when using Page Up/Page Down or Shift + Arrow Up/Arrow Down.
1336
- * @default 10
1337
- */
1338
- shiftStep: t.number,
1339
- /**
1340
- * The size of the slider.
1341
- * @default 'medium'
1342
- */
1343
- size: t.oneOfType([t.oneOf(["small", "medium"]), t.string]),
1344
- /**
1345
- * The props used for each slot inside.
1346
- * @default {}
1347
- */
1348
- slotProps: t.shape({
1349
- input: t.oneOfType([t.func, t.object]),
1350
- mark: t.oneOfType([t.func, t.object]),
1351
- markLabel: t.oneOfType([t.func, t.object]),
1352
- rail: t.oneOfType([t.func, t.object]),
1353
- root: t.oneOfType([t.func, t.object]),
1354
- thumb: t.oneOfType([t.func, t.object]),
1355
- track: t.oneOfType([t.func, t.object]),
1356
- valueLabel: t.oneOfType([t.func, t.shape({
1357
- children: t.element,
1358
- className: t.string,
1359
- open: t.bool,
1360
- style: t.object,
1361
- value: t.node,
1362
- valueLabelDisplay: t.oneOf(["auto", "off", "on"])
1363
- })])
1364
- }),
1365
- /**
1366
- * The components used for each slot inside.
1367
- * @default {}
1368
- */
1369
- slots: t.shape({
1370
- input: t.elementType,
1371
- mark: t.elementType,
1372
- markLabel: t.elementType,
1373
- rail: t.elementType,
1374
- root: t.elementType,
1375
- thumb: t.elementType,
1376
- track: t.elementType,
1377
- valueLabel: t.elementType
1378
- }),
1379
- /**
1380
- * The granularity with which the slider can step through values. (A "discrete" slider.)
1381
- * The `min` prop serves as the origin for the valid values.
1382
- * We recommend (max - min) to be evenly divisible by the step.
1383
- *
1384
- * When step is `null`, the thumb can only be slid onto marks provided with the `marks` prop.
1385
- * @default 1
1386
- */
1387
- step: t.number,
1388
- /**
1389
- * The system prop that allows defining system overrides as well as additional CSS styles.
1390
- */
1391
- sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object]),
1392
- /**
1393
- * Tab index attribute of the hidden `input` element.
1394
- */
1395
- tabIndex: t.number,
1396
- /**
1397
- * The track presentation:
1398
- *
1399
- * - `normal` the track will render a bar representing the slider value.
1400
- * - `inverted` the track will render a bar representing the remaining slider value.
1401
- * - `false` the track will render without a bar.
1402
- * @default 'normal'
1403
- */
1404
- track: t.oneOf(["inverted", "normal", !1]),
1405
- /**
1406
- * The value of the slider.
1407
- * For ranged sliders, provide an array with two values.
1408
- */
1409
- value: t.oneOfType([t.arrayOf(t.number), t.number]),
1410
- /**
1411
- * Controls when the value label is displayed:
1412
- *
1413
- * - `auto` the value label will display when the thumb is hovered or focused.
1414
- * - `on` will display persistently.
1415
- * - `off` will never display.
1416
- * @default 'off'
1417
- */
1418
- valueLabelDisplay: t.oneOf(["auto", "off", "on"]),
1419
- /**
1420
- * The format function the value label's value.
1421
- *
1422
- * When a function is provided, it should have the following signature:
1423
- *
1424
- * - {number} value The value label's value to format
1425
- * - {number} index The value label's index to format
1426
- * @param {any} x
1427
- * @returns {any}
1428
- * @default function Identity(x) {
1429
- * return x;
1430
- * }
1431
- */
1432
- valueLabelFormat: t.oneOfType([t.func, t.string])
1433
- });
1434
- function Dt({
1435
- selectedFilter: e,
1436
- currentVal: a,
1437
- setDraftColumnFilters: i,
1438
- error: c,
1439
- setError: p
1
+ import { jsxs as h, jsx as u } from "react/jsx-runtime";
2
+ import { RangeSlider as M } from "../../../RangeSlider/index.js";
3
+ function N({
4
+ selectedFilter: a,
5
+ currentVal: m,
6
+ setDraftColumnFilters: o,
7
+ error: t,
8
+ setError: c
1440
9
  }) {
1441
- const S = (v) => {
1442
- i((b) => [
1443
- ...b.filter((k) => k.id !== e?.accessorKey),
1444
- { id: e?.accessorKey ?? "", value: v }
10
+ const l = a?.currencySymbol ?? "", i = a?.type === "range" ? a.values : { min: 0, max: 0 }, v = m || i, f = (n, r) => {
11
+ const e = a?.values?.min ?? 0, s = a?.values?.max ?? 0;
12
+ return Number.isNaN(n) ? "Minimum value is invalid." : n < e ? `Minimum value cannot be less than ${e}.` : n > r ? "Minimum value cannot be greater than maximum value." : Number.isNaN(r) ? "Maximum value is invalid." : r > s ? `Maximum value cannot be greater than ${s}.` : r < n ? "Maximum value cannot be less than minimum value." : "";
13
+ }, x = (n) => {
14
+ o((r) => [
15
+ ...r.filter((e) => e.id !== a?.accessorKey),
16
+ { id: a?.accessorKey ?? "", value: n }
1445
17
  ]);
1446
- }, f = (v, b) => {
1447
- const k = e?.values?.min ?? 0, T = e?.values?.max ?? 0, E = Number(v), M = Number(b);
1448
- return String(v) === "" || Number.isNaN(E) ? "Minimum value is invalid." : E < k ? `Minimum value cannot be less than ${k}.` : E > M ? "Minimum value cannot be greater than maximum value." : String(b) === "" || Number.isNaN(M) ? "Maximum value is invalid." : M > T ? `Maximum value cannot be greater than ${T}.` : M < E ? "Maximum value cannot be less than minimum value." : "";
1449
- }, u = () => e?.type === "range" ? e.values : { min: 0, max: 0 }, K = (v) => {
1450
- if (!e) return;
1451
- const b = v.target.value, k = a?.max;
1452
- p(f(b, k ?? 0));
1453
- const T = a || u();
1454
- S({ ...T, min: Number(b) });
1455
- }, H = (v) => {
1456
- if (!e) return;
1457
- const b = v.target.value, k = a?.min;
1458
- p(f(k ?? 0, b));
1459
- const T = a || u();
1460
- S({ ...T, max: Number(b) });
1461
- }, _ = (v, b, k) => {
1462
- if (!e || !Array.isArray(b)) return;
1463
- const T = a || u();
1464
- let E;
1465
- k === 0 ? E = { ...T, min: Math.min(b[0], T.max - 0) } : E = { ...T, max: Math.max(b[1], T.min + 0) }, S(E);
1466
- }, D = u(), z = a || D;
1467
- return /* @__PURE__ */ O("div", { children: [
1468
- /* @__PURE__ */ O("div", { className: `ckds-filter-detail ${c ? "" : "mb-6"}`, children: [
1469
- /* @__PURE__ */ O("div", { className: "ckds-filter-slider-values", children: [
1470
- /* @__PURE__ */ w("p", { children: "Minimum Value" }),
1471
- /* @__PURE__ */ O("div", { className: "ckds-slider-input", children: [
1472
- /* @__PURE__ */ w("span", { className: "ckds-currency-prefix", children: "$" }),
1473
- /* @__PURE__ */ w(
1474
- "input",
1475
- {
1476
- type: "number",
1477
- name: "min",
1478
- value: z.min,
1479
- onChange: K,
1480
- className: "ckds-currency-input-field",
1481
- placeholder: "0",
1482
- onKeyDown: (v) => ["e", "E", "+", "-", "."].includes(v.key) && v.preventDefault()
1483
- }
1484
- )
1485
- ] })
1486
- ] }),
1487
- /* @__PURE__ */ O("div", { className: "ckds-filter-slider-values", children: [
1488
- /* @__PURE__ */ w("p", { children: "Maximum Value" }),
1489
- /* @__PURE__ */ O("div", { className: "ckds-slider-input", children: [
1490
- /* @__PURE__ */ w("span", { className: "ckds-currency-prefix", children: "$" }),
1491
- /* @__PURE__ */ w(
1492
- "input",
1493
- {
1494
- type: "number",
1495
- name: "max",
1496
- value: z.max,
1497
- onChange: H,
1498
- className: "ckds-currency-input-field",
1499
- placeholder: "0",
1500
- onKeyDown: (v) => ["e", "E", "+", "-", "."].includes(v.key) && v.preventDefault()
1501
- }
1502
- )
1503
- ] })
1504
- ] })
1505
- ] }),
1506
- c && /* @__PURE__ */ w("div", { className: "ckds-filter-error", children: c }),
1507
- /* @__PURE__ */ w("div", { style: { width: "100%", paddingInline: 14, boxSizing: "border-box" }, children: /* @__PURE__ */ w(
1508
- et,
18
+ }, b = (n) => {
19
+ a && (c(f(n.min, n.max)), x(n));
20
+ };
21
+ return /* @__PURE__ */ h("div", { children: [
22
+ t && /* @__PURE__ */ u("div", { className: "ckds-filter-error", children: t }),
23
+ /* @__PURE__ */ u(
24
+ M,
1509
25
  {
1510
- className: "slider",
1511
- min: D.min,
1512
- max: D.max,
1513
- value: [z.min, z.max],
1514
- onChange: _,
1515
- disableSwap: !0,
1516
- valueLabelDisplay: "auto"
1517
- }
1518
- ) }),
1519
- /* @__PURE__ */ O("div", { className: "ckds-slider-input-display", children: [
1520
- /* @__PURE__ */ O("span", { children: [
1521
- "$",
1522
- Number(z.min),
1523
- " "
1524
- ] }),
1525
- /* @__PURE__ */ O("span", { children: [
1526
- "$",
1527
- Number(z.max),
1528
- " "
1529
- ] })
1530
- ] })
26
+ min: i.min,
27
+ max: i.max,
28
+ value: v,
29
+ onChange: b,
30
+ showCurrency: !0,
31
+ currencySymbol: l
32
+ }
33
+ )
1531
34
  ] });
1532
35
  }
1533
36
  export {
1534
- Dt as default
37
+ N as default
1535
38
  };