@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,22 +1,36 @@
1
- const o = (a, e) => typeof e > "u" ? !1 : a.test(String(e)), h = (a, e, u, t) => {
2
- let d = Number(a);
3
- if (typeof a == "string" && isNaN(d) && (d = a.length), e !== void 0 && d < e)
4
- return `${(t == null ? void 0 : t.min) ?? "Value must be greater than or equal to"} ${e}.`;
5
- if (u !== void 0 && d > u)
6
- return `${(t == null ? void 0 : t.max) ?? "Value must be less than or equal to"} ${u}.`;
7
- }, A = (a, e, u, t, d, z, l, c, s) => {
8
- if (!s) return;
9
- const x = u == null || u === "";
10
- if (x && t)
11
- return s(
12
- e,
13
- (c == null ? void 0 : c.required) ?? "This field is required. Please fill it out."
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+ const isValidRegex = /* @__PURE__ */ __name((regex, value) => {
4
+ if (typeof value === "undefined") return false;
5
+ return regex.test(String(value));
6
+ }, "isValidRegex");
7
+ const handleValidationMinMax = /* @__PURE__ */ __name((value, min, max, errorTranslations) => {
8
+ let numericValue = Number(value);
9
+ if (typeof value === "string" && isNaN(numericValue)) {
10
+ numericValue = value.length;
11
+ }
12
+ if (min !== void 0 && numericValue < min) {
13
+ return `${(errorTranslations == null ? void 0 : errorTranslations.min) ?? "Value must be greater than or equal to"} ${min}.`;
14
+ }
15
+ if (max !== void 0 && numericValue > max) {
16
+ return `${(errorTranslations == null ? void 0 : errorTranslations.max) ?? "Value must be less than or equal to"} ${max}.`;
17
+ }
18
+ return;
19
+ }, "handleValidationMinMax");
20
+ const handleValidation = /* @__PURE__ */ __name((type, name, value, required, min, max, customRegexPattern, errorTranslations, onValidate) => {
21
+ if (!onValidate) return;
22
+ const valueIsEmpty = value === null || value === void 0 || value === "";
23
+ if (valueIsEmpty && Boolean(required)) {
24
+ return onValidate(
25
+ name,
26
+ (errorTranslations == null ? void 0 : errorTranslations.required) ?? "This field is required. Please fill it out."
14
27
  );
15
- if (x && (t === !1 || t === void 0))
16
- return s(e);
17
- const n = h(u, d, z, c);
18
- if (n !== void 0) return s(e, n);
19
- let i = {
28
+ }
29
+ if (valueIsEmpty && (required === false || required === void 0))
30
+ return onValidate(name);
31
+ const minMaxError = handleValidationMinMax(value, min, max, errorTranslations);
32
+ if (minMaxError !== void 0) return onValidate(name, minMaxError);
33
+ let regexPatterns = {
20
34
  text: /^[a-zA-Z\s,.!?'-]+$/,
21
35
  email: /^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x21\x23-\x5b\x5d-\x7e]|\\[\x21-\x7e])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z]{2,}|(?:\[(?:(?:2(?:5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(?:2(?:5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\x21-\x5a\x53-\x7e]|\\[\x21-\x7e])+)])$/i,
22
36
  tel: /^\+?[1-9]\d{1,14}$/,
@@ -25,17 +39,18 @@ const o = (a, e) => typeof e > "u" ? !1 : a.test(String(e)), h = (a, e, u, t) =>
25
39
  color: /^#([0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})$/,
26
40
  password: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[\W_]).{8,}$/
27
41
  };
28
- if (l !== void 0) {
29
- const f = l.match(/^\/(.*)\/([gimsuy]*)$/);
30
- if (f) {
31
- const [, m = "", p] = f, $ = new RegExp(m ?? "", p);
32
- i = {
33
- ...i,
34
- [String(a)]: RegExp($)
42
+ if (customRegexPattern !== void 0) {
43
+ const regexParts = customRegexPattern.match(/^\/(.*)\/([gimsuy]*)$/);
44
+ if (regexParts) {
45
+ const [, pattern = "", flags] = regexParts;
46
+ const customRegex = new RegExp(pattern ?? "", flags);
47
+ regexPatterns = {
48
+ ...regexPatterns,
49
+ [String(type)]: RegExp(customRegex)
35
50
  };
36
51
  }
37
52
  }
38
- const g = {
53
+ const errorMessages = {
39
54
  text: "Text can only include letters and common punctuation.",
40
55
  email: "Please enter a valid email address (e.g., name@example.com).",
41
56
  tel: "Please enter a valid phone number.",
@@ -43,10 +58,14 @@ const o = (a, e) => typeof e > "u" ? !1 : a.test(String(e)), h = (a, e, u, t) =>
43
58
  number: "Please enter a valid number.",
44
59
  color: "Please enter a valid color code (e.g., #FFFFFF).",
45
60
  password: "Password must be at least 8 characters long and include uppercase, lowercase, numbers, and special characters.",
46
- ...c
47
- }, w = i[a];
48
- return w && !o(w, u) ? s(e, g[a]) : s(e);
49
- };
61
+ ...errorTranslations
62
+ };
63
+ const regex = regexPatterns[type];
64
+ if (regex && !isValidRegex(regex, value)) {
65
+ return onValidate(name, errorMessages[type]);
66
+ }
67
+ return onValidate(name);
68
+ }, "handleValidation");
50
69
  export {
51
- A as handleValidation
70
+ handleValidation
52
71
  };
@@ -1,4 +1,4 @@
1
- import { Input as r } from "./Input.js";
1
+ import { Input } from "./Input.js";
2
2
  export {
3
- r as Input
3
+ Input
4
4
  };
@@ -1,71 +1,104 @@
1
- import { jsxs as P, jsx as y } from "react/jsx-runtime";
2
- import { memo as g, useState as j, useRef as k, createElement as v } from "react";
3
- import { create as I } from "../../helpers/bem.js";
4
- import { isArray as T } from "../../helpers/validations.js";
5
- import A from "./InputOTP.module.scss.js";
6
- import { Input as D } from "../input/Input.js";
7
- const n = I(A, "InputOTP"), _ = g(
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, useState, useRef, createElement } from "react";
5
+ import { create } from "../../helpers/bem.js";
6
+ import { isArray } from "../../helpers/validations.js";
7
+ import styles from "./InputOTP.module.scss.js";
8
+ import { Input } from "../input/Input.js";
9
+ const bem = create(styles, "InputOTP");
10
+ const InputOTP = memo(
8
11
  ({
9
- className: b,
10
- groupLabel: d,
11
- groupInstruction: h,
12
- length: i = 6,
13
- onComplete: u,
14
- onChange: l,
15
- ...f
12
+ className,
13
+ groupLabel,
14
+ groupInstruction,
15
+ length = 6,
16
+ onComplete,
17
+ onChange,
18
+ ...props
16
19
  }) => {
17
- const [c, m] = j(Array(i).fill("")), s = k([]), w = (r, t) => {
18
- var o;
19
- if (r.length > 1) return;
20
- const e = [...c];
21
- e[t] = r, m(e), l && l(e.join("")), r && t < i - 1 && ((o = s.current[t + 1]) == null || o.focus()), e.every((a) => a !== "") && u && u(e.join(""));
22
- }, N = (r, t) => {
23
- var e, o, a;
24
- r.key === "Backspace" && t > 0 && T(c) && c[t] !== void 0 && ((e = s.current[t - 1]) == null || e.focus()), r.key === "ArrowLeft" && t > 0 ? (o = s.current[t - 1]) == null || o.focus() : r.key === "ArrowRight" && t < i - 1 && ((a = s.current[t + 1]) == null || a.focus());
25
- }, O = (r) => {
26
- var o;
27
- const t = r.clipboardData.getData("text").slice(0, i).split(""), e = [...c];
28
- if (t.forEach((a, p) => {
29
- p < i && (e[p] = a, s.current[p] && (s.current[p].value = a));
30
- }), m(e), l && l(e.join("")), t.length === i && u)
31
- u(e.join(""));
32
- else {
33
- const a = t.length;
34
- a < i && ((o = s.current[a]) == null || o.focus());
20
+ const [otp, setOtp] = useState(Array(length).fill(""));
21
+ const inputs = useRef([]);
22
+ const handleChange = /* @__PURE__ */ __name((value, index) => {
23
+ var _a;
24
+ if (value.length > 1) return;
25
+ const newOtp = [...otp];
26
+ newOtp[index] = value;
27
+ setOtp(newOtp);
28
+ if (onChange) onChange(newOtp.join(""));
29
+ if (value && index < length - 1) {
30
+ (_a = inputs.current[index + 1]) == null ? void 0 : _a.focus();
35
31
  }
36
- };
37
- return /* @__PURE__ */ P(
32
+ if (newOtp.every((digit) => digit !== "") && onComplete) {
33
+ onComplete(newOtp.join(""));
34
+ }
35
+ }, "handleChange");
36
+ const handleKeyDown = /* @__PURE__ */ __name((e, index) => {
37
+ var _a, _b, _c;
38
+ if (e.key === "Backspace" && index > 0 && isArray(otp) && otp[index] !== void 0) {
39
+ (_a = inputs.current[index - 1]) == null ? void 0 : _a.focus();
40
+ }
41
+ if (e.key === "ArrowLeft" && index > 0) {
42
+ (_b = inputs.current[index - 1]) == null ? void 0 : _b.focus();
43
+ } else if (e.key === "ArrowRight" && index < length - 1) {
44
+ (_c = inputs.current[index + 1]) == null ? void 0 : _c.focus();
45
+ }
46
+ }, "handleKeyDown");
47
+ const handlePaste = /* @__PURE__ */ __name((e) => {
48
+ var _a;
49
+ const paste = e.clipboardData.getData("text").slice(0, length).split("");
50
+ const newOtp = [...otp];
51
+ paste.forEach((value, index) => {
52
+ if (index < length) {
53
+ newOtp[index] = value;
54
+ if (inputs.current[index]) {
55
+ inputs.current[index].value = value;
56
+ }
57
+ }
58
+ });
59
+ setOtp(newOtp);
60
+ if (onChange) onChange(newOtp.join(""));
61
+ if (paste.length === length && onComplete) {
62
+ onComplete(newOtp.join(""));
63
+ } else {
64
+ const nextIndex = paste.length;
65
+ if (nextIndex < length) {
66
+ (_a = inputs.current[nextIndex]) == null ? void 0 : _a.focus();
67
+ }
68
+ }
69
+ }, "handlePaste");
70
+ return /* @__PURE__ */ jsxs(
38
71
  "div",
39
72
  {
40
73
  "aria-describedby": "otp-instructions",
41
74
  "aria-labelledby": "otp-group-label",
42
- className: n(void 0, void 0, b),
75
+ className: bem(void 0, void 0, className),
43
76
  role: "group",
44
- onPaste: O,
77
+ onPaste: handlePaste,
45
78
  children: [
46
- /* @__PURE__ */ y("span", { className: n("label"), id: "otp-group-label", children: d ?? "Enter your OTP" }),
47
- /* @__PURE__ */ y("span", { className: n("instruction"), id: "otp-instructions", children: h ?? "Use the arrow keys to navigate between digits." }),
48
- c.map((r, t) => /* @__PURE__ */ v(
49
- D,
79
+ /* @__PURE__ */ jsx("span", { className: bem("label"), id: "otp-group-label", children: groupLabel ?? "Enter your OTP" }),
80
+ /* @__PURE__ */ jsx("span", { className: bem("instruction"), id: "otp-instructions", children: groupInstruction ?? "Use the arrow keys to navigate between digits." }),
81
+ otp.map((value, index) => /* @__PURE__ */ createElement(
82
+ Input,
50
83
  {
51
84
  placeholder: "x",
52
- ...f,
53
- key: `otp-${t}`,
54
- hideCounter: !0,
55
- "aria-label": `${(f == null ? void 0 : f["aria-label"]) ?? "OTP digit"} ${t + 1}`,
56
- className: n("input"),
57
- fieldClassName: n("field"),
58
- inputClassName: n("input__node"),
59
- inputContainerClassName: n("input__container"),
85
+ ...props,
86
+ key: `otp-${index}`,
87
+ hideCounter: true,
88
+ "aria-label": `${(props == null ? void 0 : props["aria-label"]) ?? "OTP digit"} ${index + 1}`,
89
+ className: bem("input"),
90
+ fieldClassName: bem("field"),
91
+ inputClassName: bem("input__node"),
92
+ inputContainerClassName: bem("input__container"),
60
93
  maxLength: 1,
61
- name: `otp-${t}`,
94
+ name: `otp-${index}`,
62
95
  type: "text",
63
- value: r,
64
- inputRef: (e) => {
65
- s.current[t] = e;
66
- },
67
- onChange: (e) => w(e.target.value, t),
68
- onKeyDown: (e) => N(e, t)
96
+ value,
97
+ inputRef: /* @__PURE__ */ __name((el) => {
98
+ inputs.current[index] = el;
99
+ }, "inputRef"),
100
+ onChange: /* @__PURE__ */ __name((e) => handleChange(e.target.value, index), "onChange"),
101
+ onKeyDown: /* @__PURE__ */ __name((e) => handleKeyDown(e, index), "onKeyDown")
69
102
  }
70
103
  ))
71
104
  ]
@@ -73,7 +106,7 @@ const n = I(A, "InputOTP"), _ = g(
73
106
  );
74
107
  }
75
108
  );
76
- _.displayName = "InputOTP";
109
+ InputOTP.displayName = "InputOTP";
77
110
  export {
78
- _ as InputOTP
111
+ InputOTP
79
112
  };
@@ -1,4 +1,6 @@
1
- const o = "gradientMove", n = "fadeInKeyframe", p = {
1
+ const gradientMove = "gradientMove";
2
+ const fadeInKeyframe = "fadeInKeyframe";
3
+ const styles = {
2
4
  "prokodo-InputOTP": "prokodo-InputOTP",
3
5
  "prokodo-InputOTP__label": "prokodo-InputOTP__label",
4
6
  "prokodo-InputOTP__instruction": "prokodo-InputOTP__instruction",
@@ -6,11 +8,11 @@ const o = "gradientMove", n = "fadeInKeyframe", p = {
6
8
  "prokodo-InputOTP__input": "prokodo-InputOTP__input",
7
9
  "prokodo-InputOTP__input__container": "prokodo-InputOTP__input__container",
8
10
  "prokodo-InputOTP__input__node": "prokodo-InputOTP__input__node",
9
- gradientMove: o,
10
- fadeInKeyframe: n
11
+ gradientMove,
12
+ fadeInKeyframe
11
13
  };
12
14
  export {
13
- p as default,
14
- n as fadeInKeyframe,
15
- o as gradientMove
15
+ styles as default,
16
+ fadeInKeyframe,
17
+ gradientMove
16
18
  };
@@ -1,4 +1,4 @@
1
- import { InputOTP as r } from "./InputOTP.js";
1
+ import { InputOTP } from "./InputOTP.js";
2
2
  export {
3
- r as InputOTP
3
+ InputOTP
4
4
  };
@@ -1,65 +1,66 @@
1
- import { jsxs as a, jsx as N } from "react/jsx-runtime";
2
- import { memo as f } from "react";
3
- import { create as j } from "../../helpers/bem.js";
4
- import u from "./Label.module.scss.js";
5
- const c = j(u, "Label"), v = f(
6
- ({
7
- className: o,
8
- htmlFor: e,
9
- required: s,
10
- label: n,
11
- contentProps: d,
12
- textProps: i,
13
- error: h,
14
- children: r,
15
- ...l
16
- }) => {
17
- const m = n == null ? void 0 : n.split(" ");
18
- return m ? /* @__PURE__ */ a(
19
- "label",
20
- {
21
- ...l,
22
- className: c(void 0, void 0, o),
23
- htmlFor: e,
24
- children: [
25
- /* @__PURE__ */ a("span", { ...d, children: [
26
- /* @__PURE__ */ a(
27
- "i",
28
- {
29
- ...i,
30
- className: c(
31
- "highlighted",
32
- {
33
- error: !!h
34
- },
35
- i == null ? void 0 : i.className
36
- ),
37
- children: [
38
- m == null ? void 0 : m[0],
39
- " "
40
- ]
41
- }
42
- ),
43
- /* @__PURE__ */ a(
44
- "i",
45
- {
46
- ...i,
47
- className: c("text", void 0, i == null ? void 0 : i.className),
48
- children: [
49
- m == null ? void 0 : m.slice(1).join(" "),
50
- " ",
51
- !!s && /* @__PURE__ */ N("span", { "aria-hidden": "true", children: "*" })
52
- ]
53
- }
54
- )
55
- ] }),
56
- r
57
- ]
58
- }
59
- ) : r;
60
- }
61
- );
62
- v.displayName = "Label";
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 { create } from "../../helpers/bem.js";
5
+ import styles from "./Label.module.scss.js";
6
+ const bem = create(styles, "Label");
7
+ const Label = /* @__PURE__ */ __name(({
8
+ className,
9
+ htmlFor,
10
+ required,
11
+ label,
12
+ contentProps,
13
+ textProps,
14
+ error,
15
+ children,
16
+ ...props
17
+ }) => {
18
+ const splittedLabel = label == null ? void 0 : label.split(" ");
19
+ if (!splittedLabel) return children;
20
+ return /* @__PURE__ */ jsxs(
21
+ "label",
22
+ {
23
+ ...props,
24
+ className: bem(void 0, void 0, className),
25
+ htmlFor,
26
+ children: [
27
+ /* @__PURE__ */ jsxs("span", { ...contentProps, children: [
28
+ /* @__PURE__ */ jsxs(
29
+ "i",
30
+ {
31
+ ...textProps,
32
+ className: bem(
33
+ "highlighted",
34
+ {
35
+ error: Boolean(error)
36
+ },
37
+ textProps == null ? void 0 : textProps.className
38
+ ),
39
+ children: [
40
+ splittedLabel == null ? void 0 : splittedLabel[0],
41
+ " "
42
+ ]
43
+ }
44
+ ),
45
+ /* @__PURE__ */ jsxs(
46
+ "i",
47
+ {
48
+ ...textProps,
49
+ className: bem("text", void 0, textProps == null ? void 0 : textProps.className),
50
+ children: [
51
+ splittedLabel == null ? void 0 : splittedLabel.slice(1).join(" "),
52
+ " ",
53
+ Boolean(required) && /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: "*" })
54
+ ]
55
+ }
56
+ )
57
+ ] }),
58
+ children
59
+ ]
60
+ }
61
+ );
62
+ }, "Label");
63
+ Label.displayName = "Label";
63
64
  export {
64
- v as Label
65
+ Label
65
66
  };
@@ -1,13 +1,15 @@
1
- const e = "gradientMove", o = "fadeInKeyframe", r = {
1
+ const gradientMove = "gradientMove";
2
+ const fadeInKeyframe = "fadeInKeyframe";
3
+ const styles = {
2
4
  "prokodo-Label": "prokodo-Label",
3
5
  "prokodo-Label__highlighted": "prokodo-Label__highlighted",
4
6
  "prokodo-Label__highlighted--error": "prokodo-Label__highlighted--error",
5
7
  "prokodo-Label__text": "prokodo-Label__text",
6
- gradientMove: e,
7
- fadeInKeyframe: o
8
+ gradientMove,
9
+ fadeInKeyframe
8
10
  };
9
11
  export {
10
- r as default,
11
- o as fadeInKeyframe,
12
- e as gradientMove
12
+ styles as default,
13
+ fadeInKeyframe,
14
+ gradientMove
13
15
  };
@@ -1,4 +1,4 @@
1
- import { Label as r } from "./Label.js";
1
+ import { Label } from "./Label.js";
2
2
  export {
3
- r as Label
3
+ Label
4
4
  };
@@ -1,58 +1,63 @@
1
- import { jsx as m } from "react/jsx-runtime";
2
- import { memo as c } from "react";
3
- import { create as k } from "../../helpers/bem.js";
4
- import { isString as g } from "../../helpers/validations.js";
5
- import x from "./Link.module.scss.js";
6
- import { BaseLink as L } from "../base-link/BaseLink.js";
7
- const v = k(x, "Link"), y = c(
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { memo } from "react";
3
+ import { create } from "../../helpers/bem.js";
4
+ import { isString } from "../../helpers/validations.js";
5
+ import styles from "./Link.module.scss.js";
6
+ import { BaseLink } from "../base-link/BaseLink.js";
7
+ const bem = create(styles, "Link");
8
+ const Link = memo(
8
9
  ({
9
- variant: s = "inherit",
10
- href: r,
11
- children: t,
12
- className: n,
13
- style: f,
14
- target: p,
15
- itemProp: l,
16
- hasBackground: i,
17
- onMouseEnter: b,
18
- onClick: o,
19
- onKeyDown: d,
20
- ariaLabel: e
10
+ variant = "inherit",
11
+ href,
12
+ children,
13
+ className,
14
+ style,
15
+ target,
16
+ itemProp,
17
+ hasBackground,
18
+ onMouseEnter,
19
+ onClick,
20
+ onKeyDown,
21
+ ariaLabel
21
22
  }) => {
22
- const u = {
23
- "has-no-background": i === !1,
24
- [`has-no-background--${s}`]: i === !1
25
- }, a = {
26
- className: v(void 0, u, n),
27
- style: f,
28
- onMouseEnter: b
23
+ const linkModifier = {
24
+ "has-no-background": hasBackground === false,
25
+ [`has-no-background--${variant}`]: hasBackground === false
29
26
  };
30
- return o && !g(r) ? /* @__PURE__ */ m(
31
- "span",
32
- {
33
- "aria-label": e,
34
- role: "button",
35
- tabIndex: 0,
36
- onClick: o,
37
- onKeyDown: d,
38
- ...a,
39
- children: t
40
- }
41
- ) : /* @__PURE__ */ m(
42
- L,
27
+ const defaultProps = {
28
+ className: bem(void 0, linkModifier, className),
29
+ style,
30
+ onMouseEnter
31
+ };
32
+ if (onClick && !isString(href)) {
33
+ return /* @__PURE__ */ jsx(
34
+ "span",
35
+ {
36
+ "aria-label": ariaLabel,
37
+ role: "button",
38
+ tabIndex: 0,
39
+ onClick,
40
+ onKeyDown,
41
+ ...defaultProps,
42
+ children
43
+ }
44
+ );
45
+ }
46
+ return /* @__PURE__ */ jsx(
47
+ BaseLink,
43
48
  {
44
- ...a,
45
- "aria-label": e,
46
- href: r,
47
- itemProp: l,
48
- target: p ?? void 0,
49
- onClick: o,
50
- children: t
49
+ ...defaultProps,
50
+ "aria-label": ariaLabel,
51
+ href,
52
+ itemProp,
53
+ target: target ?? void 0,
54
+ onClick,
55
+ children
51
56
  }
52
57
  );
53
58
  }
54
59
  );
55
- y.displayName = "Link";
60
+ Link.displayName = "Link";
56
61
  export {
57
- y as Link
62
+ Link
58
63
  };
@@ -1,4 +1,6 @@
1
- const o = "gradientMove", n = "fadeInKeyframe", r = {
1
+ const gradientMove = "gradientMove";
2
+ const fadeInKeyframe = "fadeInKeyframe";
3
+ const styles = {
2
4
  "prokodo-Link": "prokodo-Link",
3
5
  "prokodo-Link--has-no-background": "prokodo-Link--has-no-background",
4
6
  "prokodo-Link--has-no-background--primary": "prokodo-Link--has-no-background--primary",
@@ -8,11 +10,11 @@ const o = "gradientMove", n = "fadeInKeyframe", r = {
8
10
  "prokodo-Link--has-no-background--warning": "prokodo-Link--has-no-background--warning",
9
11
  "prokodo-Link--has-no-background--error": "prokodo-Link--has-no-background--error",
10
12
  "prokodo-Link--has-no-background--white": "prokodo-Link--has-no-background--white",
11
- gradientMove: o,
12
- fadeInKeyframe: n
13
+ gradientMove,
14
+ fadeInKeyframe
13
15
  };
14
16
  export {
15
- r as default,
16
- n as fadeInKeyframe,
17
- o as gradientMove
17
+ styles as default,
18
+ fadeInKeyframe,
19
+ gradientMove
18
20
  };
@@ -1,4 +1,4 @@
1
- import { Link as e } from "./Link.js";
1
+ import { Link } from "./Link.js";
2
2
  export {
3
- e as Link
3
+ Link
4
4
  };