@prokodo/ui 0.0.4 → 0.0.6

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 (281) hide show
  1. package/README.md +99 -12
  2. package/dist/components/Accordion-V3d_aGvZ.js +130 -0
  3. package/dist/components/Accordion-o8oKA6Tq.js +1 -0
  4. package/dist/components/Animated-BBfAgsHL.js +64 -0
  5. package/dist/components/Animated-CO4IEerF.js +1 -0
  6. package/dist/components/AnimatedText-BmB5Vkyq.js +31 -0
  7. package/dist/components/AnimatedText-Sy1jofZl.js +1 -0
  8. package/dist/components/Avatar-Ci5YNFc5.js +95 -0
  9. package/dist/components/Avatar-CjlbA5a5.js +1 -0
  10. package/dist/components/BaseLink-Dd9htNXU.js +1 -0
  11. package/dist/components/BaseLink-w1q9Qc1U.js +30 -0
  12. package/dist/components/Button-B8chVgsB.js +111 -0
  13. package/dist/components/Button-yvFLX-6Q.js +1 -0
  14. package/dist/components/Calendly-CWCAs02R.js +1 -0
  15. package/dist/components/Calendly-WBM4oHyC.js +82 -0
  16. package/dist/components/Card-BPEoLzF1.js +1 -0
  17. package/dist/components/Card-IW4R7bKr.js +202 -0
  18. package/dist/components/Carousel-CdS7SVzA.js +1 -0
  19. package/dist/components/Carousel-DpO4a3lm.js +257 -0
  20. package/dist/components/Chip-BmBxJH5M.js +80 -0
  21. package/dist/components/Chip-Q2ttDAQn.js +1 -0
  22. package/dist/components/ClassNameConfigurator-C6UbdI-d.js +21 -0
  23. package/dist/components/ClassNameConfigurator-Ce5BUPXc.js +860 -0
  24. package/dist/components/DatePicker-BTenaDN8.js +1 -0
  25. package/dist/components/DatePicker-PK173UTy.js +93 -0
  26. package/dist/components/Dialog-Bq3tfZ0_.js +1 -0
  27. package/dist/components/Dialog-KlXAOdt_.js +172 -0
  28. package/dist/components/Drawer-DulO9091.js +1 -0
  29. package/dist/components/Drawer-i9X07r74.js +120 -0
  30. package/dist/components/Form-B6963dT5.js +368 -0
  31. package/dist/components/Form-DVNzITG2.js +1 -0
  32. package/dist/components/GridRow-1h1JHuDl.js +114 -0
  33. package/dist/components/GridRow-C5v0sOZZ.js +1 -0
  34. package/dist/components/Headline-CnyLLQLB.js +1 -0
  35. package/dist/components/Headline-DzEinaZi.js +98 -0
  36. package/dist/components/Icon-BMrVlROP.js +4195 -0
  37. package/dist/components/Icon-eWdA85cf.js +1 -0
  38. package/dist/components/Image-B-lyA7ym.js +1 -0
  39. package/dist/components/Image-CVgvVlLE.js +33 -0
  40. package/dist/components/ImageText-Cqp4xp9y.js +113 -0
  41. package/dist/components/ImageText-D-06_EGf.js +1 -0
  42. package/dist/components/Input-BEO9ig1R.js +1 -0
  43. package/dist/components/Input-CrNLI_OY.js +258 -0
  44. package/dist/components/InputOTP-Db7DHrhS.js +88 -0
  45. package/dist/components/InputOTP-MnmjEmPU.js +1 -0
  46. package/dist/components/Label-BvCzZIGM.js +1 -0
  47. package/dist/components/Label-DRUCdGoX.js +71 -0
  48. package/dist/components/Link-DSQ1125B.js +69 -0
  49. package/dist/components/Link-Dg7XR4uY.js +1 -0
  50. package/dist/components/List-D_dSwMx5.js +1 -0
  51. package/dist/components/List-P6xbVrBc.js +196 -0
  52. package/dist/components/Loading-C7lyHDW7.js +68 -0
  53. package/dist/components/Loading-U-CrTVTi.js +1 -0
  54. package/dist/components/Lottie-Br7PmIzX.js +1 -0
  55. package/dist/components/Lottie-CrvbxK0R.js +87 -0
  56. package/dist/components/Map-D3xbPS1S.js +1 -0
  57. package/dist/components/Map-DEIB_y-M.js +64 -0
  58. package/dist/components/PostItem-B8Vfv_sW.js +183 -0
  59. package/dist/components/PostItem-BSTn6cHD.js +1 -0
  60. package/dist/components/PostTeaser-BmZyqFL2.js +186 -0
  61. package/dist/components/PostTeaser-DLynX43c.js +1 -0
  62. package/dist/components/PostWidget-Bo4KiSsV.js +170 -0
  63. package/dist/components/PostWidget-DYWA-B8d.js +1 -0
  64. package/dist/components/PostWidgetCarousel-CZ6ptOGv.js +168 -0
  65. package/dist/components/PostWidgetCarousel-D7-p3Pwr.js +1 -0
  66. package/dist/components/Quote-6aurOanD.js +1 -0
  67. package/dist/components/Quote-CV_UYE1G.js +101 -0
  68. package/dist/components/RichText-Cg_XzkUs.js +152 -0
  69. package/dist/components/RichText-DVg1dwMV.js +1 -0
  70. package/dist/components/Select-BMyrX8V0.js +3081 -0
  71. package/dist/components/Select-DbjU6dlH.js +3 -0
  72. package/dist/components/Skeleton-BuY3bttw.js +1 -0
  73. package/dist/components/Skeleton-D6olNYTG.js +40 -0
  74. package/dist/components/Slider-C-lecSwc.js +957 -0
  75. package/dist/components/Slider-GvO3Xllf.js +1 -0
  76. package/dist/components/Stepper-BV3PGCr2.js +1 -0
  77. package/dist/components/Stepper-CA1DOm4D.js +135 -0
  78. package/dist/components/Switch-C_6EUOIc.js +330 -0
  79. package/dist/components/Switch-Db3HpOhM.js +1 -0
  80. package/dist/components/Table-Csc0FIbX.js +1 -0
  81. package/dist/components/Table-Cy8bIv_C.js +95 -0
  82. package/dist/components/Teaser-CkisYOs-.js +1 -0
  83. package/dist/components/Teaser-Cl2oBeh5.js +118 -0
  84. package/dist/components/accordion.js +1 -0
  85. package/dist/components/animated.js +1 -0
  86. package/dist/components/animatedText.js +1 -0
  87. package/dist/components/areArraysEqual-6R3bBH2E.js +1 -0
  88. package/dist/components/areArraysEqual-CJkStQkx.js +20 -0
  89. package/dist/components/avatar.js +1 -0
  90. package/dist/components/base-link.js +1 -0
  91. package/dist/components/bem-CYKrPjje.js +11 -0
  92. package/dist/components/bem-DC5wv0dD.js +1 -0
  93. package/dist/components/button.js +1 -0
  94. package/dist/components/calculation-79PhfKvq.js +4 -0
  95. package/dist/components/calculation-D-p0iqpk.js +1 -0
  96. package/dist/components/calendly.js +1 -0
  97. package/dist/components/card.js +1 -0
  98. package/dist/components/carousel.js +1 -0
  99. package/dist/components/chip.js +1 -0
  100. package/dist/components/datePicker.js +1 -0
  101. package/dist/components/dialog.js +1 -0
  102. package/dist/components/drawer.js +1 -0
  103. package/dist/components/form.js +1 -0
  104. package/dist/components/grid.js +1 -0
  105. package/dist/components/headline.js +1 -0
  106. package/dist/components/icon.js +1 -0
  107. package/dist/components/image-text.js +1 -0
  108. package/dist/components/image.js +1 -0
  109. package/dist/components/input.js +1 -0
  110. package/dist/components/inputOTP.js +1 -0
  111. package/dist/components/jsx-runtime-C5mzlN2N.js +284 -0
  112. package/dist/components/jsx-runtime-CITbqOLs.js +22 -0
  113. package/dist/components/label.js +1 -0
  114. package/dist/components/link.js +1 -0
  115. package/dist/components/list.js +1 -0
  116. package/dist/components/loading.js +1 -0
  117. package/dist/components/lottie.js +1 -0
  118. package/dist/components/map.js +1 -0
  119. package/dist/components/post-item.js +1 -0
  120. package/dist/components/post-teaser.js +1 -0
  121. package/dist/components/post-widget-carousel.js +1 -0
  122. package/dist/components/post-widget.js +1 -0
  123. package/dist/components/quote.js +1 -0
  124. package/dist/components/rich-text.js +1 -0
  125. package/dist/components/select.js +1 -0
  126. package/dist/components/skeleton.js +1 -0
  127. package/dist/components/slider.js +1 -0
  128. package/dist/components/stepper.js +1 -0
  129. package/dist/components/switch.js +1 -0
  130. package/dist/components/table.js +1 -0
  131. package/dist/components/teaser.js +1 -0
  132. package/dist/components/useControlled-BYdyS7Pn.js +31 -0
  133. package/dist/components/useControlled-Ysk4KqoX.js +3 -0
  134. package/dist/components/validations-B_cxltQ_.js +8 -0
  135. package/dist/components/validations-Cnxtn28y.js +1 -0
  136. package/dist/index.cjs.js +1 -46
  137. package/dist/index.es.js +82 -13845
  138. package/dist/tsconfig.build.tsbuildinfo +1 -0
  139. package/dist/types/components/accordion/Accordion.d.ts +3 -0
  140. package/dist/types/components/accordion/Accordion.model.d.ts +28 -0
  141. package/dist/types/components/accordion/index.d.ts +2 -0
  142. package/dist/types/components/animated/Animated.d.ts +3 -0
  143. package/dist/types/components/animated/Animated.model.d.ts +12 -0
  144. package/dist/types/components/animated/index.d.ts +2 -0
  145. package/dist/types/components/animatedText/AnimatedText.d.ts +3 -0
  146. package/dist/types/components/animatedText/AnimatedText.model.d.ts +7 -0
  147. package/dist/types/components/animatedText/index.d.ts +2 -0
  148. package/dist/types/components/avatar/Avatar.d.ts +3 -0
  149. package/dist/types/components/avatar/Avatar.model.d.ts +11 -0
  150. package/dist/types/components/avatar/index.d.ts +2 -0
  151. package/dist/types/components/base-link/BaseLink.d.ts +3 -0
  152. package/dist/types/components/base-link/BaseLink.model.d.ts +7 -0
  153. package/dist/types/components/base-link/index.d.ts +2 -0
  154. package/dist/types/components/button/Button.d.ts +3 -0
  155. package/dist/types/components/button/Button.model.d.ts +26 -0
  156. package/dist/types/components/button/index.d.ts +2 -0
  157. package/dist/types/components/calendly/Calendly.d.ts +22 -0
  158. package/dist/types/components/calendly/Calendly.model.d.ts +27 -0
  159. package/dist/types/components/calendly/index.d.ts +2 -0
  160. package/dist/types/components/card/Card.d.ts +3 -0
  161. package/dist/types/components/card/Card.model.d.ts +35 -0
  162. package/dist/types/components/card/index.d.ts +2 -0
  163. package/dist/types/components/carousel/Carousel.d.ts +3 -0
  164. package/dist/types/components/carousel/Carousel.model.d.ts +24 -0
  165. package/dist/types/components/carousel/Carousel.services.d.ts +23 -0
  166. package/dist/types/components/carousel/index.d.ts +2 -0
  167. package/dist/types/components/chip/Chip.d.ts +3 -0
  168. package/dist/types/components/chip/Chip.model.d.ts +14 -0
  169. package/dist/types/components/chip/index.d.ts +2 -0
  170. package/dist/types/components/datePicker/DatePicker.d.ts +3 -0
  171. package/dist/types/components/datePicker/DatePicker.model.d.ts +21 -0
  172. package/dist/types/components/datePicker/index.d.ts +2 -0
  173. package/dist/types/components/dialog/Dialog.d.ts +3 -0
  174. package/dist/types/components/dialog/Dialog.model.d.ts +34 -0
  175. package/dist/types/components/dialog/index.d.ts +2 -0
  176. package/dist/types/components/drawer/Drawer.d.ts +5 -0
  177. package/dist/types/components/drawer/Drawer.model.d.ts +11 -0
  178. package/dist/types/components/drawer/index.d.ts +2 -0
  179. package/dist/types/components/form/Form.d.ts +3 -0
  180. package/dist/types/components/form/Form.model.d.ts +71 -0
  181. package/dist/types/components/form/FormField.d.ts +9 -0
  182. package/dist/types/components/form/FormResponse.d.ts +6 -0
  183. package/dist/types/components/form/index.d.ts +3 -0
  184. package/dist/types/components/grid/Grid.d.ts +7 -0
  185. package/dist/types/components/grid/GridRow.d.ts +13 -0
  186. package/dist/types/components/grid/index.d.ts +2 -0
  187. package/dist/types/components/headline/Headline.d.ts +4 -0
  188. package/dist/types/components/headline/Headline.model.d.ts +19 -0
  189. package/dist/types/components/headline/index.d.ts +2 -0
  190. package/dist/types/components/icon/Icon.d.ts +4 -0
  191. package/dist/types/components/icon/Icon.model.d.ts +15 -0
  192. package/dist/types/components/icon/iconsMap.d.ts +4128 -0
  193. package/dist/types/components/icon/index.d.ts +2 -0
  194. package/dist/types/components/image/Image.d.ts +3 -0
  195. package/dist/types/components/image/Image.model.d.ts +12 -0
  196. package/dist/types/components/image/index.d.ts +2 -0
  197. package/dist/types/components/image-text/ImageText.d.ts +3 -0
  198. package/dist/types/components/image-text/ImageText.model.d.ts +21 -0
  199. package/dist/types/components/image-text/index.d.ts +2 -0
  200. package/dist/types/components/input/Input.d.ts +3 -0
  201. package/dist/types/components/input/Input.model.d.ts +55 -0
  202. package/dist/types/components/input/InputValidation.d.ts +2 -0
  203. package/dist/types/components/input/index.d.ts +2 -0
  204. package/dist/types/components/inputOTP/InputOTP.d.ts +3 -0
  205. package/dist/types/components/inputOTP/InputOTP.model.d.ts +8 -0
  206. package/dist/types/components/inputOTP/index.d.ts +2 -0
  207. package/dist/types/components/label/Label.d.ts +3 -0
  208. package/dist/types/components/label/Label.model.d.ts +9 -0
  209. package/dist/types/components/label/index.d.ts +2 -0
  210. package/dist/types/components/link/Link.d.ts +3 -0
  211. package/dist/types/components/link/Link.model.d.ts +22 -0
  212. package/dist/types/components/link/index.d.ts +2 -0
  213. package/dist/types/components/list/List.d.ts +3 -0
  214. package/dist/types/components/list/List.model.d.ts +49 -0
  215. package/dist/types/components/list/index.d.ts +2 -0
  216. package/dist/types/components/loading/Loading.d.ts +3 -0
  217. package/dist/types/components/loading/Loading.model.d.ts +5 -0
  218. package/dist/types/components/loading/index.d.ts +2 -0
  219. package/dist/types/components/lottie/Lottie.d.ts +3 -0
  220. package/dist/types/components/lottie/Lottie.model.d.ts +8 -0
  221. package/dist/types/components/lottie/LottieAnimations.d.ts +32 -0
  222. package/dist/types/components/lottie/index.d.ts +2 -0
  223. package/dist/types/components/map/Map.d.ts +3 -0
  224. package/dist/types/components/map/Map.model.d.ts +20 -0
  225. package/dist/types/components/map/index.d.ts +2 -0
  226. package/dist/types/components/post-item/PostItem.d.ts +3 -0
  227. package/dist/types/components/post-item/PostItem.model.d.ts +21 -0
  228. package/dist/types/components/post-item/PostItemAuthor.d.ts +3 -0
  229. package/dist/types/components/post-item/PostItemAuthor.model.d.ts +14 -0
  230. package/dist/types/components/post-item/index.d.ts +3 -0
  231. package/dist/types/components/post-teaser/PostTeaser.d.ts +3 -0
  232. package/dist/types/components/post-teaser/PostTeaser.model.d.ts +25 -0
  233. package/dist/types/components/post-teaser/index.d.ts +2 -0
  234. package/dist/types/components/post-widget/PostWidget.d.ts +3 -0
  235. package/dist/types/components/post-widget/PostWidget.model.d.ts +25 -0
  236. package/dist/types/components/post-widget/index.d.ts +2 -0
  237. package/dist/types/components/post-widget-carousel/PostWidgetCarousel.d.ts +3 -0
  238. package/dist/types/components/post-widget-carousel/PostWidgetCarousel.model.d.ts +20 -0
  239. package/dist/types/components/post-widget-carousel/index.d.ts +2 -0
  240. package/dist/types/components/quote/Quote.d.ts +3 -0
  241. package/dist/types/components/quote/Quote.model.d.ts +19 -0
  242. package/dist/types/components/quote/index.d.ts +2 -0
  243. package/dist/types/components/rich-text/RichText.d.ts +3 -0
  244. package/dist/types/components/rich-text/RichText.model.d.ts +11 -0
  245. package/dist/types/components/rich-text/index.d.ts +2 -0
  246. package/dist/types/components/select/Select.d.ts +3 -0
  247. package/dist/types/components/select/Select.model.d.ts +30 -0
  248. package/dist/types/components/select/index.d.ts +2 -0
  249. package/dist/types/components/skeleton/Skeleton.d.ts +3 -0
  250. package/dist/types/components/skeleton/Skeleton.model.d.ts +7 -0
  251. package/dist/types/components/skeleton/index.d.ts +2 -0
  252. package/dist/types/components/slider/Slider.d.ts +3 -0
  253. package/dist/types/components/slider/Slider.model.d.ts +11 -0
  254. package/dist/types/components/slider/index.d.ts +2 -0
  255. package/dist/types/components/stepper/Stepper.d.ts +3 -0
  256. package/dist/types/components/stepper/Stepper.model.d.ts +24 -0
  257. package/dist/types/components/stepper/index.d.ts +2 -0
  258. package/dist/types/components/switch/Switch.d.ts +3 -0
  259. package/dist/types/components/switch/Switch.model.d.ts +18 -0
  260. package/dist/types/components/switch/index.d.ts +2 -0
  261. package/dist/types/components/table/Table.d.ts +3 -0
  262. package/dist/types/components/table/Table.model.d.ts +32 -0
  263. package/dist/types/components/table/index.d.ts +2 -0
  264. package/dist/types/components/teaser/Teaser.d.ts +3 -0
  265. package/dist/types/components/teaser/Teaser.model.d.ts +29 -0
  266. package/dist/types/components/teaser/index.d.ts +2 -0
  267. package/dist/types/helpers/bem.d.ts +8 -0
  268. package/dist/types/helpers/calculation.d.ts +2 -0
  269. package/dist/types/helpers/effect.d.ts +1 -0
  270. package/dist/types/helpers/getTracking.d.ts +5 -0
  271. package/dist/types/helpers/theme.d.ts +1 -0
  272. package/dist/types/helpers/validations.d.ts +6 -0
  273. package/dist/types/hooks/useGoogleMaps.d.ts +1 -0
  274. package/dist/types/hooks/useThrottleScroll.d.ts +1 -0
  275. package/dist/types/index.d.ts +80 -0
  276. package/dist/types/types/colors.d.ts +5 -0
  277. package/dist/types/types/core.d.ts +5 -0
  278. package/dist/types/types/schema.d.ts +7 -0
  279. package/dist/types/types/variants.d.ts +1 -0
  280. package/dist/ui.css +1 -1
  281. package/package.json +183 -18
