@helsenorge/designsystem-react 11.2.0-beta.0 → 11.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/Button.js +6 -8
- package/Button.js.map +1 -1
- package/CHANGELOG.md +928 -1496
- package/Close.js +21 -6
- package/Close.js.map +1 -1
- package/Drawer.js +370 -0
- package/Drawer.js.map +1 -0
- package/HelpBubble.js +78 -0
- package/HelpBubble.js.map +1 -0
- package/InfoTeaser.js +75 -0
- package/InfoTeaser.js.map +1 -0
- package/LazyIcon.js +1 -1
- package/LazyIcon.js.map +1 -1
- package/LazyIllustration.js +1 -1
- package/LazyIllustration.js.map +1 -1
- package/Panel.js +38 -5
- package/Panel.js.map +1 -1
- package/PopOver.js +141 -3589
- package/PopOver.js.map +1 -1
- package/components/ArticleTeaser/ArticleTeaser.d.ts +23 -0
- package/components/ArticleTeaser/ArticleTeaser.test.d.ts +1 -0
- package/components/ArticleTeaser/index.d.ts +3 -0
- package/components/ArticleTeaser/index.js +67 -0
- package/components/ArticleTeaser/index.js.map +1 -0
- package/components/ArticleTeaser/resourceHelper.d.ts +3 -0
- package/components/ArticleTeaser/styles.module.scss +79 -0
- package/components/ArticleTeaser/styles.module.scss.d.ts +13 -0
- package/components/Close/Close.d.ts +1 -1
- package/components/Close/styles.module.scss +51 -20
- package/components/Close/styles.module.scss.d.ts +3 -0
- package/components/Drawer/Drawer.d.ts +7 -1
- package/components/Drawer/index.js +1 -348
- package/components/Drawer/index.js.map +1 -1
- package/components/Drawer/styles.module.scss +44 -5
- package/components/Drawer/styles.module.scss.d.ts +2 -0
- package/components/Dropdown/index.js +1 -3
- package/components/Dropdown/index.js.map +1 -1
- package/components/HelpBubble/HelpBubble.d.ts +9 -7
- package/components/HelpBubble/index.js +3 -47
- package/components/HelpBubble/index.js.map +1 -1
- package/components/HelpBubble/styles.module.scss +7 -5
- package/components/HelpBubble/styles.module.scss.d.ts +1 -0
- package/components/HelpDrawer/HelpDrawer.d.ts +8 -0
- package/components/HelpDrawer/HelpDrawer.test.d.ts +1 -0
- package/components/HelpDrawer/index.d.ts +3 -0
- package/components/HelpDrawer/index.js +10 -0
- package/components/HelpDrawer/index.js.map +1 -0
- package/components/HelpDrawer/styles.module.scss +16 -0
- package/components/HelpDrawer/styles.module.scss.d.ts +10 -0
- package/components/HelpPanel/styles.module.scss +2 -3
- package/components/HelpTeaser/HelpTeaser.d.ts +20 -0
- package/components/HelpTeaser/HelpTeaser.test.d.ts +1 -0
- package/components/HelpTeaser/index.d.ts +3 -0
- package/components/HelpTeaser/index.js +25 -0
- package/components/HelpTeaser/index.js.map +1 -0
- package/components/HelpTeaser/styles.module.scss +22 -0
- package/components/HelpTeaser/styles.module.scss.d.ts +10 -0
- package/components/HelpTooltip/index.js +2 -2
- package/components/HelpTooltip/index.js.map +1 -1
- package/components/HighlightPanel/styles.module.scss +0 -1
- package/components/Icons/AdditionalIconInformation.d.ts +1 -1
- package/components/Icons/AdditionalIconInformation.js +1 -1
- package/components/Icons/AdditionalIconInformation.js.map +1 -1
- package/components/Icons/IconNames.d.ts +1 -1
- package/components/Icons/IconNames.js +1 -0
- package/components/Icons/IconNames.js.map +1 -1
- package/components/Icons/Toddler.d.ts +4 -0
- package/components/Icons/Toddler.js +10 -0
- package/components/Icons/Toddler.js.map +1 -0
- package/components/Illustrations/BabyMobile.d.ts +8 -0
- package/components/Illustrations/BabyMobile.js +11 -0
- package/components/Illustrations/BabyMobile.js.map +1 -0
- package/components/Illustrations/BabyMobileMedium.d.ts +4 -0
- package/components/Illustrations/BabyMobileMedium.js +424 -0
- package/components/Illustrations/BabyMobileMedium.js.map +1 -0
- package/components/Illustrations/Child.d.ts +12 -0
- package/components/Illustrations/Child.js +11 -0
- package/components/Illustrations/Child.js.map +1 -0
- package/components/Illustrations/ChildMedium.d.ts +4 -0
- package/components/Illustrations/ChildMedium.js +185 -0
- package/components/Illustrations/ChildMedium.js.map +1 -0
- package/components/Illustrations/GiveBabyFood.d.ts +11 -0
- package/components/Illustrations/GiveBabyFood.js +11 -0
- package/components/Illustrations/GiveBabyFood.js.map +1 -0
- package/components/Illustrations/GiveBabyFoodMedium.d.ts +4 -0
- package/components/Illustrations/GiveBabyFoodMedium.js +377 -0
- package/components/Illustrations/GiveBabyFoodMedium.js.map +1 -0
- package/components/Illustrations/IllustrationNames.d.ts +1 -1
- package/components/Illustrations/IllustrationNames.js +15 -1
- package/components/Illustrations/IllustrationNames.js.map +1 -1
- package/components/Illustrations/Stroller.d.ts +12 -0
- package/components/Illustrations/Stroller.js +11 -0
- package/components/Illustrations/Stroller.js.map +1 -0
- package/components/Illustrations/StrollerMedium.d.ts +4 -0
- package/components/Illustrations/StrollerMedium.js +236 -0
- package/components/Illustrations/StrollerMedium.js.map +1 -0
- package/components/InfoTeaser/InfoTeaser.d.ts +28 -0
- package/components/InfoTeaser/InfoTeaser.test.d.ts +1 -0
- package/components/InfoTeaser/index.d.ts +3 -0
- package/components/InfoTeaser/index.js +5 -0
- package/components/InfoTeaser/index.js.map +1 -0
- package/components/InfoTeaser/resourceHelper.d.ts +3 -0
- package/components/InfoTeaser/styles.module.scss +98 -0
- package/components/InfoTeaser/styles.module.scss.d.ts +15 -0
- package/components/Modal/styles.module.scss +3 -1
- package/components/Panel/Panel.d.ts +3 -0
- package/components/Panel/resourceHelper.d.ts +3 -0
- package/components/Panel/styles.module.scss +6 -6
- package/components/PopMenu/index.js +24 -15
- package/components/PopMenu/index.js.map +1 -1
- package/components/PopMenu/styles.module.scss +10 -9
- package/components/PopMenu/styles.module.scss.d.ts +1 -0
- package/components/PopOver/PopOver.d.ts +5 -9
- package/components/PopOver/index.js +3 -3
- package/components/PopOver/styles.module.scss +53 -11
- package/components/PopOver/styles.module.scss.d.ts +5 -0
- package/constants.d.ts +2 -0
- package/constants.js +2 -0
- package/constants.js.map +1 -1
- package/designsystem-react.css +20 -6
- package/hooks/useBreakpoint.js +10 -28
- package/hooks/useBreakpoint.js.map +1 -1
- package/hooks/useIsMobileBreakpoint.d.ts +1 -0
- package/hooks/useIsMobileBreakpoint.js +10 -0
- package/hooks/useIsMobileBreakpoint.js.map +1 -0
- package/package.json +1 -1
- package/resources/HN.Designsystem.ArticleTeaser.en-GB.json.d.ts +7 -0
- package/resources/HN.Designsystem.ArticleTeaser.nb-NO.json.d.ts +7 -0
- package/resources/HN.Designsystem.Dropdown.nb-NO.json.d.ts +1 -2
- package/resources/HN.Designsystem.InfoTeaser.en-GB.json.d.ts +7 -0
- package/resources/HN.Designsystem.InfoTeaser.nb-NO.json.d.ts +7 -0
- package/resources/HN.Designsystem.Panel.en-GB.json.d.ts +7 -0
- package/resources/HN.Designsystem.Panel.nb-NO.json.d.ts +7 -0
- package/scss/_font-mixins.scss +0 -22
- package/scss/supernova/styles/colors.css +20 -6
- package/scss/supernova/styles/typography.css +2 -2
- package/scss/typography.module.scss +0 -8
- package/scss/typography.module.scss.d.ts +0 -2
- package/scss/typography.stories.tsx +0 -8
package/Button.js
CHANGED
|
@@ -3,11 +3,10 @@ import React__default, { useRef, useEffect } from "react";
|
|
|
3
3
|
import classNames from "classnames";
|
|
4
4
|
import { I as Icon } from "./Icon.js";
|
|
5
5
|
import { AnalyticsId, IconSize } from "./constants.js";
|
|
6
|
-
import { useBreakpoint } from "./hooks/useBreakpoint.js";
|
|
7
6
|
import { useHover } from "./hooks/useHover.js";
|
|
8
7
|
import { useIcons } from "./hooks/useIcons.js";
|
|
8
|
+
import { useIsMobileBreakpoint } from "./hooks/useIsMobileBreakpoint.js";
|
|
9
9
|
import { getColor } from "./theme/currys/color.js";
|
|
10
|
-
import { breakpoints } from "./theme/grid.js";
|
|
11
10
|
import { isTest, isProd } from "./utils/environment.js";
|
|
12
11
|
import ArrowRight from "./components/Icons/ArrowRight.js";
|
|
13
12
|
import buttonStyles from "./components/Button/styles.module.scss";
|
|
@@ -66,12 +65,11 @@ const Button = React__default.forwardRef(function ButtonForwardedRef(props, ref)
|
|
|
66
65
|
const onlyIcon = !!(leftIcon || rightIcon) && !restChildren;
|
|
67
66
|
const bothIcons = leftIcon && (rightIcon || arrow) && !onlyIcon;
|
|
68
67
|
const onDark = onColor === "ondark";
|
|
69
|
-
const
|
|
70
|
-
const mobile = breakpoint < breakpoints.md;
|
|
68
|
+
const isMobile = useIsMobileBreakpoint();
|
|
71
69
|
const destructive = concept === "destructive" && !disabled;
|
|
72
70
|
const outlineVariant = variant === "outline";
|
|
73
71
|
const borderlessVariant = variant === "borderless";
|
|
74
|
-
const iconColor = getIconColor(variant === "fill", borderlessVariant, disabled, concept, onDark,
|
|
72
|
+
const iconColor = getIconColor(variant === "fill", borderlessVariant, disabled, concept, onDark, isMobile);
|
|
75
73
|
const hasArrow = arrow === "icon" && !borderlessVariant;
|
|
76
74
|
const large = size === "large" && !destructive && !borderlessVariant;
|
|
77
75
|
const hasUURightArrow = arrow === "accessibility-character" && !fluid && !leftIcon && !rightIcon && !hasArrow && borderlessVariant;
|
|
@@ -127,13 +125,13 @@ const Button = React__default.forwardRef(function ButtonForwardedRef(props, ref)
|
|
|
127
125
|
] });
|
|
128
126
|
};
|
|
129
127
|
const renderbuttonContentWrapper = () => /* @__PURE__ */ jsxs("span", { className: buttonClasses, children: [
|
|
130
|
-
renderIcon(leftIcon, getLargeIconSize(large,
|
|
128
|
+
renderIcon(leftIcon, getLargeIconSize(large, isMobile), !onlyIcon ? buttonStyles["button__left-icon"] : void 0),
|
|
131
129
|
renderButtonContent(),
|
|
132
130
|
hasArrow ? renderIcon(
|
|
133
131
|
/* @__PURE__ */ jsx(Icon, { svgIcon: ArrowRight }),
|
|
134
|
-
getLargeIconSize(large,
|
|
132
|
+
getLargeIconSize(large, isMobile),
|
|
135
133
|
classNames(buttonStyles["button__arrow"], { [buttonStyles["button__arrow--both-icons"]]: bothIcons })
|
|
136
|
-
) : renderIcon(rightIcon, getLargeIconSize(large,
|
|
134
|
+
) : renderIcon(rightIcon, getLargeIconSize(large, isMobile), buttonStyles["button__right-icon"]),
|
|
137
135
|
hasUURightArrow && /* @__PURE__ */ jsx("span", { style: { color: iconColor }, className: buttonStyles["button__right-unicode-arrow"], "aria-hidden": true, children: " →" })
|
|
138
136
|
] });
|
|
139
137
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
package/Button.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sources":["../src/components/Button/Button.tsx"],"sourcesContent":["import React, { AriaAttributes, useEffect, useRef } from 'react';\n\nimport classNames from 'classnames';\n\nimport Icon, { IconSize } from './../Icon';\nimport { HTMLButtonProps, HTMLAnchorProps, AnalyticsId } from '../../constants';\nimport { useBreakpoint } from '../../hooks/useBreakpoint';\nimport { useHover } from '../../hooks/useHover';\nimport { BaseIconElement, useIcons } from '../../hooks/useIcons';\nimport { getColor } from '../../theme/currys/color';\nimport { breakpoints } from '../../theme/grid';\nimport { isTest, isProd } from '../../utils/environment';\nimport ArrowRight from '../Icons/ArrowRight';\n\nimport buttonStyles from './styles.module.scss';\n\nexport type ButtonConcept = 'normal' | 'destructive';\nexport type ButtonVariant = 'fill' | 'outline' | 'borderless';\nexport type ButtonSize = 'medium' | 'large';\nexport type ButtonOnColor = 'onlight' | 'ondark';\nexport type ButtonTags = 'button' | 'a';\nexport type ButtonArrows = 'icon' | 'accessibility-character';\nexport type ButtonTextPosition = 'left' | 'centered';\n\nexport interface ButtonProps extends HTMLButtonProps, HTMLAnchorProps, AriaAttributes {\n /** Sets the aria-label of the button, use when the button only includes an icon */\n ariaLabel?: string;\n /** Gives a unique id to the button */\n id?: string;\n /** Sets the content of the button. */\n children: React.ReactNode;\n /** Adds custom classes to the wrapper element. */\n wrapperClassName?: string;\n /** Adds custom classes to the element. */\n className?: string;\n /** Enables an arrow icon to the right inside the button (Not available in borderless variant) */\n arrow?: ButtonArrows;\n /** Changes the intent of the button. Mostly changes the color profile. */\n concept?: ButtonConcept;\n /** Disables text wrapping and enables ellipsis. */\n ellipsis?: boolean;\n /** Makes the button scale to full width of its parent element. */\n fluid?: boolean;\n /** Changes the underlying element of the button. */\n htmlMarkup?: ButtonTags;\n /** Changes the button colors for different backgrounds. */\n onColor?: ButtonOnColor;\n /** Function that is called when the Button loses focus */\n onBlur?: () => void;\n /** Function that is called when clicked */\n onClick?: (e?: React.MouseEvent<HTMLElement, MouseEvent> | React.FormEvent<{}> | React.KeyboardEvent<HTMLUListElement> | null) => void;\n /** Changes the button colors for different backgrounds. (Large not available in borderless variant) */\n size?: ButtonSize;\n /** Changes the visual representation of the button. */\n variant?: ButtonVariant;\n /** Specifies the focus order relative to the other buttons or controls on the page */\n tabIndex?: number;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Adds custom classes to the text */\n textClassName?: string;\n /** Sets the position of the text in the button - only applies when button is fluid */\n textPosition?: ButtonTextPosition;\n /** Button type. Default: button */\n type?: React.ButtonHTMLAttributes<HTMLButtonElement>['type'];\n}\n\nconst getIconColor = (\n fill: boolean,\n borderless: boolean,\n disabled: boolean,\n concept: ButtonConcept,\n ondark: boolean,\n mobile: boolean\n): string => {\n if (mobile && disabled) {\n return !ondark || fill ? getColor('neutral', !borderless ? 700 : 500) : getColor('white');\n }\n if (disabled) {\n return !ondark || fill ? getColor('neutral', 500) : `${getColor('white')}b3`;\n }\n if ((fill && !ondark) || (!fill && ondark)) {\n return 'white';\n }\n\n return concept === 'normal' ? getColor('blueberry', 600) : getColor('cherry', 500);\n};\nconst getLargeIconSize = (large: boolean, mobile: boolean): IconSize => {\n if (mobile && large) return IconSize.Small;\n if (large) return IconSize.Medium;\n return IconSize.XSmall;\n};\n\nconst checkOnlyIconAria = (onlyIcon: boolean, ariaLabel: string | undefined, devEnv: boolean): void => {\n if (devEnv && onlyIcon && (ariaLabel === undefined || ariaLabel === '')) {\n throw new Error('Fyll inn ariaLabel prop på Button uten tekst for å opprettholde UU krav');\n }\n};\n\nconst Button = React.forwardRef(function ButtonForwardedRef(\n props: ButtonProps,\n ref: React.ForwardedRef<HTMLButtonElement | HTMLAnchorElement>\n) {\n const {\n ariaLabel,\n id,\n children,\n wrapperClassName,\n className,\n arrow,\n concept = 'normal',\n disabled = false,\n ellipsis = false,\n fluid = false,\n htmlMarkup = 'button',\n onColor = 'onlight',\n onBlur,\n onClick,\n size = 'medium',\n variant = 'fill',\n href,\n tabIndex,\n testId,\n target,\n type = 'button',\n textClassName,\n textPosition = 'left',\n ...restProps\n } = props;\n\n const [leftIcon, rightIcon, restChildren] = useIcons(React.Children.toArray(children));\n const { hoverRef, isHovered } =\n htmlMarkup === 'button'\n ? useHover<HTMLButtonElement>(ref as React.RefObject<HTMLButtonElement>)\n : useHover<HTMLAnchorElement>(ref as React.RefObject<HTMLAnchorElement>);\n const buttonContentRef = useRef<HTMLDivElement>(null);\n const onlyIcon = !!(leftIcon || rightIcon) && !restChildren;\n const bothIcons = leftIcon && (rightIcon || arrow) && !onlyIcon;\n const onDark = onColor === 'ondark';\n const breakpoint = useBreakpoint();\n const mobile = breakpoint < breakpoints.md;\n const destructive = concept === 'destructive' && !disabled;\n const outlineVariant = variant === 'outline';\n const borderlessVariant = variant === 'borderless';\n const iconColor = getIconColor(variant === 'fill', borderlessVariant, disabled, concept, onDark, mobile);\n const hasArrow = arrow === 'icon' && !borderlessVariant;\n const large = size === 'large' && !destructive && !borderlessVariant;\n const hasUURightArrow = arrow === 'accessibility-character' && !fluid && !leftIcon && !rightIcon && !hasArrow && borderlessVariant;\n const rest = { ...restProps };\n\n const buttonWrapperClasses = classNames(\n buttonStyles['button-wrapper'],\n { [buttonStyles['button-wrapper--fluid']]: fluid || ellipsis },\n wrapperClassName\n );\n const buttonClasses = classNames(\n buttonStyles.button,\n {\n [buttonStyles['button--destructive']]: destructive,\n [buttonStyles['button--normal']]: !large,\n [buttonStyles['button--large']]: large,\n [buttonStyles['button--outline']]: outlineVariant,\n [buttonStyles['button--borderless']]: borderlessVariant,\n [buttonStyles['button--left-icon']]: leftIcon && !onlyIcon,\n [buttonStyles['button--right-icon']]: rightIcon && !onlyIcon,\n [buttonStyles['button--both-icons']]: bothIcons,\n [buttonStyles['button--only-icon']]: onlyIcon,\n [buttonStyles['button--arrow']]: hasArrow,\n [buttonStyles['button--on-dark']]: onDark,\n },\n className\n );\n const buttonTextClasses = classNames(\n buttonStyles['button__text'],\n {\n [buttonStyles['button__text--ellipsis']]: ellipsis,\n [buttonStyles['button__text--centered']]: fluid && textPosition === 'centered',\n },\n textClassName\n );\n const diagonalClasses = classNames(buttonStyles['diagonal'], {\n [buttonStyles['diagonal--on-dark']]: onDark,\n });\n\n useEffect(() => {\n checkOnlyIconAria(onlyIcon, ariaLabel, !isTest() && !isProd());\n }, []);\n\n const renderIcon = (iconElement: BaseIconElement | null, iconSize: number, iconClassName?: string): BaseIconElement | null => {\n return iconElement\n ? React.cloneElement(iconElement, {\n size: iconSize,\n color: iconElement?.props.color && !disabled ? iconElement.props.color : iconColor,\n isHovered: iconElement.props.isHovered === undefined ? !disabled && isHovered : iconElement.props.isHovered,\n className: iconClassName,\n })\n : null;\n };\n\n const renderButtonContent = (): JSX.Element => {\n return (\n <span className={buttonTextClasses} ref={buttonContentRef}>\n {disabled && borderlessVariant && (\n <span className={diagonalClasses}>\n <span className={buttonStyles['diagonal__line']} />\n </span>\n )}\n <span>{onlyIcon ? ariaLabel : restChildren}</span>\n </span>\n );\n };\n\n const renderbuttonContentWrapper = (): JSX.Element => (\n <span className={buttonClasses}>\n {renderIcon(leftIcon, getLargeIconSize(large, mobile), !onlyIcon ? buttonStyles['button__left-icon'] : undefined)}\n {renderButtonContent()}\n {hasArrow\n ? renderIcon(\n <Icon svgIcon={ArrowRight} />,\n getLargeIconSize(large, mobile),\n classNames(buttonStyles['button__arrow'], { [buttonStyles['button__arrow--both-icons']]: bothIcons })\n )\n : renderIcon(rightIcon, getLargeIconSize(large, mobile), buttonStyles['button__right-icon'])}\n {hasUURightArrow && (\n <span style={{ color: iconColor }} className={buttonStyles['button__right-unicode-arrow']} aria-hidden>\n {' →'}\n </span>\n )}\n </span>\n );\n\n return (\n <>\n {htmlMarkup === 'button' && (\n <button\n id={id}\n onBlur={onBlur}\n onClick={onClick}\n disabled={disabled}\n data-testid={testId}\n data-analyticsid={AnalyticsId.Button}\n className={buttonWrapperClasses}\n ref={hoverRef as React.ForwardedRef<HTMLButtonElement>}\n tabIndex={tabIndex}\n type={type}\n {...rest}\n >\n {renderbuttonContentWrapper()}\n </button>\n )}\n {htmlMarkup === 'a' && (\n <a\n id={id}\n onBlur={onBlur}\n onClick={onClick}\n data-testid={testId}\n data-analyticsid={AnalyticsId.Button}\n className={buttonWrapperClasses}\n href={href}\n target={target}\n rel={target === '_blank' ? 'noopener noreferrer' : props.rel}\n ref={hoverRef as React.ForwardedRef<HTMLAnchorElement>}\n tabIndex={tabIndex}\n {...restProps}\n >\n {renderbuttonContentWrapper()}\n </a>\n )}\n </>\n );\n});\n\nexport default Button;\n"],"names":["React"],"mappings":";;;;;;;;;;;;;AAmEA,MAAM,eAAe,CACnB,MACA,YACA,UACA,SACA,QACA,WACW;AACX,MAAI,UAAU,UAAU;AACf,WAAA,CAAC,UAAU,OAAO,SAAS,WAAW,CAAC,aAAa,MAAM,GAAG,IAAI,SAAS,OAAO;AAAA,EAAA;AAE1F,MAAI,UAAU;AACL,WAAA,CAAC,UAAU,OAAO,SAAS,WAAW,GAAG,IAAI,GAAG,SAAS,OAAO,CAAC;AAAA,EAAA;AAE1E,MAAK,QAAQ,CAAC,UAAY,CAAC,QAAQ,QAAS;AACnC,WAAA;AAAA,EAAA;AAGF,SAAA,YAAY,WAAW,SAAS,aAAa,GAAG,IAAI,SAAS,UAAU,GAAG;AACnF;AACA,MAAM,mBAAmB,CAAC,OAAgB,WAA8B;AAClE,MAAA,UAAU,MAAO,QAAO,SAAS;AACjC,MAAA,cAAc,SAAS;AAC3B,SAAO,SAAS;AAClB;AAEA,MAAM,oBAAoB,CAAC,UAAmB,WAA+B,WAA0B;AACrG,MAAI,UAAU,aAAa,cAAc,UAAa,cAAc,KAAK;AACjE,UAAA,IAAI,MAAM,yEAAyE;AAAA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QACA;AAAA,QACC,GAAG;AAAA,QAEH,UAA2B,2BAAA;AAAA,MAAA;AAAA,IAC9B;AAAA,IAED,eAAe,OACd;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA,eAAa;AAAA,QACb,oBAAkB,YAAY;AAAA,QAC9B,WAAW;AAAA,QACX;AAAA,QACA;AAAA,QACA,KAAK,WAAW,WAAW,wBAAwB,MAAM;AAAA,QACzD,KAAK;AAAA,QACL;AAAA,QACC,GAAG;AAAA,QAEH,UAA2B,2BAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAC9B,GAEJ;AAEJ,CAAC;"}
|
|
1
|
+
{"version":3,"file":"Button.js","sources":["../src/components/Button/Button.tsx"],"sourcesContent":["import React, { AriaAttributes, useEffect, useRef } from 'react';\n\nimport classNames from 'classnames';\n\nimport Icon, { IconSize } from './../Icon';\nimport { HTMLButtonProps, HTMLAnchorProps, AnalyticsId } from '../../constants';\nimport { useHover } from '../../hooks/useHover';\nimport { BaseIconElement, useIcons } from '../../hooks/useIcons';\nimport { useIsMobileBreakpoint } from '../../hooks/useIsMobileBreakpoint';\nimport { getColor } from '../../theme/currys/color';\nimport { isTest, isProd } from '../../utils/environment';\nimport ArrowRight from '../Icons/ArrowRight';\n\nimport buttonStyles from './styles.module.scss';\n\nexport type ButtonConcept = 'normal' | 'destructive';\nexport type ButtonVariant = 'fill' | 'outline' | 'borderless';\nexport type ButtonSize = 'medium' | 'large';\nexport type ButtonOnColor = 'onlight' | 'ondark';\nexport type ButtonTags = 'button' | 'a';\nexport type ButtonArrows = 'icon' | 'accessibility-character';\nexport type ButtonTextPosition = 'left' | 'centered';\n\nexport interface ButtonProps extends HTMLButtonProps, HTMLAnchorProps, AriaAttributes {\n /** Sets the aria-label of the button, use when the button only includes an icon */\n ariaLabel?: string;\n /** Gives a unique id to the button */\n id?: string;\n /** Sets the content of the button. */\n children: React.ReactNode;\n /** Adds custom classes to the wrapper element. */\n wrapperClassName?: string;\n /** Adds custom classes to the element. */\n className?: string;\n /** Enables an arrow icon to the right inside the button (Not available in borderless variant) */\n arrow?: ButtonArrows;\n /** Changes the intent of the button. Mostly changes the color profile. */\n concept?: ButtonConcept;\n /** Disables text wrapping and enables ellipsis. */\n ellipsis?: boolean;\n /** Makes the button scale to full width of its parent element. */\n fluid?: boolean;\n /** Changes the underlying element of the button. */\n htmlMarkup?: ButtonTags;\n /** Changes the button colors for different backgrounds. */\n onColor?: ButtonOnColor;\n /** Function that is called when the Button loses focus */\n onBlur?: () => void;\n /** Function that is called when clicked */\n onClick?: (e?: React.MouseEvent<HTMLElement, MouseEvent> | React.FormEvent<{}> | React.KeyboardEvent<HTMLUListElement> | null) => void;\n /** Changes the button colors for different backgrounds. (Large not available in borderless variant) */\n size?: ButtonSize;\n /** Changes the visual representation of the button. */\n variant?: ButtonVariant;\n /** Specifies the focus order relative to the other buttons or controls on the page */\n tabIndex?: number;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Adds custom classes to the text */\n textClassName?: string;\n /** Sets the position of the text in the button - only applies when button is fluid */\n textPosition?: ButtonTextPosition;\n /** Button type. Default: button */\n type?: React.ButtonHTMLAttributes<HTMLButtonElement>['type'];\n}\n\nconst getIconColor = (\n fill: boolean,\n borderless: boolean,\n disabled: boolean,\n concept: ButtonConcept,\n ondark: boolean,\n mobile: boolean\n): string => {\n if (mobile && disabled) {\n return !ondark || fill ? getColor('neutral', !borderless ? 700 : 500) : getColor('white');\n }\n if (disabled) {\n return !ondark || fill ? getColor('neutral', 500) : `${getColor('white')}b3`;\n }\n if ((fill && !ondark) || (!fill && ondark)) {\n return 'white';\n }\n\n return concept === 'normal' ? getColor('blueberry', 600) : getColor('cherry', 500);\n};\nconst getLargeIconSize = (large: boolean, mobile: boolean): IconSize => {\n if (mobile && large) return IconSize.Small;\n if (large) return IconSize.Medium;\n return IconSize.XSmall;\n};\n\nconst checkOnlyIconAria = (onlyIcon: boolean, ariaLabel: string | undefined, devEnv: boolean): void => {\n if (devEnv && onlyIcon && (ariaLabel === undefined || ariaLabel === '')) {\n throw new Error('Fyll inn ariaLabel prop på Button uten tekst for å opprettholde UU krav');\n }\n};\n\nconst Button = React.forwardRef(function ButtonForwardedRef(\n props: ButtonProps,\n ref: React.ForwardedRef<HTMLButtonElement | HTMLAnchorElement>\n) {\n const {\n ariaLabel,\n id,\n children,\n wrapperClassName,\n className,\n arrow,\n concept = 'normal',\n disabled = false,\n ellipsis = false,\n fluid = false,\n htmlMarkup = 'button',\n onColor = 'onlight',\n onBlur,\n onClick,\n size = 'medium',\n variant = 'fill',\n href,\n tabIndex,\n testId,\n target,\n type = 'button',\n textClassName,\n textPosition = 'left',\n ...restProps\n } = props;\n\n const [leftIcon, rightIcon, restChildren] = useIcons(React.Children.toArray(children));\n const { hoverRef, isHovered } =\n htmlMarkup === 'button'\n ? useHover<HTMLButtonElement>(ref as React.RefObject<HTMLButtonElement>)\n : useHover<HTMLAnchorElement>(ref as React.RefObject<HTMLAnchorElement>);\n const buttonContentRef = useRef<HTMLDivElement>(null);\n const onlyIcon = !!(leftIcon || rightIcon) && !restChildren;\n const bothIcons = leftIcon && (rightIcon || arrow) && !onlyIcon;\n const onDark = onColor === 'ondark';\n const isMobile = useIsMobileBreakpoint();\n const destructive = concept === 'destructive' && !disabled;\n const outlineVariant = variant === 'outline';\n const borderlessVariant = variant === 'borderless';\n const iconColor = getIconColor(variant === 'fill', borderlessVariant, disabled, concept, onDark, isMobile);\n const hasArrow = arrow === 'icon' && !borderlessVariant;\n const large = size === 'large' && !destructive && !borderlessVariant;\n const hasUURightArrow = arrow === 'accessibility-character' && !fluid && !leftIcon && !rightIcon && !hasArrow && borderlessVariant;\n const rest = { ...restProps };\n\n const buttonWrapperClasses = classNames(\n buttonStyles['button-wrapper'],\n { [buttonStyles['button-wrapper--fluid']]: fluid || ellipsis },\n wrapperClassName\n );\n const buttonClasses = classNames(\n buttonStyles.button,\n {\n [buttonStyles['button--destructive']]: destructive,\n [buttonStyles['button--normal']]: !large,\n [buttonStyles['button--large']]: large,\n [buttonStyles['button--outline']]: outlineVariant,\n [buttonStyles['button--borderless']]: borderlessVariant,\n [buttonStyles['button--left-icon']]: leftIcon && !onlyIcon,\n [buttonStyles['button--right-icon']]: rightIcon && !onlyIcon,\n [buttonStyles['button--both-icons']]: bothIcons,\n [buttonStyles['button--only-icon']]: onlyIcon,\n [buttonStyles['button--arrow']]: hasArrow,\n [buttonStyles['button--on-dark']]: onDark,\n },\n className\n );\n const buttonTextClasses = classNames(\n buttonStyles['button__text'],\n {\n [buttonStyles['button__text--ellipsis']]: ellipsis,\n [buttonStyles['button__text--centered']]: fluid && textPosition === 'centered',\n },\n textClassName\n );\n const diagonalClasses = classNames(buttonStyles['diagonal'], {\n [buttonStyles['diagonal--on-dark']]: onDark,\n });\n\n useEffect(() => {\n checkOnlyIconAria(onlyIcon, ariaLabel, !isTest() && !isProd());\n }, []);\n\n const renderIcon = (iconElement: BaseIconElement | null, iconSize: number, iconClassName?: string): BaseIconElement | null => {\n return iconElement\n ? React.cloneElement(iconElement, {\n size: iconSize,\n color: iconElement?.props.color && !disabled ? iconElement.props.color : iconColor,\n isHovered: iconElement.props.isHovered === undefined ? !disabled && isHovered : iconElement.props.isHovered,\n className: iconClassName,\n })\n : null;\n };\n\n const renderButtonContent = (): JSX.Element => {\n return (\n <span className={buttonTextClasses} ref={buttonContentRef}>\n {disabled && borderlessVariant && (\n <span className={diagonalClasses}>\n <span className={buttonStyles['diagonal__line']} />\n </span>\n )}\n <span>{onlyIcon ? ariaLabel : restChildren}</span>\n </span>\n );\n };\n\n const renderbuttonContentWrapper = (): JSX.Element => (\n <span className={buttonClasses}>\n {renderIcon(leftIcon, getLargeIconSize(large, isMobile), !onlyIcon ? buttonStyles['button__left-icon'] : undefined)}\n {renderButtonContent()}\n {hasArrow\n ? renderIcon(\n <Icon svgIcon={ArrowRight} />,\n getLargeIconSize(large, isMobile),\n classNames(buttonStyles['button__arrow'], { [buttonStyles['button__arrow--both-icons']]: bothIcons })\n )\n : renderIcon(rightIcon, getLargeIconSize(large, isMobile), buttonStyles['button__right-icon'])}\n {hasUURightArrow && (\n <span style={{ color: iconColor }} className={buttonStyles['button__right-unicode-arrow']} aria-hidden>\n {' →'}\n </span>\n )}\n </span>\n );\n\n return (\n <>\n {htmlMarkup === 'button' && (\n <button\n id={id}\n onBlur={onBlur}\n onClick={onClick}\n disabled={disabled}\n data-testid={testId}\n data-analyticsid={AnalyticsId.Button}\n className={buttonWrapperClasses}\n ref={hoverRef as React.ForwardedRef<HTMLButtonElement>}\n tabIndex={tabIndex}\n type={type}\n {...rest}\n >\n {renderbuttonContentWrapper()}\n </button>\n )}\n {htmlMarkup === 'a' && (\n <a\n id={id}\n onBlur={onBlur}\n onClick={onClick}\n data-testid={testId}\n data-analyticsid={AnalyticsId.Button}\n className={buttonWrapperClasses}\n href={href}\n target={target}\n rel={target === '_blank' ? 'noopener noreferrer' : props.rel}\n ref={hoverRef as React.ForwardedRef<HTMLAnchorElement>}\n tabIndex={tabIndex}\n {...restProps}\n >\n {renderbuttonContentWrapper()}\n </a>\n )}\n </>\n );\n});\n\nexport default Button;\n"],"names":["React"],"mappings":";;;;;;;;;;;;AAkEA,MAAM,eAAe,CACnB,MACA,YACA,UACA,SACA,QACA,WACW;AACX,MAAI,UAAU,UAAU;AACf,WAAA,CAAC,UAAU,OAAO,SAAS,WAAW,CAAC,aAAa,MAAM,GAAG,IAAI,SAAS,OAAO;AAAA,EAAA;AAE1F,MAAI,UAAU;AACL,WAAA,CAAC,UAAU,OAAO,SAAS,WAAW,GAAG,IAAI,GAAG,SAAS,OAAO,CAAC;AAAA,EAAA;AAE1E,MAAK,QAAQ,CAAC,UAAY,CAAC,QAAQ,QAAS;AACnC,WAAA;AAAA,EAAA;AAGF,SAAA,YAAY,WAAW,SAAS,aAAa,GAAG,IAAI,SAAS,UAAU,GAAG;AACnF;AACA,MAAM,mBAAmB,CAAC,OAAgB,WAA8B;AAClE,MAAA,UAAU,MA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