@helsenorge/designsystem-react 15.7.1 → 16.0.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.
Files changed (230) hide show
  1. package/lib/Button.js +2 -2
  2. package/lib/Button.js.map +1 -1
  3. package/lib/CHANGELOG.md +2657 -996
  4. package/lib/Close.js +1 -1
  5. package/lib/Close.js.map +1 -1
  6. package/lib/Drawer.js +2 -4
  7. package/lib/Drawer.js.map +1 -1
  8. package/lib/DrawerNavigation.js +1 -0
  9. package/lib/DrawerNavigation.js.map +1 -1
  10. package/lib/Duolist.js +5 -1
  11. package/lib/Duolist.js.map +1 -1
  12. package/lib/ElementHeader.js.map +1 -1
  13. package/lib/FilterLinkList.js +1 -1
  14. package/lib/FilterLinkList.js.map +1 -1
  15. package/lib/FormGroup.js +3 -3
  16. package/lib/FormGroup.js.map +1 -1
  17. package/lib/HelpDetails.js +1 -1
  18. package/lib/HelpTriggerIcon.js +2 -2
  19. package/lib/HelpTriggerIcon.js.map +1 -1
  20. package/lib/HelpTriggerStandalone.js +1 -1
  21. package/lib/HelpTriggerStandalone.js.map +1 -1
  22. package/lib/LazyIcon.js +1 -0
  23. package/lib/LazyIcon.js.map +1 -1
  24. package/lib/LazyIllustration.js +2 -0
  25. package/lib/LazyIllustration.js.map +1 -1
  26. package/lib/LinkList.js +10 -10
  27. package/lib/LinkList.js.map +1 -1
  28. package/lib/ListEditMode.js +1 -1
  29. package/lib/ListEditMode.js.map +1 -1
  30. package/lib/PopOver.js +2 -2
  31. package/lib/PopOver.js.map +1 -1
  32. package/lib/Radio.js +65 -55
  33. package/lib/Radio.js.map +1 -1
  34. package/lib/Radio2.js +74 -0
  35. package/lib/Radio2.js.map +1 -0
  36. package/lib/RadioMarker.js +2 -2
  37. package/lib/RadioMarker.js.map +1 -1
  38. package/lib/TabList.js +5 -5
  39. package/lib/TabList.js.map +1 -1
  40. package/lib/Toggle.js +2 -2
  41. package/lib/Toggle.js.map +1 -1
  42. package/lib/VisualRadio.js +1 -1
  43. package/lib/VisualRadio.js.map +1 -1
  44. package/lib/components/AnchorLink/styles.module.scss +3 -4
  45. package/lib/components/ArticleTeaser/styles.module.scss +12 -12
  46. package/lib/components/Button/Button.d.ts +1 -1
  47. package/lib/components/Button/styles.module.scss +111 -60
  48. package/lib/components/Button/styles.module.scss.d.ts +1 -1
  49. package/lib/components/Checkbox/CheckboxMarker/styles.module.scss +6 -6
  50. package/lib/components/Chip/styles.module.scss +2 -3
  51. package/lib/components/Close/styles.module.scss +2 -3
  52. package/lib/components/DictionaryTrigger/index.js +26 -1
  53. package/lib/{DictionaryTrigger.js.map → components/DictionaryTrigger/index.js.map} +1 -1
  54. package/lib/components/DictionaryTrigger/styles.module.scss +6 -8
  55. package/lib/components/Drawer/Drawer.d.ts +0 -4
  56. package/lib/components/Drawer/DrawerBackButton.module.scss +1 -2
  57. package/lib/components/Drawer/styles.module.scss +6 -3
  58. package/lib/components/Dropdown/SingleSelect/styles.module.scss +0 -2
  59. package/lib/components/Dropdown/index.js +9 -17
  60. package/lib/components/Dropdown/index.js.map +1 -1
  61. package/lib/components/Dropdown/styles.module.scss +12 -14
  62. package/lib/components/Duolist/Duolist.d.ts +14 -2
  63. package/lib/components/Duolist/styles.module.scss +32 -8
  64. package/lib/components/Duolist/styles.module.scss.d.ts +3 -0
  65. package/lib/components/ElementHeader/ElementHeader.d.ts +1 -1
  66. package/lib/components/ElementHeader/styles.module.scss +1 -1
  67. package/lib/components/EmptyState/styles.module.scss +1 -2
  68. package/lib/components/ErrorWrapper/styles.module.scss +3 -3
  69. package/lib/components/Expander/styles.module.scss +0 -2
  70. package/lib/components/Expander/styles.module.scss.d.ts +1 -1
  71. package/lib/components/ExpanderList/index.js +20 -19
  72. package/lib/components/ExpanderList/index.js.map +1 -1
  73. package/lib/components/ExpanderList/styles.module.scss +10 -11
  74. package/lib/components/FavoriteButton/index.js +3 -3
  75. package/lib/components/FavoriteButton/index.js.map +1 -1
  76. package/lib/components/FavoriteButton/styles.module.scss +0 -1
  77. package/lib/components/Filter/FilterButton/styles.module.scss +5 -6
  78. package/lib/components/Filter/FilterButtonAndChipsWrapper/styles.module.scss +0 -1
  79. package/lib/components/Filter/FilterDrawer/styles.module.scss +0 -1
  80. package/lib/components/Filter/FilterLinkList/FilterLinkList.module.scss +5 -6
  81. package/lib/components/Filter/FilterOverviewSearch/styles.module.scss +1 -4
  82. package/lib/components/Filter/FilterSearch/styles.module.scss +14 -15
  83. package/lib/components/Filter/FilterSort/styles.module.scss +1 -2
  84. package/lib/components/Filter/FilterStateWrapper/styles.module.scss +0 -2
  85. package/lib/components/Filter/LoaderSpinner/styles.module.scss +2 -4
  86. package/lib/components/FormFieldTag/styles.module.scss +0 -1
  87. package/lib/components/FormGroup/styles.module.scss +0 -1
  88. package/lib/components/HelpBubble/styles.module.scss +0 -1
  89. package/lib/components/HelpDetails/styles.module.scss +2 -4
  90. package/lib/components/HelpDrawer/styles.module.scss +1 -2
  91. package/lib/components/HelpPanel/HelpPanel.d.ts +2 -2
  92. package/lib/components/HelpPanel/index.js +1 -17
  93. package/lib/components/HelpPanel/index.js.map +1 -1
  94. package/lib/components/HelpPanel/styles.module.scss +2 -22
  95. package/lib/components/HelpPanel/styles.module.scss.d.ts +0 -4
  96. package/lib/components/HelpTeaser/styles.module.scss +7 -9
  97. package/lib/components/HelpTriggerIcon/HelpTriggerIcon.d.ts +2 -2
  98. package/lib/components/HelpTriggerIcon/styles.module.scss +20 -22
  99. package/lib/components/HelpTriggerIcon/styles.module.scss.d.ts +1 -1
  100. package/lib/components/HelpTriggerInline/styles.module.scss +3 -5
  101. package/lib/components/HelpTriggerStandalone/styles.module.scss +3 -5
  102. package/lib/components/HighlightPanel/styles.module.scss +2 -3
  103. package/lib/components/Icons/AdditionalIconInformation.d.ts +4 -0
  104. package/lib/components/Icons/AdditionalIconInformation.js +14 -10
  105. package/lib/components/Icons/AdditionalIconInformation.js.map +1 -1
  106. package/lib/components/Icons/HealthcarePersonnelSecurity.js +4 -4
  107. package/lib/components/Icons/HealthcarePersonnelSecurity.js.map +1 -1
  108. package/lib/components/Icons/HistoryDocument.js +6 -7
  109. package/lib/components/Icons/HistoryDocument.js.map +1 -1
  110. package/lib/components/Icons/IconNames.d.ts +1 -1
  111. package/lib/components/Icons/IconNames.js +1 -0
  112. package/lib/components/Icons/IconNames.js.map +1 -1
  113. package/lib/components/Icons/YesNo.d.ts +3 -0
  114. package/lib/components/Icons/YesNo.js +53 -0
  115. package/lib/components/Icons/YesNo.js.map +1 -0
  116. package/lib/components/Illustrations/IllustrationNames.d.ts +1 -1
  117. package/lib/components/Illustrations/IllustrationNames.js +2 -0
  118. package/lib/components/Illustrations/IllustrationNames.js.map +1 -1
  119. package/lib/components/Illustrations/MoveAway.d.ts +11 -0
  120. package/lib/components/Illustrations/MoveAway.js +18 -0
  121. package/lib/components/Illustrations/MoveAway.js.map +1 -0
  122. package/lib/components/Illustrations/MoveAwayMedium.d.ts +3 -0
  123. package/lib/components/Illustrations/MoveAwayMedium.js +114 -0
  124. package/lib/components/Illustrations/MoveAwayMedium.js.map +1 -0
  125. package/lib/components/InfoTeaser/styles.module.scss +6 -8
  126. package/lib/components/Label/styles.module.scss +1 -1
  127. package/lib/components/LinkList/LinkList.d.ts +1 -1
  128. package/lib/components/LinkList/styles.module.scss +9 -11
  129. package/lib/components/LinkList/styles.module.scss.d.ts +1 -1
  130. package/lib/components/ListEditMode/styles.module.scss +5 -7
  131. package/lib/components/Loader/Loader.d.ts +1 -1
  132. package/lib/components/Loader/index.js +4 -4
  133. package/lib/components/Loader/index.js.map +1 -1
  134. package/lib/components/Loader/styles.module.scss +7 -7
  135. package/lib/components/Loader/styles.module.scss.d.ts +3 -3
  136. package/lib/components/Modal/constants.d.ts +1 -1
  137. package/lib/components/Modal/index.js +2 -2
  138. package/lib/components/Modal/index.js.map +1 -1
  139. package/lib/components/Modal/styles.module.scss +14 -19
  140. package/lib/components/Modal/styles.module.scss.d.ts +2 -3
  141. package/lib/components/Panel/index.js +1 -1
  142. package/lib/components/Panel/index.js.map +1 -1
  143. package/lib/components/Panel/styles.module.scss +15 -16
  144. package/lib/components/Panel/styles.module.scss.d.ts +1 -1
  145. package/lib/components/PopMenu/index.js +7 -4
  146. package/lib/components/PopMenu/index.js.map +1 -1
  147. package/lib/components/PopOver/styles.module.scss +1 -3
  148. package/lib/components/Progressbar/Progressbar.d.ts +1 -1
  149. package/lib/components/Progressbar/constants.d.ts +1 -1
  150. package/lib/components/Progressbar/index.js +4 -4
  151. package/lib/components/Progressbar/index.js.map +1 -1
  152. package/lib/components/Radio/Radio.d.ts +28 -0
  153. package/lib/components/Radio/index.d.ts +3 -0
  154. package/lib/components/Radio/index.js +7 -0
  155. package/lib/components/Radio/index.js.map +1 -0
  156. package/lib/components/{RadioButton → Radio}/styles.module.scss +8 -9
  157. package/lib/components/Radio/styles.module.scss.d.ts +26 -0
  158. package/lib/components/ServiceMessage/styles.module.scss +20 -22
  159. package/lib/components/Slider/styles.module.scss +1 -2
  160. package/lib/components/StatusDot/styles.module.scss +4 -5
  161. package/lib/components/StickyNote/index.js +2 -2
  162. package/lib/components/StickyNote/index.js.map +1 -1
  163. package/lib/components/StickyNote/styles.module.scss +9 -10
  164. package/lib/components/Tabs/TabList/styles.module.scss +20 -18
  165. package/lib/components/Tabs/TabPanel/styles.module.scss +2 -3
  166. package/lib/components/Tabs/styles.module.scss +0 -1
  167. package/lib/components/Tag/styles.module.scss +0 -1
  168. package/lib/components/Tile/styles.module.scss +5 -7
  169. package/lib/components/Toast/styles.module.scss +0 -1
  170. package/lib/components/Toggle/styles.module.scss +9 -10
  171. package/lib/components/Validation/index.js +2 -2
  172. package/lib/components/Validation/index.js.map +1 -1
  173. package/lib/components/VisualCheckboxCloud/Checkbox/styles.module.scss +0 -2
  174. package/lib/components/VisualCheckboxCloud/styles.module.scss +0 -1
  175. package/lib/components/VisualCheckboxGroup/VisualCheckbox/styles.module.scss +0 -2
  176. package/lib/components/VisualCheckboxGroup/styles.module.scss +0 -1
  177. package/lib/components/VisualContentgroupWithImage/styles.module.scss +0 -1
  178. package/lib/components/VisualRadioCloud/Radio/index.js +1 -1
  179. package/lib/components/VisualRadioCloud/Radio/styles.module.scss +0 -2
  180. package/lib/components/VisualRadioCloud/index.js +1 -1
  181. package/lib/components/VisualRadioCloud/styles.module.scss +0 -1
  182. package/lib/components/VisualRadioGroup/VisualRadio/styles.module.scss +0 -2
  183. package/lib/components/VisualRadioGroup/styles.module.scss +0 -1
  184. package/lib/constants.d.ts +2 -3
  185. package/lib/constants.js +2 -3
  186. package/lib/constants.js.map +1 -1
  187. package/lib/floating-ui.react.js +1 -458
  188. package/lib/floating-ui.react.js.map +1 -1
  189. package/lib/hooks/useDismissablePopover.d.ts +20 -0
  190. package/lib/hooks/useDismissablePopover.js +66 -0
  191. package/lib/hooks/useDismissablePopover.js.map +1 -0
  192. package/lib/hooks/useOutsideEvent.d.ts +3 -0
  193. package/lib/hooks/useOutsideEvent.js +24 -3
  194. package/lib/hooks/useOutsideEvent.js.map +1 -1
  195. package/lib/hooks/useReturnFocusOnClose.d.ts +7 -0
  196. package/lib/hooks/useReturnFocusOnClose.js +22 -0
  197. package/lib/hooks/useReturnFocusOnClose.js.map +1 -0
  198. package/lib/index.d.ts +2 -0
  199. package/lib/index.js +3 -1
  200. package/lib/scss/_visual-form.scss +47 -47
  201. package/lib/scss/helsenorge.scss +1 -0
  202. package/lib/scss/supernova/styles/colors.css +177 -122
  203. package/lib/scss/supernova/styles/typography.css +58 -51
  204. package/lib/scss/supernova-legacy/index.css +2 -0
  205. package/lib/scss/supernova-legacy/styles/legacy-colors.css +111 -0
  206. package/lib/utils/formSpacing.js +3 -3
  207. package/lib/utils/formSpacing.js.map +1 -1
  208. package/package.json +8 -14
  209. package/scss/_visual-form.scss +47 -47
  210. package/scss/helsenorge.scss +1 -0
  211. package/scss/supernova/styles/colors.css +177 -122
  212. package/scss/supernova/styles/typography.css +58 -51
  213. package/scss/supernova-legacy/index.css +2 -0
  214. package/scss/supernova-legacy/styles/legacy-colors.css +111 -0
  215. package/lib/DictionaryTrigger.js +0 -27
  216. package/lib/RadioButton.js +0 -84
  217. package/lib/RadioButton.js.map +0 -1
  218. package/lib/components/HelpTooltip/HelpTooltip.d.ts +0 -12
  219. package/lib/components/HelpTooltip/index.d.ts +0 -3
  220. package/lib/components/HelpTooltip/index.js +0 -48
  221. package/lib/components/HelpTooltip/index.js.map +0 -1
  222. package/lib/components/RadioButton/RadioButton.d.ts +0 -28
  223. package/lib/components/RadioButton/index.d.ts +0 -3
  224. package/lib/components/RadioButton/index.js +0 -7
  225. package/lib/components/RadioButton/index.js.map +0 -1
  226. package/lib/components/RadioButton/styles.module.scss.d.ts +0 -26
  227. package/lib/designsystem-react.css +0 -273
  228. /package/lib/components/{RadioButton → Radio}/RadioMarker/RadioMarker.d.ts +0 -0
  229. /package/lib/components/{RadioButton → Radio}/RadioMarker/styles.module.scss +0 -0
  230. /package/lib/components/{RadioButton → Radio}/RadioMarker/styles.module.scss.d.ts +0 -0
