@helsenorge/designsystem-react 9.5.0 → 10.0.0-beta.1

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 (60) hide show
  1. package/Avatar.js +4 -4
  2. package/Avatar.js.map +1 -1
  3. package/CHANGELOG.md +769 -1243
  4. package/Label.js +5 -8
  5. package/Label.js.map +1 -1
  6. package/LinkList.js +13 -4
  7. package/LinkList.js.map +1 -1
  8. package/ListHeader.js +9 -40
  9. package/ListHeader.js.map +1 -1
  10. package/Title.js +2 -1
  11. package/Title.js.map +1 -1
  12. package/components/Avatar/Avatar.d.ts +4 -4
  13. package/components/Badge/styles.module.scss +1 -6
  14. package/components/Chip/styles.module.scss +0 -1
  15. package/components/EmptyState/EmptyBoxBeeCompact.d.ts +4 -0
  16. package/components/EmptyState/EmptyBoxBeeMedium.d.ts +4 -0
  17. package/components/EmptyState/EmptyBoxBeeSmall.d.ts +4 -0
  18. package/components/EmptyState/EmptyState.d.ts +18 -0
  19. package/components/EmptyState/index.js +315 -155
  20. package/components/EmptyState/index.js.map +1 -1
  21. package/components/EmptyState/styles.module.scss +26 -10
  22. package/components/EmptyState/styles.module.scss.d.ts +3 -1
  23. package/components/ExpanderHierarchy/expander.module.scss +1 -1
  24. package/components/ExpanderHierarchy/styles.module.scss +1 -1
  25. package/components/FormGroup/styles.module.scss +1 -1
  26. package/components/Input/styles.module.scss +5 -5
  27. package/components/Label/Label.d.ts +3 -3
  28. package/components/Label/SubLabel.d.ts +0 -2
  29. package/components/Label/styles.module.scss +4 -10
  30. package/components/Label/styles.module.scss.d.ts +1 -1
  31. package/components/LinkList/LinkList.d.ts +3 -3
  32. package/components/LinkList/styles.module.scss +120 -40
  33. package/components/LinkList/styles.module.scss.d.ts +18 -5
  34. package/components/ListHeader/styles.module.scss +40 -117
  35. package/components/ListHeader/styles.module.scss.d.ts +1 -21
  36. package/components/PanelList/styles.module.scss +0 -1
  37. package/components/StepButtons/styles.module.scss +0 -1
  38. package/components/Tabs/TabPanel/styles.module.scss +0 -1
  39. package/components/Tabs/Tabs.d.ts +0 -3
  40. package/components/Tabs/index.js.map +1 -1
  41. package/components/Tag/styles.module.scss +0 -1
  42. package/components/Textarea/styles.module.scss +3 -2
  43. package/components/Title/Title.d.ts +2 -2
  44. package/components/Title/styles.module.scss +5 -1
  45. package/components/Title/styles.module.scss.d.ts +1 -0
  46. package/components/Toggle/Toggle.d.ts +1 -1
  47. package/components/Toggle/index.js +1 -1
  48. package/components/Toggle/index.js.map +1 -1
  49. package/components/Toggle/styles.module.scss +5 -5
  50. package/components/Toggle/styles.module.scss.d.ts +1 -1
  51. package/package.json +1 -1
  52. package/scss/_body.scss +2 -7
  53. package/scss/_font-mixins.scss +186 -0
  54. package/scss/_font-settings.scss +0 -2
  55. package/scss/_input.scss +1 -0
  56. package/scss/typography.module.scss +27 -27
  57. package/scss/typography.module.scss.d.ts +6 -1
  58. package/scss/typography.stories.tsx +18 -2
  59. package/components/EmptyState/NobodyHome.d.ts +0 -3
  60. package/scss/_title.scss +0 -78
package/Avatar.js CHANGED
@@ -12,7 +12,7 @@ var AvatarSize = /* @__PURE__ */ ((AvatarSize2) => {
12
12
  return AvatarSize2;
13
13
  })(AvatarSize || {});
