@helsenorge/designsystem-react 12.0.0-beta.1 → 12.0.0-beta.2
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/CHANGELOG.md +90 -9
- package/Checkbox.js +1 -1
- package/Checkbox.js.map +1 -1
- package/Duolist.js +92 -0
- package/Duolist.js.map +1 -0
- package/ElementHeader.js +150 -0
- package/ElementHeader.js.map +1 -0
- package/ElementHeaderText.js +35 -0
- package/ElementHeaderText.js.map +1 -0
- package/HelpDetails.js +1 -1
- package/HelpDetails.js.map +1 -1
- package/HelpTriggerIcon.js +4 -4
- package/HelpTriggerIcon.js.map +1 -1
- package/HelpTriggerStandalone.js +5 -2
- package/HelpTriggerStandalone.js.map +1 -1
- package/Highlighter.js +44 -0
- package/Highlighter.js.map +1 -0
- package/LazyIcon.js +1 -1
- package/LazyIcon.js.map +1 -1
- package/LinkList.js +47 -9
- package/LinkList.js.map +1 -1
- package/NotificationBadge.js +1 -1
- package/NotificationBadge.js.map +1 -1
- package/Panel.js +38 -18
- package/Panel.js.map +1 -1
- package/PanelTitle.js +3 -2
- package/PanelTitle.js.map +1 -1
- package/PopOver.js +6 -0
- package/PopOver.js.map +1 -1
- package/StatusDot.js +15 -6
- package/StatusDot.js.map +1 -1
- package/StatusDotMultiComposition.js +27 -0
- package/StatusDotMultiComposition.js.map +1 -0
- package/components/AnchorLink/styles.module.scss +7 -7
- package/components/ArticleTeaser/styles.module.scss +7 -3
- package/components/Checkbox/styles.module.scss +7 -1
- package/components/Checkbox/styles.module.scss.d.ts +1 -0
- package/components/Close/styles.module.scss +10 -6
- package/components/DictionaryTrigger/styles.module.scss +12 -5
- package/components/Dropdown/styles.module.scss +9 -1
- package/components/Duolist/index.js +3 -88
- package/components/Duolist/index.js.map +1 -1
- package/components/ElementHeader/ElementHeader.d.ts +59 -0
- package/components/ElementHeader/ElementHeaderText/ElementHeaderText.d.ts +25 -0
- package/components/ElementHeader/ElementHeaderText/index.d.ts +3 -0
- package/components/ElementHeader/ElementHeaderText/index.js +6 -0
- package/components/ElementHeader/StatusDotMultiComposition/StatusDotMultiComposition.d.ts +23 -0
- package/components/ElementHeader/StatusDotMultiComposition/index.d.ts +3 -0
- package/components/ElementHeader/StatusDotMultiComposition/index.js +6 -0
- package/components/{ListHeader → ElementHeader/StatusDotMultiComposition}/index.js.map +1 -1
- package/components/ElementHeader/StatusDotMultiComposition/styles.module.scss +28 -0
- package/components/ElementHeader/StatusDotMultiComposition/styles.module.scss.d.ts +11 -0
- package/components/ElementHeader/index.d.ts +3 -0
- package/components/ElementHeader/index.js +9 -0
- package/components/ElementHeader/index.js.map +1 -0
- package/components/{ListHeader → ElementHeader}/styles.module.scss +46 -9
- package/components/ElementHeader/styles.module.scss.d.ts +22 -0
- package/components/ExpanderList/ExpanderList.d.ts +9 -2
- package/components/ExpanderList/index.js +40 -23
- package/components/ExpanderList/index.js.map +1 -1
- package/components/ExpanderList/styles.module.scss +288 -47
- package/components/ExpanderList/styles.module.scss.d.ts +22 -2
- package/components/HelpBubble/HelpBubble.d.ts +7 -0
- package/components/HelpBubble/index.js +43 -8
- package/components/HelpBubble/index.js.map +1 -1
- package/components/HelpBubble/resourceHelper.d.ts +3 -0
- package/components/HelpBubble/styles.module.scss +0 -2
- package/components/HelpDetails/styles.module.scss +3 -2
- package/components/HelpDrawer/HelpDrawer.d.ts +3 -0
- package/components/HelpDrawer/index.js +31 -1
- package/components/HelpDrawer/index.js.map +1 -1
- package/components/HelpDrawer/resourceHelper.d.ts +3 -0
- package/components/HelpDrawer/styles.module.scss +1 -11
- package/components/HelpDrawer/styles.module.scss.d.ts +0 -1
- package/components/HelpPanel/styles.module.scss +2 -2
- package/components/HelpTeaser/styles.module.scss +5 -5
- package/components/HelpTooltip/HelpTooltip.d.ts +2 -2
- package/components/HelpTooltip/index.js.map +1 -1
- package/components/HelpTriggerIcon/HelpTriggerIcon.d.ts +4 -0
- package/components/HelpTriggerIcon/styles.module.scss +10 -10
- package/components/HelpTriggerInline/index.js +5 -2
- package/components/HelpTriggerInline/index.js.map +1 -1
- package/components/HelpTriggerInline/styles.module.scss +8 -4
- package/components/HelpTriggerStandalone/styles.module.scss +8 -4
- package/components/Highlighter/Highlighter.d.ts +7 -0
- package/components/Highlighter/Highlighter.test.d.ts +1 -0
- package/components/Highlighter/index.d.ts +3 -0
- package/components/Highlighter/index.js +6 -0
- package/components/Highlighter/index.js.map +1 -0
- package/components/Highlighter/styles.module.scss +4 -0
- package/components/Highlighter/styles.module.scss.d.ts +9 -0
- package/components/Icons/AdditionalIconInformation.d.ts +4 -0
- package/components/Icons/AdditionalIconInformation.js +2 -1
- package/components/Icons/AdditionalIconInformation.js.map +1 -1
- package/components/Icons/DotActive.d.ts +4 -0
- package/components/Icons/DotActive.js +16 -0
- package/components/Icons/DotActive.js.map +1 -0
- package/components/Icons/DotInactive.d.ts +4 -0
- package/components/Icons/DotInactive.js +30 -0
- package/components/Icons/DotInactive.js.map +1 -0
- package/components/Icons/DotPending.d.ts +4 -0
- package/components/Icons/DotPending.js +16 -0
- package/components/Icons/DotPending.js.map +1 -0
- package/components/Icons/IconNames.d.ts +1 -1
- package/components/Icons/IconNames.js +4 -0
- package/components/Icons/IconNames.js.map +1 -1
- package/components/Icons/TreatmentAids.d.ts +4 -0
- package/components/Icons/TreatmentAids.js +41 -0
- package/components/Icons/TreatmentAids.js.map +1 -0
- package/components/LinkList/LinkList.d.ts +9 -2
- package/components/LinkList/styles.module.scss +70 -0
- package/components/LinkList/styles.module.scss.d.ts +11 -0
- package/components/NotificationPanel/styles.module.scss +1 -1
- package/components/Panel/Panel.d.ts +16 -8
- package/components/Panel/PanelTitle/PanelTitle.d.ts +3 -1
- package/components/Panel/styles.module.scss +10 -1
- package/components/Panel/styles.module.scss.d.ts +2 -0
- package/components/PanelList/PanelList.d.ts +2 -0
- package/components/PanelList/index.js +3 -2
- package/components/PanelList/index.js.map +1 -1
- package/components/PopOver/PopOver.d.ts +4 -0
- package/components/PopOver/styles.module.scss +6 -3
- package/components/PopOver/styles.module.scss.d.ts +1 -0
- package/components/RadioButton/styles.module.scss +7 -1
- package/components/StatusDot/StatusDot.d.ts +6 -2
- package/components/StatusDot/index.js +3 -3
- package/components/StatusDot/styles.module.scss +12 -6
- package/components/StatusDot/styles.module.scss.d.ts +3 -0
- package/components/Step/Step.d.ts +4 -0
- package/components/Step/index.js +5 -2
- package/components/Step/index.js.map +1 -1
- package/components/Toggle/index.js +2 -1
- package/components/Toggle/index.js.map +1 -1
- package/constants.d.ts +1 -0
- package/constants.js +1 -0
- package/constants.js.map +1 -1
- package/designsystem-react.css +1 -1
- package/package.json +1 -1
- package/resources/HN.Designsystem.HelpBubble.nb-NO.json.d.ts +6 -0
- package/resources/HN.Designsystem.HelpDrawer.nb-NO.json.d.ts +6 -0
- package/scss/helsenorge.scss +2 -0
- package/scss/supernova/styles/colors.css +1 -1
- package/scss/typography.stories.tsx +1 -1
- package/ListHeader.js +0 -94
- package/ListHeader.js.map +0 -1
- package/ListHeaderText.js +0 -39
- package/ListHeaderText.js.map +0 -1
- package/components/ListHeader/ListHeader.d.ts +0 -43
- package/components/ListHeader/ListHeaderText/ListHeaderText.d.ts +0 -26
- package/components/ListHeader/ListHeaderText/index.d.ts +0 -3
- package/components/ListHeader/ListHeaderText/index.js +0 -6
- package/components/ListHeader/index.d.ts +0 -4
- package/components/ListHeader/index.js +0 -11
- package/components/ListHeader/styles.module.scss.d.ts +0 -21
- /package/components/{ListHeader/ListHeaderText → ElementHeader/ElementHeaderText}/index.js.map +0 -0
|
@@ -10,14 +10,18 @@
|
|
|
10
10
|
padding: 0 var(--core-space-4xs);
|
|
11
11
|
background-color: transparent;
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
--dot-color: var(--color-help-border-normal);
|
|
14
|
+
|
|
15
|
+
// The radial-gradient consists of a circle with empty space to the right, making up a dotted pattern when repeated horizontally
|
|
16
|
+
background-image: radial-gradient(circle at 1.5px 1.5px, var(--dot-color) 1.5px, transparent 1.5px);
|
|
16
17
|
background-repeat: repeat-x;
|
|
18
|
+
background-size: 8px 3px;
|
|
19
|
+
background-position: bottom left;
|
|
17
20
|
|
|
18
21
|
&:hover {
|
|
19
22
|
background-color: var(--color-help-background-transparent-onlight-hover);
|
|
20
|
-
|
|
23
|
+
|
|
24
|
+
--dot-color: var(--color-help-border-dark);
|
|
21
25
|
}
|
|
22
26
|
|
|
23
27
|
&:focus-visible {
|
|
@@ -27,7 +31,8 @@
|
|
|
27
31
|
|
|
28
32
|
&[aria-expanded='true'] {
|
|
29
33
|
background-color: var(--color-help-background-transparent-onlight-hover);
|
|
30
|
-
|
|
34
|
+
|
|
35
|
+
--dot-color: var(--color-help-border-dark);
|
|
31
36
|
|
|
32
37
|
&:hover,
|
|
33
38
|
&:focus-visible {
|
|
@@ -41,5 +46,7 @@
|
|
|
41
46
|
|
|
42
47
|
&:active {
|
|
43
48
|
background-color: var(--color-help-background-transparent-onlight-hover-selected);
|
|
49
|
+
|
|
50
|
+
--dot-color: var(--color-help-border-dark);
|
|
44
51
|
}
|
|
45
52
|
}
|
|
@@ -209,7 +209,15 @@
|
|
|
209
209
|
|
|
210
210
|
&__input {
|
|
211
211
|
border-bottom: 1px solid palette.$neutral300;
|
|
212
|
-
padding:
|
|
212
|
+
padding: 0 spacers.getSpacer(s);
|
|
213
|
+
|
|
214
|
+
&[role='menuitemradio'] {
|
|
215
|
+
padding: 0 spacers.getSpacer(s);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
&[role='menuitemcheckbox'] {
|
|
219
|
+
padding: 1px spacers.getSpacer(s) spacers.getSpacer(2xs) spacers.getSpacer(s);
|
|
220
|
+
}
|
|
213
221
|
|
|
214
222
|
@media (min-width: map.get(breakpoints.$grid-breakpoints, md)) {
|
|
215
223
|
padding: spacers.getSpacer(s);
|
|
@@ -1,93 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import classNames from "classnames";
|
|
4
|
-
import { AnalyticsId } from "../../constants.js";
|
|
5
|
-
import { useBreakpoint, Breakpoint } from "../../hooks/useBreakpoint.js";
|
|
6
|
-
import { S as Spacer } from "../../Spacer.js";
|
|
7
|
-
import duolistStyles from "./styles.module.scss";
|
|
8
|
-
const DuolistGroup = (props) => {
|
|
9
|
-
const { format = "formatted", boldColumn = format === "non-formatted" ? "none" : "first", description, separator = ": ", term } = props;
|
|
10
|
-
const firstBold = boldColumn === "first";
|
|
11
|
-
const secondBold = boldColumn === "second";
|
|
12
|
-
const nonFormatted = format === "non-formatted";
|
|
13
|
-
const dtClassNames = classNames(duolistStyles["duolist__dt"], {
|
|
14
|
-
[duolistStyles["duolist__dt--bold"]]: firstBold,
|
|
15
|
-
[duolistStyles["duolist__dt--non-formatted"]]: nonFormatted
|
|
16
|
-
});
|
|
17
|
-
const ddClassNames = classNames(duolistStyles["duolist__dd"], {
|
|
18
|
-
[duolistStyles["duolist__dd--bold"]]: secondBold,
|
|
19
|
-
[duolistStyles["duolist__dd--non-formatted"]]: nonFormatted
|
|
20
|
-
});
|
|
21
|
-
const renderContent = () => {
|
|
22
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
23
|
-
/* @__PURE__ */ jsx("dt", { "data-separator": nonFormatted ? separator : void 0, className: dtClassNames, children: term }),
|
|
24
|
-
/* @__PURE__ */ jsx("dd", { className: ddClassNames, children: description })
|
|
25
|
-
] });
|
|
26
|
-
};
|
|
27
|
-
return nonFormatted ? /* @__PURE__ */ jsx("div", { children: renderContent() }) : /* @__PURE__ */ jsx(Fragment, { children: renderContent() });
|
|
28
|
-
};
|
|
29
|
-
const Duolist = (props) => {
|
|
30
|
-
const {
|
|
31
|
-
boldColumn,
|
|
32
|
-
border = "no-border",
|
|
33
|
-
descriptionWidth,
|
|
34
|
-
label,
|
|
35
|
-
format = "formatted",
|
|
36
|
-
separator,
|
|
37
|
-
variant = "normal",
|
|
38
|
-
children,
|
|
39
|
-
className,
|
|
40
|
-
testId,
|
|
41
|
-
useCollapsedFromAndBelowBreakpoint
|
|
42
|
-
} = props;
|
|
43
|
-
const hasBorder = border === "border";
|
|
44
|
-
const hasLines = variant === "line";
|
|
45
|
-
const extraPaddingTop = hasBorder && (label || hasLines);
|
|
46
|
-
const nonFormatted = format === "non-formatted";
|
|
47
|
-
const breakpoint = useBreakpoint();
|
|
48
|
-
const useCollapsedMode = useCollapsedFromAndBelowBreakpoint && breakpoint <= Breakpoint[useCollapsedFromAndBelowBreakpoint];
|
|
49
|
-
const duolistWrapperClasses = classNames(
|
|
50
|
-
{
|
|
51
|
-
[duolistStyles["duolist-wrapper--border"]]: hasBorder,
|
|
52
|
-
[duolistStyles["duolist-wrapper--extra-padding-top"]]: extraPaddingTop
|
|
53
|
-
},
|
|
54
|
-
className
|
|
55
|
-
);
|
|
56
|
-
const duolistClasses = classNames(duolistStyles.duolist, {
|
|
57
|
-
[duolistStyles["duolist--line"]]: hasLines,
|
|
58
|
-
[duolistStyles["duolist--non-formatted"]]: nonFormatted,
|
|
59
|
-
[duolistStyles["duolist--collapsed"]]: useCollapsedMode,
|
|
60
|
-
[duolistStyles["duolist--not-collapsed"]]: !useCollapsedMode
|
|
61
|
-
});
|
|
62
|
-
const duolistColumnStyle = descriptionWidth ? descriptionWidth + "%" : "minmax(60%, 1fr)";
|
|
63
|
-
return /* @__PURE__ */ jsxs("div", { className: duolistWrapperClasses, "data-testid": testId, "data-analyticsid": AnalyticsId.Duolist, children: [
|
|
64
|
-
label && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
65
|
-
label,
|
|
66
|
-
/* @__PURE__ */ jsx(Spacer, {})
|
|
67
|
-
] }),
|
|
68
|
-
/* @__PURE__ */ jsx(
|
|
69
|
-
"dl",
|
|
70
|
-
{
|
|
71
|
-
style: !nonFormatted ? { gridTemplateColumns: useCollapsedMode ? `1fr` : `auto ${duolistColumnStyle}` } : void 0,
|
|
72
|
-
className: duolistClasses,
|
|
73
|
-
children: React__default.Children.map(children, (child) => {
|
|
74
|
-
if (child === null || typeof child === "undefined") return;
|
|
75
|
-
const duolistGroup = child;
|
|
76
|
-
if (duolistGroup.type === DuolistGroup) {
|
|
77
|
-
return React__default.cloneElement(child, {
|
|
78
|
-
boldColumn: duolistGroup.props.boldColumn ?? boldColumn,
|
|
79
|
-
format: duolistGroup.props.format ?? format,
|
|
80
|
-
separator: duolistGroup.props.separator ?? separator
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
})
|
|
84
|
-
}
|
|
85
|
-
)
|
|
86
|
-
] });
|
|
87
|
-
};
|
|
1
|
+
import { D as Duolist } from "../../Duolist.js";
|
|
2
|
+
import { a } from "../../Duolist.js";
|
|
88
3
|
export {
|
|
89
4
|
Duolist,
|
|
90
|
-
DuolistGroup,
|
|
5
|
+
a as DuolistGroup,
|
|
91
6
|
Duolist as default
|
|
92
7
|
};
|
|
93
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ElementHeaderTextProps, ElementHeaderTextType } from './ElementHeaderText/ElementHeaderText';
|
|
3
|
+
import { AvatarProps, AvatarType } from '../Avatar';
|
|
4
|
+
import { BadgeProps, BadgeType } from '../Badge';
|
|
5
|
+
import { SvgIcon } from '../Icon';
|
|
6
|
+
import { StatusDotProps, StatusDotType } from '../StatusDot';
|
|
7
|
+
import { TitleTags } from '../Title';
|
|
8
|
+
import { StatusDotMultiCompositionProps, StatusDotMultiCompositionType } from './StatusDotMultiComposition';
|
|
9
|
+
export type ElementHeaderSize = 'small' | 'medium' | 'large';
|
|
10
|
+
export type ParentType = 'linklist' | 'expanderlist';
|
|
11
|
+
export interface ElementHeaderType extends React.FC<ElementHeaderProps> {
|
|
12
|
+
Avatar?: AvatarType;
|
|
13
|
+
Badge?: BadgeType;
|
|
14
|
+
ElementHeaderText?: ElementHeaderTextType;
|
|
15
|
+
StatusDot?: StatusDotType;
|
|
16
|
+
StatusDotMultiComposition?: StatusDotMultiCompositionType;
|
|
17
|
+
}
|
|
18
|
+
export declare const renderElementHeader: (element: React.ReactNode, options: Pick<ElementHeaderProps, "titleHtmlMarkup" | "isHovered" | "size" | "parentType" | "chevronIcon" | "icon" | "highlightText">) => React.ReactElement | undefined;
|
|
19
|
+
export interface ElementHeaderProps {
|
|
20
|
+
/** Adds custom classes to the ElementHeader element. */
|
|
21
|
+
className?: string;
|
|
22
|
+
/** Chevron to render inside of the ElementHeader */
|
|
23
|
+
chevronIcon?: SvgIcon;
|
|
24
|
+
/** Children to be rendered inside of ElementHeader */
|
|
25
|
+
children: React.ReactNode;
|
|
26
|
+
/** Changes the underlying element of the title. Default: h2*/
|
|
27
|
+
titleHtmlMarkup?: TitleTags;
|
|
28
|
+
/** icon to be rendered inside of ElementHeader */
|
|
29
|
+
icon?: React.ReactElement;
|
|
30
|
+
/** whether or not the parent is hovered */
|
|
31
|
+
isHovered?: boolean;
|
|
32
|
+
/** Adjusts styling based on parent */
|
|
33
|
+
parentType?: ParentType;
|
|
34
|
+
/** Changes size of the ElementHeader. */
|
|
35
|
+
size?: ElementHeaderSize;
|
|
36
|
+
/** Sets the data-testid attribute. */
|
|
37
|
+
testId?: string;
|
|
38
|
+
/** Highlights text in title. Used for search results */
|
|
39
|
+
highlightText?: string;
|
|
40
|
+
}
|
|
41
|
+
interface ElementHeaderChildren {
|
|
42
|
+
avatarChild?: React.ReactElement<AvatarProps>;
|
|
43
|
+
elementHeaderTextChildren: React.ReactElement<ElementHeaderTextProps>[];
|
|
44
|
+
badgeChildren?: React.ReactElement<BadgeProps>[];
|
|
45
|
+
statusDotChildren?: React.ReactElement<StatusDotProps>[];
|
|
46
|
+
statusDotMCChild?: React.ReactElement<StatusDotMultiCompositionProps>;
|
|
47
|
+
elementChild?: React.ReactElement;
|
|
48
|
+
stringChildren: string[];
|
|
49
|
+
remainingChildren: React.ReactNode[];
|
|
50
|
+
}
|
|
51
|
+
type ChildrenMapper = (children: React.ReactNode, isJsxChild?: boolean) => ElementHeaderChildren | undefined;
|
|
52
|
+
export declare const mapChildren: ChildrenMapper;
|
|
53
|
+
export declare const ElementHeaderRoot: ElementHeaderType;
|
|
54
|
+
type ElementHeaderComponent = typeof ElementHeaderRoot & {
|
|
55
|
+
Text: React.FC<ElementHeaderTextProps>;
|
|
56
|
+
StatusDotMultiComposition: React.FC<StatusDotMultiCompositionProps>;
|
|
57
|
+
};
|
|
58
|
+
declare const ElementHeader: ElementHeaderComponent;
|
|
59
|
+
export default ElementHeader;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TitleTags } from '../../Title';
|
|
3
|
+
export type ElementHeaderTextType = React.FC<ElementHeaderTextProps>;
|
|
4
|
+
export interface ElementHeaderTextProps {
|
|
5
|
+
/** The first text in the ElementHeaderText Component */
|
|
6
|
+
firstText: string;
|
|
7
|
+
/** Will style the first text as bold */
|
|
8
|
+
firstTextEmphasised?: boolean;
|
|
9
|
+
/** The second text in the ElementHeaderText Component */
|
|
10
|
+
secondText?: string;
|
|
11
|
+
/** Will style the second text as bold */
|
|
12
|
+
secondTextEmphasised?: boolean;
|
|
13
|
+
/** Whether or not this ElementHeaderText is a sub text */
|
|
14
|
+
subText?: boolean;
|
|
15
|
+
/** Adds custom classes to the ElementHeaderText component. */
|
|
16
|
+
className?: string;
|
|
17
|
+
/** Sets the data-testid attribute. */
|
|
18
|
+
testId?: string;
|
|
19
|
+
/** Changes the underlying element of the text. Default: span*/
|
|
20
|
+
titleHtmlMarkup?: TitleTags;
|
|
21
|
+
/** Highlights text. Used for search results */
|
|
22
|
+
highlightText?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare const ElementHeaderText: ElementHeaderTextType;
|
|
25
|
+
export default ElementHeaderText;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { StatusDotProps } from '../../StatusDot';
|
|
3
|
+
export type StatusDotMultiCompositionType = React.FC<StatusDotMultiCompositionProps>;
|
|
4
|
+
export interface StatusDotMultiCompositionProps {
|
|
5
|
+
/** Additional text to the bottom statusdot */
|
|
6
|
+
additionalText?: string;
|
|
7
|
+
/** StatusDot that is under the others and outside the stacking */
|
|
8
|
+
bottomStatusDot?: React.ReactElement<StatusDotProps>;
|
|
9
|
+
/** Stacking of the statusdots */
|
|
10
|
+
stacking?: 'vertical' | 'horizontal';
|
|
11
|
+
/** StatusDots as children */
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
/** Adds custom classes */
|
|
14
|
+
className?: string;
|
|
15
|
+
/** Show a hidden for child statusdot over the other */
|
|
16
|
+
hiddenForChild?: boolean;
|
|
17
|
+
/** Sets the data-testid attribute. */
|
|
18
|
+
testId?: string;
|
|
19
|
+
/** StatusDot that is over the others and outside the stacking */
|
|
20
|
+
topStatusDot?: React.ReactElement<StatusDotProps>;
|
|
21
|
+
}
|
|
22
|
+
export declare const StatusDotMultiComposition: StatusDotMultiCompositionType;
|
|
23
|
+
export default StatusDotMultiComposition;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
@use '../../../scss/font-mixins' as fonts;
|
|
2
|
+
|
|
3
|
+
.statusdotmulticomposition {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-flow: column;
|
|
6
|
+
|
|
7
|
+
&__children {
|
|
8
|
+
display: flex;
|
|
9
|
+
|
|
10
|
+
&[data-stacking='horizontal'] {
|
|
11
|
+
flex-flow: row;
|
|
12
|
+
column-gap: 1rem;
|
|
13
|
+
flex-wrap: wrap;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&[data-stacking='vertical'] {
|
|
17
|
+
flex-flow: column;
|
|
18
|
+
flex-wrap: wrap;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&__additional-text {
|
|
23
|
+
@include fonts.sublabel-subdued;
|
|
24
|
+
|
|
25
|
+
padding-left: 1.5rem;
|
|
26
|
+
color: var(--core-color-neutral-800);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type Styles = {
|
|
2
|
+
statusdotmulticomposition: string;
|
|
3
|
+
'statusdotmulticomposition__additional-text': string;
|
|
4
|
+
statusdotmulticomposition__children: string;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export type ClassNames = keyof Styles;
|
|
8
|
+
|
|
9
|
+
declare const styles: Styles;
|
|
10
|
+
|
|
11
|
+
export default styles;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { E as ElementHeader } from "../../ElementHeader.js";
|
|
2
|
+
import { a, m, r } from "../../ElementHeader.js";
|
|
3
|
+
export {
|
|
4
|
+
a as ElementHeaderRoot,
|
|
5
|
+
ElementHeader as default,
|
|
6
|
+
m as mapChildren,
|
|
7
|
+
r as renderElementHeader
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
@use '../../scss/palette' as palette;
|
|
4
4
|
@use '../../scss/breakpoints' as breakpoints;
|
|
5
5
|
|
|
6
|
-
.
|
|
6
|
+
.element-header {
|
|
7
|
+
margin: 0.5rem;
|
|
7
8
|
display: grid;
|
|
8
9
|
grid-template:
|
|
9
|
-
'
|
|
10
|
-
'
|
|
11
|
-
|
|
10
|
+
'. statusdots badge chevron' auto
|
|
11
|
+
'icon text badge chevron' 3rem
|
|
12
|
+
'. text badge chevron' auto / min-content auto min-content min-content;
|
|
12
13
|
margin-left: spacers.getSpacer(2xs);
|
|
13
14
|
margin-right: spacers.getSpacer(2xs);
|
|
14
15
|
width: 100%;
|
|
@@ -28,8 +29,23 @@
|
|
|
28
29
|
height: 100%;
|
|
29
30
|
grid-area: text;
|
|
30
31
|
align-self: center;
|
|
31
|
-
padding-top:
|
|
32
|
-
padding-bottom:
|
|
32
|
+
padding-top: 0.625rem;
|
|
33
|
+
padding-bottom: 0.625rem;
|
|
34
|
+
padding-left: 0.5rem;
|
|
35
|
+
|
|
36
|
+
@media (min-width: map.get(breakpoints.$grid-breakpoints, md)) {
|
|
37
|
+
padding-top: 0.75rem;
|
|
38
|
+
padding-bottom: 0.75rem;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&[data-hasstatusdots='true'] {
|
|
42
|
+
padding-top: 0.125rem;
|
|
43
|
+
padding-bottom: 0;
|
|
44
|
+
|
|
45
|
+
@media (min-width: map.get(breakpoints.$grid-breakpoints, md)) {
|
|
46
|
+
padding-top: 0;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
33
49
|
|
|
34
50
|
&--element {
|
|
35
51
|
display: flex;
|
|
@@ -47,6 +63,10 @@
|
|
|
47
63
|
}
|
|
48
64
|
}
|
|
49
65
|
|
|
66
|
+
&__statusdot-container {
|
|
67
|
+
grid-area: statusdots;
|
|
68
|
+
}
|
|
69
|
+
|
|
50
70
|
&__icon,
|
|
51
71
|
&__icon svg,
|
|
52
72
|
&__avatar,
|
|
@@ -67,7 +87,15 @@
|
|
|
67
87
|
|
|
68
88
|
&__chevron {
|
|
69
89
|
grid-area: chevron;
|
|
70
|
-
|
|
90
|
+
|
|
91
|
+
&[data-parenttype='linklist'] {
|
|
92
|
+
align-self: center;
|
|
93
|
+
height: 100%;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&[data-parenttype='expanderlist'] {
|
|
97
|
+
align-self: start;
|
|
98
|
+
}
|
|
71
99
|
}
|
|
72
100
|
|
|
73
101
|
&__chevron svg,
|
|
@@ -79,9 +107,18 @@
|
|
|
79
107
|
grid-area: badge;
|
|
80
108
|
display: flex;
|
|
81
109
|
flex-flow: row;
|
|
82
|
-
align-items: center;
|
|
83
|
-
gap: 0.5rem;
|
|
84
110
|
height: 100%;
|
|
111
|
+
gap: 0.5rem;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&__badge {
|
|
115
|
+
&[data-parenttype='linklist'] {
|
|
116
|
+
align-self: center;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&[data-parenttype='expanderlist'] {
|
|
120
|
+
align-self: start;
|
|
121
|
+
}
|
|
85
122
|
}
|
|
86
123
|
|
|
87
124
|
&__badge:has(svg),
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type Styles = {
|
|
2
|
+
'element-header': string;
|
|
3
|
+
'element-header__avatar': string;
|
|
4
|
+
'element-header__badge': string;
|
|
5
|
+
'element-header__badge-container': string;
|
|
6
|
+
'element-header__chevron': string;
|
|
7
|
+
'element-header__content': string;
|
|
8
|
+
'element-header__content--element': string;
|
|
9
|
+
'element-header__content--spacing': string;
|
|
10
|
+
'element-header__icon': string;
|
|
11
|
+
'element-header__statusdot-container': string;
|
|
12
|
+
'element-header__title': string;
|
|
13
|
+
'text-wrapper': string;
|
|
14
|
+
'text-wrapper__text--emphasised': string;
|
|
15
|
+
'text-wrapper--sub-level': string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export type ClassNames = keyof Styles;
|
|
19
|
+
|
|
20
|
+
declare const styles: Styles;
|
|
21
|
+
|
|
22
|
+
export default styles;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { PaletteNames } from '../../theme/palette';
|
|
3
|
-
import {
|
|
3
|
+
import { ElementHeaderType } from '../ElementHeader/ElementHeader';
|
|
4
4
|
import { TitleTags } from '../Title';
|
|
5
5
|
export type ExpanderListColors = Extract<PaletteNames, 'white' | 'blueberry' | 'cherry' | 'neutral'>;
|
|
6
6
|
export interface ExpanderType extends React.ForwardRefExoticComponent<ExpanderProps & React.RefAttributes<HTMLLIElement>> {
|
|
7
|
-
|
|
7
|
+
ElementHeader?: ElementHeaderType;
|
|
8
8
|
}
|
|
9
9
|
export interface ExpanderListCompound extends React.ForwardRefExoticComponent<ExpanderListProps & React.RefAttributes<HTMLUListElement>> {
|
|
10
10
|
Expander: ExpanderType;
|
|
11
11
|
}
|
|
12
12
|
export type ExpanderListVariant = 'line' | 'outline' | 'fill' | 'fill-negative';
|
|
13
|
+
export type ExpanderListStatus = 'none' | 'new';
|
|
13
14
|
interface ExpanderListProps {
|
|
14
15
|
/** Toggles accordion functionality for the expanders. */
|
|
15
16
|
accordion?: boolean;
|
|
@@ -31,6 +32,8 @@ interface ExpanderListProps {
|
|
|
31
32
|
variant?: ExpanderListVariant;
|
|
32
33
|
/** Overrides the default z-index of the expander header */
|
|
33
34
|
zIndex?: number;
|
|
35
|
+
/** Highlights text in title and content. Used for search results */
|
|
36
|
+
highlightText?: string;
|
|
34
37
|
}
|
|
35
38
|
type Modify<T, R> = Omit<T, keyof R> & R;
|
|
36
39
|
type ExpanderProps = Modify<React.HTMLAttributes<HTMLButtonElement>, {
|
|
@@ -51,6 +54,10 @@ type ExpanderProps = Modify<React.HTMLAttributes<HTMLButtonElement>, {
|
|
|
51
54
|
onExpand?: (isExpanded: boolean) => void;
|
|
52
55
|
/** Overrides the default z-index of the expander header */
|
|
53
56
|
zIndex?: number;
|
|
57
|
+
/** Highlights text in title and content. Override if different from list. */
|
|
58
|
+
highlightText?: string;
|
|
59
|
+
/** Displays a status on the left side: default none */
|
|
60
|
+
status?: ExpanderListStatus;
|
|
54
61
|
}> & Pick<ExpanderListProps, 'renderChildrenWhenClosed' | 'variant'>;
|
|
55
62
|
export declare const ExpanderList: ExpanderListCompound;
|
|
56
63
|
export default ExpanderList;
|