package/lib/Button.js CHANGED
@@ -26,7 +26,7 @@ var checkOnlyIconAria = (onlyIcon, ariaLabel, devEnv) => {
26
26
  if (devEnv && onlyIcon && (ariaLabel === void 0 || ariaLabel === "")) console.error(/* @__PURE__ */ new Error("Fyll inn ariaLabel prop på Button uten tekst for å opprettholde UU krav"));
27
27
  };
28
28
  var Button = (props) => {
29
- const { ariaLabel, id, children, wrapperClassName, className, arrow, concept = "normal", disabled = false, ellipsis = false, fluid = false, htmlMarkup = "button", onColor = "onlight", onBlur, onClick, size = "medium", variant = "fill", href, tabIndex, testId, target, type = "button", textClassName, textPosition = "left", ref, ...restProps } = props;
29
+ const { ariaLabel, id, children, wrapperClassName, className, arrow, concept = "normal", disabled = false, ellipsis = false, fluid = false, htmlMarkup = "button", onColor = "onlight", onBlur, onClick, size = "normal", variant = "fill", href, tabIndex, testId, target, type = "button", textClassName, textPosition = "left", ref, ...restProps } = props;
30
30
  const [leftIcon, rightIcon, restChildren] = useIcons(React.Children.toArray(children));
31
31
  const { refObject, isHovered } = usePseudoClasses(ref);
32
32
  const buttonContentRef = useRef(null);
@@ -46,7 +46,7 @@ var Button = (props) => {
46
46
  const buttonWrapperClasses = classNames(buttonStyles["button-wrapper"], { [buttonStyles["button-wrapper--fluid"]]: fluid || ellipsis }, wrapperClassName);
47
47
  const buttonClasses = classNames(buttonStyles.button, {
48
48
  [buttonStyles["button--destructive"]]: destructive,
49
- [buttonStyles["button--medium"]]: !large,
49
+ [buttonStyles["button--normal"]]: !large,
50
50
  [buttonStyles["button--large-non-borderless"]]: large && !largeBorderless,
51
51
  [buttonStyles["button--large-borderless"]]: largeBorderless,
52
52
  [buttonStyles["button--outline"]]: outlineVariant,
package/lib/Button.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","names":[],"sources":["../src/components/Button/Button.tsx","../src/components/Button/index.ts"],"sourcesContent":["import React, { type AriaAttributes, useEffect, useRef } from 'react';\n\nimport classNames from 'classnames';\n\nimport Icon, { IconSize } from './../Icon';\nimport { type HTMLButtonProps, type HTMLAnchorProps, AnalyticsId } from '../../constants';\nimport { type BaseIconElement, useIcons } from '../../hooks/useIcons';\nimport { useIsMobileBreakpoint } from '../../hooks/useIsMobileBreakpoint';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\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 Omit<HTMLButtonProps, 'onClick' | 'type'>, Omit<HTMLAnchorProps, 'onClick'>, 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?: (\n e?: React.MouseEvent<HTMLElement, MouseEvent> | React.FormEvent<unknown> | React.KeyboardEvent<HTMLUListElement> | null\n ) => 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 /** Ref that is passed to the component */\n ref?: React.RefObject<HTMLButtonElement | HTMLAnchorElement | null>;\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 getIconSize = (large: boolean, mobile: boolean, isBorderless: boolean): IconSize => {\n if ((isBorderless && large) || (mobile && large)) {\n return IconSize.Small;\n }\n\n if (large) {\n return IconSize.Medium;\n }\n\n return IconSize.XSmall;\n};\n\nconst checkOnlyIconAria = (onlyIcon: boolean, ariaLabel: string | undefined, devEnv: boolean): void => {\n if (devEnv && onlyIcon && (ariaLabel === undefined || ariaLabel === '')) {\n // eslint-disable-next-line no-console\n console.error(new Error('Fyll inn ariaLabel prop på Button uten tekst for å opprettholde UU krav'));\n }\n};\n\nconst Button: React.FC<ButtonProps> = props => {\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 ref,\n ...restProps\n } = props;\n const [leftIcon, rightIcon, restChildren] = useIcons(React.Children.toArray(children));\n const { refObject, isHovered } = usePseudoClasses<HTMLButtonElement | HTMLAnchorElement | null>(ref);\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;\n const largeBorderless = large && 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--medium']]: !large,\n [buttonStyles['button--large-non-borderless']]: large && !largeBorderless,\n [buttonStyles['button--large-borderless']]: largeBorderless,\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 = (): React.ReactNode => {\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 = (): React.ReactNode => {\n const iconSize = getIconSize(large, isMobile, borderlessVariant);\n\n return (\n <span className={buttonClasses}>\n {renderIcon(leftIcon, iconSize, !onlyIcon ? buttonStyles['button__left-icon'] : undefined)}\n {renderButtonContent()}\n {hasArrow\n ? renderIcon(\n <Icon svgIcon={ArrowRight} />,\n iconSize,\n classNames(buttonStyles['button__arrow'], { [buttonStyles['button__arrow--both-icons']]: bothIcons })\n )\n : renderIcon(rightIcon, iconSize, 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\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={refObject as React.RefObject<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={refObject as React.RefObject<HTMLAnchorElement>}\n tabIndex={tabIndex}\n {...restProps}\n >\n {renderbuttonContentWrapper()}\n </a>\n )}\n </>\n );\n};\n\nexport default Button;\n","import Button from './Button';\nexport * from './Button';\nexport default Button;\n"],"mappings":";;;;;;;;;;;;;AAsEA,IAAM,gBACJ,MACA,YACA,UACA,SACA,QACA,WACW;CACX,IAAI,UAAU,UACZ,OAAO,CAAC,UAAU,OAAO,SAAS,WAAW,CAAC,aAAa,MAAM,GAAG,IAAI,SAAS,OAAO;CAE1F,IAAI,UACF,OAAO,CAAC,UAAU,OAAO,SAAS,WAAW,GAAG,IAAI,GAAG,SAAS,OAAO,EAAE;CAE3E,IAAK,QAAQ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CAAA,GAER,oBAAC,QAAD,EAAA,UAAO,WAAW,YAAY,aAAmB,CAAA,CAC7C;;CAEV;CAEA,MAAM,mCAAoD;EACxD,MAAM,WAAW,YAAY,OAAO,UAAU,iBAAiB;EAE/D,OACE,qBAAC,QAAD;GAAM,WAAW;GAAjB,UAAA;IACG,WAAW,UAAU,UAAU,CAAC,WAAW,aAAa,uBAAuB,KAAA,CAAS;IACxF,oBAAoB;IACpB,WACG,WACE,oBAAC,cAAD,EAAM,SAAS,WAAa,CAAA,GAC5B,UACA,WAAW,aAAa,kBAAkB,GAAG,aAAa,+BAA+B,UAAU,CAAC,CACtG,IACA,WAAW,WAAW,UAAU,aAAa,qBAAqB;IACrE,mBACC,oBAAC,QAAD;KAAM,OAAO,EAAE,OAAO,UAAU;KAAG,WAAW,aAAa;KAAgC,eAAA;KACxF,UAAA;IACG,CAAA;GAEJ;;CAEV;CAEA,OACE,qBAAA,UAAA,EAAA,UAAA,CACG,eAAe,YACd,oBAAC,UAAD;EACM;EACI;EACC;EACC;EACV,eAAa;EACb,oBAAkB,YAAY;EAC9B,WAAW;EACX,KAAK;EACK;EACJ;EACN,GAAI;EAEH,UAAA,2BAA2B;CACtB,CAAA,GAET,eAAe,OACd,oBAAC,KAAD;EACM;EACI;EACC;EACT,eAAa;EACb,oBAAkB,YAAY;EAC9B,WAAW;EACL;EACE;EACR,KAAK,WAAW,WAAW,wBAAwB,MAAM;EACzD,KAAK;EACK;EACV,GAAI;EAEH,UAAA,2BAA2B;CAC3B,CAAA,CAEL,EAAA,CAAA;AAEN;;;ACrRA,IAAA,iBAAe"}
1
+ {"version":3,"file":"Button.js","names":[],"sources":["../src/components/Button/Button.tsx","../src/components/Button/index.ts"],"sourcesContent":["import React, { type AriaAttributes, useEffect, useRef } from 'react';\n\nimport classNames from 'classnames';\n\nimport Icon, { IconSize } from './../Icon';\nimport { type HTMLButtonProps, type HTMLAnchorProps, AnalyticsId } from '../../constants';\nimport { type BaseIconElement, useIcons } from '../../hooks/useIcons';\nimport { useIsMobileBreakpoint } from '../../hooks/useIsMobileBreakpoint';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\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 = 'normal' | '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 Omit<HTMLButtonProps, 'onClick' | 'type'>, Omit<HTMLAnchorProps, 'onClick'>, 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?: (\n e?: React.MouseEvent<HTMLElement, MouseEvent> | React.FormEvent<unknown> | React.KeyboardEvent<HTMLUListElement> | null\n ) => 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 /** Ref that is passed to the component */\n ref?: React.RefObject<HTMLButtonElement | HTMLAnchorElement | null>;\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 getIconSize = (large: boolean, mobile: boolean, isBorderless: boolean): IconSize => {\n if ((isBorderless && large) || (mobile && large)) {\n return IconSize.Small;\n }\n\n if (large) {\n return IconSize.Medium;\n }\n\n return IconSize.XSmall;\n};\n\nconst checkOnlyIconAria = (onlyIcon: boolean, ariaLabel: string | undefined, devEnv: boolean): void => {\n if (devEnv && onlyIcon && (ariaLabel === undefined || ariaLabel === '')) {\n // eslint-disable-next-line no-console\n console.error(new Error('Fyll inn ariaLabel prop på Button uten tekst for å opprettholde UU krav'));\n }\n};\n\nconst Button: React.FC<ButtonProps> = props => {\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 = 'normal',\n variant = 'fill',\n href,\n tabIndex,\n testId,\n target,\n type = 'button',\n textClassName,\n textPosition = 'left',\n ref,\n ...restProps\n } = props;\n const [leftIcon, rightIcon, restChildren] = useIcons(React.Children.toArray(children));\n const { refObject, isHovered } = usePseudoClasses<HTMLButtonElement | HTMLAnchorElement | null>(ref);\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;\n const largeBorderless = large && 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-non-borderless']]: large && !largeBorderless,\n [buttonStyles['button--large-borderless']]: largeBorderless,\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 = (): React.ReactNode => {\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 = (): React.ReactNode => {\n const iconSize = getIconSize(large, isMobile, borderlessVariant);\n\n return (\n <span className={buttonClasses}>\n {renderIcon(leftIcon, iconSize, !onlyIcon ? buttonStyles['button__left-icon'] : undefined)}\n {renderButtonContent()}\n {hasArrow\n ? renderIcon(\n <Icon svgIcon={ArrowRight} />,\n iconSize,\n classNames(buttonStyles['button__arrow'], { [buttonStyles['button__arrow--both-icons']]: bothIcons })\n )\n : renderIcon(rightIcon, iconSize, 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\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={refObject as React.RefObject<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={refObject as React.RefObject<HTMLAnchorElement>}\n tabIndex={tabIndex}\n {...restProps}\n >\n {renderbuttonContentWrapper()}\n </a>\n )}\n </>\n );\n};\n\nexport default Button;\n","import Button from './Button';\nexport * from './Button';\nexport default Button;\n"],"mappings":";;;;;;;;;;;;;AAsEA,IAAM,gBACJ,MACA,YACA,UACA,SACA,QACA,WACW;CACX,IAAI,UAAU,UACZ,OAAO,CAAC,UAAU,OAAO,SAAS,WAAW,CAAC,aAAa,MAAM,GAAG,IAAI,SAAS,OAAO;CAE1F,IAAI,UACF,OAAO,CAAC,UAAU,OAAO,SAAS,WAAW,GAAG,IAAI,GAAG,SAAS,OAAO,EAAE;CAE3E,IAAK,QAAQ,CAAC,UAAY,CAAC,QAAQ,QACjC,OAAO;CAGT,OAAO,YAAY,WAAW,SAAS,aAAa,GAAG,IAAI,SAAS,UAAU,GAAG;AACnF;AACA,IAAM,eAAe,OAAgB,QAAiB,iBAAoC;CACxF,IAAK,gBAAgB,SAAW,UAAU,OACxC,OAAO,SAAS;CAGlB,IAAI,OACF,OAAO,SAAS;CAGlB,OAAO,SAAS;AAClB;AAEA,IAAM,qBAAqB,UAAmB,WAA+B,WAA0B;CACrG,IAAI,UAAU,aAAa,cAAc,KAAA,KAAa,cAAc,KAElE,QAAQ,sBAAM,IAAI,MAAM,yEAAyE,CAAC;AAEtG;AAEA,IAAM,UAAgC,UAAS;CAC7C,MAAM,EACJ,WACA,IACA,UACA,kBACA,WACA,OACA,UAAU,UACV,WAAW,OACX,WAAW,OACX,QAAQ,OACR,aAAa,UACb,UAAU,WACV,QACA,SACA,OAAO,UACP,UAAU,QACV,MACA,UACA,QACA,QACA,OAAO,UACP,eACA,eAAe,QACf,KACA,GAAG,cACD;CACJ,MAAM,CAAC,UAAU,WAAW,gBAAgB,SAAS,MAAM,SAAS,QAAQ,QAAQ,CAAC;CACrF,MAAM,EAAE,WA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