@redneckz/wildless-cms-uni-blocks 0.14.294 → 0.14.295

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 (215) hide show
  1. package/bin/migration-scripts/0.14.257.js +21 -0
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +100 -68
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/Tabs/TabsContent.d.ts +1 -1
  6. package/bundle/components/TabsLayout/TabsLayoutContent.d.ts +31 -6
  7. package/bundle/components/TabsLayout/renderTabsLayout.d.ts +11 -0
  8. package/bundle/ui-kit/TabsControl/TabItem.d.ts +5 -4
  9. package/bundle/ui-kit/TabsControl/TabsControlProps.d.ts +11 -2
  10. package/bundle/ui-kit/TabsControl/renderTab.d.ts +3 -3
  11. package/bundle/ui-kit/TabsControl/renderTabItemInner.d.ts +11 -0
  12. package/dist/components/Tabs/TabsContent.d.ts +1 -1
  13. package/dist/components/Tabs/renderTabs.js +0 -2
  14. package/dist/components/Tabs/renderTabs.js.map +1 -1
  15. package/dist/components/TabsLayout/TabsLayout.js +39 -16
  16. package/dist/components/TabsLayout/TabsLayout.js.map +1 -1
  17. package/dist/components/TabsLayout/TabsLayoutContent.d.ts +31 -6
  18. package/dist/components/TabsLayout/renderTabsLayout.d.ts +11 -0
  19. package/dist/components/TabsLayout/renderTabsLayout.js +19 -0
  20. package/dist/components/TabsLayout/renderTabsLayout.js.map +1 -0
  21. package/dist/ui-kit/TabsControl/ScrollableTabsControl.js +15 -3
  22. package/dist/ui-kit/TabsControl/ScrollableTabsControl.js.map +1 -1
  23. package/dist/ui-kit/TabsControl/TabItem.d.ts +5 -4
  24. package/dist/ui-kit/TabsControl/TabItem.js.map +1 -1
  25. package/dist/ui-kit/TabsControl/TabItemInner.js +14 -8
  26. package/dist/ui-kit/TabsControl/TabItemInner.js.map +1 -1
  27. package/dist/ui-kit/TabsControl/TabsControl.js +1 -1
  28. package/dist/ui-kit/TabsControl/TabsControl.js.map +1 -1
  29. package/dist/ui-kit/TabsControl/TabsControlProps.d.ts +11 -2
  30. package/dist/ui-kit/TabsControl/renderTab.d.ts +3 -3
  31. package/dist/ui-kit/TabsControl/renderTab.js.map +1 -1
  32. package/dist/ui-kit/TabsControl/renderTabItemInner.d.ts +11 -0
  33. package/dist/ui-kit/TabsControl/renderTabItemInner.js +23 -0
  34. package/dist/ui-kit/TabsControl/renderTabItemInner.js.map +1 -0
  35. package/lib/common.css +1 -1
  36. package/lib/components/Tabs/Tabs.fixture.d.ts +0 -1
  37. package/lib/components/Tabs/Tabs.fixture.mobile.d.ts +0 -1
  38. package/lib/components/Tabs/TabsContent.d.ts +1 -1
  39. package/lib/components/Tabs/renderTabs.js +0 -2
  40. package/lib/components/Tabs/renderTabs.js.map +1 -1
  41. package/lib/components/TabsLayout/TabsLayout.fixture.d.ts +2 -0
  42. package/lib/components/TabsLayout/TabsLayout.fixture.mobile.d.ts +2 -0
  43. package/lib/components/TabsLayout/TabsLayout.js +40 -17
  44. package/lib/components/TabsLayout/TabsLayout.js.map +1 -1
  45. package/lib/components/TabsLayout/TabsLayoutContent.d.ts +31 -6
  46. package/lib/components/TabsLayout/renderTabsLayout.d.ts +10 -0
  47. package/lib/components/TabsLayout/renderTabsLayout.js +16 -0
  48. package/lib/components/TabsLayout/renderTabsLayout.js.map +1 -0
  49. package/lib/ui-kit/TabsControl/ScrollableTabsControl.js +15 -3
  50. package/lib/ui-kit/TabsControl/ScrollableTabsControl.js.map +1 -1
  51. package/lib/ui-kit/TabsControl/TabItem.d.ts +5 -4
  52. package/lib/ui-kit/TabsControl/TabItem.js.map +1 -1
  53. package/lib/ui-kit/TabsControl/TabItemInner.js +14 -8
  54. package/lib/ui-kit/TabsControl/TabItemInner.js.map +1 -1
  55. package/lib/ui-kit/TabsControl/TabsControl.fixture.d.ts +1 -1
  56. package/lib/ui-kit/TabsControl/TabsControl.js +1 -1
  57. package/lib/ui-kit/TabsControl/TabsControl.js.map +1 -1
  58. package/lib/ui-kit/TabsControl/TabsControlProps.d.ts +11 -2
  59. package/lib/ui-kit/TabsControl/renderTab.d.ts +3 -3
  60. package/lib/ui-kit/TabsControl/renderTab.js.map +1 -1
  61. package/lib/ui-kit/TabsControl/renderTabItemInner.d.ts +10 -0
  62. package/lib/ui-kit/TabsControl/renderTabItemInner.js +20 -0
  63. package/lib/ui-kit/TabsControl/renderTabItemInner.js.map +1 -0
  64. package/mobile/bundle/bundle.umd.js +109 -77
  65. package/mobile/bundle/bundle.umd.min.js +1 -1
  66. package/mobile/bundle/components/Tabs/TabsContent.d.ts +1 -1
  67. package/mobile/bundle/components/TabsLayout/TabsLayoutContent.d.ts +31 -6
  68. package/mobile/bundle/components/TabsLayout/renderTabsLayout.d.ts +11 -0
  69. package/mobile/bundle/ui-kit/TabsControl/TabItem.d.ts +5 -4
  70. package/mobile/bundle/ui-kit/TabsControl/TabsControlProps.d.ts +11 -2
  71. package/mobile/bundle/ui-kit/TabsControl/renderTab.d.ts +3 -3
  72. package/mobile/bundle/ui-kit/TabsControl/renderTabItemInner.d.ts +11 -0
  73. package/mobile/dist/components/Tabs/TabsContent.d.ts +1 -1
  74. package/mobile/dist/components/Tabs/renderTabs.js +0 -2
  75. package/mobile/dist/components/Tabs/renderTabs.js.map +1 -1
  76. package/mobile/dist/components/TabsLayout/TabsLayout.js +39 -16
  77. package/mobile/dist/components/TabsLayout/TabsLayout.js.map +1 -1
  78. package/mobile/dist/components/TabsLayout/TabsLayoutContent.d.ts +31 -6
  79. package/mobile/dist/components/TabsLayout/renderTabsLayout.d.ts +11 -0
  80. package/mobile/dist/components/TabsLayout/renderTabsLayout.js +19 -0
  81. package/mobile/dist/components/TabsLayout/renderTabsLayout.js.map +1 -0
  82. package/mobile/dist/ui-kit/TabsControl/ScrollableTabsControl.js +15 -3
  83. package/mobile/dist/ui-kit/TabsControl/ScrollableTabsControl.js.map +1 -1
  84. package/mobile/dist/ui-kit/TabsControl/TabItem.d.ts +5 -4
  85. package/mobile/dist/ui-kit/TabsControl/TabItem.js.map +1 -1
  86. package/mobile/dist/ui-kit/TabsControl/TabItemInner.js +14 -8
  87. package/mobile/dist/ui-kit/TabsControl/TabItemInner.js.map +1 -1
  88. package/mobile/dist/ui-kit/TabsControl/TabsControl.js +1 -1
  89. package/mobile/dist/ui-kit/TabsControl/TabsControl.js.map +1 -1
  90. package/mobile/dist/ui-kit/TabsControl/TabsControlProps.d.ts +11 -2
  91. package/mobile/dist/ui-kit/TabsControl/renderTab.d.ts +3 -3
  92. package/mobile/dist/ui-kit/TabsControl/renderTab.js.map +1 -1
  93. package/mobile/dist/ui-kit/TabsControl/renderTabItemInner.d.ts +11 -0
  94. package/mobile/dist/ui-kit/TabsControl/renderTabItemInner.js +23 -0
  95. package/mobile/dist/ui-kit/TabsControl/renderTabItemInner.js.map +1 -0
  96. package/mobile/lib/common.css +1 -1
  97. package/mobile/lib/components/Tabs/TabsContent.d.ts +1 -1
  98. package/mobile/lib/components/Tabs/renderTabs.js +0 -2
  99. package/mobile/lib/components/Tabs/renderTabs.js.map +1 -1
  100. package/mobile/lib/components/TabsLayout/TabsLayout.js +40 -17
  101. package/mobile/lib/components/TabsLayout/TabsLayout.js.map +1 -1
  102. package/mobile/lib/components/TabsLayout/TabsLayoutContent.d.ts +31 -6
  103. package/mobile/lib/components/TabsLayout/renderTabsLayout.d.ts +11 -0
  104. package/mobile/lib/components/TabsLayout/renderTabsLayout.js +16 -0
  105. package/mobile/lib/components/TabsLayout/renderTabsLayout.js.map +1 -0
  106. package/mobile/lib/ui-kit/TabsControl/ScrollableTabsControl.js +15 -3
  107. package/mobile/lib/ui-kit/TabsControl/ScrollableTabsControl.js.map +1 -1
  108. package/mobile/lib/ui-kit/TabsControl/TabItem.d.ts +5 -4
  109. package/mobile/lib/ui-kit/TabsControl/TabItem.js.map +1 -1
  110. package/mobile/lib/ui-kit/TabsControl/TabItemInner.js +14 -8
  111. package/mobile/lib/ui-kit/TabsControl/TabItemInner.js.map +1 -1
  112. package/mobile/lib/ui-kit/TabsControl/TabsControl.js +1 -1
  113. package/mobile/lib/ui-kit/TabsControl/TabsControl.js.map +1 -1
  114. package/mobile/lib/ui-kit/TabsControl/TabsControlProps.d.ts +11 -2
  115. package/mobile/lib/ui-kit/TabsControl/renderTab.d.ts +3 -3
  116. package/mobile/lib/ui-kit/TabsControl/renderTab.js.map +1 -1
  117. package/mobile/lib/ui-kit/TabsControl/renderTabItemInner.d.ts +11 -0
  118. package/mobile/lib/ui-kit/TabsControl/renderTabItemInner.js +20 -0
  119. package/mobile/lib/ui-kit/TabsControl/renderTabItemInner.js.map +1 -0
  120. package/mobile/src/components/Tabs/TabsContent.ts +1 -1
  121. package/mobile/src/components/Tabs/renderTabs.tsx +0 -10
  122. package/mobile/src/components/TabsLayout/TabsLayout.example.json +4 -3
  123. package/mobile/src/components/TabsLayout/TabsLayout.tsx +56 -57
  124. package/mobile/src/components/TabsLayout/TabsLayoutContent.ts +36 -8
  125. package/mobile/src/components/TabsLayout/renderTabsLayout.tsx +32 -0
  126. package/mobile/src/ui-kit/TabsControl/ScrollableTabsControl.tsx +28 -5
  127. package/mobile/src/ui-kit/TabsControl/TabItem.tsx +5 -5
  128. package/mobile/src/ui-kit/TabsControl/TabItemInner.tsx +21 -15
  129. package/mobile/src/ui-kit/TabsControl/TabsControl.tsx +4 -1
  130. package/mobile/src/ui-kit/TabsControl/TabsControlProps.ts +12 -2
  131. package/mobile/src/ui-kit/TabsControl/renderTab.tsx +3 -3
  132. package/mobile/src/ui-kit/TabsControl/renderTabItemInner.tsx +63 -0
  133. package/package.json +1 -1
  134. package/src/components/Tabs/Tabs.fixture.mobile.tsx +0 -16
  135. package/src/components/Tabs/Tabs.fixture.tsx +0 -19
  136. package/src/components/Tabs/TabsContent.ts +1 -1
  137. package/src/components/Tabs/renderTabs.tsx +0 -10
  138. package/src/components/TabsLayout/TabsLayout.example.json +4 -3
  139. package/src/components/TabsLayout/TabsLayout.fixture.mobile.tsx +51 -30
  140. package/src/components/TabsLayout/TabsLayout.fixture.tsx +61 -30
  141. package/src/components/TabsLayout/TabsLayout.tsx +56 -57
  142. package/src/components/TabsLayout/TabsLayoutContent.ts +36 -8
  143. package/src/components/TabsLayout/renderTabsLayout.tsx +32 -0
  144. package/src/ui-kit/TabsControl/ScrollableTabsControl.tsx +28 -5
  145. package/src/ui-kit/TabsControl/TabItem.tsx +5 -5
  146. package/src/ui-kit/TabsControl/TabItemInner.tsx +21 -15
  147. package/src/ui-kit/TabsControl/TabsControl.fixture.tsx +7 -20
  148. package/src/ui-kit/TabsControl/TabsControl.tsx +4 -1
  149. package/src/ui-kit/TabsControl/TabsControlProps.ts +12 -2
  150. package/src/ui-kit/TabsControl/renderTab.tsx +3 -3
  151. package/src/ui-kit/TabsControl/renderTabItemInner.tsx +63 -0
  152. package/bundle/components/TabsLayout/TabsLayoutButton.d.ts +0 -10
  153. package/bundle/components/TabsLayout/TabsLayoutRedirectSection.d.ts +0 -6
  154. package/bundle/components/TabsLayout/alignTabStyle.d.ts +0 -2
  155. package/bundle/components/TabsLayout/useScrollToTab.d.ts +0 -2
  156. package/dist/components/TabsLayout/TabsLayoutButton.d.ts +0 -10
  157. package/dist/components/TabsLayout/TabsLayoutButton.js +0 -24
  158. package/dist/components/TabsLayout/TabsLayoutButton.js.map +0 -1
  159. package/dist/components/TabsLayout/TabsLayoutRedirectSection.d.ts +0 -6
  160. package/dist/components/TabsLayout/TabsLayoutRedirectSection.js +0 -27
  161. package/dist/components/TabsLayout/TabsLayoutRedirectSection.js.map +0 -1
  162. package/dist/components/TabsLayout/alignTabStyle.d.ts +0 -2
  163. package/dist/components/TabsLayout/alignTabStyle.js +0 -8
  164. package/dist/components/TabsLayout/alignTabStyle.js.map +0 -1
  165. package/dist/components/TabsLayout/useScrollToTab.d.ts +0 -2
  166. package/dist/components/TabsLayout/useScrollToTab.js +0 -17
  167. package/dist/components/TabsLayout/useScrollToTab.js.map +0 -1
  168. package/lib/components/TabsLayout/TabsLayoutButton.d.ts +0 -10
  169. package/lib/components/TabsLayout/TabsLayoutButton.js +0 -22
  170. package/lib/components/TabsLayout/TabsLayoutButton.js.map +0 -1
  171. package/lib/components/TabsLayout/TabsLayoutRedirectSection.d.ts +0 -6
  172. package/lib/components/TabsLayout/TabsLayoutRedirectSection.js +0 -25
  173. package/lib/components/TabsLayout/TabsLayoutRedirectSection.js.map +0 -1
  174. package/lib/components/TabsLayout/alignTabStyle.d.ts +0 -2
  175. package/lib/components/TabsLayout/alignTabStyle.js +0 -6
  176. package/lib/components/TabsLayout/alignTabStyle.js.map +0 -1
  177. package/lib/components/TabsLayout/useScrollToTab.d.ts +0 -2
  178. package/lib/components/TabsLayout/useScrollToTab.js +0 -14
  179. package/lib/components/TabsLayout/useScrollToTab.js.map +0 -1
  180. package/mobile/bundle/components/TabsLayout/TabsLayoutButton.d.ts +0 -10
  181. package/mobile/bundle/components/TabsLayout/TabsLayoutRedirectSection.d.ts +0 -6
  182. package/mobile/bundle/components/TabsLayout/alignTabStyle.d.ts +0 -2
  183. package/mobile/bundle/components/TabsLayout/useScrollToTab.d.ts +0 -2
  184. package/mobile/dist/components/TabsLayout/TabsLayoutButton.d.ts +0 -10
  185. package/mobile/dist/components/TabsLayout/TabsLayoutButton.js +0 -24
  186. package/mobile/dist/components/TabsLayout/TabsLayoutButton.js.map +0 -1
  187. package/mobile/dist/components/TabsLayout/TabsLayoutRedirectSection.d.ts +0 -6
  188. package/mobile/dist/components/TabsLayout/TabsLayoutRedirectSection.js +0 -27
  189. package/mobile/dist/components/TabsLayout/TabsLayoutRedirectSection.js.map +0 -1
  190. package/mobile/dist/components/TabsLayout/alignTabStyle.d.ts +0 -2
  191. package/mobile/dist/components/TabsLayout/alignTabStyle.js +0 -8
  192. package/mobile/dist/components/TabsLayout/alignTabStyle.js.map +0 -1
  193. package/mobile/dist/components/TabsLayout/useScrollToTab.d.ts +0 -2
  194. package/mobile/dist/components/TabsLayout/useScrollToTab.js +0 -17
  195. package/mobile/dist/components/TabsLayout/useScrollToTab.js.map +0 -1
  196. package/mobile/lib/components/TabsLayout/TabsLayoutButton.d.ts +0 -10
  197. package/mobile/lib/components/TabsLayout/TabsLayoutButton.js +0 -22
  198. package/mobile/lib/components/TabsLayout/TabsLayoutButton.js.map +0 -1
  199. package/mobile/lib/components/TabsLayout/TabsLayoutRedirectSection.d.ts +0 -6
  200. package/mobile/lib/components/TabsLayout/TabsLayoutRedirectSection.js +0 -25
  201. package/mobile/lib/components/TabsLayout/TabsLayoutRedirectSection.js.map +0 -1
  202. package/mobile/lib/components/TabsLayout/alignTabStyle.d.ts +0 -2
  203. package/mobile/lib/components/TabsLayout/alignTabStyle.js +0 -6
  204. package/mobile/lib/components/TabsLayout/alignTabStyle.js.map +0 -1
  205. package/mobile/lib/components/TabsLayout/useScrollToTab.d.ts +0 -2
  206. package/mobile/lib/components/TabsLayout/useScrollToTab.js +0 -14
  207. package/mobile/lib/components/TabsLayout/useScrollToTab.js.map +0 -1
  208. package/mobile/src/components/TabsLayout/TabsLayoutButton.tsx +0 -63
  209. package/mobile/src/components/TabsLayout/TabsLayoutRedirectSection.tsx +0 -32
  210. package/mobile/src/components/TabsLayout/alignTabStyle.ts +0 -7
  211. package/mobile/src/components/TabsLayout/useScrollToTab.ts +0 -16
  212. package/src/components/TabsLayout/TabsLayoutButton.tsx +0 -63
  213. package/src/components/TabsLayout/TabsLayoutRedirectSection.tsx +0 -32
  214. package/src/components/TabsLayout/alignTabStyle.ts +0 -7
  215. package/src/components/TabsLayout/useScrollToTab.ts +0 -16
