@prokodo/ui 0.0.26 → 0.0.28

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 (251) hide show
  1. package/README.md +89 -45
  2. package/dist/_virtual/_commonjsHelpers.js +6 -3
  3. package/dist/_virtual/index.js +5 -5
  4. package/dist/_virtual/index2.js +2 -2
  5. package/dist/_virtual/index3.js +2 -2
  6. package/dist/_virtual/react-is.development.js +2 -2
  7. package/dist/_virtual/react-is.production.min.js +2 -2
  8. package/dist/assets/images/card_background_primary_1.webp.js +2 -2
  9. package/dist/assets/images/card_background_primary_2.webp.js +2 -2
  10. package/dist/assets/images/card_background_primary_3.webp.js +2 -2
  11. package/dist/assets/images/card_background_primary_4.webp.js +2 -2
  12. package/dist/assets/images/card_background_secondary_1.webp.js +2 -2
  13. package/dist/assets/images/card_background_secondary_2.webp.js +2 -2
  14. package/dist/assets/images/card_background_secondary_3.webp.js +2 -2
  15. package/dist/assets/images/card_background_secondary_4.webp.js +2 -2
  16. package/dist/components/accordion/Accordion.js +82 -74
  17. package/dist/components/accordion/Accordion.module.scss.js +11 -8
  18. package/dist/components/accordion/index.js +2 -2
  19. package/dist/components/animated/Animated.js +61 -40
  20. package/dist/components/animated/Animated.module.scss.js +8 -6
  21. package/dist/components/animated/index.js +2 -2
  22. package/dist/components/animatedText/AnimatedText.js +36 -27
  23. package/dist/components/animatedText/index.js +2 -2
  24. package/dist/components/avatar/Avatar.js +62 -54
  25. package/dist/components/avatar/Avatar.module.scss.js +8 -6
  26. package/dist/components/avatar/index.js +2 -2
  27. package/dist/components/base-link/BaseLink.js +39 -27
  28. package/dist/components/base-link/index.js +2 -2
  29. package/dist/components/button/Button.client.js +100 -0
  30. package/dist/components/button/Button.js +15 -82
  31. package/dist/components/button/Button.lazy.js +20 -0
  32. package/dist/components/button/Button.module.scss.js +8 -6
  33. package/dist/components/button/Button.server.js +77 -0
  34. package/dist/components/button/index.js +2 -2
  35. package/dist/components/calendly/Calendly.js +99 -60
  36. package/dist/components/calendly/index.js +2 -2
  37. package/dist/components/card/Card.js +167 -141
  38. package/dist/components/card/Card.module.scss.js +11 -8
  39. package/dist/components/card/index.js +2 -2
  40. package/dist/components/carousel/Carousel.js +209 -145
  41. package/dist/components/carousel/Carousel.module.scss.js +8 -6
  42. package/dist/components/carousel/Carousel.services.js +39 -20
  43. package/dist/components/carousel/index.js +2 -2
  44. package/dist/components/chip/Chip.js +44 -36
  45. package/dist/components/chip/Chip.module.scss.js +8 -6
  46. package/dist/components/chip/index.js +2 -2
  47. package/dist/components/datePicker/DatePicker.js +106 -69
  48. package/dist/components/datePicker/index.js +2 -2
  49. package/dist/components/dialog/Dialog.js +106 -93
  50. package/dist/components/dialog/Dialog.module.scss.js +8 -6
  51. package/dist/components/dialog/index.js +2 -2
  52. package/dist/components/drawer/Drawer.js +78 -64
  53. package/dist/components/drawer/Drawer.module.scss.js +20 -14
  54. package/dist/components/drawer/index.js +4 -4
  55. package/dist/components/form/Form.js +229 -165
  56. package/dist/components/form/Form.module.scss.js +8 -6
  57. package/dist/components/form/FormField.js +63 -60
  58. package/dist/components/form/FormField.module.scss.js +8 -6
  59. package/dist/components/form/FormResponse.js +37 -41
  60. package/dist/components/form/FormResponse.module.scss.js +8 -6
  61. package/dist/components/form/index.js +4 -4
  62. package/dist/components/grid/Grid.js +14 -11
  63. package/dist/components/grid/Grid.module.scss.js +8 -6
  64. package/dist/components/grid/GridRow.js +20 -17
  65. package/dist/components/grid/GridRow.module.scss.js +8 -6
  66. package/dist/components/grid/index.js +4 -4
  67. package/dist/components/headline/Headline.client.js +85 -0
  68. package/dist/components/headline/Headline.module.scss.js +8 -6
  69. package/dist/components/headline/Headline.server.js +73 -0
  70. package/dist/components/headline/Headline.variants.js +9 -0
  71. package/dist/components/headline/index.js +4 -3
  72. package/dist/components/icon/Icon.js +27 -22
  73. package/dist/components/icon/Icon.module.scss.js +8 -6
  74. package/dist/components/icon/index.js +3 -3
  75. package/dist/components/image/Image.js +30 -24
  76. package/dist/components/image/Image.module.scss.js +8 -6
  77. package/dist/components/image/index.js +2 -2
  78. package/dist/components/image-text/ImageText.js +80 -81
  79. package/dist/components/image-text/ImageText.module.scss.js +8 -6
  80. package/dist/components/image-text/index.js +2 -2
  81. package/dist/components/input/Input.js +147 -131
  82. package/dist/components/input/Input.module.scss.js +11 -8
  83. package/dist/components/input/InputValidation.js +50 -31
  84. package/dist/components/input/index.js +2 -2
  85. package/dist/components/inputOTP/InputOTP.js +90 -57
  86. package/dist/components/inputOTP/InputOTP.module.scss.js +8 -6
  87. package/dist/components/inputOTP/index.js +2 -2
  88. package/dist/components/label/Label.js +64 -63
  89. package/dist/components/label/Label.module.scss.js +8 -6
  90. package/dist/components/label/index.js +2 -2
  91. package/dist/components/link/Link.js +53 -48
  92. package/dist/components/link/Link.module.scss.js +8 -6
  93. package/dist/components/link/index.js +2 -2
  94. package/dist/components/list/List.js +120 -104
  95. package/dist/components/list/List.module.scss.js +8 -6
  96. package/dist/components/list/index.js +2 -2
  97. package/dist/components/loading/Loading.js +21 -20
  98. package/dist/components/loading/Loading.module.scss.js +11 -8
  99. package/dist/components/loading/index.js +2 -2
  100. package/dist/components/lottie/Lottie.js +47 -37
  101. package/dist/components/lottie/Lottie.module.scss.js +8 -6
  102. package/dist/components/lottie/LottieAnimations.js +2 -2
  103. package/dist/components/lottie/index.js +2 -2
  104. package/dist/components/map/Map.js +59 -42
  105. package/dist/components/map/index.js +2 -2
  106. package/dist/components/post-item/PostItem.js +81 -76
  107. package/dist/components/post-item/PostItem.module.scss.js +8 -6
  108. package/dist/components/post-item/PostItemAuthor.js +24 -23
  109. package/dist/components/post-item/PostItemAuthor.module.scss.js +8 -6
  110. package/dist/components/post-item/index.js +4 -4
  111. package/dist/components/post-teaser/PostTeaser.js +96 -92
  112. package/dist/components/post-teaser/PostTeaser.module.scss.js +8 -6
  113. package/dist/components/post-teaser/index.js +2 -2
  114. package/dist/components/post-widget/PostWidget.js +81 -80
  115. package/dist/components/post-widget/PostWidget.module.scss.js +8 -6
  116. package/dist/components/post-widget/index.js +2 -2
  117. package/dist/components/post-widget-carousel/PostWidgetCarousel.js +96 -90
  118. package/dist/components/post-widget-carousel/PostWidgetCarousel.module.scss.js +8 -6
  119. package/dist/components/post-widget-carousel/index.js +2 -2
  120. package/dist/components/quote/Quote.js +48 -47
  121. package/dist/components/quote/Quote.module.scss.js +8 -6
  122. package/dist/components/quote/index.js +2 -2
  123. package/dist/components/rich-text/RichText.js +114 -100
  124. package/dist/components/rich-text/RichText.module.scss.js +8 -6
  125. package/dist/components/rich-text/index.js +2 -2
  126. package/dist/components/select/Select.js +148 -127
  127. package/dist/components/select/Select.module.scss.js +17 -12
  128. package/dist/components/select/index.js +2 -2
  129. package/dist/components/skeleton/Skeleton.js +21 -18
  130. package/dist/components/skeleton/Skeleton.module.scss.js +8 -6
  131. package/dist/components/skeleton/index.js +2 -2
  132. package/dist/components/slider/Slider.js +74 -65
  133. package/dist/components/slider/Slider.module.scss.js +8 -6
  134. package/dist/components/slider/index.js +2 -2
  135. package/dist/components/stepper/Stepper.js +85 -69
  136. package/dist/components/stepper/Stepper.module.scss.js +8 -6
  137. package/dist/components/stepper/index.js +2 -2
  138. package/dist/components/switch/Switch.js +69 -63
  139. package/dist/components/switch/Switch.module.scss.js +8 -6
  140. package/dist/components/switch/index.js +2 -2
  141. package/dist/components/table/Table.js +48 -45
  142. package/dist/components/table/Table.module.scss.js +8 -6
  143. package/dist/components/table/index.js +2 -2
  144. package/dist/components/teaser/Teaser.js +66 -65
  145. package/dist/components/teaser/Teaser.module.scss.js +8 -6
  146. package/dist/components/teaser/index.js +2 -2
  147. package/dist/constants/project.js +2 -2
  148. package/dist/helpers/bem.js +17 -9
  149. package/dist/helpers/calculation.js +4 -2
  150. package/dist/helpers/validations.js +12 -6
  151. package/dist/hooks/useGoogleMaps.js +19 -14
  152. package/dist/hooks/useHydrationReady.js +26 -0
  153. package/dist/index.js +84 -84
  154. package/dist/node_modules/.pnpm/@floating-ui_core@1.7.0/node_modules/@floating-ui/core/dist/floating-ui.core.js +354 -251
  155. package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +555 -309
  156. package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.1.2_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +221 -141
  157. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.9/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +167 -109
  158. package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.9/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +130 -88
  159. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/Option/Option.js +91 -77
  160. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/Option/optionClasses.js +10 -7
  161. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/Portal/Portal.js +54 -40
  162. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/Select/Select.js +192 -163
  163. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/Select/selectClasses.js +10 -7
  164. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/Slider/Slider.js +287 -242
  165. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/Slider/sliderClasses.js +10 -7
  166. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/Switch/Switch.js +112 -97
  167. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/Switch/switchClasses.js +10 -7
  168. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/Unstable_Popup/Popup.js +135 -115
  169. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/Unstable_Popup/PopupContext.js +6 -4
  170. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/Unstable_Popup/popupClasses.js +10 -7
  171. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/generateUtilityClass/index.js +15 -10
  172. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/generateUtilityClasses/index.js +11 -7
  173. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/useButton/useButton.js +160 -73
  174. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/useCompound/useCompoundItem.js +25 -18
  175. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/useCompound/useCompoundParent.js +63 -36
  176. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/useList/ListContext.js +6 -4
  177. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/useList/listActions.types.js +2 -2
  178. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/useList/listReducer.js +233 -138
  179. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/useList/useList.js +189 -128
  180. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/useList/useListItem.js +72 -52
  181. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/useOption/useOption.js +72 -53
  182. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/useOption/useOptionContextStabilizer.js +30 -22
  183. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/useSelect/SelectProvider.js +34 -28
  184. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/useSelect/defaultOptionStringifier.js +15 -7
  185. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/useSelect/selectReducer.js +49 -40
  186. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/useSelect/useSelect.js +341 -222
  187. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/useSelect/useSelect.types.js +2 -2
  188. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/useSlider/useSlider.js +550 -353
  189. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/useSwitch/useSwitch.js +79 -50
  190. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/useTransition/TransitionContext.js +6 -4
  191. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/useTransition/useTransitionTrigger.js +51 -23
  192. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/utils/ClassNameConfigurator.js +21 -10
  193. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/utils/areArraysEqual.js +6 -3
  194. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/utils/combineHooksSlotProps.js +14 -10
  195. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/utils/isHostComponent.js +6 -3
  196. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/utils/resolveComponentProps.js +9 -3
  197. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/utils/useControllableReducer.js +91 -60
  198. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/utils/useRootElementName.js +20 -12
  199. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/utils/useTextNavigation.js +21 -10
  200. package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/HTMLElementType/HTMLElementType.js +16 -5
  201. package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/appendOwnerState/appendOwnerState.js +13 -7
  202. package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/chainPropTypes/chainPropTypes.js +11 -5
  203. package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/clamp/clamp.js +6 -3
  204. package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/composeClasses/composeClasses.js +19 -11
  205. package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/exactProp/exactProp.js +17 -8
  206. package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/extractEventHandlers/extractEventHandlers.js +12 -7
  207. package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/generateUtilityClass/generateUtilityClass.js +2 -2
  208. package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/getReactNodeRef/getReactNodeRef.js +11 -5
  209. package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/isFocusVisible/isFocusVisible.js +11 -7
  210. package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/isHostComponent/isHostComponent.js +6 -3
  211. package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/mergeSlotProps/mergeSlotProps.js +61 -38
  212. package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/omitEventHandlers/omitEventHandlers.js +12 -7
  213. package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/ownerDocument/ownerDocument.js +6 -3
  214. package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/resolveComponentProps/resolveComponentProps.js +9 -3
  215. package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/setRef/setRef.js +10 -3
  216. package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/useControlled/useControlled.js +31 -22
  217. package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/useEnhancedEffect/useEnhancedEffect.js +3 -3
  218. package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/useEventCallback/useEventCallback.js +13 -9
  219. package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/useForkRef/useForkRef.js +17 -9
  220. package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/useId/useId.js +23 -14
  221. package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/useSlotProps/useSlotProps.js +30 -23
  222. package/dist/node_modules/.pnpm/@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/visuallyHidden/visuallyHidden.js +2 -2
  223. package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js +17 -13
  224. package/dist/node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.js +67 -38
  225. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/checkPropTypes.js +55 -37
  226. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithThrowingShims.js +56 -43
  227. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithTypeCheckers.js +404 -243
  228. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js +20 -14
  229. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/ReactPropTypesSecret.js +12 -7
  230. package/dist/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/has.js +11 -4
  231. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.js +170 -82
  232. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.js +91 -58
  233. package/dist/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +17 -7
  234. package/dist/tsconfig.build.tsbuildinfo +1 -1
  235. package/dist/types/components/button/Button.client.d.ts +3 -0
  236. package/dist/types/components/button/Button.d.ts +3 -3
  237. package/dist/types/components/button/Button.lazy.d.ts +3 -0
  238. package/dist/types/components/button/Button.server.d.ts +3 -0
  239. package/dist/types/components/button/index.d.ts +1 -1
  240. package/dist/types/components/form/FormResponse.d.ts +1 -1
  241. package/dist/types/components/headline/Headline.client.d.ts +3 -0
  242. package/dist/types/components/headline/Headline.model.d.ts +1 -0
  243. package/dist/types/components/headline/Headline.server.d.ts +3 -0
  244. package/dist/types/components/headline/Headline.variants.d.ts +2 -0
  245. package/dist/types/components/headline/index.d.ts +2 -1
  246. package/dist/types/components/label/Label.d.ts +1 -1
  247. package/dist/types/hooks/useHydrationReady.d.ts +5 -0
  248. package/dist/ui.css +9592 -1
  249. package/package.json +1 -1
  250. package/dist/components/headline/Headline.js +0 -71
  251. package/dist/types/components/headline/Headline.d.ts +0 -4
