@redneckz/wildless-cms-uni-blocks 0.14.147 → 0.14.149

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 (217) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +67 -14
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/components/OfficesAtmsMap/OfficesAtmsMapContent.d.ts +2 -3
  5. package/bundle/components/TabsLayout/TabsLayout.d.ts +5 -0
  6. package/bundle/components/TabsLayout/TabsLayoutButton.d.ts +10 -0
  7. package/bundle/components/TabsLayout/TabsLayoutContent.d.ts +21 -0
  8. package/bundle/components/TabsLayout/TabsLayoutRedirectTab.d.ts +6 -0
  9. package/bundle/components/TabsLayout/alignTabStyle.d.ts +2 -0
  10. package/bundle/ui-kit/Shimmer/Shimmer.d.ts +5 -0
  11. package/bundle/ui-kit/SwipeListControl/SwipeListContainer.d.ts +2 -2
  12. package/bundle/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +1 -1
  13. package/dist/components/Blocks.js +3 -1
  14. package/dist/components/Blocks.js.map +1 -1
  15. package/dist/components/Blocks.mobile.js +3 -1
  16. package/dist/components/Blocks.mobile.js.map +1 -1
  17. package/dist/components/ContentPage/ContentPage.page.json +0 -37
  18. package/dist/components/OfficesAtmsMap/OfficesAtmsMapContent.d.ts +2 -3
  19. package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +2 -2
  20. package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
  21. package/dist/components/Placeholder/Placeholder.js +2 -7
  22. package/dist/components/Placeholder/Placeholder.js.map +1 -1
  23. package/dist/components/TabsLayout/TabsLayout.d.ts +5 -0
  24. package/dist/components/TabsLayout/TabsLayout.js +32 -0
  25. package/dist/components/TabsLayout/TabsLayout.js.map +1 -0
  26. package/dist/components/TabsLayout/TabsLayoutButton.d.ts +10 -0
  27. package/dist/components/TabsLayout/TabsLayoutButton.js +23 -0
  28. package/dist/components/TabsLayout/TabsLayoutButton.js.map +1 -0
  29. package/dist/components/TabsLayout/TabsLayoutContent.d.ts +21 -0
  30. package/dist/components/TabsLayout/TabsLayoutContent.js +2 -0
  31. package/dist/components/TabsLayout/TabsLayoutContent.js.map +1 -0
  32. package/dist/components/TabsLayout/TabsLayoutRedirectTab.d.ts +6 -0
  33. package/dist/components/TabsLayout/TabsLayoutRedirectTab.js +17 -0
  34. package/dist/components/TabsLayout/TabsLayoutRedirectTab.js.map +1 -0
  35. package/dist/components/TabsLayout/alignTabStyle.d.ts +2 -0
  36. package/dist/components/TabsLayout/alignTabStyle.js +8 -0
  37. package/dist/components/TabsLayout/alignTabStyle.js.map +1 -0
  38. package/dist/setup-fixture.js +1 -1
  39. package/dist/setup-fixture.js.map +1 -1
  40. package/dist/ui-kit/Shimmer/Shimmer.d.ts +5 -0
  41. package/dist/ui-kit/Shimmer/Shimmer.js +13 -0
  42. package/dist/ui-kit/Shimmer/Shimmer.js.map +1 -0
  43. package/dist/ui-kit/SwipeListControl/SwipeListContainer.d.ts +2 -2
  44. package/dist/ui-kit/SwipeListControl/SwipeListContainer.js +2 -2
  45. package/dist/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
  46. package/dist/ui-kit/SwipeListControl/SwipeListItem.js +3 -2
  47. package/dist/ui-kit/SwipeListControl/SwipeListItem.js.map +1 -1
  48. package/dist/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +1 -1
  49. package/dist/ui-kit/SwipeListControl/useSwipeListScroll.js +6 -6
  50. package/dist/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
  51. package/lib/common.css +1 -1
  52. package/lib/components/Blocks.js +3 -1
  53. package/lib/components/Blocks.js.map +1 -1
  54. package/lib/components/Blocks.mobile.js +3 -1
  55. package/lib/components/Blocks.mobile.js.map +1 -1
  56. package/lib/components/ContentPage/ContentPage.page.json +0 -37
  57. package/lib/components/OfficesAtmsMap/OfficesAtmsMapContent.d.ts +2 -3
  58. package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +2 -2
  59. package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
  60. package/lib/components/Placeholder/Placeholder.js +2 -7
  61. package/lib/components/Placeholder/Placeholder.js.map +1 -1
  62. package/lib/components/TabsLayout/TabsLayout.d.ts +5 -0
  63. package/lib/components/TabsLayout/TabsLayout.fixture.d.ts +6 -0
  64. package/lib/components/TabsLayout/TabsLayout.fixture.mobile.d.ts +6 -0
  65. package/lib/components/TabsLayout/TabsLayout.js +30 -0
  66. package/lib/components/TabsLayout/TabsLayout.js.map +1 -0
  67. package/lib/components/TabsLayout/TabsLayoutButton.d.ts +10 -0
  68. package/lib/components/TabsLayout/TabsLayoutButton.js +21 -0
  69. package/lib/components/TabsLayout/TabsLayoutButton.js.map +1 -0
  70. package/lib/components/TabsLayout/TabsLayoutContent.d.ts +21 -0
  71. package/lib/components/TabsLayout/TabsLayoutContent.js +2 -0
  72. package/lib/components/TabsLayout/TabsLayoutContent.js.map +1 -0
  73. package/lib/components/TabsLayout/TabsLayoutRedirectTab.d.ts +6 -0
  74. package/lib/components/TabsLayout/TabsLayoutRedirectTab.js +15 -0
  75. package/lib/components/TabsLayout/TabsLayoutRedirectTab.js.map +1 -0
  76. package/lib/components/TabsLayout/alignTabStyle.d.ts +2 -0
  77. package/lib/components/TabsLayout/alignTabStyle.js +6 -0
  78. package/lib/components/TabsLayout/alignTabStyle.js.map +1 -0
  79. package/lib/setup-fixture.js +1 -1
  80. package/lib/setup-fixture.js.map +1 -1
  81. package/lib/ui-kit/Shimmer/Shimmer.d.ts +5 -0
  82. package/lib/ui-kit/Shimmer/Shimmer.js +11 -0
  83. package/lib/ui-kit/Shimmer/Shimmer.js.map +1 -0
  84. package/lib/ui-kit/SwipeListControl/SwipeListContainer.d.ts +2 -2
  85. package/lib/ui-kit/SwipeListControl/SwipeListContainer.js +2 -2
  86. package/lib/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
  87. package/lib/ui-kit/SwipeListControl/SwipeListItem.js +3 -2
  88. package/lib/ui-kit/SwipeListControl/SwipeListItem.js.map +1 -1
  89. package/lib/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +1 -1
  90. package/lib/ui-kit/SwipeListControl/useSwipeListScroll.js +6 -6
  91. package/lib/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
  92. package/mobile/bundle/bundle.umd.js +76 -23
  93. package/mobile/bundle/bundle.umd.min.js +1 -1
  94. package/mobile/bundle/components/OfficesAtmsMap/OfficesAtmsMapContent.d.ts +2 -3
  95. package/mobile/bundle/components/TabsLayout/TabsLayout.d.ts +5 -0
  96. package/mobile/bundle/components/TabsLayout/TabsLayoutButton.d.ts +10 -0
  97. package/mobile/bundle/components/TabsLayout/TabsLayoutContent.d.ts +21 -0
  98. package/mobile/bundle/components/TabsLayout/TabsLayoutRedirectTab.d.ts +6 -0
  99. package/mobile/bundle/components/TabsLayout/alignTabStyle.d.ts +2 -0
  100. package/mobile/bundle/ui-kit/Shimmer/Shimmer.d.ts +5 -0
  101. package/mobile/bundle/ui-kit/SwipeListControl/SwipeListContainer.d.ts +2 -2
  102. package/mobile/bundle/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +1 -1
  103. package/mobile/dist/components/Blocks.js +3 -1
  104. package/mobile/dist/components/Blocks.js.map +1 -1
  105. package/mobile/dist/components/ContentPage/ContentPage.page.json +0 -37
  106. package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapContent.d.ts +2 -3
  107. package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +2 -2
  108. package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
  109. package/mobile/dist/components/Placeholder/Placeholder.js +2 -7
  110. package/mobile/dist/components/Placeholder/Placeholder.js.map +1 -1
  111. package/mobile/dist/components/TabsLayout/TabsLayout.d.ts +5 -0
  112. package/mobile/dist/components/TabsLayout/TabsLayout.js +32 -0
  113. package/mobile/dist/components/TabsLayout/TabsLayout.js.map +1 -0
  114. package/mobile/dist/components/TabsLayout/TabsLayoutButton.d.ts +10 -0
  115. package/mobile/dist/components/TabsLayout/TabsLayoutButton.js +23 -0
  116. package/mobile/dist/components/TabsLayout/TabsLayoutButton.js.map +1 -0
  117. package/mobile/dist/components/TabsLayout/TabsLayoutContent.d.ts +21 -0
  118. package/mobile/dist/components/TabsLayout/TabsLayoutContent.js +2 -0
  119. package/mobile/dist/components/TabsLayout/TabsLayoutContent.js.map +1 -0
  120. package/mobile/dist/components/TabsLayout/TabsLayoutRedirectTab.d.ts +6 -0
  121. package/mobile/dist/components/TabsLayout/TabsLayoutRedirectTab.js +17 -0
  122. package/mobile/dist/components/TabsLayout/TabsLayoutRedirectTab.js.map +1 -0
  123. package/mobile/dist/components/TabsLayout/alignTabStyle.d.ts +2 -0
  124. package/mobile/dist/components/TabsLayout/alignTabStyle.js +8 -0
  125. package/mobile/dist/components/TabsLayout/alignTabStyle.js.map +1 -0
  126. package/mobile/dist/setup-fixture.js +1 -1
  127. package/mobile/dist/setup-fixture.js.map +1 -1
  128. package/mobile/dist/ui-kit/Shimmer/Shimmer.d.ts +5 -0
  129. package/mobile/dist/ui-kit/Shimmer/Shimmer.js +13 -0
  130. package/mobile/dist/ui-kit/Shimmer/Shimmer.js.map +1 -0
  131. package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.d.ts +2 -2
  132. package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.js +2 -2
  133. package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
  134. package/mobile/dist/ui-kit/SwipeListControl/SwipeListItem.js +3 -2
  135. package/mobile/dist/ui-kit/SwipeListControl/SwipeListItem.js.map +1 -1
  136. package/mobile/dist/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +1 -1
  137. package/mobile/dist/ui-kit/SwipeListControl/useSwipeListScroll.js +6 -6
  138. package/mobile/dist/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
  139. package/mobile/lib/common.css +1 -1
  140. package/mobile/lib/components/Blocks.js +3 -1
  141. package/mobile/lib/components/Blocks.js.map +1 -1
  142. package/mobile/lib/components/ContentPage/ContentPage.page.json +0 -37
  143. package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapContent.d.ts +2 -3
  144. package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +2 -2
  145. package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
  146. package/mobile/lib/components/Placeholder/Placeholder.js +2 -7
  147. package/mobile/lib/components/Placeholder/Placeholder.js.map +1 -1
  148. package/mobile/lib/components/TabsLayout/TabsLayout.d.ts +5 -0
  149. package/mobile/lib/components/TabsLayout/TabsLayout.js +30 -0
  150. package/mobile/lib/components/TabsLayout/TabsLayout.js.map +1 -0
  151. package/mobile/lib/components/TabsLayout/TabsLayoutButton.d.ts +10 -0
  152. package/mobile/lib/components/TabsLayout/TabsLayoutButton.js +21 -0
  153. package/mobile/lib/components/TabsLayout/TabsLayoutButton.js.map +1 -0
  154. package/mobile/lib/components/TabsLayout/TabsLayoutContent.d.ts +21 -0
  155. package/mobile/lib/components/TabsLayout/TabsLayoutContent.js +2 -0
  156. package/mobile/lib/components/TabsLayout/TabsLayoutContent.js.map +1 -0
  157. package/mobile/lib/components/TabsLayout/TabsLayoutRedirectTab.d.ts +6 -0
  158. package/mobile/lib/components/TabsLayout/TabsLayoutRedirectTab.js +15 -0
  159. package/mobile/lib/components/TabsLayout/TabsLayoutRedirectTab.js.map +1 -0
  160. package/mobile/lib/components/TabsLayout/alignTabStyle.d.ts +2 -0
  161. package/mobile/lib/components/TabsLayout/alignTabStyle.js +6 -0
  162. package/mobile/lib/components/TabsLayout/alignTabStyle.js.map +1 -0
  163. package/mobile/lib/setup-fixture.js +1 -1
  164. package/mobile/lib/setup-fixture.js.map +1 -1
  165. package/mobile/lib/ui-kit/Shimmer/Shimmer.d.ts +5 -0
  166. package/mobile/lib/ui-kit/Shimmer/Shimmer.js +11 -0
  167. package/mobile/lib/ui-kit/Shimmer/Shimmer.js.map +1 -0
  168. package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.d.ts +2 -2
  169. package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.js +2 -2
  170. package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
  171. package/mobile/lib/ui-kit/SwipeListControl/SwipeListItem.js +3 -2
  172. package/mobile/lib/ui-kit/SwipeListControl/SwipeListItem.js.map +1 -1
  173. package/mobile/lib/ui-kit/SwipeListControl/useSwipeListScroll.d.ts +1 -1
  174. package/mobile/lib/ui-kit/SwipeListControl/useSwipeListScroll.js +6 -6
  175. package/mobile/lib/ui-kit/SwipeListControl/useSwipeListScroll.js.map +1 -1
  176. package/mobile/src/components/Blocks.ts +3 -1
  177. package/mobile/src/components/ContentPage/ContentPage.page.json +0 -37
  178. package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMap.ui.json +3 -0
  179. package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMapContent.ts +2 -3
  180. package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +4 -8
  181. package/mobile/src/components/Placeholder/Placeholder.tsx +2 -19
  182. package/mobile/src/components/TabsLayout/TabsLayout.example.json +8 -0
  183. package/mobile/src/components/TabsLayout/TabsLayout.tsx +88 -0
  184. package/mobile/src/components/TabsLayout/TabsLayout.ui.json +11 -0
  185. package/mobile/src/components/TabsLayout/TabsLayoutButton.tsx +60 -0
  186. package/mobile/src/components/TabsLayout/TabsLayoutContent.ts +26 -0
  187. package/mobile/src/components/TabsLayout/TabsLayoutRedirectTab.tsx +26 -0
  188. package/mobile/src/components/TabsLayout/alignTabStyle.ts +7 -0
  189. package/mobile/src/setup-fixture.ts +1 -1
  190. package/mobile/src/ui-kit/Shimmer/Shimmer.tsx +29 -0
  191. package/mobile/src/ui-kit/SwipeListControl/SwipeListContainer.tsx +5 -4
  192. package/mobile/src/ui-kit/SwipeListControl/SwipeListItem.tsx +12 -3
  193. package/mobile/src/ui-kit/SwipeListControl/useSwipeListScroll.ts +10 -7
  194. package/package.json +2 -2
  195. package/src/components/Blocks.mobile.ts +3 -1
  196. package/src/components/Blocks.ts +3 -1
  197. package/src/components/ContentPage/ContentPage.page.json +0 -37
  198. package/src/components/OfficesAtmsMap/OfficesAtmsMap.fixture.mobile.tsx +4 -2
  199. package/src/components/OfficesAtmsMap/OfficesAtmsMap.fixture.tsx +4 -2
  200. package/src/components/OfficesAtmsMap/OfficesAtmsMap.ui.json +3 -0
  201. package/src/components/OfficesAtmsMap/OfficesAtmsMapContent.ts +2 -3
  202. package/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +4 -8
  203. package/src/components/Placeholder/Placeholder.tsx +2 -19
  204. package/src/components/TabsLayout/TabsLayout.example.json +8 -0
  205. package/src/components/TabsLayout/TabsLayout.fixture.mobile.tsx +53 -0
  206. package/src/components/TabsLayout/TabsLayout.fixture.tsx +53 -0
  207. package/src/components/TabsLayout/TabsLayout.tsx +88 -0
  208. package/src/components/TabsLayout/TabsLayout.ui.json +11 -0
  209. package/src/components/TabsLayout/TabsLayoutButton.tsx +60 -0
  210. package/src/components/TabsLayout/TabsLayoutContent.ts +26 -0
  211. package/src/components/TabsLayout/TabsLayoutRedirectTab.tsx +26 -0
  212. package/src/components/TabsLayout/alignTabStyle.ts +7 -0
  213. package/src/setup-fixture.ts +1 -1
  214. package/src/ui-kit/Shimmer/Shimmer.tsx +29 -0
  215. package/src/ui-kit/SwipeListControl/SwipeListContainer.tsx +5 -4
  216. package/src/ui-kit/SwipeListControl/SwipeListItem.tsx +12 -3
  217. package/src/ui-kit/SwipeListControl/useSwipeListScroll.ts +10 -7
