@inera/ids-react 5.5.0 → 6.0.1
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 +14 -0
- package/components/accordion/accordion.js +83 -0
- package/components/agent/agent.d.ts +12 -5
- package/components/agent/agent.js +15 -12
- package/components/alert/alert.d.ts +21 -6
- package/components/alert/alert.js +19 -14
- package/components/alert-global/alert-global.d.ts +16 -5
- package/components/alert-global/alert-global.js +26 -13
- package/components/badge/badge.d.ts +9 -3
- package/components/badge/badge.js +5 -9
- package/components/breadcrumbs/breadcrumbs.d.ts +9 -5
- package/components/breadcrumbs/breadcrumbs.js +27 -16
- package/components/card/card.d.ts +13 -3
- package/components/card/card.js +11 -9
- package/components/date-label/date-label.d.ts +11 -3
- package/components/date-label/date-label.js +58 -9
- package/components/notification/badge/notification-badge.d.ts +8 -3
- package/components/notification/badge/notification-badge.js +5 -9
- package/components/progressbar/progressbar.d.ts +9 -3
- package/components/progressbar/progressbar.js +5 -9
- package/components/puff-list/puff-list-item/puff-list-info/puff-list-item-info.d.ts +3 -0
- package/components/puff-list/puff-list-item/puff-list-info/puff-list-item-info.js +12 -0
- package/components/puff-list/puff-list-item/puff-list-item.d.ts +3 -0
- package/components/puff-list/puff-list-item/puff-list-item.js +12 -0
- package/components/puff-list/puff-list.d.ts +3 -0
- package/components/puff-list/puff-list.js +12 -0
- package/components/tag/tag.d.ts +11 -6
- package/components/tag/tag.js +13 -13
- package/index.d.ts +5 -14
- package/index.js +6 -15
- package/package.json +4 -3
- package/components/expandable/expandable.d.ts +0 -6
- package/components/expandable/expandable.js +0 -16
- package/components/footer/footer.d.ts +0 -3
- package/components/footer/footer.js +0 -12
- package/components/header/avatar/header-avatar.d.ts +0 -5
- package/components/header/avatar/header-avatar.js +0 -15
- package/components/header/header.d.ts +0 -5
- package/components/header/header.js +0 -15
- package/components/header/item/header-item.d.ts +0 -2
- package/components/header/item/header-item.js +0 -11
- package/components/header/mobile-menu/header-mobile-menu.d.ts +0 -5
- package/components/header/mobile-menu/header-mobile-menu.js +0 -15
- package/components/header/navigation/item/nav-item.d.ts +0 -2
- package/components/header/navigation/item/nav-item.js +0 -11
- package/components/header/navigation/mobile-item/nav-mobile-item.d.ts +0 -2
- package/components/header/navigation/mobile-item/nav-mobile-item.js +0 -11
- package/components/header/navigation/navigation.d.ts +0 -2
- package/components/header/navigation/navigation.js +0 -11
- package/components/list/item/info/list-item-info.d.ts +0 -3
- package/components/list/item/info/list-item-info.js +0 -12
- package/components/list/item/list-item.d.ts +0 -3
- package/components/list/item/list-item.js +0 -12
- package/components/list/list.d.ts +0 -3
- package/components/list/list.js +0 -12
- package/components/mobile/menu/avatar/mobile-avatar.d.ts +0 -2
- package/components/mobile/menu/avatar/mobile-avatar.js +0 -11
- /package/components/form/{selectmultiple → select-multiple}/select-multiple.d.ts +0 -0
- /package/components/form/{selectmultiple → select-multiple}/select-multiple.js +0 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
import "@inera/ids-design/components/accordion/accordion.css";
|
|
3
|
+
interface IDSAccordionProps {
|
|
4
|
+
headline: ReactNode;
|
|
5
|
+
headlineSize?: "m" | "s" | "xs";
|
|
6
|
+
level?: 1 | 2;
|
|
7
|
+
expanded?: boolean;
|
|
8
|
+
lean?: boolean;
|
|
9
|
+
onCollapsed?: () => void;
|
|
10
|
+
onExpanded?: () => void;
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export declare const IDSAccordion: React.FC<IDSAccordionProps>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import React__default, { useState, useRef, useEffect } from 'react';
|
|
4
|
+
import clsx from 'clsx';
|
|
5
|
+
import '@inera/ids-design/components/accordion/accordion.css';
|
|
6
|
+
|
|
7
|
+
// TODO common function
|
|
8
|
+
const generateId = () => {
|
|
9
|
+
return `ids-${Math.random().toString(36).slice(2)}-${Math.random().toString(36).slice(2)}`;
|
|
10
|
+
};
|
|
11
|
+
const IDSAccordion = ({ headline = "", level = 1, headlineSize = level === 2 ? "s" : "m", expanded = false, lean = false, onCollapsed, onExpanded, children }) => {
|
|
12
|
+
const [isExpanded, setIsExpanded] = useState(expanded);
|
|
13
|
+
const [isLean, setIsLean] = useState(lean);
|
|
14
|
+
const [insideIDSCard, setInsideIDSCard] = useState(false);
|
|
15
|
+
const [hasChildren, setHasChildren] = useState(false);
|
|
16
|
+
const contentId = useRef(generateId());
|
|
17
|
+
const accordionRef = useRef(null);
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
handleChildren();
|
|
20
|
+
checkIfInsideIDSCard();
|
|
21
|
+
}, []);
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
setIsExpanded(expanded);
|
|
24
|
+
}, [expanded]);
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
setIsLean(insideIDSCard);
|
|
27
|
+
}, [insideIDSCard]);
|
|
28
|
+
const checkIfInsideIDSCard = () => {
|
|
29
|
+
if (accordionRef.current?.closest(".ids-card")) {
|
|
30
|
+
setInsideIDSCard(true);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
const handleChildren = () => {
|
|
34
|
+
const nestedAccordions = accordionRef.current?.querySelectorAll(".ids-accordion");
|
|
35
|
+
if (nestedAccordions && nestedAccordions.length > 0) {
|
|
36
|
+
setHasChildren(true);
|
|
37
|
+
nestedAccordions.forEach(acc => {
|
|
38
|
+
acc.setAttribute("level", "2");
|
|
39
|
+
if (headlineSize === "m") {
|
|
40
|
+
acc.setAttribute("headlineSize", "s");
|
|
41
|
+
}
|
|
42
|
+
else if (headlineSize === "s") {
|
|
43
|
+
acc.setAttribute("headlineSize", "xs");
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
const toggleExpansion = () => {
|
|
49
|
+
setIsExpanded(prev => !prev);
|
|
50
|
+
if (isExpanded) {
|
|
51
|
+
if (onCollapsed) {
|
|
52
|
+
onCollapsed();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
if (onExpanded) {
|
|
57
|
+
onExpanded();
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
const onKeyPress = (e) => {
|
|
62
|
+
if (e.key === " " || e.key === "Enter") {
|
|
63
|
+
e.preventDefault();
|
|
64
|
+
toggleExpansion();
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
return (jsxs("div", { ref: accordionRef, className: clsx("ids-accordion", {
|
|
68
|
+
"ids-accordion--expanded": isExpanded,
|
|
69
|
+
"ids-accordion--lean": lean || isLean,
|
|
70
|
+
"ids-accordion--has-children": hasChildren,
|
|
71
|
+
"ids-accordion--is-child": level === 2
|
|
72
|
+
}), children: [jsx("div", { className: `ids-accordion__button ids-accordion__button--${headlineSize}`, role: "button", tabIndex: 0, onClick: toggleExpansion, onKeyDown: onKeyPress, "aria-expanded": isExpanded, "aria-controls": contentId.current, children: jsx("div", { className: `ids-accordion__headline ids-accordion__headline-${level} ids-accordion__headline--${headlineSize} ${isExpanded ? "ids-accordion__headline--expanded" : ""} `, children: headline }) }), jsx("div", { "aria-hidden": !isExpanded, id: contentId.current, className: "ids-accordion__content", children: React__default.Children.map(children, child => {
|
|
73
|
+
if (React__default.isValidElement(child)) {
|
|
74
|
+
return React__default.cloneElement(child, {
|
|
75
|
+
level: 2,
|
|
76
|
+
headlineSize: headlineSize === "m" ? "s" : headlineSize === "s" ? "xs" : "xs"
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
return child;
|
|
80
|
+
}) })] }));
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
export { IDSAccordion };
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
interface IDSAgentProps {
|
|
3
|
+
showText?: string;
|
|
4
|
+
hideText?: string;
|
|
5
|
+
collapsed?: boolean;
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
actions?: ReactNode;
|
|
8
|
+
headline?: ReactNode;
|
|
9
|
+
onCollapsedChange?: (collapsed: boolean) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const IDSAgent: React.FC<IDSAgentProps>;
|
|
12
|
+
export {};
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import '
|
|
4
|
-
import {
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { useState, useEffect } from 'react';
|
|
4
|
+
import { IDSAlertGlobal } from '../alert-global/alert-global.js';
|
|
5
5
|
|
|
6
|
-
const IDSAgent =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
const IDSAgent = ({ showText = "Visa mer", hideText = "Visa mindre", collapsed = false, onCollapsedChange, children, actions, headline }) => {
|
|
7
|
+
const [isCollapsed, setIsCollapsed] = useState(collapsed);
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
setIsCollapsed(collapsed);
|
|
10
|
+
}, [collapsed]);
|
|
11
|
+
const handleToggleCollapse = () => {
|
|
12
|
+
setIsCollapsed(!isCollapsed);
|
|
13
|
+
onCollapsedChange?.(!isCollapsed);
|
|
14
|
+
};
|
|
15
|
+
return (jsx(IDSAlertGlobal, { showText: showText, hideText: hideText, collapsed: isCollapsed, agent: true, actions: actions, headline: headline, noRole: true, onCollapsedChange: handleToggleCollapse, children: children }));
|
|
16
|
+
};
|
|
14
17
|
|
|
15
18
|
export { IDSAgent };
|
|
@@ -1,6 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
import "@inera/ids-design/components/alert/alert.css";
|
|
3
|
+
interface IDSAlertProps {
|
|
4
|
+
collapsable?: boolean;
|
|
5
|
+
ribbon?: boolean;
|
|
6
|
+
collapsed?: boolean;
|
|
7
|
+
dismissible?: boolean;
|
|
8
|
+
headline?: ReactNode;
|
|
9
|
+
compact?: boolean;
|
|
10
|
+
type?: "info" | "attention" | "success" | "error";
|
|
11
|
+
srCloseText?: string;
|
|
12
|
+
srCollapseText?: string;
|
|
13
|
+
srExpandText?: string;
|
|
14
|
+
srIconTitle?: string;
|
|
15
|
+
noRole?: boolean;
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
onClose?: () => void;
|
|
18
|
+
onCollapsedChange?: (collapsed: boolean) => void;
|
|
19
|
+
}
|
|
20
|
+
export declare const IDSAlert: React.FC<IDSAlertProps>;
|
|
21
|
+
export {};
|
|
@@ -1,17 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import '
|
|
4
|
-
import
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
|
+
import { useState, useEffect } from 'react';
|
|
4
|
+
import '@inera/ids-design/components/alert/alert.css';
|
|
5
5
|
|
|
6
|
-
const IDSAlert =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
6
|
+
const IDSAlert = ({ collapsable = false, ribbon = false, collapsed = false, dismissible = false, headline, compact = false, type = "info", srCloseText = "Stäng alert", srCollapseText = "Minimera alertmeddelande", srExpandText = "Expandera alertmeddelande", noRole = false, srIconTitle = "", onClose, onCollapsedChange, children }) => {
|
|
7
|
+
const [isCollapsed, setIsCollapsed] = useState(collapsed);
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
setIsCollapsed(collapsed);
|
|
10
|
+
}, [collapsed]);
|
|
11
|
+
const handleToggleCollapse = () => {
|
|
12
|
+
const newCollapsedState = !isCollapsed;
|
|
13
|
+
setIsCollapsed(newCollapsedState);
|
|
14
|
+
onCollapsedChange?.(newCollapsedState);
|
|
15
|
+
};
|
|
16
|
+
const handleClose = () => {
|
|
17
|
+
onClose?.();
|
|
18
|
+
};
|
|
19
|
+
return (jsx("div", { className: `ids-alert ids-alert--${type} ${compact ? "ids-alert--compact" : ""} ${ribbon ? "ids-alert--ribbon" : ""} ${isCollapsed ? "ids-alert--collapsed" : ""}`, role: !noRole ? "alert" : undefined, children: compact || ribbon ? (jsxs(Fragment, { children: [jsxs("div", { className: "ids-alert__content", children: [jsx("span", { className: "ids-alert__content-icon", title: srIconTitle }), jsx("span", { className: "ids-alert__content-text", children: children })] }), dismissible && (jsx("button", { className: "ids-alert__close", onClick: handleClose, "aria-label": srCloseText }))] })) : (jsxs(Fragment, { children: [jsxs("div", { className: "ids-alert__header", children: [jsxs("div", { className: "ids-alert__icon_and_text", children: [jsx("span", { className: "ids-alert__state-icon", title: srIconTitle }), jsx("div", { className: "ids-alert__headline", children: headline })] }), dismissible && (jsx("button", { className: "ids-alert__close", onClick: handleClose, "aria-label": srCloseText })), collapsable && !compact && !ribbon && (jsx("button", { className: `ids-alert__expand ${!isCollapsed ? "ids-alert__expand--expanded" : ""}`, onClick: handleToggleCollapse, "aria-expanded": !isCollapsed, "aria-label": isCollapsed ? srExpandText : srCollapseText }))] }), !isCollapsed && jsx("div", { className: "ids-alert__content", children: children })] })) }));
|
|
20
|
+
};
|
|
16
21
|
|
|
17
22
|
export { IDSAlert };
|
|
@@ -1,5 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
import "@inera/ids-design/components/alert-global/alert-global.css";
|
|
3
|
+
interface IDSAlertGlobalProps {
|
|
4
|
+
agent?: boolean;
|
|
5
|
+
showText?: string;
|
|
6
|
+
hideText?: string;
|
|
7
|
+
collapsed?: boolean;
|
|
8
|
+
noRole?: boolean;
|
|
9
|
+
onCollapsedChange?: (collapsed: boolean) => void;
|
|
10
|
+
icon?: ReactNode;
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
actions?: ReactNode;
|
|
13
|
+
headline?: ReactNode;
|
|
14
|
+
}
|
|
15
|
+
export declare const IDSAlertGlobal: React.FC<IDSAlertGlobalProps>;
|
|
16
|
+
export {};
|
|
@@ -1,16 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import '
|
|
4
|
-
import
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import { useState, useEffect } from 'react';
|
|
4
|
+
import '@inera/ids-design/components/alert-global/alert-global.css';
|
|
5
|
+
import clsx from 'clsx';
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
});
|
|
7
|
+
// TODO common function
|
|
8
|
+
const generateId = () => {
|
|
9
|
+
return `ids-${Math.random().toString(36).slice(2)}-${Math.random().toString(36).slice(2)}`;
|
|
10
|
+
};
|
|
11
|
+
const IDSAlertGlobal = ({ agent = false, showText = "Visa meddelande", hideText = "Dölj meddelande", collapsed = false, noRole = false, onCollapsedChange, icon, children, actions, headline }) => {
|
|
12
|
+
const [isCollapsed, setIsCollapsed] = useState(collapsed);
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
setIsCollapsed(collapsed);
|
|
15
|
+
}, [collapsed]);
|
|
16
|
+
const handleToggleCollapse = () => {
|
|
17
|
+
setIsCollapsed(!isCollapsed);
|
|
18
|
+
onCollapsedChange?.(!isCollapsed);
|
|
19
|
+
};
|
|
20
|
+
const contentId = generateId();
|
|
21
|
+
return (jsx("div", { role: noRole ? null : "alert", className: clsx("ids-alert-global", {
|
|
22
|
+
"ids-alert-global--collapsed": isCollapsed,
|
|
23
|
+
"ids-alert-global--agent": agent
|
|
24
|
+
}), children: jsxs("div", { className: "ids-alert-global__inner", children: [jsxs("div", { className: "ids-alert-global__header", children: [jsxs("div", { className: `ids-alert-global__icon-headline ${agent ? "ids-alert-global__icon-headline--agent" : ""}`, children: [icon && jsx("div", { className: "ids-alert-global__icon", children: icon }), jsx("div", { className: "ids-alert-global__headline", children: headline })] }), jsx("button", { className: clsx("ids-alert-global__button", {
|
|
25
|
+
"ids-alert-global__button--expanded": !isCollapsed
|
|
26
|
+
}), "aria-controls": contentId, "aria-label": isCollapsed ? showText : hideText, "aria-expanded": !isCollapsed, onClick: handleToggleCollapse, children: jsx("span", { className: "ids-alert-global__button-text", children: !isCollapsed ? hideText : showText }) })] }), jsx("div", { id: contentId, className: "ids-alert-global__content", children: children }), jsx("div", { className: "ids-alert-global__sub-content", children: actions })] }) }));
|
|
27
|
+
};
|
|
15
28
|
|
|
16
29
|
export { IDSAlertGlobal };
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
import "@inera/ids-design/components/badge/badge.css";
|
|
3
|
+
interface IDSBadgeProps {
|
|
4
|
+
type?: "primary" | "neutral" | "info" | "attention" | "success" | "error" | "secondary";
|
|
5
|
+
icon?: ReactNode;
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare const IDSBadge: React.FC<IDSBadgeProps>;
|
|
9
|
+
export {};
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import '@inera/ids-
|
|
3
|
-
import { IDSBadge as IDSBadge$1 } from '@inera/ids-core/components/badge/badge-element.js';
|
|
4
|
-
import { createComponent } from '@lit-labs/react';
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import '@inera/ids-design/components/badge/badge.css';
|
|
5
3
|
|
|
6
|
-
const IDSBadge =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
react: React,
|
|
10
|
-
});
|
|
4
|
+
const IDSBadge = ({ type = "primary", icon, children }) => {
|
|
5
|
+
return (jsxs("div", { className: `ids-badge ids-badge--${type}`, children: [icon && jsx("div", { className: "ids-badge__icon", children: icon }), children] }));
|
|
6
|
+
};
|
|
11
7
|
|
|
12
8
|
export { IDSBadge };
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
import "@inera/ids-design/components/breadcrumbs/breadcrumbs.css";
|
|
3
|
+
interface IDSBreadcrumbsProps {
|
|
4
|
+
lead?: string;
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
mobileLink?: React.ReactElement<React.AnchorHTMLAttributes<HTMLAnchorElement> | React.LinkHTMLAttributes<HTMLLinkElement>>;
|
|
7
|
+
}
|
|
8
|
+
export declare const IDSBreadcrumbs: React.FC<IDSBreadcrumbsProps>;
|
|
9
|
+
export {};
|
|
@@ -1,18 +1,29 @@
|
|
|
1
|
-
import
|
|
2
|
-
import '
|
|
3
|
-
import
|
|
4
|
-
import { IDSCrumb as IDSCrumb$1 } from '@inera/ids-core/components/breadcrumbs/crumb/crumb-element.js';
|
|
5
|
-
import { createComponent } from '@lit-labs/react';
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import '@inera/ids-design/components/breadcrumbs/breadcrumbs.css';
|
|
6
4
|
|
|
7
|
-
const IDSBreadcrumbs =
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
5
|
+
const IDSBreadcrumbs = ({ lead = "Du är här", mobileLink, children }) => {
|
|
6
|
+
const getMobileLink = () => {
|
|
7
|
+
if (mobileLink) {
|
|
8
|
+
return React__default.cloneElement(mobileLink, { className: "ids-breadcrumbs__mobile-link" });
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
const getLinks = () => {
|
|
15
|
+
const links = React__default.Children.toArray(children);
|
|
16
|
+
return links.flatMap((child, index) => {
|
|
17
|
+
const isLast = index === links.length - 1;
|
|
18
|
+
if (isLast) {
|
|
19
|
+
return (jsx("li", { className: "ids-breadcrumbs__crumb ids-breadcrumbs__crumb--current", children: child }, index));
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
return (jsxs("li", { className: "ids-breadcrumbs__crumb", children: [child, jsx("span", { className: "ids-breadcrumbs__crumb__separator", "aria-hidden": "true", children: "/" })] }, index));
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
return (jsxs("nav", { className: "ids-breadcrumbs", "aria-label": lead, children: [jsxs("ol", { className: "ids-breadcrumbs__desktop", children: [jsx("li", { className: "ids-breadcrumbs__lead", children: lead }), getLinks()] }), jsx("ol", { className: "ids-breadcrumbs__mobile", children: jsxs("li", { className: "ids-breadcrumbs__mobile-links", children: [jsx("span", { className: "ids-breadcrumbs__icon" }), getMobileLink()] }) })] }));
|
|
27
|
+
};
|
|
17
28
|
|
|
18
|
-
export { IDSBreadcrumbs
|
|
29
|
+
export { IDSBreadcrumbs };
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
import "@inera/ids-design/components/card/card.css";
|
|
3
|
+
interface IDSCardProps {
|
|
4
|
+
fill?: number;
|
|
5
|
+
borderTop?: number;
|
|
6
|
+
lean?: boolean;
|
|
7
|
+
hideOnM?: boolean;
|
|
8
|
+
hideOnS?: boolean;
|
|
9
|
+
interactive?: boolean;
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export declare const IDSCard: React.FC<IDSCardProps>;
|
|
13
|
+
export {};
|
package/components/card/card.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import '@inera/ids-
|
|
3
|
-
import { IDSCard as IDSCard$1 } from '@inera/ids-core/components/card/card-element.js';
|
|
4
|
-
import { createComponent } from '@lit-labs/react';
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import '@inera/ids-design/components/card/card.css';
|
|
5
3
|
|
|
6
|
-
const IDSCard =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
4
|
+
const IDSCard = ({ fill = 0, borderTop = 0, lean = false, hideOnM = false, hideOnS = false, interactive = false, children }) => {
|
|
5
|
+
return (jsxs("div", { className: `ids-card
|
|
6
|
+
${hideOnM ? "ids-card--hide-on-m" : ""}
|
|
7
|
+
${hideOnS ? "ids-card--hide-on-s" : ""}
|
|
8
|
+
${fill > 0 && !borderTop ? `ids-card--fill-${fill}` : ""}
|
|
9
|
+
${borderTop ? `ids-card--border-top-${borderTop}` : ""}
|
|
10
|
+
${lean ? "ids-card--lean" : ""}
|
|
11
|
+
${interactive ? "ids-card--interactive" : ""}`.trim(), children: [borderTop > 0 && fill === 0 && jsx("div", { className: "ids-card__border-top" }), jsx("div", { className: "ids-card__content", children: children })] }));
|
|
12
|
+
};
|
|
11
13
|
|
|
12
14
|
export { IDSCard };
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "@inera/ids-design/components/date-label/date-label.css";
|
|
3
|
+
interface IDSDateLabelProps {
|
|
4
|
+
date?: Date | null;
|
|
5
|
+
year?: number;
|
|
6
|
+
month?: number;
|
|
7
|
+
monthLabel?: string;
|
|
8
|
+
day?: number;
|
|
9
|
+
}
|
|
10
|
+
export declare const IDSDateLabel: React.FC<IDSDateLabelProps>;
|
|
11
|
+
export {};
|
|
@@ -1,12 +1,61 @@
|
|
|
1
|
-
|
|
2
|
-
import '
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { useState, useEffect } from 'react';
|
|
4
|
+
import '@inera/ids-design/components/date-label/date-label.css';
|
|
5
5
|
|
|
6
|
-
const IDSDateLabel =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
const IDSDateLabel = ({ date = null, year = 0, month = 0, monthLabel = "", day = 0 }) => {
|
|
7
|
+
const [presentedDate, setPresentedDate] = useState(null);
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
if (date) {
|
|
10
|
+
setPresentedDate(new Date(date));
|
|
11
|
+
}
|
|
12
|
+
}, [date]);
|
|
13
|
+
const getYear = () => (presentedDate ? presentedDate.getFullYear() : year);
|
|
14
|
+
const getMonth = () => (presentedDate ? presentedDate.getMonth() + 1 : month);
|
|
15
|
+
const getDay = () => {
|
|
16
|
+
const dayNumber = presentedDate ? presentedDate.getDate() : day;
|
|
17
|
+
return getDayAsText(dayNumber);
|
|
18
|
+
};
|
|
19
|
+
const getMonthText = () => (monthLabel ? monthLabel : getMonthAsSweText(getMonth() - 1, 3));
|
|
20
|
+
const getDayAsText = (day) => {
|
|
21
|
+
if (day > 0) {
|
|
22
|
+
return day < 10 ? "0" + day : "" + day;
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
return "";
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
const getMonthAsSweText = (date, letters) => {
|
|
29
|
+
switch (date) {
|
|
30
|
+
case 0:
|
|
31
|
+
return "Januari".substring(0, letters);
|
|
32
|
+
case 1:
|
|
33
|
+
return "Februari".substring(0, letters);
|
|
34
|
+
case 2:
|
|
35
|
+
return "Mars".substring(0, letters);
|
|
36
|
+
case 3:
|
|
37
|
+
return "April".substring(0, letters);
|
|
38
|
+
case 4:
|
|
39
|
+
return "Maj".substring(0, letters);
|
|
40
|
+
case 5:
|
|
41
|
+
return "Juni".substring(0, letters);
|
|
42
|
+
case 6:
|
|
43
|
+
return "Juli".substring(0, letters);
|
|
44
|
+
case 7:
|
|
45
|
+
return "Augusti".substring(0, letters);
|
|
46
|
+
case 8:
|
|
47
|
+
return "September".substring(0, letters);
|
|
48
|
+
case 9:
|
|
49
|
+
return "Oktober".substring(0, letters);
|
|
50
|
+
case 10:
|
|
51
|
+
return "November".substring(0, letters);
|
|
52
|
+
case 11:
|
|
53
|
+
return "December".substring(0, letters);
|
|
54
|
+
default:
|
|
55
|
+
return "";
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
return (jsxs("time", { className: "ids-date-label", dateTime: `${getDay()}-${getMonth().toString().padStart(2, "0")}-${getYear()}`, children: [jsx("span", { className: "ids-date-label__day", children: getDay() }), jsx("span", { className: "ids-date-label__month", children: getMonthText() }), jsx("span", { className: "ids-date-label__year", children: getYear() })] }));
|
|
59
|
+
};
|
|
11
60
|
|
|
12
61
|
export { IDSDateLabel };
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
import "@inera/ids-design/components/notification-badge/notification-badge.css";
|
|
3
|
+
interface IDSNotificationBadgeProps {
|
|
4
|
+
outlined?: boolean;
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare const IDSNotificationBadge: React.FC<IDSNotificationBadgeProps>;
|
|
8
|
+
export {};
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import '@inera/ids-
|
|
3
|
-
import { IDSNotificationBadge as IDSNotificationBadge$1 } from '@inera/ids-core/components/notification/badge/notification-badge-element.js';
|
|
4
|
-
import { createComponent } from '@lit-labs/react';
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import '@inera/ids-design/components/notification-badge/notification-badge.css';
|
|
5
3
|
|
|
6
|
-
const IDSNotificationBadge =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
react: React
|
|
10
|
-
});
|
|
4
|
+
const IDSNotificationBadge = ({ outlined = false, children }) => {
|
|
5
|
+
return (jsx("div", { className: "ids-notification-badge" + (outlined ? " ids-notification-badge--outlined" : ""), children: children }));
|
|
6
|
+
};
|
|
11
7
|
|
|
12
8
|
export { IDSNotificationBadge };
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "@inera/ids-design/components/progressbar/progressbar.css";
|
|
3
|
+
interface IDSProgressbarProps {
|
|
4
|
+
hideLabel?: boolean;
|
|
5
|
+
value?: number;
|
|
6
|
+
srLabel: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const IDSProgressbar: React.FC<IDSProgressbarProps>;
|
|
9
|
+
export {};
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import '@inera/ids-core/components/progressbar/register.js';
|
|
4
|
-
import { IDSProgressbar as IDSProgressbar$1 } from '@inera/ids-core/components/progressbar/progressbar-element.js';
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import '@inera/ids-design/components/progressbar/progressbar.css';
|
|
5
3
|
|
|
6
|
-
const IDSProgressbar =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
react: React
|
|
10
|
-
});
|
|
4
|
+
const IDSProgressbar = ({ hideLabel = false, value = 0, srLabel = "" }) => {
|
|
5
|
+
return (jsxs("div", { className: "ids-progressbar", role: "progressbar", "aria-label": srLabel, "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": value, children: [value > 0 ? (jsx("div", { className: "ids-progressbar__progress", style: { width: `calc(${value}% + 2px)` } })) : null, hideLabel ? null : jsxs("div", { className: "ids-progressbar__label", children: [value, "%"] })] }));
|
|
6
|
+
};
|
|
11
7
|
|
|
12
8
|
export { IDSProgressbar };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import '@inera/ids-core/components/puff-list/register.js';
|
|
2
|
+
import { IDSPuffListItemInfo as PuffListItemInfo } from '@inera/ids-core/components/puff-list/puff-list-item/puff-list-info/puff-list-item-info-element.js';
|
|
3
|
+
export declare const IDSPuffListItemInfo: import("@lit-labs/react").ReactWebComponent<PuffListItemInfo, {}>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import '@inera/ids-core/components/puff-list/register.js';
|
|
3
|
+
import { IDSPuffListItemInfo as IDSPuffListItemInfo$1 } from '@inera/ids-core/components/puff-list/puff-list-item/puff-list-info/puff-list-item-info-element.js';
|
|
4
|
+
import { createComponent } from '@lit-labs/react';
|
|
5
|
+
|
|
6
|
+
const IDSPuffListItemInfo = createComponent({
|
|
7
|
+
tagName: 'ids-puff-list-item-info',
|
|
8
|
+
elementClass: IDSPuffListItemInfo$1,
|
|
9
|
+
react: React,
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export { IDSPuffListItemInfo };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import '@inera/ids-core/components/puff-list/register.js';
|
|
2
|
+
import { IDSPuffListItem as PuffListItem } from '@inera/ids-core/components/puff-list/puff-list-item/puff-list-item-element.js';
|
|
3
|
+
export declare const IDSPuffListItem: import("@lit-labs/react").ReactWebComponent<PuffListItem, {}>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import '@inera/ids-core/components/puff-list/register.js';
|
|
3
|
+
import { IDSPuffListItem as IDSPuffListItem$1 } from '@inera/ids-core/components/puff-list/puff-list-item/puff-list-item-element.js';
|
|
4
|
+
import { createComponent } from '@lit-labs/react';
|
|
5
|
+
|
|
6
|
+
const IDSPuffListItem = createComponent({
|
|
7
|
+
tagName: 'ids-puff-list-item',
|
|
8
|
+
elementClass: IDSPuffListItem$1,
|
|
9
|
+
react: React,
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export { IDSPuffListItem };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import '@inera/ids-core/components/puff-list/register.js';
|
|
3
|
+
import { IDSPuffList as IDSPuffList$1 } from '@inera/ids-core/components/puff-list/puff-list-element.js';
|
|
4
|
+
import { createComponent } from '@lit-labs/react';
|
|
5
|
+
|
|
6
|
+
const IDSPuffList = createComponent({
|
|
7
|
+
tagName: 'ids-puff-list',
|
|
8
|
+
elementClass: IDSPuffList$1,
|
|
9
|
+
react: React,
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export { IDSPuffList };
|
package/components/tag/tag.d.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "@inera/ids-design/components/tag/tag.css";
|
|
3
|
+
type IDSTagProps = {
|
|
4
|
+
closeable?: boolean;
|
|
5
|
+
srCloseLabel?: string;
|
|
6
|
+
onClose?: () => void;
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
clickable?: React.ReactElement<any>;
|
|
9
|
+
};
|
|
10
|
+
export declare const IDSTag: React.FC<IDSTagProps>;
|
|
11
|
+
export {};
|
package/components/tag/tag.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
import '
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import React__default from 'react';
|
|
4
|
+
import '@inera/ids-design/components/tag/tag.css';
|
|
5
5
|
|
|
6
|
-
const IDSTag =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
6
|
+
const IDSTag = ({ closeable = false, srCloseLabel = "", onClose, children, clickable }) => {
|
|
7
|
+
return (jsx(Fragment, { children: clickable ? (React__default.cloneElement(clickable, {
|
|
8
|
+
className: `${clickable.props.className || ""} ids-tag ids-tag--clickable`
|
|
9
|
+
})) : (jsxs("span", { className: `${clickable ? "" : "ids-tag"}`, children: [jsx("div", { className: "ids-tag__content", children: children }), closeable && !clickable && (jsx("button", { className: "ids-tag__close-btn", "aria-label": srCloseLabel, onClick: e => {
|
|
10
|
+
e.stopPropagation();
|
|
11
|
+
if (onClose)
|
|
12
|
+
onClose();
|
|
13
|
+
} }))] })) }));
|
|
14
|
+
};
|
|
15
15
|
|
|
16
16
|
export { IDSTag };
|
package/index.d.ts
CHANGED
|
@@ -7,39 +7,30 @@ export * from "./components/form/radio/radio-group";
|
|
|
7
7
|
export * from "./components/form/textarea/textarea";
|
|
8
8
|
export * from "./components/form/range/range";
|
|
9
9
|
export * from "./components/form/select/select";
|
|
10
|
-
export * from "./components/form/
|
|
10
|
+
export * from "./components/form/select-multiple/select-multiple";
|
|
11
11
|
export * from "./components/form/errormessage/error-message";
|
|
12
12
|
export * from "./components/form/time/time";
|
|
13
13
|
export * from "./components/form/spinner/spinner";
|
|
14
14
|
export * from "./components/button/button";
|
|
15
15
|
export * from "./components/button-group/button-group";
|
|
16
16
|
export * from "./components/grid/grid";
|
|
17
|
+
export * from "./components/accordion/accordion";
|
|
17
18
|
export * from "./components/alert/alert";
|
|
18
19
|
export * from "./components/alert-global/alert-global";
|
|
19
|
-
export * from "./components/header/header";
|
|
20
|
-
export * from "./components/header/item/header-item";
|
|
21
|
-
export * from "./components/header/avatar/header-avatar";
|
|
22
|
-
export * from "./components/header/navigation/navigation";
|
|
23
|
-
export * from "./components/header/navigation/item/nav-item";
|
|
24
|
-
export * from "./components/header/navigation/mobile-item/nav-mobile-item";
|
|
25
|
-
export * from "./components/header/mobile-menu/header-mobile-menu";
|
|
26
|
-
export * from "./components/mobile/menu/avatar/mobile-avatar";
|
|
27
20
|
export * from "./components/mobile/menu/item/mobile-item";
|
|
28
21
|
export * from "./components/mobile/menu/mobile-menu";
|
|
29
22
|
export * from "./components/link/link";
|
|
30
|
-
export * from "./components/footer/footer";
|
|
31
23
|
export * from "./components/notification/badge/notification-badge";
|
|
32
24
|
export * from "./components/tabs/tabs";
|
|
33
|
-
export * from "./components/list/list";
|
|
34
|
-
export * from "./components/list/item/list-item";
|
|
35
|
-
export * from "./components/list/item/info/list-item-info";
|
|
25
|
+
export * from "./components/puff-list/puff-list";
|
|
26
|
+
export * from "./components/puff-list/puff-list-item/puff-list-item";
|
|
27
|
+
export * from "./components/puff-list/puff-list-item/puff-list-info/puff-list-item-info";
|
|
36
28
|
export * from "./components/date-label/date-label";
|
|
37
29
|
export * from "./components/breadcrumbs/breadcrumbs";
|
|
38
30
|
export * from "./components/dialog/dialog";
|
|
39
31
|
export * from "./components/dropdown/dropdown";
|
|
40
32
|
export * from "./components/card/card";
|
|
41
33
|
export * from "./components/agent/agent";
|
|
42
|
-
export * from "./components/expandable/expandable";
|
|
43
34
|
export * from "./components/popover/popover";
|
|
44
35
|
export * from "./components/progressbar/progressbar";
|
|
45
36
|
export * from "./components/badge/badge";
|
package/index.js
CHANGED
|
@@ -7,39 +7,30 @@ export { IDSRadioGroup } from './components/form/radio/radio-group.js';
|
|
|
7
7
|
export { IDSTextarea } from './components/form/textarea/textarea.js';
|
|
8
8
|
export { IDSRange } from './components/form/range/range.js';
|
|
9
9
|
export { IDSSelect } from './components/form/select/select.js';
|
|
10
|
-
export { IDSSelectMultiple } from './components/form/
|
|
10
|
+
export { IDSSelectMultiple } from './components/form/select-multiple/select-multiple.js';
|
|
11
11
|
export { IDSErrorMessage } from './components/form/errormessage/error-message.js';
|
|
12
12
|
export { IDSTime } from './components/form/time/time.js';
|
|
13
13
|
export { IDSSpinner } from './components/form/spinner/spinner.js';
|
|
14
14
|
export { IDSButton } from './components/button/button.js';
|
|
15
15
|
export { IDSButtonGroup } from './components/button-group/button-group.js';
|
|
16
16
|
export { IDSCol, IDSContainer, IDSRow } from './components/grid/grid.js';
|
|
17
|
+
export { IDSAccordion } from './components/accordion/accordion.js';
|
|
17
18
|
export { IDSAlert } from './components/alert/alert.js';
|
|
18
19
|
export { IDSAlertGlobal } from './components/alert-global/alert-global.js';
|
|
19
|
-
export { IDSHeader } from './components/header/header.js';
|
|
20
|
-
export { IDSHeaderItem } from './components/header/item/header-item.js';
|
|
21
|
-
export { IDSHeaderAvatar } from './components/header/avatar/header-avatar.js';
|
|
22
|
-
export { IDSHeaderNav } from './components/header/navigation/navigation.js';
|
|
23
|
-
export { IDSHeaderNavItem } from './components/header/navigation/item/nav-item.js';
|
|
24
|
-
export { IDSHeaderMobileItem } from './components/header/navigation/mobile-item/nav-mobile-item.js';
|
|
25
|
-
export { IDSHeaderMobileMenu } from './components/header/mobile-menu/header-mobile-menu.js';
|
|
26
|
-
export { IDSMobileMenuAvatar } from './components/mobile/menu/avatar/mobile-avatar.js';
|
|
27
20
|
export { IDSMobileMenuItem } from './components/mobile/menu/item/mobile-item.js';
|
|
28
21
|
export { IDSMobileMenu } from './components/mobile/menu/mobile-menu.js';
|
|
29
22
|
export { IDSLink } from './components/link/link.js';
|
|
30
|
-
export { IDSFooter } from './components/footer/footer.js';
|
|
31
23
|
export { IDSNotificationBadge } from './components/notification/badge/notification-badge.js';
|
|
32
24
|
export { IDSTab, IDSTabPanel, IDSTabs } from './components/tabs/tabs.js';
|
|
33
|
-
export {
|
|
34
|
-
export {
|
|
35
|
-
export {
|
|
25
|
+
export { IDSPuffList } from './components/puff-list/puff-list.js';
|
|
26
|
+
export { IDSPuffListItem } from './components/puff-list/puff-list-item/puff-list-item.js';
|
|
27
|
+
export { IDSPuffListItemInfo } from './components/puff-list/puff-list-item/puff-list-info/puff-list-item-info.js';
|
|
36
28
|
export { IDSDateLabel } from './components/date-label/date-label.js';
|
|
37
|
-
export { IDSBreadcrumbs
|
|
29
|
+
export { IDSBreadcrumbs } from './components/breadcrumbs/breadcrumbs.js';
|
|
38
30
|
export { IDSDialog } from './components/dialog/dialog.js';
|
|
39
31
|
export { IDSDropdown, IDSDropdownContent } from './components/dropdown/dropdown.js';
|
|
40
32
|
export { IDSCard } from './components/card/card.js';
|
|
41
33
|
export { IDSAgent } from './components/agent/agent.js';
|
|
42
|
-
export { IDSExpandable } from './components/expandable/expandable.js';
|
|
43
34
|
export { IDSPopover, IDSPopoverContent } from './components/popover/popover.js';
|
|
44
35
|
export { IDSProgressbar } from './components/progressbar/progressbar.js';
|
|
45
36
|
export { IDSBadge } from './components/badge/badge.js';
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inera/ids-react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"react": "*"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@inera/ids-core": "
|
|
10
|
-
"@lit-labs/react": "^1.1.0"
|
|
9
|
+
"@inera/ids-core": "6.0.x",
|
|
10
|
+
"@lit-labs/react": "^1.1.0",
|
|
11
|
+
"clsx": "*"
|
|
11
12
|
},
|
|
12
13
|
"types": "index.d.ts",
|
|
13
14
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import '@inera/ids-core/components/expandable/register.js';
|
|
2
|
-
import { IDSExpandable as Expandable } from '@inera/ids-core/components/expandable/expandable-element.js';
|
|
3
|
-
export declare const IDSExpandable: import("@lit-labs/react").ReactWebComponent<Expandable, {
|
|
4
|
-
onClosed: string;
|
|
5
|
-
onExpanded: string;
|
|
6
|
-
}>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { createComponent } from '@lit-labs/react';
|
|
3
|
-
import '@inera/ids-core/components/expandable/register.js';
|
|
4
|
-
import { IDSExpandable as IDSExpandable$1 } from '@inera/ids-core/components/expandable/expandable-element.js';
|
|
5
|
-
|
|
6
|
-
const IDSExpandable = createComponent({
|
|
7
|
-
tagName: 'ids-expandable',
|
|
8
|
-
elementClass: IDSExpandable$1,
|
|
9
|
-
react: React,
|
|
10
|
-
events: {
|
|
11
|
-
onClosed: 'closed',
|
|
12
|
-
onExpanded: 'expanded'
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
export { IDSExpandable };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { createComponent } from '@lit-labs/react';
|
|
3
|
-
import '@inera/ids-core/components/footer/register.js';
|
|
4
|
-
import { IDSFooter as IDSFooter$1 } from '@inera/ids-core/components/footer/footer-element.js';
|
|
5
|
-
|
|
6
|
-
const IDSFooter = createComponent({
|
|
7
|
-
tagName: 'ids-footer',
|
|
8
|
-
elementClass: IDSFooter$1,
|
|
9
|
-
react: React,
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
export { IDSFooter };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { IDSHeaderAvatar as IDSHeaderAvatar$1 } from '@inera/ids-core/components/header/avatar/header-avatar-element.js';
|
|
3
|
-
import { createComponent } from '@lit-labs/react';
|
|
4
|
-
|
|
5
|
-
const IDSHeaderAvatar = createComponent({
|
|
6
|
-
tagName: 'ids-header-avatar',
|
|
7
|
-
elementClass: IDSHeaderAvatar$1,
|
|
8
|
-
react: React,
|
|
9
|
-
events: {
|
|
10
|
-
onClosed: 'closed',
|
|
11
|
-
onExpanded: 'expanded'
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
export { IDSHeaderAvatar };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import '@inera/ids-core/components/header/register.js';
|
|
3
|
-
import { IDSHeader as IDSHeader$1 } from '@inera/ids-core/components/header/header-element.js';
|
|
4
|
-
import { createComponent } from '@lit-labs/react';
|
|
5
|
-
|
|
6
|
-
const IDSHeader = createComponent({
|
|
7
|
-
tagName: 'ids-header',
|
|
8
|
-
elementClass: IDSHeader$1,
|
|
9
|
-
react: React,
|
|
10
|
-
events: {
|
|
11
|
-
onDidToggleRegion: 'didToggleRegion'
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
export { IDSHeader };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { IDSHeaderItem as IDSHeaderItem$1 } from '@inera/ids-core/components/header/item/header-item-element.js';
|
|
3
|
-
import { createComponent } from '@lit-labs/react';
|
|
4
|
-
|
|
5
|
-
const IDSHeaderItem = createComponent({
|
|
6
|
-
tagName: 'ids-header-item',
|
|
7
|
-
elementClass: IDSHeaderItem$1,
|
|
8
|
-
react: React,
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
export { IDSHeaderItem };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { IDSHeaderMobileMenu as HeaderMobileMenu } from '@inera/ids-core/components/header/mobile-menu/header-mobile-menu-element.js';
|
|
2
|
-
export declare const IDSHeaderMobileMenu: import("@lit-labs/react").ReactWebComponent<HeaderMobileMenu, {
|
|
3
|
-
onClosed: string;
|
|
4
|
-
onExpanded: string;
|
|
5
|
-
}>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { IDSHeaderMobileMenu as IDSHeaderMobileMenu$1 } from '@inera/ids-core/components/header/mobile-menu/header-mobile-menu-element.js';
|
|
3
|
-
import { createComponent } from '@lit-labs/react';
|
|
4
|
-
|
|
5
|
-
const IDSHeaderMobileMenu = createComponent({
|
|
6
|
-
tagName: 'ids-header-mobile-menu',
|
|
7
|
-
elementClass: IDSHeaderMobileMenu$1,
|
|
8
|
-
react: React,
|
|
9
|
-
events: {
|
|
10
|
-
onClosed: 'closed',
|
|
11
|
-
onExpanded: 'expanded'
|
|
12
|
-
},
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
export { IDSHeaderMobileMenu };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { IDSHeaderNavItem as IDSHeaderNavItem$1 } from '@inera/ids-core/components/header/navigation/item/navigation-item-element.js';
|
|
3
|
-
import { createComponent } from '@lit-labs/react';
|
|
4
|
-
|
|
5
|
-
const IDSHeaderNavItem = createComponent({
|
|
6
|
-
tagName: 'ids-header-nav-item',
|
|
7
|
-
elementClass: IDSHeaderNavItem$1,
|
|
8
|
-
react: React,
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
export { IDSHeaderNavItem };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { IDSHeaderMobileItem as IDSHeaderMobileItem$1 } from '@inera/ids-core/components/header/navigation/mobile-item/mobile-item-element.js';
|
|
3
|
-
import { createComponent } from '@lit-labs/react';
|
|
4
|
-
|
|
5
|
-
const IDSHeaderMobileItem = createComponent({
|
|
6
|
-
tagName: 'ids-header-mobile-item',
|
|
7
|
-
elementClass: IDSHeaderMobileItem$1,
|
|
8
|
-
react: React,
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
export { IDSHeaderMobileItem };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { IDSHeaderNav as IDSHeaderNav$1 } from '@inera/ids-core/components/header/navigation/navigation-element.js';
|
|
3
|
-
import { createComponent } from '@lit-labs/react';
|
|
4
|
-
|
|
5
|
-
const IDSHeaderNav = createComponent({
|
|
6
|
-
tagName: 'ids-header-nav',
|
|
7
|
-
elementClass: IDSHeaderNav$1,
|
|
8
|
-
react: React,
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
export { IDSHeaderNav };
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import '@inera/ids-core/components/list/register.js';
|
|
2
|
-
import { IDSListItemInfo as ListItemInfo } from '@inera/ids-core/components/list/item/info/list-item-info-element.js';
|
|
3
|
-
export declare const IDSListItemInfo: import("@lit-labs/react").ReactWebComponent<ListItemInfo, {}>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import '@inera/ids-core/components/list/register.js';
|
|
3
|
-
import { IDSListItemInfo as IDSListItemInfo$1 } from '@inera/ids-core/components/list/item/info/list-item-info-element.js';
|
|
4
|
-
import { createComponent } from '@lit-labs/react';
|
|
5
|
-
|
|
6
|
-
const IDSListItemInfo = createComponent({
|
|
7
|
-
tagName: 'ids-list-item-info',
|
|
8
|
-
elementClass: IDSListItemInfo$1,
|
|
9
|
-
react: React,
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
export { IDSListItemInfo };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import '@inera/ids-core/components/list/register.js';
|
|
3
|
-
import { IDSListItem as IDSListItem$1 } from '@inera/ids-core/components/list/item/list-item-element.js';
|
|
4
|
-
import { createComponent } from '@lit-labs/react';
|
|
5
|
-
|
|
6
|
-
const IDSListItem = createComponent({
|
|
7
|
-
tagName: 'ids-list-item',
|
|
8
|
-
elementClass: IDSListItem$1,
|
|
9
|
-
react: React,
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
export { IDSListItem };
|
package/components/list/list.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import '@inera/ids-core/components/list/register.js';
|
|
3
|
-
import { IDSList as IDSList$1 } from '@inera/ids-core/components/list/list-element.js';
|
|
4
|
-
import { createComponent } from '@lit-labs/react';
|
|
5
|
-
|
|
6
|
-
const IDSList = createComponent({
|
|
7
|
-
tagName: 'ids-list',
|
|
8
|
-
elementClass: IDSList$1,
|
|
9
|
-
react: React,
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
export { IDSList };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { IDSMobileMenuAvatar as IDSMobileMenuAvatar$1 } from '@inera/ids-core/components/mobile/menu/avatar/mobile-menu-avatar-element.js';
|
|
3
|
-
import { createComponent } from '@lit-labs/react';
|
|
4
|
-
|
|
5
|
-
const IDSMobileMenuAvatar = createComponent({
|
|
6
|
-
tagName: 'ids-mobile-menu-avatar',
|
|
7
|
-
elementClass: IDSMobileMenuAvatar$1,
|
|
8
|
-
react: React,
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
export { IDSMobileMenuAvatar };
|
|
File without changes
|
|
File without changes
|