@@ -1,423 +1,620 @@
1
- import * as g from "react";
2
- import Ae from "../../../../../@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/useControlled/useControlled.js";
3
- import R from "../../../../../@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/clamp/clamp.js";
4
- import De from "../../../../../@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/useForkRef/useForkRef.js";
5
- import Ce from "../../../../../@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/useEnhancedEffect/useEnhancedEffect.js";
6
- import J from "../../../../../@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/useEventCallback/useEventCallback.js";
7
- import U from "../../../../../@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/ownerDocument/ownerDocument.js";
8
- import Q from "../../../../../@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/extractEventHandlers/extractEventHandlers.js";
9
- import Me from "../../../../../@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/visuallyHidden/visuallyHidden.js";
10
- import { areArraysEqual as Ne } from "../utils/areArraysEqual.js";
11
- import ae from "../../../../../@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/isFocusVisible/isFocusVisible.js";
12
- const Re = 2;
13
- function pe(n, u) {
14
- return n - u;
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+ import * as React from "react";
4
+ import useControlled from "../../../../../@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/useControlled/useControlled.js";
5
+ import clamp from "../../../../../@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/clamp/clamp.js";
6
+ import useForkRef from "../../../../../@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/useForkRef/useForkRef.js";
7
+ import useEnhancedEffect from "../../../../../@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/useEnhancedEffect/useEnhancedEffect.js";
8
+ import useEventCallback from "../../../../../@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/useEventCallback/useEventCallback.js";
9
+ import ownerDocument from "../../../../../@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/ownerDocument/ownerDocument.js";
10
+ import extractEventHandlers from "../../../../../@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/extractEventHandlers/extractEventHandlers.js";
11
+ import visuallyHidden from "../../../../../@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/visuallyHidden/visuallyHidden.js";
12
+ import { areArraysEqual } from "../utils/areArraysEqual.js";
13
+ import isFocusVisible from "../../../../../@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/isFocusVisible/isFocusVisible.js";
14
+ const INTENTIONAL_DRAG_COUNT_THRESHOLD = 2;
15
+ function asc(a, b) {
16
+ return a - b;
15
17
  }
16
- function fe(n, u) {
18
+ __name(asc, "asc");
19
+ function findClosest(values, currentValue) {
17
20
  const {
18
- index: s
19
- } = n.reduce((r, m, T) => {
20
- const b = Math.abs(u - m);
21
- return r === null || b < r.distance || b === r.distance ? {
22
- distance: b,
23
- index: T
24
- } : r;
21
+ index: closestIndex
22
+ } = values.reduce((acc, value, index) => {
23
+ const distance = Math.abs(currentValue - value);
24
+ if (acc === null || distance < acc.distance || distance === acc.distance) {
25
+ return {
26
+ distance,
27
+ index
28
+ };
29
+ }
30
+ return acc;
25
31
  }, null) ?? {};
26
- return s;
32
+ return closestIndex;
27
33
  }
28
- function B(n, u) {
29
- if (u.current !== void 0 && n.changedTouches) {
30
- const s = n;
31
- for (let r = 0; r < s.changedTouches.length; r += 1) {
32
- const m = s.changedTouches[r];
33
- if (m.identifier === u.current)
34
+ __name(findClosest, "findClosest");
35
+ function trackFinger(event, touchId) {
36
+ if (touchId.current !== void 0 && event.changedTouches) {
37
+ const touchEvent = event;
38
+ for (let i = 0; i < touchEvent.changedTouches.length; i += 1) {
39
+ const touch = touchEvent.changedTouches[i];
40
+ if (touch.identifier === touchId.current) {
34
41
  return {
35
- x: m.clientX,
36
- y: m.clientY
42
+ x: touch.clientX,
43
+ y: touch.clientY
37
44
  };
45
+ }
38
46
  }
39
- return !1;
47
+ return false;
40
48
  }
41
49
  return {
42
- x: n.clientX,
43
- y: n.clientY
50
+ x: event.clientX,
51
+ y: event.clientY
44
52
  };
45
53
  }
46
- function le(n, u, s) {
47
- return (n - u) * 100 / (s - u);
54
+ __name(trackFinger, "trackFinger");
55
+ function valueToPercent(value, min, max) {
56
+ return (value - min) * 100 / (max - min);
48
57
  }
49
- function Ve(n, u, s) {
50
- return (s - u) * n + u;
58
+ __name(valueToPercent, "valueToPercent");
59
+ function percentToValue(percent, min, max) {
60
+ return (max - min) * percent + min;
51
61
  }
52
- function Oe(n) {
53
- if (Math.abs(n) < 1) {
54
- const s = n.toExponential().split("e-"), r = s[0].split(".")[1];
55
- return (r ? r.length : 0) + parseInt(s[1], 10);
62
+ __name(percentToValue, "percentToValue");
63
+ function getDecimalPrecision(num) {
64
+ if (Math.abs(num) < 1) {
65
+ const parts = num.toExponential().split("e-");
66
+ const matissaDecimalPart = parts[0].split(".")[1];
67
+ return (matissaDecimalPart ? matissaDecimalPart.length : 0) + parseInt(parts[1], 10);
56
68
  }
57
- const u = n.toString().split(".")[1];
58
- return u ? u.length : 0;
69
+ const decimalPart = num.toString().split(".")[1];
70
+ return decimalPart ? decimalPart.length : 0;
59
71
  }
60
- function Pe(n, u, s) {
61
- const r = Math.round((n - s) / u) * u + s;
62
- return Number(r.toFixed(Oe(u)));
72
+ __name(getDecimalPrecision, "getDecimalPrecision");
73
+ function roundValueToStep(value, step, min) {
74
+ const nearest = Math.round((value - min) / step) * step + min;
75
+ return Number(nearest.toFixed(getDecimalPrecision(step)));
63
76
  }
64
- function de({
65
- values: n,
66
- newValue: u,
67
- index: s
77
+ __name(roundValueToStep, "roundValueToStep");
78
+ function setValueIndex({
79
+ values,
80
+ newValue,
81
+ index
68
82
  }) {
69
- const r = n.slice();
70
- return r[s] = u, r.sort(pe);
83
+ const output = values.slice();
84
+ output[index] = newValue;
85
+ return output.sort(asc);
71
86
  }
72
- function _({
73
- sliderRef: n,
74
- activeIndex: u,
75
- setActive: s
87
+ __name(setValueIndex, "setValueIndex");
88
+ function focusThumb({
89
+ sliderRef,
90
+ activeIndex,
91
+ setActive
76
92
  }) {
77
- var m, T, b;
78
- const r = U(n.current);
79
- (!((m = n.current) != null && m.contains(r.activeElement)) || Number((T = r == null ? void 0 : r.activeElement) == null ? void 0 : T.getAttribute("data-index")) !== u) && ((b = n.current) == null || b.querySelector(`[type="range"][data-index="${u}"]`).focus()), s && s(u);
93
+ var _a, _b, _c;
94
+ const doc = ownerDocument(sliderRef.current);
95
+ if (!((_a = sliderRef.current) == null ? void 0 : _a.contains(doc.activeElement)) || Number((_b = doc == null ? void 0 : doc.activeElement) == null ? void 0 : _b.getAttribute("data-index")) !== activeIndex) {
96
+ (_c = sliderRef.current) == null ? void 0 : _c.querySelector(`[type="range"][data-index="${activeIndex}"]`).focus();
97
+ }
98
+ if (setActive) {
99
+ setActive(activeIndex);
100
+ }
80
101
  }
81
- function j(n, u) {
82
- return typeof n == "number" && typeof u == "number" ? n === u : typeof n == "object" && typeof u == "object" ? Ne(n, u) : !1;
102
+ __name(focusThumb, "focusThumb");
103
+ function areValuesEqual(newValue, oldValue) {
104
+ if (typeof newValue === "number" && typeof oldValue === "number") {
105
+ return newValue === oldValue;
106
+ }
107
+ if (typeof newValue === "object" && typeof oldValue === "object") {
108
+ return areArraysEqual(newValue, oldValue);
109
+ }
110
+ return false;
83
111
  }
84
- const Fe = {
112
+ __name(areValuesEqual, "areValuesEqual");
113
+ const axisProps = {
85
114
  horizontal: {
86
- offset: (n) => ({
87
- left: `${n}%`
88
- }),
89
- leap: (n) => ({
90
- width: `${n}%`
91
- })
115
+ offset: /* @__PURE__ */ __name((percent) => ({
116
+ left: `${percent}%`
117
+ }), "offset"),
118
+ leap: /* @__PURE__ */ __name((percent) => ({
119
+ width: `${percent}%`
120
+ }), "leap")
92
121
  },
93
122
  "horizontal-reverse": {
94
- offset: (n) => ({
95
- right: `${n}%`
96
- }),
97
- leap: (n) => ({
98
- width: `${n}%`
99
- })
123
+ offset: /* @__PURE__ */ __name((percent) => ({
124
+ right: `${percent}%`
125
+ }), "offset"),
126
+ leap: /* @__PURE__ */ __name((percent) => ({
127
+ width: `${percent}%`
128
+ }), "leap")
100
129
  },
101
130
  vertical: {
102
- offset: (n) => ({
103
- bottom: `${n}%`
104
- }),
105
- leap: (n) => ({
106
- height: `${n}%`
107
- })
131
+ offset: /* @__PURE__ */ __name((percent) => ({
132
+ bottom: `${percent}%`
133
+ }), "offset"),
134
+ leap: /* @__PURE__ */ __name((percent) => ({
135
+ height: `${percent}%`
136
+ }), "leap")
108
137
  }
109
- }, $e = (n) => n;
110
- let q;
111
- function me() {
112
- return q === void 0 && (typeof CSS < "u" && typeof CSS.supports == "function" ? q = CSS.supports("touch-action", "none") : q = !0), q;
138
+ };
139
+ const Identity = /* @__PURE__ */ __name((x) => x, "Identity");
140
+ let cachedSupportsTouchActionNone;
141
+ function doesSupportTouchActionNone() {
142
+ if (cachedSupportsTouchActionNone === void 0) {
143
+ if (typeof CSS !== "undefined" && typeof CSS.supports === "function") {
144
+ cachedSupportsTouchActionNone = CSS.supports("touch-action", "none");
145
+ } else {
146
+ cachedSupportsTouchActionNone = true;
147
+ }
148
+ }
149
+ return cachedSupportsTouchActionNone;
113
150
  }
114
- function Ze(n) {
151
+ __name(doesSupportTouchActionNone, "doesSupportTouchActionNone");
152
+ function useSlider(parameters) {
115
153
  const {
116
- "aria-labelledby": u,
117
- defaultValue: s,
118
- disabled: r = !1,
119
- disableSwap: m = !1,
120
- isRtl: T = !1,
121
- marks: b = !1,
122
- max: y = 100,
123
- min: d = 0,
124
- name: Z,
125
- onChange: H,
126
- onChangeCommitted: V,
127
- orientation: X = "horizontal",
128
- rootRef: ge,
129
- scale: ee = $e,
130
- step: I = 1,
131
- shiftStep: te = 10,
132
- tabIndex: be,
133
- value: ye
134
- } = n, k = g.useRef(void 0), [O, A] = g.useState(-1), [xe, D] = g.useState(-1), [ne, oe] = g.useState(!1), P = g.useRef(0), [S, F] = Ae({
135
- controlled: ye,
136
- default: s ?? d,
154
+ "aria-labelledby": ariaLabelledby,
155
+ defaultValue,
156
+ disabled = false,
157
+ disableSwap = false,
158
+ isRtl = false,
159
+ marks: marksProp = false,
160
+ max = 100,
161
+ min = 0,
162
+ name,
163
+ onChange,
164
+ onChangeCommitted,
165
+ orientation = "horizontal",
166
+ rootRef: ref,
167
+ scale = Identity,
168
+ step = 1,
169
+ shiftStep = 10,
170
+ tabIndex,
171
+ value: valueProp
172
+ } = parameters;
173
+ const touchId = React.useRef(void 0);
174
+ const [active, setActive] = React.useState(-1);
175
+ const [open, setOpen] = React.useState(-1);
176
+ const [dragging, setDragging] = React.useState(false);
177
+ const moveCount = React.useRef(0);
178
+ const [valueDerived, setValueState] = useControlled({
179
+ controlled: valueProp,
180
+ default: defaultValue ?? min,
137
181
  name: "Slider"
138
- }), v = H && ((e, t, o) => {
139
- const c = e.nativeEvent || e, a = new c.constructor(c.type, c);
140
- Object.defineProperty(a, "target", {
141
- writable: !0,
182
+ });
183
+ const handleChange = onChange && ((event, value, thumbIndex) => {
184
+ const nativeEvent = event.nativeEvent || event;
185
+ const clonedEvent = new nativeEvent.constructor(nativeEvent.type, nativeEvent);
186
+ Object.defineProperty(clonedEvent, "target", {
187
+ writable: true,
142
188
  value: {
143
- value: t,
144
- name: Z
189
+ value,
190
+ name
191
+ }
192
+ });
193
+ onChange(clonedEvent, value, thumbIndex);
194
+ });
195
+ const range = Array.isArray(valueDerived);
196
+ let values = range ? valueDerived.slice().sort(asc) : [valueDerived];
197
+ values = values.map((value) => value == null ? min : clamp(value, min, max));
198
+ const marks = marksProp === true && step !== null ? [...Array(Math.floor((max - min) / step) + 1)].map((_, index) => ({
199
+ value: min + step * index
200
+ })) : marksProp || [];
201
+ const marksValues = marks.map((mark) => mark.value);
202
+ const [focusedThumbIndex, setFocusedThumbIndex] = React.useState(-1);
203
+ const sliderRef = React.useRef(null);
204
+ const handleRef = useForkRef(ref, sliderRef);
205
+ const createHandleHiddenInputFocus = /* @__PURE__ */ __name((otherHandlers) => (event) => {
206
+ var _a;
207
+ const index = Number(event.currentTarget.getAttribute("data-index"));
208
+ if (isFocusVisible(event.target)) {
209
+ setFocusedThumbIndex(index);
210
+ }
211
+ setOpen(index);
212
+ (_a = otherHandlers == null ? void 0 : otherHandlers.onFocus) == null ? void 0 : _a.call(otherHandlers, event);
213
+ }, "createHandleHiddenInputFocus");
214
+ const createHandleHiddenInputBlur = /* @__PURE__ */ __name((otherHandlers) => (event) => {
215
+ var _a;
216
+ if (!isFocusVisible(event.target)) {
217
+ setFocusedThumbIndex(-1);
218
+ }
219
+ setOpen(-1);
220
+ (_a = otherHandlers == null ? void 0 : otherHandlers.onBlur) == null ? void 0 : _a.call(otherHandlers, event);
221
+ }, "createHandleHiddenInputBlur");
222
+ const changeValue = /* @__PURE__ */ __name((event, valueInput) => {
223
+ const index = Number(event.currentTarget.getAttribute("data-index"));
224
+ const value = values[index];
225
+ const marksIndex = marksValues.indexOf(value);
226
+ let newValue = valueInput;
227
+ if (marks && step == null) {
228
+ const maxMarksValue = marksValues[marksValues.length - 1];
229
+ if (newValue > maxMarksValue) {
230
+ newValue = maxMarksValue;
231
+ } else if (newValue < marksValues[0]) {
232
+ newValue = marksValues[0];
233
+ } else {
234
+ newValue = newValue < value ? marksValues[marksIndex - 1] : marksValues[marksIndex + 1];
145
235
  }
146
- }), H(a, t, o);
147
- }), C = Array.isArray(S);
148
- let f = C ? S.slice().sort(pe) : [S];
149
- f = f.map((e) => e == null ? d : R(e, d, y));
150
- const Y = b === !0 && I !== null ? [...Array(Math.floor((y - d) / I) + 1)].map((e, t) => ({
151
- value: d + I * t
152
- })) : b || [], x = Y.map((e) => e.value), [ue, $] = g.useState(-1), p = g.useRef(null), ie = De(ge, p), he = (e) => (t) => {
153
- var c;
154
- const o = Number(t.currentTarget.getAttribute("data-index"));
155
- ae(t.target) && $(o), D(o), (c = e == null ? void 0 : e.onFocus) == null || c.call(e, t);
156
- }, ve = (e) => (t) => {
157
- var o;
158
- ae(t.target) || $(-1), D(-1), (o = e == null ? void 0 : e.onBlur) == null || o.call(e, t);
159
- }, re = (e, t) => {
160
- const o = Number(e.currentTarget.getAttribute("data-index")), c = f[o], a = x.indexOf(c);
161
- let i = t;
162
- if (Y && I == null) {
163
- const h = x[x.length - 1];
164
- i > h ? i = h : i < x[0] ? i = x[0] : i = i < c ? x[a - 1] : x[a + 1];
165
236
  }
166
- if (i = R(i, d, y), C) {
167
- m && (i = R(i, f[o - 1] || -1 / 0, f[o + 1] || 1 / 0));
168
- const h = i;
169
- i = de({
170
- values: f,
171
- newValue: i,
172
- index: o
237
+ newValue = clamp(newValue, min, max);
238
+ if (range) {
239
+ if (disableSwap) {
240
+ newValue = clamp(newValue, values[index - 1] || -Infinity, values[index + 1] || Infinity);
241
+ }
242
+ const previousValue = newValue;
243
+ newValue = setValueIndex({
244
+ values,
245
+ newValue,
246
+ index
173
247
  });
174
- let w = o;
175
- m || (w = i.indexOf(h)), _({
176
- sliderRef: p,
177
- activeIndex: w
248
+ let activeIndex = index;
249
+ if (!disableSwap) {
250
+ activeIndex = newValue.indexOf(previousValue);
251
+ }
252
+ focusThumb({
253
+ sliderRef,
254
+ activeIndex
178
255
  });
179
256
  }
180
- F(i), $(o), v && !j(i, S) && v(e, i, o), V && V(e, i);
181
- }, we = (e) => (t) => {
182
- var o;
183
- if (I !== null) {
184
- const c = Number(t.currentTarget.getAttribute("data-index")), a = f[c];
185
- let i = null;
186
- (t.key === "ArrowLeft" || t.key === "ArrowDown") && t.shiftKey || t.key === "PageDown" ? i = Math.max(a - te, d) : ((t.key === "ArrowRight" || t.key === "ArrowUp") && t.shiftKey || t.key === "PageUp") && (i = Math.min(a + te, y)), i !== null && (re(t, i), t.preventDefault());
257
+ setValueState(newValue);
258
+ setFocusedThumbIndex(index);
259
+ if (handleChange && !areValuesEqual(newValue, valueDerived)) {
260
+ handleChange(event, newValue, index);
187
261
  }
188
- (o = e == null ? void 0 : e.onKeyDown) == null || o.call(e, t);
189
- };
190
- Ce(() => {
191
- var e;
192
- r && p.current.contains(document.activeElement) && ((e = document.activeElement) == null || e.blur());
193
- }, [r]), r && O !== -1 && A(-1), r && ue !== -1 && $(-1);
194
- const Ee = (e) => (t) => {
195
- var o;
196
- (o = e.onChange) == null || o.call(e, t), re(t, t.target.valueAsNumber);
197
- }, ce = g.useRef(void 0);
198
- let K = X;
199
- T && X === "horizontal" && (K += "-reverse");
200
- const z = ({
201
- finger: e,
202
- move: t = !1
262
+ if (onChangeCommitted) {
263
+ onChangeCommitted(event, newValue);
264
+ }
265
+ }, "changeValue");
266
+ const createHandleHiddenInputKeyDown = /* @__PURE__ */ __name((otherHandlers) => (event) => {
267
+ var _a;
268
+ if (step !== null) {
269
+ const index = Number(event.currentTarget.getAttribute("data-index"));
270
+ const value = values[index];
271
+ let newValue = null;
272
+ if ((event.key === "ArrowLeft" || event.key === "ArrowDown") && event.shiftKey || event.key === "PageDown") {
273
+ newValue = Math.max(value - shiftStep, min);
274
+ } else if ((event.key === "ArrowRight" || event.key === "ArrowUp") && event.shiftKey || event.key === "PageUp") {
275
+ newValue = Math.min(value + shiftStep, max);
276
+ }
277
+ if (newValue !== null) {
278
+ changeValue(event, newValue);
279
+ event.preventDefault();
280
+ }
281
+ }
282
+ (_a = otherHandlers == null ? void 0 : otherHandlers.onKeyDown) == null ? void 0 : _a.call(otherHandlers, event);
283
+ }, "createHandleHiddenInputKeyDown");
284
+ useEnhancedEffect(() => {
285
+ var _a;
286
+ if (disabled && sliderRef.current.contains(document.activeElement)) {
287
+ (_a = document.activeElement) == null ? void 0 : _a.blur();
288
+ }
289
+ }, [disabled]);
290
+ if (disabled && active !== -1) {
291
+ setActive(-1);
292
+ }
293
+ if (disabled && focusedThumbIndex !== -1) {
294
+ setFocusedThumbIndex(-1);
295
+ }
296
+ const createHandleHiddenInputChange = /* @__PURE__ */ __name((otherHandlers) => (event) => {
297
+ var _a;
298
+ (_a = otherHandlers.onChange) == null ? void 0 : _a.call(otherHandlers, event);
299
+ changeValue(event, event.target.valueAsNumber);
300
+ }, "createHandleHiddenInputChange");
301
+ const previousIndex = React.useRef(void 0);
302
+ let axis = orientation;
303
+ if (isRtl && orientation === "horizontal") {
304
+ axis += "-reverse";
305
+ }
306
+ const getFingerNewValue = /* @__PURE__ */ __name(({
307
+ finger,
308
+ move = false
203
309
  }) => {
204
310
  const {
205
- current: o
206
- } = p, {
207
- width: c,
208
- height: a,
209
- bottom: i,
210
- left: h
211
- } = o.getBoundingClientRect();
212
- let w;
213
- K.startsWith("vertical") ? w = (i - e.y) / a : w = (e.x - h) / c, K.indexOf("-reverse") !== -1 && (w = 1 - w);
214
- let l;
215
- if (l = Ve(w, d, y), I)
216
- l = Pe(l, I, d);
217
- else {
218
- const W = fe(x, l);
219
- l = x[W];
311
+ current: slider
312
+ } = sliderRef;
313
+ const {
314
+ width,
315
+ height,
316
+ bottom,
317
+ left
318
+ } = slider.getBoundingClientRect();
319
+ let percent;
320
+ if (axis.startsWith("vertical")) {
321
+ percent = (bottom - finger.y) / height;
322
+ } else {
323
+ percent = (finger.x - left) / width;
220
324
  }
221
- l = R(l, d, y);
222
- let E = 0;
223
- if (C) {
224
- t ? E = ce.current : E = fe(f, l), m && (l = R(l, f[E - 1] || -1 / 0, f[E + 1] || 1 / 0));
225
- const W = l;
226
- l = de({
227
- values: f,
228
- newValue: l,
229
- index: E
230
- }), m && t || (E = l.indexOf(W), ce.current = E);
325
+ if (axis.indexOf("-reverse") !== -1) {
326
+ percent = 1 - percent;
327
+ }
328
+ let newValue;
329
+ newValue = percentToValue(percent, min, max);
330
+ if (step) {
331
+ newValue = roundValueToStep(newValue, step, min);
332
+ } else {
333
+ const closestIndex = findClosest(marksValues, newValue);
334
+ newValue = marksValues[closestIndex];
335
+ }
336
+ newValue = clamp(newValue, min, max);
337
+ let activeIndex = 0;
338
+ if (range) {
339
+ if (!move) {
340
+ activeIndex = findClosest(values, newValue);
341
+ } else {
342
+ activeIndex = previousIndex.current;
343
+ }
344
+ if (disableSwap) {
345
+ newValue = clamp(newValue, values[activeIndex - 1] || -Infinity, values[activeIndex + 1] || Infinity);
346
+ }
347
+ const previousValue = newValue;
348
+ newValue = setValueIndex({
349
+ values,
350
+ newValue,
351
+ index: activeIndex
352
+ });
353
+ if (!(disableSwap && move)) {
354
+ activeIndex = newValue.indexOf(previousValue);
355
+ previousIndex.current = activeIndex;
356
+ }
231
357
  }
232
358
  return {
233
- newValue: l,
234
- activeIndex: E
359
+ newValue,
360
+ activeIndex
235
361
  };
236
- }, M = J((e) => {
237
- const t = B(e, k);
238
- if (!t)
362
+ }, "getFingerNewValue");
363
+ const handleTouchMove = useEventCallback((nativeEvent) => {
364
+ const finger = trackFinger(nativeEvent, touchId);
365
+ if (!finger) {
239
366
  return;
240
- if (P.current += 1, e.type === "mousemove" && e.buttons === 0) {
241
- L(e);
367
+ }
368
+ moveCount.current += 1;
369
+ if (nativeEvent.type === "mousemove" && nativeEvent.buttons === 0) {
370
+ handleTouchEnd(nativeEvent);
242
371
  return;
243
372
  }
244
373
  const {
245
- newValue: o,
246
- activeIndex: c
247
- } = z({
248
- finger: t,
249
- move: !0
374
+ newValue,
375
+ activeIndex
376
+ } = getFingerNewValue({
377
+ finger,
378
+ move: true
250
379
  });
251
- _({
252
- sliderRef: p,
253
- activeIndex: c,
254
- setActive: A
255
- }), F(o), !ne && P.current > Re && oe(!0), v && !j(o, S) && v(e, o, c);
256
- }), L = J((e) => {
257
- const t = B(e, k);
258
- if (oe(!1), !t)
380
+ focusThumb({
381
+ sliderRef,
382
+ activeIndex,
383
+ setActive
384
+ });
385
+ setValueState(newValue);
386
+ if (!dragging && moveCount.current > INTENTIONAL_DRAG_COUNT_THRESHOLD) {
387
+ setDragging(true);
388
+ }
389
+ if (handleChange && !areValuesEqual(newValue, valueDerived)) {
390
+ handleChange(nativeEvent, newValue, activeIndex);
391
+ }
392
+ });
393
+ const handleTouchEnd = useEventCallback((nativeEvent) => {
394
+ const finger = trackFinger(nativeEvent, touchId);
395
+ setDragging(false);
396
+ if (!finger) {
259
397
  return;
398
+ }
260
399
  const {
261
- newValue: o
262
- } = z({
263
- finger: t,
264
- move: !0
400
+ newValue
401
+ } = getFingerNewValue({
402
+ finger,
403
+ move: true
265
404
  });
266
- A(-1), e.type === "touchend" && D(-1), V && V(e, o), k.current = void 0, N();
267
- }), G = J((e) => {
268
- if (r)
405
+ setActive(-1);
406
+ if (nativeEvent.type === "touchend") {
407
+ setOpen(-1);
408
+ }
409
+ if (onChangeCommitted) {
410
+ onChangeCommitted(nativeEvent, newValue);
411
+ }
412
+ touchId.current = void 0;
413
+ stopListening();
414
+ });
415
+ const handleTouchStart = useEventCallback((nativeEvent) => {
416
+ if (disabled) {
269
417
  return;
270
- me() || e.preventDefault();
271
- const t = e.changedTouches[0];
272
- t != null && (k.current = t.identifier);
273
- const o = B(e, k);
274
- if (o !== !1) {
418
+ }
419
+ if (!doesSupportTouchActionNone()) {
420
+ nativeEvent.preventDefault();
421
+ }
422
+ const touch = nativeEvent.changedTouches[0];
423
+ if (touch != null) {
424
+ touchId.current = touch.identifier;
425
+ }
426
+ const finger = trackFinger(nativeEvent, touchId);
427
+ if (finger !== false) {
275
428
  const {
276
- newValue: a,
277
- activeIndex: i
278
- } = z({
279
- finger: o
429
+ newValue,
430
+ activeIndex
431
+ } = getFingerNewValue({
432
+ finger
280
433
  });
281
- _({
282
- sliderRef: p,
283
- activeIndex: i,
284
- setActive: A
285
- }), F(a), v && !j(a, S) && v(e, a, i);
434
+ focusThumb({
435
+ sliderRef,
436
+ activeIndex,
437
+ setActive
438
+ });
439
+ setValueState(newValue);
440
+ if (handleChange && !areValuesEqual(newValue, valueDerived)) {
441
+ handleChange(nativeEvent, newValue, activeIndex);
442
+ }
286
443
  }
287
- P.current = 0;
288
- const c = U(p.current);
289
- c.addEventListener("touchmove", M, {
290
- passive: !0
291
- }), c.addEventListener("touchend", L, {
292
- passive: !0
444
+ moveCount.current = 0;
445
+ const doc = ownerDocument(sliderRef.current);
446
+ doc.addEventListener("touchmove", handleTouchMove, {
447
+ passive: true
448
+ });
449
+ doc.addEventListener("touchend", handleTouchEnd, {
450
+ passive: true
293
451
  });
294
- }), N = g.useCallback(() => {
295
- const e = U(p.current);
296
- e.removeEventListener("mousemove", M), e.removeEventListener("mouseup", L), e.removeEventListener("touchmove", M), e.removeEventListener("touchend", L);
297
- }, [L, M]);
298
- g.useEffect(() => {
452
+ });
453
+ const stopListening = React.useCallback(() => {
454
+ const doc = ownerDocument(sliderRef.current);
455
+ doc.removeEventListener("mousemove", handleTouchMove);
456
+ doc.removeEventListener("mouseup", handleTouchEnd);
457
+ doc.removeEventListener("touchmove", handleTouchMove);
458
+ doc.removeEventListener("touchend", handleTouchEnd);
459
+ }, [handleTouchEnd, handleTouchMove]);
460
+ React.useEffect(() => {
299
461
  const {
300
- current: e
301
- } = p;
302
- return e.addEventListener("touchstart", G, {
303
- passive: me()
304
- }), () => {
305
- e.removeEventListener("touchstart", G), N();
462
+ current: slider
463
+ } = sliderRef;
464
+ slider.addEventListener("touchstart", handleTouchStart, {
465
+ passive: doesSupportTouchActionNone()
466
+ });
467
+ return () => {
468
+ slider.removeEventListener("touchstart", handleTouchStart);
469
+ stopListening();
306
470
  };
307
- }, [N, G]), g.useEffect(() => {
308
- r && N();
309
- }, [r, N]);
310
- const Te = (e) => (t) => {
311
- var a;
312
- if ((a = e.onMouseDown) == null || a.call(e, t), r || t.defaultPrevented || t.button !== 0)
471
+ }, [stopListening, handleTouchStart]);
472
+ React.useEffect(() => {
473
+ if (disabled) {
474
+ stopListening();
475
+ }
476
+ }, [disabled, stopListening]);
477
+ const createHandleMouseDown = /* @__PURE__ */ __name((otherHandlers) => (event) => {
478
+ var _a;
479
+ (_a = otherHandlers.onMouseDown) == null ? void 0 : _a.call(otherHandlers, event);
480
+ if (disabled) {
313
481
  return;
314
- t.preventDefault();
315
- const o = B(t, k);
316
- if (o !== !1) {
482
+ }
483
+ if (event.defaultPrevented) {
484
+ return;
485
+ }
486
+ if (event.button !== 0) {
487
+ return;
488
+ }
489
+ event.preventDefault();
490
+ const finger = trackFinger(event, touchId);
491
+ if (finger !== false) {
317
492
  const {
318
- newValue: i,
319
- activeIndex: h
320
- } = z({
321
- finger: o
493
+ newValue,
494
+ activeIndex
495
+ } = getFingerNewValue({
496
+ finger
322
497
  });
323
- _({
324
- sliderRef: p,
325
- activeIndex: h,
326
- setActive: A
327
- }), F(i), v && !j(i, S) && v(t, i, h);
498
+ focusThumb({
499
+ sliderRef,
500
+ activeIndex,
501
+ setActive
502
+ });
503
+ setValueState(newValue);
504
+ if (handleChange && !areValuesEqual(newValue, valueDerived)) {
505
+ handleChange(event, newValue, activeIndex);
506
+ }
328
507
  }
329
- P.current = 0;
330
- const c = U(p.current);
331
- c.addEventListener("mousemove", M, {
332
- passive: !0
333
- }), c.addEventListener("mouseup", L);
334
- }, se = le(C ? f[0] : d, d, y), Ie = le(f[f.length - 1], d, y) - se, Se = (e = {}) => {
335
- const t = Q(e), o = {
336
- onMouseDown: Te(t || {})
337
- }, c = {
338
- ...t,
339
- ...o
508
+ moveCount.current = 0;
509
+ const doc = ownerDocument(sliderRef.current);
510
+ doc.addEventListener("mousemove", handleTouchMove, {
511
+ passive: true
512
+ });
513
+ doc.addEventListener("mouseup", handleTouchEnd);
514
+ }, "createHandleMouseDown");
515
+ const trackOffset = valueToPercent(range ? values[0] : min, min, max);
516
+ const trackLeap = valueToPercent(values[values.length - 1], min, max) - trackOffset;
517
+ const getRootProps = /* @__PURE__ */ __name((externalProps = {}) => {
518
+ const externalHandlers = extractEventHandlers(externalProps);
519
+ const ownEventHandlers = {
520
+ onMouseDown: createHandleMouseDown(externalHandlers || {})
521
+ };
522
+ const mergedEventHandlers = {
523
+ ...externalHandlers,
524
+ ...ownEventHandlers
340
525
  };
341
526
  return {
342
- ...e,
343
- ref: ie,
344
- ...c
527
+ ...externalProps,
528
+ ref: handleRef,
529
+ ...mergedEventHandlers
345
530
  };
346
- }, ke = (e) => (t) => {
347
- var c;
348
- (c = e.onMouseOver) == null || c.call(e, t);
349
- const o = Number(t.currentTarget.getAttribute("data-index"));
350
- D(o);
351
- }, Le = (e) => (t) => {
352
- var o;
353
- (o = e.onMouseLeave) == null || o.call(e, t), D(-1);
354
- };
355
- return {
356
- active: O,
357
- axis: K,
358
- axisProps: Fe,
359
- dragging: ne,
360
- focusedThumbIndex: ue,
361
- getHiddenInputProps: (e = {}) => {
362
- const t = Q(e), o = {
363
- onChange: Ee(t || {}),
364
- onFocus: he(t || {}),
365
- onBlur: ve(t || {}),
366
- onKeyDown: we(t || {})
367
- }, c = {
368
- ...t,
369
- ...o
370
- };
371
- return {
372
- tabIndex: be,
373
- "aria-labelledby": u,
374
- "aria-orientation": X,
375
- "aria-valuemax": ee(y),
376
- "aria-valuemin": ee(d),
377
- name: Z,
378
- type: "range",
379
- min: n.min,
380
- max: n.max,
381
- step: n.step === null && n.marks ? "any" : n.step ?? void 0,
382
- disabled: r,
383
- ...e,
384
- ...c,
385
- style: {
386
- ...Me,
387
- direction: T ? "rtl" : "ltr",
388
- // So that VoiceOver's focus indicator matches the thumb's dimensions
389
- width: "100%",
390
- height: "100%"
391
- }
392
- };
393
- },
394
- getRootProps: Se,
395
- getThumbProps: (e = {}) => {
396
- const t = Q(e), o = {
397
- onMouseOver: ke(t || {}),
398
- onMouseLeave: Le(t || {})
399
- };
400
- return {
401
- ...e,
402
- ...t,
403
- ...o
404
- };
405
- },
406
- marks: Y,
407
- open: xe,
408
- range: C,
409
- rootRef: ie,
410
- trackLeap: Ie,
411
- trackOffset: se,
412
- values: f,
413
- getThumbStyle: (e) => ({
531
+ }, "getRootProps");
532
+ const createHandleMouseOver = /* @__PURE__ */ __name((otherHandlers) => (event) => {
533
+ var _a;
534
+ (_a = otherHandlers.onMouseOver) == null ? void 0 : _a.call(otherHandlers, event);
535
+ const index = Number(event.currentTarget.getAttribute("data-index"));
536
+ setOpen(index);
537
+ }, "createHandleMouseOver");
538
+ const createHandleMouseLeave = /* @__PURE__ */ __name((otherHandlers) => (event) => {
539
+ var _a;
540
+ (_a = otherHandlers.onMouseLeave) == null ? void 0 : _a.call(otherHandlers, event);
541
+ setOpen(-1);
542
+ }, "createHandleMouseLeave");
543
+ const getThumbProps = /* @__PURE__ */ __name((externalProps = {}) => {
544
+ const externalHandlers = extractEventHandlers(externalProps);
545
+ const ownEventHandlers = {
546
+ onMouseOver: createHandleMouseOver(externalHandlers || {}),
547
+ onMouseLeave: createHandleMouseLeave(externalHandlers || {})
548
+ };
549
+ return {
550
+ ...externalProps,
551
+ ...externalHandlers,
552
+ ...ownEventHandlers
553
+ };
554
+ }, "getThumbProps");
555
+ const getThumbStyle = /* @__PURE__ */ __name((index) => {
556
+ return {
414
557
  // So the non active thumb doesn't show its label on hover.
415
- pointerEvents: O !== -1 && O !== e ? "none" : void 0
416
- })
558
+ pointerEvents: active !== -1 && active !== index ? "none" : void 0
559
+ };
560
+ }, "getThumbStyle");
561
+ const getHiddenInputProps = /* @__PURE__ */ __name((externalProps = {}) => {
562
+ const externalHandlers = extractEventHandlers(externalProps);
563
+ const ownEventHandlers = {
564
+ onChange: createHandleHiddenInputChange(externalHandlers || {}),
565
+ onFocus: createHandleHiddenInputFocus(externalHandlers || {}),
566
+ onBlur: createHandleHiddenInputBlur(externalHandlers || {}),
567
+ onKeyDown: createHandleHiddenInputKeyDown(externalHandlers || {})
568
+ };
569
+ const mergedEventHandlers = {
570
+ ...externalHandlers,
571
+ ...ownEventHandlers
572
+ };
573
+ return {
574
+ tabIndex,
575
+ "aria-labelledby": ariaLabelledby,
576
+ "aria-orientation": orientation,
577
+ "aria-valuemax": scale(max),
578
+ "aria-valuemin": scale(min),
579
+ name,
580
+ type: "range",
581
+ min: parameters.min,
582
+ max: parameters.max,
583
+ step: parameters.step === null && parameters.marks ? "any" : parameters.step ?? void 0,
584
+ disabled,
585
+ ...externalProps,
586
+ ...mergedEventHandlers,
587
+ style: {
588
+ ...visuallyHidden,
589
+ direction: isRtl ? "rtl" : "ltr",
590
+ // So that VoiceOver's focus indicator matches the thumb's dimensions
591
+ width: "100%",
592
+ height: "100%"
593
+ }
594
+ };
595
+ }, "getHiddenInputProps");
596
+ return {
597
+ active,
598
+ axis,
599
+ axisProps,
600
+ dragging,
601
+ focusedThumbIndex,
602
+ getHiddenInputProps,
603
+ getRootProps,
604
+ getThumbProps,
605
+ marks,
606
+ open,
607
+ range,
608
+ rootRef: handleRef,
609
+ trackLeap,
610
+ trackOffset,
611
+ values,
612
+ getThumbStyle
417
613
  };
418
614
  }
615
+ __name(useSlider, "useSlider");
419
616
  export {
420
- $e as Identity,
421
- Ze as useSlider,
422
- le as valueToPercent
617
+ Identity,
618
+ useSlider,
619
+ valueToPercent
423
620
  };