@redneckz/wildless-cms-uni-blocks 0.7.5 → 0.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +103 -19
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Tabs/LinkTab.d.ts +1 -0
- package/bundle/components/Tabs/ScrollableTabs.d.ts +8 -0
- package/bundle/components/Tabs/TabsContent.d.ts +12 -0
- package/bundle/components/Tabs/renderGroupTab.d.ts +2 -2
- package/bundle/components/Tabs/renderTab.d.ts +2 -1
- package/bundle/components/Tabs/tabItemClasses.d.ts +6 -1
- package/dist/components/Tabs/LinkTab.d.ts +1 -0
- package/dist/components/Tabs/LinkTab.js +2 -2
- package/dist/components/Tabs/LinkTab.js.map +1 -1
- package/dist/components/Tabs/ScrollableTabs.d.ts +8 -0
- package/dist/components/Tabs/ScrollableTabs.js +24 -0
- package/dist/components/Tabs/ScrollableTabs.js.map +1 -0
- package/dist/components/Tabs/Tabs.js +9 -2
- package/dist/components/Tabs/Tabs.js.map +1 -1
- package/dist/components/Tabs/TabsContent.d.ts +12 -0
- package/dist/components/Tabs/renderGroupTab.d.ts +2 -2
- package/dist/components/Tabs/renderGroupTab.js +12 -4
- package/dist/components/Tabs/renderGroupTab.js.map +1 -1
- package/dist/components/Tabs/renderTab.d.ts +2 -1
- package/dist/components/Tabs/renderTab.js +4 -6
- package/dist/components/Tabs/renderTab.js.map +1 -1
- package/dist/components/Tabs/tabItemClasses.d.ts +6 -1
- package/dist/components/Tabs/tabItemClasses.js +61 -2
- package/dist/components/Tabs/tabItemClasses.js.map +1 -1
- package/dist/setup-fixture.js +0 -1
- package/dist/setup-fixture.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Tabs/LinkTab.d.ts +1 -0
- package/lib/components/Tabs/LinkTab.js +3 -3
- package/lib/components/Tabs/LinkTab.js.map +1 -1
- package/lib/components/Tabs/ScrollableTabs.d.ts +8 -0
- package/lib/components/Tabs/ScrollableTabs.js +22 -0
- package/lib/components/Tabs/ScrollableTabs.js.map +1 -0
- package/lib/components/Tabs/Tabs.fixture.d.ts +1 -0
- package/lib/components/Tabs/Tabs.js +9 -2
- package/lib/components/Tabs/Tabs.js.map +1 -1
- package/lib/components/Tabs/TabsContent.d.ts +12 -0
- package/lib/components/Tabs/renderGroupTab.d.ts +2 -2
- package/lib/components/Tabs/renderGroupTab.js +13 -5
- package/lib/components/Tabs/renderGroupTab.js.map +1 -1
- package/lib/components/Tabs/renderTab.d.ts +2 -1
- package/lib/components/Tabs/renderTab.js +4 -6
- package/lib/components/Tabs/renderTab.js.map +1 -1
- package/lib/components/Tabs/tabItemClasses.d.ts +6 -1
- package/lib/components/Tabs/tabItemClasses.js +58 -1
- package/lib/components/Tabs/tabItemClasses.js.map +1 -1
- package/lib/setup-fixture.js +0 -1
- package/lib/setup-fixture.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +1 -1
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Tabs/LinkTab.d.ts +1 -0
- package/mobile/bundle/components/Tabs/ScrollableTabs.d.ts +8 -0
- package/mobile/bundle/components/Tabs/TabsContent.d.ts +12 -0
- package/mobile/bundle/components/Tabs/renderGroupTab.d.ts +2 -2
- package/mobile/bundle/components/Tabs/renderTab.d.ts +2 -1
- package/mobile/bundle/components/Tabs/tabItemClasses.d.ts +6 -1
- package/mobile/dist/components/Tabs/LinkTab.d.ts +1 -0
- package/mobile/dist/components/Tabs/LinkTab.js +2 -2
- package/mobile/dist/components/Tabs/LinkTab.js.map +1 -1
- package/mobile/dist/components/Tabs/ScrollableTabs.d.ts +8 -0
- package/mobile/dist/components/Tabs/ScrollableTabs.js +24 -0
- package/mobile/dist/components/Tabs/ScrollableTabs.js.map +1 -0
- package/mobile/dist/components/Tabs/Tabs.js +9 -2
- package/mobile/dist/components/Tabs/Tabs.js.map +1 -1
- package/mobile/dist/components/Tabs/TabsContent.d.ts +12 -0
- package/mobile/dist/components/Tabs/renderGroupTab.d.ts +2 -2
- package/mobile/dist/components/Tabs/renderGroupTab.js +12 -4
- package/mobile/dist/components/Tabs/renderGroupTab.js.map +1 -1
- package/mobile/dist/components/Tabs/renderTab.d.ts +2 -1
- package/mobile/dist/components/Tabs/renderTab.js +4 -6
- package/mobile/dist/components/Tabs/renderTab.js.map +1 -1
- package/mobile/dist/components/Tabs/tabItemClasses.d.ts +6 -1
- package/mobile/dist/components/Tabs/tabItemClasses.js +61 -2
- package/mobile/dist/components/Tabs/tabItemClasses.js.map +1 -1
- package/mobile/dist/setup-fixture.js +0 -1
- package/mobile/dist/setup-fixture.js.map +1 -1
- package/mobile/lib/components/Tabs/LinkTab.d.ts +1 -0
- package/mobile/lib/components/Tabs/LinkTab.js +3 -3
- package/mobile/lib/components/Tabs/LinkTab.js.map +1 -1
- package/mobile/lib/components/Tabs/ScrollableTabs.d.ts +8 -0
- package/mobile/lib/components/Tabs/ScrollableTabs.js +22 -0
- package/mobile/lib/components/Tabs/ScrollableTabs.js.map +1 -0
- package/mobile/lib/components/Tabs/Tabs.js +9 -2
- package/mobile/lib/components/Tabs/Tabs.js.map +1 -1
- package/mobile/lib/components/Tabs/TabsContent.d.ts +12 -0
- package/mobile/lib/components/Tabs/renderGroupTab.d.ts +2 -2
- package/mobile/lib/components/Tabs/renderGroupTab.js +13 -5
- package/mobile/lib/components/Tabs/renderGroupTab.js.map +1 -1
- package/mobile/lib/components/Tabs/renderTab.d.ts +2 -1
- package/mobile/lib/components/Tabs/renderTab.js +4 -6
- package/mobile/lib/components/Tabs/renderTab.js.map +1 -1
- package/mobile/lib/components/Tabs/tabItemClasses.d.ts +6 -1
- package/mobile/lib/components/Tabs/tabItemClasses.js +58 -1
- package/mobile/lib/components/Tabs/tabItemClasses.js.map +1 -1
- package/mobile/lib/setup-fixture.js +0 -1
- package/mobile/lib/setup-fixture.js.map +1 -1
- package/mobile/src/components/Tabs/LinkTab.tsx +5 -13
- package/mobile/src/components/Tabs/ScrollableTabs.tsx +55 -0
- package/mobile/src/components/Tabs/Tabs.tsx +26 -4
- package/mobile/src/components/Tabs/TabsContent.ts +13 -0
- package/mobile/src/components/Tabs/renderGroupTab.tsx +30 -20
- package/mobile/src/components/Tabs/renderTab.tsx +8 -5
- package/mobile/src/components/Tabs/tabItemClasses.ts +65 -1
- package/mobile/src/setup-fixture.ts +0 -1
- package/package.json +1 -1
- package/src/components/Tabs/LinkTab.tsx +5 -13
- package/src/components/Tabs/ScrollableTabs.tsx +55 -0
- package/src/components/Tabs/Tabs.fixture.tsx +22 -0
- package/src/components/Tabs/Tabs.tsx +26 -4
- package/src/components/Tabs/TabsContent.ts +13 -0
- package/src/components/Tabs/renderGroupTab.tsx +30 -20
- package/src/components/Tabs/renderTab.tsx +8 -5
- package/src/components/Tabs/tabItemClasses.ts +65 -1
- package/src/setup-fixture.ts +0 -1
|
@@ -2,6 +2,70 @@ export const LINK_CLASSES = 'h-12 flex-1 flex items-center justify-center cursor
|
|
|
2
2
|
export const ACTIVE_LINK_CLASSES = 'bg-primary-main';
|
|
3
3
|
export const INACTIVE_LINK_CLASSES = 'group/btn bg-white';
|
|
4
4
|
|
|
5
|
-
export const
|
|
5
|
+
export const SCROLLABLE_ACTIVE_LINK_CLASSES = 'bg-white text-primary-main';
|
|
6
|
+
export const WIDESCREEN_ACTIVE_LINK_CLASSES = 'bg-primary-main text-white';
|
|
7
|
+
|
|
8
|
+
export const TEXT_CLASSES = 'font-sans text-m text-center';
|
|
6
9
|
export const ACTIVE_TEXT_CLASSES = 'text-white';
|
|
7
10
|
export const INACTIVE_TEXT_CLASSES = 'text-secondary-text group-hover/btn:text-primary-main';
|
|
11
|
+
|
|
12
|
+
export const WHITE_ACTIVE_TEXT_CLASSES = 'text-primary-main';
|
|
13
|
+
|
|
14
|
+
const GROUP_TAB_CLASSES = {
|
|
15
|
+
div: {
|
|
16
|
+
scrollable: {
|
|
17
|
+
active: `inline-flex px-4 grow whitespace-nowrap ${LINK_CLASSES} ${SCROLLABLE_ACTIVE_LINK_CLASSES}`,
|
|
18
|
+
default: `inline-flex px-4 grow whitespace-nowrap ${LINK_CLASSES} ${INACTIVE_LINK_CLASSES}`,
|
|
19
|
+
},
|
|
20
|
+
default: {
|
|
21
|
+
active: `${LINK_CLASSES} ${WIDESCREEN_ACTIVE_LINK_CLASSES} whitespace-nowrap`,
|
|
22
|
+
default: `${LINK_CLASSES} ${INACTIVE_LINK_CLASSES} whitespace-nowrap`,
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
text: {
|
|
26
|
+
scrollable: {
|
|
27
|
+
active: `h-full border-0 border-b-2`,
|
|
28
|
+
default: ``,
|
|
29
|
+
},
|
|
30
|
+
default: {
|
|
31
|
+
active: '',
|
|
32
|
+
default: '',
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
const LINK_TAB_CLASSES = {
|
|
37
|
+
link: {
|
|
38
|
+
scrollable: {
|
|
39
|
+
active: `inline-flex px-4 grow whitespace-nowrap ${LINK_CLASSES} ${SCROLLABLE_ACTIVE_LINK_CLASSES}`,
|
|
40
|
+
default: `inline-flex px-4 grow whitespace-nowrap ${LINK_CLASSES} ${INACTIVE_LINK_CLASSES}`,
|
|
41
|
+
},
|
|
42
|
+
default: {
|
|
43
|
+
active: `${LINK_CLASSES} ${WIDESCREEN_ACTIVE_LINK_CLASSES}`,
|
|
44
|
+
default: `${LINK_CLASSES} ${INACTIVE_LINK_CLASSES}`,
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
text: {
|
|
48
|
+
scrollable: {
|
|
49
|
+
active: `${TEXT_CLASSES} flex items-center h-full border-0 border-b-2 ${WHITE_ACTIVE_TEXT_CLASSES}`,
|
|
50
|
+
default: `${TEXT_CLASSES} ${INACTIVE_TEXT_CLASSES}`,
|
|
51
|
+
},
|
|
52
|
+
default: {
|
|
53
|
+
active: `${TEXT_CLASSES} ${ACTIVE_TEXT_CLASSES}`,
|
|
54
|
+
default: `${TEXT_CLASSES} ${INACTIVE_TEXT_CLASSES}`,
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export const getGroupTabClassName = (type: string, active: boolean, isScrollable: boolean) => {
|
|
60
|
+
const styleType = isScrollable ? 'scrollable' : 'default';
|
|
61
|
+
const styleActive = active ? 'active' : 'default';
|
|
62
|
+
|
|
63
|
+
return GROUP_TAB_CLASSES[type][styleType][styleActive];
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export const getLinkTabClassName = (type: string, active: boolean, isScrollable: boolean) => {
|
|
67
|
+
const styleType = isScrollable ? 'scrollable' : 'default';
|
|
68
|
+
const styleActive = active ? 'active' : 'default';
|
|
69
|
+
|
|
70
|
+
return LINK_TAB_CLASSES[type][styleType][styleActive];
|
|
71
|
+
};
|