@redneckz/wildless-cms-uni-blocks 0.14.7 → 0.14.9
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/bundle.umd.js +6 -6
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Footer/LinkList.d.ts +8 -0
- package/dist/components/Footer/Footer.mobile.js +3 -2
- package/dist/components/Footer/Footer.mobile.js.map +1 -1
- package/dist/components/Footer/LinkList.d.ts +8 -0
- package/dist/components/Footer/LinkList.js +16 -0
- package/dist/components/Footer/LinkList.js.map +1 -0
- package/dist/components/Header/HeaderSubMenu.js +2 -2
- package/dist/components/Header/HeaderSubMenu.js.map +1 -1
- package/dist/components/StickyBottomMenu/StickyBottomMenu.mobile.js +1 -1
- package/dist/components/StickyBottomMenu/StickyBottomMenu.mobile.js.map +1 -1
- package/dist/ui-kit/BenefitItem/BenefitItem.js +1 -1
- package/dist/ui-kit/BenefitItem/BenefitItem.js.map +1 -1
- package/dist/ui-kit/Sitemap/Sitemap.js +2 -2
- package/dist/ui-kit/Sitemap/Sitemap.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Footer/Footer.mobile.js +3 -2
- package/lib/components/Footer/Footer.mobile.js.map +1 -1
- package/lib/components/Footer/LinkList.d.ts +8 -0
- package/lib/components/Footer/LinkList.js +14 -0
- package/lib/components/Footer/LinkList.js.map +1 -0
- package/lib/components/Header/HeaderSubMenu.js +2 -2
- package/lib/components/Header/HeaderSubMenu.js.map +1 -1
- package/lib/components/StickyBottomMenu/StickyBottomMenu.mobile.js +1 -1
- package/lib/components/StickyBottomMenu/StickyBottomMenu.mobile.js.map +1 -1
- package/lib/ui-kit/BenefitItem/BenefitItem.js +1 -1
- package/lib/ui-kit/BenefitItem/BenefitItem.js.map +1 -1
- package/lib/ui-kit/Sitemap/Sitemap.js +2 -2
- package/lib/ui-kit/Sitemap/Sitemap.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +15 -14
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Footer/LinkList.d.ts +8 -0
- package/mobile/dist/components/Footer/Footer.js +3 -2
- package/mobile/dist/components/Footer/Footer.js.map +1 -1
- package/mobile/dist/components/Footer/LinkList.d.ts +8 -0
- package/mobile/dist/components/Footer/LinkList.js +16 -0
- package/mobile/dist/components/Footer/LinkList.js.map +1 -0
- package/mobile/dist/components/Header/HeaderSubMenu.js +2 -2
- package/mobile/dist/components/Header/HeaderSubMenu.js.map +1 -1
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.js +1 -1
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.js.map +1 -1
- package/mobile/dist/ui-kit/BenefitItem/BenefitItem.js +1 -1
- package/mobile/dist/ui-kit/BenefitItem/BenefitItem.js.map +1 -1
- package/mobile/dist/ui-kit/Sitemap/Sitemap.js +2 -2
- package/mobile/dist/ui-kit/Sitemap/Sitemap.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/Footer/Footer.js +3 -2
- package/mobile/lib/components/Footer/Footer.js.map +1 -1
- package/mobile/lib/components/Footer/LinkList.d.ts +8 -0
- package/mobile/lib/components/Footer/LinkList.js +14 -0
- package/mobile/lib/components/Footer/LinkList.js.map +1 -0
- package/mobile/lib/components/Header/HeaderSubMenu.js +2 -2
- package/mobile/lib/components/Header/HeaderSubMenu.js.map +1 -1
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.js +1 -1
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.js.map +1 -1
- package/mobile/lib/ui-kit/BenefitItem/BenefitItem.js +1 -1
- package/mobile/lib/ui-kit/BenefitItem/BenefitItem.js.map +1 -1
- package/mobile/lib/ui-kit/Sitemap/Sitemap.js +2 -2
- package/mobile/lib/ui-kit/Sitemap/Sitemap.js.map +1 -1
- package/mobile/src/components/Footer/Footer.tsx +3 -2
- package/mobile/src/components/Footer/LinkList.tsx +41 -0
- package/mobile/src/components/Header/HeaderSubMenu.tsx +2 -2
- package/mobile/src/components/StickyBottomMenu/StickyBottomMenu.tsx +1 -1
- package/mobile/src/ui-kit/BenefitItem/BenefitItem.tsx +1 -1
- package/mobile/src/ui-kit/Sitemap/Sitemap.tsx +2 -2
- package/package.json +1 -1
- package/src/components/Footer/Footer.mobile.tsx +3 -2
- package/src/components/Footer/LinkList.tsx +41 -0
- package/src/components/Header/HeaderSubMenu.tsx +2 -2
- package/src/components/StickyBottomMenu/StickyBottomMenu.mobile.tsx +1 -1
- package/src/ui-kit/BenefitItem/BenefitItem.tsx +1 -1
- package/src/ui-kit/Sitemap/Sitemap.tsx +2 -2
- package/bundle/ui-kit/LinkList/LinkList.d.ts +0 -2
- package/bundle/ui-kit/LinkList/LinkListProps.d.ts +0 -5
- package/bundle/ui-kit/LinkList/linkListStyles.d.ts +0 -1
- package/bundle/ui-kit/LinkList/linkListStyles.mobile.d.ts +0 -1
- package/dist/ui-kit/LinkList/LinkList.d.ts +0 -2
- package/dist/ui-kit/LinkList/LinkList.js +0 -12
- package/dist/ui-kit/LinkList/LinkList.js.map +0 -1
- package/dist/ui-kit/LinkList/LinkListProps.d.ts +0 -5
- package/dist/ui-kit/LinkList/LinkListProps.js +0 -2
- package/dist/ui-kit/LinkList/LinkListProps.js.map +0 -1
- package/dist/ui-kit/LinkList/linkListStyles.d.ts +0 -1
- package/dist/ui-kit/LinkList/linkListStyles.js +0 -4
- package/dist/ui-kit/LinkList/linkListStyles.js.map +0 -1
- package/dist/ui-kit/LinkList/linkListStyles.mobile.d.ts +0 -1
- package/dist/ui-kit/LinkList/linkListStyles.mobile.js +0 -4
- package/dist/ui-kit/LinkList/linkListStyles.mobile.js.map +0 -1
- package/lib/ui-kit/LinkList/LinkList.d.ts +0 -2
- package/lib/ui-kit/LinkList/LinkList.fixture.d.ts +0 -8
- package/lib/ui-kit/LinkList/LinkList.js +0 -10
- package/lib/ui-kit/LinkList/LinkList.js.map +0 -1
- package/lib/ui-kit/LinkList/LinkListProps.d.ts +0 -5
- package/lib/ui-kit/LinkList/LinkListProps.js +0 -2
- package/lib/ui-kit/LinkList/LinkListProps.js.map +0 -1
- package/lib/ui-kit/LinkList/linkListStyles.d.ts +0 -1
- package/lib/ui-kit/LinkList/linkListStyles.js +0 -2
- package/lib/ui-kit/LinkList/linkListStyles.js.map +0 -1
- package/lib/ui-kit/LinkList/linkListStyles.mobile.d.ts +0 -1
- package/lib/ui-kit/LinkList/linkListStyles.mobile.js +0 -2
- package/lib/ui-kit/LinkList/linkListStyles.mobile.js.map +0 -1
- package/mobile/bundle/ui-kit/LinkList/LinkList.d.ts +0 -2
- package/mobile/bundle/ui-kit/LinkList/LinkListProps.d.ts +0 -5
- package/mobile/bundle/ui-kit/LinkList/linkListStyles.d.ts +0 -1
- package/mobile/dist/ui-kit/LinkList/LinkList.d.ts +0 -2
- package/mobile/dist/ui-kit/LinkList/LinkList.js +0 -12
- package/mobile/dist/ui-kit/LinkList/LinkList.js.map +0 -1
- package/mobile/dist/ui-kit/LinkList/LinkListProps.d.ts +0 -5
- package/mobile/dist/ui-kit/LinkList/LinkListProps.js +0 -2
- package/mobile/dist/ui-kit/LinkList/LinkListProps.js.map +0 -1
- package/mobile/dist/ui-kit/LinkList/linkListStyles.d.ts +0 -1
- package/mobile/dist/ui-kit/LinkList/linkListStyles.js +0 -4
- package/mobile/dist/ui-kit/LinkList/linkListStyles.js.map +0 -1
- package/mobile/lib/ui-kit/LinkList/LinkList.d.ts +0 -2
- package/mobile/lib/ui-kit/LinkList/LinkList.js +0 -10
- package/mobile/lib/ui-kit/LinkList/LinkList.js.map +0 -1
- package/mobile/lib/ui-kit/LinkList/LinkListProps.d.ts +0 -5
- package/mobile/lib/ui-kit/LinkList/LinkListProps.js +0 -2
- package/mobile/lib/ui-kit/LinkList/LinkListProps.js.map +0 -1
- package/mobile/lib/ui-kit/LinkList/linkListStyles.d.ts +0 -1
- package/mobile/lib/ui-kit/LinkList/linkListStyles.js +0 -2
- package/mobile/lib/ui-kit/LinkList/linkListStyles.js.map +0 -1
- package/mobile/src/ui-kit/LinkList/LinkList.tsx +0 -25
- package/mobile/src/ui-kit/LinkList/LinkListProps.tsx +0 -6
- package/mobile/src/ui-kit/LinkList/linkListStyles.ts +0 -1
- package/src/ui-kit/LinkList/LinkList.fixture.tsx +0 -32
- package/src/ui-kit/LinkList/LinkList.tsx +0 -25
- package/src/ui-kit/LinkList/LinkListProps.tsx +0 -6
- package/src/ui-kit/LinkList/linkListStyles.mobile.ts +0 -1
- package/src/ui-kit/LinkList/linkListStyles.ts +0 -1
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { projectSettings } from '../../ProjectSettings';
|
|
3
|
+
import { useLink } from '../../hooks/useLink';
|
|
4
|
+
import type { LinkProps } from '../../model/LinkProps';
|
|
5
|
+
import { style } from '../../utils/style';
|
|
6
|
+
|
|
7
|
+
interface LinkListProps {
|
|
8
|
+
items?: LinkProps[];
|
|
9
|
+
basePath?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const LinkList = JSX<LinkListProps>(({ className = '', items, basePath }) =>
|
|
14
|
+
items?.length ? (
|
|
15
|
+
<ul className={style('flex flex-col', className)}>{items.map(renderLinkListItem(basePath))}</ul>
|
|
16
|
+
) : null,
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
const renderLinkListItem = (basePath?: string) => (item: LinkProps, i: number) => {
|
|
20
|
+
const { text, ...linkProps } = item;
|
|
21
|
+
|
|
22
|
+
const isAnotherPortal =
|
|
23
|
+
projectSettings.BASE_PATH && basePath ? !projectSettings.BASE_PATH.startsWith(basePath) : false;
|
|
24
|
+
|
|
25
|
+
const link = useLink({ isRemote: isAnotherPortal, basePath });
|
|
26
|
+
const { href, target, onClick } = link(linkProps);
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<li key={`list_item_${String(i)}`} className="list-none my-xs">
|
|
30
|
+
<a
|
|
31
|
+
className="hover:text-primary-main font-light"
|
|
32
|
+
role="link"
|
|
33
|
+
href={href}
|
|
34
|
+
target={target || '_self'}
|
|
35
|
+
onClick={onClick}
|
|
36
|
+
>
|
|
37
|
+
{text ? text : null}
|
|
38
|
+
</a>
|
|
39
|
+
</li>
|
|
40
|
+
);
|
|
41
|
+
};
|
|
@@ -22,7 +22,7 @@ export interface HeaderSubMenuProps {
|
|
|
22
22
|
internetBankUrl?: string;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
const
|
|
25
|
+
const HEADER_AREA_KEYS = ['all', 'header'];
|
|
26
26
|
|
|
27
27
|
export const HeaderSubMenu = JSX<HeaderSubMenuProps>(
|
|
28
28
|
({ subItems = [], version, internetBankUrl }) => {
|
|
@@ -33,7 +33,7 @@ export const HeaderSubMenu = JSX<HeaderSubMenuProps>(
|
|
|
33
33
|
const visibleSubItems = useMemo(
|
|
34
34
|
() =>
|
|
35
35
|
subItems.filter(
|
|
36
|
-
(item) => !item.displayArea || item.displayArea.toLowerCase()
|
|
36
|
+
(item) => !item.displayArea || HEADER_AREA_KEYS.includes(item.displayArea.toLowerCase()),
|
|
37
37
|
),
|
|
38
38
|
[subItems],
|
|
39
39
|
);
|
|
@@ -37,7 +37,7 @@ export const StickyBottomMenu = JSX<StickyBottomMenuProps>(({ ...rest }) => {
|
|
|
37
37
|
return (
|
|
38
38
|
<div className="w-full mb-5">
|
|
39
39
|
<BlockWrapper
|
|
40
|
-
className="@container-normal fixed w-full h-[
|
|
40
|
+
className="@container-normal fixed w-full h-[74px] bottom-0 left-0 my-0 mx-auto bg-transparent z-[100]"
|
|
41
41
|
padding="p-0"
|
|
42
42
|
>
|
|
43
43
|
<RenderMenuItems menuItems={menuItemsWithButton} onClick={toggle} />
|
|
@@ -13,7 +13,7 @@ export type BenefitItemProps = ComplexBenefitContent & {
|
|
|
13
13
|
export const BenefitItem = JSX<BenefitItemProps>(({ className, benefitsVersion, ..._ }) => (
|
|
14
14
|
<div
|
|
15
15
|
className={style(
|
|
16
|
-
'flex gap-m',
|
|
16
|
+
'flex gap-m min-w-56',
|
|
17
17
|
'description' in _ && _.description ? 'items-start' : 'items-center',
|
|
18
18
|
className,
|
|
19
19
|
)}
|
|
@@ -21,13 +21,13 @@ export const Sitemap = JSX<SitemapProps>(({ className, topItems }) => {
|
|
|
21
21
|
);
|
|
22
22
|
});
|
|
23
23
|
|
|
24
|
-
const
|
|
24
|
+
const FOOTER_AREA_KEYS = ['all', 'footer'];
|
|
25
25
|
|
|
26
26
|
const renderColumn = (menuItem: TopMenuItemProps & { onClick: () => void }, index: number) => {
|
|
27
27
|
const { text, items = [], href, target, onClick } = menuItem;
|
|
28
28
|
|
|
29
29
|
const visibleSubItems = items.filter(
|
|
30
|
-
(_) => !_.displayArea || _.displayArea.toLowerCase()
|
|
30
|
+
(_) => !_.displayArea || FOOTER_AREA_KEYS.includes(_.displayArea.toLowerCase()),
|
|
31
31
|
);
|
|
32
32
|
|
|
33
33
|
return (
|
package/package.json
CHANGED
|
@@ -5,13 +5,14 @@ import type { LinkProps } from '../../model/LinkProps';
|
|
|
5
5
|
import { useSitemap } from '../../services/sitemap/useSitemap';
|
|
6
6
|
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
7
7
|
import { Button } from '../../ui-kit/Button/Button';
|
|
8
|
-
import { LinkList } from '../../ui-kit/LinkList/LinkList';
|
|
9
8
|
import { Text } from '../../ui-kit/Text/Text';
|
|
9
|
+
import { appendSlash } from '../../utils/appendSlash';
|
|
10
10
|
import { RollupItem } from '../RollupItem/RollupItem';
|
|
11
11
|
import { Contacts } from './Contacts';
|
|
12
12
|
import type { FooterDataProps } from './FooterDataProps';
|
|
13
13
|
import type { FooterProps } from './FooterProps';
|
|
14
14
|
import { HorizontalNavigation } from './HorizontalNavigation';
|
|
15
|
+
import { LinkList } from './LinkList';
|
|
15
16
|
import { SocialMedia } from './SocialMedia';
|
|
16
17
|
import { TextInformation } from './TextInformation';
|
|
17
18
|
import { findIconByHref } from './findIconByHref';
|
|
@@ -33,7 +34,7 @@ export const Footer = JSX<FooterProps>(({ className, ...rest }) => {
|
|
|
33
34
|
<div className="mb-lg pb-xs border-b border-main-divider">
|
|
34
35
|
{topItems?.map((item, i) => (
|
|
35
36
|
<RollupItem key={String(i)} label={item?.text} labelIcon={item?.icon}>
|
|
36
|
-
<LinkList items={item.items} />
|
|
37
|
+
<LinkList items={item.items} basePath={appendSlash(item.href)} />
|
|
37
38
|
</RollupItem>
|
|
38
39
|
))}
|
|
39
40
|
</div>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { projectSettings } from '../../ProjectSettings';
|
|
3
|
+
import { useLink } from '../../hooks/useLink';
|
|
4
|
+
import type { LinkProps } from '../../model/LinkProps';
|
|
5
|
+
import { style } from '../../utils/style';
|
|
6
|
+
|
|
7
|
+
interface LinkListProps {
|
|
8
|
+
items?: LinkProps[];
|
|
9
|
+
basePath?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const LinkList = JSX<LinkListProps>(({ className = '', items, basePath }) =>
|
|
14
|
+
items?.length ? (
|
|
15
|
+
<ul className={style('flex flex-col', className)}>{items.map(renderLinkListItem(basePath))}</ul>
|
|
16
|
+
) : null,
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
const renderLinkListItem = (basePath?: string) => (item: LinkProps, i: number) => {
|
|
20
|
+
const { text, ...linkProps } = item;
|
|
21
|
+
|
|
22
|
+
const isAnotherPortal =
|
|
23
|
+
projectSettings.BASE_PATH && basePath ? !projectSettings.BASE_PATH.startsWith(basePath) : false;
|
|
24
|
+
|
|
25
|
+
const link = useLink({ isRemote: isAnotherPortal, basePath });
|
|
26
|
+
const { href, target, onClick } = link(linkProps);
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<li key={`list_item_${String(i)}`} className="list-none my-xs">
|
|
30
|
+
<a
|
|
31
|
+
className="hover:text-primary-main font-light"
|
|
32
|
+
role="link"
|
|
33
|
+
href={href}
|
|
34
|
+
target={target || '_self'}
|
|
35
|
+
onClick={onClick}
|
|
36
|
+
>
|
|
37
|
+
{text ? text : null}
|
|
38
|
+
</a>
|
|
39
|
+
</li>
|
|
40
|
+
);
|
|
41
|
+
};
|
|
@@ -22,7 +22,7 @@ export interface HeaderSubMenuProps {
|
|
|
22
22
|
internetBankUrl?: string;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
const
|
|
25
|
+
const HEADER_AREA_KEYS = ['all', 'header'];
|
|
26
26
|
|
|
27
27
|
export const HeaderSubMenu = JSX<HeaderSubMenuProps>(
|
|
28
28
|
({ subItems = [], version, internetBankUrl }) => {
|
|
@@ -33,7 +33,7 @@ export const HeaderSubMenu = JSX<HeaderSubMenuProps>(
|
|
|
33
33
|
const visibleSubItems = useMemo(
|
|
34
34
|
() =>
|
|
35
35
|
subItems.filter(
|
|
36
|
-
(item) => !item.displayArea || item.displayArea.toLowerCase()
|
|
36
|
+
(item) => !item.displayArea || HEADER_AREA_KEYS.includes(item.displayArea.toLowerCase()),
|
|
37
37
|
),
|
|
38
38
|
[subItems],
|
|
39
39
|
);
|
|
@@ -37,7 +37,7 @@ export const StickyBottomMenu = JSX<StickyBottomMenuProps>(({ ...rest }) => {
|
|
|
37
37
|
return (
|
|
38
38
|
<div className="w-full mb-5">
|
|
39
39
|
<BlockWrapper
|
|
40
|
-
className="@container-normal fixed w-full h-[
|
|
40
|
+
className="@container-normal fixed w-full h-[74px] bottom-0 left-0 my-0 mx-auto bg-transparent z-[100]"
|
|
41
41
|
padding="p-0"
|
|
42
42
|
>
|
|
43
43
|
<RenderMenuItems menuItems={menuItemsWithButton} onClick={toggle} />
|
|
@@ -13,7 +13,7 @@ export type BenefitItemProps = ComplexBenefitContent & {
|
|
|
13
13
|
export const BenefitItem = JSX<BenefitItemProps>(({ className, benefitsVersion, ..._ }) => (
|
|
14
14
|
<div
|
|
15
15
|
className={style(
|
|
16
|
-
'flex gap-m',
|
|
16
|
+
'flex gap-m min-w-56',
|
|
17
17
|
'description' in _ && _.description ? 'items-start' : 'items-center',
|
|
18
18
|
className,
|
|
19
19
|
)}
|
|
@@ -21,13 +21,13 @@ export const Sitemap = JSX<SitemapProps>(({ className, topItems }) => {
|
|
|
21
21
|
);
|
|
22
22
|
});
|
|
23
23
|
|
|
24
|
-
const
|
|
24
|
+
const FOOTER_AREA_KEYS = ['all', 'footer'];
|
|
25
25
|
|
|
26
26
|
const renderColumn = (menuItem: TopMenuItemProps & { onClick: () => void }, index: number) => {
|
|
27
27
|
const { text, items = [], href, target, onClick } = menuItem;
|
|
28
28
|
|
|
29
29
|
const visibleSubItems = items.filter(
|
|
30
|
-
(_) => !_.displayArea || _.displayArea.toLowerCase()
|
|
30
|
+
(_) => !_.displayArea || FOOTER_AREA_KEYS.includes(_.displayArea.toLowerCase()),
|
|
31
31
|
);
|
|
32
32
|
|
|
33
33
|
return (
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const linkListStyles = "text-s text-secondary-text";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const linkListStyles = "";
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.LinkList = void 0;
|
|
3
|
-
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
-
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
-
const style_1 = require("../../utils/style");
|
|
6
|
-
const linkListStyles_1 = require("./linkListStyles");
|
|
7
|
-
exports.LinkList = (0, uni_jsx_1.JSX)(({ className = '', items }) => items?.length ? ((0, jsx_runtime_1.jsx)("ul", { className: (0, style_1.style)('flex flex-col', linkListStyles_1.linkListStyles, className), children: items.map(renderLinkListItem) })) : null);
|
|
8
|
-
const renderLinkListItem = (item, i) => {
|
|
9
|
-
const { text, ...linkProps } = item;
|
|
10
|
-
return ((0, jsx_runtime_1.jsx)("li", { className: "list-none my-xs", children: (0, jsx_runtime_1.jsx)("a", { className: "hover:text-primary-main font-light", role: "link", ...linkProps, children: text ? text : null }) }, `list_item_${String(i)}`));
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=LinkList.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LinkList.js","sourceRoot":"","sources":["../../../src/ui-kit/LinkList/LinkList.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,6CAA0C;AAE1C,qDAAkD;AAErC,QAAA,QAAQ,GAAG,IAAA,aAAG,EAAgB,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CACvE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CACd,+BAAI,SAAS,EAAE,IAAA,aAAK,EAAC,eAAe,EAAE,+BAAc,EAAE,SAAS,CAAC,YAC7D,KAAK,CAAC,GAAG,CAAC,kBAAkB,CAAC,GAC3B,CACN,CAAC,CAAC,CAAC,IAAI,CACT,CAAC;AAEF,MAAM,kBAAkB,GAAG,CAAC,IAAe,EAAE,CAAS,EAAE,EAAE;IACxD,MAAM,EAAE,IAAI,EAAE,GAAG,SAAS,EAAE,GAAG,IAAI,CAAC;IAEpC,OAAO,CACL,+BAAmC,SAAS,EAAC,iBAAiB,YAC5D,8BAAG,SAAS,EAAC,oCAAoC,EAAC,IAAI,EAAC,MAAM,KAAK,SAAS,YACxE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GACjB,IAHG,aAAa,MAAM,CAAC,CAAC,CAAC,EAAE,CAI5B,CACN,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LinkListProps.js","sourceRoot":"","sources":["../../../src/ui-kit/LinkList/LinkListProps.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const linkListStyles = "text-s text-secondary-text";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"linkListStyles.js","sourceRoot":"","sources":["../../../src/ui-kit/LinkList/linkListStyles.ts"],"names":[],"mappings":";;AAAa,QAAA,cAAc,GAAG,4BAA4B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const linkListStyles = "";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"linkListStyles.mobile.js","sourceRoot":"","sources":["../../../src/ui-kit/LinkList/linkListStyles.mobile.ts"],"names":[],"mappings":";;AAAa,QAAA,cAAc,GAAG,EAAE,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
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
|
-
import { linkListStyles } from './linkListStyles.js';
|
|
5
|
-
export const LinkList = JSX(({ className = '', items }) => items?.length ? (_jsx("ul", { className: style('flex flex-col', linkListStyles, className), children: items.map(renderLinkListItem) })) : null);
|
|
6
|
-
const renderLinkListItem = (item, i) => {
|
|
7
|
-
const { text, ...linkProps } = item;
|
|
8
|
-
return (_jsx("li", { className: "list-none my-xs", children: _jsx("a", { className: "hover:text-primary-main font-light", role: "link", ...linkProps, children: text ? text : null }) }, `list_item_${String(i)}`));
|
|
9
|
-
};
|
|
10
|
-
//# sourceMappingURL=LinkList.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LinkList.js","sourceRoot":"","sources":["../../../src/ui-kit/LinkList/LinkList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,CAAgB,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CACvE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CACd,aAAI,SAAS,EAAE,KAAK,CAAC,eAAe,EAAE,cAAc,EAAE,SAAS,CAAC,YAC7D,KAAK,CAAC,GAAG,CAAC,kBAAkB,CAAC,GAC3B,CACN,CAAC,CAAC,CAAC,IAAI,CACT,CAAC;AAEF,MAAM,kBAAkB,GAAG,CAAC,IAAe,EAAE,CAAS,EAAE,EAAE;IACxD,MAAM,EAAE,IAAI,EAAE,GAAG,SAAS,EAAE,GAAG,IAAI,CAAC;IAEpC,OAAO,CACL,aAAmC,SAAS,EAAC,iBAAiB,YAC5D,YAAG,SAAS,EAAC,oCAAoC,EAAC,IAAI,EAAC,MAAM,KAAK,SAAS,YACxE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GACjB,IAHG,aAAa,MAAM,CAAC,CAAC,CAAC,EAAE,CAI5B,CACN,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LinkListProps.js","sourceRoot":"","sources":["../../../src/ui-kit/LinkList/LinkListProps.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const linkListStyles = "text-s text-secondary-text";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"linkListStyles.js","sourceRoot":"","sources":["../../../src/ui-kit/LinkList/linkListStyles.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG,4BAA4B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const linkListStyles = "";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"linkListStyles.mobile.js","sourceRoot":"","sources":["../../../src/ui-kit/LinkList/linkListStyles.mobile.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const linkListStyles = "";
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.LinkList = void 0;
|
|
3
|
-
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
-
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
-
const style_1 = require("../../utils/style");
|
|
6
|
-
const linkListStyles_1 = require("./linkListStyles");
|
|
7
|
-
exports.LinkList = (0, uni_jsx_1.JSX)(({ className = '', items }) => items?.length ? ((0, jsx_runtime_1.jsx)("ul", { className: (0, style_1.style)('flex flex-col', linkListStyles_1.linkListStyles, className), children: items.map(renderLinkListItem) })) : null);
|
|
8
|
-
const renderLinkListItem = (item, i) => {
|
|
9
|
-
const { text, ...linkProps } = item;
|
|
10
|
-
return ((0, jsx_runtime_1.jsx)("li", { className: "list-none my-xs", children: (0, jsx_runtime_1.jsx)("a", { className: "hover:text-primary-main font-light", role: "link", ...linkProps, children: text ? text : null }) }, `list_item_${String(i)}`));
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=LinkList.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LinkList.js","sourceRoot":"","sources":["../../../src/ui-kit/LinkList/LinkList.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,6CAA0C;AAE1C,qDAAkD;AAErC,QAAA,QAAQ,GAAG,IAAA,aAAG,EAAgB,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CACvE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CACd,+BAAI,SAAS,EAAE,IAAA,aAAK,EAAC,eAAe,EAAE,+BAAc,EAAE,SAAS,CAAC,YAC7D,KAAK,CAAC,GAAG,CAAC,kBAAkB,CAAC,GAC3B,CACN,CAAC,CAAC,CAAC,IAAI,CACT,CAAC;AAEF,MAAM,kBAAkB,GAAG,CAAC,IAAe,EAAE,CAAS,EAAE,EAAE;IACxD,MAAM,EAAE,IAAI,EAAE,GAAG,SAAS,EAAE,GAAG,IAAI,CAAC;IAEpC,OAAO,CACL,+BAAmC,SAAS,EAAC,iBAAiB,YAC5D,8BAAG,SAAS,EAAC,oCAAoC,EAAC,IAAI,EAAC,MAAM,KAAK,SAAS,YACxE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GACjB,IAHG,aAAa,MAAM,CAAC,CAAC,CAAC,EAAE,CAI5B,CACN,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LinkListProps.js","sourceRoot":"","sources":["../../../src/ui-kit/LinkList/LinkListProps.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const linkListStyles = "";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"linkListStyles.js","sourceRoot":"","sources":["../../../src/ui-kit/LinkList/linkListStyles.ts"],"names":[],"mappings":";;AAAa,QAAA,cAAc,GAAG,EAAE,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
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
|
-
import { linkListStyles } from './linkListStyles.js';
|
|
5
|
-
export const LinkList = JSX(({ className = '', items }) => items?.length ? (_jsx("ul", { className: style('flex flex-col', linkListStyles, className), children: items.map(renderLinkListItem) })) : null);
|
|
6
|
-
const renderLinkListItem = (item, i) => {
|
|
7
|
-
const { text, ...linkProps } = item;
|
|
8
|
-
return (_jsx("li", { className: "list-none my-xs", children: _jsx("a", { className: "hover:text-primary-main font-light", role: "link", ...linkProps, children: text ? text : null }) }, `list_item_${String(i)}`));
|
|
9
|
-
};
|
|
10
|
-
//# sourceMappingURL=LinkList.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LinkList.js","sourceRoot":"","sources":["../../../src/ui-kit/LinkList/LinkList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,CAAgB,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CACvE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CACd,aAAI,SAAS,EAAE,KAAK,CAAC,eAAe,EAAE,cAAc,EAAE,SAAS,CAAC,YAC7D,KAAK,CAAC,GAAG,CAAC,kBAAkB,CAAC,GAC3B,CACN,CAAC,CAAC,CAAC,IAAI,CACT,CAAC;AAEF,MAAM,kBAAkB,GAAG,CAAC,IAAe,EAAE,CAAS,EAAE,EAAE;IACxD,MAAM,EAAE,IAAI,EAAE,GAAG,SAAS,EAAE,GAAG,IAAI,CAAC;IAEpC,OAAO,CACL,aAAmC,SAAS,EAAC,iBAAiB,YAC5D,YAAG,SAAS,EAAC,oCAAoC,EAAC,IAAI,EAAC,MAAM,KAAK,SAAS,YACxE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GACjB,IAHG,aAAa,MAAM,CAAC,CAAC,CAAC,EAAE,CAI5B,CACN,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LinkListProps.js","sourceRoot":"","sources":["../../../src/ui-kit/LinkList/LinkListProps.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const linkListStyles = "";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"linkListStyles.js","sourceRoot":"","sources":["../../../src/ui-kit/LinkList/linkListStyles.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import type { LinkProps } from '../../model/LinkProps';
|
|
3
|
-
import { style } from '../../utils/style';
|
|
4
|
-
import { LinkListProps } from './LinkListProps';
|
|
5
|
-
import { linkListStyles } from './linkListStyles';
|
|
6
|
-
|
|
7
|
-
export const LinkList = JSX<LinkListProps>(({ className = '', items }) =>
|
|
8
|
-
items?.length ? (
|
|
9
|
-
<ul className={style('flex flex-col', linkListStyles, className)}>
|
|
10
|
-
{items.map(renderLinkListItem)}
|
|
11
|
-
</ul>
|
|
12
|
-
) : null,
|
|
13
|
-
);
|
|
14
|
-
|
|
15
|
-
const renderLinkListItem = (item: LinkProps, i: number) => {
|
|
16
|
-
const { text, ...linkProps } = item;
|
|
17
|
-
|
|
18
|
-
return (
|
|
19
|
-
<li key={`list_item_${String(i)}`} className="list-none my-xs">
|
|
20
|
-
<a className="hover:text-primary-main font-light" role="link" {...linkProps}>
|
|
21
|
-
{text ? text : null}
|
|
22
|
-
</a>
|
|
23
|
-
</li>
|
|
24
|
-
);
|
|
25
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const linkListStyles = '';
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import '../../setup-fixture';
|
|
2
|
-
import { LinkList } from './LinkList';
|
|
3
|
-
import { LinkListProps } from './LinkListProps';
|
|
4
|
-
|
|
5
|
-
export const props: LinkListProps = {
|
|
6
|
-
items: [
|
|
7
|
-
{ text: 'target self', href: '/abc1/cooldoc/', target: '_self' },
|
|
8
|
-
{ text: 'target blank', href: '/abc2/wtf/', target: '_blank' },
|
|
9
|
-
{ text: 'GlassIcon', href: '/abc3/map/' },
|
|
10
|
-
{ text: 'no icon', href: '/abc4' },
|
|
11
|
-
{ text: 'документ 5', href: '/abc5' },
|
|
12
|
-
{ text: 'документ 6', href: '/abc6/abc' },
|
|
13
|
-
{ text: 'Text text text', href: '/abc7/yolo' },
|
|
14
|
-
{
|
|
15
|
-
text: 'Some more generic text to stretch item, and even more, more text, and more generic text, and even more, more text, and even more',
|
|
16
|
-
href: '/abc8/archive/',
|
|
17
|
-
},
|
|
18
|
-
{ text: 'И ещё немного текста', href: '/abc9/' },
|
|
19
|
-
{
|
|
20
|
-
text: 'Форматируем, сортируем, смотрим как отображается...',
|
|
21
|
-
href: '/abc10/',
|
|
22
|
-
},
|
|
23
|
-
],
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export default {
|
|
27
|
-
default: (
|
|
28
|
-
<div className="container grid grid-cols-12">
|
|
29
|
-
<LinkList className="col-span-12" {...props} />
|
|
30
|
-
</div>
|
|
31
|
-
),
|
|
32
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import type { LinkProps } from '../../model/LinkProps';
|
|
3
|
-
import { style } from '../../utils/style';
|
|
4
|
-
import { LinkListProps } from './LinkListProps';
|
|
5
|
-
import { linkListStyles } from './linkListStyles';
|
|
6
|
-
|
|
7
|
-
export const LinkList = JSX<LinkListProps>(({ className = '', items }) =>
|
|
8
|
-
items?.length ? (
|
|
9
|
-
<ul className={style('flex flex-col', linkListStyles, className)}>
|
|
10
|
-
{items.map(renderLinkListItem)}
|
|
11
|
-
</ul>
|
|
12
|
-
) : null,
|
|
13
|
-
);
|
|
14
|
-
|
|
15
|
-
const renderLinkListItem = (item: LinkProps, i: number) => {
|
|
16
|
-
const { text, ...linkProps } = item;
|
|
17
|
-
|
|
18
|
-
return (
|
|
19
|
-
<li key={`list_item_${String(i)}`} className="list-none my-xs">
|
|
20
|
-
<a className="hover:text-primary-main font-light" role="link" {...linkProps}>
|
|
21
|
-
{text ? text : null}
|
|
22
|
-
</a>
|
|
23
|
-
</li>
|
|
24
|
-
);
|
|
25
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const linkListStyles = '';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const linkListStyles = 'text-s text-secondary-text';
|