@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,232 +1,296 @@
1
- import { jsx as l, jsxs as J } from "react/jsx-runtime";
2
- import { useRef as b, useState as f, Children as le, useEffect as X, useCallback as v, useImperativeHandle as ne } from "react";
3
- import { create as ce } from "../../helpers/bem.js";
4
- import de from "./Carousel.module.scss.js";
5
- import { NEXT as N, PREV as R, handleTouchStart as oe, handleTouchMove as fe, handleTouchEnd as me, handleMouseUp as ue, handleMouseDown as be } from "./Carousel.services.js";
6
- import { Lottie as ve } from "../lottie/Lottie.js";
7
- import { Button as L } from "../button/Button.js";
8
- const a = ce(de, "Carousel"), Ie = ({
9
- ref: O,
10
- autoplay: m,
11
- enableControl: y,
12
- itemsToShow: r = 1,
13
- className: Q,
14
- classNameControls: W,
15
- classNameButtons: V,
16
- classNameWrapper: Y,
17
- classNameItem: Z,
18
- classNameDots: h,
19
- classNameDot: B,
20
- onKeyDown: x,
21
- onMouseEnter: I,
22
- onMouseLeave: p,
23
- onTouchEnd: C,
24
- onTouchMove: g,
25
- onTouchStart: k,
26
- onMouseDown: A,
27
- onMouseUp: _,
28
- children: K,
29
- ...U
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ import { useRef, useState, Children, useEffect, useCallback, useImperativeHandle } from "react";
5
+ import { create } from "../../helpers/bem.js";
6
+ import styles from "./Carousel.module.scss.js";
7
+ import { NEXT, PREV, handleTouchStart, handleTouchMove, handleTouchEnd, handleMouseUp, handleMouseDown } from "./Carousel.services.js";
8
+ import { Lottie } from "../lottie/Lottie.js";
9
+ import { Button } from "../button/Button.js";
10
+ const bem = create(styles, "Carousel");
11
+ const Carousel = /* @__PURE__ */ __name(({
12
+ ref,
13
+ autoplay,
14
+ enableControl,
15
+ itemsToShow = 1,
16
+ className,
17
+ classNameControls,
18
+ classNameButtons,
19
+ classNameWrapper,
20
+ classNameItem,
21
+ classNameDots,
22
+ classNameDot,
23
+ onKeyDown,
24
+ onMouseEnter,
25
+ onMouseLeave,
26
+ onTouchEnd,
27
+ onTouchMove,
28
+ onTouchStart,
29
+ onMouseDown,
30
+ onMouseUp,
31
+ children,
32
+ ...props
30
33
  }) => {
31
- const $ = b(null), E = b(0), j = b(0), z = b(0), w = b(0), [D, M] = f(!0), [c, d] = f(r), [T, H] = f(!1), [q, F] = f(!!m), [u, n] = f(!1), o = le.toArray(K), [G, S] = f([]), s = o.length;
32
- X(() => {
33
- const e = [
34
- ...o.slice(-r),
35
- ...o,
36
- ...o.slice(0, r)
34
+ const carouselContainerRef = useRef(null);
35
+ const touchStartX = useRef(0);
36
+ const touchEndX = useRef(0);
37
+ const mouseStartX = useRef(0);
38
+ const mouseEndX = useRef(0);
39
+ const [mobileTutorialVisible, setMobileTutorialVisible] = useState(true);
40
+ const [currentIndex, setCurrentIndex] = useState(itemsToShow);
41
+ const [mouseActive, setMouseActive] = useState(false);
42
+ const [isPlaying, setIsPlaying] = useState(Boolean(autoplay));
43
+ const [isTransitioning, setIsTransitioning] = useState(false);
44
+ const childrenArray = Children.toArray(children);
45
+ const [items, setItems] = useState([]);
46
+ const numItems = childrenArray.length;
47
+ useEffect(() => {
48
+ const newItems = [
49
+ ...childrenArray.slice(-itemsToShow),
50
+ ...childrenArray,
51
+ ...childrenArray.slice(0, itemsToShow)
37
52
  ];
38
- e !== G && (S(e), d(r));
39
- }, [r]), X(() => {
40
- const e = setTimeout(() => {
41
- M(!1);
53
+ if (newItems !== items) {
54
+ setItems(newItems);
55
+ setCurrentIndex(itemsToShow);
56
+ }
57
+ }, [itemsToShow]);
58
+ useEffect(() => {
59
+ const timeout = setTimeout(() => {
60
+ setMobileTutorialVisible(false);
42
61
  }, 1500);
43
- return () => clearTimeout(e);
62
+ return () => clearTimeout(timeout);
44
63
  }, []);
45
- const i = v(
46
- (e) => {
47
- if (u) return;
48
- n(!0);
49
- let t = c;
50
- e === N ? t = c + 1 : e === R && (t = c - 1), d(t), setTimeout(() => {
51
- t >= s + r ? (d(r), n(!1)) : (t < r && d(s), n(!1));
64
+ const slide = useCallback(
65
+ (direction) => {
66
+ if (isTransitioning) return;
67
+ setIsTransitioning(true);
68
+ let newIndex = currentIndex;
69
+ if (direction === NEXT) {
70
+ newIndex = currentIndex + 1;
71
+ } else if (direction === PREV) {
72
+ newIndex = currentIndex - 1;
73
+ }
74
+ setCurrentIndex(newIndex);
75
+ setTimeout(() => {
76
+ if (newIndex >= numItems + itemsToShow) {
77
+ setCurrentIndex(itemsToShow);
78
+ setIsTransitioning(false);
79
+ } else if (newIndex < itemsToShow) {
80
+ setCurrentIndex(numItems);
81
+ setIsTransitioning(false);
82
+ } else {
83
+ setIsTransitioning(false);
84
+ }
52
85
  }, 300);
53
86
  },
54
- [u, c, r, s]
87
+ [isTransitioning, currentIndex, itemsToShow, numItems]
55
88
  );
56
- X(() => {
57
- if (typeof m != "number" || m <= 0) return;
58
- let e;
59
- return q && (e = setInterval(() => {
60
- i(N);
61
- }, m)), () => {
62
- clearInterval(e);
89
+ useEffect(() => {
90
+ if (typeof autoplay !== "number" || autoplay <= 0) return;
91
+ let interval;
92
+ if (isPlaying) {
93
+ interval = setInterval(() => {
94
+ slide(NEXT);
95
+ }, autoplay);
96
+ }
97
+ return () => {
98
+ clearInterval(interval);
63
99
  };
64
- }, [i, q, m]);
65
- const P = v(
66
- (e) => {
67
- if (u) return;
68
- n(!0);
69
- const t = e + r;
70
- d(t), setTimeout(() => {
71
- t >= s + r ? (d(t - s), n(!1)) : (t < r && d(s + t), n(!1));
100
+ }, [slide, isPlaying, autoplay]);
101
+ const slideToIndex = useCallback(
102
+ (index) => {
103
+ if (isTransitioning) return;
104
+ setIsTransitioning(true);
105
+ const targetIndex = index + itemsToShow;
106
+ setCurrentIndex(targetIndex);
107
+ setTimeout(() => {
108
+ if (targetIndex >= numItems + itemsToShow) {
109
+ setCurrentIndex(targetIndex - numItems);
110
+ setIsTransitioning(false);
111
+ } else if (targetIndex < itemsToShow) {
112
+ setCurrentIndex(numItems + targetIndex);
113
+ setIsTransitioning(false);
114
+ } else {
115
+ setIsTransitioning(false);
116
+ }
72
117
  }, 300);
73
118
  },
74
- [u, r, s]
119
+ [isTransitioning, itemsToShow, numItems]
75
120
  );
76
- ne(O, () => ({
77
- slidePrev: () => i(R),
78
- slideNext: () => i(N),
79
- carouselContainer: $.current
121
+ useImperativeHandle(ref, () => ({
122
+ slidePrev: /* @__PURE__ */ __name(() => slide(PREV), "slidePrev"),
123
+ slideNext: /* @__PURE__ */ __name(() => slide(NEXT), "slideNext"),
124
+ carouselContainer: carouselContainerRef.current
80
125
  }));
81
- const ee = v(
126
+ const handleMouseEnter = useCallback(
82
127
  (e) => {
83
- I == null || I(e), F(!1);
128
+ onMouseEnter == null ? void 0 : onMouseEnter(e);
129
+ setIsPlaying(false);
84
130
  },
85
- [I]
86
- ), te = v(
131
+ [onMouseEnter]
132
+ );
133
+ const handleMouseLeave = useCallback(
87
134
  (e) => {
88
- p == null || p(e), F(!0);
135
+ onMouseLeave == null ? void 0 : onMouseLeave(e);
136
+ setIsPlaying(true);
89
137
  },
90
- [p]
91
- ), re = () => `translateX(${-c * (100 / r)}%)`, se = v(
92
- () => s > 0 && /* @__PURE__ */ l("span", { className: a("dots", void 0, h), children: o.map((e, t) => {
93
- const ie = t === (c - r + s) % s;
94
- return /* @__PURE__ */ l(
138
+ [onMouseLeave]
139
+ );
140
+ const getTransformValue = /* @__PURE__ */ __name(() => {
141
+ const offset = -currentIndex * (100 / itemsToShow);
142
+ return `translateX(${offset}%)`;
143
+ }, "getTransformValue");
144
+ const renderDots = useCallback(
145
+ () => numItems > 0 && /* @__PURE__ */ jsx("span", { className: bem("dots", void 0, classNameDots), children: childrenArray.map((_, i) => {
146
+ const isActive = i === (currentIndex - itemsToShow + numItems) % numItems;
147
+ return /* @__PURE__ */ jsx(
95
148
  "button",
96
149
  {
97
150
  tabIndex: 0,
98
- className: a(
151
+ className: bem(
99
152
  "dots__dot",
100
153
  {
101
- "is-active": ie
154
+ "is-active": isActive
102
155
  },
103
- B
156
+ classNameDot
104
157
  ),
105
- onClick: () => P(t),
106
- onKeyDown: (ae) => ae.key === "Enter" && P(t)
158
+ onClick: /* @__PURE__ */ __name(() => slideToIndex(i), "onClick"),
159
+ onKeyDown: /* @__PURE__ */ __name((e) => e.key === "Enter" && slideToIndex(i), "onKeyDown")
107
160
  },
108
- `carousel-dot-${t}`
161
+ `carousel-dot-${i}`
109
162
  );
110
163
  }) }),
111
164
  [
112
- s,
113
- o,
114
- c,
115
- h,
116
- B,
117
- r,
118
- P
165
+ numItems,
166
+ childrenArray,
167
+ currentIndex,
168
+ classNameDots,
169
+ classNameDot,
170
+ itemsToShow,
171
+ slideToIndex
119
172
  ]
120
173
  );
121
- return s === 0 ? null : /* @__PURE__ */ J(
174
+ if (numItems === 0) {
175
+ return null;
176
+ }
177
+ return /* @__PURE__ */ jsxs(
122
178
  "div",
123
179
  {
124
180
  "aria-label": "Carousel",
125
181
  role: "button",
126
182
  tabIndex: 0,
127
- ...U,
128
- ref: $,
129
- className: a(
183
+ ...props,
184
+ ref: carouselContainerRef,
185
+ className: bem(
130
186
  void 0,
131
187
  {
132
- "is-active": T
188
+ "is-active": mouseActive
133
189
  },
134
- Q
190
+ className
135
191
  ),
136
- onMouseEnter: ee,
137
- onMouseLeave: te,
138
- onKeyDown: (e) => {
139
- switch (x == null || x(e), e.key) {
192
+ onMouseEnter: handleMouseEnter,
193
+ onMouseLeave: handleMouseLeave,
194
+ onKeyDown: /* @__PURE__ */ __name((e) => {
195
+ onKeyDown == null ? void 0 : onKeyDown(e);
196
+ switch (e.key) {
140
197
  case "ArrowLeft":
141
- i("NEXT");
198
+ slide("NEXT");
142
199
  break;
143
200
  case "ArrowRight":
144
- i("PREV");
201
+ slide("PREV");
145
202
  break;
146
203
  }
147
- },
148
- onMouseDown: (e) => {
149
- A == null || A(e), be(e, z), H(!0);
150
- },
151
- onMouseUp: (e) => {
152
- _ == null || _(e), ue(e, z, w, i), H(!1);
153
- },
154
- onTouchEnd: (e) => {
155
- C == null || C(e), me(E, j, i);
156
- },
157
- onTouchMove: (e) => {
158
- g == null || g(e), fe(e, j);
159
- },
160
- onTouchStart: (e) => {
161
- k == null || k(e), oe(e, E);
162
- },
204
+ }, "onKeyDown"),
205
+ onMouseDown: /* @__PURE__ */ __name((e) => {
206
+ onMouseDown == null ? void 0 : onMouseDown(e);
207
+ handleMouseDown(e, mouseStartX);
208
+ setMouseActive(true);
209
+ }, "onMouseDown"),
210
+ onMouseUp: /* @__PURE__ */ __name((e) => {
211
+ onMouseUp == null ? void 0 : onMouseUp(e);
212
+ handleMouseUp(e, mouseStartX, mouseEndX, slide);
213
+ setMouseActive(false);
214
+ }, "onMouseUp"),
215
+ onTouchEnd: /* @__PURE__ */ __name((e) => {
216
+ onTouchEnd == null ? void 0 : onTouchEnd(e);
217
+ handleTouchEnd(touchStartX, touchEndX, slide);
218
+ }, "onTouchEnd"),
219
+ onTouchMove: /* @__PURE__ */ __name((e) => {
220
+ onTouchMove == null ? void 0 : onTouchMove(e);
221
+ handleTouchMove(e, touchEndX);
222
+ }, "onTouchMove"),
223
+ onTouchStart: /* @__PURE__ */ __name((e) => {
224
+ onTouchStart == null ? void 0 : onTouchStart(e);
225
+ handleTouchStart(e, touchStartX);
226
+ }, "onTouchStart"),
163
227
  children: [
164
- /* @__PURE__ */ l(
228
+ /* @__PURE__ */ jsx(
165
229
  "div",
166
230
  {
167
- className: a("wrapper", void 0, Y),
231
+ className: bem("wrapper", void 0, classNameWrapper),
168
232
  style: {
169
- transform: re(),
170
- transition: u ? "transform 0.3s ease-in-out" : "none"
233
+ transform: getTransformValue(),
234
+ transition: isTransitioning ? "transform 0.3s ease-in-out" : "none"
171
235
  },
172
- children: G.map((e, t) => /* @__PURE__ */ l(
236
+ children: items.map((child, i) => /* @__PURE__ */ jsx(
173
237
  "div",
174
238
  {
175
- className: a("item", void 0, Z),
239
+ className: bem("item", void 0, classNameItem),
176
240
  style: {
177
- width: `${100 / r}%`
241
+ width: `${100 / itemsToShow}%`
178
242
  },
179
- children: e
243
+ children: child
180
244
  },
181
- `carousel-item-${t}`
245
+ `carousel-item-${i}`
182
246
  ))
183
247
  }
184
248
  ),
185
- /* @__PURE__ */ l(
249
+ /* @__PURE__ */ jsx(
186
250
  "div",
187
251
  {
188
- className: a("mobile__tutorial", {
189
- "is-hidden": !D
252
+ className: bem("mobile__tutorial", {
253
+ "is-hidden": !Boolean(mobileTutorialVisible)
190
254
  }),
191
- children: /* @__PURE__ */ l("div", { className: a("mobile__tutorial__animation"), children: /* @__PURE__ */ l(ve, { animationName: "Swipe" }) })
255
+ children: /* @__PURE__ */ jsx("div", { className: bem("mobile__tutorial__animation"), children: /* @__PURE__ */ jsx(Lottie, { animationName: "Swipe" }) })
192
256
  }
193
257
  ),
194
- /* @__PURE__ */ J("footer", { className: a("controls", void 0, W), children: [
195
- !!y && /* @__PURE__ */ l(
196
- L,
258
+ /* @__PURE__ */ jsxs("footer", { className: bem("controls", void 0, classNameControls), children: [
259
+ Boolean(enableControl) && /* @__PURE__ */ jsx(
260
+ Button,
197
261
  {
198
262
  "aria-label": "Swipe one slide backwards",
199
- className: a("button", void 0, V),
263
+ className: bem("button", void 0, classNameButtons),
200
264
  variant: "outlined",
201
265
  iconProps: {
202
266
  name: "ArrowLeft01Icon",
203
267
  size: "md",
204
268
  color: "white"
205
269
  },
206
- onClick: () => i(R)
270
+ onClick: /* @__PURE__ */ __name(() => slide(PREV), "onClick")
207
271
  }
208
272
  ),
209
- se(),
210
- !!y && /* @__PURE__ */ l(
211
- L,
273
+ renderDots(),
274
+ Boolean(enableControl) && /* @__PURE__ */ jsx(
275
+ Button,
212
276
  {
213
277
  "aria-label": "Swipe one slide forwards",
214
- className: a("button", void 0, V),
278
+ className: bem("button", void 0, classNameButtons),
215
279
  variant: "outlined",
216
280
  iconProps: {
217
281
  name: "ArrowRight01Icon",
218
282
  size: "md",
219
283
  color: "white"
220
284
  },
221
- onClick: () => i(N)
285
+ onClick: /* @__PURE__ */ __name(() => slide(NEXT), "onClick")
222
286
  }
223
287
  )
224
288
  ] })
225
289
  ]
226
290
  }
227
291
  );
228
- };
229
- Ie.displayName = "Carousel";
292
+ }, "Carousel");
293
+ Carousel.displayName = "Carousel";
230
294
  export {
231
- Ie as Carousel
295
+ Carousel
232
296
  };
@@ -1,4 +1,6 @@
1
- const o = "gradientMove", r = "fadeInKeyframe", _ = {
1
+ const gradientMove = "gradientMove";
2
+ const fadeInKeyframe = "fadeInKeyframe";
3
+ const styles = {
2
4
  "prokodo-Carousel": "prokodo-Carousel",
3
5
  "prokodo-Carousel--is-active": "prokodo-Carousel--is-active",
4
6
  "prokodo-Carousel__wrapper": "prokodo-Carousel__wrapper",
@@ -11,11 +13,11 @@ const o = "gradientMove", r = "fadeInKeyframe", _ = {
11
13
  "prokodo-Carousel__dots": "prokodo-Carousel__dots",
12
14
  "prokodo-Carousel__dots__dot": "prokodo-Carousel__dots__dot",
13
15
  "prokodo-Carousel__dots__dot--is-active": "prokodo-Carousel__dots__dot--is-active",
14
- gradientMove: o,
15
- fadeInKeyframe: r
16
+ gradientMove,
17
+ fadeInKeyframe
16
18
  };
17
19
  export {
18
- _ as default,
19
- r as fadeInKeyframe,
20
- o as gradientMove
20
+ styles as default,
21
+ fadeInKeyframe,
22
+ gradientMove
21
23
  };
@@ -1,22 +1,41 @@
1
- const t = "NEXT", u = "PREV", o = (r, c) => {
2
- var n;
3
- c.current = ((n = r.targetTouches[0]) == null ? void 0 : n.clientX) ?? 0;
4
- }, T = (r, c) => {
5
- var n;
6
- c.current = ((n = r.targetTouches[0]) == null ? void 0 : n.clientX) ?? 0;
7
- }, h = (r, c, n) => {
8
- r.current - c.current > 50 && n("NEXT"), r.current - c.current < -50 && n("PREV");
9
- }, l = (r, c) => {
10
- c.current = r.clientX;
11
- }, a = (r, c, n, e) => {
12
- n.current = r.clientX, c.current - n.current > 50 && e("NEXT"), c.current - n.current < -50 && e("PREV");
13
- };
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+ const NEXT = "NEXT";
4
+ const PREV = "PREV";
5
+ const handleTouchStart = /* @__PURE__ */ __name((e, touchStartX) => {
6
+ var _a;
7
+ touchStartX.current = ((_a = e.targetTouches[0]) == null ? void 0 : _a.clientX) ?? 0;
8
+ }, "handleTouchStart");
9
+ const handleTouchMove = /* @__PURE__ */ __name((e, touchEndX) => {
10
+ var _a;
11
+ touchEndX.current = ((_a = e.targetTouches[0]) == null ? void 0 : _a.clientX) ?? 0;
12
+ }, "handleTouchMove");
13
+ const handleTouchEnd = /* @__PURE__ */ __name((touchStartX, touchEndX, slide) => {
14
+ if (touchStartX.current - touchEndX.current > 50) {
15
+ slide("NEXT");
16
+ }
17
+ if (touchStartX.current - touchEndX.current < -50) {
18
+ slide("PREV");
19
+ }
20
+ }, "handleTouchEnd");
21
+ const handleMouseDown = /* @__PURE__ */ __name((e, mouseStartX) => {
22
+ mouseStartX.current = e.clientX;
23
+ }, "handleMouseDown");
24
+ const handleMouseUp = /* @__PURE__ */ __name((e, mouseStartX, mouseEndX, slide) => {
25
+ mouseEndX.current = e.clientX;
26
+ if (mouseStartX.current - mouseEndX.current > 50) {
27
+ slide("NEXT");
28
+ }
29
+ if (mouseStartX.current - mouseEndX.current < -50) {
30
+ slide("PREV");
31
+ }
32
+ }, "handleMouseUp");
14
33
  export {
15
- t as NEXT,
16
- u as PREV,
17
- l as handleMouseDown,
18
- a as handleMouseUp,
19
- h as handleTouchEnd,
20
- T as handleTouchMove,
21
- o as handleTouchStart
34
+ NEXT,
35
+ PREV,
36
+ handleMouseDown,
37
+ handleMouseUp,
38
+ handleTouchEnd,
39
+ handleTouchMove,
40
+ handleTouchStart
22
41
  };
@@ -1,4 +1,4 @@
1
- import { Carousel as e } from "./Carousel.js";
1
+ import { Carousel } from "./Carousel.js";
2
2
  export {
3
- e as Carousel
3
+ Carousel
4
4
  };
@@ -1,51 +1,59 @@
1
- import { jsxs as f, jsx as d } from "react/jsx-runtime";
2
- import { memo as h, useCallback as u } from "react";
3
- import { create as v } from "../../helpers/bem.js";
4
- import n from "./Chip.module.scss.js";
5
- const s = v(n, "Chip"), x = h(
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+ import { jsxs, jsx } from "react/jsx-runtime";
4
+ import { memo, useCallback } from "react";
5
+ import { create } from "../../helpers/bem.js";
6
+ import styles from "./Chip.module.scss.js";
7
+ const bem = create(styles, "Chip");
8
+ const Chip = memo(
6
9
  ({
7
- label: i,
8
- icon: o,
9
- variant: l = "filled",
10
- color: m = "primary",
11
- className: c,
12
- onDelete: p,
13
- onClick: a,
14
- onKeyDown: e
10
+ label,
11
+ icon,
12
+ variant = "filled",
13
+ color = "primary",
14
+ className,
15
+ onDelete,
16
+ onClick,
17
+ onKeyDown
15
18
  }) => {
16
- const b = u(
17
- (t) => {
18
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), e == null || e(t));
19
+ const handleKeyDown = useCallback(
20
+ (e) => {
21
+ if (e.key === "Enter" || e.key === " ") {
22
+ e.preventDefault();
23
+ onKeyDown == null ? void 0 : onKeyDown(e);
24
+ }
19
25
  },
20
- [e]
21
- ), r = !!a;
26
+ [onKeyDown]
27
+ );
28
+ const isClickable = !!onClick;
22
29
  return (
23
30
  // eslint-disable-next-line jsx-a11y/no-static-element-interactions
24
- /* @__PURE__ */ f(
31
+ /* @__PURE__ */ jsxs(
25
32
  "div",
26
33
  {
27
- "aria-label": typeof i == "string" ? i : void 0,
28
- role: r ? "button" : void 0,
29
- tabIndex: r ? 0 : -1,
30
- className: s(
34
+ "aria-label": typeof label === "string" ? label : void 0,
35
+ role: isClickable ? "button" : void 0,
36
+ tabIndex: isClickable ? 0 : -1,
37
+ className: bem(
31
38
  void 0,
32
- { [l]: !!l, [m]: !!m },
33
- c
39
+ { [variant]: !!variant, [color]: !!color },
40
+ className
34
41
  ),
35
- onClick: (t) => r && (a == null ? void 0 : a(t)),
36
- onKeyDown: r || e ? b : void 0,
42
+ onClick: /* @__PURE__ */ __name((e) => isClickable && (onClick == null ? void 0 : onClick(e)), "onClick"),
43
+ onKeyDown: isClickable || onKeyDown ? handleKeyDown : void 0,
37
44
  children: [
38
- o,
39
- /* @__PURE__ */ d("span", { className: s("label"), children: i }),
40
- p && /* @__PURE__ */ d(
45
+ icon,
46
+ /* @__PURE__ */ jsx("span", { className: bem("label"), children: label }),
47
+ onDelete && /* @__PURE__ */ jsx(
41
48
  "button",
42
49
  {
43
50
  "aria-label": "delete",
44
- className: s("delete"),
51
+ className: bem("delete"),
45
52
  type: "button",
46
- onClick: (t) => {
47
- t.stopPropagation(), p(t);
48
- },
53
+ onClick: /* @__PURE__ */ __name((e) => {
54
+ e.stopPropagation();
55
+ onDelete(e);
56
+ }, "onClick"),
49
57
  children: "× "
50
58
  }
51
59
  )
@@ -55,7 +63,7 @@ const s = v(n, "Chip"), x = h(
55
63
  );
56
64
  }
57
65
  );
58
- x.displayName = "Chip";
66
+ Chip.displayName = "Chip";
59
67
  export {
60
- x as Chip
68
+ Chip
61
69
  };