@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.
- package/bin/migration-scripts/0.14.257.js +21 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +100 -68
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Tabs/TabsContent.d.ts +1 -1
- package/bundle/components/TabsLayout/TabsLayoutContent.d.ts +31 -6
- package/bundle/components/TabsLayout/renderTabsLayout.d.ts +11 -0
- package/bundle/ui-kit/TabsControl/TabItem.d.ts +5 -4
- package/bundle/ui-kit/TabsControl/TabsControlProps.d.ts +11 -2
- package/bundle/ui-kit/TabsControl/renderTab.d.ts +3 -3
- package/bundle/ui-kit/TabsControl/renderTabItemInner.d.ts +11 -0
- package/dist/components/Tabs/TabsContent.d.ts +1 -1
- package/dist/components/Tabs/renderTabs.js +0 -2
- package/dist/components/Tabs/renderTabs.js.map +1 -1
- package/dist/components/TabsLayout/TabsLayout.js +39 -16
- package/dist/components/TabsLayout/TabsLayout.js.map +1 -1
- package/dist/components/TabsLayout/TabsLayoutContent.d.ts +31 -6
- package/dist/components/TabsLayout/renderTabsLayout.d.ts +11 -0
- package/dist/components/TabsLayout/renderTabsLayout.js +19 -0
- package/dist/components/TabsLayout/renderTabsLayout.js.map +1 -0
- package/dist/ui-kit/TabsControl/ScrollableTabsControl.js +15 -3
- package/dist/ui-kit/TabsControl/ScrollableTabsControl.js.map +1 -1
- package/dist/ui-kit/TabsControl/TabItem.d.ts +5 -4
- package/dist/ui-kit/TabsControl/TabItem.js.map +1 -1
- package/dist/ui-kit/TabsControl/TabItemInner.js +14 -8
- package/dist/ui-kit/TabsControl/TabItemInner.js.map +1 -1
- package/dist/ui-kit/TabsControl/TabsControl.js +1 -1
- package/dist/ui-kit/TabsControl/TabsControl.js.map +1 -1
- package/dist/ui-kit/TabsControl/TabsControlProps.d.ts +11 -2
- package/dist/ui-kit/TabsControl/renderTab.d.ts +3 -3
- package/dist/ui-kit/TabsControl/renderTab.js.map +1 -1
- package/dist/ui-kit/TabsControl/renderTabItemInner.d.ts +11 -0
- package/dist/ui-kit/TabsControl/renderTabItemInner.js +23 -0
- package/dist/ui-kit/TabsControl/renderTabItemInner.js.map +1 -0
- package/lib/common.css +1 -1
- package/lib/components/Tabs/Tabs.fixture.d.ts +0 -1
- package/lib/components/Tabs/Tabs.fixture.mobile.d.ts +0 -1
- package/lib/components/Tabs/TabsContent.d.ts +1 -1
- package/lib/components/Tabs/renderTabs.js +0 -2
- package/lib/components/Tabs/renderTabs.js.map +1 -1
- package/lib/components/TabsLayout/TabsLayout.fixture.d.ts +2 -0
- package/lib/components/TabsLayout/TabsLayout.fixture.mobile.d.ts +2 -0
- package/lib/components/TabsLayout/TabsLayout.js +40 -17
- package/lib/components/TabsLayout/TabsLayout.js.map +1 -1
- package/lib/components/TabsLayout/TabsLayoutContent.d.ts +31 -6
- package/lib/components/TabsLayout/renderTabsLayout.d.ts +10 -0
- package/lib/components/TabsLayout/renderTabsLayout.js +16 -0
- package/lib/components/TabsLayout/renderTabsLayout.js.map +1 -0
- package/lib/ui-kit/TabsControl/ScrollableTabsControl.js +15 -3
- package/lib/ui-kit/TabsControl/ScrollableTabsControl.js.map +1 -1
- package/lib/ui-kit/TabsControl/TabItem.d.ts +5 -4
- package/lib/ui-kit/TabsControl/TabItem.js.map +1 -1
- package/lib/ui-kit/TabsControl/TabItemInner.js +14 -8
- package/lib/ui-kit/TabsControl/TabItemInner.js.map +1 -1
- package/lib/ui-kit/TabsControl/TabsControl.fixture.d.ts +1 -1
- package/lib/ui-kit/TabsControl/TabsControl.js +1 -1
- package/lib/ui-kit/TabsControl/TabsControl.js.map +1 -1
- package/lib/ui-kit/TabsControl/TabsControlProps.d.ts +11 -2
- package/lib/ui-kit/TabsControl/renderTab.d.ts +3 -3
- package/lib/ui-kit/TabsControl/renderTab.js.map +1 -1
- package/lib/ui-kit/TabsControl/renderTabItemInner.d.ts +10 -0
- package/lib/ui-kit/TabsControl/renderTabItemInner.js +20 -0
- package/lib/ui-kit/TabsControl/renderTabItemInner.js.map +1 -0
- package/mobile/bundle/bundle.umd.js +109 -77
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Tabs/TabsContent.d.ts +1 -1
- package/mobile/bundle/components/TabsLayout/TabsLayoutContent.d.ts +31 -6
- package/mobile/bundle/components/TabsLayout/renderTabsLayout.d.ts +11 -0
- package/mobile/bundle/ui-kit/TabsControl/TabItem.d.ts +5 -4
- package/mobile/bundle/ui-kit/TabsControl/TabsControlProps.d.ts +11 -2
- package/mobile/bundle/ui-kit/TabsControl/renderTab.d.ts +3 -3
- package/mobile/bundle/ui-kit/TabsControl/renderTabItemInner.d.ts +11 -0
- package/mobile/dist/components/Tabs/TabsContent.d.ts +1 -1
- package/mobile/dist/components/Tabs/renderTabs.js +0 -2
- package/mobile/dist/components/Tabs/renderTabs.js.map +1 -1
- package/mobile/dist/components/TabsLayout/TabsLayout.js +39 -16
- package/mobile/dist/components/TabsLayout/TabsLayout.js.map +1 -1
- package/mobile/dist/components/TabsLayout/TabsLayoutContent.d.ts +31 -6
- package/mobile/dist/components/TabsLayout/renderTabsLayout.d.ts +11 -0
- package/mobile/dist/components/TabsLayout/renderTabsLayout.js +19 -0
- package/mobile/dist/components/TabsLayout/renderTabsLayout.js.map +1 -0
- package/mobile/dist/ui-kit/TabsControl/ScrollableTabsControl.js +15 -3
- package/mobile/dist/ui-kit/TabsControl/ScrollableTabsControl.js.map +1 -1
- package/mobile/dist/ui-kit/TabsControl/TabItem.d.ts +5 -4
- package/mobile/dist/ui-kit/TabsControl/TabItem.js.map +1 -1
- package/mobile/dist/ui-kit/TabsControl/TabItemInner.js +14 -8
- package/mobile/dist/ui-kit/TabsControl/TabItemInner.js.map +1 -1
- package/mobile/dist/ui-kit/TabsControl/TabsControl.js +1 -1
- package/mobile/dist/ui-kit/TabsControl/TabsControl.js.map +1 -1
- package/mobile/dist/ui-kit/TabsControl/TabsControlProps.d.ts +11 -2
- package/mobile/dist/ui-kit/TabsControl/renderTab.d.ts +3 -3
- package/mobile/dist/ui-kit/TabsControl/renderTab.js.map +1 -1
- package/mobile/dist/ui-kit/TabsControl/renderTabItemInner.d.ts +11 -0
- package/mobile/dist/ui-kit/TabsControl/renderTabItemInner.js +23 -0
- package/mobile/dist/ui-kit/TabsControl/renderTabItemInner.js.map +1 -0
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/Tabs/TabsContent.d.ts +1 -1
- package/mobile/lib/components/Tabs/renderTabs.js +0 -2
- package/mobile/lib/components/Tabs/renderTabs.js.map +1 -1
- package/mobile/lib/components/TabsLayout/TabsLayout.js +40 -17
- package/mobile/lib/components/TabsLayout/TabsLayout.js.map +1 -1
- package/mobile/lib/components/TabsLayout/TabsLayoutContent.d.ts +31 -6
- package/mobile/lib/components/TabsLayout/renderTabsLayout.d.ts +11 -0
- package/mobile/lib/components/TabsLayout/renderTabsLayout.js +16 -0
- package/mobile/lib/components/TabsLayout/renderTabsLayout.js.map +1 -0
- package/mobile/lib/ui-kit/TabsControl/ScrollableTabsControl.js +15 -3
- package/mobile/lib/ui-kit/TabsControl/ScrollableTabsControl.js.map +1 -1
- package/mobile/lib/ui-kit/TabsControl/TabItem.d.ts +5 -4
- package/mobile/lib/ui-kit/TabsControl/TabItem.js.map +1 -1
- package/mobile/lib/ui-kit/TabsControl/TabItemInner.js +14 -8
- package/mobile/lib/ui-kit/TabsControl/TabItemInner.js.map +1 -1
- package/mobile/lib/ui-kit/TabsControl/TabsControl.js +1 -1
- package/mobile/lib/ui-kit/TabsControl/TabsControl.js.map +1 -1
- package/mobile/lib/ui-kit/TabsControl/TabsControlProps.d.ts +11 -2
- package/mobile/lib/ui-kit/TabsControl/renderTab.d.ts +3 -3
- package/mobile/lib/ui-kit/TabsControl/renderTab.js.map +1 -1
- package/mobile/lib/ui-kit/TabsControl/renderTabItemInner.d.ts +11 -0
- package/mobile/lib/ui-kit/TabsControl/renderTabItemInner.js +20 -0
- package/mobile/lib/ui-kit/TabsControl/renderTabItemInner.js.map +1 -0
- package/mobile/src/components/Tabs/TabsContent.ts +1 -1
- package/mobile/src/components/Tabs/renderTabs.tsx +0 -10
- package/mobile/src/components/TabsLayout/TabsLayout.example.json +4 -3
- package/mobile/src/components/TabsLayout/TabsLayout.tsx +56 -57
- package/mobile/src/components/TabsLayout/TabsLayoutContent.ts +36 -8
- package/mobile/src/components/TabsLayout/renderTabsLayout.tsx +32 -0
- package/mobile/src/ui-kit/TabsControl/ScrollableTabsControl.tsx +28 -5
- package/mobile/src/ui-kit/TabsControl/TabItem.tsx +5 -5
- package/mobile/src/ui-kit/TabsControl/TabItemInner.tsx +21 -15
- package/mobile/src/ui-kit/TabsControl/TabsControl.tsx +4 -1
- package/mobile/src/ui-kit/TabsControl/TabsControlProps.ts +12 -2
- package/mobile/src/ui-kit/TabsControl/renderTab.tsx +3 -3
- package/mobile/src/ui-kit/TabsControl/renderTabItemInner.tsx +63 -0
- package/package.json +1 -1
- package/src/components/Tabs/Tabs.fixture.mobile.tsx +0 -16
- package/src/components/Tabs/Tabs.fixture.tsx +0 -19
- package/src/components/Tabs/TabsContent.ts +1 -1
- package/src/components/Tabs/renderTabs.tsx +0 -10
- package/src/components/TabsLayout/TabsLayout.example.json +4 -3
- package/src/components/TabsLayout/TabsLayout.fixture.mobile.tsx +51 -30
- package/src/components/TabsLayout/TabsLayout.fixture.tsx +61 -30
- package/src/components/TabsLayout/TabsLayout.tsx +56 -57
- package/src/components/TabsLayout/TabsLayoutContent.ts +36 -8
- package/src/components/TabsLayout/renderTabsLayout.tsx +32 -0
- package/src/ui-kit/TabsControl/ScrollableTabsControl.tsx +28 -5
- package/src/ui-kit/TabsControl/TabItem.tsx +5 -5
- package/src/ui-kit/TabsControl/TabItemInner.tsx +21 -15
- package/src/ui-kit/TabsControl/TabsControl.fixture.tsx +7 -20
- package/src/ui-kit/TabsControl/TabsControl.tsx +4 -1
- package/src/ui-kit/TabsControl/TabsControlProps.ts +12 -2
- package/src/ui-kit/TabsControl/renderTab.tsx +3 -3
- package/src/ui-kit/TabsControl/renderTabItemInner.tsx +63 -0
- package/bundle/components/TabsLayout/TabsLayoutButton.d.ts +0 -10
- package/bundle/components/TabsLayout/TabsLayoutRedirectSection.d.ts +0 -6
- package/bundle/components/TabsLayout/alignTabStyle.d.ts +0 -2
- package/bundle/components/TabsLayout/useScrollToTab.d.ts +0 -2
- package/dist/components/TabsLayout/TabsLayoutButton.d.ts +0 -10
- package/dist/components/TabsLayout/TabsLayoutButton.js +0 -24
- package/dist/components/TabsLayout/TabsLayoutButton.js.map +0 -1
- package/dist/components/TabsLayout/TabsLayoutRedirectSection.d.ts +0 -6
- package/dist/components/TabsLayout/TabsLayoutRedirectSection.js +0 -27
- package/dist/components/TabsLayout/TabsLayoutRedirectSection.js.map +0 -1
- package/dist/components/TabsLayout/alignTabStyle.d.ts +0 -2
- package/dist/components/TabsLayout/alignTabStyle.js +0 -8
- package/dist/components/TabsLayout/alignTabStyle.js.map +0 -1
- package/dist/components/TabsLayout/useScrollToTab.d.ts +0 -2
- package/dist/components/TabsLayout/useScrollToTab.js +0 -17
- package/dist/components/TabsLayout/useScrollToTab.js.map +0 -1
- package/lib/components/TabsLayout/TabsLayoutButton.d.ts +0 -10
- package/lib/components/TabsLayout/TabsLayoutButton.js +0 -22
- package/lib/components/TabsLayout/TabsLayoutButton.js.map +0 -1
- package/lib/components/TabsLayout/TabsLayoutRedirectSection.d.ts +0 -6
- package/lib/components/TabsLayout/TabsLayoutRedirectSection.js +0 -25
- package/lib/components/TabsLayout/TabsLayoutRedirectSection.js.map +0 -1
- package/lib/components/TabsLayout/alignTabStyle.d.ts +0 -2
- package/lib/components/TabsLayout/alignTabStyle.js +0 -6
- package/lib/components/TabsLayout/alignTabStyle.js.map +0 -1
- package/lib/components/TabsLayout/useScrollToTab.d.ts +0 -2
- package/lib/components/TabsLayout/useScrollToTab.js +0 -14
- package/lib/components/TabsLayout/useScrollToTab.js.map +0 -1
- package/mobile/bundle/components/TabsLayout/TabsLayoutButton.d.ts +0 -10
- package/mobile/bundle/components/TabsLayout/TabsLayoutRedirectSection.d.ts +0 -6
- package/mobile/bundle/components/TabsLayout/alignTabStyle.d.ts +0 -2
- package/mobile/bundle/components/TabsLayout/useScrollToTab.d.ts +0 -2
- package/mobile/dist/components/TabsLayout/TabsLayoutButton.d.ts +0 -10
- package/mobile/dist/components/TabsLayout/TabsLayoutButton.js +0 -24
- package/mobile/dist/components/TabsLayout/TabsLayoutButton.js.map +0 -1
- package/mobile/dist/components/TabsLayout/TabsLayoutRedirectSection.d.ts +0 -6
- package/mobile/dist/components/TabsLayout/TabsLayoutRedirectSection.js +0 -27
- package/mobile/dist/components/TabsLayout/TabsLayoutRedirectSection.js.map +0 -1
- package/mobile/dist/components/TabsLayout/alignTabStyle.d.ts +0 -2
- package/mobile/dist/components/TabsLayout/alignTabStyle.js +0 -8
- package/mobile/dist/components/TabsLayout/alignTabStyle.js.map +0 -1
- package/mobile/dist/components/TabsLayout/useScrollToTab.d.ts +0 -2
- package/mobile/dist/components/TabsLayout/useScrollToTab.js +0 -17
- package/mobile/dist/components/TabsLayout/useScrollToTab.js.map +0 -1
- package/mobile/lib/components/TabsLayout/TabsLayoutButton.d.ts +0 -10
- package/mobile/lib/components/TabsLayout/TabsLayoutButton.js +0 -22
- package/mobile/lib/components/TabsLayout/TabsLayoutButton.js.map +0 -1
- package/mobile/lib/components/TabsLayout/TabsLayoutRedirectSection.d.ts +0 -6
- package/mobile/lib/components/TabsLayout/TabsLayoutRedirectSection.js +0 -25
- package/mobile/lib/components/TabsLayout/TabsLayoutRedirectSection.js.map +0 -1
- package/mobile/lib/components/TabsLayout/alignTabStyle.d.ts +0 -2
- package/mobile/lib/components/TabsLayout/alignTabStyle.js +0 -6
- package/mobile/lib/components/TabsLayout/alignTabStyle.js.map +0 -1
- package/mobile/lib/components/TabsLayout/useScrollToTab.d.ts +0 -2
- package/mobile/lib/components/TabsLayout/useScrollToTab.js +0 -14
- package/mobile/lib/components/TabsLayout/useScrollToTab.js.map +0 -1
- package/mobile/src/components/TabsLayout/TabsLayoutButton.tsx +0 -63
- package/mobile/src/components/TabsLayout/TabsLayoutRedirectSection.tsx +0 -32
- package/mobile/src/components/TabsLayout/alignTabStyle.ts +0 -7
- package/mobile/src/components/TabsLayout/useScrollToTab.ts +0 -16
- package/src/components/TabsLayout/TabsLayoutButton.tsx +0 -63
- package/src/components/TabsLayout/TabsLayoutRedirectSection.tsx +0 -32
- package/src/components/TabsLayout/alignTabStyle.ts +0 -7
- package/src/components/TabsLayout/useScrollToTab.ts +0 -16
|
@@ -1,22 +1,47 @@
|
|
|
1
|
-
import { type Align } from '../../model/Align';
|
|
2
1
|
import { type AspectsProps } from '../../model/AspectsProps';
|
|
3
|
-
import { type DescriptionProps
|
|
4
|
-
import { type
|
|
2
|
+
import { type DescriptionProps } from '../../model/HeadlineType';
|
|
3
|
+
import { type LinkProps } from '../../model/LinkProps';
|
|
5
4
|
import { type IconProps } from '../../model/Picture';
|
|
5
|
+
import { type TabsType } from '../../ui-kit/TabsControl/TabsControlProps';
|
|
6
6
|
import { type UniBlockContent } from '../../UniBlock/UniBlockProps';
|
|
7
7
|
/**
|
|
8
8
|
* @title Таб
|
|
9
9
|
*/
|
|
10
|
-
export declare type
|
|
10
|
+
export declare type TabBase = DescriptionProps & IconProps & LinkProps & AspectsProps & {
|
|
11
11
|
/** @title Вкладка выбрана по-умолчанию */
|
|
12
12
|
selected?: boolean;
|
|
13
13
|
};
|
|
14
|
+
/**
|
|
15
|
+
* @title Группа
|
|
16
|
+
*/
|
|
17
|
+
export declare type GroupTab = TabBase & {
|
|
18
|
+
/** @default group */
|
|
19
|
+
type: 'group';
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* @title Ссылка
|
|
23
|
+
*/
|
|
24
|
+
export declare type LinkTab = TabBase & LinkProps & {
|
|
25
|
+
/** @default link */
|
|
26
|
+
type: 'link';
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* @title Таб
|
|
30
|
+
* @default {
|
|
31
|
+
* "type": "group"
|
|
32
|
+
* }
|
|
33
|
+
*/
|
|
34
|
+
export declare type Tab = GroupTab | LinkTab;
|
|
14
35
|
/**
|
|
15
36
|
* @title Табы
|
|
16
37
|
*/
|
|
17
38
|
export declare type TabsLayoutContent = UniBlockContent & {
|
|
18
|
-
/** @title Выравнивание табов */
|
|
19
|
-
tabAlign?: Align;
|
|
20
39
|
/** @title Список табов */
|
|
21
40
|
tabs?: Tab[];
|
|
41
|
+
/** @title Режим отображения */
|
|
42
|
+
tabsType?: TabsType;
|
|
43
|
+
/** @title Закрепить сверху */
|
|
44
|
+
isSticky?: boolean;
|
|
45
|
+
/** @title Показывать счетчик блоков во вкладках */
|
|
46
|
+
showCounter?: boolean;
|
|
22
47
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type TabItemBase } from '../../ui-kit/TabsControl/TabItem';
|
|
3
|
+
import { type TabsControlProps, type TabsType } from '../../ui-kit/TabsControl/TabsControlProps';
|
|
4
|
+
interface RenderTabsProps {
|
|
5
|
+
items: TabItemBase[];
|
|
6
|
+
value: TabItemBase;
|
|
7
|
+
onChange: TabsControlProps['onChange'];
|
|
8
|
+
tabsType?: TabsType;
|
|
9
|
+
}
|
|
10
|
+
export declare const renderTabsLayout: ({ tabsType, ...props }: RenderTabsProps) => JSX.Element | null;
|
|
11
|
+
export {};
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
+
import { type DescriptionProps, type TitleProps } from '../../model/HeadlineType';
|
|
1
2
|
import { type LinkProps } from '../../model/LinkProps';
|
|
3
|
+
import { type IconProps } from '../../model/Picture';
|
|
2
4
|
import { type VNode } from '../../model/VNode';
|
|
3
|
-
import { type TabsControlProps } from './TabsControlProps';
|
|
4
|
-
export interface TabItemBase extends LinkProps {
|
|
5
|
+
import { type TabsControlProps, type TabsType } from './TabsControlProps';
|
|
6
|
+
export interface TabItemBase extends LinkProps, TitleProps, DescriptionProps, IconProps {
|
|
5
7
|
name?: string;
|
|
6
8
|
appendRight?: VNode;
|
|
7
9
|
}
|
|
8
|
-
export declare type TabType = 'default' | 'underlined' | 'rounded';
|
|
9
10
|
export interface TabItemProps {
|
|
10
11
|
item?: TabItemBase;
|
|
11
12
|
isActive?: boolean;
|
|
12
|
-
type?:
|
|
13
|
+
type?: TabsType;
|
|
13
14
|
onClick?: TabsControlProps['onChange'];
|
|
14
15
|
}
|
|
15
16
|
export declare const TabItem: import("@redneckz/uni-jsx").UNIComponent<TabItemProps, any, any>;
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import { type ListControlProps } from '../ListControlProps';
|
|
2
|
-
import { type TabItemBase
|
|
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?:
|
|
14
|
+
tabsType?: TabsType;
|
|
6
15
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { type TabItemBase
|
|
3
|
-
import { type TabsControlProps } from './TabsControlProps';
|
|
4
|
-
export declare const renderTab: (activeTab?: TabItemBase, onClick?: TabsControlProps['onChange'], type?:
|
|
2
|
+
import { type TabItemBase } from './TabItem';
|
|
3
|
+
import { type TabsControlProps, type TabsType } from './TabsControlProps';
|
|
4
|
+
export declare const renderTab: (activeTab?: TabItemBase, onClick?: TabsControlProps['onChange'], type?: TabsType) => (tab: TabItemBase, i: number) => JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type Picture } from '../../model/Picture';
|
|
3
|
+
interface TabsLayoutButtonProps {
|
|
4
|
+
isActive: boolean;
|
|
5
|
+
description?: string;
|
|
6
|
+
icon?: Picture;
|
|
7
|
+
type: string;
|
|
8
|
+
text?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const renderTabItemInner: ({ text, description, icon, isActive, type, }: TabsLayoutButtonProps) => JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -7,8 +7,6 @@ const renderTabs = ({ tabsMode, ...props }) => {
|
|
|
7
7
|
switch (tabsMode) {
|
|
8
8
|
case 'wideScreen':
|
|
9
9
|
return (0, jsx_runtime_1.jsx)(TabsControl_1.TabsControl, { ...props });
|
|
10
|
-
case 'centered':
|
|
11
|
-
return ((0, jsx_runtime_1.jsx)("div", { className: "flex", children: (0, jsx_runtime_1.jsx)(TabsControl_1.TabsControl, { className: "m-auto p-xs rounded-md bg-main-gray", tabsType: "rounded", ...props }) }));
|
|
12
10
|
case 'scrollable':
|
|
13
11
|
return ((0, jsx_runtime_1.jsx)("div", { className: "flex", children: (0, jsx_runtime_1.jsx)(ScrollableTabsControl_1.ScrollableTabsControl, { className: "m-auto", tabsType: "underlined", ...props }) }));
|
|
14
12
|
default:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderTabs.js","sourceRoot":"","sources":["../../../src/components/Tabs/renderTabs.tsx"],"names":[],"mappings":";;;AAAA,0FAAuF;AAEvF,sEAAmE;AAW5D,MAAM,UAAU,GAAG,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAmB,EAAE,EAAE;IACpE,QAAQ,QAAQ,EAAE;QAChB,KAAK,YAAY;YACf,OAAO,uBAAC,yBAAW,OAAK,KAAK,GAAI,CAAC;QACpC,KAAK,
|
|
1
|
+
{"version":3,"file":"renderTabs.js","sourceRoot":"","sources":["../../../src/components/Tabs/renderTabs.tsx"],"names":[],"mappings":";;;AAAA,0FAAuF;AAEvF,sEAAmE;AAW5D,MAAM,UAAU,GAAG,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAmB,EAAE,EAAE;IACpE,QAAQ,QAAQ,EAAE;QAChB,KAAK,YAAY;YACf,OAAO,uBAAC,yBAAW,OAAK,KAAK,GAAI,CAAC;QACpC,KAAK,YAAY;YACf,OAAO,CACL,gCAAK,SAAS,EAAC,MAAM,YACnB,uBAAC,6CAAqB,IAAC,SAAS,EAAC,QAAQ,EAAC,QAAQ,EAAC,YAAY,KAAK,KAAK,GAAI,GACzE,CACP,CAAC;QACJ;YACE,OAAO,IAAI,CAAC;KACf;AACH,CAAC,CAAC;AAbW,QAAA,UAAU,cAarB"}
|
|
@@ -3,33 +3,56 @@ exports.TabsLayout = void 0;
|
|
|
3
3
|
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
4
|
const hooks_1 = require("@redneckz/uni-jsx/lib/hooks");
|
|
5
5
|
const renderBlockList_1 = require("../../BlockRenderer/renderBlockList");
|
|
6
|
-
const
|
|
6
|
+
const useRouter_1 = require("../../hooks/useRouter");
|
|
7
7
|
const BlockWrapper_1 = require("../../ui-kit/BlockWrapper");
|
|
8
|
-
const SwipeListContainer_1 = require("../../ui-kit/SwipeListControl/SwipeListContainer");
|
|
9
|
-
const useSwipeListScroll_1 = require("../../ui-kit/SwipeListControl/useSwipeListScroll");
|
|
10
8
|
const UniBlock_1 = require("../../UniBlock/UniBlock");
|
|
11
9
|
const style_1 = require("../../utils/style");
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
const
|
|
16
|
-
|
|
10
|
+
const renderTabsLayout_1 = require("./renderTabsLayout");
|
|
11
|
+
const TAB_QUERY_PARAM_KEY = 'tab';
|
|
12
|
+
exports.TabsLayout = (0, UniBlock_1.UniBlock)(({ className = '', tabs = [], block, tabsType, ...rest }) => {
|
|
13
|
+
const router = (0, useRouter_1.useRouter)();
|
|
14
|
+
const { isReady } = router;
|
|
17
15
|
const [activeTabIndex, setActiveTabIndex] = (0, hooks_1.useState)(getInitSelectedIndex(tabs));
|
|
16
|
+
const defaultSelectedTab = tabs.findIndex((_) => Boolean(_.selected));
|
|
17
|
+
(0, hooks_1.useEffect)(() => {
|
|
18
|
+
const defaultTabIndex = router.query[TAB_QUERY_PARAM_KEY]
|
|
19
|
+
? tabs.findIndex((_, index) => _.type === 'group' && String(index) === router.query[TAB_QUERY_PARAM_KEY])
|
|
20
|
+
: defaultSelectedTab;
|
|
21
|
+
setActiveTabIndex(defaultTabIndex === -1 ? 0 : defaultTabIndex);
|
|
22
|
+
}, [isReady, defaultSelectedTab]);
|
|
18
23
|
const slotName = getSlotName(tabs[activeTabIndex], activeTabIndex);
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
24
|
+
const updateUrlSearchTabParam = (_, index) => {
|
|
25
|
+
const searchParams = new URLSearchParams(router.query);
|
|
26
|
+
if (_.text) {
|
|
27
|
+
searchParams.set(TAB_QUERY_PARAM_KEY, String(index));
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
searchParams.delete(TAB_QUERY_PARAM_KEY);
|
|
31
|
+
}
|
|
32
|
+
router.replace(`${router.pathname}?${searchParams}`, '', { scroll: false });
|
|
33
|
+
};
|
|
34
|
+
const handleChange = (0, hooks_1.useCallback)((_) => {
|
|
35
|
+
const index = tabs.indexOf(_);
|
|
36
|
+
const tab = tabs[index];
|
|
37
|
+
setActiveTabIndex(index);
|
|
38
|
+
if (tab.type === 'group') {
|
|
39
|
+
updateUrlSearchTabParam(_, index);
|
|
40
|
+
}
|
|
41
|
+
}, [tabs]);
|
|
42
|
+
return ((0, jsx_runtime_1.jsxs)(BlockWrapper_1.BlockWrapper, { className: (0, style_1.style)(className), defaultPadding: "p-0", ...rest, children: [(0, renderTabsLayout_1.renderTabsLayout)({
|
|
43
|
+
items: tabs,
|
|
44
|
+
value: tabs[activeTabIndex],
|
|
45
|
+
tabsType,
|
|
46
|
+
onChange: handleChange,
|
|
47
|
+
}), (0, jsx_runtime_1.jsx)("div", { className: "space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs", children: (0, renderBlockList_1.renderBlocksList)(block?.slots?.[slotName], {
|
|
23
48
|
...rest?.options,
|
|
24
|
-
key: `${slotName}-${block?.type}`,
|
|
25
49
|
slotName,
|
|
26
50
|
parent: block,
|
|
27
|
-
})
|
|
51
|
+
}) })] }));
|
|
28
52
|
}, {
|
|
29
53
|
slots: ({ tabs }) => tabs?.filter((_) => !_.href).map(getSlotName) || [],
|
|
30
54
|
childrenTypes: { exclude: ['TabsLayout'] }, // TODO: fix this on wcms
|
|
31
55
|
});
|
|
32
|
-
const getSlotName = (tab, index) => tab?.
|
|
56
|
+
const getSlotName = (tab, index) => tab?.text || `Слот №${index}`;
|
|
33
57
|
const getInitSelectedIndex = (tabs) => tabs.reduce((selectedIndex, tab, i) => (tab.selected ? i : selectedIndex), 0);
|
|
34
|
-
const renderTabButton = (activeTabIndex, onClick, tabAlign = 'start') => (tab, i) => ((0, jsx_runtime_1.jsx)(TabsLayoutButton_1.TabsLayoutButton, { className: alignTabStyle_1.alignTabStyle[tabAlign], tab: tab, isActive: activeTabIndex === i, onClick: () => onClick(i) }, String(i)));
|
|
35
58
|
//# sourceMappingURL=TabsLayout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabsLayout.js","sourceRoot":"","sources":["../../../src/components/TabsLayout/TabsLayout.tsx"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"TabsLayout.js","sourceRoot":"","sources":["../../../src/components/TabsLayout/TabsLayout.tsx"],"names":[],"mappings":";;;AAAA,uDAA+E;AAC/E,yEAAuE;AACvE,qDAAkD;AAClD,4DAAyD;AAEzD,sDAAmD;AAEnD,6CAA0C;AAC1C,yDAAsD;AAGtD,MAAM,mBAAmB,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AC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,EAAE;IACxE,aAAa,EAAE,EAAE,OAAO,EAAE,CAAC,YAAY,CAAC,EAAE,EAAE,yBAAyB;CACtE,CACF,CAAC;AAEF,MAAM,WAAW,GAAG,CAAC,GAAQ,EAAE,KAAa,EAAU,EAAE,CAAC,GAAG,EAAE,IAAI,IAAI,SAAS,KAAK,EAAE,CAAC;AAEvF,MAAM,oBAAoB,GAAG,CAAC,IAAW,EAAE,EAAE,CAC3C,IAAI,CAAC,MAAM,CAAC,CAAC,aAAa,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC,CAAC"}
|
|
@@ -1,22 +1,47 @@
|
|
|
1
|
-
import { type Align } from '../../model/Align';
|
|
2
1
|
import { type AspectsProps } from '../../model/AspectsProps';
|
|
3
|
-
import { type DescriptionProps
|
|
4
|
-
import { type
|
|
2
|
+
import { type DescriptionProps } from '../../model/HeadlineType';
|
|
3
|
+
import { type LinkProps } from '../../model/LinkProps';
|
|
5
4
|
import { type IconProps } from '../../model/Picture';
|
|
5
|
+
import { type TabsType } from '../../ui-kit/TabsControl/TabsControlProps';
|
|
6
6
|
import { type UniBlockContent } from '../../UniBlock/UniBlockProps';
|
|
7
7
|
/**
|
|
8
8
|
* @title Таб
|
|
9
9
|
*/
|
|
10
|
-
export declare type
|
|
10
|
+
export declare type TabBase = DescriptionProps & IconProps & LinkProps & AspectsProps & {
|
|
11
11
|
/** @title Вкладка выбрана по-умолчанию */
|
|
12
12
|
selected?: boolean;
|
|
13
13
|
};
|
|
14
|
+
/**
|
|
15
|
+
* @title Группа
|
|
16
|
+
*/
|
|
17
|
+
export declare type GroupTab = TabBase & {
|
|
18
|
+
/** @default group */
|
|
19
|
+
type: 'group';
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* @title Ссылка
|
|
23
|
+
*/
|
|
24
|
+
export declare type LinkTab = TabBase & LinkProps & {
|
|
25
|
+
/** @default link */
|
|
26
|
+
type: 'link';
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* @title Таб
|
|
30
|
+
* @default {
|
|
31
|
+
* "type": "group"
|
|
32
|
+
* }
|
|
33
|
+
*/
|
|
34
|
+
export declare type Tab = GroupTab | LinkTab;
|
|
14
35
|
/**
|
|
15
36
|
* @title Табы
|
|
16
37
|
*/
|
|
17
38
|
export declare type TabsLayoutContent = UniBlockContent & {
|
|
18
|
-
/** @title Выравнивание табов */
|
|
19
|
-
tabAlign?: Align;
|
|
20
39
|
/** @title Список табов */
|
|
21
40
|
tabs?: Tab[];
|
|
41
|
+
/** @title Режим отображения */
|
|
42
|
+
tabsType?: TabsType;
|
|
43
|
+
/** @title Закрепить сверху */
|
|
44
|
+
isSticky?: boolean;
|
|
45
|
+
/** @title Показывать счетчик блоков во вкладках */
|
|
46
|
+
showCounter?: boolean;
|
|
22
47
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type TabItemBase } from '../../ui-kit/TabsControl/TabItem';
|
|
3
|
+
import { type TabsControlProps, type TabsType } from '../../ui-kit/TabsControl/TabsControlProps';
|
|
4
|
+
interface RenderTabsProps {
|
|
5
|
+
items: TabItemBase[];
|
|
6
|
+
value: TabItemBase;
|
|
7
|
+
onChange: TabsControlProps['onChange'];
|
|
8
|
+
tabsType?: TabsType;
|
|
9
|
+
}
|
|
10
|
+
export declare const renderTabsLayout: ({ tabsType, ...props }: RenderTabsProps) => JSX.Element | null;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.renderTabsLayout = void 0;
|
|
3
|
+
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
+
const ScrollableTabsControl_1 = require("../../ui-kit/TabsControl/ScrollableTabsControl");
|
|
5
|
+
const TabsControl_1 = require("../../ui-kit/TabsControl/TabsControl");
|
|
6
|
+
const renderTabsLayout = ({ tabsType = 'animated', ...props }) => {
|
|
7
|
+
switch (tabsType) {
|
|
8
|
+
case 'default':
|
|
9
|
+
return (0, jsx_runtime_1.jsx)(TabsControl_1.TabsControl, { ...props });
|
|
10
|
+
case 'underlined':
|
|
11
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: "flex", children: (0, jsx_runtime_1.jsx)(TabsControl_1.TabsControl, { className: "m-auto", tabsType: "underlined", ...props }) }));
|
|
12
|
+
case 'animated':
|
|
13
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: "border-b-8 border-primary-main", children: (0, jsx_runtime_1.jsx)(ScrollableTabsControl_1.ScrollableTabsControl, { className: "m-auto", ...props, tabsType: "animated" }) }));
|
|
14
|
+
default:
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
exports.renderTabsLayout = renderTabsLayout;
|
|
19
|
+
//# sourceMappingURL=renderTabsLayout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderTabsLayout.js","sourceRoot":"","sources":["../../../src/components/TabsLayout/renderTabsLayout.tsx"],"names":[],"mappings":";;;AAAA,0FAAuF;AAEvF,sEAAmE;AAU5D,MAAM,gBAAgB,GAAG,CAAC,EAAE,QAAQ,GAAG,UAAU,EAAE,GAAG,KAAK,EAAmB,EAAE,EAAE;IACvF,QAAQ,QAAQ,EAAE;QAChB,KAAK,SAAS;YACZ,OAAO,uBAAC,yBAAW,OAAK,KAAK,GAAI,CAAC;QACpC,KAAK,YAAY;YACf,OAAO,CACL,gCAAK,SAAS,EAAC,MAAM,YACnB,uBAAC,yBAAW,IAAC,SAAS,EAAC,QAAQ,EAAC,QAAQ,EAAC,YAAY,KAAK,KAAK,GAAI,GAC/D,CACP,CAAC;QACJ,KAAK,UAAU;YACb,OAAO,CACL,gCAAK,SAAS,EAAC,gCAAgC,YAC7C,uBAAC,6CAAqB,IAAC,SAAS,EAAC,QAAQ,KAAK,KAAK,EAAE,QAAQ,EAAC,UAAU,GAAG,GACvE,CACP,CAAC;QACJ;YACE,OAAO,IAAI,CAAC;KACf;AACH,CAAC,CAAC;AAnBW,QAAA,gBAAgB,oBAmB3B"}
|
|
@@ -7,11 +7,23 @@ const ArrowButton_1 = require("../LinkButton/ArrowButton");
|
|
|
7
7
|
const SwipeListContainer_1 = require("../SwipeListControl/SwipeListContainer");
|
|
8
8
|
const useSwipeListScroll_1 = require("../SwipeListControl/useSwipeListScroll");
|
|
9
9
|
const renderTab_1 = require("./renderTab");
|
|
10
|
-
const scrollButtonStyle = 'hidden sm:flex absolute z-40
|
|
11
|
-
|
|
10
|
+
const scrollButtonStyle = 'hidden sm:flex absolute z-40';
|
|
11
|
+
const scrollStyleType = {
|
|
12
|
+
animated: {
|
|
13
|
+
itemClassName: 'flex',
|
|
14
|
+
gap: 8,
|
|
15
|
+
buttonTop: 'top-5',
|
|
16
|
+
},
|
|
17
|
+
underlined: {
|
|
18
|
+
itemClassName: '',
|
|
19
|
+
gap: 0,
|
|
20
|
+
buttonTop: 'top-0',
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
exports.ScrollableTabsControl = (0, uni_jsx_1.JSX)(({ className, items = [], value, onChange, tabsType = 'default' }) => {
|
|
12
24
|
const [containerRef, scroll] = (0, useSwipeListScroll_1.useSwipeListScroll)({
|
|
13
25
|
itemCount: items?.length || 0,
|
|
14
26
|
});
|
|
15
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, style_1.style)('relative overflow-x-auto no-scrollbar', className),
|
|
27
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, style_1.style)('relative overflow-x-auto no-scrollbar', className), children: [(0, jsx_runtime_1.jsx)(SwipeListContainer_1.SwipeListContainer, { containerRef: containerRef, snapAlign: "snap-start", onVisibleIndicesChange: scroll.handleVisibleIndicesChange, itemClassName: scrollStyleType[tabsType].itemClassName, gap: scrollStyleType[tabsType].gap, children: items.map((0, renderTab_1.renderTab)(value, onChange, tabsType)) }), scroll.canScrollLeft ? ((0, jsx_runtime_1.jsx)(ArrowButton_1.ScrollLeftButton, { className: (0, style_1.style)('left-6', scrollButtonStyle, scrollStyleType[tabsType].buttonTop), onClick: scroll.scrollLeft })) : null, scroll.canScrollRight ? ((0, jsx_runtime_1.jsx)(ArrowButton_1.ScrollRightButton, { className: (0, style_1.style)('right-6', scrollButtonStyle, scrollStyleType[tabsType].buttonTop), onClick: scroll.scrollRight })) : null] }));
|
|
16
28
|
});
|
|
17
29
|
//# sourceMappingURL=ScrollableTabsControl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScrollableTabsControl.js","sourceRoot":"","sources":["../../../src/ui-kit/TabsControl/ScrollableTabsControl.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,6CAA0C;AAC1C,2DAAgF;AAChF,+EAA4E;AAC5E,+EAA4E;AAC5E,2CAAwC;AAGxC,MAAM,iBAAiB,GAAG,
|
|
1
|
+
{"version":3,"file":"ScrollableTabsControl.js","sourceRoot":"","sources":["../../../src/ui-kit/TabsControl/ScrollableTabsControl.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,6CAA0C;AAC1C,2DAAgF;AAChF,+EAA4E;AAC5E,+EAA4E;AAC5E,2CAAwC;AAGxC,MAAM,iBAAiB,GAAG,8BAA8B,CAAC;AAEzD,MAAM,eAAe,GAAG;IACtB,QAAQ,EAAE;QACR,aAAa,EAAE,MAAM;QACrB,GAAG,EAAE,CAAC;QACN,SAAS,EAAE,OAAO;KACnB;IACD,UAAU,EAAE;QACV,aAAa,EAAE,EAAE;QACjB,GAAG,EAAE,CAAC;QACN,SAA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CAAC,CACF,CAAC"}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
+
import { type DescriptionProps, type TitleProps } from '../../model/HeadlineType';
|
|
1
2
|
import { type LinkProps } from '../../model/LinkProps';
|
|
3
|
+
import { type IconProps } from '../../model/Picture';
|
|
2
4
|
import { type VNode } from '../../model/VNode';
|
|
3
|
-
import { type TabsControlProps } from './TabsControlProps';
|
|
4
|
-
export interface TabItemBase extends LinkProps {
|
|
5
|
+
import { type TabsControlProps, type TabsType } from './TabsControlProps';
|
|
6
|
+
export interface TabItemBase extends LinkProps, TitleProps, DescriptionProps, IconProps {
|
|
5
7
|
name?: string;
|
|
6
8
|
appendRight?: VNode;
|
|
7
9
|
}
|
|
8
|
-
export declare type TabType = 'default' | 'underlined' | 'rounded';
|
|
9
10
|
export interface TabItemProps {
|
|
10
11
|
item?: TabItemBase;
|
|
11
12
|
isActive?: boolean;
|
|
12
|
-
type?:
|
|
13
|
+
type?: TabsType;
|
|
13
14
|
onClick?: TabsControlProps['onChange'];
|
|
14
15
|
}
|
|
15
16
|
export declare const TabItem: import("@redneckz/uni-jsx").UNIComponent<TabItemProps, any, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabItem.js","sourceRoot":"","sources":["../../../src/ui-kit/TabsControl/TabItem.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAA0D;AAC1D,iDAA8C;
|
|
1
|
+
{"version":3,"file":"TabItem.js","sourceRoot":"","sources":["../../../src/ui-kit/TabsControl/TabItem.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAA0D;AAC1D,iDAA8C;AAK9C,iDAA8C;AAcjC,QAAA,OAAO,GAAG,IAAA,aAAG,EAAe,CAAC,KAAK,EAAE,EAAE,CACjD,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,uBAAC,WAAW,OAAK,KAAK,GAAI,CAAC,CAAC,CAAC,uBAAC,aAAa,OAAK,KAAK,GAAI,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5
5
|
const style_1 = require("../../utils/style");
|
|
6
|
-
const
|
|
6
|
+
const renderTabItemInner_1 = require("./renderTabItemInner");
|
|
7
7
|
const tabPaddingStyleMap = {
|
|
8
8
|
default: 'px-xs',
|
|
9
9
|
underlined: 'px-m',
|
|
10
|
-
|
|
10
|
+
animated: 'px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs',
|
|
11
11
|
};
|
|
12
12
|
const tabTextStyle = 'text-secondary-text hover:text-primary-main';
|
|
13
13
|
const activeTabTextStyleMap = {
|
|
14
14
|
default: 'text-black sm:text-white',
|
|
15
15
|
underlined: 'text-primary-main border-b-2',
|
|
16
|
-
|
|
16
|
+
animated: 'text-white sm:text-white',
|
|
17
17
|
};
|
|
18
18
|
const tabBgStyleMap = {
|
|
19
19
|
default: 'bg-white',
|
|
20
20
|
underlined: 'bg-white',
|
|
21
|
-
|
|
21
|
+
animated: 'p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96',
|
|
22
22
|
};
|
|
23
23
|
const activeTabBgStyleMap = {
|
|
24
24
|
default: 'sm:bg-primary-main',
|
|
25
25
|
underlined: 'bg-white',
|
|
26
|
-
|
|
26
|
+
animated: 'p-2 border-none bg-primary-main text-white h-20 w-96',
|
|
27
27
|
};
|
|
28
|
-
exports.TabItemInner = (0, uni_jsx_1.JSX)(({ tag = 'div', item = {}, isActive, type = 'default', onClick }) => {
|
|
28
|
+
exports.TabItemInner = (0, uni_jsx_1.JSX)(({ tag = 'div', item = {}, isActive = false, type = 'default', onClick }) => {
|
|
29
29
|
const Tag = tag;
|
|
30
|
-
const { text, appendRight, ...link } = item;
|
|
31
|
-
return ((0, jsx_runtime_1.jsx)(Tag, { className: (0, style_1.style)('h-12', 'block flex-1', 'cursor-pointer', tabPaddingStyleMap[type], isActive ? activeTabBgStyleMap[type] : tabBgStyleMap[type]), role: "
|
|
30
|
+
const { text, description, icon, appendRight, ...link } = item;
|
|
31
|
+
return ((0, jsx_runtime_1.jsx)(Tag, { className: (0, style_1.style)('h-12', 'block flex-1', 'cursor-pointer', tabPaddingStyleMap[type], isActive ? activeTabBgStyleMap[type] : tabBgStyleMap[type]), role: "tablist", onClick: onClick, ...link, children: (0, jsx_runtime_1.jsxs)("div", { className: (0, style_1.style)('h-full', 'flex justify-center items-center', 'text-center whitespace-nowrap', isActive ? activeTabTextStyleMap[type] : tabTextStyle), children: [(0, renderTabItemInner_1.renderTabItemInner)({
|
|
32
|
+
text,
|
|
33
|
+
description,
|
|
34
|
+
icon,
|
|
35
|
+
isActive,
|
|
36
|
+
type,
|
|
37
|
+
}), appendRight ? (0, jsx_runtime_1.jsx)("div", { className: "ml-xs", children: appendRight }) : null] }) }));
|
|
32
38
|
});
|
|
33
39
|
//# sourceMappingURL=TabItemInner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabItemInner.js","sourceRoot":"","sources":["../../../src/ui-kit/TabsControl/TabItemInner.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,6CAA0C;AAC1C,
|
|
1
|
+
{"version":3,"file":"TabItemInner.js","sourceRoot":"","sources":["../../../src/ui-kit/TabsControl/TabItemInner.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,6CAA0C;AAC1C,6DAA0D;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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
|
|
6
6
|
const renderTab_1 = require("./renderTab");
|
|
7
|
-
exports.TabsControl = (0, uni_jsx_1.JSX)(({ className, tabsType = 'default', items = [], value, onChange }) => ((0, jsx_runtime_1.jsx)("div", { className: (0, style_1.style)('flex gap-x-2xs overflow-x-auto no-scrollbar', className), role: "
|
|
7
|
+
exports.TabsControl = (0, uni_jsx_1.JSX)(({ className, tabsType = 'default', items = [], value, onChange }) => ((0, jsx_runtime_1.jsx)("div", { className: (0, style_1.style)('flex gap-x-2xs overflow-x-auto no-scrollbar', className), role: "tabpanel", children: items.map((0, renderTab_1.renderTab)(value, onChange, tabsType)) })));
|
|
8
8
|
//# sourceMappingURL=TabsControl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabsControl.js","sourceRoot":"","sources":["../../../src/ui-kit/TabsControl/TabsControl.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,6CAA0C;AAC1C,2CAAwC;AAG3B,QAAA,WAAW,GAAG,IAAA,aAAG,EAC5B,CAAC,EAAE,SAAS,EAAE,QAAQ,GAAG,SAAS,EAAE,KAAK,GAAG,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CACpE,
|
|
1
|
+
{"version":3,"file":"TabsControl.js","sourceRoot":"","sources":["../../../src/ui-kit/TabsControl/TabsControl.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,6CAA0C;AAC1C,2CAAwC;AAG3B,QAAA,WAAW,GAAG,IAAA,aAAG,EAC5B,CAAC,EAAE,SAAS,EAAE,QAAQ,GAAG,SAAS,EAAE,KAAK,GAAG,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CACpE,gCACE,SAAS,EAAE,IAAA,aAAK,EAAC,6CAA6C,EAAE,SAAS,CAAC,EAC1E,IAAI,EAAC,UAAU,YAEd,KAAK,CAAC,GAAG,CAAC,IAAA,qBAAS,EAAC,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
|
|
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?:
|
|
14
|
+
tabsType?: TabsType;
|
|
6
15
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { type TabItemBase
|
|
3
|
-
import { type TabsControlProps } from './TabsControlProps';
|
|
4
|
-
export declare const renderTab: (activeTab?: TabItemBase, onClick?: TabsControlProps['onChange'], type?:
|
|
2
|
+
import { type TabItemBase } from './TabItem';
|
|
3
|
+
import { type TabsControlProps, type TabsType } from './TabsControlProps';
|
|
4
|
+
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,
|
|
1
|
+
{"version":3,"file":"renderTab.js","sourceRoot":"","sources":["../../../src/ui-kit/TabsControl/renderTab.tsx"],"names":[],"mappings":";;;AAAA,uCAAsD;AAG/C,MAAM,SAAS,GACpB,CAAC,SAAuB,EAAE,OAAsC,EAAE,IAAe,EAAE,EAAE,CACrF,CAAC,GAAgB,EAAE,CAAS,EAAE,EAAE,CAC9B,CACE,uBAAC,iBAAO,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;AAXO,QAAA,SAAS,aAWhB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type Picture } from '../../model/Picture';
|
|
3
|
+
interface TabsLayoutButtonProps {
|
|
4
|
+
isActive: boolean;
|
|
5
|
+
description?: string;
|
|
6
|
+
icon?: Picture;
|
|
7
|
+
type: string;
|
|
8
|
+
text?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const renderTabItemInner: ({ text, description, icon, isActive, type, }: TabsLayoutButtonProps) => JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.renderTabItemInner = void 0;
|
|
3
|
+
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
+
const style_1 = require("../../utils/style");
|
|
5
|
+
const Img_1 = require("../Img/Img");
|
|
6
|
+
const getButtonClassNames = (isActive) => ({
|
|
7
|
+
btn: `w-96 ${isActive ? 'p-m border-none bg-primary-main text-white' : 'p-s ease-in duration-300 bg-white'}`,
|
|
8
|
+
text: isActive ? 'mb-xs text-xl' : 'mb-2xs text-l text-primary-text',
|
|
9
|
+
desc: `font-light ${isActive ? 'text-l text-white' : 'text-m text-secondary-text'}`,
|
|
10
|
+
icon: isActive ? '' : 'text-primary-main',
|
|
11
|
+
iconVersion: (isActive ? 'white' : 'normal'),
|
|
12
|
+
oldText: 'text-m text-center',
|
|
13
|
+
oldDesc: 'text-m-light',
|
|
14
|
+
});
|
|
15
|
+
const renderTabItemInner = ({ text, description, icon, isActive, type, }) => {
|
|
16
|
+
const buttonClassNames = getButtonClassNames(isActive);
|
|
17
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, style_1.style)('cursor-pointer text-left border-b-0 flex gap-2xs'), "aria-label": text, role: "tab", children: [icon ? ((0, jsx_runtime_1.jsx)(Img_1.Img, { className: (0, style_1.style)('h-6 w-6 min-w-6 min-h-6', buttonClassNames.icon), image: {
|
|
18
|
+
...icon,
|
|
19
|
+
iconVersion: icon?.iconVersion ?? buttonClassNames.iconVersion,
|
|
20
|
+
}, width: "24", height: "24", alt: text })) : null, (0, jsx_runtime_1.jsxs)("div", { className: "border-0", children: [(0, jsx_runtime_1.jsx)("div", { className: type === 'animated' ? buttonClassNames.text : buttonClassNames.oldText, children: text }), (0, jsx_runtime_1.jsx)("div", { className: type === 'animated' ? buttonClassNames.desc : buttonClassNames.oldDesc, children: description })] })] }));
|
|
21
|
+
};
|
|
22
|
+
exports.renderTabItemInner = renderTabItemInner;
|
|
23
|
+
//# sourceMappingURL=renderTabItemInner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"renderTabItemInner.js","sourceRoot":"","sources":["../../../src/ui-kit/TabsControl/renderTabItemInner.tsx"],"names":[],"mappings":";;;AAEA,6CAA0C;AAC1C,oCAAiC;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;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