@helsenorge/designsystem-react 10.1.0 → 10.3.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/AnchorLink.js +2 -2
- package/AnchorLink.js.map +1 -1
- package/Avatar.js +2 -2
- package/Avatar.js.map +1 -1
- package/Badge.js +3 -3
- package/Badge.js.map +1 -1
- package/Button.js +4 -4
- package/Button.js.map +1 -1
- package/CHANGELOG.md +1392 -801
- package/Checkbox.js +2 -2
- package/Checkbox.js.map +1 -1
- package/Close.js +2 -2
- package/Close.js.map +1 -1
- package/ErrorBoundary.js +2 -2
- package/ErrorBoundary.js.map +1 -1
- package/FormGroup.js +12 -12
- package/FormGroup.js.map +1 -1
- package/FormLayout.js +3 -3
- package/FormLayout.js.map +1 -1
- package/HelpBubble.js +2 -2
- package/HelpBubble.js.map +1 -1
- package/HighlightPanel.js +2 -2
- package/HighlightPanel.js.map +1 -1
- package/Icon.js +3 -3
- package/Icon.js.map +1 -1
- package/Illustration.js +3 -3
- package/Illustration.js.map +1 -1
- package/Input.js +2 -2
- package/Input.js.map +1 -1
- package/Label.js +8 -8
- package/Label.js.map +1 -1
- package/LazyIcon.js +1 -1
- package/LazyIllustration.js +3 -3
- package/LazyIllustration.js.map +1 -1
- package/LinkList.js +6 -6
- package/LinkList.js.map +1 -1
- package/ListHeader.js +7 -7
- package/ListHeader.js.map +1 -1
- package/Panel.js +2 -2
- package/Panel.js.map +1 -1
- package/PopOver.js +2 -2
- package/PopOver.js.map +1 -1
- package/RadioButton.js +2 -2
- package/RadioButton.js.map +1 -1
- package/Select.js +2 -2
- package/Select.js.map +1 -1
- package/Slider.js +3 -3
- package/Slider.js.map +1 -1
- package/Spacer.js +2 -2
- package/Spacer.js.map +1 -1
- package/StatusDot.js +1 -1
- package/StepButtons.js +4 -4
- package/StepButtons.js.map +1 -1
- package/TabList.js +4 -4
- package/TabList.js.map +1 -1
- package/Table.js +2 -2
- package/Table.js.map +1 -1
- package/TableBody.js +2 -2
- package/TableBody.js.map +1 -1
- package/TableExpandedRow.js +2 -2
- package/TableExpandedRow.js.map +1 -1
- package/TableHead.js +2 -2
- package/TableHead.js.map +1 -1
- package/TableRow.js +2 -2
- package/TableRow.js.map +1 -1
- package/Textarea.js +2 -2
- package/Textarea.js.map +1 -1
- package/Title.js +2 -2
- package/Title.js.map +1 -1
- package/TooltipWord.js +2 -2
- package/TooltipWord.js.map +1 -1
- package/Trigger.js +3 -3
- package/Trigger.js.map +1 -1
- package/components/AnchorLink/styles.module.scss +8 -9
- package/components/Avatar/styles.module.scss +9 -9
- package/components/Badge/styles.module.scss +9 -9
- package/components/Button/styles.module.scss +68 -57
- package/components/Checkbox/styles.module.scss +103 -103
- package/components/Chip/styles.module.scss +22 -22
- package/components/Close/styles.module.scss +4 -4
- package/components/DictionaryTrigger/index.js +2 -2
- package/components/DictionaryTrigger/index.js.map +1 -1
- package/components/DictionaryTrigger/styles.module.scss +5 -5
- package/components/Drawer/Drawer.d.ts +41 -0
- package/components/Drawer/Drawer.test.d.ts +1 -0
- package/components/Drawer/index.d.ts +3 -0
- package/components/Drawer/index.js +350 -0
- package/components/Drawer/index.js.map +1 -0
- package/components/Drawer/styles.module.scss +127 -0
- package/components/Drawer/styles.module.scss.d.ts +16 -0
- package/components/Dropdown/index.js +3 -3
- package/components/Dropdown/index.js.map +1 -1
- package/components/Dropdown/styles.module.scss +51 -51
- package/components/Duolist/index.js +6 -5
- package/components/Duolist/index.js.map +1 -1
- package/components/Duolist/styles.module.scss +57 -35
- package/components/Duolist/styles.module.scss.d.ts +1 -0
- package/components/EmptyState/styles.module.scss +12 -12
- package/components/ErrorWrapper/styles.module.scss +11 -21
- package/components/ErrorWrapper/styles.module.scss.d.ts +0 -1
- package/components/Expander/styles.module.scss +46 -46
- package/components/ExpanderHierarchy/expander.module.scss +29 -29
- package/components/ExpanderHierarchy/index.js +5 -5
- package/components/ExpanderHierarchy/index.js.map +1 -1
- package/components/ExpanderHierarchy/styles.module.scss +4 -5
- package/components/ExpanderList/index.js +8 -8
- package/components/ExpanderList/index.js.map +1 -1
- package/components/ExpanderList/styles.module.scss +30 -30
- package/components/EyebrowHeader/styles.module.scss +0 -2
- package/components/FormGroup/styles.module.scss +9 -9
- package/components/FormLayout/styles.module.scss +4 -5
- package/components/HelpBubble/styles.module.scss +13 -13
- package/components/HelpPanel/styles.module.scss +2 -2
- package/components/HelpQuestion/index.js +2 -2
- package/components/HelpQuestion/index.js.map +1 -1
- package/components/HelpQuestion/styles.module.scss +19 -19
- package/components/HighlightPanel/styles.module.scss +22 -54
- package/components/HighlightPanel/styles.module.scss.d.ts +1 -2
- package/components/HorizontalScroll/styles.module.scss +4 -3
- package/components/Icons/EuropeanHealthCard.js +1 -1
- package/components/Icons/GroupTwins.js +1 -1
- package/components/Icons/Inbox.js +1 -1
- package/components/Icons/LawBook.js +1 -1
- package/components/Icons/PersonCancel.js +1 -1
- package/components/Icons/PersonWithBrain.js +1 -1
- package/components/Icons/Puzzle.js +1 -1
- package/components/Icons/Snapchat.js +1 -1
- package/components/Illustrations/IllustrationNames.d.ts +1 -1
- package/components/Illustrations/IllustrationNames.js +4 -2
- package/components/Illustrations/IllustrationNames.js.map +1 -1
- package/components/Illustrations/ReadLetters.d.ts +9 -0
- package/components/Illustrations/ReadLetters.js +11 -0
- package/components/Illustrations/ReadLetters.js.map +1 -0
- package/components/Illustrations/ReadLettersMedium.d.ts +4 -0
- package/components/Illustrations/ReadLettersMedium.js +110 -0
- package/components/Illustrations/ReadLettersMedium.js.map +1 -0
- package/components/Illustrations/Support2.d.ts +9 -0
- package/components/Illustrations/Support2.js +11 -0
- package/components/Illustrations/Support2.js.map +1 -0
- package/components/Illustrations/Support2Medium.d.ts +4 -0
- package/components/Illustrations/Support2Medium.js +232 -0
- package/components/Illustrations/Support2Medium.js.map +1 -0
- package/components/Input/styles.module.scss +12 -12
- package/components/Label/styles.module.scss +28 -24
- package/components/Label/styles.module.scss.d.ts +3 -1
- package/components/LinkList/styles.module.scss +33 -33
- package/components/List/styles.module.scss +7 -7
- package/components/ListHeader/styles.module.scss +8 -8
- package/components/Loader/styles.module.scss +14 -14
- package/components/MaxCharacters/styles.module.scss +11 -11
- package/components/Modal/index.js +71 -82
- package/components/Modal/index.js.map +1 -1
- package/components/Modal/styles.module.scss +45 -39
- package/components/NotificationPanel/index.js +3 -3
- package/components/NotificationPanel/index.js.map +1 -1
- package/components/NotificationPanel/styles.module.scss +33 -33
- package/components/Panel/styles.module.scss +45 -45
- package/components/PanelList/index.js +5 -5
- package/components/PanelList/index.js.map +1 -1
- package/components/PanelList/styles.module.scss +5 -5
- package/components/PopMenu/index.js +5 -5
- package/components/PopMenu/index.js.map +1 -1
- package/components/PopMenu/styles.module.scss +15 -15
- package/components/PopOver/styles.module.scss +13 -14
- package/components/PopOver/styles.module.scss.d.ts +0 -3
- package/components/Portal/index.js +3 -3
- package/components/Portal/index.js.map +1 -1
- package/components/Progressbar/styles.module.scss +4 -4
- package/components/PromoPanel/index.js +2 -2
- package/components/PromoPanel/index.js.map +1 -1
- package/components/PromoPanel/styles.module.scss +22 -22
- package/components/RadioButton/styles.module.scss +99 -99
- package/components/Select/styles.module.scss +21 -21
- package/components/ServiceMessage/styles.module.scss +49 -49
- package/components/SharingStatus/styles.module.scss +13 -13
- package/components/Slider/styles.module.scss +24 -24
- package/components/Spacer/styles.module.scss +14 -14
- package/components/StatusDot/styles.module.scss +22 -22
- package/components/Step/styles.module.scss +3 -3
- package/components/StepButtons/styles.module.scss +9 -9
- package/components/Stepper/styles.module.scss +23 -15
- package/components/StickyNote/styles.module.scss +3 -3
- package/components/Table/styles.module.scss +32 -32
- package/components/Tabs/TabList/styles.module.scss +1 -1
- package/components/Tabs/TabPanel/styles.module.scss +5 -5
- package/components/Tabs/index.js +3 -3
- package/components/Tabs/index.js.map +1 -1
- package/components/Tabs/styles.module.scss +1 -1
- package/components/Tag/styles.module.scss +16 -16
- package/components/TagList/index.js +2 -2
- package/components/TagList/index.js.map +1 -1
- package/components/TagList/styles.module.scss +4 -4
- package/components/Textarea/styles.module.scss +9 -9
- package/components/Tile/index.js +6 -6
- package/components/Tile/index.js.map +1 -1
- package/components/Tile/styles.module.scss +25 -25
- package/components/Title/styles.module.scss +8 -8
- package/components/Toggle/index.js +3 -3910
- package/components/Toggle/index.js.map +1 -1
- package/components/Toggle/styles.module.scss +14 -14
- package/components/Tooltip/TooltipWord/styles.module.scss +4 -4
- package/components/Tooltip/index.js +2 -2
- package/components/Tooltip/index.js.map +1 -1
- package/components/Trigger/styles.module.scss +21 -21
- package/components/Validation/index.js +6 -6
- package/components/Validation/index.js.map +1 -1
- package/components/Validation/styles.module.scss +10 -10
- package/constants.d.ts +1 -0
- package/constants.js +1 -0
- package/constants.js.map +1 -1
- package/hoc/withBreakpoint/withBreakpoint.js +2 -2
- package/hoc/withBreakpoint/withBreakpoint.js.map +1 -1
- package/hooks/useBreakpoint.d.ts +0 -4
- package/hooks/useBreakpoint.js +23 -18
- package/hooks/useBreakpoint.js.map +1 -1
- package/hooks/useEventListenerState.js +3 -3
- package/hooks/useEventListenerState.js.map +1 -1
- package/hooks/useReturnFocusOnUnmount.d.ts +5 -0
- package/hooks/useReturnFocusOnUnmount.js +20 -0
- package/hooks/useReturnFocusOnUnmount.js.map +1 -0
- package/package.json +1 -1
- package/scss/_body.scss +5 -6
- package/scss/_breakpoints.scss +8 -2
- package/scss/_font-mixins.scss +57 -2
- package/scss/_fonts.scss +0 -2
- package/scss/_input.scss +53 -50
- package/scss/_print.scss +2 -2
- package/scss/layout.module.scss +2 -2
- package/scss/typography.module.scss +62 -37
- package/scss/typography.module.scss.d.ts +6 -0
- package/scss/typography.stories.tsx +24 -0
- package/theme/index.js +2 -2
- package/use-animate.js +3952 -0
- package/use-animate.js.map +1 -0
- package/utils/accessibility.d.ts +1 -0
- package/utils/accessibility.js +6 -1
- package/utils/accessibility.js.map +1 -1
- package/utils/component.js +4 -4
- package/utils/component.js.map +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
@
|
|
2
|
-
@
|
|
3
|
-
@
|
|
1
|
+
@use '../../scss/spacers' as spacers;
|
|
2
|
+
@use '../../scss/palette' as palette;
|
|
3
|
+
@use '../../scss/breakpoints' as *;
|
|
4
4
|
|
|
5
5
|
.tag-list {
|
|
6
6
|
all: unset;
|
|
7
7
|
display: inline-flex;
|
|
8
8
|
align-items: center;
|
|
9
9
|
flex-wrap: wrap;
|
|
10
|
-
gap: getSpacer(2xs);
|
|
10
|
+
gap: spacers.getSpacer(2xs);
|
|
11
11
|
|
|
12
12
|
&__item {
|
|
13
13
|
all: unset;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
@
|
|
2
|
-
@
|
|
3
|
-
@
|
|
4
|
-
@
|
|
5
|
-
@
|
|
1
|
+
@use '../../scss/spacers' as spacers;
|
|
2
|
+
@use '../../scss/palette' as palette;
|
|
3
|
+
@use '../../scss/font-mixins' as fonts;
|
|
4
|
+
@use '../../scss/input' as input;
|
|
5
|
+
@use '../../scss/breakpoints' as *;
|
|
6
6
|
|
|
7
7
|
.textarea {
|
|
8
|
-
@include input-wrapper;
|
|
8
|
+
@include input.input-wrapper;
|
|
9
9
|
|
|
10
10
|
&--gutterBottom {
|
|
11
|
-
margin-bottom: getSpacer(s);
|
|
11
|
+
margin-bottom: spacers.getSpacer(s);
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
.input-container {
|
|
16
|
-
@include input-container;
|
|
16
|
+
@include input.input-container;
|
|
17
17
|
|
|
18
18
|
&__input {
|
|
19
|
-
@include input-text;
|
|
19
|
+
@include fonts.input-text;
|
|
20
20
|
|
|
21
21
|
height: auto;
|
|
22
22
|
padding: 16px;
|
package/components/Tile/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import React__default from "react";
|
|
3
3
|
import classNames from "classnames";
|
|
4
4
|
import { AnalyticsId, IconSize } from "../../constants.js";
|
|
5
5
|
import { useBreakpoint, Breakpoint } from "../../hooks/useBreakpoint.js";
|
|
6
6
|
import { useHover } from "../../hooks/useHover.js";
|
|
7
7
|
import { mergeRefs } from "../../utils/refs.js";
|
|
8
8
|
import tileStyles from "./styles.module.scss";
|
|
9
|
-
const Title =
|
|
9
|
+
const Title = React__default.forwardRef((props, ref) => {
|
|
10
10
|
const { compact, children, className, htmlMarkup = "span", highlighted } = props;
|
|
11
11
|
const titleClasses = classNames(
|
|
12
12
|
tileStyles["tile__title"],
|
|
@@ -20,7 +20,7 @@ const Title = React.forwardRef((props, ref) => {
|
|
|
20
20
|
return /* @__PURE__ */ jsx(CustomTag, { className: titleClasses, ref, children });
|
|
21
21
|
});
|
|
22
22
|
Title.displayName = "Title";
|
|
23
|
-
const Tile =
|
|
23
|
+
const Tile = React__default.forwardRef((props, ref) => {
|
|
24
24
|
const {
|
|
25
25
|
children,
|
|
26
26
|
icon,
|
|
@@ -65,8 +65,8 @@ const Tile = React.forwardRef((props, ref) => {
|
|
|
65
65
|
onClick,
|
|
66
66
|
children: [
|
|
67
67
|
/* @__PURE__ */ jsxs("div", { className: tileTitleWrapperClasses, children: [
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
React__default.cloneElement(icon, { size: mobile ? IconSize.Small : IconSize.Medium, isHovered, color: highlighted ? "white" : "black" }),
|
|
69
|
+
React__default.cloneElement(title, { highlighted, compact })
|
|
70
70
|
] }),
|
|
71
71
|
!compact && !mobile && /* @__PURE__ */ jsx("p", { className: tileStyles.tile__description, children: description }),
|
|
72
72
|
children && /* @__PURE__ */ jsx("div", { className: tileStyles.tile__children, children })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/Tile/Tile.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\nimport { TitleTags } from './../Title/Title';\nimport { useBreakpoint, Breakpoint } from '../../hooks/useBreakpoint';\nimport { useHover } from '../../hooks/useHover';\nimport { mergeRefs } from '../../utils/refs';\nimport { IconSize } from '../Icon';\n\nimport tileStyles from './styles.module.scss';\n\nexport type TileVariants = 'normal' | 'compact';\n\ninterface TileProps extends Pick<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'href' | 'target' | 'onClick' | 'rel'> {\n children?: React.ReactNode;\n /** Adds custom classes to the element. */\n className?: string;\n /**\tSets the icon to be displayed inside the tile. */\n icon: React.ReactElement;\n /**\tSets the title to be displayed inside the tile. */\n title: React.ReactElement;\n /** Toggles the highlighted style of the tile. */\n highlighted?: boolean;\n /** Sets the description to be displayed inside the tile. */\n description?: string;\n /** Sets a fixed max and min width for the tile. */\n fixed?: boolean;\n /** Sets the visual variant of the component */\n variant?: TileVariants;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\ninterface TileTitleProps {\n children: React.ReactNode;\n className?: string;\n htmlMarkup?: TitleTags;\n highlighted?: boolean;\n compact?: boolean;\n}\n\nexport interface TileCompound extends React.ForwardRefExoticComponent<TileProps & React.RefAttributes<HTMLAnchorElement>> {\n Title: React.ForwardRefExoticComponent<TileTitleProps & React.RefAttributes<HTMLHeadingElement>>;\n}\n\nconst Title = React.forwardRef<HTMLHeadingElement, TileTitleProps>((props, ref) => {\n const { compact, children, className, htmlMarkup = 'span', highlighted } = props;\n const titleClasses = classNames(\n tileStyles['tile__title'],\n {\n [tileStyles['tile__title--highlighted']]: highlighted,\n [tileStyles['tile__title--compact']]: compact,\n },\n className\n );\n const CustomTag = htmlMarkup;\n\n return (\n <CustomTag className={titleClasses} ref={ref}>\n {children}\n </CustomTag>\n );\n});\n\nTitle.displayName = 'Title';\n\nexport const Tile = React.forwardRef<HTMLAnchorElement, TileProps>((props, ref) => {\n const {\n children,\n icon,\n title,\n className = '',\n description,\n fixed = false,\n highlighted = false,\n testId,\n target,\n rel,\n variant = 'normal',\n href,\n onClick,\n } = props;\n const { hoverRef, isHovered } = useHover<HTMLAnchorElement>();\n const breakpoint = useBreakpoint();\n const mobile = breakpoint < Breakpoint.md;\n const compact = variant === 'compact';\n const tileClasses = classNames(\n tileStyles.tile,\n {\n [tileStyles['tile--fixed']]: fixed,\n [tileStyles['tile--compact']]: compact,\n [tileStyles['tile--highlighted']]: highlighted,\n },\n className\n );\n const tileTitleWrapperClasses = classNames(tileStyles['title-wrapper'], {\n [tileStyles['title-wrapper--compact']]: compact,\n });\n\n return (\n <a\n ref={mergeRefs([ref, hoverRef])}\n href={href}\n target={target}\n rel={target === '_blank' ? 'noopener noreferrer' : rel}\n className={tileClasses}\n data-testid={testId}\n data-analyticsid={AnalyticsId.Tile}\n onClick={onClick}\n >\n <div className={tileTitleWrapperClasses}>\n {React.cloneElement(icon, { size: mobile ? IconSize.Small : IconSize.Medium, isHovered, color: highlighted ? 'white' : 'black' })}\n {React.cloneElement(title, { highlighted: highlighted, compact: compact })}\n </div>\n {!compact && !mobile && <p className={tileStyles.tile__description}>{description}</p>}\n {children && <div className={tileStyles.tile__children}>{children}</div>}\n </a>\n );\n}) as TileCompound;\n\nTile.displayName = 'Tile';\nTile.Title = Title;\n\nexport default Tile;\n"],"names":[],"mappings":";;;;;;;;AA+CA,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/Tile/Tile.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\nimport { TitleTags } from './../Title/Title';\nimport { useBreakpoint, Breakpoint } from '../../hooks/useBreakpoint';\nimport { useHover } from '../../hooks/useHover';\nimport { mergeRefs } from '../../utils/refs';\nimport { IconSize } from '../Icon';\n\nimport tileStyles from './styles.module.scss';\n\nexport type TileVariants = 'normal' | 'compact';\n\ninterface TileProps extends Pick<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'href' | 'target' | 'onClick' | 'rel'> {\n children?: React.ReactNode;\n /** Adds custom classes to the element. */\n className?: string;\n /**\tSets the icon to be displayed inside the tile. */\n icon: React.ReactElement;\n /**\tSets the title to be displayed inside the tile. */\n title: React.ReactElement;\n /** Toggles the highlighted style of the tile. */\n highlighted?: boolean;\n /** Sets the description to be displayed inside the tile. */\n description?: string;\n /** Sets a fixed max and min width for the tile. */\n fixed?: boolean;\n /** Sets the visual variant of the component */\n variant?: TileVariants;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\ninterface TileTitleProps {\n children: React.ReactNode;\n className?: string;\n htmlMarkup?: TitleTags;\n highlighted?: boolean;\n compact?: boolean;\n}\n\nexport interface TileCompound extends React.ForwardRefExoticComponent<TileProps & React.RefAttributes<HTMLAnchorElement>> {\n Title: React.ForwardRefExoticComponent<TileTitleProps & React.RefAttributes<HTMLHeadingElement>>;\n}\n\nconst Title = React.forwardRef<HTMLHeadingElement, TileTitleProps>((props, ref) => {\n const { compact, children, className, htmlMarkup = 'span', highlighted } = props;\n const titleClasses = classNames(\n tileStyles['tile__title'],\n {\n [tileStyles['tile__title--highlighted']]: highlighted,\n [tileStyles['tile__title--compact']]: compact,\n },\n className\n );\n const CustomTag = htmlMarkup;\n\n return (\n <CustomTag className={titleClasses} ref={ref}>\n {children}\n </CustomTag>\n );\n});\n\nTitle.displayName = 'Title';\n\nexport const Tile = React.forwardRef<HTMLAnchorElement, TileProps>((props, ref) => {\n const {\n children,\n icon,\n title,\n className = '',\n description,\n fixed = false,\n highlighted = false,\n testId,\n target,\n rel,\n variant = 'normal',\n href,\n onClick,\n } = props;\n const { hoverRef, isHovered } = useHover<HTMLAnchorElement>();\n const breakpoint = useBreakpoint();\n const mobile = breakpoint < Breakpoint.md;\n const compact = variant === 'compact';\n const tileClasses = classNames(\n tileStyles.tile,\n {\n [tileStyles['tile--fixed']]: fixed,\n [tileStyles['tile--compact']]: compact,\n [tileStyles['tile--highlighted']]: highlighted,\n },\n className\n );\n const tileTitleWrapperClasses = classNames(tileStyles['title-wrapper'], {\n [tileStyles['title-wrapper--compact']]: compact,\n });\n\n return (\n <a\n ref={mergeRefs([ref, hoverRef])}\n href={href}\n target={target}\n rel={target === '_blank' ? 'noopener noreferrer' : rel}\n className={tileClasses}\n data-testid={testId}\n data-analyticsid={AnalyticsId.Tile}\n onClick={onClick}\n >\n <div className={tileTitleWrapperClasses}>\n {React.cloneElement(icon, { size: mobile ? IconSize.Small : IconSize.Medium, isHovered, color: highlighted ? 'white' : 'black' })}\n {React.cloneElement(title, { highlighted: highlighted, compact: compact })}\n </div>\n {!compact && !mobile && <p className={tileStyles.tile__description}>{description}</p>}\n {children && <div className={tileStyles.tile__children}>{children}</div>}\n </a>\n );\n}) as TileCompound;\n\nTile.displayName = 'Tile';\nTile.Title = Title;\n\nexport default Tile;\n"],"names":["React"],"mappings":";;;;;;;;AA+CA,MAAM,QAAQA,eAAM,WAA+C,CAAC,OAAO,QAAQ;AACjF,QAAM,EAAE,SAAS,UAAU,WAAW,aAAa,QAAQ,gBAAgB;AAC3E,QAAM,eAAe;AAAA,IACnB,WAAW,aAAa;AAAA,IACxB;AAAA,MACE,CAAC,WAAW,0BAA0B,CAAC,GAAG;AAAA,MAC1C,CAAC,WAAW,sBAAsB,CAAC,GAAG;AAAA,IACxC;AAAA,IACA;AAAA,EACF;AACA,QAAM,YAAY;AAElB,SACG,oBAAA,WAAA,EAAU,WAAW,cAAc,KACjC,UACH;AAEJ,CAAC;AAED,MAAM,cAAc;AAEb,MAAM,OAAOA,eAAM,WAAyC,CAAC,OAAO,QAAQ;AAC3E,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,YAAY;AAAA,IACZ;AAAA,IACA,QAAQ;AAAA,IACR,cAAc;AAAA,IACd;AAAA,IACA;AAAA,IACA;AAAA,IACA,UAAU;AAAA,IACV;AAAA,IACA;AAAA,EAAA,IACE;AACJ,QAAM,EAAE,UAAU,UAAU,IAAI,SAA4B;AAC5D,QAAM,aAAa,cAAc;AAC3B,QAAA,SAAS,aAAa,WAAW;AACvC,QAAM,UAAU,YAAY;AAC5B,QAAM,cAAc;AAAA,IAClB,WAAW;AAAA,IACX;AAAA,MACE,CAAC,WAAW,aAAa,CAAC,GAAG;AAAA,MAC7B,CAAC,WAAW,eAAe,CAAC,GAAG;AAAA,MAC/B,CAAC,WAAW,mBAAmB,CAAC,GAAG;AAAA,IACrC;AAAA,IACA;AAAA,EACF;AACA,QAAM,0BAA0B,WAAW,WAAW,eAAe,GAAG;AAAA,IACtE,CAAC,WAAW,wBAAwB,CAAC,GAAG;AAAA,EAAA,CACzC;AAGC,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAK,UAAU,CAAC,KAAK,QAAQ,CAAC;AAAA,MAC9B;AAAA,MACA;AAAA,MACA,KAAK,WAAW,WAAW,wBAAwB;AAAA,MACnD,WAAW;AAAA,MACX,eAAa;AAAA,MACb,oBAAkB,YAAY;AAAA,MAC9B;AAAA,MAEA,UAAA;AAAA,QAAC,qBAAA,OAAA,EAAI,WAAW,yBACb,UAAA;AAAA,UAAAA,eAAM,aAAa,MAAM,EAAE,MAAM,SAAS,SAAS,QAAQ,SAAS,QAAQ,WAAW,OAAO,cAAc,UAAU,SAAS;AAAA,UAC/HA,eAAM,aAAa,OAAO,EAAE,aAA0B,QAAkB,CAAA;AAAA,QAAA,GAC3E;AAAA,QACC,CAAC,WAAW,CAAC,8BAAW,KAAE,EAAA,WAAW,WAAW,mBAAoB,UAAY,YAAA,CAAA;AAAA,QAChF,YAAa,oBAAA,OAAA,EAAI,WAAW,WAAW,gBAAiB,SAAS,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACpE;AAEJ,CAAC;AAED,KAAK,cAAc;AACnB,KAAK,QAAQ;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
|
-
@
|
|
3
|
-
@
|
|
4
|
-
@
|
|
5
|
-
@
|
|
6
|
-
@
|
|
2
|
+
@use '../../scss/font-settings' as font-settings;
|
|
3
|
+
@use '../../scss/palette' as palette;
|
|
4
|
+
@use '../../scss/spacers' as spacers;
|
|
5
|
+
@use '../../scss/screen-reader' as *;
|
|
6
|
+
@use '../../scss/breakpoints' as *;
|
|
7
7
|
@import '../../scss/supernova/styles/colors';
|
|
8
8
|
|
|
9
9
|
.tile {
|
|
@@ -12,23 +12,23 @@
|
|
|
12
12
|
|
|
13
13
|
display: flex;
|
|
14
14
|
width: inherit;
|
|
15
|
-
padding: getSpacer(2xs) getSpacer(2xs) getSpacer(xs);
|
|
15
|
+
padding: spacers.getSpacer(2xs) spacers.getSpacer(2xs) spacers.getSpacer(xs);
|
|
16
16
|
flex-direction: column;
|
|
17
17
|
justify-content: center;
|
|
18
18
|
background-color: var(--core-color-white);
|
|
19
|
-
color:
|
|
19
|
+
color: palette.$black;
|
|
20
20
|
text-decoration: none;
|
|
21
21
|
cursor: pointer;
|
|
22
22
|
border: 1px solid var(--color-base-border-blueberry);
|
|
23
23
|
outline: none;
|
|
24
24
|
|
|
25
25
|
@media (min-width: map.get($grid-breakpoints, md)) {
|
|
26
|
-
padding: getSpacer(l) getSpacer(m) getSpacer(l) getSpacer(s);
|
|
26
|
+
padding: spacers.getSpacer(l) spacers.getSpacer(m) spacers.getSpacer(l) spacers.getSpacer(s);
|
|
27
27
|
justify-content: flex-start;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
@media print {
|
|
31
|
-
border: 1px solid
|
|
31
|
+
border: 1px solid palette.$black;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
&--fixed {
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
&--compact {
|
|
40
|
-
padding: getSpacer(2xs) getSpacer(2xs) getSpacer(xs);
|
|
40
|
+
padding: spacers.getSpacer(2xs) spacers.getSpacer(2xs) spacers.getSpacer(xs);
|
|
41
41
|
|
|
42
42
|
@media (min-width: map.get($grid-breakpoints, md)) {
|
|
43
|
-
padding: getSpacer(s) getSpacer(m) getSpacer(s) getSpacer(s);
|
|
43
|
+
padding: spacers.getSpacer(s) spacers.getSpacer(m) spacers.getSpacer(s) spacers.getSpacer(s);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
|
|
@@ -59,14 +59,14 @@
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
&--highlighted {
|
|
62
|
-
background-color:
|
|
63
|
-
border-color:
|
|
64
|
-
color:
|
|
62
|
+
background-color: palette.$blueberry500;
|
|
63
|
+
border-color: palette.$blueberry500;
|
|
64
|
+
color: palette.$white;
|
|
65
65
|
|
|
66
66
|
&:hover,
|
|
67
67
|
&:active {
|
|
68
|
-
background-color:
|
|
69
|
-
border-color:
|
|
68
|
+
background-color: palette.$blueberry700;
|
|
69
|
+
border-color: palette.$blueberry700;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
&:focus-visible {
|
|
@@ -78,26 +78,26 @@
|
|
|
78
78
|
overflow-wrap: break-word;
|
|
79
79
|
word-wrap: break-word;
|
|
80
80
|
word-break: break-word;
|
|
81
|
-
font-size:
|
|
81
|
+
font-size: font-settings.$font-size-sm;
|
|
82
82
|
text-align: center;
|
|
83
83
|
line-height: 1.74rem;
|
|
84
84
|
font-weight: 400;
|
|
85
|
-
margin: getSpacer(3xs) 0 0;
|
|
85
|
+
margin: spacers.getSpacer(3xs) 0 0;
|
|
86
86
|
|
|
87
87
|
@media (min-width: map.get($grid-breakpoints, md)) {
|
|
88
88
|
text-align: left;
|
|
89
89
|
font-weight: 600;
|
|
90
|
-
font-size:
|
|
90
|
+
font-size: font-settings.$font-size-md;
|
|
91
91
|
line-height: 1.625rem;
|
|
92
|
-
margin: getSpacer(s) 0 0 getSpacer(2xs);
|
|
92
|
+
margin: spacers.getSpacer(s) 0 0 spacers.getSpacer(2xs);
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
&--compact {
|
|
96
|
-
margin: 0 0 0 getSpacer(3xs);
|
|
96
|
+
margin: 0 0 0 spacers.getSpacer(3xs);
|
|
97
97
|
text-align: left;
|
|
98
98
|
|
|
99
99
|
@media (min-width: map.get($grid-breakpoints, md)) {
|
|
100
|
-
margin-left: getSpacer(2xs);
|
|
100
|
+
margin-left: spacers.getSpacer(2xs);
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
}
|
|
@@ -113,11 +113,11 @@
|
|
|
113
113
|
&__description {
|
|
114
114
|
font-size: 1.125rem;
|
|
115
115
|
line-height: 1.75rem;
|
|
116
|
-
margin: getSpacer(2xs) 0 0 getSpacer(2xs);
|
|
116
|
+
margin: spacers.getSpacer(2xs) 0 0 spacers.getSpacer(2xs);
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
&__children {
|
|
120
|
-
margin: getSpacer(s) 0 0 getSpacer(2xs);
|
|
120
|
+
margin: spacers.getSpacer(s) 0 0 spacers.getSpacer(2xs);
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
&--compact {
|
|
138
138
|
flex-direction: row;
|
|
139
139
|
align-items: center;
|
|
140
|
-
padding-right: getSpacer(s);
|
|
140
|
+
padding-right: spacers.getSpacer(s);
|
|
141
141
|
padding-bottom: 0;
|
|
142
142
|
|
|
143
143
|
svg {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@
|
|
1
|
+
@use '../../scss/font-mixins' as fonts;
|
|
2
2
|
|
|
3
3
|
.title {
|
|
4
4
|
overflow-wrap: break-word;
|
|
@@ -7,30 +7,30 @@
|
|
|
7
7
|
margin-right: 0;
|
|
8
8
|
|
|
9
9
|
&--feature {
|
|
10
|
-
@include title-feature;
|
|
10
|
+
@include fonts.title-feature;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
&--title1 {
|
|
14
|
-
@include title1;
|
|
14
|
+
@include fonts.title1;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
&--title2 {
|
|
18
|
-
@include title2;
|
|
18
|
+
@include fonts.title2;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
&--title3 {
|
|
22
|
-
@include title3;
|
|
22
|
+
@include fonts.title3;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
&--title4 {
|
|
26
|
-
@include title4;
|
|
26
|
+
@include fonts.title4;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
&--title5 {
|
|
30
|
-
@include title5;
|
|
30
|
+
@include fonts.title5;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
&--title6 {
|
|
34
|
-
@include title6;
|
|
34
|
+
@include fonts.title6;
|
|
35
35
|
}
|
|
36
36
|
}
|