14
14
  const Avatar = React.forwardRef(function AvatarForwardedRef(props, ref) {
15
- const { children, className = "", selected = false, variant = "normal", type = "normal", size = "small", testId } = props;
15
+ const { children, className = "", selected = false, color = "blueberry", variant = "square", size = "small", testId } = props;
16
16
  const truncatedName = children.charAt(0).toLocaleUpperCase() + children.substring(1, 2);
17
17
  return /* @__PURE__ */ jsx(
18
18
  "span",
@@ -20,8 +20,8 @@ const Avatar = React.forwardRef(function AvatarForwardedRef(props, ref) {
20
20
  className: classNames(
21
21
  styles.avatar,
22
22
  selected && styles["avatar--selected"],
23
- variant === "black" && styles["avatar--black"],
24
- type === "circle" && styles["avatar--circle"],
23
+ color === "black" && styles["avatar--black"],
24
+ variant === "circle" && styles["avatar--circle"],
25
25
  size === "xsmall" && styles["avatar--xsmall"],
26
26
  size === "small" && styles["avatar--small"],
27
27
  className
@@ -29,7 +29,7 @@ const Avatar = React.forwardRef(function AvatarForwardedRef(props, ref) {
29
29
  ref,
30
30
  "data-testid": testId,
31
31
  "data-analyticsid": AnalyticsId.Avatar,
32
- children: selected ? /* @__PURE__ */ jsx(Icon, { svgIcon: Check, size: IconSize.Small, color: variant === "black" ? palette.neutral900 : palette.blueberry600 }) : truncatedName
32
+ children: selected ? /* @__PURE__ */ jsx(Icon, { svgIcon: Check, size: IconSize.Small, color: color === "black" ? palette.neutral900 : palette.blueberry600 }) : truncatedName
33
33
  }
34
34
  );
35
35
  });
package/Avatar.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.js","sources":["../src/components/Avatar/Avatar.tsx"],"sourcesContent":["import React from 'react';\n\nimport cn from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\nimport { palette } from '../../theme/palette';\nimport Icon, { IconSize } from '../Icon';\nimport Check from '../Icons/Check';\n\nimport styles from './styles.module.scss';\n\nexport enum AvatarSize {\n xsmall = 'xsmall',\n small = 'small',\n}\n\nexport interface AvatarProps {\n /** Name to display in the avatar. Will be truncated to the first two characters. */\n children: string;\n /** Displays a check icon to indicated the selected state. */\n selected?: boolean;\n /** background and color will be determined on variant. */\n variant?: 'normal' | 'black';\n /** @deprecated Square or circle variant of avatar. The circle should only be used for representation of someone else. NB: This is temporary and will be renamed in v10 */\n type?: 'normal' | 'circle';\n /** Avatar size. Default: small */\n size?: keyof typeof AvatarSize;\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\nexport type AvatarType = React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLElement>>;\nconst Avatar: AvatarType = React.forwardRef(function AvatarForwardedRef(props: AvatarProps, ref: React.ForwardedRef<HTMLElement>) {\n const { children, className = '', selected = false, variant = 'normal', type = 'normal', size = AvatarSize.small, testId } = props;\n const truncatedName = children.charAt(0).toLocaleUpperCase() + children.substring(1, 2);\n return (\n <span\n className={cn(\n styles.avatar,\n selected && styles['avatar--selected'],\n variant === 'black' && styles['avatar--black'],\n type === 'circle' && styles['avatar--circle'],\n size === AvatarSize.xsmall && styles['avatar--xsmall'],\n size === AvatarSize.small && styles['avatar--small'],\n className\n )}\n ref={ref}\n data-testid={testId}\n data-analyticsid={AnalyticsId.Avatar}\n >\n {selected ? (\n <Icon svgIcon={Check} size={IconSize.Small} color={variant === 'black' ? palette.neutral900 : palette.blueberry600} />\n ) : (\n truncatedName\n )}\n </span>\n );\n});\n\nexport default Avatar;\n"],"names":["AvatarSize","cn"],"mappings":";;;;;;;;AAWY,IAAA,+BAAAA,gBAAL;AACLA,cAAA,QAAS,IAAA;AACTA,cAAA,OAAQ,IAAA;AAFEA,SAAAA;AAAA,GAAA,cAAA,CAAA,CAAA;AAsBZ,MAAM,SAAqB,MAAM,WAAW,SAAS,mBAAmB,OAAoB,KAAsC;AAChI,QAAM,EAAE,UAAU,YAAY,IAAI,WAAW,OAAO,UAAU,UAAU,OAAO,UAAU,OAAO,SAAkB,OAAW,IAAA;AACvH,QAAA,gBAAgB,SAAS,OAAO,CAAC,EAAE,kBAAsB,IAAA,SAAS,UAAU,GAAG,CAAC;AAEpF,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAAA,QACT,OAAO;AAAA,QACP,YAAY,OAAO,kBAAkB;AAAA,QACrC,YAAY,WAAW,OAAO,eAAe;AAAA,QAC7C,SAAS,YAAY,OAAO,gBAAgB;AAAA,QAC5C,SAAS,YAAqB,OAAO,gBAAgB;AAAA,QACrD,SAAS,WAAoB,OAAO,eAAe;AAAA,QACnD;AAAA,MACF;AAAA,MACA;AAAA,MACA,eAAa;AAAA,MACb,oBAAkB,YAAY;AAAA,MAE7B,UACC,WAAA,oBAAC,MAAK,EAAA,SAAS,OAAO,MAAM,SAAS,OAAO,OAAO,YAAY,UAAU,QAAQ,aAAa,QAAQ,cAAc,IAEpH;AAAA,IAAA;AAAA,EAEJ;AAEJ,CAAC;"}
1
+ {"version":3,"file":"Avatar.js","sources":["../src/components/Avatar/Avatar.tsx"],"sourcesContent":["import React from 'react';\n\nimport cn from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\nimport { palette } from '../../theme/palette';\nimport Icon, { IconSize } from '../Icon';\nimport Check from '../Icons/Check';\n\nimport styles from './styles.module.scss';\n\nexport enum AvatarSize {\n xsmall = 'xsmall',\n small = 'small',\n}\n\nexport interface AvatarProps {\n /** Name to display in the avatar. Will be truncated to the first two characters. */\n children: string;\n /** Displays a check icon to indicated the selected state. */\n selected?: boolean;\n /** Sets blue or black color on avatar. */\n color?: 'blueberry' | 'black';\n /** Square or circle variant of avatar. The circle should only be used for representation of someone else. NB: This is temporary and will be renamed in v10 */\n variant?: 'square' | 'circle';\n /** Avatar size. Default: small */\n size?: keyof typeof AvatarSize;\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\nexport type AvatarType = React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLElement>>;\nconst Avatar: AvatarType = React.forwardRef(function AvatarForwardedRef(props: AvatarProps, ref: React.ForwardedRef<HTMLElement>) {\n const { children, className = '', selected = false, color = 'blueberry', variant = 'square', size = AvatarSize.small, testId } = props;\n const truncatedName = children.charAt(0).toLocaleUpperCase() + children.substring(1, 2);\n return (\n <span\n className={cn(\n styles.avatar,\n selected && styles['avatar--selected'],\n color === 'black' && styles['avatar--black'],\n variant === 'circle' && styles['avatar--circle'],\n size === AvatarSize.xsmall && styles['avatar--xsmall'],\n size === AvatarSize.small && styles['avatar--small'],\n className\n )}\n ref={ref}\n data-testid={testId}\n data-analyticsid={AnalyticsId.Avatar}\n >\n {selected ? (\n <Icon svgIcon={Check} size={IconSize.Small} color={color === 'black' ? palette.neutral900 : palette.blueberry600} />\n ) : (\n truncatedName\n )}\n </span>\n );\n});\n\nexport default Avatar;\n"],"names":["AvatarSize","cn"],"mappings":";;;;;;;;AAWY,IAAA,+BAAAA,gBAAL;AACLA,cAAA,QAAS,IAAA;AACTA,cAAA,OAAQ,IAAA;AAFEA,SAAAA;AAAA,GAAA,cAAA,CAAA,CAAA;AAsBZ,MAAM,SAAqB,MAAM,WAAW,SAAS,mBAAmB,OAAoB,KAAsC;AAChI,QAAM,EAAE,UAAU,YAAY,IAAI,WAAW,OAAO,QAAQ,aAAa,UAAU,UAAU,OAAO,SAAkB,OAAW,IAAA;AAC3H,QAAA,gBAAgB,SAAS,OAAO,CAAC,EAAE,kBAAsB,IAAA,SAAS,UAAU,GAAG,CAAC;AAEpF,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAAA,QACT,OAAO;AAAA,QACP,YAAY,OAAO,kBAAkB;AAAA,QACrC,UAAU,WAAW,OAAO,eAAe;AAAA,QAC3C,YAAY,YAAY,OAAO,gBAAgB;AAAA,QAC/C,SAAS,YAAqB,OAAO,gBAAgB;AAAA,QACrD,SAAS,WAAoB,OAAO,eAAe;AAAA,QACnD;AAAA,MACF;AAAA,MACA;AAAA,MACA,eAAa;AAAA,MACb,oBAAkB,YAAY;AAAA,MAE7B,UACC,WAAA,oBAAC,MAAK,EAAA,SAAS,OAAO,MAAM,SAAS,OAAO,OAAO,UAAU,UAAU,QAAQ,aAAa,QAAQ,cAAc,IAElH;AAAA,IAAA;AAAA,EAEJ;AAEJ,CAAC;"}