@inera/ids-react 8.0.0 → 8.1.0
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/components/accordion/accordion.d.ts +1 -0
- package/components/accordion/accordion.js +5 -43
- package/components/badge/badge.d.ts +3 -5
- package/components/badge/badge.js +2 -2
- package/components/box-link/box-link.d.ts +3 -5
- package/components/box-link/box-link.js +3 -4
- package/components/breadcrumbs/breadcrumbs.d.ts +2 -3
- package/components/breadcrumbs/breadcrumbs.js +2 -3
- package/components/button/button.d.ts +1 -2
- package/components/button-group/button-group.d.ts +2 -3
- package/components/button-group/button-group.js +2 -2
- package/components/card/card.d.ts +3 -4
- package/components/card/card.js +12 -7
- package/components/date-label/date-label.d.ts +2 -2
- package/components/date-label/date-label.js +9 -31
- package/components/dialog/dialog.d.ts +1 -1
- package/components/dialog/dialog.js +5 -6
- package/components/dropdown/dropdown-content-link.d.ts +1 -1
- package/components/dropdown/dropdown-content-link.js +2 -2
- package/components/dropdown/dropdown.d.ts +1 -1
- package/components/dropdown/dropdown.js +2 -2
- package/components/footer-1177/footer-1177.d.ts +3 -4
- package/components/footer-1177/footer-1177.js +7 -44
- package/components/footer-1177-admin/footer-1177-admin.d.ts +1 -1
- package/components/footer-1177-admin/footer-1177-admin.js +4 -41
- package/components/footer-1177-pro/footer-1177-pro.d.ts +1 -1
- package/components/footer-1177-pro/footer-1177-pro.js +4 -41
- package/components/footer-inera/footer-inera.d.ts +1 -1
- package/components/footer-inera/footer-inera.js +4 -41
- package/components/footer-inera-admin/footer-inera-admin.d.ts +1 -1
- package/components/footer-inera-admin/footer-inera-admin.js +4 -41
- package/components/form/checkbox/checkbox.js +1 -1
- package/components/global-alert/global-alert.js +2 -2
- package/components/grid/column.d.ts +3 -4
- package/components/grid/column.js +2 -3
- package/components/grid/container.d.ts +4 -3
- package/components/grid/container.js +6 -17
- package/components/grid/row.d.ts +4 -4
- package/components/grid/row.js +6 -11
- package/components/header-1177/header-1177-item.d.ts +2 -2
- package/components/header-1177/header-1177-item.js +19 -14
- package/components/header-1177/header-1177-nav-item-mobile.js +5 -10
- package/components/header-1177/header-1177-nav-item.d.ts +4 -4
- package/components/header-1177/header-1177-nav-item.js +23 -17
- package/components/header-1177/header-1177-nav.d.ts +2 -2
- package/components/header-1177/header-1177-nav.js +4 -5
- package/components/header-1177/header-1177.d.ts +1 -1
- package/components/header-1177/header-1177.js +3 -16
- package/components/header-1177-admin/header-1177-admin-item.d.ts +2 -2
- package/components/header-1177-admin/header-1177-admin-item.js +21 -17
- package/components/header-1177-admin/header-1177-admin-nav-item.d.ts +4 -4
- package/components/header-1177-admin/header-1177-admin-nav-item.js +20 -14
- package/components/header-1177-admin/header-1177-admin-nav.d.ts +2 -2
- package/components/header-1177-admin/header-1177-admin-nav.js +5 -6
- package/components/header-1177-admin/header-1177-admin.d.ts +2 -2
- package/components/header-1177-admin/header-1177-admin.js +3 -4
- package/components/header-1177-pro/header-1177-pro-item.d.ts +2 -2
- package/components/header-1177-pro/header-1177-pro-item.js +21 -14
- package/components/header-1177-pro/header-1177-pro-nav-item.d.ts +5 -5
- package/components/header-1177-pro/header-1177-pro-nav-item.js +15 -19
- package/components/header-1177-pro/header-1177-pro-nav.d.ts +2 -3
- package/components/header-1177-pro/header-1177-pro-nav.js +5 -7
- package/components/header-1177-pro/header-1177-pro.d.ts +2 -2
- package/components/header-1177-pro/header-1177-pro.js +4 -8
- package/components/header-inera/header-inera-item.d.ts +3 -4
- package/components/header-inera/header-inera-item.js +30 -14
- package/components/header-inera/header-inera-nav-item.js +7 -20
- package/components/header-inera/header-inera-nav.d.ts +1 -1
- package/components/header-inera/header-inera-nav.js +5 -6
- package/components/header-inera/header-inera.d.ts +2 -2
- package/components/header-inera/header-inera.js +4 -8
- package/components/header-inera-admin/header-inera-admin-item.d.ts +3 -4
- package/components/header-inera-admin/header-inera-admin-item.js +17 -13
- package/components/header-inera-admin/header-inera-admin-nav-item.d.ts +1 -3
- package/components/header-inera-admin/header-inera-admin-nav-item.js +14 -27
- package/components/header-inera-admin/header-inera-admin-nav.d.ts +2 -3
- package/components/header-inera-admin/header-inera-admin-nav.js +3 -4
- package/components/header-inera-admin/header-inera-admin.d.ts +1 -1
- package/components/header-inera-admin/header-inera-admin.js +3 -4
- package/components/link/link.d.ts +1 -1
- package/components/link/link.js +15 -13
- package/components/navigation/content/navigation-content.d.ts +2 -3
- package/components/navigation/content/navigation-content.js +5 -12
- package/components/navigation/local/navigation-local.d.ts +2 -3
- package/components/navigation/local/navigation-local.js +2 -2
- package/components/notification/badge/notification-badge.d.ts +2 -3
- package/components/notification/badge/notification-badge.js +2 -2
- package/components/pagination/data-pagination/data-pagination.d.ts +1 -2
- package/components/pagination/data-pagination/data-pagination.js +0 -1
- package/components/pagination/list-pagination/list-pagination.d.ts +1 -1
- package/components/pagination/list-pagination/list-pagination.js +2 -3
- package/components/progressbar/progressbar.d.ts +5 -3
- package/components/progressbar/progressbar.js +4 -4
- package/components/puff-list/puff-list-item/puff-list-item-date.d.ts +13 -0
- package/components/puff-list/puff-list-item/puff-list-item-date.js +23 -0
- package/components/puff-list/puff-list-item/puff-list-item-header.d.ts +10 -0
- package/components/puff-list/puff-list-item/puff-list-item-header.js +11 -0
- package/components/puff-list/puff-list-item/puff-list-item-info.d.ts +3 -5
- package/components/puff-list/puff-list-item/puff-list-item-info.js +4 -5
- package/components/puff-list/puff-list-item/puff-list-item.d.ts +9 -20
- package/components/puff-list/puff-list-item/puff-list-item.js +8 -78
- package/components/puff-list/puff-list.d.ts +1 -1
- package/components/puff-list/puff-list.js +4 -3
- package/components/region-icon/region-icon.d.ts +2 -2
- package/components/region-icon/region-icon.js +5 -4
- package/components/side-menu/side-menu.js +1 -1
- package/components/stepper/stepper.d.ts +1 -1
- package/components/stepper/stepper.js +2 -2
- package/components/tag/tag.d.ts +11 -4
- package/components/tag/tag.js +7 -7
- package/components/tooltip/tooltip.d.ts +1 -0
- package/components/tooltip/tooltip.js +8 -7
- package/components/utils/hooks/useFocusTrap.js +2 -1
- package/index.d.ts +2 -0
- package/index.js +2 -0
- package/package.json +2 -2
|
@@ -1,26 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import { isValidElement, cloneElement } from 'react';
|
|
4
|
-
import '@inera/ids-design/components/header-inera/header-inera-item.css';
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import React, { isValidElement, cloneElement } from 'react';
|
|
5
3
|
import clsx from 'clsx';
|
|
6
4
|
import { useHeaderContext } from '../utils/contexts/HeaderContext.js';
|
|
5
|
+
import '@inera/ids-design/components/header-inera/header-inera-item.css';
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
const headerContext = useHeaderContext();
|
|
7
|
+
function IDSHeaderIneraItem({ mobile = false, separatorLeft = false, icon = "", text = "", href = "", link, onClick, ...props }) {
|
|
8
|
+
const headerContext = useHeaderContext() || { unresponsive: false };
|
|
10
9
|
const classNames = clsx("ids-header-inera-item", {
|
|
11
10
|
"ids-header-inera-item--mobile": mobile,
|
|
12
|
-
"ids-header-inera-item--unresponsive": headerContext
|
|
11
|
+
"ids-header-inera-item--unresponsive": headerContext.unresponsive
|
|
13
12
|
});
|
|
14
|
-
const renderContent = () => (
|
|
13
|
+
const renderContent = () => (jsx("div", { className: "ids-header-inera-item__icon", "aria-hidden": "true", children: jsx("span", { className: `ids-icon-${icon}` }) }));
|
|
14
|
+
// FIXME 9.0 let the user provide a link or button for all react header items to align with structure for the other frameworks
|
|
15
|
+
/* if (link && isValidElement(link)) {
|
|
16
|
+
return (
|
|
17
|
+
<div className={classNames}>
|
|
18
|
+
{renderContent()}
|
|
19
|
+
{link}
|
|
20
|
+
</div>
|
|
21
|
+
);
|
|
22
|
+
} */
|
|
15
23
|
if (link && isValidElement(link)) {
|
|
16
|
-
|
|
24
|
+
const linkProps = link.props;
|
|
25
|
+
const hasChildren = !!linkProps.children &&
|
|
26
|
+
(typeof linkProps.children === "string"
|
|
27
|
+
? linkProps.children.trim().length > 0
|
|
28
|
+
: React.Children.count(linkProps.children) > 0);
|
|
29
|
+
const newLink = cloneElement(link, {
|
|
17
30
|
...props,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
children: renderContent()
|
|
31
|
+
className: clsx(link.props.className),
|
|
32
|
+
children: hasChildren ? linkProps.children : text
|
|
21
33
|
});
|
|
34
|
+
return (jsxs("div", { className: classNames, children: [renderContent(), " ", newLink] }));
|
|
35
|
+
}
|
|
36
|
+
if (onClick) {
|
|
37
|
+
return (jsxs("div", { className: classNames, children: [renderContent(), jsx("button", { onClick: onClick, ...props, children: text })] }));
|
|
22
38
|
}
|
|
23
|
-
return
|
|
24
|
-
}
|
|
39
|
+
return (jsxs("div", { className: classNames, children: [renderContent(), jsx("a", { href: href, ...props, children: text })] }));
|
|
40
|
+
}
|
|
25
41
|
|
|
26
42
|
export { IDSHeaderIneraItem };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
-
import
|
|
3
|
+
import { useState, useRef, useEffect } from 'react';
|
|
4
4
|
import '@inera/ids-design/components/header-inera/header-inera-nav-item.css';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import { useHeaderContext } from '../utils/contexts/HeaderContext.js';
|
|
@@ -25,34 +25,21 @@ const IDSHeaderIneraNavItem = ({ label = "", active = false, expanded = false, n
|
|
|
25
25
|
}, [expanded]);
|
|
26
26
|
const renderNavItem = () => {
|
|
27
27
|
if (label) {
|
|
28
|
-
return (jsxs("button", { "aria-controls": contentId, "aria-expanded": isExpanded, className:
|
|
29
|
-
"ids-header-inera-nav-item__button--expanded": isExpanded,
|
|
30
|
-
"ids-header-inera-nav-item__button--active": active
|
|
31
|
-
}), onClick: () => setIsExpanded(prev => !prev), children: [label, " ", notification] }));
|
|
28
|
+
return (jsxs("button", { "aria-controls": contentId, "aria-expanded": isExpanded, className: "ids-header-inera-nav-item__button", onClick: () => setIsExpanded(prev => !prev), children: [label, " ", notification] }));
|
|
32
29
|
}
|
|
33
30
|
else {
|
|
34
|
-
return (jsxs("span", { className:
|
|
35
|
-
"ids-header-inera-nav-item__link--active": active
|
|
36
|
-
}), children: [children, " ", notification] }));
|
|
31
|
+
return (jsxs("span", { className: "ids-header-inera-nav-item__link", children: [children, " ", notification] }));
|
|
37
32
|
}
|
|
38
33
|
};
|
|
39
|
-
const renderLink = (link) => {
|
|
40
|
-
return React.isValidElement(link)
|
|
41
|
-
? React.cloneElement(link, {
|
|
42
|
-
activeIcon: true,
|
|
43
|
-
block: true,
|
|
44
|
-
colorPreset: 2,
|
|
45
|
-
onClick: () => setIsExpanded(false)
|
|
46
|
-
})
|
|
47
|
-
: link;
|
|
48
|
-
};
|
|
49
34
|
const renderContent = () => {
|
|
50
35
|
if (!isExpanded)
|
|
51
36
|
return null;
|
|
52
|
-
return (jsx("div", { id: contentId, className: "ids-header-inera-nav-item__menu ids-header-inera-nav-item__menu--expanded", children: jsxs("div", { className: "ids-header-inera-nav-item__menu-
|
|
37
|
+
return (jsx("div", { id: contentId, className: "ids-header-inera-nav-item__menu ids-header-inera-nav-item__menu--expanded", children: jsxs("div", { className: "ids-header-inera-nav-item__menu-content", children: [jsx("div", { className: "ids-header-inera-nav-item__menu-col-1", children: col1?.map((link, idx) => (jsx("div", { className: "ids-header-inera-nav__menu-item-wrapper", children: link }, idx))) }), jsx("div", { className: "ids-header-inera-nav-item__menu-col-2", children: col2?.map((link, idx) => (jsx("div", { className: "ids-header-inera-nav__menu-item-wrapper", children: link }, idx))) }), jsx("div", { className: "ids-header-inera-nav-item__menu-col-3", children: col3?.map((link, idx) => (jsx("div", { className: "ids-header-inera-nav__menu-item-wrapper", children: link }, idx))) }), jsx("div", { className: "ids-header-inera-nav-item__menu-col-4", children: col4 })] }) }));
|
|
53
38
|
};
|
|
54
39
|
return (jsxs("div", { ref: containerRef, className: clsx("ids-header-inera-nav-item", {
|
|
55
|
-
"ids-header-inera-nav-item--unresponsive": headerContext?.unresponsive
|
|
40
|
+
"ids-header-inera-nav-item--unresponsive": headerContext?.unresponsive,
|
|
41
|
+
"ids-header-inera-nav-item--expanded": isExpanded,
|
|
42
|
+
"ids-header-inera-nav-item--active": active
|
|
56
43
|
}), ...props, children: [renderNavItem(), renderContent()] }));
|
|
57
44
|
};
|
|
58
45
|
|
|
@@ -4,4 +4,4 @@ export interface IDSHeaderIneraNavProps {
|
|
|
4
4
|
srText?: string;
|
|
5
5
|
children?: React.ReactNode;
|
|
6
6
|
}
|
|
7
|
-
export declare
|
|
7
|
+
export declare function IDSHeaderIneraNav({ srText, children, ...props }: IDSHeaderIneraNavProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
"use client";
|
|
2
1
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
import '@inera/ids-design/components/header-inera/header-inera-nav.css';
|
|
4
2
|
import clsx from 'clsx';
|
|
5
3
|
import { useHeaderContext } from '../utils/contexts/HeaderContext.js';
|
|
4
|
+
import '@inera/ids-design/components/header-inera/header-inera-nav.css';
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
const headerContext = useHeaderContext();
|
|
6
|
+
function IDSHeaderIneraNav({ srText = "Huvudmeny", children, ...props }) {
|
|
7
|
+
const headerContext = useHeaderContext() || { unresponsive: false };
|
|
9
8
|
const className = clsx("ids-header-inera-nav", {
|
|
10
|
-
"ids-header-inera-nav--unresponsive": headerContext
|
|
9
|
+
"ids-header-inera-nav--unresponsive": headerContext.unresponsive
|
|
11
10
|
});
|
|
12
11
|
return (jsx("nav", { className: className, "aria-label": srText, ...props, children: jsx("div", { className: "ids-header-inera-nav__nav-items", children: children }) }));
|
|
13
|
-
}
|
|
12
|
+
}
|
|
14
13
|
|
|
15
14
|
export { IDSHeaderIneraNav };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { ReactNode,
|
|
1
|
+
import React, { ReactNode, AnchorHTMLAttributes } from "react";
|
|
2
2
|
import "@inera/ids-design/components/header-inera/header-inera.css";
|
|
3
3
|
interface IDSHeaderIneraProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
logoHref?: string;
|
|
@@ -11,5 +11,5 @@ interface IDSHeaderIneraProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
11
11
|
logo?: ReactNode;
|
|
12
12
|
children?: ReactNode;
|
|
13
13
|
}
|
|
14
|
-
export declare
|
|
14
|
+
export declare function IDSHeaderInera({ logoHref, logoProps, srLogoText, unresponsive, items, mobileMenu, skipToContent, logo, className, children, ...props }: IDSHeaderIneraProps): import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
export {};
|
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
"use client";
|
|
2
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
2
|
import clsx from 'clsx';
|
|
4
|
-
import '@inera/ids-design/components/header-inera/header-inera.css';
|
|
5
3
|
import { HeaderProvider } from '../utils/contexts/HeaderContext.js';
|
|
4
|
+
import '@inera/ids-design/components/header-inera/header-inera.css';
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
return (jsx(HeaderProvider, { value: {
|
|
9
|
-
unresponsive,
|
|
10
|
-
hideRegionPicker: true
|
|
11
|
-
}, children: jsxs("header", { className: clsx("ids-header-inera", {
|
|
6
|
+
function IDSHeaderInera({ logoHref = "", logoProps = {}, srLogoText = "Logotyp inera", unresponsive = false, items, mobileMenu, skipToContent, logo, className, children, ...props }) {
|
|
7
|
+
return (jsx(HeaderProvider, { value: { unresponsive, hideRegionPicker: true }, children: jsxs("header", { className: clsx("ids-header-inera", {
|
|
12
8
|
"ids-header-inera--unresponsive": unresponsive
|
|
13
9
|
}, className), ...props, children: [skipToContent && jsx("div", { className: "ids-header-inera__skip-to-content", children: skipToContent }), jsxs("div", { className: "ids-header-inera__inner", children: [jsxs("div", { className: "ids-header-inera__main", children: [logoHref ? (jsx("a", { href: logoHref, "aria-label": srLogoText, className: "ids-header-inera__logo", ...logoProps })) : logo ? (jsx("div", { className: "ids-header-inera__logo-custom", children: logo })) : (jsx("div", { className: "ids-header-inera__logo" })), jsxs("div", { className: "ids-header-inera__items", children: [items, " ", mobileMenu] })] }), children] })] }) }));
|
|
14
|
-
}
|
|
10
|
+
}
|
|
15
11
|
|
|
16
12
|
export { IDSHeaderInera };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
2
|
import "@inera/ids-design/components/header-inera-admin/header-inera-admin-item.css";
|
|
3
|
-
interface IDSHeaderIneraAdminItemProps {
|
|
3
|
+
export interface IDSHeaderIneraAdminItemProps {
|
|
4
4
|
mobile?: boolean;
|
|
5
5
|
separatorLeft?: boolean;
|
|
6
6
|
icon?: string;
|
|
@@ -9,5 +9,4 @@ interface IDSHeaderIneraAdminItemProps {
|
|
|
9
9
|
link?: ReactNode;
|
|
10
10
|
onClick?: () => void;
|
|
11
11
|
}
|
|
12
|
-
export declare
|
|
13
|
-
export {};
|
|
12
|
+
export declare function IDSHeaderIneraAdminItem({ mobile, separatorLeft, icon, text, href, link, onClick, ...props }: IDSHeaderIneraAdminItemProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,27 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import { isValidElement, cloneElement } from 'react';
|
|
4
|
-
import '@inera/ids-design/components/header-inera-admin/header-inera-admin-item.css';
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import React, { isValidElement, cloneElement } from 'react';
|
|
5
3
|
import clsx from 'clsx';
|
|
6
4
|
import { useHeaderContext } from '../utils/contexts/HeaderContext.js';
|
|
5
|
+
import '@inera/ids-design/components/header-inera-admin/header-inera-admin-item.css';
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
function IDSHeaderIneraAdminItem({ mobile = false, separatorLeft = false, icon = "", text, href = "", link, onClick, ...props }) {
|
|
9
8
|
const headerContext = useHeaderContext();
|
|
10
9
|
const classNames = clsx("ids-header-inera-admin-item", {
|
|
11
10
|
"ids-header-inera-admin-item--mobile": mobile,
|
|
12
|
-
"ids-header-inera-admin-
|
|
11
|
+
"ids-header-inera-admin-item--separator": separatorLeft,
|
|
13
12
|
"ids-header-inera-admin-item--unresponsive": headerContext?.unresponsive
|
|
14
13
|
});
|
|
15
|
-
const renderContent = () => (
|
|
14
|
+
const renderContent = () => (jsx("div", { className: "ids-header-inera-admin-item__icon", "aria-hidden": "true", children: jsx("span", { className: `ids-icon-${icon}` }) }));
|
|
16
15
|
if (link && isValidElement(link)) {
|
|
17
|
-
|
|
16
|
+
const linkProps = link.props;
|
|
17
|
+
const hasChildren = !!linkProps.children &&
|
|
18
|
+
(typeof linkProps.children === "string"
|
|
19
|
+
? linkProps.children.trim().length > 0
|
|
20
|
+
: React.Children.count(linkProps.children) > 0);
|
|
21
|
+
const newLink = cloneElement(link, {
|
|
18
22
|
...props,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
children: renderContent()
|
|
23
|
+
className: clsx(link.props.className),
|
|
24
|
+
children: hasChildren ? linkProps.children : text
|
|
22
25
|
});
|
|
26
|
+
return (jsxs("div", { className: classNames, children: [renderContent(), " ", newLink] }));
|
|
23
27
|
}
|
|
24
|
-
return onClick ? (
|
|
25
|
-
}
|
|
28
|
+
return onClick ? (jsxs("div", { className: classNames, children: [renderContent(), jsx("button", { onClick: onClick, ...props, children: text })] })) : (jsxs("div", { className: classNames, children: [renderContent(), jsx("a", { href: href, ...props, children: text })] }));
|
|
29
|
+
}
|
|
26
30
|
|
|
27
31
|
export { IDSHeaderIneraAdminItem };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import React, { ReactNode, ReactElement } from "react";
|
|
2
2
|
import "@inera/ids-design/components/header-inera-admin/header-inera-admin-nav-item.css";
|
|
3
3
|
import { IDSLinkProps } from "../link/link";
|
|
4
|
-
interface IDSHeaderIneraAdminNavItemProps {
|
|
4
|
+
export interface IDSHeaderIneraAdminNavItemProps {
|
|
5
5
|
label?: string;
|
|
6
6
|
active?: boolean;
|
|
7
7
|
expanded?: boolean;
|
|
8
|
-
notification?: ReactNode;
|
|
9
8
|
children?: ReactNode;
|
|
10
9
|
col1?: ReactElement<IDSLinkProps>[];
|
|
11
10
|
col2?: ReactElement<IDSLinkProps>[];
|
|
@@ -13,4 +12,3 @@ interface IDSHeaderIneraAdminNavItemProps {
|
|
|
13
12
|
col4?: ReactNode;
|
|
14
13
|
}
|
|
15
14
|
export declare const IDSHeaderIneraAdminNavItem: React.FC<IDSHeaderIneraAdminNavItemProps>;
|
|
16
|
-
export {};
|
|
@@ -1,58 +1,45 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
-
import
|
|
3
|
+
import { useState, useRef, useEffect } from 'react';
|
|
4
4
|
import '@inera/ids-design/components/header-inera-admin/header-inera-admin-nav-item.css';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import { useHeaderContext } from '../utils/contexts/HeaderContext.js';
|
|
7
7
|
import { useElementId } from '../utils/hooks/useElementId.js';
|
|
8
8
|
|
|
9
|
-
const IDSHeaderIneraAdminNavItem = ({ label = "", active = false, expanded = false,
|
|
9
|
+
const IDSHeaderIneraAdminNavItem = ({ label = "", active = false, expanded = false, children, col1, col2, col3, col4, ...props }) => {
|
|
10
10
|
const headerContext = useHeaderContext();
|
|
11
11
|
const [isExpanded, setIsExpanded] = useState(expanded);
|
|
12
12
|
const containerRef = useRef(null);
|
|
13
13
|
const contentId = useElementId();
|
|
14
|
-
const handleClickOutside =
|
|
14
|
+
const handleClickOutside = (event) => {
|
|
15
15
|
if (containerRef.current && !containerRef.current.contains(event.target)) {
|
|
16
16
|
setIsExpanded(false);
|
|
17
17
|
}
|
|
18
|
-
}
|
|
18
|
+
};
|
|
19
19
|
useEffect(() => {
|
|
20
20
|
setIsExpanded(expanded);
|
|
21
|
-
}, [expanded]);
|
|
22
|
-
useEffect(() => {
|
|
23
21
|
document.addEventListener("click", handleClickOutside);
|
|
24
|
-
return () =>
|
|
25
|
-
|
|
22
|
+
return () => {
|
|
23
|
+
document.removeEventListener("click", handleClickOutside);
|
|
24
|
+
};
|
|
25
|
+
}, [expanded]);
|
|
26
26
|
const renderNavItem = () => {
|
|
27
27
|
if (label) {
|
|
28
|
-
return (
|
|
29
|
-
"ids-header-inera-admin-nav-item__button--expanded": isExpanded,
|
|
30
|
-
"ids-header-inera-admin-nav-item__button--active": active
|
|
31
|
-
}), "aria-controls": contentId, "aria-expanded": isExpanded, onClick: () => setIsExpanded(!isExpanded), children: [label, notification] }));
|
|
28
|
+
return (jsx("button", { "aria-controls": contentId, "aria-expanded": isExpanded, className: "ids-header-inera-admin-nav-item__button", onClick: () => setIsExpanded(prev => !prev), children: label }));
|
|
32
29
|
}
|
|
33
30
|
else {
|
|
34
|
-
return (
|
|
35
|
-
"ids-header-inera-admin-nav-item__link--active": active
|
|
36
|
-
}), children: [children, notification] }));
|
|
31
|
+
return jsx("span", { className: "ids-header-inera-admin-nav-item__link", children: children });
|
|
37
32
|
}
|
|
38
33
|
};
|
|
39
|
-
const renderLink = (link) => {
|
|
40
|
-
return React.isValidElement(link)
|
|
41
|
-
? React.cloneElement(link, {
|
|
42
|
-
activeIcon: true,
|
|
43
|
-
block: true,
|
|
44
|
-
colorPreset: 2,
|
|
45
|
-
onClick: () => setIsExpanded(false)
|
|
46
|
-
})
|
|
47
|
-
: link;
|
|
48
|
-
};
|
|
49
34
|
const renderContent = () => {
|
|
50
35
|
if (!isExpanded)
|
|
51
36
|
return null;
|
|
52
|
-
return (jsx("div", { id: contentId, className: "ids-header-inera-admin-nav-item__menu ids-header-inera-admin-nav-item__menu--expanded", children: jsxs("div", { className: "ids-header-inera-admin-nav-item__menu-
|
|
37
|
+
return (jsx("div", { id: contentId, className: "ids-header-inera-admin-nav-item__menu ids-header-inera-admin-nav-item__menu--expanded", children: jsxs("div", { className: "ids-header-inera-admin-nav-item__menu-content", children: [jsx("div", { className: "ids-header-inera-admin-nav-item__menu-col-1", children: col1?.map((link, idx) => (jsx("div", { className: "ids-header-inera-admin-nav__menu-item-wrapper", children: link }, idx))) }), jsx("div", { className: "ids-header-inera-admin-nav-item__menu-col-2", children: col2?.map((link, idx) => (jsx("div", { className: "ids-header-inera-admin-nav__menu-item-wrapper", children: link }, idx))) }), jsx("div", { className: "ids-header-inera-admin-nav-item__menu-col-3", children: col3?.map((link, idx) => (jsx("div", { className: "ids-header-inera-admin-nav__menu-item-wrapper", children: link }, idx))) }), jsx("div", { className: "ids-header-inera-admin-nav-item__menu-col-4", children: col4 })] }) }));
|
|
53
38
|
};
|
|
54
39
|
return (jsxs("div", { ref: containerRef, className: clsx("ids-header-inera-admin-nav-item", {
|
|
55
|
-
"ids-header-inera-admin-nav-item--unresponsive": headerContext?.unresponsive
|
|
40
|
+
"ids-header-inera-admin-nav-item--unresponsive": headerContext?.unresponsive,
|
|
41
|
+
"ids-header-inera-admin-nav-item--expanded": isExpanded,
|
|
42
|
+
"ids-header-inera-admin-nav-item--active": active
|
|
56
43
|
}), ...props, children: [renderNavItem(), renderContent()] }));
|
|
57
44
|
};
|
|
58
45
|
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import "@inera/ids-design/components/header-inera-admin/header-inera-admin-nav.css";
|
|
3
|
-
interface IDSHeaderIneraAdminNavProps {
|
|
3
|
+
export interface IDSHeaderIneraAdminNavProps {
|
|
4
4
|
srText?: string;
|
|
5
5
|
children?: React.ReactNode;
|
|
6
6
|
}
|
|
7
|
-
export declare
|
|
8
|
-
export {};
|
|
7
|
+
export declare function IDSHeaderIneraAdminNav({ srText, children, ...props }: IDSHeaderIneraAdminNavProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
"use client";
|
|
2
1
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
import '@inera/ids-design/components/header-inera-admin/header-inera-admin-nav.css';
|
|
4
2
|
import clsx from 'clsx';
|
|
5
3
|
import { useHeaderContext } from '../utils/contexts/HeaderContext.js';
|
|
4
|
+
import '@inera/ids-design/components/header-inera-admin/header-inera-admin-nav.css';
|
|
6
5
|
|
|
7
|
-
|
|
6
|
+
function IDSHeaderIneraAdminNav({ srText = "Huvudmeny", children, ...props }) {
|
|
8
7
|
const headerContext = useHeaderContext();
|
|
9
8
|
const classNames = clsx("ids-header-inera-admin-nav", {
|
|
10
9
|
"ids-header-inera-admin-nav--unresponsive": headerContext?.unresponsive
|
|
11
10
|
});
|
|
12
11
|
return (jsx("nav", { className: classNames, "aria-label": srText, ...props, children: jsx("div", { className: "ids-header-inera-admin-nav__nav-items", children: children }) }));
|
|
13
|
-
}
|
|
12
|
+
}
|
|
14
13
|
|
|
15
14
|
export { IDSHeaderIneraAdminNav };
|
|
@@ -13,4 +13,4 @@ export interface IDSHeaderIneraAdminProps extends React.HTMLAttributes<HTMLDivEl
|
|
|
13
13
|
mobileMenu?: ReactNode;
|
|
14
14
|
children?: ReactNode;
|
|
15
15
|
}
|
|
16
|
-
export declare
|
|
16
|
+
export declare function IDSHeaderIneraAdmin({ brandText, unresponsive, showLogo, items, avatar, skipToContent, brandLink, srLogoText, serviceName, mobileMenu, className, children, ...props }: IDSHeaderIneraAdminProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
"use client";
|
|
2
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
2
|
import { isValidElement, cloneElement } from 'react';
|
|
4
|
-
import '@inera/ids-design/components/header-inera-admin/header-inera-admin.css';
|
|
5
3
|
import clsx from 'clsx';
|
|
6
4
|
import { HeaderProvider } from '../utils/contexts/HeaderContext.js';
|
|
5
|
+
import '@inera/ids-design/components/header-inera-admin/header-inera-admin.css';
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
function IDSHeaderIneraAdmin({ brandText = "", unresponsive = false, showLogo = false, items, avatar, skipToContent, brandLink, srLogoText = "Logotyp inera", serviceName = "EN TJÄNST FRÅN INERA", mobileMenu, className, children, ...props }) {
|
|
9
8
|
const renderBrandText = () => {
|
|
10
9
|
if (brandLink && isValidElement(brandLink)) {
|
|
11
10
|
return (jsx("span", { className: "ids-header-inera-admin__brand-link", children: cloneElement(brandLink, {
|
|
@@ -17,6 +16,6 @@ const IDSHeaderIneraAdmin = ({ brandText = "", unresponsive = false, showLogo =
|
|
|
17
16
|
return (jsx(HeaderProvider, { value: { unresponsive, hideRegionPicker: true }, children: jsxs("header", { className: clsx("ids-header-inera-admin", {
|
|
18
17
|
"ids-header-inera-admin--unresponsive": unresponsive
|
|
19
18
|
}, className), ...props, children: [skipToContent && jsx("div", { className: "ids-header-inera-admin__skip-to-content", children: skipToContent }), jsxs("div", { className: "ids-header-inera-admin__inner", children: [jsxs("div", { className: "ids-header-inera-admin__main", children: [jsx("div", { className: "ids-header-inera-admin__service-wrapper", children: jsxs("div", { className: "ids-header-inera-admin__brand", children: [showLogo && jsx("div", { className: "ids-header-inera-admin__logo", role: "img", "aria-label": srLogoText }), jsxs("div", { className: "ids-header-inera-admin__brand-inner", children: [renderBrandText(), jsx("h1", { className: "ids-header-inera-admin__brand-text", children: brandText }), jsx("h2", { className: "ids-header-inera-admin__service-name", children: serviceName })] })] }) }), jsxs("div", { className: "ids-header-inera-admin__items", children: [items, " ", avatar, " ", mobileMenu && jsx("div", { className: "ids-header-inera-admin__mobile-menu", children: mobileMenu })] })] }), children] })] }) }));
|
|
20
|
-
}
|
|
19
|
+
}
|
|
21
20
|
|
|
22
21
|
export { IDSHeaderIneraAdmin };
|
|
@@ -14,4 +14,4 @@ export interface IDSLinkProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElemen
|
|
|
14
14
|
endItem?: ReactNode;
|
|
15
15
|
children?: ReactElement;
|
|
16
16
|
}
|
|
17
|
-
export declare
|
|
17
|
+
export declare function IDSLink({ colorPreset, menu, footer, active, activeIcon, block, underlined, noUnderline, small, focusAnchor, endItem, children, ...props }: IDSLinkProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
package/components/link/link.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
"use client";
|
|
2
1
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
3
|
-
import {
|
|
2
|
+
import { isValidElement, cloneElement } from 'react';
|
|
4
3
|
import clsx from 'clsx';
|
|
5
4
|
|
|
6
5
|
const containsIcon = (node) => {
|
|
@@ -14,14 +13,17 @@ const containsIcon = (node) => {
|
|
|
14
13
|
}
|
|
15
14
|
return false;
|
|
16
15
|
};
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
function IDSLink({ colorPreset = 0, menu = false, footer = false, active = false, activeIcon = false, block = false, underlined = false, noUnderline = false, small = false, focusAnchor = false, endItem, children, ...props }) {
|
|
17
|
+
// Ensure valid child
|
|
19
18
|
if (!isValidElement(children)) {
|
|
20
|
-
|
|
19
|
+
if (process.env.NODE_ENV !== "production") {
|
|
20
|
+
console.error("IDSLink requires a single valid React element (e.g., <a> or <Link>) as a child.");
|
|
21
|
+
}
|
|
21
22
|
return null;
|
|
22
23
|
}
|
|
23
|
-
const
|
|
24
|
-
const
|
|
24
|
+
const innerChildren = children.props.children;
|
|
25
|
+
const hasIcon = containsIcon(innerChildren);
|
|
26
|
+
const mergedClasses = clsx("ids-link", colorPreset > 0 && `ids-link--color-${colorPreset}`, {
|
|
25
27
|
"ids-link--icon": hasIcon,
|
|
26
28
|
"ids-link--active-icon": activeIcon,
|
|
27
29
|
"ids-link--block": block,
|
|
@@ -32,14 +34,14 @@ const IDSLink = ({ colorPreset = 0, menu = false, footer = false, active = false
|
|
|
32
34
|
"ids-link--underlined": underlined,
|
|
33
35
|
"ids-link--no-underline": noUnderline,
|
|
34
36
|
"ids-focus-anchor": focusAnchor
|
|
35
|
-
}, children.props.className, className);
|
|
36
|
-
const
|
|
37
|
+
}, children.props.className, props.className);
|
|
38
|
+
const wrappedContent = (jsxs(Fragment, { children: [innerChildren, endItem && jsx("span", { style: { marginLeft: "0.5rem" }, children: endItem })] }));
|
|
37
39
|
return cloneElement(children, {
|
|
40
|
+
...children.props,
|
|
38
41
|
...props,
|
|
39
|
-
className:
|
|
40
|
-
|
|
41
|
-
children: linkContent
|
|
42
|
+
className: mergedClasses,
|
|
43
|
+
children: wrappedContent
|
|
42
44
|
});
|
|
43
|
-
}
|
|
45
|
+
}
|
|
44
46
|
|
|
45
47
|
export { IDSLink };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from "react";
|
|
2
2
|
import "@inera/ids-design/components/navigation/content/navigation-content.css";
|
|
3
3
|
export interface IDSNavigationContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
headline?: string;
|
|
5
5
|
maxHeight?: string;
|
|
6
|
-
children?: ReactNode;
|
|
7
6
|
}
|
|
8
|
-
export declare
|
|
7
|
+
export declare function IDSNavigationContent({ headline, maxHeight, className, children, ...props }: IDSNavigationContentProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,22 +1,15 @@
|
|
|
1
|
-
"use client";
|
|
2
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
2
|
import React from 'react';
|
|
4
3
|
import '@inera/ids-design/components/navigation/content/navigation-content.css';
|
|
5
4
|
import clsx from 'clsx';
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
const
|
|
6
|
+
function IDSNavigationContent({ headline = "", maxHeight = "", className, children, ...props }) {
|
|
7
|
+
const linkWrappers = React.Children.map(children, (link, i) => {
|
|
9
8
|
if (!React.isValidElement(link))
|
|
10
9
|
return link;
|
|
11
|
-
|
|
12
|
-
key: `navigation-content-link-${i}`,
|
|
13
|
-
block: true,
|
|
14
|
-
activeIcon: true,
|
|
15
|
-
noUnderline: true
|
|
16
|
-
});
|
|
17
|
-
return (jsx("div", { className: "ids-navigation-content__link-wrapper", children: cloned }, `link-wrapper-${i}`));
|
|
10
|
+
return (jsx("div", { className: "ids-navigation-content__link-wrapper", children: link }, i));
|
|
18
11
|
});
|
|
19
|
-
return (jsxs("div", { className: clsx("ids-navigation-content", { "ids-navigation-content--scrollable": maxHeight }, className), ...props, children: [jsx("div", { className: "ids-navigation-content__border-top", children: jsx("div", { className: "ids-navigation-content__border-top-content" }) }), jsxs("nav", { className: "ids-navigation-content__inner", "aria-labelledby": "content-navigation-headline", id: "content-navigation-inner", children: [jsx("h2", { className: "ids-navigation-content__inner__headline", id: "content-navigation-headline", children: headline }), jsx("div", { className: "ids-navigation-content__links", style: { maxHeight: maxHeight }, children:
|
|
20
|
-
}
|
|
12
|
+
return (jsxs("div", { className: clsx("ids-navigation-content", { "ids-navigation-content--scrollable": maxHeight }, className), ...props, children: [jsx("div", { className: "ids-navigation-content__border-top", children: jsx("div", { className: "ids-navigation-content__border-top-content" }) }), jsxs("nav", { className: "ids-navigation-content__inner", "aria-labelledby": "content-navigation-headline", id: "content-navigation-inner", children: [headline && (jsx("h2", { className: "ids-navigation-content__inner__headline", id: "content-navigation-headline", children: headline })), jsx("div", { className: "ids-navigation-content__links", style: { maxHeight: maxHeight || "auto" }, children: linkWrappers })] })] }));
|
|
13
|
+
}
|
|
21
14
|
|
|
22
15
|
export { IDSNavigationContent };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from "react";
|
|
2
2
|
import "@inera/ids-design/components/navigation/local/navigation-local.css";
|
|
3
3
|
export interface IDSNavigationLocalProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
headline?: string;
|
|
5
|
-
children?: ReactNode;
|
|
6
5
|
}
|
|
7
|
-
export declare
|
|
6
|
+
export declare function IDSNavigationLocal({ headline, className, children, ...props }: IDSNavigationLocalProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,8 +2,8 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import '@inera/ids-design/components/navigation/local/navigation-local.css';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
function IDSNavigationLocal({ headline = "", className, children, ...props }) {
|
|
6
6
|
return (jsxs("div", { className: clsx("ids-navigation-local", className), ...props, children: [jsx("h2", { className: "ids-navigation-local__headline", children: headline }), jsx("div", { className: "ids-navigation-local__links", children: children })] }));
|
|
7
|
-
}
|
|
7
|
+
}
|
|
8
8
|
|
|
9
9
|
export { IDSNavigationLocal };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from "react";
|
|
2
2
|
import "@inera/ids-design/components/notification-badge/notification-badge.css";
|
|
3
3
|
interface IDSNotificationBadgeProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
type?: "primary" | "secondary" | "neutral" | "info" | "attention" | "success" | "error";
|
|
5
5
|
icon?: string;
|
|
6
6
|
onClick?: () => void;
|
|
7
|
-
children?: ReactNode;
|
|
8
7
|
}
|
|
9
|
-
export declare
|
|
8
|
+
export declare function IDSNotificationBadge({ type, icon, onClick, className, children, ...props }: IDSNotificationBadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
10
9
|
export {};
|
|
@@ -2,8 +2,8 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import '@inera/ids-design/components/notification-badge/notification-badge.css';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
function IDSNotificationBadge({ type = "primary", icon = "", onClick, className, children, ...props }) {
|
|
6
6
|
return (jsxs("div", { className: clsx("ids-notification-badge", `ids-notification-badge--${type}`, className), onClick: onClick, ...props, children: [icon && jsx("span", { className: `ids-icon-${icon}` }), children] }));
|
|
7
|
-
}
|
|
7
|
+
}
|
|
8
8
|
|
|
9
9
|
export { IDSNotificationBadge };
|
|
@@ -5,7 +5,7 @@ export interface IDSDataPaginationProps extends React.HTMLAttributes<HTMLDivElem
|
|
|
5
5
|
from: number;
|
|
6
6
|
to: number;
|
|
7
7
|
of?: string;
|
|
8
|
-
total: number;
|
|
8
|
+
total: number | string;
|
|
9
9
|
defaultValue?: string;
|
|
10
10
|
selectId?: string;
|
|
11
11
|
light?: boolean;
|
|
@@ -15,6 +15,5 @@ export interface IDSDataPaginationProps extends React.HTMLAttributes<HTMLDivElem
|
|
|
15
15
|
nextButton?: ReactNode;
|
|
16
16
|
lastPageButton?: ReactNode;
|
|
17
17
|
onSelectChange?: (event: ChangeEvent<HTMLSelectElement>) => void;
|
|
18
|
-
children?: ReactNode;
|
|
19
18
|
}
|
|
20
19
|
export declare const IDSDataPagination: React.ForwardRefExoticComponent<IDSDataPaginationProps & React.RefAttributes<HTMLSelectElement>>;
|
|
@@ -16,4 +16,4 @@ export interface IDSListPaginationProps extends React.HTMLAttributes<HTMLDivElem
|
|
|
16
16
|
onPrevPage?: (page: number) => void;
|
|
17
17
|
onNextPage?: (page: number) => void;
|
|
18
18
|
}
|
|
19
|
-
export declare
|
|
19
|
+
export declare function IDSListPagination({ showing, from, to, of, total, current, pages, srCurrentPage, srGoToPage, srPrevious, srNext, onChangePage, onPrevPage, onNextPage, className, ...props }: IDSListPaginationProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
"use client";
|
|
2
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
2
|
import '@inera/ids-design/components/pagination/list-pagination/list-pagination.css';
|
|
4
3
|
import clsx from 'clsx';
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
function IDSListPagination({ showing = "Visar", from = 0, to = 0, of = "av", total = 0, current = 1, pages = 1, srCurrentPage = "Aktuell sida", srGoToPage = "Gå till sida", srPrevious = "Föregående sida", srNext = "Nästa sida", onChangePage, onPrevPage, onNextPage, className, ...props }) {
|
|
7
6
|
const renderSummary = () => {
|
|
8
7
|
if (from && to && total) {
|
|
9
8
|
return jsx("div", { className: "ids-list-pagination__summary", children: `${showing} ${from} - ${to} ${of} ${total}` });
|
|
@@ -44,6 +43,6 @@ const IDSListPagination = ({ showing = "Visar", from = 0, to = 0, of = "av", tot
|
|
|
44
43
|
return (jsx("nav", { children: jsx("ul", { className: "ids-list-pagination__list", children: buttonArray }) }));
|
|
45
44
|
};
|
|
46
45
|
return (jsxs("div", { className: clsx("ids-list-pagination", className), ...props, children: [renderSummary(), jsxs("div", { className: "ids-list-pagination__content", children: [jsx("div", { className: "ids-list-pagination__prev-button", children: renderPrevButton() }), jsx("div", { className: "ids-list-pagination__nav-buttons", children: renderButtons() }), jsx("div", { className: "ids-list-pagination__next-button", children: renderNextButton() })] })] }));
|
|
47
|
-
}
|
|
46
|
+
}
|
|
48
47
|
|
|
49
48
|
export { IDSListPagination };
|