@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,242 +1,361 @@
1
- import * as u from "react";
2
- import { SelectActionTypes as q } from "./useSelect.types.js";
3
- import { defaultOptionStringifier as Vt } from "./defaultOptionStringifier.js";
4
- import { selectReducer as St } from "./selectReducer.js";
5
- import { combineHooksSlotProps as K } from "../utils/combineHooksSlotProps.js";
6
- import N from "../../../../../@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/useForkRef/useForkRef.js";
7
- import Mt from "../../../../../@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/useId/useId.js";
8
- import { useCompoundParent as ht } from "../useCompound/useCompoundParent.js";
9
- import { useButton as Bt } from "../useButton/useButton.js";
10
- import { useList as It } from "../useList/useList.js";
11
- import At from "../../../../../@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/useEnhancedEffect/useEnhancedEffect.js";
12
- import w from "../../../../../@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/extractEventHandlers/extractEventHandlers.js";
13
- import wt from "../../../../../@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/visuallyHidden/visuallyHidden.js";
14
- import { ListActionTypes as J } from "../useList/listActions.types.js";
15
- function Dt(i) {
16
- return Array.isArray(i) ? i.length === 0 ? "" : JSON.stringify(i.map((a) => a.value)) : (i == null ? void 0 : i.value) == null ? "" : typeof i.value == "string" || typeof i.value == "number" ? i.value : JSON.stringify(i.value);
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+ import * as React from "react";
4
+ import { SelectActionTypes } from "./useSelect.types.js";
5
+ import { defaultOptionStringifier } from "./defaultOptionStringifier.js";
6
+ import { selectReducer } from "./selectReducer.js";
7
+ import { combineHooksSlotProps } from "../utils/combineHooksSlotProps.js";
8
+ import useForkRef from "../../../../../@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/useForkRef/useForkRef.js";
9
+ import useId from "../../../../../@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/useId/useId.js";
10
+ import { useCompoundParent } from "../useCompound/useCompoundParent.js";
11
+ import { useButton } from "../useButton/useButton.js";
12
+ import { useList } from "../useList/useList.js";
13
+ import useEnhancedEffect from "../../../../../@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/useEnhancedEffect/useEnhancedEffect.js";
14
+ import extractEventHandlers from "../../../../../@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/extractEventHandlers/extractEventHandlers.js";
15
+ import visuallyHidden from "../../../../../@mui_utils@6.0.0-rc.0_@types_react@19.1.0_react@19.1.0/node_modules/@mui/utils/esm/visuallyHidden/visuallyHidden.js";
16
+ import { ListActionTypes } from "../useList/listActions.types.js";
17
+ function defaultFormValueProvider(selectedOption) {
18
+ if (Array.isArray(selectedOption)) {
19
+ if (selectedOption.length === 0) {
20
+ return "";
21
+ }
22
+ return JSON.stringify(selectedOption.map((o) => o.value));
23
+ }
24
+ if ((selectedOption == null ? void 0 : selectedOption.value) == null) {
25
+ return "";
26
+ }
27
+ if (typeof selectedOption.value === "string" || typeof selectedOption.value === "number") {
28
+ return selectedOption.value;
29
+ }
30
+ return JSON.stringify(selectedOption.value);
17
31
  }
18
- function Qt(i) {
32
+ __name(defaultFormValueProvider, "defaultFormValueProvider");
33
+ function useSelect(props) {
19
34
  const {
20
- areOptionsEqual: a,
21
- buttonRef: $,
22
- defaultOpen: z = !1,
23
- defaultValue: p,
24
- disabled: D = !1,
25
- listboxId: U,
26
- listboxRef: _,
27
- multiple: r = !1,
28
- name: j,
29
- required: Q,
30
- onChange: c,
31
- onHighlightChange: y,
32
- onOpenChange: C,
33
- open: x,
34
- options: h,
35
- getOptionAsString: L = Vt,
36
- getSerializedValue: W = Dt,
37
- value: f,
38
- componentName: X = "useSelect"
39
- } = i, B = u.useRef(null), Y = N($, B), d = u.useRef(null), P = Mt(U);
40
- let k;
41
- f === void 0 && p === void 0 ? k = [] : p !== void 0 && (r ? k = p : k = p == null ? [] : [p]);
42
- const T = u.useMemo(() => {
43
- if (f !== void 0)
44
- return r ? f : f == null ? [] : [f];
45
- }, [f, r]), {
46
- subitems: V,
47
- contextValue: F
48
- } = ht(), l = u.useMemo(() => h != null ? new Map(h.map((t, e) => [t.value, {
49
- value: t.value,
50
- label: t.label,
51
- disabled: t.disabled,
52
- ref: /* @__PURE__ */ u.createRef(),
53
- id: `${P}_${e}`
54
- }])) : V, [h, V, P]), Z = N(_, d), {
55
- getRootProps: G,
56
- active: v,
57
- focusVisible: E,
58
- rootRef: H
59
- } = Bt({
60
- disabled: D,
61
- rootRef: Y
62
- }), S = u.useMemo(() => Array.from(l.keys()), [l]), s = u.useCallback((t) => {
63
- if (a !== void 0) {
64
- const e = S.find((o) => a(o, t));
65
- return l.get(e);
66
- }
67
- return l.get(t);
68
- }, [l, a, S]), tt = u.useCallback((t) => {
69
- const e = s(t);
70
- return (e == null ? void 0 : e.disabled) ?? !1;
71
- }, [s]), et = u.useCallback((t) => {
72
- const e = s(t);
73
- return e ? L(e) : "";
74
- }, [s, L]), ot = u.useMemo(() => ({
75
- selectedValues: T,
76
- open: x
77
- }), [T, x]), ut = u.useCallback((t) => {
78
- var e;
79
- return (e = l.get(t)) == null ? void 0 : e.id;
80
- }, [l]), nt = u.useCallback((t, e) => {
81
- r ? c == null || c(t, e) : c == null || c(t, e[0] ?? null);
82
- }, [r, c]), it = u.useCallback((t, e) => {
83
- y == null || y(t, e ?? null);
84
- }, [y]), rt = u.useCallback((t, e, o) => {
85
- var n;
86
- e === "open" && (C == null || C(o), o === !1 && (t == null ? void 0 : t.type) !== "blur" && ((n = B.current) == null || n.focus()));
87
- }, [C]), lt = u.useCallback((t) => {
88
- var e;
89
- return t == null ? null : ((e = V.get(t)) == null ? void 0 : e.ref.current) ?? null;
90
- }, [V]), st = {
91
- getInitialState: () => ({
35
+ areOptionsEqual,
36
+ buttonRef: buttonRefProp,
37
+ defaultOpen = false,
38
+ defaultValue: defaultValueProp,
39
+ disabled = false,
40
+ listboxId: listboxIdProp,
41
+ listboxRef: listboxRefProp,
42
+ multiple = false,
43
+ name,
44
+ required,
45
+ onChange,
46
+ onHighlightChange,
47
+ onOpenChange,
48
+ open: openProp,
49
+ options: optionsParam,
50
+ getOptionAsString = defaultOptionStringifier,
51
+ getSerializedValue = defaultFormValueProvider,
52
+ value: valueProp,
53
+ componentName = "useSelect"
54
+ } = props;
55
+ const buttonRef = React.useRef(null);
56
+ const handleButtonRef = useForkRef(buttonRefProp, buttonRef);
57
+ const listboxRef = React.useRef(null);
58
+ const listboxId = useId(listboxIdProp);
59
+ let defaultValue;
60
+ if (valueProp === void 0 && defaultValueProp === void 0) {
61
+ defaultValue = [];
62
+ } else if (defaultValueProp !== void 0) {
63
+ if (multiple) {
64
+ defaultValue = defaultValueProp;
65
+ } else {
66
+ defaultValue = defaultValueProp == null ? [] : [defaultValueProp];
67
+ }
68
+ }
69
+ const value = React.useMemo(() => {
70
+ if (valueProp !== void 0) {
71
+ if (multiple) {
72
+ return valueProp;
73
+ }
74
+ return valueProp == null ? [] : [valueProp];
75
+ }
76
+ return void 0;
77
+ }, [valueProp, multiple]);
78
+ const {
79
+ subitems,
80
+ contextValue: compoundComponentContextValue
81
+ } = useCompoundParent();
82
+ const options = React.useMemo(() => {
83
+ if (optionsParam != null) {
84
+ return new Map(optionsParam.map((option, index) => [option.value, {
85
+ value: option.value,
86
+ label: option.label,
87
+ disabled: option.disabled,
88
+ ref: /* @__PURE__ */ React.createRef(),
89
+ id: `${listboxId}_${index}`
90
+ }]));
91
+ }
92
+ return subitems;
93
+ }, [optionsParam, subitems, listboxId]);
94
+ const handleListboxRef = useForkRef(listboxRefProp, listboxRef);
95
+ const {
96
+ getRootProps: getButtonRootProps,
97
+ active: buttonActive,
98
+ focusVisible: buttonFocusVisible,
99
+ rootRef: mergedButtonRef
100
+ } = useButton({
101
+ disabled,
102
+ rootRef: handleButtonRef
103
+ });
104
+ const optionValues = React.useMemo(() => Array.from(options.keys()), [options]);
105
+ const getOptionByValue = React.useCallback((valueToGet) => {
106
+ if (areOptionsEqual !== void 0) {
107
+ const similarValue = optionValues.find((optionValue) => areOptionsEqual(optionValue, valueToGet));
108
+ return options.get(similarValue);
109
+ }
110
+ return options.get(valueToGet);
111
+ }, [options, areOptionsEqual, optionValues]);
112
+ const isItemDisabled = React.useCallback((valueToCheck) => {
113
+ const option = getOptionByValue(valueToCheck);
114
+ return (option == null ? void 0 : option.disabled) ?? false;
115
+ }, [getOptionByValue]);
116
+ const stringifyOption = React.useCallback((valueToCheck) => {
117
+ const option = getOptionByValue(valueToCheck);
118
+ if (!option) {
119
+ return "";
120
+ }
121
+ return getOptionAsString(option);
122
+ }, [getOptionByValue, getOptionAsString]);
123
+ const controlledState = React.useMemo(() => ({
124
+ selectedValues: value,
125
+ open: openProp
126
+ }), [value, openProp]);
127
+ const getItemId = React.useCallback((itemValue) => {
128
+ var _a;
129
+ return (_a = options.get(itemValue)) == null ? void 0 : _a.id;
130
+ }, [options]);
131
+ const handleSelectionChange = React.useCallback((event, newValues) => {
132
+ if (multiple) {
133
+ onChange == null ? void 0 : onChange(event, newValues);
134
+ } else {
135
+ onChange == null ? void 0 : onChange(event, newValues[0] ?? null);
136
+ }
137
+ }, [multiple, onChange]);
138
+ const handleHighlightChange = React.useCallback((event, newValue) => {
139
+ onHighlightChange == null ? void 0 : onHighlightChange(event, newValue ?? null);
140
+ }, [onHighlightChange]);
141
+ const handleStateChange = React.useCallback((event, field, fieldValue) => {
142
+ var _a;
143
+ if (field === "open") {
144
+ onOpenChange == null ? void 0 : onOpenChange(fieldValue);
145
+ if (fieldValue === false && (event == null ? void 0 : event.type) !== "blur") {
146
+ (_a = buttonRef.current) == null ? void 0 : _a.focus();
147
+ }
148
+ }
149
+ }, [onOpenChange]);
150
+ const getItemDomElement = React.useCallback((itemId) => {
151
+ var _a;
152
+ if (itemId == null) {
153
+ return null;
154
+ }
155
+ return ((_a = subitems.get(itemId)) == null ? void 0 : _a.ref.current) ?? null;
156
+ }, [subitems]);
157
+ const useListParameters = {
158
+ getInitialState: /* @__PURE__ */ __name(() => ({
92
159
  highlightedValue: null,
93
- selectedValues: k ?? [],
94
- open: z
95
- }),
96
- getItemId: ut,
97
- controlledProps: ot,
160
+ selectedValues: defaultValue ?? [],
161
+ open: defaultOpen
162
+ }), "getInitialState"),
163
+ getItemId,
164
+ controlledProps: controlledState,
98
165
  focusManagement: "DOM",
99
- getItemDomElement: lt,
100
- itemComparer: a,
101
- isItemDisabled: tt,
102
- rootRef: Z,
103
- onChange: nt,
104
- onHighlightChange: it,
105
- onStateChange: rt,
106
- reducerActionContext: u.useMemo(() => ({
107
- multiple: r
108
- }), [r]),
109
- items: S,
110
- getItemAsString: et,
111
- selectionMode: r ? "multiple" : "single",
112
- stateReducer: St,
113
- componentName: X
114
- }, {
115
- dispatch: g,
116
- getRootProps: ct,
117
- contextValue: O,
166
+ getItemDomElement,
167
+ itemComparer: areOptionsEqual,
168
+ isItemDisabled,
169
+ rootRef: handleListboxRef,
170
+ onChange: handleSelectionChange,
171
+ onHighlightChange: handleHighlightChange,
172
+ onStateChange: handleStateChange,
173
+ reducerActionContext: React.useMemo(() => ({
174
+ multiple
175
+ }), [multiple]),
176
+ items: optionValues,
177
+ getItemAsString: stringifyOption,
178
+ selectionMode: multiple ? "multiple" : "single",
179
+ stateReducer: selectReducer,
180
+ componentName
181
+ };
182
+ const {
183
+ dispatch,
184
+ getRootProps: getListboxRootProps,
185
+ contextValue: listContextValue,
118
186
  state: {
119
- open: m,
120
- highlightedValue: b,
121
- selectedValues: M
187
+ open,
188
+ highlightedValue: highlightedOption,
189
+ selectedValues: selectedOptions
122
190
  },
123
- rootRef: at
124
- } = It(st), ft = u.useRef(m);
125
- At(() => {
126
- var t;
127
- if (m && b !== null) {
128
- const e = (t = s(b)) == null ? void 0 : t.ref;
129
- if (!d.current || !(e != null && e.current))
191
+ rootRef: mergedListRootRef
192
+ } = useList(useListParameters);
193
+ const isInitiallyOpen = React.useRef(open);
194
+ useEnhancedEffect(() => {
195
+ var _a;
196
+ if (open && highlightedOption !== null) {
197
+ const optionRef = (_a = getOptionByValue(highlightedOption)) == null ? void 0 : _a.ref;
198
+ if (!listboxRef.current || !(optionRef == null ? void 0 : optionRef.current)) {
130
199
  return;
131
- ft.current || e.current.focus({
132
- preventScroll: !0
133
- });
134
- const o = d.current.getBoundingClientRect(), n = e.current.getBoundingClientRect();
135
- n.top < o.top ? d.current.scrollTop -= o.top - n.top : n.bottom > o.bottom && (d.current.scrollTop += n.bottom - o.bottom);
136
- }
137
- }, [m, b, s]);
138
- const I = u.useCallback((t) => s(t), [s]), dt = (t) => (e) => {
139
- var o;
140
- if ((o = t == null ? void 0 : t.onClick) == null || o.call(t, e), !e.defaultMuiPrevented) {
141
- const n = {
142
- type: q.buttonClick,
143
- event: e
200
+ }
201
+ if (!isInitiallyOpen.current) {
202
+ optionRef.current.focus({
203
+ preventScroll: true
204
+ });
205
+ }
206
+ const listboxClientRect = listboxRef.current.getBoundingClientRect();
207
+ const optionClientRect = optionRef.current.getBoundingClientRect();
208
+ if (optionClientRect.top < listboxClientRect.top) {
209
+ listboxRef.current.scrollTop -= listboxClientRect.top - optionClientRect.top;
210
+ } else if (optionClientRect.bottom > listboxClientRect.bottom) {
211
+ listboxRef.current.scrollTop += optionClientRect.bottom - listboxClientRect.bottom;
212
+ }
213
+ }
214
+ }, [open, highlightedOption, getOptionByValue]);
215
+ const getOptionMetadata = React.useCallback((optionValue) => getOptionByValue(optionValue), [getOptionByValue]);
216
+ const createHandleButtonClick = /* @__PURE__ */ __name((externalEventHandlers) => (event) => {
217
+ var _a;
218
+ (_a = externalEventHandlers == null ? void 0 : externalEventHandlers.onClick) == null ? void 0 : _a.call(externalEventHandlers, event);
219
+ if (!event.defaultMuiPrevented) {
220
+ const action = {
221
+ type: SelectActionTypes.buttonClick,
222
+ event
144
223
  };
145
- g(n);
146
- }
147
- }, mt = (t) => (e) => {
148
- var o;
149
- (o = t.onKeyDown) == null || o.call(t, e), !e.defaultMuiPrevented && (e.key === "ArrowDown" || e.key === "ArrowUp") && (e.preventDefault(), g({
150
- type: J.keyDown,
151
- key: e.key,
152
- event: e
153
- }));
154
- }, pt = (t = {}) => ({
155
- onClick: dt(t),
156
- onKeyDown: mt(t)
157
- }), gt = (t = {}) => ({
158
- ...t,
159
- ...pt(t),
160
- role: "combobox",
161
- "aria-expanded": m,
162
- "aria-controls": P
163
- }), bt = (t = {}) => {
164
- const e = w(t), o = K(gt, G);
224
+ dispatch(action);
225
+ }
226
+ }, "createHandleButtonClick");
227
+ const createHandleButtonKeyDown = /* @__PURE__ */ __name((otherHandlers) => (event) => {
228
+ var _a;
229
+ (_a = otherHandlers.onKeyDown) == null ? void 0 : _a.call(otherHandlers, event);
230
+ if (event.defaultMuiPrevented) {
231
+ return;
232
+ }
233
+ if (event.key === "ArrowDown" || event.key === "ArrowUp") {
234
+ event.preventDefault();
235
+ dispatch({
236
+ type: ListActionTypes.keyDown,
237
+ key: event.key,
238
+ event
239
+ });
240
+ }
241
+ }, "createHandleButtonKeyDown");
242
+ const getButtonOwnRootProps = /* @__PURE__ */ __name((otherHandlers = {}) => ({
243
+ onClick: createHandleButtonClick(otherHandlers),
244
+ onKeyDown: createHandleButtonKeyDown(otherHandlers)
245
+ }), "getButtonOwnRootProps");
246
+ const getSelectTriggerProps = /* @__PURE__ */ __name((otherHandlers = {}) => {
165
247
  return {
166
- ...t,
167
- ...o(e)
248
+ ...otherHandlers,
249
+ ...getButtonOwnRootProps(otherHandlers),
250
+ role: "combobox",
251
+ "aria-expanded": open,
252
+ "aria-controls": listboxId
168
253
  };
169
- }, Rt = (t) => (e) => {
170
- var o, n;
171
- (o = t.onBlur) == null || o.call(t, e), !e.defaultMuiPrevented && ((n = d.current) != null && n.contains(e.relatedTarget) || e.relatedTarget === B.current) && (e.defaultMuiPrevented = !0);
172
- }, yt = (t = {}) => ({
173
- onBlur: Rt(t)
174
- }), Ct = (t = {}) => {
175
- const e = w(t), o = K(yt, ct);
254
+ }, "getSelectTriggerProps");
255
+ const getButtonProps = /* @__PURE__ */ __name((externalProps = {}) => {
256
+ const externalEventHandlers = extractEventHandlers(externalProps);
257
+ const combinedProps = combineHooksSlotProps(getSelectTriggerProps, getButtonRootProps);
176
258
  return {
177
- id: P,
259
+ ...externalProps,
260
+ ...combinedProps(externalEventHandlers)
261
+ };
262
+ }, "getButtonProps");
263
+ const createListboxHandleBlur = /* @__PURE__ */ __name((otherHandlers) => (event) => {
264
+ var _a, _b;
265
+ (_a = otherHandlers.onBlur) == null ? void 0 : _a.call(otherHandlers, event);
266
+ if (event.defaultMuiPrevented) {
267
+ return;
268
+ }
269
+ if (((_b = listboxRef.current) == null ? void 0 : _b.contains(event.relatedTarget)) || event.relatedTarget === buttonRef.current) {
270
+ event.defaultMuiPrevented = true;
271
+ }
272
+ }, "createListboxHandleBlur");
273
+ const getOwnListboxHandlers = /* @__PURE__ */ __name((otherHandlers = {}) => ({
274
+ onBlur: createListboxHandleBlur(otherHandlers)
275
+ }), "getOwnListboxHandlers");
276
+ const getListboxProps = /* @__PURE__ */ __name((externalProps = {}) => {
277
+ const externalEventHandlers = extractEventHandlers(externalProps);
278
+ const getCombinedRootProps = combineHooksSlotProps(getOwnListboxHandlers, getListboxRootProps);
279
+ return {
280
+ id: listboxId,
178
281
  role: "listbox",
179
- "aria-multiselectable": r ? "true" : void 0,
180
- ...t,
181
- ...o(e)
282
+ "aria-multiselectable": multiple ? "true" : void 0,
283
+ ...externalProps,
284
+ ...getCombinedRootProps(externalEventHandlers)
182
285
  };
183
- };
184
- u.useDebugValue({
185
- selectedOptions: M,
186
- highlightedOption: b,
187
- open: m
286
+ }, "getListboxProps");
287
+ React.useDebugValue({
288
+ selectedOptions,
289
+ highlightedOption,
290
+ open
188
291
  });
189
- const Pt = u.useMemo(() => ({
190
- ...O,
191
- ...F
192
- }), [O, F]);
193
- let R;
194
- i.multiple ? R = M : R = M.length > 0 ? M[0] : null;
195
- let A;
196
- r ? A = R.map((t) => I(t)).filter((t) => t !== void 0) : A = I(R) ?? null;
197
- const kt = (t) => (e) => {
198
- var n;
199
- if ((n = t == null ? void 0 : t.onChange) == null || n.call(t, e), e.defaultMuiPrevented)
292
+ const contextValue = React.useMemo(() => ({
293
+ ...listContextValue,
294
+ ...compoundComponentContextValue
295
+ }), [listContextValue, compoundComponentContextValue]);
296
+ let selectValue;
297
+ if (props.multiple) {
298
+ selectValue = selectedOptions;
299
+ } else {
300
+ selectValue = selectedOptions.length > 0 ? selectedOptions[0] : null;
301
+ }
302
+ let selectedOptionsMetadata;
303
+ if (multiple) {
304
+ selectedOptionsMetadata = selectValue.map((v) => getOptionMetadata(v)).filter((o) => o !== void 0);
305
+ } else {
306
+ selectedOptionsMetadata = getOptionMetadata(selectValue) ?? null;
307
+ }
308
+ const createHandleHiddenInputChange = /* @__PURE__ */ __name((externalEventHandlers) => (event) => {
309
+ var _a;
310
+ (_a = externalEventHandlers == null ? void 0 : externalEventHandlers.onChange) == null ? void 0 : _a.call(externalEventHandlers, event);
311
+ if (event.defaultMuiPrevented) {
200
312
  return;
201
- const o = l.get(e.target.value);
202
- e.target.value === "" ? g({
203
- type: J.clearSelection
204
- }) : o !== void 0 && g({
205
- type: q.browserAutoFill,
206
- item: o.value,
207
- event: e
208
- });
209
- };
313
+ }
314
+ const option = options.get(event.target.value);
315
+ if (event.target.value === "") {
316
+ dispatch({
317
+ type: ListActionTypes.clearSelection
318
+ });
319
+ } else if (option !== void 0) {
320
+ dispatch({
321
+ type: SelectActionTypes.browserAutoFill,
322
+ item: option.value,
323
+ event
324
+ });
325
+ }
326
+ }, "createHandleHiddenInputChange");
327
+ const getHiddenInputProps = /* @__PURE__ */ __name((externalProps = {}) => {
328
+ const externalEventHandlers = extractEventHandlers(externalProps);
329
+ return {
330
+ name,
331
+ tabIndex: -1,
332
+ "aria-hidden": true,
333
+ required: required ? true : void 0,
334
+ value: getSerializedValue(selectedOptionsMetadata),
335
+ style: visuallyHidden,
336
+ ...externalProps,
337
+ onChange: createHandleHiddenInputChange(externalEventHandlers)
338
+ };
339
+ }, "getHiddenInputProps");
210
340
  return {
211
- buttonActive: v,
212
- buttonFocusVisible: E,
213
- buttonRef: H,
214
- contextValue: Pt,
215
- disabled: D,
216
- dispatch: g,
217
- getButtonProps: bt,
218
- getHiddenInputProps: (t = {}) => {
219
- const e = w(t);
220
- return {
221
- name: j,
222
- tabIndex: -1,
223
- "aria-hidden": !0,
224
- required: Q ? !0 : void 0,
225
- value: W(A),
226
- style: wt,
227
- ...t,
228
- onChange: kt(e)
229
- };
230
- },
231
- getListboxProps: Ct,
232
- getOptionMetadata: I,
233
- listboxRef: at,
234
- open: m,
235
- options: S,
236
- value: R,
237
- highlightedOption: b
341
+ buttonActive,
342
+ buttonFocusVisible,
343
+ buttonRef: mergedButtonRef,
344
+ contextValue,
345
+ disabled,
346
+ dispatch,
347
+ getButtonProps,
348
+ getHiddenInputProps,
349
+ getListboxProps,
350
+ getOptionMetadata,
351
+ listboxRef: mergedListRootRef,
352
+ open,
353
+ options: optionValues,
354
+ value: selectValue,
355
+ highlightedOption
238
356
  };
239
357
  }
358
+ __name(useSelect, "useSelect");
240
359
  export {
241
- Qt as useSelect
360
+ useSelect
242
361
  };
@@ -1,7 +1,7 @@
1
- const t = {
1
+ const SelectActionTypes = {
2
2
  buttonClick: "buttonClick",
3
3
  browserAutoFill: "browserAutoFill"
4
4
  };
5
5
  export {
6
- t as SelectActionTypes
6
+ SelectActionTypes
7
7
  };