@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,353 +1,456 @@
1
- import { evaluate as D, getSide as E, getSideAxis as C, getOppositePlacement as H, getExpandedPlacements as J, getOppositeAxisPlacements as K, getAlignmentSides as N, clamp as X, getAlignment as _, getPaddingObject as Q, rectToClientRect as Y, getOppositeAxis as U, getAlignmentAxis as W, getAxisLength as Z } from "../../../../../@floating-ui_utils@0.2.9/node_modules/@floating-ui/utils/dist/floating-ui.utils.js";
2
- function $(l, s, f) {
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+ import { evaluate, getSide, getSideAxis, getOppositePlacement, getExpandedPlacements, getOppositeAxisPlacements, getAlignmentSides, clamp, getAlignment, getPaddingObject, rectToClientRect, getOppositeAxis, getAlignmentAxis, getAxisLength } from "../../../../../@floating-ui_utils@0.2.9/node_modules/@floating-ui/utils/dist/floating-ui.utils.js";
4
+ function computeCoordsFromPlacement(_ref, placement, rtl) {
3
5
  let {
4
- reference: t,
5
- floating: a
6
- } = l;
7
- const e = C(s), c = W(s), o = Z(c), x = E(s), u = e === "y", m = t.x + t.width / 2 - a.width / 2, n = t.y + t.height / 2 - a.height / 2, r = t[o] / 2 - a[o] / 2;
8
- let i;
9
- switch (x) {
6
+ reference,
7
+ floating
8
+ } = _ref;
9
+ const sideAxis = getSideAxis(placement);
10
+ const alignmentAxis = getAlignmentAxis(placement);
11
+ const alignLength = getAxisLength(alignmentAxis);
12
+ const side = getSide(placement);
13
+ const isVertical = sideAxis === "y";
14
+ const commonX = reference.x + reference.width / 2 - floating.width / 2;
15
+ const commonY = reference.y + reference.height / 2 - floating.height / 2;
16
+ const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
17
+ let coords;
18
+ switch (side) {
10
19
  case "top":
11
- i = {
12
- x: m,
13
- y: t.y - a.height
20
+ coords = {
21
+ x: commonX,
22
+ y: reference.y - floating.height
14
23
  };
15
24
  break;
16
25
  case "bottom":
17
- i = {
18
- x: m,
19
- y: t.y + t.height
26
+ coords = {
27
+ x: commonX,
28
+ y: reference.y + reference.height
20
29
  };
21
30
  break;
22
31
  case "right":
23
- i = {
24
- x: t.x + t.width,
25
- y: n
32
+ coords = {
33
+ x: reference.x + reference.width,
34
+ y: commonY
26
35
  };
27
36
  break;
28
37
  case "left":
29
- i = {
30
- x: t.x - a.width,
31
- y: n
38
+ coords = {
39
+ x: reference.x - floating.width,
40
+ y: commonY
32
41
  };
33
42
  break;
34
43
  default:
35
- i = {
36
- x: t.x,
37
- y: t.y
44
+ coords = {
45
+ x: reference.x,
46
+ y: reference.y
38
47
  };
39
48
  }
40
- switch (_(s)) {
49
+ switch (getAlignment(placement)) {
41
50
  case "start":
42
- i[c] -= r * (f && u ? -1 : 1);
51
+ coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
43
52
  break;
44
53
  case "end":
45
- i[c] += r * (f && u ? -1 : 1);
54
+ coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
46
55
  break;
47
56
  }
48
- return i;
57
+ return coords;
49
58
  }
50
- const nt = async (l, s, f) => {
59
+ __name(computeCoordsFromPlacement, "computeCoordsFromPlacement");
60
+ const computePosition = /* @__PURE__ */ __name(async (reference, floating, config) => {
51
61
  const {
52
- placement: t = "bottom",
53
- strategy: a = "absolute",
54
- middleware: e = [],
55
- platform: c
56
- } = f, o = e.filter(Boolean), x = await (c.isRTL == null ? void 0 : c.isRTL(s));
57
- let u = await c.getElementRects({
58
- reference: l,
59
- floating: s,
60
- strategy: a
61
- }), {
62
- x: m,
63
- y: n
64
- } = $(u, t, x), r = t, i = {}, d = 0;
65
- for (let y = 0; y < o.length; y++) {
62
+ placement = "bottom",
63
+ strategy = "absolute",
64
+ middleware = [],
65
+ platform
66
+ } = config;
67
+ const validMiddleware = middleware.filter(Boolean);
68
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
69
+ let rects = await platform.getElementRects({
70
+ reference,
71
+ floating,
72
+ strategy
73
+ });
74
+ let {
75
+ x,
76
+ y
77
+ } = computeCoordsFromPlacement(rects, placement, rtl);
78
+ let statefulPlacement = placement;
79
+ let middlewareData = {};
80
+ let resetCount = 0;
81
+ for (let i = 0; i < validMiddleware.length; i++) {
82
+ const {
83
+ name,
84
+ fn
85
+ } = validMiddleware[i];
66
86
  const {
67
- name: w,
68
- fn: p
69
- } = o[y], {
70
- x: v,
71
- y: A,
72
- data: b,
73
- reset: g
74
- } = await p({
75
- x: m,
76
- y: n,
77
- initialPlacement: t,
78
- placement: r,
79
- strategy: a,
80
- middlewareData: i,
81
- rects: u,
82
- platform: c,
87
+ x: nextX,
88
+ y: nextY,
89
+ data,
90
+ reset
91
+ } = await fn({
92
+ x,
93
+ y,
94
+ initialPlacement: placement,
95
+ placement: statefulPlacement,
96
+ strategy,
97
+ middlewareData,
98
+ rects,
99
+ platform,
83
100
  elements: {
84
- reference: l,
85
- floating: s
101
+ reference,
102
+ floating
86
103
  }
87
104
  });
88
- m = v ?? m, n = A ?? n, i = {
89
- ...i,
90
- [w]: {
91
- ...i[w],
92
- ...b
105
+ x = nextX != null ? nextX : x;
106
+ y = nextY != null ? nextY : y;
107
+ middlewareData = {
108
+ ...middlewareData,
109
+ [name]: {
110
+ ...middlewareData[name],
111
+ ...data
112
+ }
113
+ };
114
+ if (reset && resetCount <= 50) {
115
+ resetCount++;
116
+ if (typeof reset === "object") {
117
+ if (reset.placement) {
118
+ statefulPlacement = reset.placement;
119
+ }
120
+ if (reset.rects) {
121
+ rects = reset.rects === true ? await platform.getElementRects({
122
+ reference,
123
+ floating,
124
+ strategy
125
+ }) : reset.rects;
126
+ }
127
+ ({
128
+ x,
129
+ y
130
+ } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
93
131
  }
94
- }, g && d <= 50 && (d++, typeof g == "object" && (g.placement && (r = g.placement), g.rects && (u = g.rects === !0 ? await c.getElementRects({
95
- reference: l,
96
- floating: s,
97
- strategy: a
98
- }) : g.rects), {
99
- x: m,
100
- y: n
101
- } = $(u, r, x)), y = -1);
132
+ i = -1;
133
+ }
102
134
  }
103
135
  return {
104
- x: m,
105
- y: n,
106
- placement: r,
107
- strategy: a,
108
- middlewareData: i
136
+ x,
137
+ y,
138
+ placement: statefulPlacement,
139
+ strategy,
140
+ middlewareData
109
141
  };
110
- };
111
- async function q(l, s) {
112
- var f;
113
- s === void 0 && (s = {});
142
+ }, "computePosition");
143
+ async function detectOverflow(state, options) {
144
+ var _await$platform$isEle;
145
+ if (options === void 0) {
146
+ options = {};
147
+ }
148
+ const {
149
+ x,
150
+ y,
151
+ platform,
152
+ rects,
153
+ elements,
154
+ strategy
155
+ } = state;
114
156
  const {
115
- x: t,
116
- y: a,
117
- platform: e,
118
- rects: c,
119
- elements: o,
120
- strategy: x
121
- } = l, {
122
- boundary: u = "clippingAncestors",
123
- rootBoundary: m = "viewport",
124
- elementContext: n = "floating",
125
- altBoundary: r = !1,
126
- padding: i = 0
127
- } = D(s, l), d = Q(i), w = o[r ? n === "floating" ? "reference" : "floating" : n], p = Y(await e.getClippingRect({
128
- element: (f = await (e.isElement == null ? void 0 : e.isElement(w))) == null || f ? w : w.contextElement || await (e.getDocumentElement == null ? void 0 : e.getDocumentElement(o.floating)),
129
- boundary: u,
130
- rootBoundary: m,
131
- strategy: x
132
- })), v = n === "floating" ? {
133
- x: t,
134
- y: a,
135
- width: c.floating.width,
136
- height: c.floating.height
137
- } : c.reference, A = await (e.getOffsetParent == null ? void 0 : e.getOffsetParent(o.floating)), b = await (e.isElement == null ? void 0 : e.isElement(A)) ? await (e.getScale == null ? void 0 : e.getScale(A)) || {
157
+ boundary = "clippingAncestors",
158
+ rootBoundary = "viewport",
159
+ elementContext = "floating",
160
+ altBoundary = false,
161
+ padding = 0
162
+ } = evaluate(options, state);
163
+ const paddingObject = getPaddingObject(padding);
164
+ const altContext = elementContext === "floating" ? "reference" : "floating";
165
+ const element = elements[altBoundary ? altContext : elementContext];
166
+ const clippingClientRect = rectToClientRect(await platform.getClippingRect({
167
+ element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating)),
168
+ boundary,
169
+ rootBoundary,
170
+ strategy
171
+ }));
172
+ const rect = elementContext === "floating" ? {
173
+ x,
174
+ y,
175
+ width: rects.floating.width,
176
+ height: rects.floating.height
177
+ } : rects.reference;
178
+ const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
179
+ const offsetScale = await (platform.isElement == null ? void 0 : platform.isElement(offsetParent)) ? await (platform.getScale == null ? void 0 : platform.getScale(offsetParent)) || {
138
180
  x: 1,
139
181
  y: 1
140
182
  } : {
141
183
  x: 1,
142
184
  y: 1
143
- }, g = Y(e.convertOffsetParentRelativeRectToViewportRelativeRect ? await e.convertOffsetParentRelativeRectToViewportRelativeRect({
144
- elements: o,
145
- rect: v,
146
- offsetParent: A,
147
- strategy: x
148
- }) : v);
185
+ };
186
+ const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
187
+ elements,
188
+ rect,
189
+ offsetParent,
190
+ strategy
191
+ }) : rect);
149
192
  return {
150
- top: (p.top - g.top + d.top) / b.y,
151
- bottom: (g.bottom - p.bottom + d.bottom) / b.y,
152
- left: (p.left - g.left + d.left) / b.x,
153
- right: (g.right - p.right + d.right) / b.x
193
+ top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
194
+ bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
195
+ left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
196
+ right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
154
197
  };
155
198
  }
156
- const it = function(l) {
157
- return l === void 0 && (l = {}), {
199
+ __name(detectOverflow, "detectOverflow");
200
+ const flip = /* @__PURE__ */ __name(function(options) {
201
+ if (options === void 0) {
202
+ options = {};
203
+ }
204
+ return {
158
205
  name: "flip",
159
- options: l,
160
- async fn(s) {
161
- var f, t;
206
+ options,
207
+ async fn(state) {
208
+ var _middlewareData$arrow, _middlewareData$flip;
209
+ const {
210
+ placement,
211
+ middlewareData,
212
+ rects,
213
+ initialPlacement,
214
+ platform,
215
+ elements
216
+ } = state;
162
217
  const {
163
- placement: a,
164
- middlewareData: e,
165
- rects: c,
166
- initialPlacement: o,
167
- platform: x,
168
- elements: u
169
- } = s, {
170
- mainAxis: m = !0,
171
- crossAxis: n = !0,
172
- fallbackPlacements: r,
173
- fallbackStrategy: i = "bestFit",
174
- fallbackAxisSideDirection: d = "none",
175
- flipAlignment: y = !0,
176
- ...w
177
- } = D(l, s);
178
- if ((f = e.arrow) != null && f.alignmentOffset)
218
+ mainAxis: checkMainAxis = true,
219
+ crossAxis: checkCrossAxis = true,
220
+ fallbackPlacements: specifiedFallbackPlacements,
221
+ fallbackStrategy = "bestFit",
222
+ fallbackAxisSideDirection = "none",
223
+ flipAlignment = true,
224
+ ...detectOverflowOptions
225
+ } = evaluate(options, state);
226
+ if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
179
227
  return {};
180
- const p = E(a), v = C(o), A = E(o) === o, b = await (x.isRTL == null ? void 0 : x.isRTL(u.floating)), g = r || (A || !y ? [H(o)] : J(o)), V = d !== "none";
181
- !r && V && g.push(...K(o, y, d, b));
182
- const z = [o, ...g], L = await q(s, w), T = [];
183
- let O = ((t = e.flip) == null ? void 0 : t.overflows) || [];
184
- if (m && T.push(L[p]), n) {
185
- const k = N(a, c, b);
186
- T.push(L[k[0]], L[k[1]]);
187
228
  }
188
- if (O = [...O, {
189
- placement: a,
190
- overflows: T
191
- }], !T.every((k) => k <= 0)) {
192
- var F, B;
193
- const k = (((F = e.flip) == null ? void 0 : F.index) || 0) + 1, M = z[k];
194
- if (M) {
195
- var j;
196
- const P = n === "alignment" ? v !== C(M) : !1, h = ((j = O[0]) == null ? void 0 : j.overflows[0]) > 0;
197
- if (!P || h)
229
+ const side = getSide(placement);
230
+ const initialSideAxis = getSideAxis(initialPlacement);
231
+ const isBasePlacement = getSide(initialPlacement) === initialPlacement;
232
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
233
+ const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
234
+ const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== "none";
235
+ if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
236
+ fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
237
+ }
238
+ const placements = [initialPlacement, ...fallbackPlacements];
239
+ const overflow = await detectOverflow(state, detectOverflowOptions);
240
+ const overflows = [];
241
+ let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
242
+ if (checkMainAxis) {
243
+ overflows.push(overflow[side]);
244
+ }
245
+ if (checkCrossAxis) {
246
+ const sides = getAlignmentSides(placement, rects, rtl);
247
+ overflows.push(overflow[sides[0]], overflow[sides[1]]);
248
+ }
249
+ overflowsData = [...overflowsData, {
250
+ placement,
251
+ overflows
252
+ }];
253
+ if (!overflows.every((side2) => side2 <= 0)) {
254
+ var _middlewareData$flip2, _overflowsData$filter;
255
+ const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
256
+ const nextPlacement = placements[nextIndex];
257
+ if (nextPlacement) {
258
+ var _overflowsData$;
259
+ const ignoreCrossAxisOverflow = checkCrossAxis === "alignment" ? initialSideAxis !== getSideAxis(nextPlacement) : false;
260
+ const hasInitialMainAxisOverflow = ((_overflowsData$ = overflowsData[0]) == null ? void 0 : _overflowsData$.overflows[0]) > 0;
261
+ if (!ignoreCrossAxisOverflow || hasInitialMainAxisOverflow) {
198
262
  return {
199
263
  data: {
200
- index: k,
201
- overflows: O
264
+ index: nextIndex,
265
+ overflows: overflowsData
202
266
  },
203
267
  reset: {
204
- placement: M
268
+ placement: nextPlacement
205
269
  }
206
270
  };
271
+ }
207
272
  }
208
- let S = (B = O.filter((P) => P.overflows[0] <= 0).sort((P, h) => P.overflows[1] - h.overflows[1])[0]) == null ? void 0 : B.placement;
209
- if (!S)
210
- switch (i) {
273
+ let resetPlacement = (_overflowsData$filter = overflowsData.filter((d) => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
274
+ if (!resetPlacement) {
275
+ switch (fallbackStrategy) {
211
276
  case "bestFit": {
212
- var I;
213
- const P = (I = O.filter((h) => {
214
- if (V) {
215
- const R = C(h.placement);
216
- return R === v || // Create a bias to the `y` side axis due to horizontal
277
+ var _overflowsData$filter2;
278
+ const placement2 = (_overflowsData$filter2 = overflowsData.filter((d) => {
279
+ if (hasFallbackAxisSideDirection) {
280
+ const currentSideAxis = getSideAxis(d.placement);
281
+ return currentSideAxis === initialSideAxis || // Create a bias to the `y` side axis due to horizontal
217
282
  // reading directions favoring greater width.
218
- R === "y";
283
+ currentSideAxis === "y";
219
284
  }
220
- return !0;
221
- }).map((h) => [h.placement, h.overflows.filter((R) => R > 0).reduce((R, G) => R + G, 0)]).sort((h, R) => h[1] - R[1])[0]) == null ? void 0 : I[0];
222
- P && (S = P);
285
+ return true;
286
+ }).map((d) => [d.placement, d.overflows.filter((overflow2) => overflow2 > 0).reduce((acc, overflow2) => acc + overflow2, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
287
+ if (placement2) {
288
+ resetPlacement = placement2;
289
+ }
223
290
  break;
224
291
  }
225
292
  case "initialPlacement":
226
- S = o;
293
+ resetPlacement = initialPlacement;
227
294
  break;
228
295
  }
229
- if (a !== S)
296
+ }
297
+ if (placement !== resetPlacement) {
230
298
  return {
231
299
  reset: {
232
- placement: S
300
+ placement: resetPlacement
233
301
  }
234
302
  };
303
+ }
235
304
  }
236
305
  return {};
237
306
  }
238
307
  };
239
- };
240
- async function tt(l, s) {
308
+ }, "flip");
309
+ async function convertValueToCoords(state, options) {
241
310
  const {
242
- placement: f,
243
- platform: t,
244
- elements: a
245
- } = l, e = await (t.isRTL == null ? void 0 : t.isRTL(a.floating)), c = E(f), o = _(f), x = C(f) === "y", u = ["left", "top"].includes(c) ? -1 : 1, m = e && x ? -1 : 1, n = D(s, l);
311
+ placement,
312
+ platform,
313
+ elements
314
+ } = state;
315
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
316
+ const side = getSide(placement);
317
+ const alignment = getAlignment(placement);
318
+ const isVertical = getSideAxis(placement) === "y";
319
+ const mainAxisMulti = ["left", "top"].includes(side) ? -1 : 1;
320
+ const crossAxisMulti = rtl && isVertical ? -1 : 1;
321
+ const rawValue = evaluate(options, state);
246
322
  let {
247
- mainAxis: r,
248
- crossAxis: i,
249
- alignmentAxis: d
250
- } = typeof n == "number" ? {
251
- mainAxis: n,
323
+ mainAxis,
324
+ crossAxis,
325
+ alignmentAxis
326
+ } = typeof rawValue === "number" ? {
327
+ mainAxis: rawValue,
252
328
  crossAxis: 0,
253
329
  alignmentAxis: null
254
330
  } : {
255
- mainAxis: n.mainAxis || 0,
256
- crossAxis: n.crossAxis || 0,
257
- alignmentAxis: n.alignmentAxis
331
+ mainAxis: rawValue.mainAxis || 0,
332
+ crossAxis: rawValue.crossAxis || 0,
333
+ alignmentAxis: rawValue.alignmentAxis
258
334
  };
259
- return o && typeof d == "number" && (i = o === "end" ? d * -1 : d), x ? {
260
- x: i * m,
261
- y: r * u
335
+ if (alignment && typeof alignmentAxis === "number") {
336
+ crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
337
+ }
338
+ return isVertical ? {
339
+ x: crossAxis * crossAxisMulti,
340
+ y: mainAxis * mainAxisMulti
262
341
  } : {
263
- x: r * u,
264
- y: i * m
342
+ x: mainAxis * mainAxisMulti,
343
+ y: crossAxis * crossAxisMulti
265
344
  };
266
345
  }
267
- const st = function(l) {
268
- return l === void 0 && (l = 0), {
346
+ __name(convertValueToCoords, "convertValueToCoords");
347
+ const offset = /* @__PURE__ */ __name(function(options) {
348
+ if (options === void 0) {
349
+ options = 0;
350
+ }
351
+ return {
269
352
  name: "offset",
270
- options: l,
271
- async fn(s) {
272
- var f, t;
353
+ options,
354
+ async fn(state) {
355
+ var _middlewareData$offse, _middlewareData$arrow;
273
356
  const {
274
- x: a,
275
- y: e,
276
- placement: c,
277
- middlewareData: o
278
- } = s, x = await tt(s, l);
279
- return c === ((f = o.offset) == null ? void 0 : f.placement) && (t = o.arrow) != null && t.alignmentOffset ? {} : {
280
- x: a + x.x,
281
- y: e + x.y,
357
+ x,
358
+ y,
359
+ placement,
360
+ middlewareData
361
+ } = state;
362
+ const diffCoords = await convertValueToCoords(state, options);
363
+ if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
364
+ return {};
365
+ }
366
+ return {
367
+ x: x + diffCoords.x,
368
+ y: y + diffCoords.y,
282
369
  data: {
283
- ...x,
284
- placement: c
370
+ ...diffCoords,
371
+ placement
285
372
  }
286
373
  };
287
374
  }
288
375
  };
289
- }, ot = function(l) {
290
- return l === void 0 && (l = {}), {
376
+ }, "offset");
377
+ const shift = /* @__PURE__ */ __name(function(options) {
378
+ if (options === void 0) {
379
+ options = {};
380
+ }
381
+ return {
291
382
  name: "shift",
292
- options: l,
293
- async fn(s) {
383
+ options,
384
+ async fn(state) {
294
385
  const {
295
- x: f,
296
- y: t,
297
- placement: a
298
- } = s, {
299
- mainAxis: e = !0,
300
- crossAxis: c = !1,
301
- limiter: o = {
302
- fn: (w) => {
386
+ x,
387
+ y,
388
+ placement
389
+ } = state;
390
+ const {
391
+ mainAxis: checkMainAxis = true,
392
+ crossAxis: checkCrossAxis = false,
393
+ limiter = {
394
+ fn: /* @__PURE__ */ __name((_ref) => {
303
395
  let {
304
- x: p,
305
- y: v
306
- } = w;
396
+ x: x2,
397
+ y: y2
398
+ } = _ref;
307
399
  return {
308
- x: p,
309
- y: v
400
+ x: x2,
401
+ y: y2
310
402
  };
311
- }
403
+ }, "fn")
312
404
  },
313
- ...x
314
- } = D(l, s), u = {
315
- x: f,
316
- y: t
317
- }, m = await q(s, x), n = C(E(a)), r = U(n);
318
- let i = u[r], d = u[n];
319
- if (e) {
320
- const w = r === "y" ? "top" : "left", p = r === "y" ? "bottom" : "right", v = i + m[w], A = i - m[p];
321
- i = X(v, i, A);
405
+ ...detectOverflowOptions
406
+ } = evaluate(options, state);
407
+ const coords = {
408
+ x,
409
+ y
410
+ };
411
+ const overflow = await detectOverflow(state, detectOverflowOptions);
412
+ const crossAxis = getSideAxis(getSide(placement));
413
+ const mainAxis = getOppositeAxis(crossAxis);
414
+ let mainAxisCoord = coords[mainAxis];
415
+ let crossAxisCoord = coords[crossAxis];
416
+ if (checkMainAxis) {
417
+ const minSide = mainAxis === "y" ? "top" : "left";
418
+ const maxSide = mainAxis === "y" ? "bottom" : "right";
419
+ const min = mainAxisCoord + overflow[minSide];
420
+ const max = mainAxisCoord - overflow[maxSide];
421
+ mainAxisCoord = clamp(min, mainAxisCoord, max);
322
422
  }
323
- if (c) {
324
- const w = n === "y" ? "top" : "left", p = n === "y" ? "bottom" : "right", v = d + m[w], A = d - m[p];
325
- d = X(v, d, A);
423
+ if (checkCrossAxis) {
424
+ const minSide = crossAxis === "y" ? "top" : "left";
425
+ const maxSide = crossAxis === "y" ? "bottom" : "right";
426
+ const min = crossAxisCoord + overflow[minSide];
427
+ const max = crossAxisCoord - overflow[maxSide];
428
+ crossAxisCoord = clamp(min, crossAxisCoord, max);
326
429
  }
327
- const y = o.fn({
328
- ...s,
329
- [r]: i,
330
- [n]: d
430
+ const limitedCoords = limiter.fn({
431
+ ...state,
432
+ [mainAxis]: mainAxisCoord,
433
+ [crossAxis]: crossAxisCoord
331
434
  });
332
435
  return {
333
- ...y,
436
+ ...limitedCoords,
334
437
  data: {
335
- x: y.x - f,
336
- y: y.y - t,
438
+ x: limitedCoords.x - x,
439
+ y: limitedCoords.y - y,
337
440
  enabled: {
338
- [r]: e,
339
- [n]: c
441
+ [mainAxis]: checkMainAxis,
442
+ [crossAxis]: checkCrossAxis
340
443
  }
341
444
  }
342
445
  };
343
446
  }
344
447
  };
345
- };
448
+ }, "shift");
346
449
  export {
347
- nt as computePosition,
348
- q as detectOverflow,
349
- it as flip,
350
- st as offset,
351
- Y as rectToClientRect,
352
- ot as shift
450
+ computePosition,
451
+ detectOverflow,
452
+ flip,
453
+ offset,
454
+ rectToClientRect,
455
+ shift
353
456
  };