@@ -0,0 +1,21 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
+ import { JSX } from '@redneckz/uni-jsx';
3
+ import { Img } from '../../ui-kit/Img/Img.js';
4
+ import { style } from '../../utils/style.js';
5
+ const getButtonClassNames = (isActive) => ({
6
+ btn: `w-96 ${isActive
7
+ ? 'p-m border-none bg-primary-main text-white'
8
+ : 'p-s ease-in duration-300 bg-white text-primary-text'}`,
9
+ title: isActive ? 'mb-xs text-xl' : 'mb-2xs text-l',
10
+ desc: `font-light ${isActive ? 'text-l text-white' : 'text-m text-secondary-text'}`,
11
+ icon: isActive ? '' : 'text-primary-main',
12
+ iconVersion: (isActive ? 'white' : 'normal'),
13
+ });
14
+ export const TabsLayoutButton = JSX(({ tab, className, onClick, isActive }) => {
15
+ const buttonClassNames = getButtonClassNames(isActive);
16
+ 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), children: [tab?.icon ? (_jsx(Img, { className: style('h-6 w-6 min-w-6 min-h-6', buttonClassNames.icon), image: {
17
+ ...tab?.icon,
18
+ iconVersion: tab?.icon?.iconVersion ?? buttonClassNames.iconVersion,
19
+ }, 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] })] }));
20
+ });
21
+ //# sourceMappingURL=TabsLayoutButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TabsLayoutButton.js","sourceRoot":"","sources":["../../../src/components/TabsLayout/TabsLayoutButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAE3C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAG1C,MAAM,mBAAmB,GAAG,CAAC,QAAiB,EAAE,EAAE,CAAC,CAAC;IAClD,GAAG,EAAE,QACH,QAAQ;QACN,CAAC,CAAC,4CAA4C;QAC9C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C7E,GAAG,EAAE,WAAW,CAAC,CAAC,CAAC,cAAK,SAAS,EAAE,gBAAgB,CAAC,IAAI,YAAG,GAAG,CAAC,WAAW,GAAO,CAAC,CAAC,CAAC,IAAI,IACrF,IACC,CACV,CAAC;AACJ,CAAC,CACF,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { type Align } from '../../model/Align';
2
+ import { type DescriptionProps, type TitleProps } from '../../model/HeadlineType';
3
+ import { type UniBlockContent } from '../../model/JSXBlock';
4
+ import { type LinkCommonProps } from '../../model/LinkProps';
5
+ import { type IconProps } from '../../model/Picture';
6
+ /**
7
+ * @title Таб
8
+ */
9
+ export declare type Tab = TitleProps & DescriptionProps & IconProps & LinkCommonProps & {
10
+ /** @title Вкладка выбрана по-умолчанию */
11
+ selected?: boolean;
12
+ };
13
+ /**
14
+ * @title Табы
15
+ */
16
+ export declare type TabsLayoutContent = UniBlockContent & {
17
+ /** @title Выравнивание табов */
18
+ tabAlign?: Align;
19
+ /** @title Список табов */
20
+ tabs?: Tab[];
21
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=TabsLayoutContent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TabsLayoutContent.js","sourceRoot":"","sources":["../../../src/components/TabsLayout/TabsLayoutContent.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ import { type Tab } from './TabsLayoutContent';
2
+ interface TabsLayoutRedirectTabProps {
3
+ tab: Tab;
4
+ }
5
+ export declare const TabsLayoutRedirectTab: import("@redneckz/uni-jsx").UNIComponent<TabsLayoutRedirectTabProps, any, any>;
6
+ export {};
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
2
+ import { JSX } from '@redneckz/uni-jsx';
3
+ import { useDebouncedEffect } from '@redneckz/uni-jsx/lib/hooks/useDebouncedEffect';
4
+ import { useLink } from '../../hooks/useLink.js';
5
+ import { Shimmer } from '../../ui-kit/Shimmer/Shimmer.js';
6
+ const REDIRECT_DELAY = 0.5 * 1000;
7
+ export const TabsLayoutRedirectTab = JSX(({ tab }) => {
8
+ const link = useLink();
9
+ useDebouncedEffect(() => {
10
+ const { onClick } = link(tab);
11
+ onClick();
12
+ }, [tab], REDIRECT_DELAY);
13
+ return _jsx(Shimmer, { className: "col-span-12 p-xl", size: 5 });
14
+ });
15
+ //# sourceMappingURL=TabsLayoutRedirectTab.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TabsLayoutRedirectTab.js","sourceRoot":"","sources":["../../../src/components/TabsLayout/TabsLayoutRedirectTab.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAGvD,MAAM,cAAc,GAAG,GAAG,GAAG,IAAI,CAAC;AAMlC,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAA6B,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE;IAC/E,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;IAEvB,kBAAkB,CAChB,GAAG,EAAE;QACH,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC;QAC9B,OAAO,EAAE,CAAC;IACZ,CAAC,EACD,CAAC,GAAG,CAAC,EACL,cAAc,CACf,CAAC;IAEF,OAAO,KAAC,OAAO,IAAC,SAAS,EAAC,kBAAkB,EAAC,IAAI,EAAE,CAAC,GAAI,CAAC;AAC3D,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { type Align } from '../../model/Align';
2
+ export declare const alignTabStyle: Record<Align, string>;
@@ -0,0 +1,6 @@
1
+ export const alignTabStyle = {
2
+ start: 'text-start',
3
+ center: 'text-center',
4
+ end: 'text-end',
5
+ };
6
+ //# sourceMappingURL=alignTabStyle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alignTabStyle.js","sourceRoot":"","sources":["../../../src/components/TabsLayout/alignTabStyle.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,aAAa,GAA0B;IAClD,KAAK,EAAE,YAAY;IACnB,MAAM,EAAE,aAAa;IACrB,GAAG,EAAE,UAAU;CAChB,CAAC"}
@@ -36,7 +36,7 @@ useRouter.setup(() => {
36
36
  handlerDecorator.setup((handler) => (ev) => {
37
37
  const shouldNotPrevent = ev?.target?.type === 'submit';
38
38
  if (!shouldNotPrevent) {
39
- ev.preventDefault();
39
+ ev?.preventDefault();
40
40
  }
41
41
  handler(ev);
42
42
  });
@@ -1 +1 @@
1
- {"version":3,"file":"setup-fixture.js","sourceRoot":"","sources":["../src/setup-fixture.ts"],"names":[],"mappings":"AAAA,OAAO,mCAAmC,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,GAAG,MAAM,YAAY,CAAC;AAE7B,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAE3B,SAAS,CAAC,KAAK,CAAC,GAAG,EAAE;IACnB,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAC9B,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC,SAAS,EAAE,EAAE,CAAC,CACpE,CAAC;IAEF,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,mBAAmB,GAAG,GAAG,EAAE;YAC/B,OAAO,CAAC,UAAU,CAAC,Q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C,CAAC,eAAe,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CACrE;QACD,KAAK,EAAE,MAAM,CAAC,WAAW,CAAC,IAAI,eAAe,CAAC,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QAC1E,IAAI,EAAE,CAAC,GAAW,EAAE,EAAE;YACpB,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC;QAC9C,CAAC;QACD,OAAO,EAAE,CAAC,GAAW,EAAE,EAAE;YACvB,UAAU,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC;QACjD,CAAC;QACD,IAAI,EAAE,GAAG,EAAE;YACT,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QAC5B,CAAC;KACF,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,gBAAgB,CAAC,KAAK,CAAC,CAAC,OAAO,EAAO,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE;IAC9C,MAAM,gBAAgB,GAAG,EAAE,EAAE,MAAM,EAAE,IAAI,KAAK,QAAQ,CAAC;IAEvD,IAAI,CAAC,gBAAgB,EAAE;QACrB,EAAE,EAAE,cAAc,EAAE,CAAC;KACtB;IAED,OAAO,CAAC,EAAE,CAAC,CAAC;AACd,CAAC,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export interface ShimmerProps {
2
+ className?: string;
3
+ size?: number;
4
+ }
5
+ export declare const Shimmer: import("@redneckz/uni-jsx").UNIComponent<ShimmerProps, any, any>;
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
2
+ import { JSX } from '@redneckz/uni-jsx';
3
+ import { style } from '../../utils/style.js';
4
+ const GOLDEN_RATIO = 1.618;
5
+ export const Shimmer = JSX(({ className, size }) => (_jsx("figure", { className: style('m-0 mt-xl min-w-[80%]', className), children: renderShimmer(size) })));
6
+ const renderShimmer = (size = 3) => goldenSequence(100, size)
7
+ .map((_) => Math.floor(_))
8
+ .map(renderShimmerItem);
9
+ const renderShimmerItem = (width, index) => (_jsx("div", { style: { width: `${width || 100}%` }, className: "h-4 mt-xs bg-secondary-light" }, String(index)));
10
+ const goldenSequence = (first, size) => [first].concat(size > 0 ? goldenSequence(first / GOLDEN_RATIO, size - 1) : []);
11
+ //# sourceMappingURL=Shimmer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Shimmer.js","sourceRoot":"","sources":["../../../src/ui-kit/Shimmer/Shimmer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,MAAM,YAAY,GAAG,KAAK,CAAC;AAO3B,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,CAAe,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAChE,iBAAQ,SAAS,EAAE,KAAK,CAAC,uBAAuB,EAAE,SAAS,CAAC,YAAG,aAAa,CAAC,IAAI,CAAC,GAAU,CAC7F,CAAC,CAAC;AAEH,MAAM,aAAa,GAAG,CAAC,IAAI,GAAG,CAAC,EAAE,EAAE,CACjC,cAAc,CAAC,GAAG,EAAE,IAAI,CAAC;KACtB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;KACzB,GAAG,CAAC,iBAAiB,CAAC,CAAC;AAE5B,MAAM,iBAAiB,GAAG,CAAC,KAAa,EAAE,KAAa,EAAE,EAAE,CAAC,CAC1D,cAEE,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,KAAK,IAAI,GAAG,GAAG,EAAE,EACpC,SAAS,EAAC,8BAA8B,IAFnC,MAAM,CAAC,KAAK,CAAC,CAGlB,CACH,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,KAAa,EAAE,IAAY,EAAY,EAAE,CAC/D,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,KAAK,GAAG,YAAY,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC"}
@@ -1,16 +1,16 @@
1
1
  import { type SwipeListContainerContent } from './SwipeListControlContent';
2
2
  declare type ItemsVisibilityList = Array<IntersectionObserverEntry | undefined>;
3
- declare type SwipeListItemWidthAuto = 0;
4
3
  /**
5
4
  * @title Список
6
5
  */
7
6
  interface SwipeListContainerProps extends SwipeListContainerContent {
8
7
  className?: string;
8
+ itemClassName?: string;
9
9
  containerRef?: {
10
10
  current: HTMLDivElement | null;
11
11
  };
12
12
  activeIndex?: number;
13
- visibleItemCount?: SwipeListItemWidthAuto | 1 | 2 | 3 | 4;
13
+ visibleItemCount?: 0 | 1 | 2 | 3 | 4;
14
14
  snapAlign?: 'snap-start' | 'snap-center' | 'snap-end';
15
15
  gap?: number;
16
16
  padding?: number;
@@ -6,7 +6,7 @@ import { style } from '../../utils/style.js';
6
6
  import { getContainerHeight } from './getContainerHeight.js';
7
7
  import { SwipeListItem } from './SwipeListItem.js';
8
8
  const childStyleMap = ['min-w-full', '@lg:min-w-[50%]', '@lg:min-w-[33.3%]', '@lg:min-w-[25%]'];
9
- export const SwipeListContainer = JSX(({ className = '', containerRef, activeIndex, visibleItemCount = 0, gap = 0, padding = 0, listType = 'horizontal-list', snapAlign = 'snap-center', minHeight, children, onVisibleItemsChange, onVisibleIndicesChange, }) => {
9
+ export const SwipeListContainer = JSX(({ className, itemClassName, containerRef, activeIndex, visibleItemCount = 0, gap = 0, padding = 0, listType = 'horizontal-list', snapAlign = 'snap-center', minHeight, children, onVisibleItemsChange, onVisibleIndicesChange, }) => {
10
10
  const observerOptions = {
11
11
  sensitivity: 1,
12
12
  rootRef: containerRef,
@@ -27,7 +27,7 @@ export const SwipeListContainer = JSX(({ className = '', containerRef, activeInd
27
27
  ...(isVerticalList ? getContainerHeight(minHeight) : {}),
28
28
  gap: `${gap}px`,
29
29
  };
30
- return (_jsx("div", { className: style('box-border overflow-auto no-scrollbar', listType, className), style: containerStyle, ref: containerRef, children: mapChildren((child, idx) => (_jsx(SwipeListItem, { className: style(snapAlign, visibleItemCount ? childStyleMap[visibleItemCount - 1] : '', isVerticalList ? 'h-full' : ''), style: isHorizontalList ? getContainerOffset(padding / 4) : {}, activeIndex: activeIndex, idx: idx, observerOptions: observerOptions, onIntersection: handleIntersection, children: child }, String(idx))))(children) }));
30
+ return (_jsx("div", { className: style('box-border overflow-auto no-scrollbar', listType, className), style: containerStyle, ref: containerRef, children: mapChildren((child, idx) => (_jsx(SwipeListItem, { className: style(snapAlign, visibleItemCount ? childStyleMap[visibleItemCount - 1] : '', isVerticalList ? 'h-full' : '', itemClassName), style: isHorizontalList ? getContainerOffset(padding / 4) : {}, activeIndex: activeIndex, idx: idx, observerOptions: observerOptions, onIntersection: handleIntersection, children: child }, String(idx))))(children) }));
31
31
  });
32
32
  // Styles used to compensate outer container padding to get rid of clipping effect
33
33
  const getContainerOffset = (padding, additionalPadding = 0) => ({
@@ -1 +1 @@
1
- {"version":3,"file":"SwipeListContainer.js","sourceRoot":"","sources":["../../../src/ui-kit/SwipeListControl/SwipeListContainer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAElE,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAqBhD,MAAM,aAAa,GAAG,CAAC,YAAY,EAAE,iB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GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC"}
@@ -2,13 +2,14 @@ import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
2
2
  import { JSX } from '@redneckz/uni-jsx';
3
3
  import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
4
4
  import { useIntersectionObserver, } from '../../hooks/useIntersectionObserver.js';
5
- export const SwipeListItem = JSX(({ className = '', style, idx, activeIndex, observerOptions, children, onIntersection }) => {
5
+ import { style } from '../../utils/style.js';
6
+ export const SwipeListItem = JSX(({ className, style: inlineStyle, idx, activeIndex, observerOptions, children, onIntersection, }) => {
6
7
  const observerCallback = useCallback((entries) => {
7
8
  if (entries.length && onIntersection) {
8
9
  onIntersection(idx || 0, entries[entries.length - 1]);
9
10
  }
10
11
  }, [onIntersection, idx]);
11
12
  const ref = useIntersectionObserver(observerCallback, observerOptions);
12
- return (_jsx("div", { className: `inline-block snap-always box-border ${className}`, style: style, "aria-current": Boolean(idx === activeIndex), ref: ref, children: children }));
13
+ return (_jsx("div", { className: style('inline-block snap-always box-border', className), style: inlineStyle, "aria-current": Boolean(idx === activeIndex), ref: ref, children: children }));
13
14
  });
14
15
  //# sourceMappingURL=SwipeListItem.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SwipeListItem.js","sourceRoot":"","sources":["../../../src/ui-kit/SwipeListControl/SwipeListItem.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EACL,uBAAuB,GAExB,MAAM,qCAAqC,CAAC;AAc7C,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAC9B,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,WAAW,EAAE,eAAe,EAAE,QAAQ,EAAE,cAAc,EAAE,EAAE,EAAE;IACzF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ACH,CAAC,EACD,CAAC,cAAc,EAAE,GAAG,CAAC,CACtB,CAAC;IACF,MAAM,GAAG,GAAG,uBAAuB,CAAiB,gBAAgB,EAAE,eAAe,CAAC,CAAC;IAEvF,OAAO,CACL,cACE,SAAS,EAAE,KAAK,CAAC,qCAAqC,EAAE,SAAS,CAAC,EAClE,KAAK,EAAE,WAAW,kBACJ,OAAO,CAAC,GAAG,KAAK,WAAW,CAAC,EAC1C,GAAG,EAAE,GAAG,YAEP,QAAQ,GACL,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
@@ -1,7 +1,7 @@
1
1
  export interface SwipeListScroll {
2
2
  scrollLeft: () => void;
3
3
  scrollRight: () => void;
4
- scrollTo: (idx: number) => void;
4
+ scrollTo: (idx: number, options?: ScrollIntoViewOptions) => void;
5
5
  canScrollLeft: boolean;
6
6
  canScrollRight: boolean;
7
7
  visibleIndicesRange: [number, number];
@@ -39,13 +39,13 @@ export const useSwipeListScroll = ({ itemCount, onVisibleIndicesChange, }) => {
39
39
  scrollToStart(containerRef.current);
40
40
  }
41
41
  }, [itemCount, canScrollRight]);
42
- const scrollTo = useCallback((idx) => {
42
+ const scrollTo = useCallback((idx, options = {
43
+ behavior: 'smooth',
44
+ block: 'nearest',
45
+ inline: 'center',
46
+ }) => {
43
47
  if (containerRef?.current) {
44
- containerRef.current.children[idx]?.scrollIntoView({
45
- behavior: 'smooth',
46
- block: 'nearest',
47
- inline: 'center',
48
- });
48
+ containerRef.current.children[idx]?.scrollIntoView(options);
49
49
  }
50
50
  }, [containerRef]);
51
51
  return [
@@ -1 +1 @@
1
- {"version":3,"file":"useSwipeListScroll.js","sourceRoot":"","sources":["../../../src/ui-kit/SwipeListControl/useSwipeListScroll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,KA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- const SwipeListItem = JSX(({ className = '', style, idx, activeIndex, observerOptions, children, onIntersection }) => {
2196
+ const SwipeListItem = JSX(({ className, style: inlineStyle, idx, activeIndex, observerOptions, children, onIntersection, }) => {
2197
2197
  const observerCallback = useCallback((entries) => {
2198
2198
  if (entries.length && onIntersection) {
2199
2199
  onIntersection(idx || 0, entries[entries.length - 1]);
2200
2200
  }
2201
2201
  }, [onIntersection, idx]);
2202
2202
  const ref = useIntersectionObserver(observerCallback, observerOptions);
2203
- return (jsx("div", { className: `inline-block snap-always box-border ${className}`, style: style, "aria-current": Boolean(idx === activeIndex), ref: ref, children: children }));
2203
+ return (jsx("div", { className: style('inline-block snap-always box-border', className), style: inlineStyle, "aria-current": Boolean(idx === activeIndex), ref: ref, children: children }));
2204
2204
  });
2205
2205
 
2206
2206
  const childStyleMap = ['min-w-full', '@lg:min-w-[50%]', '@lg:min-w-[33.3%]', '@lg:min-w-[25%]'];
2207
- const SwipeListContainer = JSX(({ className = '', containerRef, activeIndex, visibleItemCount = 0, gap = 0, padding = 0, listType = 'horizontal-list', snapAlign = 'snap-center', minHeight, children, onVisibleItemsChange, onVisibleIndicesChange, }) => {
2207
+ const SwipeListContainer = JSX(({ className, itemClassName, containerRef, activeIndex, visibleItemCount = 0, gap = 0, padding = 0, listType = 'horizontal-list', snapAlign = 'snap-center', minHeight, children, onVisibleItemsChange, onVisibleIndicesChange, }) => {
2208
2208
  const observerOptions = {
2209
2209
  sensitivity: 1,
2210
2210
  rootRef: containerRef,
@@ -2225,7 +2225,7 @@
2225
2225
  ...(isVerticalList ? getContainerHeight(minHeight) : {}),
2226
2226
  gap: `${gap}px`,
2227
2227
  };
2228
- return (jsx("div", { className: style('box-border overflow-auto no-scrollbar', listType, className), style: containerStyle, ref: containerRef, children: mapChildren((child, idx) => (jsx(SwipeListItem, { className: style(snapAlign, visibleItemCount ? childStyleMap[visibleItemCount - 1] : '', isVerticalList ? 'h-full' : ''), style: isHorizontalList ? getContainerOffset(padding / 4) : {}, activeIndex: activeIndex, idx: idx, observerOptions: observerOptions, onIntersection: handleIntersection, children: child }, String(idx))))(children) }));
2228
+ return (jsx("div", { className: style('box-border overflow-auto no-scrollbar', listType, className), style: containerStyle, ref: containerRef, children: mapChildren((child, idx) => (jsx(SwipeListItem, { className: style(snapAlign, visibleItemCount ? childStyleMap[visibleItemCount - 1] : '', isVerticalList ? 'h-full' : '', itemClassName), style: isHorizontalList ? getContainerOffset(padding / 4) : {}, activeIndex: activeIndex, idx: idx, observerOptions: observerOptions, onIntersection: handleIntersection, children: child }, String(idx))))(children) }));
2229
2229
  });
2230
2230
  // Styles used to compensate outer container padding to get rid of clipping effect
2231
2231
  const getContainerOffset = (padding, additionalPadding = 0) => ({
@@ -2319,13 +2319,13 @@
2319
2319
  scrollToStart(containerRef.current);
2320
2320
  }
2321
2321
  }, [itemCount, canScrollRight]);
2322
- const scrollTo = useCallback((idx) => {
2322
+ const scrollTo = useCallback((idx, options = {
2323
+ behavior: 'smooth',
2324
+ block: 'nearest',
2325
+ inline: 'center',
2326
+ }) => {
2323
2327
  if (containerRef?.current) {
2324
- containerRef.current.children[idx]?.scrollIntoView({
2325
- behavior: 'smooth',
2326
- block: 'nearest',
2327
- inline: 'center',
2328
- });
2328
+ containerRef.current.children[idx]?.scrollIntoView(options);
2329
2329
  }
2330
2330
  }, [containerRef]);
2331
2331
  return [
@@ -4410,7 +4410,7 @@
4410
4410
  }, [data, filtrationState]);
4411
4411
  return (jsxs("div", { className: style('space-y-1', className), children: [jsxs("div", { className: "bg-white", children: [jsxs("div", { className: "pt-6xl px-6xl", children: [jsxs("div", { className: "flex gap-xs pb-2xl", children: [jsx(Heading, { headingType: "h2", children: title }), lengthItems ? (jsx(Text, { size: "text-h2", color: "text-secondary-text", children: `(${lengthItems})` })) : null] }), descriptionData ? renderDescriptionBlock$1(descriptionData) : null, renderFiltrationForm(Object.keys(initFilterState), { field, reset })] }), jsx("div", { className: "h-[600px]", children: jsx(ClientOnly, { children: jsx(YandexMap, { points: points, className: "h-full" }) }) })] }), filteredItems.map(renderCard)] }));
4412
4412
  });
4413
- const renderDescriptionBlock$1 = ({ description, list }) => description || list?.length ? (jsxs("div", { className: "p-xl mb-2xl border-b sm:border border-main-divider sm:rounded-md", children: [description ? (jsx(Paragraph, { size: "text-l", font: "font-light", children: description })) : null, list?.length ? (jsx("div", { className: "flex flex-col sm:flex-row gap-2xl sm:flex-wrap pt-xs", children: list.map((item, i) => (jsxs("div", { className: "flex gap-xs items-center", children: [item?.image ? jsx(Img, { image: item.image }) : null, item?.text ? (jsx(Text, { size: "text-m", font: "font-light", children: item.text })) : null] }, String(i)))) })) : null] })) : null;
4413
+ const renderDescriptionBlock$1 = ({ __html, list }) => __html || list?.length ? (jsxs("div", { className: "p-xl mb-2xl border-b sm:border border-main-divider sm:rounded-md", children: [__html ? jsx(RichText, { __html: __html }) : null, list?.length ? (jsx("div", { className: "flex flex-col sm:flex-row gap-2xl sm:flex-wrap pt-xs", children: list.map((item, i) => (jsxs("div", { className: "flex gap-xs items-center", children: [item?.image ? jsx(Img, { image: item.image }) : null, item?.text ? (jsx(Text, { size: "text-m", font: "font-light", children: item.text })) : null] }, String(i)))) })) : null] })) : null;
4414
4414
 
4415
4415
  const colorStyle = {
4416
4416
  yellow: { border: 'border-yellow-light', text: 'text-yellow' },
@@ -4674,13 +4674,15 @@
4674
4674
  });
4675
4675
 
4676
4676
  const GOLDEN_RATIO = 1.618;
4677
- const Placeholder = JSX(({ className, title, description = 'Блок в разработке...', ...rest }) => (jsxs(BlockWrapper, { className: style('box-border', className), ...rest, children: [jsx(Headline, { className: "max-w-[600px]", title: title, description: description, headlineVersion: "L", align: "text-left", isEmbedded: true }), jsx("figure", { className: "m-0 mt-xl min-w-[80%]", children: renderShimmer() })] })));
4677
+ const Shimmer = JSX(({ className, size }) => (jsx("figure", { className: style('m-0 mt-xl min-w-[80%]', className), children: renderShimmer(size) })));
4678
4678
  const renderShimmer = (size = 3) => goldenSequence(100, size)
4679
4679
  .map((_) => Math.floor(_))
4680
4680
  .map(renderShimmerItem);
4681
4681
  const renderShimmerItem = (width, index) => (jsx("div", { style: { width: `${width || 100}%` }, className: "h-4 mt-xs bg-secondary-light" }, String(index)));
4682
4682
  const goldenSequence = (first, size) => [first].concat(size > 0 ? goldenSequence(first / GOLDEN_RATIO, size - 1) : []);
4683
4683
 
4684
+ const Placeholder = JSX(({ className, title, description = 'Блок в разработке...', ...rest }) => (jsxs(BlockWrapper, { className: style('box-border', className), ...rest, children: [jsx(Headline, { className: "max-w-[600px]", title: title, description: description, headlineVersion: "L", align: "text-left", isEmbedded: true }), jsx(Shimmer, {})] })));
4685
+
4684
4686
  const ProductGallery = JSX(({ className, padding, slides = [], ...rest }) => (jsx(BlockWrapper, { className: style('overflow-hidden relative', className), padding: padding, ...rest, children: jsx(SwipeListControl, { gap: 0, padding: 0, children: slides
4685
4687
  .map((s) => s.productBlock)
4686
4688
  .map((_, i) => (jsx("div", { className: "box-border h-full", children: jsx(BaseProductTile, { className: "px-5 h-full", headlineVersion: "L", ..._, ...rest }) }, String(i)))) }) })));
@@ -4964,6 +4966,65 @@
4964
4966
  };
4965
4967
  const normalizeTab = (_) => _?.type === 'group' ? { text: _.title, name: _.ref } : _;
4966
4968
 
4969
+ const alignTabStyle = {
4970
+ start: 'text-start',
4971
+ center: 'text-center',
4972
+ end: 'text-end',
4973
+ };
4974
+
4975
+ const getButtonClassNames = (isActive) => ({
4976
+ btn: `w-96 ${isActive
4977
+ ? 'p-m border-none bg-primary-main text-white'
4978
+ : 'p-s ease-in duration-300 bg-white text-primary-text'}`,
4979
+ title: isActive ? 'mb-xs text-xl' : 'mb-2xs text-l',
4980
+ desc: `font-light ${isActive ? 'text-l text-white' : 'text-m text-secondary-text'}`,
4981
+ icon: isActive ? '' : 'text-primary-main',
4982
+ iconVersion: (isActive ? 'white' : 'normal'),
4983
+ });
4984
+ const TabsLayoutButton = JSX(({ tab, className, onClick, isActive }) => {
4985
+ const buttonClassNames = getButtonClassNames(isActive);
4986
+ 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), children: [tab?.icon ? (jsx(Img, { className: style('h-6 w-6 min-w-6 min-h-6', buttonClassNames.icon), image: {
4987
+ ...tab?.icon,
4988
+ iconVersion: tab?.icon?.iconVersion ?? buttonClassNames.iconVersion,
4989
+ }, 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] })] }));
4990
+ });
4991
+
4992
+ function useDebouncedEffect(effect, deps, delay = 300) {
4993
+ useEffect(() => {
4994
+ const timerId = globalThis.setTimeout(effect, delay);
4995
+ return () => {
4996
+ globalThis.clearTimeout(timerId);
4997
+ };
4998
+ }, deps);
4999
+ }
5000
+
5001
+ const REDIRECT_DELAY = 0.5 * 1000;
5002
+ const TabsLayoutRedirectTab = JSX(({ tab }) => {
5003
+ const link = useLink();
5004
+ useDebouncedEffect(() => {
5005
+ const { onClick } = link(tab);
5006
+ onClick();
5007
+ }, [tab], REDIRECT_DELAY);
5008
+ return jsx(Shimmer, { className: "col-span-12 p-xl", size: 5 });
5009
+ });
5010
+
5011
+ const TabsLayout = JSX(({ className = '', tabs = [], block, tabAlign, ...rest }) => {
5012
+ const [activeTabIndex, setActiveTabIndex] = useState(getInitSelectedIndex(tabs));
5013
+ const slotName = getSlotName(tabs[activeTabIndex], activeTabIndex);
5014
+ const itemCount = tabs.length;
5015
+ const [activeSlideIndex, { inc: incActiveSlideIndex, dec: decActiveSlideIndex }] = useCarouselControls({ itemCount }, activeTabIndex);
5016
+ const [containerRef, scroll] = useSwipeListScroll({ itemCount });
5017
+ useEffect(() => {
5018
+ scroll.scrollTo(activeTabIndex, { behavior: 'auto' });
5019
+ }, []);
5020
+ 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(TabsLayoutRedirectTab, { tab: tabs[activeTabIndex] })) : (renderBlocksList(block?.slots?.[slotName], { ...rest?.options, slotName })) })] }));
5021
+ });
5022
+ TabsLayout.slots = ({ tabs }) => tabs?.filter((_) => !_.href).map(getSlotName) || [];
5023
+ TabsLayout.childrenTypes = { exclude: ['TabsLayout'] };
5024
+ const getSlotName = (tab, index) => tab?.title || `Слот №${index}`;
5025
+ const getInitSelectedIndex = (tabs) => tabs.reduce((selectedIndex, tab, i) => (tab.selected ? i : selectedIndex), 0);
5026
+ const renderTabButton = (activeTabIndex, onClick, tabAlign = 'start') => (tab, i) => (jsx(TabsLayoutButton, { className: alignTabStyle[tabAlign], tab: tab, isActive: activeTabIndex === i, onClick: () => onClick(i) }, String(i)));
5027
+
4967
5028
  const dividerStyle = '@4xl:border-main-divider @4xl:border-b';
4968
5029
  const firstCellStyle = 'w-80 flex-shrink-0';
4969
5030
  const COLS_LENGTH_FOR_SCROLL = 2;
@@ -5175,27 +5236,19 @@
5175
5236
  Placeholder,
5176
5237
  ProductBlock,
5177
5238
  ProductGallery,
5178
- UnitBlock,
5179
5239
  RepresentativeOfficeInfo,
5180
5240
  RichTextBlock,
5181
5241
  RollupItem,
5182
5242
  SafeDepositRental,
5183
5243
  StepsBlock,
5184
5244
  Tabs,
5245
+ TabsLayout,
5185
5246
  TariffsTable,
5186
5247
  TextBlock,
5248
+ UnitBlock,
5187
5249
  VerticalLayout,
5188
5250
  };
5189
5251
 
5190
- function useDebouncedEffect(effect, deps, delay = 300) {
5191
- useEffect(() => {
5192
- const timerId = globalThis.setTimeout(effect, delay);
5193
- return () => {
5194
- globalThis.clearTimeout(timerId);
5195
- };
5196
- }, deps);
5197
- }
5198
-
5199
5252
  const CloseButton = JSX(({ className, onClose }) => (jsx("button", { className: style('flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none', className), onClick: onClose, title: "\u0417\u0430\u043A\u0440\u044B\u0442\u044C", children: jsx(Img, { image: { icon: 'CloseIcon' }, width: "24", height: "24" }) })));
5200
5253
 
5201
5254
  const COOKIE_DIALOG_ID = 'cookie';
@@ -5741,7 +5794,7 @@
5741
5794
 
5742
5795
  const joinList = (sep) => (list) => list.reduce((acc, el, i) => (acc.length ? acc.concat({ ...sep, key: `sep-${i}` }, el) : [el]), []);
5743
5796
 
5744
- const packageVersion = "0.14.146";
5797
+ const packageVersion = "0.14.148";
5745
5798
 
5746
5799
  exports.Blocks = Blocks;
5747
5800
  exports.ContentPage = ContentPage;