@helsenorge/designsystem-react 15.5.1 → 15.6.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/lib/CHANGELOG.md +13 -0
- package/lib/Checkbox.js +1 -1
- package/lib/Checkbox.js.map +1 -1
- package/lib/FormGroup.js +9 -2
- package/lib/FormGroup.js.map +1 -1
- package/lib/FormLayout.js +9 -1
- package/lib/FormLayout.js.map +1 -1
- package/lib/Toggle.js +176 -0
- package/lib/Toggle.js.map +1 -0
- package/lib/components/Close/styles.module.scss +2 -2
- package/lib/components/FormGroup/styles.module.scss +15 -3
- package/lib/components/FormGroup/styles.module.scss.d.ts +2 -0
- package/lib/components/FormLayout/styles.module.scss +9 -1
- package/lib/components/FormLayout/styles.module.scss.d.ts +2 -0
- package/lib/components/HelpPanel/HelpPanel.d.ts +2 -2
- package/lib/components/HelpPanel/index.js +49 -9
- package/lib/components/HelpPanel/index.js.map +1 -1
- package/lib/components/HelpPanel/styles.module.scss +66 -2
- package/lib/components/HelpPanel/styles.module.scss.d.ts +8 -0
- package/lib/components/HelpTeaser/HelpTeaser.d.ts +5 -2
- package/lib/components/HelpTeaser/index.js +59 -14
- package/lib/components/HelpTeaser/index.js.map +1 -1
- package/lib/components/HelpTeaser/styles.module.scss +105 -2
- package/lib/components/HelpTeaser/styles.module.scss.d.ts +6 -0
- package/lib/components/HighlightPanel/index.js +79 -1
- package/lib/components/HighlightPanel/index.js.map +1 -0
- package/lib/components/InfoTeaser/index.js +71 -1
- package/lib/components/InfoTeaser/index.js.map +1 -0
- package/lib/components/RadioButton/styles.module.scss +6 -6
- package/lib/components/Toggle/index.js +1 -175
- package/lib/resourceHelper2.js +22 -0
- package/lib/resourceHelper2.js.map +1 -0
- package/lib/utils/formSpacing.d.ts +3 -0
- package/lib/utils/formSpacing.js +16 -0
- package/lib/utils/formSpacing.js.map +1 -0
- package/package.json +1 -1
- package/lib/HighlightPanel.js +0 -80
- package/lib/HighlightPanel.js.map +0 -1
- package/lib/InfoTeaser.js +0 -89
- package/lib/InfoTeaser.js.map +0 -1
- package/lib/components/Toggle/index.js.map +0 -1
|
@@ -1,6 +1,70 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../../scss/font-mixins' as fonts;
|
|
3
|
+
@use '../../scss/screen-reader' as *;
|
|
4
|
+
@use '../../scss/breakpoints' as breakpoints;
|
|
1
5
|
@import '../../scss/supernova/styles/colors.css';
|
|
6
|
+
@import '../../scss/supernova/styles/spacers.css';
|
|
2
7
|
|
|
3
8
|
.help-panel {
|
|
4
|
-
|
|
5
|
-
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: row;
|
|
11
|
+
padding: var(--core-space-xs) var(--core-space-xs) var(--core-space-m);
|
|
12
|
+
background-color: var(--color-help-background-normal);
|
|
13
|
+
border: 1px solid var(--color-help-border-subtle-wcag);
|
|
14
|
+
|
|
15
|
+
@media (min-width: map.get(breakpoints.$grid-breakpoints, sm)) {
|
|
16
|
+
padding: var(--core-space-s) var(--core-space-s) var(--core-space-m);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@media (min-width: map.get(breakpoints.$grid-breakpoints, lg)) {
|
|
20
|
+
padding: var(--core-space-s) var(--core-space-m) var(--core-space-m);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&--compact {
|
|
24
|
+
padding: var(--core-space-2xs) var(--core-space-s);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&--subdued {
|
|
28
|
+
background-color: transparent;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&--white {
|
|
32
|
+
background-color: var(--color-base-background-white);
|
|
33
|
+
border: 1px solid var(--color-base-border-onlight-subtle);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&__content {
|
|
37
|
+
@include fonts.help-text;
|
|
38
|
+
|
|
39
|
+
margin-top: 0.625rem;
|
|
40
|
+
|
|
41
|
+
&--compact {
|
|
42
|
+
margin-top: 0.625rem;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&__icon {
|
|
47
|
+
display: inline-flex;
|
|
48
|
+
gap: var(--core-space-xs);
|
|
49
|
+
margin-right: var(--core-space-3xs);
|
|
50
|
+
margin-bottom: 0;
|
|
51
|
+
|
|
52
|
+
@media (min-width: map.get(breakpoints.$grid-breakpoints, md)) {
|
|
53
|
+
margin-right: var(--core-space-2xs);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@media (min-width: map.get(breakpoints.$grid-breakpoints, lg)) {
|
|
57
|
+
margin-right: var(--core-space-s);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&--compact {
|
|
61
|
+
margin-right: var(--core-space-2xs);
|
|
62
|
+
margin-bottom: 0;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&__title-wrapper {
|
|
67
|
+
display: flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
}
|
|
6
70
|
}
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
export type Styles = {
|
|
2
2
|
'help-panel': string;
|
|
3
|
+
'help-panel__content': string;
|
|
4
|
+
'help-panel__content--compact': string;
|
|
5
|
+
'help-panel__icon': string;
|
|
6
|
+
'help-panel__icon--compact': string;
|
|
7
|
+
'help-panel__title-wrapper': string;
|
|
8
|
+
'help-panel--compact': string;
|
|
9
|
+
'help-panel--subdued': string;
|
|
10
|
+
'help-panel--white': string;
|
|
3
11
|
};
|
|
4
12
|
|
|
5
13
|
export type ClassNames = keyof Styles;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { HNDesignsystemInfoTeaser } from '../../resources/Resources';
|
|
2
|
-
import { InfoTeaserTags } from '../InfoTeaser';
|
|
3
2
|
import { TitleTags } from '../Title';
|
|
3
|
+
export type HelpTeaserVariants = 'normal' | 'subdued';
|
|
4
|
+
export type HelpTeaserTags = 'div' | 'section' | 'aside' | 'article';
|
|
4
5
|
export interface HelpTeaserProps {
|
|
5
6
|
/** What's in the box? */
|
|
6
7
|
children: React.ReactNode;
|
|
7
8
|
/** Override the default max height for collapsed teaser. Default is 12.25rem */
|
|
8
9
|
collapsedMaxHeight?: string;
|
|
9
10
|
/** Changes the underlying element of the wrapper */
|
|
10
|
-
htmlMarkup?:
|
|
11
|
+
htmlMarkup?: HelpTeaserTags;
|
|
11
12
|
/** Resources for component */
|
|
12
13
|
resources?: Partial<HNDesignsystemInfoTeaser>;
|
|
13
14
|
/** Sets the data-testid attribute */
|
|
@@ -16,6 +17,8 @@ export interface HelpTeaserProps {
|
|
|
16
17
|
title: string;
|
|
17
18
|
/** Markup props for title */
|
|
18
19
|
titleHtmlMarkup?: TitleTags;
|
|
20
|
+
/** Sets the visual variant */
|
|
21
|
+
variant?: HelpTeaserVariants;
|
|
19
22
|
}
|
|
20
23
|
declare const HelpTeaser: React.FC<HelpTeaserProps>;
|
|
21
24
|
export default HelpTeaser;
|
|
@@ -1,21 +1,66 @@
|
|
|
1
|
+
import { IconSize, LanguageLocales } from "../../constants.js";
|
|
2
|
+
import { t as Icon_default } from "../../Icon.js";
|
|
3
|
+
import { useLanguage } from "../../hooks/useLanguage.js";
|
|
4
|
+
import { useIsMobileBreakpoint } from "../../hooks/useIsMobileBreakpoint.js";
|
|
5
|
+
import Title_default from "../Title/index.js";
|
|
6
|
+
import { useExpand } from "../../hooks/useExpand.js";
|
|
1
7
|
import HandWaving from "../Icons/HandWaving.js";
|
|
2
|
-
import { t as
|
|
3
|
-
import
|
|
8
|
+
import { t as getResources } from "../../resourceHelper2.js";
|
|
9
|
+
import classNames from "classnames";
|
|
10
|
+
import { useId } from "react";
|
|
11
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
12
|
import styles from "./styles.module.scss";
|
|
5
13
|
//#region src/components/HelpTeaser/HelpTeaser.tsx
|
|
6
14
|
var HelpTeaser = (props) => {
|
|
7
|
-
const { children, htmlMarkup, resources, testId, title, titleHtmlMarkup, collapsedMaxHeight } = props;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
const { children, htmlMarkup, resources, testId, title, titleHtmlMarkup, collapsedMaxHeight, variant = "normal" } = props;
|
|
16
|
+
const [isExpanded, setIsExpanded] = useExpand(false);
|
|
17
|
+
const { language } = useLanguage(LanguageLocales.NORWEGIAN);
|
|
18
|
+
const defaultResources = getResources(language);
|
|
19
|
+
const helpTeaserTextId = useId();
|
|
20
|
+
const isMobile = useIsMobileBreakpoint();
|
|
21
|
+
const mergedResources = {
|
|
22
|
+
...defaultResources,
|
|
23
|
+
...resources
|
|
24
|
+
};
|
|
25
|
+
return /* @__PURE__ */ jsxs(htmlMarkup ?? "div", {
|
|
26
|
+
className: styles.wrapper,
|
|
27
|
+
"data-testid": testId,
|
|
28
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
29
|
+
className: classNames(styles.helpteaser, {
|
|
30
|
+
[styles["helpteaser--collapsed"]]: !isExpanded,
|
|
31
|
+
[styles["helpteaser--subdued"]]: variant === "subdued"
|
|
32
|
+
}),
|
|
33
|
+
style: { maxHeight: !isExpanded ? collapsedMaxHeight ?? "12.25rem" : void 0 },
|
|
34
|
+
children: [
|
|
35
|
+
/* @__PURE__ */ jsx(Icon_default, {
|
|
36
|
+
svgIcon: HandWaving,
|
|
37
|
+
size: isMobile ? IconSize.XSmall : IconSize.Small,
|
|
38
|
+
className: styles["helpteaser__icon"]
|
|
39
|
+
}),
|
|
40
|
+
title && typeof title !== "undefined" && /* @__PURE__ */ jsx(Title_default, {
|
|
41
|
+
testId: "titleId",
|
|
42
|
+
htmlMarkup: titleHtmlMarkup ?? "h2",
|
|
43
|
+
appearance: "title6",
|
|
44
|
+
className: styles["helpteaser__title"],
|
|
45
|
+
children: title
|
|
46
|
+
}),
|
|
47
|
+
/* @__PURE__ */ jsx("div", {
|
|
48
|
+
className: styles["helpteaser__text"],
|
|
49
|
+
"aria-hidden": isExpanded ? false : true,
|
|
50
|
+
id: helpTeaserTextId,
|
|
51
|
+
children
|
|
52
|
+
})
|
|
53
|
+
]
|
|
54
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
55
|
+
type: "button",
|
|
56
|
+
className: styles["helpteaser__button"],
|
|
57
|
+
onClick: () => {
|
|
58
|
+
setIsExpanded(!isExpanded);
|
|
59
|
+
},
|
|
60
|
+
"aria-expanded": isExpanded,
|
|
61
|
+
"aria-controls": helpTeaserTextId,
|
|
62
|
+
children: isExpanded ? mergedResources.expandButtonOpen : mergedResources.expandButtonClose
|
|
63
|
+
})]
|
|
19
64
|
});
|
|
20
65
|
};
|
|
21
66
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/HelpTeaser/HelpTeaser.tsx","../../../src/components/HelpTeaser/index.ts"],"sourcesContent":["import type { HNDesignsystemInfoTeaser } from '../../resources/Resources';\nimport type {
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/HelpTeaser/HelpTeaser.tsx","../../../src/components/HelpTeaser/index.ts"],"sourcesContent":["import { useId } from 'react';\n\nimport classNames from 'classnames';\n\nimport type { HNDesignsystemInfoTeaser } from '../../resources/Resources';\nimport type { TitleTags } from '../Title';\n\nimport { useIsMobileBreakpoint } from '@helsenorge/designsystem-react/hooks/useIsMobileBreakpoint';\n\nimport { LanguageLocales } from '../../constants';\nimport { useExpand } from '../../hooks/useExpand';\nimport { useLanguage } from '../../hooks/useLanguage';\nimport Icon, { IconSize } from '../Icon';\nimport HandWaving from '../Icons/HandWaving';\nimport { getResources } from '../InfoTeaser/resourceHelper';\nimport Title from '../Title';\n\nimport styles from './styles.module.scss';\n\nexport type HelpTeaserVariants = 'normal' | 'subdued';\nexport type HelpTeaserTags = 'div' | 'section' | 'aside' | 'article';\n\nexport interface HelpTeaserProps {\n /** What's in the box? */\n children: React.ReactNode;\n /** Override the default max height for collapsed teaser. Default is 12.25rem */\n collapsedMaxHeight?: string;\n /** Changes the underlying element of the wrapper */\n htmlMarkup?: HelpTeaserTags;\n /** Resources for component */\n resources?: Partial<HNDesignsystemInfoTeaser>;\n /** Sets the data-testid attribute */\n testId?: string;\n /** Title on top of the component */\n title: string;\n /** Markup props for title */\n titleHtmlMarkup?: TitleTags;\n /** Sets the visual variant */\n variant?: HelpTeaserVariants;\n}\n\nconst HelpTeaser: React.FC<HelpTeaserProps> = props => {\n const { children, htmlMarkup, resources, testId, title, titleHtmlMarkup, collapsedMaxHeight, variant = 'normal' } = props;\n\n const [isExpanded, setIsExpanded] = useExpand(false);\n const { language } = useLanguage<LanguageLocales>(LanguageLocales.NORWEGIAN);\n const defaultResources = getResources(language);\n const helpTeaserTextId = useId();\n const isMobile = useIsMobileBreakpoint();\n\n const mergedResources: HNDesignsystemInfoTeaser = {\n ...defaultResources,\n ...resources,\n };\n\n const WrapperTag = htmlMarkup ?? 'div';\n\n return (\n <WrapperTag className={styles.wrapper} data-testid={testId}>\n <div\n className={classNames(styles.helpteaser, {\n [styles['helpteaser--collapsed']]: !isExpanded,\n [styles['helpteaser--subdued']]: variant === 'subdued',\n })}\n style={{ maxHeight: !isExpanded ? (collapsedMaxHeight ?? '12.25rem') : undefined }}\n >\n <Icon svgIcon={HandWaving} size={isMobile ? IconSize.XSmall : IconSize.Small} className={styles['helpteaser__icon']} />\n {title && typeof title !== 'undefined' && (\n <Title testId=\"titleId\" htmlMarkup={titleHtmlMarkup ?? 'h2'} appearance=\"title6\" className={styles['helpteaser__title']}>\n {title}\n </Title>\n )}\n <div className={styles['helpteaser__text']} aria-hidden={isExpanded ? false : true} id={helpTeaserTextId}>\n {children}\n </div>\n </div>\n <button\n type=\"button\"\n className={styles['helpteaser__button']}\n onClick={() => {\n setIsExpanded(!isExpanded);\n }}\n aria-expanded={isExpanded}\n aria-controls={helpTeaserTextId}\n >\n {isExpanded ? mergedResources.expandButtonOpen : mergedResources.expandButtonClose}\n </button>\n </WrapperTag>\n );\n};\n\nexport default HelpTeaser;\n","import HelpTeaser from './HelpTeaser';\nexport * from './HelpTeaser';\nexport default HelpTeaser;\n"],"mappings":";;;;;;;;;;;;;AAyCA,IAAM,cAAwC,UAAS;CACrD,MAAM,EAAE,UAAU,YAAY,WAAW,QAAQ,OAAO,iBAAiB,oBAAoB,UAAU,aAAa;CAEpH,MAAM,CAAC,YAAY,iBAAiB,UAAU,KAAK;CACnD,MAAM,EAAE,aAAa,YAA6B,gBAAgB,SAAS;CAC3E,MAAM,mBAAmB,aAAa,QAAQ;CAC9C,MAAM,mBAAmB,MAAM;CAC/B,MAAM,WAAW,sBAAsB;CAEvC,MAAM,kBAA4C;EAChD,GAAG;EACH,GAAG;CACL;CAIA,OACE,qBAHiB,cAAc,OAG/B;EAAY,WAAW,OAAO;EAAS,eAAa;EAApD,UAAA,CACE,qBAAC,OAAD;GACE,WAAW,WAAW,OAAO,YAAY;KACtC,OAAO,2BAA2B,CAAC;KACnC,OAAO,yBAAyB,YAAY;GAC/C,CAAC;GACD,OAAO,EAAE,WAAW,CAAC,aAAc,sBAAsB,aAAc,KAAA,EAAU;GALnF,UAAA;IAOE,oBAAC,cAAD;KAAM,SAAS;KAAY,MAAM,WAAW,SAAS,SAAS,SAAS;KAAO,WAAW,OAAO;IAAsB,CAAA;IACrH,SAAS,OAAO,UAAU,eACzB,oBAAC,eAAD;KAAO,QAAO;KAAU,YAAY,mBAAmB;KAAM,YAAW;KAAS,WAAW,OAAO;KAChG,UAAA;IACI,CAAA;IAET,oBAAC,OAAD;KAAK,WAAW,OAAO;KAAqB,eAAa,aAAa,QAAQ;KAAM,IAAI;KACrF;IACE,CAAA;GACF;EACL,CAAA,GAAA,oBAAC,UAAD;GACE,MAAK;GACL,WAAW,OAAO;GAClB,eAAe;IACb,cAAc,CAAC,UAAU;GAC3B;GACA,iBAAe;GACf,iBAAe;GAEd,UAAA,aAAa,gBAAgB,mBAAmB,gBAAgB;EAC3D,CAAA,CACE;;AAEhB;;;ACvFA,IAAA,qBAAe"}
|
|
@@ -1,14 +1,111 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../../scss/font-mixins' as fonts;
|
|
3
|
+
@use '../../scss/breakpoints' as breakpoints;
|
|
1
4
|
@import '../../scss/supernova/styles/colors.css';
|
|
5
|
+
@import '../../scss/supernova/styles/spacers.css';
|
|
6
|
+
|
|
7
|
+
.wrapper {
|
|
8
|
+
position: relative;
|
|
9
|
+
}
|
|
2
10
|
|
|
3
11
|
.helpteaser {
|
|
12
|
+
display: grid;
|
|
13
|
+
grid-template-columns: [icon] auto [content] 1fr;
|
|
14
|
+
width: 100%;
|
|
15
|
+
overflow: hidden;
|
|
4
16
|
background-color: var(--color-help-background-normal);
|
|
5
17
|
border: 1px solid var(--color-help-border-subtle-wcag);
|
|
18
|
+
padding: var(--core-space-xs) var(--core-space-xs) var(--core-space-m);
|
|
19
|
+
|
|
20
|
+
@media (min-width: map.get(breakpoints.$grid-breakpoints, sm)) {
|
|
21
|
+
padding: var(--core-space-s) var(--core-space-s) var(--core-space-m);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@media (min-width: map.get(breakpoints.$grid-breakpoints, md)) {
|
|
25
|
+
padding: var(--core-space-s) var(--core-space-s) var(--core-space-l);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@media (min-width: map.get(breakpoints.$grid-breakpoints, lg)) {
|
|
29
|
+
padding: var(--core-space-s) var(--core-space-m) var(--core-space-l);
|
|
30
|
+
}
|
|
6
31
|
|
|
7
|
-
|
|
8
|
-
background:
|
|
32
|
+
&--subdued {
|
|
33
|
+
background-color: var(--color-base-background-white);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&--collapsed {
|
|
37
|
+
&::after {
|
|
38
|
+
content: '';
|
|
39
|
+
position: absolute;
|
|
40
|
+
height: 5.875rem;
|
|
41
|
+
background: linear-gradient(180deg, #f4ecfe40 0%, #f4ecfe 80%);
|
|
42
|
+
|
|
43
|
+
/* 1px på hver side for å ikke ligge over border */
|
|
44
|
+
bottom: 1px;
|
|
45
|
+
left: 1px;
|
|
46
|
+
width: calc(100% - 2px);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&--collapsed#{&}--subdued {
|
|
51
|
+
&::after {
|
|
52
|
+
background: linear-gradient(180deg, #fff6 0%, #fff 80%);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&__title {
|
|
57
|
+
grid-column: content;
|
|
58
|
+
grid-row: 1;
|
|
59
|
+
align-self: center;
|
|
60
|
+
padding: var(--core-space-2xs) 0;
|
|
61
|
+
|
|
62
|
+
@media (min-width: map.get(breakpoints.$grid-breakpoints, md)) {
|
|
63
|
+
padding-top: 0.62rem;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&__icon {
|
|
68
|
+
grid-column: icon;
|
|
69
|
+
grid-row: 1;
|
|
70
|
+
align-self: center;
|
|
71
|
+
margin-right: var(--core-space-3xs);
|
|
72
|
+
|
|
73
|
+
@media (min-width: map.get(breakpoints.$grid-breakpoints, md)) {
|
|
74
|
+
margin-right: var(--core-space-2xs);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@media (min-width: map.get(breakpoints.$grid-breakpoints, lg)) {
|
|
78
|
+
margin-right: var(--core-space-s);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&__text {
|
|
83
|
+
@include fonts.help-text;
|
|
84
|
+
|
|
85
|
+
grid-column: content;
|
|
86
|
+
overflow: hidden;
|
|
87
|
+
height: inherit;
|
|
9
88
|
}
|
|
10
89
|
|
|
11
90
|
&__button {
|
|
91
|
+
position: absolute;
|
|
92
|
+
right: calc(50%);
|
|
93
|
+
border: none;
|
|
94
|
+
width: fit-content;
|
|
95
|
+
white-space: nowrap;
|
|
96
|
+
border-radius: 1.25rem;
|
|
97
|
+
color: var(--core-color-white, #fff);
|
|
98
|
+
padding: 0.375rem 1rem;
|
|
99
|
+
bottom: 0;
|
|
100
|
+
left: 50%;
|
|
101
|
+
transform: translateX(-50%) translateY(50%);
|
|
102
|
+
cursor: pointer;
|
|
103
|
+
|
|
104
|
+
/* @todo Mobile/HelpTriggerText */
|
|
105
|
+
font-size: 1rem;
|
|
106
|
+
font-style: normal;
|
|
107
|
+
font-weight: 600;
|
|
108
|
+
line-height: 120%; // 1.2rem
|
|
12
109
|
background-color: var(--color-help-graphics-normal);
|
|
13
110
|
|
|
14
111
|
&:hover {
|
|
@@ -18,5 +115,11 @@
|
|
|
18
115
|
&:active {
|
|
19
116
|
background-color: var(--color-help-graphics-dark);
|
|
20
117
|
}
|
|
118
|
+
|
|
119
|
+
&:focus-visible {
|
|
120
|
+
border: 1px solid var(--color-base-graphics-ondark);
|
|
121
|
+
outline: none;
|
|
122
|
+
box-shadow: 0 0 0 3px var(--color-base-graphics-onlight);
|
|
123
|
+
}
|
|
21
124
|
}
|
|
22
125
|
}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
export type Styles = {
|
|
2
2
|
helpteaser: string;
|
|
3
3
|
helpteaser__button: string;
|
|
4
|
+
helpteaser__icon: string;
|
|
5
|
+
helpteaser__text: string;
|
|
6
|
+
helpteaser__title: string;
|
|
7
|
+
'helpteaser--collapsed': string;
|
|
8
|
+
'helpteaser--subdued': string;
|
|
9
|
+
wrapper: string;
|
|
4
10
|
};
|
|
5
11
|
|
|
6
12
|
export type ClassNames = keyof Styles;
|
|
@@ -1,2 +1,80 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AnalyticsId, IconSize } from "../../constants.js";
|
|
2
|
+
import { t as Icon_default } from "../../Icon.js";
|
|
3
|
+
import { t as LazyIcon_default } from "../../LazyIcon.js";
|
|
4
|
+
import { Breakpoint, useBreakpoint } from "../../hooks/useBreakpoint.js";
|
|
5
|
+
import Title_default from "../Title/index.js";
|
|
6
|
+
import classNames from "classnames";
|
|
7
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import styles from "./styles.module.scss";
|
|
9
|
+
//#region src/components/HighlightPanel/HighlightPanel.tsx
|
|
10
|
+
var HighlightPanel = (props) => {
|
|
11
|
+
const { children, color = "white", testId, svgIcon, htmlMarkup = "div", className, variant = "normal", title, titleHtmlMarkup = "h2" } = props;
|
|
12
|
+
const breakpoint = useBreakpoint();
|
|
13
|
+
const containerClassName = classNames(styles.highlightpanel, styles[`highlightpanel--${color}`], svgIcon && styles["highlightpanel--has-icon"], className, { [styles["highlightpanel--compact"]]: variant === "compact" });
|
|
14
|
+
const renderContent = () => {
|
|
15
|
+
const titleElement = title && /* @__PURE__ */ jsx(Title_default, {
|
|
16
|
+
testId: "titleId",
|
|
17
|
+
htmlMarkup: titleHtmlMarkup,
|
|
18
|
+
appearance: variant === "compact" ? "title6" : "title4",
|
|
19
|
+
children: title
|
|
20
|
+
});
|
|
21
|
+
if (svgIcon) {
|
|
22
|
+
const iconSize = IconSize.Small;
|
|
23
|
+
if (variant === "compact") return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
|
|
24
|
+
className: classNames(styles.highlightpanel__icon, styles["highlightpanel__icon--compact"]),
|
|
25
|
+
children: typeof svgIcon === "string" ? /* @__PURE__ */ jsx(LazyIcon_default, {
|
|
26
|
+
iconName: svgIcon,
|
|
27
|
+
size: iconSize
|
|
28
|
+
}) : /* @__PURE__ */ jsx(Icon_default, {
|
|
29
|
+
svgIcon,
|
|
30
|
+
size: iconSize
|
|
31
|
+
})
|
|
32
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
33
|
+
className: classNames(styles.highlightpanel__content, styles["highlightpanel__content--compact"]),
|
|
34
|
+
children: [title && /* @__PURE__ */ jsx("div", {
|
|
35
|
+
className: styles["highlightpanel__title-wrapper"],
|
|
36
|
+
children: titleElement
|
|
37
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
38
|
+
className: styles["highlightpanel__content__children--compact"],
|
|
39
|
+
children
|
|
40
|
+
})]
|
|
41
|
+
})] });
|
|
42
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("div", {
|
|
43
|
+
className: styles.highlightpanel__icon,
|
|
44
|
+
children: [typeof svgIcon === "string" ? /* @__PURE__ */ jsx(LazyIcon_default, {
|
|
45
|
+
iconName: svgIcon,
|
|
46
|
+
size: iconSize
|
|
47
|
+
}) : /* @__PURE__ */ jsx(Icon_default, {
|
|
48
|
+
svgIcon,
|
|
49
|
+
size: iconSize
|
|
50
|
+
}), title && breakpoint < Breakpoint.md && /* @__PURE__ */ jsx("div", {
|
|
51
|
+
className: styles["highlightpanel__title-wrapper"],
|
|
52
|
+
children: titleElement
|
|
53
|
+
})]
|
|
54
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
55
|
+
className: styles.highlightpanel__content,
|
|
56
|
+
children: [title && breakpoint >= Breakpoint.md && /* @__PURE__ */ jsx("div", {
|
|
57
|
+
className: styles["highlightpanel__title-wrapper"],
|
|
58
|
+
children: titleElement
|
|
59
|
+
}), children]
|
|
60
|
+
})] });
|
|
61
|
+
}
|
|
62
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [title && /* @__PURE__ */ jsx("div", {
|
|
63
|
+
className: styles.highlightpanel__content,
|
|
64
|
+
children: /* @__PURE__ */ jsx("div", { children: titleElement })
|
|
65
|
+
}), children] });
|
|
66
|
+
};
|
|
67
|
+
return /* @__PURE__ */ jsx(htmlMarkup, {
|
|
68
|
+
className: containerClassName,
|
|
69
|
+
"data-testid": testId,
|
|
70
|
+
"data-analyticsid": AnalyticsId.HighlightPanel,
|
|
71
|
+
children: renderContent()
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
//#endregion
|
|
75
|
+
//#region src/components/HighlightPanel/index.ts
|
|
76
|
+
var HighlightPanel_default = HighlightPanel;
|
|
77
|
+
//#endregion
|
|
2
78
|
export { HighlightPanel_default as default };
|
|
79
|
+
|
|
80
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/HighlightPanel/HighlightPanel.tsx","../../../src/components/HighlightPanel/index.ts"],"sourcesContent":["import classNames from 'classnames';\n\nimport type { PaletteNames } from '../../theme/palette';\nimport type { SvgIcon } from '../Icon';\nimport type { IconName } from '../Icons/IconNames';\nimport type { TitleTags } from '../Title';\n\nimport { useBreakpoint, Breakpoint } from '../..';\nimport { AnalyticsId } from '../../constants';\nimport Icon, { IconSize } from '../Icon';\nimport LazyIcon from '../LazyIcon';\nimport Title from '../Title';\n\nimport styles from './styles.module.scss';\n\nexport type HighlightPanelColors = Extract<PaletteNames, 'white' | 'neutral' | 'blueberry' | 'cherry'>;\n\nexport type HighlightPanelTags = Exclude<\n keyof HTMLElementTagNameMap,\n 'dir' | 'font' | 'frame' | 'frameset' | 'marquee' | 'applet' | 'basefont' | 'search'\n>;\n\nexport type HighlightPanelVariants = 'normal' | 'compact';\n\nexport interface HighlightPanelProps {\n /** What's in the box? */\n children: React.ReactNode;\n /** Changes the background color. Default: white */\n color?: HighlightPanelColors;\n /** Adds an icon to the highlightpanel. */\n svgIcon?: SvgIcon | IconName;\n /** Changes the underlying element. Default: div */\n htmlMarkup?: HighlightPanelTags;\n /** Adds custom classes to the element. */\n className?: string;\n /** Uses the compact styling if set to compact */\n variant?: HighlightPanelVariants;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Element that is set after the icon-element in the DOM, often a title-element */\n title?: string;\n /** Markup props for title */\n titleHtmlMarkup?: TitleTags;\n}\n\nconst HighlightPanel: React.FC<HighlightPanelProps> = props => {\n const {\n children,\n color = 'white',\n testId,\n svgIcon,\n htmlMarkup = 'div',\n className,\n variant = 'normal',\n title,\n titleHtmlMarkup = 'h2',\n } = props;\n const breakpoint = useBreakpoint();\n\n const containerClassName = classNames(\n styles.highlightpanel,\n styles[`highlightpanel--${color}`],\n svgIcon && styles['highlightpanel--has-icon'],\n className,\n { [styles['highlightpanel--compact']]: variant === 'compact' }\n );\n\n const renderContent = (): React.ReactNode => {\n const titleElement = title && (\n <Title testId=\"titleId\" htmlMarkup={titleHtmlMarkup} appearance={variant === 'compact' ? 'title6' : 'title4'}>\n {title}\n </Title>\n );\n\n if (svgIcon) {\n const iconSize = IconSize.Small;\n\n if (variant === 'compact') {\n return (\n <>\n <div className={classNames(styles.highlightpanel__icon, styles['highlightpanel__icon--compact'])}>\n {typeof svgIcon === 'string' ? <LazyIcon iconName={svgIcon} size={iconSize} /> : <Icon svgIcon={svgIcon} size={iconSize} />}\n </div>\n <div className={classNames(styles.highlightpanel__content, styles['highlightpanel__content--compact'])}>\n {title && <div className={styles['highlightpanel__title-wrapper']}>{titleElement}</div>}\n <div className={styles['highlightpanel__content__children--compact']}>{children}</div>\n </div>\n </>\n );\n }\n\n return (\n <>\n <div className={styles.highlightpanel__icon}>\n {typeof svgIcon === 'string' ? <LazyIcon iconName={svgIcon} size={iconSize} /> : <Icon svgIcon={svgIcon} size={iconSize} />}\n {title && breakpoint < Breakpoint.md && <div className={styles['highlightpanel__title-wrapper']}>{titleElement}</div>}\n </div>\n <div className={styles.highlightpanel__content}>\n {title && breakpoint >= Breakpoint.md && <div className={styles['highlightpanel__title-wrapper']}>{titleElement}</div>}\n {children}\n </div>\n </>\n );\n }\n\n return (\n <>\n {title && (\n <div className={styles.highlightpanel__content}>\n <div>{titleElement}</div>\n </div>\n )}\n {children}\n </>\n );\n };\n\n const CustomTag = htmlMarkup;\n\n return (\n <CustomTag className={containerClassName} data-testid={testId} data-analyticsid={AnalyticsId.HighlightPanel}>\n {renderContent()}\n </CustomTag>\n );\n};\n\nexport default HighlightPanel;\n","import HighlightPanel from './HighlightPanel';\nexport * from './HighlightPanel';\nexport default HighlightPanel;\n"],"mappings":";;;;;;;;;AA6CA,IAAM,kBAAgD,UAAS;CAC7D,MAAM,EACJ,UACA,QAAQ,SACR,QACA,SACA,aAAa,OACb,WACA,UAAU,UACV,OACA,kBAAkB,SAChB;CACJ,MAAM,aAAa,cAAc;CAEjC,MAAM,qBAAqB,WACzB,OAAO,gBACP,OAAO,mBAAmB,UAC1B,WAAW,OAAO,6BAClB,WACA,GAAG,OAAO,6BAA6B,YAAY,UAAU,CAC/D;CAEA,MAAM,sBAAuC;EAC3C,MAAM,eAAe,SACnB,oBAAC,eAAD;GAAO,QAAO;GAAU,YAAY;GAAiB,YAAY,YAAY,YAAY,WAAW;GACjG,UAAA;EACI,CAAA;EAGT,IAAI,SAAS;GACX,MAAM,WAAW,SAAS;GAE1B,IAAI,YAAY,WACd,OACE,qBAAA,UAAA,EAAA,UAAA,CACE,oBAAC,OAAD;IAAK,WAAW,WAAW,OAAO,sBAAsB,OAAO,gCAAgC;IAC5F,UAAA,OAAO,YAAY,WAAW,oBAAC,kBAAD;KAAU,UAAU;KAAS,MAAM;IAAW,CAAA,IAAI,oBAAC,cAAD;KAAe;KAAS,MAAM;IAAW,CAAA;GACvH,CAAA,GACL,qBAAC,OAAD;IAAK,WAAW,WAAW,OAAO,yBAAyB,OAAO,mCAAmC;IAArG,UAAA,CACG,SAAS,oBAAC,OAAD;KAAK,WAAW,OAAO;KAAmC,UAAA;IAAkB,CAAA,GACtF,oBAAC,OAAD;KAAK,WAAW,OAAO;KAAgD;IAAc,CAAA,CAClF;GACL,CAAA,CAAA,EAAA,CAAA;GAIN,OACE,qBAAA,UAAA,EAAA,UAAA,CACE,qBAAC,OAAD;IAAK,WAAW,OAAO;IAAvB,UAAA,CACG,OAAO,YAAY,WAAW,oBAAC,kBAAD;KAAU,UAAU;KAAS,MAAM;IAAW,CAAA,IAAI,oBAAC,cAAD;KAAe;KAAS,MAAM;IAAW,CAAA,GACzH,SAAS,aAAa,WAAW,MAAM,oBAAC,OAAD;KAAK,WAAW,OAAO;KAAmC,UAAA;IAAkB,CAAA,CACjH;GACL,CAAA,GAAA,qBAAC,OAAD;IAAK,WAAW,OAAO;IAAvB,UAAA,CACG,SAAS,cAAc,WAAW,MAAM,oBAAC,OAAD;KAAK,WAAW,OAAO;KAAmC,UAAA;IAAkB,CAAA,GACpH,QACE;GACL,CAAA,CAAA,EAAA,CAAA;EAEN;EAEA,OACE,qBAAA,UAAA,EAAA,UAAA,CACG,SACC,oBAAC,OAAD;GAAK,WAAW,OAAO;GACrB,UAAA,oBAAC,OAAD,EAAA,UAAM,aAAkB,CAAA;EACrB,CAAA,GAEN,QACD,EAAA,CAAA;CAEN;CAIA,OACE,oBAAC,YAAD;EAAW,WAAW;EAAoB,eAAa;EAAQ,oBAAkB,YAAY;EAC1F,UAAA,cAAc;CACN,CAAA;AAEf;;;AC1HA,IAAA,yBAAe"}
|
|
@@ -1,2 +1,72 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AnalyticsId, IconSize, LanguageLocales } from "../../constants.js";
|
|
2
|
+
import { t as Icon_default } from "../../Icon.js";
|
|
3
|
+
import { useLanguage } from "../../hooks/useLanguage.js";
|
|
4
|
+
import { t as LazyIcon_default } from "../../LazyIcon.js";
|
|
5
|
+
import Title_default from "../Title/index.js";
|
|
6
|
+
import { useExpand } from "../../hooks/useExpand.js";
|
|
7
|
+
import { t as getResources } from "../../resourceHelper2.js";
|
|
8
|
+
import classNames from "classnames";
|
|
9
|
+
import { useId } from "react";
|
|
10
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
import styles from "./styles.module.scss";
|
|
12
|
+
//#region src/components/InfoTeaser/InfoTeaser.tsx
|
|
13
|
+
var InfoTeaser = (props) => {
|
|
14
|
+
const { buttonClassName, children, className, expanded = false, htmlMarkup = "div", onExpand, resources, svgIcon, testId, title, titleHtmlMarkup = "h2", collapsedMaxHeight } = props;
|
|
15
|
+
const [isExpanded, setIsExpanded] = useExpand(expanded, onExpand);
|
|
16
|
+
const { language } = useLanguage(LanguageLocales.NORWEGIAN);
|
|
17
|
+
const defaultResources = getResources(language);
|
|
18
|
+
const infoteaserTextId = useId();
|
|
19
|
+
const mergedResources = {
|
|
20
|
+
...defaultResources,
|
|
21
|
+
...resources
|
|
22
|
+
};
|
|
23
|
+
return /* @__PURE__ */ jsxs(htmlMarkup, {
|
|
24
|
+
className: styles.wrapper,
|
|
25
|
+
"data-testid": testId,
|
|
26
|
+
"data-analyticsid": AnalyticsId.InfoTeaser,
|
|
27
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
28
|
+
className: classNames(styles.infoteaser, className, { [styles["infoteaser--collapsed"]]: !isExpanded }),
|
|
29
|
+
style: { maxHeight: !isExpanded ? collapsedMaxHeight ? collapsedMaxHeight : "12.25rem" : void 0 },
|
|
30
|
+
children: [
|
|
31
|
+
svgIcon && (typeof svgIcon === "string" ? /* @__PURE__ */ jsx(LazyIcon_default, {
|
|
32
|
+
iconName: svgIcon,
|
|
33
|
+
size: IconSize.Small,
|
|
34
|
+
className: styles.infoteaser__icon
|
|
35
|
+
}) : /* @__PURE__ */ jsx(Icon_default, {
|
|
36
|
+
svgIcon,
|
|
37
|
+
size: IconSize.Small,
|
|
38
|
+
className: styles.infoteaser__icon
|
|
39
|
+
})),
|
|
40
|
+
title && typeof title !== "undefined" && /* @__PURE__ */ jsx(Title_default, {
|
|
41
|
+
testId: "titleId",
|
|
42
|
+
htmlMarkup: titleHtmlMarkup,
|
|
43
|
+
appearance: "title4",
|
|
44
|
+
className: styles.infoteaser__title,
|
|
45
|
+
children: title
|
|
46
|
+
}),
|
|
47
|
+
/* @__PURE__ */ jsx("div", {
|
|
48
|
+
className: styles.infoteaser__text,
|
|
49
|
+
"aria-hidden": isExpanded ? false : true,
|
|
50
|
+
id: infoteaserTextId,
|
|
51
|
+
children
|
|
52
|
+
})
|
|
53
|
+
]
|
|
54
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
55
|
+
type: "button",
|
|
56
|
+
className: classNames(styles.infoteaser__button, buttonClassName),
|
|
57
|
+
onClick: () => {
|
|
58
|
+
setIsExpanded(!isExpanded);
|
|
59
|
+
},
|
|
60
|
+
"aria-expanded": isExpanded,
|
|
61
|
+
"aria-controls": infoteaserTextId,
|
|
62
|
+
children: isExpanded ? mergedResources.expandButtonOpen : mergedResources.expandButtonClose
|
|
63
|
+
})]
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
//#endregion
|
|
67
|
+
//#region src/components/InfoTeaser/index.ts
|
|
68
|
+
var InfoTeaser_default = InfoTeaser;
|
|
69
|
+
//#endregion
|
|
2
70
|
export { InfoTeaser_default as default };
|
|
71
|
+
|
|
72
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/InfoTeaser/InfoTeaser.tsx","../../../src/components/InfoTeaser/index.ts"],"sourcesContent":["import { useId } from 'react';\n\nimport classNames from 'classnames';\n\nimport type { HNDesignsystemInfoTeaser } from '../../resources/Resources';\nimport type { SvgIcon } from '../Icon';\nimport type { IconName } from '../Icons/IconNames';\nimport type { TitleTags } from '../Title';\n\nimport { AnalyticsId, LanguageLocales } from '../../constants';\nimport { useExpand } from '../../hooks/useExpand';\nimport { useLanguage } from '../../hooks/useLanguage';\nimport Icon, { IconSize } from '../Icon';\nimport LazyIcon from '../LazyIcon';\nimport Title from '../Title';\nimport { getResources } from './resourceHelper';\n\nimport styles from './styles.module.scss';\n\nexport type InfoTeaserTags = 'div' | 'section' | 'aside' | 'article';\n\nexport interface InfoTeaserProps {\n /** For overriding styling on the button */\n buttonClassName?: string;\n /** What's in the box? */\n children: React.ReactNode;\n /** Override the default max height for collapsed teaser. Default is 12.25rem */\n collapsedMaxHeight?: string;\n /** For overriding styling on infoteaser box */\n className?: string;\n /** Opens or closes the teaser */\n expanded?: boolean;\n /** Changes the underlying element of the wrapper */\n htmlMarkup?: InfoTeaserTags;\n /** Called when the teaser is expanded/collapsed. */\n onExpand?: (isExpanded: boolean) => void;\n /** Resources for component */\n resources?: Partial<HNDesignsystemInfoTeaser>;\n /** Adds an icon */\n svgIcon?: SvgIcon | IconName;\n /** Sets the data-testid attribute */\n testId?: string;\n /** Title on top of the component */\n title?: string;\n /** Markup props for title */\n titleHtmlMarkup?: TitleTags;\n}\n\nconst InfoTeaser: React.FC<InfoTeaserProps> = props => {\n const {\n buttonClassName,\n children,\n className,\n expanded = false,\n htmlMarkup = 'div',\n onExpand,\n resources,\n svgIcon,\n testId,\n title,\n titleHtmlMarkup = 'h2',\n collapsedMaxHeight,\n } = props;\n const [isExpanded, setIsExpanded] = useExpand(expanded, onExpand);\n const { language } = useLanguage<LanguageLocales>(LanguageLocales.NORWEGIAN);\n const defaultResources = getResources(language);\n const infoteaserTextId = useId();\n\n const mergedResources: HNDesignsystemInfoTeaser = {\n ...defaultResources,\n ...resources,\n };\n\n const WrapperTag = htmlMarkup;\n\n return (\n <WrapperTag className={styles.wrapper} data-testid={testId} data-analyticsid={AnalyticsId.InfoTeaser}>\n <div\n className={classNames(styles.infoteaser, className, {\n [styles['infoteaser--collapsed']]: !isExpanded,\n })}\n style={{ maxHeight: !isExpanded ? (collapsedMaxHeight ? collapsedMaxHeight : '12.25rem') : undefined }}\n >\n {svgIcon &&\n (typeof svgIcon === 'string' ? (\n <LazyIcon iconName={svgIcon} size={IconSize.Small} className={styles.infoteaser__icon} />\n ) : (\n <Icon svgIcon={svgIcon} size={IconSize.Small} className={styles.infoteaser__icon} />\n ))}\n {title && typeof title !== 'undefined' && (\n <Title testId=\"titleId\" htmlMarkup={titleHtmlMarkup} appearance=\"title4\" className={styles.infoteaser__title}>\n {title}\n </Title>\n )}\n <div className={styles.infoteaser__text} aria-hidden={isExpanded ? false : true} id={infoteaserTextId}>\n {children}\n </div>\n </div>\n <button\n type=\"button\"\n className={classNames(styles.infoteaser__button, buttonClassName)}\n onClick={() => {\n setIsExpanded(!isExpanded);\n }}\n aria-expanded={isExpanded}\n aria-controls={infoteaserTextId}\n >\n {isExpanded ? mergedResources.expandButtonOpen : mergedResources.expandButtonClose}\n </button>\n </WrapperTag>\n );\n};\n\nexport default InfoTeaser;\n","import InfoTeaser from './InfoTeaser';\nexport * from './InfoTeaser';\nexport default InfoTeaser;\n"],"mappings":";;;;;;;;;;;;AAgDA,IAAM,cAAwC,UAAS;CACrD,MAAM,EACJ,iBACA,UACA,WACA,WAAW,OACX,aAAa,OACb,UACA,WACA,SACA,QACA,OACA,kBAAkB,MAClB,uBACE;CACJ,MAAM,CAAC,YAAY,iBAAiB,UAAU,UAAU,QAAQ;CAChE,MAAM,EAAE,aAAa,YAA6B,gBAAgB,SAAS;CAC3E,MAAM,mBAAmB,aAAa,QAAQ;CAC9C,MAAM,mBAAmB,MAAM;CAE/B,MAAM,kBAA4C;EAChD,GAAG;EACH,GAAG;CACL;CAIA,OACE,qBAAC,YAAD;EAAY,WAAW,OAAO;EAAS,eAAa;EAAQ,oBAAkB,YAAY;EAA1F,UAAA,CACE,qBAAC,OAAD;GACE,WAAW,WAAW,OAAO,YAAY,WAAW,GACjD,OAAO,2BAA2B,CAAC,WACtC,CAAC;GACD,OAAO,EAAE,WAAW,CAAC,aAAc,qBAAqB,qBAAqB,aAAc,KAAA,EAAU;GAJvG,UAAA;IAMG,YACE,OAAO,YAAY,WAClB,oBAAC,kBAAD;KAAU,UAAU;KAAS,MAAM,SAAS;KAAO,WAAW,OAAO;IAAmB,CAAA,IAExF,oBAAC,cAAD;KAAe;KAAS,MAAM,SAAS;KAAO,WAAW,OAAO;IAAmB,CAAA;IAEtF,SAAS,OAAO,UAAU,eACzB,oBAAC,eAAD;KAAO,QAAO;KAAU,YAAY;KAAiB,YAAW;KAAS,WAAW,OAAO;KACxF,UAAA;IACI,CAAA;IAET,oBAAC,OAAD;KAAK,WAAW,OAAO;KAAkB,eAAa,aAAa,QAAQ;KAAM,IAAI;KAClF;IACE,CAAA;GACF;EACL,CAAA,GAAA,oBAAC,UAAD;GACE,MAAK;GACL,WAAW,WAAW,OAAO,oBAAoB,eAAe;GAChE,eAAe;IACb,cAAc,CAAC,UAAU;GAC3B;GACA,iBAAe;GACf,iBAAe;GAEd,UAAA,aAAa,gBAAgB,mBAAmB,gBAAgB;EAC3D,CAAA,CACE;;AAEhB;;;AC7GA,IAAA,qBAAe"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
|
-
@use '../../scss/spacers' as spacers;
|
|
3
2
|
@use '../../scss/palette' as palette;
|
|
4
3
|
@use '../../scss/font-settings' as font-settings;
|
|
5
4
|
@use '../../scss/breakpoints' as breakpoints;
|
|
6
5
|
@use '../../scss/screen-reader' as *;
|
|
6
|
+
@import '../../scss/supernova/styles/spacers';
|
|
7
7
|
|
|
8
8
|
$padding-clickable-area-top-bottom: 8px;
|
|
9
9
|
$padding-clickable-area-left: 8px;
|
|
@@ -19,10 +19,10 @@ $padding-clickable-area-left: 8px;
|
|
|
19
19
|
margin-left: -$padding-clickable-area-left;
|
|
20
20
|
|
|
21
21
|
&__large {
|
|
22
|
-
margin:
|
|
22
|
+
margin-bottom: var(--core-space-2xs);
|
|
23
23
|
|
|
24
24
|
&:has(input:focus-visible) {
|
|
25
|
-
box-shadow: 0 0 0
|
|
25
|
+
box-shadow: 0 0 0 var(--core-space-3xs);
|
|
26
26
|
color: palette.$neutral500;
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -62,7 +62,7 @@ $padding-clickable-area-left: 8px;
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
&__large {
|
|
65
|
-
padding:
|
|
65
|
+
padding: var(--core-space-s);
|
|
66
66
|
background-color: palette.$neutral50;
|
|
67
67
|
border: 1px solid transparent;
|
|
68
68
|
|
|
@@ -168,7 +168,7 @@ $padding-clickable-area-left: 8px;
|
|
|
168
168
|
|
|
169
169
|
@media (min-width: map.get(breakpoints.$grid-breakpoints, md)) {
|
|
170
170
|
&__large {
|
|
171
|
-
padding: 1.68rem
|
|
171
|
+
padding: 1.68rem var(--core-space-l);
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
174
|
}
|
|
@@ -178,7 +178,7 @@ $padding-clickable-area-left: 8px;
|
|
|
178
178
|
}
|
|
179
179
|
|
|
180
180
|
.radio-button__marker-wrapper {
|
|
181
|
-
margin-right:
|
|
181
|
+
margin-right: var(--core-space-s);
|
|
182
182
|
}
|
|
183
183
|
|
|
184
184
|
.radiobutton-sublabel-wrapper {
|