@@ -0,0 +1 @@
1
+ "use strict";const N=require("./jsx-runtime-CITbqOLs.js"),X=require("react"),qe=require("./bem-DC5wv0dD.js"),$e=require("./Label-BvCzZIGM.js"),e=require("./ClassNameConfigurator-C6UbdI-d.js"),Ue=require("./useControlled-Ysk4KqoX.js"),ve=require("./areArraysEqual-6R3bBH2E.js");function Ke(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const i in t)if(i!=="default"){const l=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(n,i,l.get?l:{enumerable:!0,get:()=>t[i]})}}return n.default=t,Object.freeze(n)}const v=Ke(X);function Ie(t,n){return process.env.NODE_ENV==="production"?()=>null:function(...l){return t(...l)||n(...l)}}function ke(t){return t&&t.ownerDocument||document}function Ne(t){const n=v.useRef(t);return ve.useEnhancedEffect(()=>{n.current=t}),v.useRef((...i)=>(0,n.current)(...i)).current}function ue(t,n=Number.MIN_SAFE_INTEGER,i=Number.MAX_SAFE_INTEGER){return Math.max(n,Math.min(t,i))}function Ae(t){return typeof t=="string"}function ze(t,n,i){return typeof t=="function"?t(n,i):t}const Me="Slider";function Ye(t){return e.generateUtilityClass(Me,t)}e.generateUtilityClasses(Me,["root","active","focusVisible","disabled","dragging","marked","vertical","trackInverted","trackFalse","rail","track","mark","markActive","markLabel","markLabelActive","thumb"]);const Ge=2;function Ve(t,n){return t-n}function Re(t,n){const{index:i}=t.reduce((l,f,y)=>{const P=Math.abs(n-f);return l===null||P<l.distance||P===l.distance?{distance:P,index:y}:l},null)??{};return i}function be(t,n){if(n.current!==void 0&&t.changedTouches){const i=t;for(let l=0;l<i.changedTouches.length;l+=1){const f=i.changedTouches[l];if(f.identifier===n.current)return{x:f.clientX,y:f.clientY}}return!1}return{x:t.clientX,y:t.clientY}}function xe(t,n,i){return(t-n)*100/(i-n)}function Xe(t,n,i){return(i-n)*t+n}function Be(t){if(Math.abs(t)<1){const i=t.toExponential().split("e-"),l=i[0].split(".")[1];return(l?l.length:0)+parseInt(i[1],10)}const n=t.toString().split(".")[1];return n?n.length:0}function We(t,n,i){const l=Math.round((t-i)/n)*n+i;return Number(l.toFixed(Be(n)))}function je({values:t,newValue:n,index:i}){const l=t.slice();return l[i]=n,l.sort(Ve)}function Te({sliderRef:t,activeIndex:n,setActive:i}){var f,y,P;const l=ke(t.current);(!((f=t.current)!=null&&f.contains(l.activeElement))||Number((y=l==null?void 0:l.activeElement)==null?void 0:y.getAttribute("data-index"))!==n)&&((P=t.current)==null||P.querySelector(`[type="range"][data-index="${n}"]`).focus()),i&&i(n)}function ge(t,n){return typeof t=="number"&&typeof n=="number"?t===n:typeof t=="object"&&typeof n=="object"?ve.areArraysEqual(t,n):!1}const Je={horizontal:{offset:t=>({left:`${t}%`}),leap:t=>({width:`${t}%`})},"horizontal-reverse":{offset:t=>({right:`${t}%`}),leap:t=>({width:`${t}%`})},vertical:{offset:t=>({bottom:`${t}%`}),leap:t=>({height:`${t}%`})}},Qe=t=>t;let Pe;function we(){return Pe===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?Pe=CSS.supports("touch-action","none"):Pe=!0),Pe}function Ze(t){const{"aria-labelledby":n,defaultValue:i,disabled:l=!1,disableSwap:f=!1,isRtl:y=!1,marks:P=!1,max:x=100,min:d=0,name:O,onChange:I,onChangeCommitted:F,orientation:R="horizontal",rootRef:M,scale:q=Qe,step:j=1,shiftStep:B=10,tabIndex:re,value:w}=t,h=v.useRef(void 0),[$,W]=v.useState(-1),[J,Q]=v.useState(-1),[U,ce]=v.useState(!1),Z=v.useRef(0),[b,S]=Ue.useControlled({controlled:w,default:i??d,name:"Slider"}),C=I&&((r,o,a)=>{const c=r.nativeEvent||r,u=new c.constructor(c.type,c);Object.defineProperty(u,"target",{writable:!0,value:{value:o,name:O}}),I(u,o,a)}),K=Array.isArray(b);let m=K?b.slice().sort(Ve):[b];m=m.map(r=>r==null?d:ue(r,d,x));const oe=P===!0&&j!==null?[...Array(Math.floor((x-d)/j)+1)].map((r,o)=>({value:d+j*o})):P||[],A=oe.map(r=>r.value),[pe,z]=v.useState(-1),T=v.useRef(null),ne=e.useForkRef(M,T),se=r=>o=>{var c;const a=Number(o.currentTarget.getAttribute("data-index"));e.isFocusVisible(o.target)&&z(a),Q(a),(c=r==null?void 0:r.onFocus)==null||c.call(r,o)},he=r=>o=>{var a;e.isFocusVisible(o.target)||z(-1),Q(-1),(a=r==null?void 0:r.onBlur)==null||a.call(r,o)},H=(r,o)=>{const a=Number(r.currentTarget.getAttribute("data-index")),c=m[a],u=A.indexOf(c);let s=o;if(oe&&j==null){const _=A[A.length-1];s>_?s=_:s<A[0]?s=A[0]:s=s<c?A[u-1]:A[u+1]}if(s=ue(s,d,x),K){f&&(s=ue(s,m[a-1]||-1/0,m[a+1]||1/0));const _=s;s=je({values:m,newValue:s,index:a});let L=a;f||(L=s.indexOf(_)),Te({sliderRef:T,activeIndex:L})}S(s),z(a),C&&!ge(s,b)&&C(r,s,a),F&&F(r,s)},E=r=>o=>{var a;if(j!==null){const c=Number(o.currentTarget.getAttribute("data-index")),u=m[c];let s=null;(o.key==="ArrowLeft"||o.key==="ArrowDown")&&o.shiftKey||o.key==="PageDown"?s=Math.max(u-B,d):((o.key==="ArrowRight"||o.key==="ArrowUp")&&o.shiftKey||o.key==="PageUp")&&(s=Math.min(u+B,x)),s!==null&&(H(o,s),o.preventDefault())}(a=r==null?void 0:r.onKeyDown)==null||a.call(r,o)};ve.useEnhancedEffect(()=>{var r;l&&T.current.contains(document.activeElement)&&((r=document.activeElement)==null||r.blur())},[l]),l&&$!==-1&&W(-1),l&&pe!==-1&&z(-1);const Se=r=>o=>{var a;(a=r.onChange)==null||a.call(r,o),H(o,o.target.valueAsNumber)},de=v.useRef(void 0);let ee=R;y&&R==="horizontal"&&(ee+="-reverse");const k=({finger:r,move:o=!1})=>{const{current:a}=T,{width:c,height:u,bottom:s,left:_}=a.getBoundingClientRect();let L;ee.startsWith("vertical")?L=(s-r.y)/u:L=(r.x-_)/c,ee.indexOf("-reverse")!==-1&&(L=1-L);let p;if(p=Xe(L,d,x),j)p=We(p,j,d);else{const Le=Re(A,p);p=A[Le]}p=ue(p,d,x);let G=0;if(K){o?G=de.current:G=Re(m,p),f&&(p=ue(p,m[G-1]||-1/0,m[G+1]||1/0));const Le=p;p=je({values:m,newValue:p,index:G}),f&&o||(G=p.indexOf(Le),de.current=G)}return{newValue:p,activeIndex:G}},g=Ne(r=>{const o=be(r,h);if(!o)return;if(Z.current+=1,r.type==="mousemove"&&r.buttons===0){V(r);return}const{newValue:a,activeIndex:c}=k({finger:o,move:!0});Te({sliderRef:T,activeIndex:c,setActive:W}),S(a),!U&&Z.current>Ge&&ce(!0),C&&!ge(a,b)&&C(r,a,c)}),V=Ne(r=>{const o=be(r,h);if(ce(!1),!o)return;const{newValue:a}=k({finger:o,move:!0});W(-1),r.type==="touchend"&&Q(-1),F&&F(r,a),h.current=void 0,Y()}),ae=Ne(r=>{if(l)return;we()||r.preventDefault();const o=r.changedTouches[0];o!=null&&(h.current=o.identifier);const a=be(r,h);if(a!==!1){const{newValue:u,activeIndex:s}=k({finger:a});Te({sliderRef:T,activeIndex:s,setActive:W}),S(u),C&&!ge(u,b)&&C(r,u,s)}Z.current=0;const c=ke(T.current);c.addEventListener("touchmove",g,{passive:!0}),c.addEventListener("touchend",V,{passive:!0})}),Y=v.useCallback(()=>{const r=ke(T.current);r.removeEventListener("mousemove",g),r.removeEventListener("mouseup",V),r.removeEventListener("touchmove",g),r.removeEventListener("touchend",V)},[V,g]);v.useEffect(()=>{const{current:r}=T;return r.addEventListener("touchstart",ae,{passive:we()}),()=>{r.removeEventListener("touchstart",ae),Y()}},[Y,ae]),v.useEffect(()=>{l&&Y()},[l,Y]);const Ee=r=>o=>{var u;if((u=r.onMouseDown)==null||u.call(r,o),l||o.defaultPrevented||o.button!==0)return;o.preventDefault();const a=be(o,h);if(a!==!1){const{newValue:s,activeIndex:_}=k({finger:a});Te({sliderRef:T,activeIndex:_,setActive:W}),S(s),C&&!ge(s,b)&&C(o,s,_)}Z.current=0;const c=ke(T.current);c.addEventListener("mousemove",g,{passive:!0}),c.addEventListener("mouseup",V)},le=xe(K?m[0]:d,d,x),_e=xe(m[m.length-1],d,x)-le,fe=(r={})=>{const o=e.extractEventHandlers(r),a={onMouseDown:Ee(o||{})},c={...o,...a};return{...r,ref:ne,...c}},ie=r=>o=>{var c;(c=r.onMouseOver)==null||c.call(r,o);const a=Number(o.currentTarget.getAttribute("data-index"));Q(a)},te=r=>o=>{var a;(a=r.onMouseLeave)==null||a.call(r,o),Q(-1)};return{active:$,axis:ee,axisProps:Je,dragging:U,focusedThumbIndex:pe,getHiddenInputProps:(r={})=>{const o=e.extractEventHandlers(r),a={onChange:Se(o||{}),onFocus:se(o||{}),onBlur:he(o||{}),onKeyDown:E(o||{})},c={...o,...a};return{tabIndex:re,"aria-labelledby":n,"aria-orientation":R,"aria-valuemax":q(x),"aria-valuemin":q(d),name:O,type:"range",min:t.min,max:t.max,step:t.step===null&&t.marks?"any":t.step??void 0,disabled:l,...r,...c,style:{...ve.visuallyHidden,direction:y?"rtl":"ltr",width:"100%",height:"100%"}}},getRootProps:fe,getThumbProps:(r={})=>{const o=e.extractEventHandlers(r),a={onMouseOver:ie(o||{}),onMouseLeave:te(o||{})};return{...r,...o,...a}},marks:oe,open:J,range:K,rootRef:ne,trackLeap:_e,trackOffset:le,values:m,getThumbStyle:r=>({pointerEvents:$!==-1&&$!==r?"none":void 0})}}function Ce(t){return t}const He=t=>{const{disabled:n,dragging:i,marked:l,orientation:f,track:y}=t,P={root:["root",n&&"disabled",i&&"dragging",l&&"marked",f==="vertical"&&"vertical",y==="inverted"&&"trackInverted",y===!1&&"trackFalse"],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",n&&"disabled"],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return e.composeClasses(P,e.useClassNamesOverride(Ye))},De=v.forwardRef(function(n,i){const{"aria-label":l,"aria-valuetext":f,"aria-labelledby":y,className:P,disableSwap:x=!1,disabled:d=!1,getAriaLabel:O,getAriaValueText:I,marks:F=!1,max:R=100,min:M=0,name:q,onChange:j,onChangeCommitted:B,orientation:re="horizontal",shiftStep:w=10,scale:h=Ce,step:$=1,tabIndex:W,track:J="normal",value:Q,valueLabelFormat:U=Ce,isRtl:ce=!1,defaultValue:Z,slotProps:b={},slots:S={},...C}=n,K={...n,marks:F,disabled:d,disableSwap:x,isRtl:ce,defaultValue:Z,max:R,min:M,orientation:re,scale:h,step:$,shiftStep:w,track:J,valueLabelFormat:U},{axisProps:m,getRootProps:oe,getHiddenInputProps:A,getThumbProps:pe,active:z,axis:T,range:ne,focusedThumbIndex:se,dragging:he,marks:H,values:E,trackOffset:Se,trackLeap:de,getThumbStyle:ee}=Ze({...K,rootRef:i}),k={...K,marked:H.length>0&&H.some(u=>u.label),dragging:he,focusedThumbIndex:se,activeThumbIndex:z},g=He(k),V=S.root??"span",ae=e.useSlotProps({elementType:V,getSlotProps:oe,externalSlotProps:b.root,externalForwardedProps:C,ownerState:k,className:[g.root,P]}),Y=S.rail??"span",Ee=e.useSlotProps({elementType:Y,externalSlotProps:b.rail,ownerState:k,className:g.rail}),le=S.track??"span",_e=e.useSlotProps({elementType:le,externalSlotProps:b.track,additionalProps:{style:{...m[T].offset(Se),...m[T].leap(de)}},ownerState:k,className:g.track}),fe=S.thumb??"span",ie=e.useSlotProps({elementType:fe,getSlotProps:pe,externalSlotProps:b.thumb,ownerState:k,skipResolvingSlotProps:!0}),te=S.valueLabel,Oe=e.useSlotProps({elementType:te,externalSlotProps:b.valueLabel,ownerState:k}),me=S.mark??"span",ye=e.useSlotProps({elementType:me,externalSlotProps:b.mark,ownerState:k,className:g.mark}),r=S.markLabel??"span",o=e.useSlotProps({elementType:r,externalSlotProps:b.markLabel,ownerState:k}),a=S.input||"input",c=e.useSlotProps({elementType:a,getSlotProps:A,externalSlotProps:b.input,ownerState:k});return N.jsxRuntimeExports.jsxs(V,{...ae,children:[N.jsxRuntimeExports.jsx(Y,{...Ee}),N.jsxRuntimeExports.jsx(le,{..._e}),H.filter(u=>u.value>=M&&u.value<=R).map((u,s)=>{const _=xe(u.value,M,R),L=m[T].offset(_);let p;return J===!1?p=E.indexOf(u.value)!==-1:p=J==="normal"&&(ne?u.value>=E[0]&&u.value<=E[E.length-1]:u.value<=E[0])||J==="inverted"&&(ne?u.value<=E[0]||u.value>=E[E.length-1]:u.value>=E[0]),N.jsxRuntimeExports.jsxs(v.Fragment,{children:[N.jsxRuntimeExports.jsx(me,{"data-index":s,...ye,...!Ae(me)&&{markActive:p},style:{...L,...ye.style},className:e.clsx(ye.className,p&&g.markActive)}),u.label!=null?N.jsxRuntimeExports.jsx(r,{"aria-hidden":!0,"data-index":s,...o,...!Ae(r)&&{markLabelActive:p},style:{...L,...o.style},className:e.clsx(g.markLabel,o.className,p&&g.markLabelActive),children:u.label}):null]},s)}),E.map((u,s)=>{const _=xe(u,M,R),L=m[T].offset(_),p=ze(b.thumb,k,{index:s,focused:se===s,active:z===s});return N.jsxRuntimeExports.jsxs(fe,{"data-index":s,...ie,...p,className:e.clsx(g.thumb,ie.className,p==null?void 0:p.className,z===s&&g.active,se===s&&g.focusVisible),style:{...L,...ee(s),...ie.style,...p==null?void 0:p.style},children:[N.jsxRuntimeExports.jsx(a,{"data-index":s,"aria-label":O?O(s):l,"aria-valuenow":h(u),"aria-labelledby":y,"aria-valuetext":I?I(h(u),s):f,value:E[s],...c}),te?N.jsxRuntimeExports.jsx(te,{...!Ae(te)&&{valueLabelFormat:U,index:s,disabled:d},...Oe,children:typeof U=="function"?U(h(u),s):U}):null]},s)})]})});process.env.NODE_ENV!=="production"&&(De.propTypes={"aria-label":Ie(e.PropTypes.string,t=>Array.isArray(t.value||t.defaultValue)&&t["aria-label"]!=null?new Error("MUI: You need to use the `getAriaLabel` prop instead of `aria-label` when using a range slider."):null),"aria-labelledby":e.PropTypes.string,"aria-valuetext":Ie(e.PropTypes.string,t=>Array.isArray(t.value||t.defaultValue)&&t["aria-valuetext"]!=null?new Error("MUI: You need to use the `getAriaValueText` prop instead of `aria-valuetext` when using a range slider."):null),defaultValue:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.number),e.PropTypes.number]),disabled:e.PropTypes.bool,disableSwap:e.PropTypes.bool,getAriaLabel:e.PropTypes.func,getAriaValueText:e.PropTypes.func,isRtl:e.PropTypes.bool,marks:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.shape({label:e.PropTypes.node,value:e.PropTypes.number.isRequired})),e.PropTypes.bool]),max:e.PropTypes.number,min:e.PropTypes.number,name:e.PropTypes.string,onChange:e.PropTypes.func,onChangeCommitted:e.PropTypes.func,orientation:e.PropTypes.oneOf(["horizontal","vertical"]),scale:e.PropTypes.func,shiftStep:e.PropTypes.number,slotProps:e.PropTypes.shape({input:e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object]),mark:e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object]),markLabel:e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object]),rail:e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object]),root:e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object]),thumb:e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object]),track:e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object]),valueLabel:e.PropTypes.oneOfType([e.PropTypes.any,e.PropTypes.func])}),slots:e.PropTypes.shape({input:e.PropTypes.elementType,mark:e.PropTypes.elementType,markLabel:e.PropTypes.elementType,rail:e.PropTypes.elementType,root:e.PropTypes.elementType,thumb:e.PropTypes.elementType,track:e.PropTypes.elementType,valueLabel:e.PropTypes.elementType}),step:e.PropTypes.number,tabIndex:e.PropTypes.number,track:e.PropTypes.oneOf(["inverted","normal",!1]),value:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.number),e.PropTypes.number]),valueLabelFormat:e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.string])});const et="gradientMove",tt="fadeInKeyframe",rt={"prokodo-Slider":"prokodo-Slider","prokodo-Slider__label":"prokodo-Slider__label","prokodo-Slider__root":"prokodo-Slider__root","prokodo-Slider__root--disabled":"prokodo-Slider__root--disabled","prokodo-Slider__rail":"prokodo-Slider__rail","prokodo-Slider__track":"prokodo-Slider__track","prokodo-Slider__thumb":"prokodo-Slider__thumb","prokodo-Slider__thumb--focused":"prokodo-Slider__thumb--focused","prokodo-Slider__mark":"prokodo-Slider__mark","prokodo-Slider__mark__label":"prokodo-Slider__mark__label","prokodo-Slider__valueText":"prokodo-Slider__valueText",gradientMove:et,fadeInKeyframe:tt},D=qe.create(rt,"Slider"),Fe=X.memo(({id:t,className:n,required:i,value:l,label:f,labelProps:y,valueLabelProps:P,disabled:x,onFocus:d,onBlur:O,onChange:I,...F})=>{const[R,M]=X.useState(Number(l)??0),[q,j]=X.useState(!1),B=X.useCallback(w=>{j(!q),q?O==null||O(w):d==null||d(w)},[q,d,O]);X.useEffect(()=>{l!==void 0&&M(Number(l))},[l]);const re=X.useCallback((w,h,$)=>{M(h),I==null||I(w,h,$)},[I]);return N.jsxRuntimeExports.jsxs("div",{className:D(void 0,void 0,n),children:[N.jsxRuntimeExports.jsx($e.Label,{...y,className:D("label"),htmlFor:t,label:f,required:i}),N.jsxRuntimeExports.jsx(De,{marks:!0,"aria-label":f,id:t,...F,disabled:x,value:R,slotProps:{root:{className:D("root",{disabled:!!x})},rail:{className:D("rail")},track:{className:D("track")},thumb:{className:D("thumb",{focused:q})},mark:{className:D("mark")},markLabel:{className:D("mark__label")}},slots:{valueLabel:({children:w})=>N.jsxRuntimeExports.jsx("span",{...P,className:D("valueText",void 0,y==null?void 0:y.className),children:w})},onBlur:B,onChange:re,onFocus:B})]})});Fe.displayName="Slider";exports.Slider=Fe;
@@ -0,0 +1 @@
1
+ "use strict";const t=require("./jsx-runtime-CITbqOLs.js"),v=require("react"),N=require("./Icon-eWdA85cf.js"),y=require("./bem-DC5wv0dD.js"),E=require("./validations-Cnxtn28y.js"),$="gradientMove",q="fadeInKeyframe",I={"prokodo-Stepper":"prokodo-Stepper","prokodo-Stepper__step":"prokodo-Stepper__step","prokodo-Stepper__step--is-active":"prokodo-Stepper__step--is-active","prokodo-Stepper__icon":"prokodo-Stepper__icon","prokodo-Stepper__icon__container":"prokodo-Stepper__icon__container","prokodo-Stepper__icon__container--is-active":"prokodo-Stepper__icon__container--is-active","prokodo-Stepper__icon__label":"prokodo-Stepper__icon__label","prokodo-Stepper__icon__label--is-active":"prokodo-Stepper__icon__label--is-active","prokodo-Stepper__icon__completed":"prokodo-Stepper__icon__completed","prokodo-Stepper__icon__completed__container":"prokodo-Stepper__icon__completed__container","prokodo-Stepper__label":"prokodo-Stepper__label","prokodo-Stepper__label--is-active":"prokodo-Stepper__label--is-active","prokodo-Stepper__label__text":"prokodo-Stepper__label__text","prokodo-Stepper__label__text--is-active":"prokodo-Stepper__label__text--is-active",gradientMove:$,fadeInKeyframe:q},r=y.create(I,"Stepper"),K=({ref:S,className:b,steps:x,initialStep:j,onChangeStep:i,translations:o,...f})=>{const u=v.useRef([]),[d,k]=v.useState(j??1);v.useImperativeHandle(S,()=>({jumpToStep:s=>k(s)}),[]);const R=(s,e)=>{var a;s.key==="ArrowLeft"&&e>0&&(k(e-1),(a=u.current[e-1])==null||a.focus(),i==null||i(e-1))};return t.jsxRuntimeExports.jsx("ol",{...f,"aria-label":(o==null?void 0:o.stepper)??"Stepper Navigation",className:r(void 0,void 0,b),children:x.map((s,e)=>{const{key:a,label:l,labelProps:n,...m}=s,p=e===d,c=d>e;return t.jsxRuntimeExports.jsx("li",{"aria-current":p?"step":void 0,"aria-disabled":!c&&!p?"true":void 0,className:r("step",{"is-active":p||c},m==null?void 0:m.className),...m,children:E.isString(l)&&t.jsxRuntimeExports.jsxs("div",{...n,"aria-describedby":`step-${e}-description`,"aria-labelledby":`step-${e}-label`,className:r("label",{"is-active":!!p},n==null?void 0:n.className),children:[t.jsxRuntimeExports.jsx("div",{ref:_=>{_&&(u.current[e]=_)},role:"button",tabIndex:p?0:-1,"aria-label":`${(o==null?void 0:o.step)??"Step"} ${e+1} ${l}. ${c?(o==null?void 0:o.status.completed)??"Completed. Press Enter to jump back to this step.":(o==null?void 0:o.status.open)??"Open. Future step and therefore deactivated."}`,className:r("icon__container",{"is-active":p||c}),onKeyDown:_=>R(_,e),onClick:()=>{var _;d!==e&&d>e&&(k(e),(_=u.current[e])==null||_.focus(),i==null||i(e))},children:t.jsxRuntimeExports.jsx("span",{className:r("icon__label",{"is-active":p||c}),children:c?t.jsxRuntimeExports.jsx("div",{className:r("icon__completed__container"),children:t.jsxRuntimeExports.jsx(N.Icon,{className:r("icon__completed"),name:"Tick01Icon",size:"md"})}):e+1})}),t.jsxRuntimeExports.jsx("span",{className:r("label__text",{"is-active":p||c}),children:l})]})},l??`step-${a}`)})})};exports.Stepper=K;
@@ -0,0 +1,135 @@
1
+ import { j as r } from "./jsx-runtime-C5mzlN2N.js";
2
+ import { useRef as N, useState as y, useImperativeHandle as $ } from "react";
3
+ import { I } from "./Icon-BMrVlROP.js";
4
+ import { c as K } from "./bem-CYKrPjje.js";
5
+ import { i as w } from "./validations-B_cxltQ_.js";
6
+ const M = "gradientMove", R = "fadeInKeyframe", A = {
7
+ "prokodo-Stepper": "prokodo-Stepper",
8
+ "prokodo-Stepper__step": "prokodo-Stepper__step",
9
+ "prokodo-Stepper__step--is-active": "prokodo-Stepper__step--is-active",
10
+ "prokodo-Stepper__icon": "prokodo-Stepper__icon",
11
+ "prokodo-Stepper__icon__container": "prokodo-Stepper__icon__container",
12
+ "prokodo-Stepper__icon__container--is-active": "prokodo-Stepper__icon__container--is-active",
13
+ "prokodo-Stepper__icon__label": "prokodo-Stepper__icon__label",
14
+ "prokodo-Stepper__icon__label--is-active": "prokodo-Stepper__icon__label--is-active",
15
+ "prokodo-Stepper__icon__completed": "prokodo-Stepper__icon__completed",
16
+ "prokodo-Stepper__icon__completed__container": "prokodo-Stepper__icon__completed__container",
17
+ "prokodo-Stepper__label": "prokodo-Stepper__label",
18
+ "prokodo-Stepper__label--is-active": "prokodo-Stepper__label--is-active",
19
+ "prokodo-Stepper__label__text": "prokodo-Stepper__label__text",
20
+ "prokodo-Stepper__label__text--is-active": "prokodo-Stepper__label__text--is-active",
21
+ gradientMove: M,
22
+ fadeInKeyframe: R
23
+ }, _ = K(A, "Stepper"), B = ({
24
+ ref: b,
25
+ className: n,
26
+ steps: f,
27
+ initialStep: u,
28
+ onChangeStep: i,
29
+ translations: o,
30
+ ...x
31
+ }) => {
32
+ const v = N([]), [a, S] = y(u ?? 1);
33
+ $(
34
+ b,
35
+ () => ({
36
+ jumpToStep: (d) => S(d)
37
+ }),
38
+ []
39
+ );
40
+ const j = (d, e) => {
41
+ var s;
42
+ d.key === "ArrowLeft" && e > 0 && (S(e - 1), (s = v.current[e - 1]) == null || s.focus(), i == null || i(e - 1));
43
+ };
44
+ return /* @__PURE__ */ r.jsx(
45
+ "ol",
46
+ {
47
+ ...x,
48
+ "aria-label": (o == null ? void 0 : o.stepper) ?? "Stepper Navigation",
49
+ className: _(void 0, void 0, n),
50
+ children: f.map((d, e) => {
51
+ const { key: s, label: l, labelProps: m, ...k } = d, p = e === a, t = a > e;
52
+ return /* @__PURE__ */ r.jsx(
53
+ "li",
54
+ {
55
+ "aria-current": p ? "step" : void 0,
56
+ "aria-disabled": !t && !p ? "true" : void 0,
57
+ className: _(
58
+ "step",
59
+ {
60
+ "is-active": p || t
61
+ },
62
+ k == null ? void 0 : k.className
63
+ ),
64
+ ...k,
65
+ children: w(l) && /* @__PURE__ */ r.jsxs(
66
+ "div",
67
+ {
68
+ ...m,
69
+ "aria-describedby": `step-${e}-description`,
70
+ "aria-labelledby": `step-${e}-label`,
71
+ className: _(
72
+ "label",
73
+ {
74
+ "is-active": !!p
75
+ },
76
+ m == null ? void 0 : m.className
77
+ ),
78
+ children: [
79
+ /* @__PURE__ */ r.jsx(
80
+ "div",
81
+ {
82
+ ref: (c) => {
83
+ c && (v.current[e] = c);
84
+ },
85
+ role: "button",
86
+ tabIndex: p ? 0 : -1,
87
+ "aria-label": `${(o == null ? void 0 : o.step) ?? "Step"} ${e + 1} ${l}. ${t ? (o == null ? void 0 : o.status.completed) ?? "Completed. Press Enter to jump back to this step." : (o == null ? void 0 : o.status.open) ?? "Open. Future step and therefore deactivated."}`,
88
+ className: _("icon__container", {
89
+ "is-active": p || t
90
+ }),
91
+ onKeyDown: (c) => j(c, e),
92
+ onClick: () => {
93
+ var c;
94
+ a !== e && a > e && (S(e), (c = v.current[e]) == null || c.focus(), i == null || i(e));
95
+ },
96
+ children: /* @__PURE__ */ r.jsx(
97
+ "span",
98
+ {
99
+ className: _("icon__label", {
100
+ "is-active": p || t
101
+ }),
102
+ children: t ? /* @__PURE__ */ r.jsx("div", { className: _("icon__completed__container"), children: /* @__PURE__ */ r.jsx(
103
+ I,
104
+ {
105
+ className: _("icon__completed"),
106
+ name: "Tick01Icon",
107
+ size: "md"
108
+ }
109
+ ) }) : e + 1
110
+ }
111
+ )
112
+ }
113
+ ),
114
+ /* @__PURE__ */ r.jsx(
115
+ "span",
116
+ {
117
+ className: _("label__text", {
118
+ "is-active": p || t
119
+ }),
120
+ children: l
121
+ }
122
+ )
123
+ ]
124
+ }
125
+ )
126
+ },
127
+ l ?? `step-${s}`
128
+ );
129
+ })
130
+ }
131
+ );
132
+ };
133
+ export {
134
+ B as S
135
+ };
@@ -0,0 +1,330 @@
1
+ import { j as d } from "./jsx-runtime-C5mzlN2N.js";
2
+ import * as O from "react";
3
+ import { useState as q, useCallback as B } from "react";
4
+ import { c as H } from "./bem-CYKrPjje.js";
5
+ import { I as K } from "./Icon-BMrVlROP.js";
6
+ import { L as A } from "./Label-DRUCdGoX.js";
7
+ import { u as L, i as F, g as $, a as z, b as C, c as D, d as G, P as o } from "./ClassNameConfigurator-Ce5BUPXc.js";
8
+ import { u as J } from "./useControlled-BYdyS7Pn.js";
9
+ function Q(l) {
10
+ const {
11
+ checked: r,
12
+ defaultChecked: s,
13
+ disabled: p,
14
+ onBlur: u,
15
+ onChange: _,
16
+ onFocus: S,
17
+ onFocusVisible: h,
18
+ readOnly: b,
19
+ required: g
20
+ } = l, [y, N] = J({
21
+ controlled: r,
22
+ default: !!s,
23
+ name: "Switch",
24
+ state: "checked"
25
+ }), t = (e) => (c) => {
26
+ var n;
27
+ c.nativeEvent.defaultPrevented || (N(c.target.checked), _ == null || _(c), (n = e.onChange) == null || n.call(e, c));
28
+ }, [a, w] = O.useState(!1);
29
+ p && a && w(!1);
30
+ const k = O.useRef(null), m = (e) => (c) => {
31
+ var n;
32
+ k.current || (k.current = c.currentTarget), F(c.target) && (w(!0), h == null || h(c)), S == null || S(c), (n = e.onFocus) == null || n.call(e, c);
33
+ }, f = (e) => (c) => {
34
+ var n;
35
+ F(c.target) || w(!1), u == null || u(c), (n = e.onBlur) == null || n.call(e, c);
36
+ }, x = L(k);
37
+ return {
38
+ checked: y,
39
+ disabled: !!p,
40
+ focusVisible: a,
41
+ getInputProps: (e = {}) => ({
42
+ checked: r,
43
+ defaultChecked: s,
44
+ disabled: p,
45
+ readOnly: b,
46
+ ref: x,
47
+ required: g,
48
+ type: "checkbox",
49
+ role: "switch",
50
+ "aria-checked": r,
51
+ ...e,
52
+ onChange: t(e),
53
+ onFocus: m(e),
54
+ onBlur: f(e)
55
+ }),
56
+ inputRef: x,
57
+ readOnly: !!b
58
+ };
59
+ }
60
+ const R = "Switch";
61
+ function W(l) {
62
+ return z(R, l);
63
+ }
64
+ $(R, ["root", "input", "track", "thumb", "checked", "disabled", "focusVisible", "readOnly"]);
65
+ const X = (l) => {
66
+ const {
67
+ checked: r,
68
+ disabled: s,
69
+ focusVisible: p,
70
+ readOnly: u
71
+ } = l;
72
+ return D({
73
+ root: ["root", r && "checked", s && "disabled", p && "focusVisible", u && "readOnly"],
74
+ thumb: ["thumb"],
75
+ input: ["input"],
76
+ track: ["track"]
77
+ }, G(W));
78
+ }, V = /* @__PURE__ */ O.forwardRef(function(r, s) {
79
+ const {
80
+ checked: p,
81
+ defaultChecked: u,
82
+ disabled: _,
83
+ onBlur: S,
84
+ onChange: h,
85
+ onFocus: b,
86
+ onFocusVisible: g,
87
+ readOnly: y,
88
+ required: N,
89
+ slotProps: t = {},
90
+ slots: a = {},
91
+ ...w
92
+ } = r, {
93
+ getInputProps: k,
94
+ checked: m,
95
+ disabled: f,
96
+ focusVisible: x,
97
+ readOnly: T
98
+ } = Q(r), e = {
99
+ ...r,
100
+ checked: m,
101
+ disabled: f,
102
+ focusVisible: x,
103
+ readOnly: T
104
+ }, c = X(e), n = a.root ?? "span", E = C({
105
+ elementType: n,
106
+ externalSlotProps: t.root,
107
+ externalForwardedProps: w,
108
+ additionalProps: {
109
+ ref: s
110
+ },
111
+ ownerState: e,
112
+ className: c.root
113
+ }), j = a.thumb ?? "span", M = C({
114
+ elementType: j,
115
+ externalSlotProps: t.thumb,
116
+ ownerState: e,
117
+ className: c.thumb
118
+ }), P = a.input ?? "input", v = C({
119
+ elementType: P,
120
+ getSlotProps: k,
121
+ externalSlotProps: t.input,
122
+ ownerState: e,
123
+ className: c.input
124
+ }), I = a.track === null ? () => null : a.track ?? "span", U = C({
125
+ elementType: I,
126
+ externalSlotProps: t.track,
127
+ ownerState: e,
128
+ className: c.track
129
+ });
130
+ return /* @__PURE__ */ d.jsxs(n, {
131
+ ...E,
132
+ children: [/* @__PURE__ */ d.jsx(I, {
133
+ ...U
134
+ }), /* @__PURE__ */ d.jsx(j, {
135
+ ...M
136
+ }), /* @__PURE__ */ d.jsx(P, {
137
+ ...v
138
+ })]
139
+ });
140
+ });
141
+ process.env.NODE_ENV !== "production" && (V.propTypes = {
142
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
143
+ // │ These PropTypes are generated from the TypeScript type definitions. │
144
+ // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
145
+ // └─────────────────────────────────────────────────────────────────────┘
146
+ /**
147
+ * If `true`, the component is checked.
148
+ */
149
+ checked: o.bool,
150
+ /**
151
+ * Class name applied to the root element.
152
+ */
153
+ className: o.string,
154
+ /**
155
+ * The default checked state. Use when the component is not controlled.
156
+ */
157
+ defaultChecked: o.bool,
158
+ /**
159
+ * If `true`, the component is disabled.
160
+ */
161
+ disabled: o.bool,
162
+ /**
163
+ * @ignore
164
+ */
165
+ onBlur: o.func,
166
+ /**
167
+ * Callback fired when the state is changed.
168
+ *
169
+ * @param {React.ChangeEvent<HTMLInputElement>} event The event source of the callback.
170
+ * You can pull out the new value by accessing `event.target.value` (string).
171
+ * You can pull out the new checked state by accessing `event.target.checked` (boolean).
172
+ */
173
+ onChange: o.func,
174
+ /**
175
+ * @ignore
176
+ */
177
+ onFocus: o.func,
178
+ /**
179
+ * @ignore
180
+ */
181
+ onFocusVisible: o.func,
182
+ /**
183
+ * If `true`, the component is read only.
184
+ */
185
+ readOnly: o.bool,
186
+ /**
187
+ * If `true`, the `input` element is required.
188
+ */
189
+ required: o.bool,
190
+ /**
191
+ * The props used for each slot inside the Switch.
192
+ * @default {}
193
+ */
194
+ slotProps: o.shape({
195
+ input: o.oneOfType([o.func, o.object]),
196
+ root: o.oneOfType([o.func, o.object]),
197
+ thumb: o.oneOfType([o.func, o.object]),
198
+ track: o.oneOfType([o.func, o.object])
199
+ }),
200
+ /**
201
+ * The components used for each slot inside the Switch.
202
+ * Either a string to use a HTML element or a component.
203
+ * @default {}
204
+ */
205
+ slots: o.shape({
206
+ input: o.elementType,
207
+ root: o.elementType,
208
+ thumb: o.elementType,
209
+ track: o.oneOfType([o.elementType, o.oneOf([null])])
210
+ })
211
+ });
212
+ const Y = "gradientMove", Z = "fadeInKeyframe", oo = {
213
+ "prokodo-Switch": "prokodo-Switch",
214
+ "prokodo-Switch__label": "prokodo-Switch__label",
215
+ "prokodo-Switch__label__content": "prokodo-Switch__label__content",
216
+ "prokodo-Switch__control": "prokodo-Switch__control",
217
+ "prokodo-Switch__control--checked": "prokodo-Switch__control--checked",
218
+ "prokodo-Switch__control--disabled": "prokodo-Switch__control--disabled",
219
+ "prokodo-Switch__input": "prokodo-Switch__input",
220
+ "prokodo-Switch__icon": "prokodo-Switch__icon",
221
+ "prokodo-Switch__icon__wrapper": "prokodo-Switch__icon__wrapper",
222
+ "prokodo-Switch__icon--primary": "prokodo-Switch__icon--primary",
223
+ "prokodo-Switch__icon--secondary": "prokodo-Switch__icon--secondary",
224
+ "prokodo-Switch__icon--success": "prokodo-Switch__icon--success",
225
+ "prokodo-Switch__icon--error": "prokodo-Switch__icon--error",
226
+ "prokodo-Switch__icon--info": "prokodo-Switch__icon--info",
227
+ "prokodo-Switch__icon--warning": "prokodo-Switch__icon--warning",
228
+ "prokodo-Switch__icon__container": "prokodo-Switch__icon__container",
229
+ "prokodo-Switch__icon__container--checked": "prokodo-Switch__icon__container--checked",
230
+ "prokodo-Switch__thumb": "prokodo-Switch__thumb",
231
+ "prokodo-Switch__track": "prokodo-Switch__track",
232
+ "prokodo-Switch__track--checked": "prokodo-Switch__track--checked",
233
+ "prokodo-Switch__track--disabled": "prokodo-Switch__track--disabled",
234
+ gradientMove: Y,
235
+ fadeInKeyframe: Z
236
+ }, i = H(oo, "Switch"), eo = ({
237
+ variant: l = "primary",
238
+ required: r,
239
+ name: s,
240
+ label: p,
241
+ labelProps: u,
242
+ icon: _,
243
+ checked: S,
244
+ disabled: h,
245
+ checkedIcon: b,
246
+ className: g,
247
+ onChange: y,
248
+ ...N
249
+ }) => {
250
+ const [t, a] = q(S ?? !1), w = B(
251
+ (m) => {
252
+ const f = m.target.checked;
253
+ a(f), y && y(m, f);
254
+ },
255
+ [y]
256
+ ), k = B(
257
+ (m, f) => /* @__PURE__ */ d.jsx("span", { "aria-hidden": "true", className: i("icon__wrapper"), children: /* @__PURE__ */ d.jsx(
258
+ K,
259
+ {
260
+ className: i("icon", { isActive: !!f }),
261
+ name: m,
262
+ size: "sm"
263
+ }
264
+ ) }),
265
+ []
266
+ );
267
+ return /* @__PURE__ */ d.jsx("div", { className: i(void 0, { [l]: !0 }, g), children: /* @__PURE__ */ d.jsxs(
268
+ A,
269
+ {
270
+ ...u,
271
+ className: i("label"),
272
+ htmlFor: s,
273
+ label: p,
274
+ required: r,
275
+ contentProps: {
276
+ className: i("label__content")
277
+ },
278
+ textProps: {
279
+ "aria-hidden": "true"
280
+ },
281
+ children: [
282
+ /* @__PURE__ */ d.jsx(
283
+ V,
284
+ {
285
+ "aria-checked": t,
286
+ "aria-disabled": h,
287
+ "aria-labelledby": `${s}-label-text`,
288
+ "aria-required": r ? "true" : void 0,
289
+ checked: t,
290
+ disabled: h,
291
+ id: s,
292
+ role: "switch",
293
+ ...N,
294
+ className: i("control", {
295
+ checked: t,
296
+ disabled: !!h
297
+ }),
298
+ slotProps: {
299
+ track: {
300
+ className: i("track")
301
+ },
302
+ thumb: {
303
+ className: i("thumb")
304
+ },
305
+ input: {
306
+ className: i("input"),
307
+ "aria-hidden": !0
308
+ }
309
+ },
310
+ onChange: w
311
+ }
312
+ ),
313
+ _ && b && /* @__PURE__ */ d.jsx(
314
+ "div",
315
+ {
316
+ "aria-hidden": "true",
317
+ className: i("icon__container", {
318
+ checked: t
319
+ }),
320
+ children: k(t ? b : _, t)
321
+ }
322
+ )
323
+ ]
324
+ }
325
+ ) });
326
+ };
327
+ eo.displayName = "Switch";
328
+ export {
329
+ eo as S
330
+ };
@@ -0,0 +1 @@
1
+ "use strict";const d=require("./jsx-runtime-CITbqOLs.js"),j=require("react"),v=require("./bem-DC5wv0dD.js"),U=require("./Icon-eWdA85cf.js"),D=require("./Label-BvCzZIGM.js"),e=require("./ClassNameConfigurator-C6UbdI-d.js"),H=require("./useControlled-Ysk4KqoX.js");function K(s){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const r in s)if(r!=="default"){const i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(c,r,i.get?i:{enumerable:!0,get:()=>s[r]})}}return c.default=s,Object.freeze(c)}const g=K(j);function $(s){const{checked:c,defaultChecked:r,disabled:i,onBlur:_,onChange:u,onFocus:m,onFocusVisible:h,readOnly:f,required:T}=s,[w,P]=H.useControlled({controlled:c,default:!!r,name:"Switch",state:"checked"}),n=o=>t=>{var a;t.nativeEvent.defaultPrevented||(P(t.target.checked),u==null||u(t),(a=o.onChange)==null||a.call(o,t))},[p,S]=g.useState(!1);i&&p&&S(!1);const k=g.useRef(null),y=o=>t=>{var a;k.current||(k.current=t.currentTarget),e.isFocusVisible(t.target)&&(S(!0),h==null||h(t)),m==null||m(t),(a=o.onFocus)==null||a.call(o,t)},b=o=>t=>{var a;e.isFocusVisible(t.target)||S(!1),_==null||_(t),(a=o.onBlur)==null||a.call(o,t)},x=e.useForkRef(k);return{checked:w,disabled:!!i,focusVisible:p,getInputProps:(o={})=>({checked:c,defaultChecked:r,disabled:i,readOnly:f,ref:x,required:T,type:"checkbox",role:"switch","aria-checked":c,...o,onChange:n(o),onFocus:y(o),onBlur:b(o)}),inputRef:x,readOnly:!!f}}const E="Switch";function z(s){return e.generateUtilityClass(E,s)}e.generateUtilityClasses(E,["root","input","track","thumb","checked","disabled","focusVisible","readOnly"]);const A=s=>{const{checked:c,disabled:r,focusVisible:i,readOnly:_}=s,u={root:["root",c&&"checked",r&&"disabled",i&&"focusVisible",_&&"readOnly"],thumb:["thumb"],input:["input"],track:["track"]};return e.composeClasses(u,e.useClassNamesOverride(z))},I=g.forwardRef(function(c,r){const{checked:i,defaultChecked:_,disabled:u,onBlur:m,onChange:h,onFocus:f,onFocusVisible:T,readOnly:w,required:P,slotProps:n={},slots:p={},...S}=c,{getInputProps:k,checked:y,disabled:b,focusVisible:x,readOnly:C}=$(c),o={...c,checked:y,disabled:b,focusVisible:x,readOnly:C},t=A(o),a=p.root??"span",q=e.useSlotProps({elementType:a,externalSlotProps:n.root,externalForwardedProps:S,additionalProps:{ref:r},ownerState:o,className:t.root}),N=p.thumb??"span",B=e.useSlotProps({elementType:N,externalSlotProps:n.thumb,ownerState:o,className:t.thumb}),O=p.input??"input",V=e.useSlotProps({elementType:O,getSlotProps:k,externalSlotProps:n.input,ownerState:o,className:t.input}),R=p.track===null?()=>null:p.track??"span",M=e.useSlotProps({elementType:R,externalSlotProps:n.track,ownerState:o,className:t.track});return d.jsxRuntimeExports.jsxs(a,{...q,children:[d.jsxRuntimeExports.jsx(R,{...M}),d.jsxRuntimeExports.jsx(N,{...B}),d.jsxRuntimeExports.jsx(O,{...V})]})});process.env.NODE_ENV!=="production"&&(I.propTypes={checked:e.PropTypes.bool,className:e.PropTypes.string,defaultChecked:e.PropTypes.bool,disabled:e.PropTypes.bool,onBlur:e.PropTypes.func,onChange:e.PropTypes.func,onFocus:e.PropTypes.func,onFocusVisible:e.PropTypes.func,readOnly:e.PropTypes.bool,required:e.PropTypes.bool,slotProps:e.PropTypes.shape({input:e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object]),root:e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object]),thumb:e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object]),track:e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object])}),slots:e.PropTypes.shape({input:e.PropTypes.elementType,root:e.PropTypes.elementType,thumb:e.PropTypes.elementType,track:e.PropTypes.oneOfType([e.PropTypes.elementType,e.PropTypes.oneOf([null])])})});const L="gradientMove",G="fadeInKeyframe",J={"prokodo-Switch":"prokodo-Switch","prokodo-Switch__label":"prokodo-Switch__label","prokodo-Switch__label__content":"prokodo-Switch__label__content","prokodo-Switch__control":"prokodo-Switch__control","prokodo-Switch__control--checked":"prokodo-Switch__control--checked","prokodo-Switch__control--disabled":"prokodo-Switch__control--disabled","prokodo-Switch__input":"prokodo-Switch__input","prokodo-Switch__icon":"prokodo-Switch__icon","prokodo-Switch__icon__wrapper":"prokodo-Switch__icon__wrapper","prokodo-Switch__icon--primary":"prokodo-Switch__icon--primary","prokodo-Switch__icon--secondary":"prokodo-Switch__icon--secondary","prokodo-Switch__icon--success":"prokodo-Switch__icon--success","prokodo-Switch__icon--error":"prokodo-Switch__icon--error","prokodo-Switch__icon--info":"prokodo-Switch__icon--info","prokodo-Switch__icon--warning":"prokodo-Switch__icon--warning","prokodo-Switch__icon__container":"prokodo-Switch__icon__container","prokodo-Switch__icon__container--checked":"prokodo-Switch__icon__container--checked","prokodo-Switch__thumb":"prokodo-Switch__thumb","prokodo-Switch__track":"prokodo-Switch__track","prokodo-Switch__track--checked":"prokodo-Switch__track--checked","prokodo-Switch__track--disabled":"prokodo-Switch__track--disabled",gradientMove:L,fadeInKeyframe:G},l=v.create(J,"Switch"),F=({variant:s="primary",required:c,name:r,label:i,labelProps:_,icon:u,checked:m,disabled:h,checkedIcon:f,className:T,onChange:w,...P})=>{const[n,p]=j.useState(m??!1),S=j.useCallback(y=>{const b=y.target.checked;p(b),w&&w(y,b)},[w]),k=j.useCallback((y,b)=>d.jsxRuntimeExports.jsx("span",{"aria-hidden":"true",className:l("icon__wrapper"),children:d.jsxRuntimeExports.jsx(U.Icon,{className:l("icon",{isActive:!!b}),name:y,size:"sm"})}),[]);return d.jsxRuntimeExports.jsx("div",{className:l(void 0,{[s]:!0},T),children:d.jsxRuntimeExports.jsxs(D.Label,{..._,className:l("label"),htmlFor:r,label:i,required:c,contentProps:{className:l("label__content")},textProps:{"aria-hidden":"true"},children:[d.jsxRuntimeExports.jsx(I,{"aria-checked":n,"aria-disabled":h,"aria-labelledby":`${r}-label-text`,"aria-required":c?"true":void 0,checked:n,disabled:h,id:r,role:"switch",...P,className:l("control",{checked:n,disabled:!!h}),slotProps:{track:{className:l("track")},thumb:{className:l("thumb")},input:{className:l("input"),"aria-hidden":!0}},onChange:S}),u&&f&&d.jsxRuntimeExports.jsx("div",{"aria-hidden":"true",className:l("icon__container",{checked:n}),children:k(n?f:u,n)})]})})};F.displayName="Switch";exports.Switch=F;
@@ -0,0 +1 @@
1
+ "use strict";const e=require("./jsx-runtime-CITbqOLs.js"),d=require("react"),j=require("./bem-DC5wv0dD.js"),c=require("./validations-Cnxtn28y.js"),N="gradientMove",w="fadeInKeyframe",R={"prokodo-Table__container":"prokodo-Table__container","prokodo-Table__container--primary":"prokodo-Table__container--primary","prokodo-Table__container--secondary":"prokodo-Table__container--secondary","prokodo-Table__container--info":"prokodo-Table__container--info","prokodo-Table":"prokodo-Table","prokodo-Table__caption":"prokodo-Table__caption","prokodo-Table__head":"prokodo-Table__head","prokodo-Table__head--primary":"prokodo-Table__head--primary","prokodo-Table__head--secondary":"prokodo-Table__head--secondary","prokodo-Table__head--info":"prokodo-Table__head--info","prokodo-Table__head__row":"prokodo-Table__head__row","prokodo-Table__head__cell":"prokodo-Table__head__cell","is-active":"is-active","is-sorted":"is-sorted","prokodo-Table__body":"prokodo-Table__body","prokodo-Table__body__row":"prokodo-Table__body__row","prokodo-Table__body__cell":"prokodo-Table__body__cell","with-icon":"with-icon",gradientMove:N,fadeInKeyframe:w},r=j.create(R,"Table"),b=d.memo(({variant:n="primary",className:t,ariaLabel:p,caption:m,headerType:i="single",data:a,headerProps:T,bodyProps:h,...k})=>{const x=d.useCallback(o=>{const _=i==="double"?{...o,scope:"row"}:o,{label:l,icon:s,className:y,...u}=_;return e.jsxRuntimeExports.jsxs("td",{className:r("cell",{"with-icon":!!s},y),...u,children:[d.isValidElement(s)?e.jsxRuntimeExports.jsx("span",{className:r("cell__icon"),children:s}):null,l]},`table-body-cell-${l}`)},[i]);return!c.isArray(a==null?void 0:a.header)||!c.isArray(a==null?void 0:a.body)?null:e.jsxRuntimeExports.jsx("div",{className:r("container",n,t),children:e.jsxRuntimeExports.jsxs("table",{"aria-label":p,className:r(void 0,n),...k,children:[e.jsxRuntimeExports.jsx("caption",{className:r("caption"),children:m}),e.jsxRuntimeExports.jsx("thead",{className:r("head",n),...T,children:e.jsxRuntimeExports.jsx("tr",{className:r("head__row"),children:a.header.map(o=>e.jsxRuntimeExports.jsx("th",{className:r("head__cell",o.className),colSpan:o.colSpan,rowSpan:o.rowSpan,children:o.label},`table-header-cell-${o.label}`))})}),e.jsxRuntimeExports.jsx("tbody",{className:r("body",n),...h,children:a.body.map(({data:o,className:_})=>{var l;return e.jsxRuntimeExports.jsx("tr",{className:r("body__row",_),children:o.map(s=>x(s))},`table-body-row-${(l=o==null?void 0:o[0])==null?void 0:l.label}`)})})]})})});b.displayName="Table";exports.Table=b;
@@ -0,0 +1,95 @@
1
+ import { j as e } from "./jsx-runtime-C5mzlN2N.js";
2
+ import { memo as f, useCallback as N, isValidElement as w } from "react";
3
+ import { c as x } from "./bem-CYKrPjje.js";
4
+ import { b as c } from "./validations-B_cxltQ_.js";
5
+ const j = "gradientMove", u = "fadeInKeyframe", g = {
6
+ "prokodo-Table__container": "prokodo-Table__container",
7
+ "prokodo-Table__container--primary": "prokodo-Table__container--primary",
8
+ "prokodo-Table__container--secondary": "prokodo-Table__container--secondary",
9
+ "prokodo-Table__container--info": "prokodo-Table__container--info",
10
+ "prokodo-Table": "prokodo-Table",
11
+ "prokodo-Table__caption": "prokodo-Table__caption",
12
+ "prokodo-Table__head": "prokodo-Table__head",
13
+ "prokodo-Table__head--primary": "prokodo-Table__head--primary",
14
+ "prokodo-Table__head--secondary": "prokodo-Table__head--secondary",
15
+ "prokodo-Table__head--info": "prokodo-Table__head--info",
16
+ "prokodo-Table__head__row": "prokodo-Table__head__row",
17
+ "prokodo-Table__head__cell": "prokodo-Table__head__cell",
18
+ "is-active": "is-active",
19
+ "is-sorted": "is-sorted",
20
+ "prokodo-Table__body": "prokodo-Table__body",
21
+ "prokodo-Table__body__row": "prokodo-Table__body__row",
22
+ "prokodo-Table__body__cell": "prokodo-Table__body__cell",
23
+ "with-icon": "with-icon",
24
+ gradientMove: j,
25
+ fadeInKeyframe: u
26
+ }, a = x(g, "Table"), v = f(
27
+ ({
28
+ variant: d = "primary",
29
+ className: b,
30
+ ariaLabel: i,
31
+ caption: p,
32
+ headerType: n = "single",
33
+ data: r,
34
+ headerProps: m,
35
+ bodyProps: t,
36
+ ...T
37
+ }) => {
38
+ const h = N(
39
+ (o) => {
40
+ const s = n === "double" ? { ...o, scope: "row" } : o, { label: l, icon: _, className: k, ...y } = s;
41
+ return /* @__PURE__ */ e.jsxs(
42
+ "td",
43
+ {
44
+ className: a("cell", { "with-icon": !!_ }, k),
45
+ ...y,
46
+ children: [
47
+ w(_) ? /* @__PURE__ */ e.jsx("span", { className: a("cell__icon"), children: _ }) : null,
48
+ l
49
+ ]
50
+ },
51
+ `table-body-cell-${l}`
52
+ );
53
+ },
54
+ [n]
55
+ );
56
+ return !c(r == null ? void 0 : r.header) || !c(r == null ? void 0 : r.body) ? null : /* @__PURE__ */ e.jsx("div", { className: a("container", d, b), children: /* @__PURE__ */ e.jsxs(
57
+ "table",
58
+ {
59
+ "aria-label": i,
60
+ className: a(void 0, d),
61
+ ...T,
62
+ children: [
63
+ /* @__PURE__ */ e.jsx("caption", { className: a("caption"), children: p }),
64
+ /* @__PURE__ */ e.jsx("thead", { className: a("head", d), ...m, children: /* @__PURE__ */ e.jsx("tr", { className: a("head__row"), children: r.header.map((o) => /* @__PURE__ */ e.jsx(
65
+ "th",
66
+ {
67
+ className: a("head__cell", o.className),
68
+ colSpan: o.colSpan,
69
+ rowSpan: o.rowSpan,
70
+ children: o.label
71
+ },
72
+ `table-header-cell-${o.label}`
73
+ )) }) }),
74
+ /* @__PURE__ */ e.jsx("tbody", { className: a("body", d), ...t, children: r.body.map(({ data: o, className: s }) => {
75
+ var l;
76
+ return /* @__PURE__ */ e.jsx(
77
+ "tr",
78
+ {
79
+ className: a("body__row", s),
80
+ children: o.map(
81
+ (_) => h(_)
82
+ )
83
+ },
84
+ `table-body-row-${(l = o == null ? void 0 : o[0]) == null ? void 0 : l.label}`
85
+ );
86
+ }) })
87
+ ]
88
+ }
89
+ ) });
90
+ }
91
+ );
92
+ v.displayName = "Table";
93
+ export {
94
+ v as T
95
+ };
@@ -0,0 +1 @@
1
+ "use strict";const s=require("./jsx-runtime-CITbqOLs.js"),x=require("react"),g=require("./bem-DC5wv0dD.js"),l=require("./validations-Cnxtn28y.js"),h=require("./Card-BPEoLzF1.js"),u=require("./Headline-CnyLLQLB.js"),j=require("./Icon-eWdA85cf.js"),N=require("./Image-B-lyA7ym.js"),R=require("./Lottie-Br7PmIzX.js"),q=require("./RichText-DVg1dwMV.js"),C="gradientMove",v="fadeInKeyframe",E={"prokodo-Teaser":"prokodo-Teaser","prokodo-Teaser__card":"prokodo-Teaser__card","prokodo-Teaser__card__content":"prokodo-Teaser__card__content","prokodo-Teaser__image":"prokodo-Teaser__image","prokodo-Teaser__image__wrapper":"prokodo-Teaser__image__wrapper","prokodo-Teaser__image__caption":"prokodo-Teaser__image__caption","prokodo-Teaser__animation":"prokodo-Teaser__animation","prokodo-Teaser__headline--has-lineClamp":"prokodo-Teaser__headline--has-lineClamp","prokodo-Teaser__content":"prokodo-Teaser__content","prokodo-Teaser__content--has-lineClamp":"prokodo-Teaser__content--has-lineClamp","prokodo-Teaser__content--align-left":"prokodo-Teaser__content--align-left","prokodo-Teaser__content--align-right":"prokodo-Teaser__content--align-right","prokodo-Teaser__link":"prokodo-Teaser__link","prokodo-Teaser__link__icon":"prokodo-Teaser__link__icon",gradientMove:C,fadeInKeyframe:v},e=g.create(E,"Teaser"),t=x.memo(({className:d,variant:n="primary",animation:_,lineClamp:i,align:r,image:p,title:a,content:m,onClick:k,redirect:o,...T})=>{var c;return s.jsxRuntimeExports.jsxs(h.Card,{variant:n,...T,className:e(void 0,void 0,d),contentClassName:e("card"),redirect:o,onClick:k,children:[_&&s.jsxRuntimeExports.jsx(R.Lottie,{animationName:_,className:e("animation")}),p&&s.jsxRuntimeExports.jsx("div",{className:e("image__wrapper"),children:s.jsxRuntimeExports.jsx(N.Image,{...p,captionClassName:e("image__caption"),className:e("image"),containerClassName:e("image")})}),s.jsxRuntimeExports.jsxs("div",{className:e("card__content"),children:[s.jsxRuntimeExports.jsx(u.Headline,{align:r??"center",size:"md",type:"h3",...a,variant:(a==null?void 0:a.variant)??n,className:e("headline",{"has-lineClamp":!!i},a==null?void 0:a.className),children:a==null?void 0:a.content}),l.isString(m)&&s.jsxRuntimeExports.jsx(q.RichText,{className:e("content",{"has-lineClamp":!!i,[`align-${r}`]:!!r}),children:m}),l.isString(o==null?void 0:o.label)&&s.jsxRuntimeExports.jsxs("span",{className:e("link"),children:[s.jsxRuntimeExports.jsx(j.Icon,{color:n,name:"ArrowRight01Icon",size:"xs",...o==null?void 0:o.icon,className:e("link__icon",void 0,(c=o==null?void 0:o.icon)==null?void 0:c.className)}),o==null?void 0:o.label]})]})]})});t.displayName="Teaser";exports.Teaser=t;