@@ -1 +1 @@
1
- {"version":3,"file":"TabItemInner.js","sourceRoot":"","sources":["../../../src/ui-kit/TabsControl/TabItemInner.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGpC,MAAM,kBAAkB,GAA4B;IAClD,OAAO,EAAE,OAAO;IAChB,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,kBAAkB;CAC5B,CAAC;AAEF,MAAM,YAAY,GAAG,6CAA6C,CAAC;AAEnE,MAAM,qBAAqB,GAA4B;IACrD,OAAO,EAAE,0BAA0B;IACnC,UAAU,EAAE,8BAA8B;IAC1C,OAAO,EAAE,YAAY;CACtB,CAAC;AAEF,MAAM,aAAa,GAA4B;IAC7C,OAAO,EAAE,UAAU;IACnB,UAAU,EAAE,UAAU;IACtB,OAAO,EAAE,gBAAgB;CAC1B,CAAC;AAEF,MAAM,mBAAmB,GAA4B;IACnD,OAAO,EAAE,oBAAoB;IAC7B,UAAU,EAAE,UAAU;IACtB,OAAO,EAAE,iBAAiB;CAC3B,CAAC;AAMF,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,CAC7B,CAAC,EAAE,GAAG,GAAG,KAAK,EAAE,IAAI,GAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,GAAG,SAAS,EAAE,OAAO,EAAE,EAAE,EAAE;IAClE,MAAM,GAAG,GAAQ,GAAG,CAAC;IAErB,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC;IAE5C,OAAO,CACL,KAAC,GAAG,IACF,SAAS,EAAE,KAAK,CACd,MAAM,EACN,cAAc,EACd,gBAAgB,EAChB,kBAAkB,CAAC,IAAI,CAAC,EACxB,QAAQ,CAAC,CAAC,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,CAC3D,EACD,IAAI,EAAC,KAAK,mBACK,QAAQ,EACvB,OAAO,EAAE,OAAO,KACZ,IAAI,YAER,eACE,SAAS,EAAE,KAAK,CACd,QAAQ,EACR,kCAAkC,EAClC,+BAA+B,EAC/B,QAAQ,CAAC,CAAC,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,YAAY,CACtD,aAED,KAAC,IAAI,IAAC,IAAI,EAAC,QAAQ,YAAE,IAAI,GAAQ,EAChC,WAAW,CAAC,CAAC,CAAC,cAAK,SAAS,EAAC,OAAO,YAAE,WAAW,GAAO,CAAC,CAAC,CAAC,IAAI,IAC5D,GACF,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
1
+ {"version":3,"file":"TabItemInner.js","sourceRoot":"","sources":["../../../src/ui-kit/TabsControl/TabItemInner.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAI1D,MAAM,kBAAkB,GAA6B;IACnD,OAAO,EAAE,OAAO;IAChB,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,kFAAkF;CAC7F,CAAC;AAEF,MAAM,YAAY,GAAG,6CAA6C,CAAC;AAEnE,MAAM,qBAAqB,GAA6B;IACtD,OAAO,EAAE,0BAA0B;IACnC,UAAU,EAAE,8BAA8B;IAC1C,QAAQ,EAAE,0BAA0B;CACrC,CAAC;AAEF,MAAM,aAAa,GAA6B;IAC9C,OAAO,EAAE,UAAU;IACnB,UAAU,EAAE,UAAU;IACtB,QAAQ,EAAE,mEAAmE;CAC9E,CAAC;AAEF,MAAM,mBAAmB,GAA6B;IACpD,OAAO,EAAE,oBAAoB;IAC7B,UAAU,EAAE,UAAU;IACtB,QAAQ,EAAE,sDAAsD;CACjE,CAAC;AAMF,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,CAC7B,CAAC,EAAE,GAAG,GAAG,KAAK,EAAE,IAAI,GAAG,EAAE,EAAE,QAAQ,GAAG,KAAK,EAAE,IAAI,GAAG,SAAS,EAAE,OAAO,EAAE,EAAE,EAAE;IAC1E,MAAM,GAAG,GAAQ,GAAG,CAAC;IAErB,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC;IAE/D,OAAO,CACL,KAAC,GAAG,IACF,SAAS,EAAE,KAAK,CACd,MAAM,EACN,cAAc,EACd,gBAAgB,EAChB,kBAAkB,CAAC,IAAI,CAAC,EACxB,QAAQ,CAAC,CAAC,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,CAC3D,EACD,IAAI,EAAC,SAAS,EACd,OAAO,EAAE,OAAO,KACZ,IAAI,YAER,eACE,SAAS,EAAE,KAAK,CACd,QAAQ,EACR,kCAAkC,EAClC,+BAA+B,EAC/B,QAAQ,CAAC,CAAC,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,YAAY,CACtD,aAEA,kBAAkB,CAAC;oBAClB,IAAI;oBACJ,WAAW;oBACX,IAAI;oBACJ,QAAQ;oBACR,IAAI;iBACL,CAAC,EACD,WAAW,CAAC,CAAC,CAAC,cAAK,SAAS,EAAC,OAAO,YAAE,WAAW,GAAO,CAAC,CAAC,CAAC,IAAI,IAC5D,GACF,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
@@ -3,6 +3,6 @@ import '../../setup-fixture';
3
3
  declare const _default: {
4
4
  default: JSX.Element;
5
5
  scrollable: JSX.Element;
6
- rounded: JSX.Element;
6
+ animated: JSX.Element;
7
7
  };
8
8
  export default _default;
@@ -2,5 +2,5 @@ import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
2
2
  import { JSX } from '@redneckz/uni-jsx';
3
3
  import { style } from '../../utils/style.js';
4
4
  import { renderTab } from './renderTab.js';
5
- export const TabsControl = JSX(({ className, tabsType = 'default', items = [], value, onChange }) => (_jsx("div", { className: style('flex gap-x-2xs overflow-x-auto no-scrollbar', className), role: "tablist", children: items.map(renderTab(value, onChange, tabsType)) })));
5
+ export const TabsControl = JSX(({ className, tabsType = 'default', items = [], value, onChange }) => (_jsx("div", { className: style('flex gap-x-2xs overflow-x-auto no-scrollbar', className), role: "tabpanel", children: items.map(renderTab(value, onChange, tabsType)) })));
6
6
  //# sourceMappingURL=TabsControl.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TabsControl.js","sourceRoot":"","sources":["../../../src/ui-kit/TabsControl/TabsControl.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAC5B,CAAC,EAAE,SAAS,EAAE,QAAQ,GAAG,SAAS,EAAE,KAAK,GAAG,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CACpE,cAAK,SAAS,EAAE,KAAK,CAAC,6CAA6C,EAAE,SAAS,CAAC,EAAE,IAAI,EAAC,SAAS,YAC5F,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,GAC5C,CACP,CACF,CAAC"}
1
+ {"version":3,"file":"TabsControl.js","sourceRoot":"","sources":["../../../src/ui-kit/TabsControl/TabsControl.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAC5B,CAAC,EAAE,SAAS,EAAE,QAAQ,GAAG,SAAS,EAAE,KAAK,GAAG,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CACpE,cACE,SAAS,EAAE,KAAK,CAAC,6CAA6C,EAAE,SAAS,CAAC,EAC1E,IAAI,EAAC,UAAU,YAEd,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,GAC5C,CACP,CACF,CAAC"}
@@ -1,6 +1,15 @@
1
1
  import { type ListControlProps } from '../ListControlProps';
2
- import { type TabItemBase, type TabType } from './TabItem';
2
+ import { type TabItemBase } from './TabItem';
3
+ /**
4
+ * @title Тип вкладки
5
+ * @enumNames [
6
+ * "По ширине экрана",
7
+ * "С прокруткой",
8
+ * "Кнопка с анимацией",
9
+ * ]
10
+ */
11
+ export declare type TabsType = 'default' | 'underlined' | 'animated';
3
12
  export interface TabsControlProps extends ListControlProps<TabItemBase> {
4
13
  className?: string;
5
- tabsType?: TabType;
14
+ tabsType?: TabsType;
6
15
  }
@@ -1,3 +1,3 @@
1
- import { type TabItemBase, type TabType } from './TabItem';
2
- import { type TabsControlProps } from './TabsControlProps';
3
- export declare const renderTab: (activeTab?: TabItemBase, onClick?: TabsControlProps['onChange'], type?: TabType) => (tab: TabItemBase, i: number) => JSX.Element;
1
+ import { type TabItemBase } from './TabItem';
2
+ import { type TabsControlProps, type TabsType } from './TabsControlProps';
3
+ export declare const renderTab: (activeTab?: TabItemBase, onClick?: TabsControlProps['onChange'], type?: TabsType) => (tab: TabItemBase, i: number) => JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"renderTab.js","sourceRoot":"","sources":["../../../src/ui-kit/TabsControl/renderTab.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAkC,MAAM,WAAW,CAAC;AAGpE,MAAM,CAAC,MAAM,SAAS,GACpB,CAAC,SAAuB,EAAE,OAAsC,EAAE,IAAc,EAAE,EAAE,CACpF,CAAC,GAAgB,EAAE,CAAS,EAAE,EAAE,CAC9B,CACE,KAAC,OAAO,IACN,QAAQ,EAAE,GAAG,KAAK,SAAS,EAC3B,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,IAAI,EAEV,IAAI,EAAE,GAAG,IADJ,MAAM,CAAC,CAAC,CAAC,CAEd,CACH,CAAC"}
1
+ {"version":3,"file":"renderTab.js","sourceRoot":"","sources":["../../../src/ui-kit/TabsControl/renderTab.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAoB,MAAM,WAAW,CAAC;AAGtD,MAAM,CAAC,MAAM,SAAS,GACpB,CAAC,SAAuB,EAAE,OAAsC,EAAE,IAAe,EAAE,EAAE,CACrF,CAAC,GAAgB,EAAE,CAAS,EAAE,EAAE,CAC9B,CACE,KAAC,OAAO,IACN,QAAQ,EAAE,GAAG,KAAK,SAAS,EAC3B,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,IAAI,EAEV,IAAI,EAAE,GAAG,IADJ,MAAM,CAAC,CAAC,CAAC,CAEd,CACH,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { type Picture } from '../../model/Picture';
2
+ interface TabsLayoutButtonProps {
3
+ isActive: boolean;
4
+ description?: string;
5
+ icon?: Picture;
6
+ type: string;
7
+ text?: string;
8
+ }
9
+ export declare const renderTabItemInner: ({ text, description, icon, isActive, type, }: TabsLayoutButtonProps) => JSX.Element;
10
+ export {};
@@ -0,0 +1,20 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
+ import { style } from '../../utils/style.js';
3
+ import { Img } from '../Img/Img.js';
4
+ const getButtonClassNames = (isActive) => ({
5
+ btn: `w-96 ${isActive ? 'p-m border-none bg-primary-main text-white' : 'p-s ease-in duration-300 bg-white'}`,
6
+ text: isActive ? 'mb-xs text-xl' : 'mb-2xs text-l text-primary-text',
7
+ desc: `font-light ${isActive ? 'text-l text-white' : 'text-m text-secondary-text'}`,
8
+ icon: isActive ? '' : 'text-primary-main',
9
+ iconVersion: (isActive ? 'white' : 'normal'),
10
+ oldText: 'text-m text-center',
11
+ oldDesc: 'text-m-light',
12
+ });
13
+ export const renderTabItemInner = ({ text, description, icon, isActive, type, }) => {
14
+ const buttonClassNames = getButtonClassNames(isActive);
15
+ return (_jsxs("div", { className: style('cursor-pointer text-left border-b-0 flex gap-2xs'), "aria-label": text, role: "tab", children: [icon ? (_jsx(Img, { className: style('h-6 w-6 min-w-6 min-h-6', buttonClassNames.icon), image: {
16
+ ...icon,
17
+ iconVersion: icon?.iconVersion ?? buttonClassNames.iconVersion,
18
+ }, width: "24", height: "24", alt: text })) : null, _jsxs("div", { className: "border-0", children: [_jsx("div", { className: type === 'animated' ? buttonClassNames.text : buttonClassNames.oldText, children: text }), _jsx("div", { className: type === 'animated' ? buttonClassNames.desc : buttonClassNames.oldDesc, children: description })] })] }));
19
+ };
20
+ //# sourceMappingURL=renderTabItemInner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderTabItemInner.js","sourceRoot":"","sources":["../../../src/ui-kit/TabsControl/renderTabItemInner.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,MAAM,mBAAmB,GAAG,CAAC,QAAiB,EAAE,EAAE,CAAC,CAAC;IAClD,GAAG,EAAE,QACH,QAAQ,CAAC,CAAC,CAAC,4CAA4C,CAAC,CAAC,CAAC,mCAC5D,EAAE;IACF,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,iCAAiC;IACpE,IAAI,EAAE,cAAc,QAAQ,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,4BAA4B,EAAE;IACnF,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,mBAAmB;IACzC,WAAW,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAgB;IAC3D,OAAO,EAAE,oBAAoB;IAC7B,OAAO,EAAE,cAAc;CACxB,CAAC,CAAC;AAUH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,EACjC,IAAI,EACJ,WAAW,EACX,IAAI,EACJ,QAAQ,EACR,IAAI,GACkB,EAAE,EAAE;IAC1B,MAAM,gBAAgB,GAAG,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAEvD,OAAO,CACL,eACE,SAAS,EAAE,KAAK,CAAC,kDAAkD,CAAC,gBACxD,IAAI,EAChB,IAAI,EAAC,KAAK,aAET,IAAI,CAAC,CAAC,CAAC,CACN,KAAC,GAAG,IACF,SAAS,EAAE,KAAK,CAAC,yBAAyB,EAAE,gBAAgB,CAAC,IAAI,CAAC,EAClE,KAAK,EAAE;oBACL,GAAG,IAAI;oBACP,WAAW,EAAE,IAAI,EAAE,WAAW,IAAI,gBAAgB,CAAC,WAAW;iBAC/D,EACD,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,GAAG,EAAE,IAAI,GACT,CACH,CAAC,CAAC,CAAC,IAAI,EACR,eAAK,SAAS,EAAC,UAAU,aACvB,cAAK,SAAS,EAAE,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,gBAAgB,CAAC,OAAO,YACnF,IAAI,GACD,EACN,cAAK,SAAS,EAAE,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,gBAAgB,CAAC,OAAO,YACnF,WAAW,GACR,IACF,IACF,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -3986,31 +3986,54 @@
3986
3986
  };
3987
3987
  };
3988
3988
 
3989
+ const getButtonClassNames = (isActive) => ({
3990
+ btn: `w-96 ${isActive ? 'p-m border-none bg-primary-main text-white' : 'p-s ease-in duration-300 bg-white'}`,
3991
+ text: isActive ? 'mb-xs text-xl' : 'mb-2xs text-l text-primary-text',
3992
+ desc: `font-light ${isActive ? 'text-l text-white' : 'text-m text-secondary-text'}`,
3993
+ icon: isActive ? '' : 'text-primary-main',
3994
+ iconVersion: (isActive ? 'white' : 'normal'),
3995
+ oldText: 'text-m text-center',
3996
+ oldDesc: 'text-m-light',
3997
+ });
3998
+ const renderTabItemInner = ({ text, description, icon, isActive, type, }) => {
3999
+ const buttonClassNames = getButtonClassNames(isActive);
4000
+ return (jsxs("div", { className: style('cursor-pointer text-left border-b-0 flex gap-2xs'), "aria-label": text, role: "tab", children: [icon ? (jsx(Img, { className: style('h-6 w-6 min-w-6 min-h-6', buttonClassNames.icon), image: {
4001
+ ...icon,
4002
+ iconVersion: icon?.iconVersion ?? buttonClassNames.iconVersion,
4003
+ }, width: "24", height: "24", alt: text })) : null, jsxs("div", { className: "border-0", children: [jsx("div", { className: type === 'animated' ? buttonClassNames.text : buttonClassNames.oldText, children: text }), jsx("div", { className: type === 'animated' ? buttonClassNames.desc : buttonClassNames.oldDesc, children: description })] })] }));
4004
+ };
4005
+
3989
4006
  const tabPaddingStyleMap = {
3990
4007
  default: 'px-xs',
3991
4008
  underlined: 'px-m',
3992
- rounded: 'px-lg rounded-md',
4009
+ animated: 'px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs',
3993
4010
  };
3994
4011
  const tabTextStyle = 'text-secondary-text hover:text-primary-main';
3995
4012
  const activeTabTextStyleMap = {
3996
4013
  default: 'text-black sm:text-white',
3997
4014
  underlined: 'text-primary-main border-b-2',
3998
- rounded: 'text-white',
4015
+ animated: 'text-white sm:text-white',
3999
4016
  };
4000
4017
  const tabBgStyleMap = {
4001
4018
  default: 'bg-white',
4002
4019
  underlined: 'bg-white',
4003
- rounded: 'bg-transparent',
4020
+ animated: 'p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96',
4004
4021
  };
4005
4022
  const activeTabBgStyleMap = {
4006
4023
  default: 'sm:bg-primary-main',
4007
4024
  underlined: 'bg-white',
4008
- rounded: 'bg-primary-main',
4025
+ animated: 'p-2 border-none bg-primary-main text-white h-20 w-96',
4009
4026
  };
4010
- const TabItemInner = JSX(({ tag = 'div', item = {}, isActive, type = 'default', onClick }) => {
4027
+ const TabItemInner = JSX(({ tag = 'div', item = {}, isActive = false, type = 'default', onClick }) => {
4011
4028
  const Tag = tag;
4012
- const { text, appendRight, ...link } = item;
4013
- return (jsx(Tag, { className: style('h-12', 'block flex-1', 'cursor-pointer', tabPaddingStyleMap[type], isActive ? activeTabBgStyleMap[type] : tabBgStyleMap[type]), role: "tab", "aria-selected": isActive, onClick: onClick, ...link, children: jsxs("div", { className: style('h-full', 'flex justify-center items-center', 'text-center whitespace-nowrap', isActive ? activeTabTextStyleMap[type] : tabTextStyle), children: [jsx(Text, { size: "text-m", children: text }), appendRight ? jsx("div", { className: "ml-xs", children: appendRight }) : null] }) }));
4029
+ const { text, description, icon, appendRight, ...link } = item;
4030
+ return (jsx(Tag, { className: style('h-12', 'block flex-1', 'cursor-pointer', tabPaddingStyleMap[type], isActive ? activeTabBgStyleMap[type] : tabBgStyleMap[type]), role: "tablist", onClick: onClick, ...link, children: jsxs("div", { className: style('h-full', 'flex justify-center items-center', 'text-center whitespace-nowrap', isActive ? activeTabTextStyleMap[type] : tabTextStyle), children: [renderTabItemInner({
4031
+ text,
4032
+ description,
4033
+ icon,
4034
+ isActive,
4035
+ type,
4036
+ }), appendRight ? jsx("div", { className: "ml-xs", children: appendRight }) : null] }) }));
4014
4037
  });
4015
4038
 
4016
4039
  const TabItem = JSX((props) => props?.item?.href ? jsx(LinkTabItem, { ...props }) : jsx(ButtonTabItem, { ...props }));
@@ -4032,7 +4055,7 @@
4032
4055
 
4033
4056
  const renderTab = (activeTab, onClick, type) => (tab, i) => (jsx(TabItem, { isActive: tab === activeTab, onClick: onClick, type: type, item: tab }, String(i)));
4034
4057
 
4035
- const TabsControl = JSX(({ className, tabsType = 'default', items = [], value, onChange }) => (jsx("div", { className: style('flex gap-x-2xs overflow-x-auto no-scrollbar', className), role: "tablist", children: items.map(renderTab(value, onChange, tabsType)) })));
4058
+ const TabsControl = JSX(({ className, tabsType = 'default', items = [], value, onChange }) => (jsx("div", { className: style('flex gap-x-2xs overflow-x-auto no-scrollbar', className), role: "tabpanel", children: items.map(renderTab(value, onChange, tabsType)) })));
4036
4059
 
4037
4060
  const initialFiltrationState = {
4038
4061
  categories: [],
@@ -5156,20 +5179,30 @@
5156
5179
  } }, _.title || String(i)));
5157
5180
  };
5158
5181
 
5159
- const scrollButtonStyle = 'hidden sm:flex absolute z-40 top-0';
5160
- const ScrollableTabsControl = JSX(({ className, items = [], value, onChange, tabsType }) => {
5182
+ const scrollButtonStyle = 'hidden sm:flex absolute z-40';
5183
+ const scrollStyleType = {
5184
+ animated: {
5185
+ itemClassName: 'flex',
5186
+ gap: 8,
5187
+ buttonTop: 'top-5',
5188
+ },
5189
+ underlined: {
5190
+ itemClassName: '',
5191
+ gap: 0,
5192
+ buttonTop: 'top-0',
5193
+ },
5194
+ };
5195
+ const ScrollableTabsControl = JSX(({ className, items = [], value, onChange, tabsType = 'default' }) => {
5161
5196
  const [containerRef, scroll] = useSwipeListScroll({
5162
5197
  itemCount: items?.length || 0,
5163
5198
  });
5164
- return (jsxs("div", { className: style('relative overflow-x-auto no-scrollbar', className), role: "tablist", children: [jsx(SwipeListContainer, { containerRef: containerRef, snapAlign: "snap-start", onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: items.map(renderTab(value, onChange, tabsType)) }), scroll.canScrollLeft ? (jsx(ScrollLeftButton, { className: style('left-6', scrollButtonStyle), onClick: scroll.scrollLeft })) : null, scroll.canScrollRight ? (jsx(ScrollRightButton, { className: style('right-6', scrollButtonStyle), onClick: scroll.scrollRight })) : null] }));
5199
+ return (jsxs("div", { className: style('relative overflow-x-auto no-scrollbar', className), children: [jsx(SwipeListContainer, { containerRef: containerRef, snapAlign: "snap-start", onVisibleIndicesChange: scroll.handleVisibleIndicesChange, itemClassName: scrollStyleType[tabsType].itemClassName, gap: scrollStyleType[tabsType].gap, children: items.map(renderTab(value, onChange, tabsType)) }), scroll.canScrollLeft ? (jsx(ScrollLeftButton, { className: style('left-6', scrollButtonStyle, scrollStyleType[tabsType].buttonTop), onClick: scroll.scrollLeft })) : null, scroll.canScrollRight ? (jsx(ScrollRightButton, { className: style('right-6', scrollButtonStyle, scrollStyleType[tabsType].buttonTop), onClick: scroll.scrollRight })) : null] }));
5165
5200
  });
5166
5201
 
5167
5202
  const renderTabs = ({ tabsMode, ...props }) => {
5168
5203
  switch (tabsMode) {
5169
5204
  case 'wideScreen':
5170
5205
  return jsx(TabsControl, { ...props });
5171
- case 'centered':
5172
- return (jsx("div", { className: "flex", children: jsx(TabsControl, { className: "m-auto p-xs rounded-md bg-main-gray", tabsType: "rounded", ...props }) }));
5173
5206
  case 'scrollable':
5174
5207
  return (jsx("div", { className: "flex", children: jsx(ScrollableTabsControl, { className: "m-auto", tabsType: "underlined", ...props }) }));
5175
5208
  default:
@@ -5177,7 +5210,7 @@
5177
5210
  }
5178
5211
  };
5179
5212
 
5180
- const TAB_QUERY_PARAM_KEY = 'tab';
5213
+ const TAB_QUERY_PARAM_KEY$1 = 'tab';
5181
5214
  const Tabs = JSX(({ className = '', isSticky, tabs = [], tabsMode, ...rest }) => {
5182
5215
  const router = useRouter();
5183
5216
  const { isReady } = router;
@@ -5187,8 +5220,8 @@
5187
5220
  if (!tabs || !tabs[0]) {
5188
5221
  return;
5189
5222
  }
5190
- const defaultTabIndex = router.query[TAB_QUERY_PARAM_KEY]
5191
- ? tabs.findIndex((_) => _.type === 'group' && _.ref === router.query[TAB_QUERY_PARAM_KEY]) || 0
5223
+ const defaultTabIndex = router.query[TAB_QUERY_PARAM_KEY$1]
5224
+ ? tabs.findIndex((_) => _.type === 'group' && _.ref === router.query[TAB_QUERY_PARAM_KEY$1]) || 0
5192
5225
  : 0;
5193
5226
  const defaultTab = tabs[defaultTabIndex] || tabs[0];
5194
5227
  setActiveTabIndex(defaultTabIndex);
@@ -5207,10 +5240,10 @@
5207
5240
  const updateUrlSearchTabParam = (_) => {
5208
5241
  const searchParams = new URLSearchParams(router.query);
5209
5242
  if (_.name) {
5210
- searchParams.set(TAB_QUERY_PARAM_KEY, _.name);
5243
+ searchParams.set(TAB_QUERY_PARAM_KEY$1, _.name);
5211
5244
  }
5212
5245
  else {
5213
- searchParams.delete(TAB_QUERY_PARAM_KEY);
5246
+ searchParams.delete(TAB_QUERY_PARAM_KEY$1);
5214
5247
  }
5215
5248
  router.replace(`${router.pathname}?${searchParams}`, '', { scroll: false });
5216
5249
  };
@@ -5240,76 +5273,66 @@
5240
5273
  };
5241
5274
  const normalizeTab = (_) => _?.type === 'group' ? { text: _.title, name: _.ref } : _;
5242
5275
 
5243
- const alignTabStyle = {
5244
- start: 'text-start',
5245
- center: 'text-center',
5246
- end: 'text-end',
5276
+ const renderTabsLayout = ({ tabsType = 'animated', ...props }) => {
5277
+ switch (tabsType) {
5278
+ case 'default':
5279
+ return jsx(TabsControl, { ...props });
5280
+ case 'underlined':
5281
+ return (jsx("div", { className: "flex", children: jsx(TabsControl, { className: "m-auto", tabsType: "underlined", ...props }) }));
5282
+ case 'animated':
5283
+ return (jsx("div", { className: "border-b-8 border-primary-main", children: jsx(ScrollableTabsControl, { className: "m-auto", ...props, tabsType: "animated" }) }));
5284
+ default:
5285
+ return null;
5286
+ }
5247
5287
  };
5248
5288
 
5249
- const getButtonClassNames = (isActive) => ({
5250
- btn: `w-96 ${isActive
5251
- ? 'p-m border-none bg-primary-main text-white'
5252
- : 'p-s ease-in duration-300 bg-white text-primary-text'}`,
5253
- title: isActive ? 'mb-xs text-xl' : 'mb-2xs text-l',
5254
- desc: `font-light ${isActive ? 'text-l text-white' : 'text-m text-secondary-text'}`,
5255
- icon: isActive ? '' : 'text-primary-main',
5256
- iconVersion: (isActive ? 'white' : 'normal'),
5257
- });
5258
- const TabsLayoutButton = JSX(({ tab, className, onClick, isActive }) => {
5259
- const buttonClassNames = getButtonClassNames(isActive);
5260
- return (jsxs("button", { type: "button", onClick: onClick, "aria-label": tab?.title, className: style('border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs', buttonClassNames.btn, className), ...getAspectsAttributes(tab?.data), children: [tab?.icon ? (jsx(Img, { className: style('h-6 w-6 min-w-6 min-h-6', buttonClassNames.icon), image: {
5261
- ...tab?.icon,
5262
- iconVersion: tab?.icon?.iconVersion ?? buttonClassNames.iconVersion,
5263
- }, width: "24", height: "24" })) : null, jsxs("div", { className: "border-0", children: [tab?.title ? jsx("div", { className: buttonClassNames.title, children: tab.title }) : null, tab?.description ? jsx("div", { className: buttonClassNames.desc, children: tab.description }) : null] })] }));
5264
- });
5265
-
5266
- function useDebouncedEffect(effect, deps, delay = 300) {
5267
- useEffect(() => {
5268
- const timerId = globalThis.setTimeout(effect, delay);
5269
- return () => {
5270
- globalThis.clearTimeout(timerId);
5271
- };
5272
- }, deps);
5273
- }
5274
-
5275
- const REDIRECT_DELAY = 0.8 * 1000;
5276
- const TabsLayoutRedirectSection = JSX(({ tab }) => {
5277
- const link = useLink();
5278
- const { onClick } = link({
5279
- ...tab,
5280
- onClick: () => {
5281
- /**
5282
- * In the current implementation of useLink, there is no follow-by-link method,
5283
- * and default routing won't work if the link is external.
5284
- */
5285
- if (tab.href && !isLocalURL(tab.href)) {
5286
- globalThis.location.href = tab.href;
5287
- }
5288
- },
5289
- });
5290
- useDebouncedEffect(onClick, [], REDIRECT_DELAY);
5291
- return jsx(Shimmer, { className: "col-span-12 p-xl", size: 5 });
5292
- });
5293
-
5294
- const TabsLayout = UniBlock(({ className = '', tabs = [], block, tabAlign, ...rest }) => {
5289
+ const TAB_QUERY_PARAM_KEY = 'tab';
5290
+ const TabsLayout = UniBlock(({ className = '', tabs = [], block, tabsType, ...rest }) => {
5291
+ const router = useRouter();
5292
+ const { isReady } = router;
5295
5293
  const [activeTabIndex, setActiveTabIndex] = useState(getInitSelectedIndex(tabs));
5294
+ const defaultSelectedTab = tabs.findIndex((_) => Boolean(_.selected));
5295
+ useEffect(() => {
5296
+ const defaultTabIndex = router.query[TAB_QUERY_PARAM_KEY]
5297
+ ? tabs.findIndex((_, index) => _.type === 'group' && String(index) === router.query[TAB_QUERY_PARAM_KEY])
5298
+ : defaultSelectedTab;
5299
+ setActiveTabIndex(defaultTabIndex === -1 ? 0 : defaultTabIndex);
5300
+ }, [isReady, defaultSelectedTab]);
5296
5301
  const slotName = getSlotName(tabs[activeTabIndex], activeTabIndex);
5297
- const itemCount = tabs.length;
5298
- const [activeSlideIndex, { inc: incActiveSlideIndex, dec: decActiveSlideIndex }] = useCarouselControls({ itemCount }, activeTabIndex);
5299
- const [containerRef, scroll] = useSwipeListScroll({ itemCount });
5300
- return (jsxs(BlockWrapper, { className: style(className), defaultPadding: "p-0", ...rest, children: [jsxs("div", { className: "relative border-b-8 border-primary-main", children: [jsx(SwipeListContainer, { itemClassName: "flex", containerRef: containerRef, snapAlign: "snap-end", gap: 8, onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: tabs.map(renderTabButton(activeTabIndex, setActiveTabIndex, tabAlign)) }), jsx(CarouselScrollButtons, { scroll: scroll, arrowsPadded: true, onScrollLeft: decActiveSlideIndex, onScrollRight: incActiveSlideIndex, activeIndex: activeSlideIndex, itemCount: itemCount })] }), jsx("div", { className: "space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs", children: tabs[activeTabIndex]?.href ? (jsx(TabsLayoutRedirectSection, { tab: tabs[activeTabIndex] })) : (renderBlocksList(block?.slots?.[slotName], {
5302
+ const updateUrlSearchTabParam = (_, index) => {
5303
+ const searchParams = new URLSearchParams(router.query);
5304
+ if (_.text) {
5305
+ searchParams.set(TAB_QUERY_PARAM_KEY, String(index));
5306
+ }
5307
+ else {
5308
+ searchParams.delete(TAB_QUERY_PARAM_KEY);
5309
+ }
5310
+ router.replace(`${router.pathname}?${searchParams}`, '', { scroll: false });
5311
+ };
5312
+ const handleChange = useCallback((_) => {
5313
+ const index = tabs.indexOf(_);
5314
+ const tab = tabs[index];
5315
+ setActiveTabIndex(index);
5316
+ if (tab.type === 'group') {
5317
+ updateUrlSearchTabParam(_, index);
5318
+ }
5319
+ }, [tabs]);
5320
+ return (jsxs(BlockWrapper, { className: style(className), defaultPadding: "p-0", ...rest, children: [renderTabsLayout({
5321
+ items: tabs,
5322
+ value: tabs[activeTabIndex],
5323
+ tabsType,
5324
+ onChange: handleChange,
5325
+ }), jsx("div", { className: "space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs", children: renderBlocksList(block?.slots?.[slotName], {
5301
5326
  ...rest?.options,
5302
- key: `${slotName}-${block?.type}`,
5303
5327
  slotName,
5304
5328
  parent: block,
5305
- })) })] }));
5329
+ }) })] }));
5306
5330
  }, {
5307
5331
  slots: ({ tabs }) => tabs?.filter((_) => !_.href).map(getSlotName) || [],
5308
5332
  childrenTypes: { exclude: ['TabsLayout'] }, // TODO: fix this on wcms
5309
5333
  });
5310
- const getSlotName = (tab, index) => tab?.title || `Слот №${index}`;
5334
+ const getSlotName = (tab, index) => tab?.text || `Слот №${index}`;
5311
5335
  const getInitSelectedIndex = (tabs) => tabs.reduce((selectedIndex, tab, i) => (tab.selected ? i : selectedIndex), 0);
5312
- const renderTabButton = (activeTabIndex, onClick, tabAlign = 'start') => (tab, i) => (jsx(TabsLayoutButton, { className: alignTabStyle[tabAlign], tab: tab, isActive: activeTabIndex === i, onClick: () => onClick(i) }, String(i)));
5313
5336
 
5314
5337
  const dividerStyle = '@4xl:border-main-divider @4xl:border-b';
5315
5338
  const firstCellStyle = 'w-80 flex-shrink-0';
@@ -5559,6 +5582,15 @@
5559
5582
  useEventListener(globalThis, 'click', applyAspects(aspects));
5560
5583
  });
5561
5584
 
5585
+ function useDebouncedEffect(effect, deps, delay = 300) {
5586
+ useEffect(() => {
5587
+ const timerId = globalThis.setTimeout(effect, delay);
5588
+ return () => {
5589
+ globalThis.clearTimeout(timerId);
5590
+ };
5591
+ }, deps);
5592
+ }
5593
+
5562
5594
  const COOKIE_DIALOG_ID = 'cookie';
5563
5595
  const DIALOG_INITIAL_DELAY = 3 * 1000;
5564
5596
  const CookiePopup = JSX(({ termLink, personalDataPolicyLink }) => {
@@ -5666,7 +5698,7 @@
5666
5698
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
5667
5699
  });
5668
5700
 
5669
- const packageVersion = "0.14.293";
5701
+ const packageVersion = "0.14.294";
5670
5702
 
5671
5703
  exports.Blocks = Blocks;
5672
5704
  exports.ContentPage = ContentPage;