@helsenorge/designsystem-react 9.4.3 → 10.0.0-beta.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/Avatar.js +4 -4
- package/Avatar.js.map +1 -1
- package/CHANGELOG.md +1245 -745
- package/HighlightPanel.js +5 -2
- package/HighlightPanel.js.map +1 -1
- package/Label.js +3 -3
- package/Label.js.map +1 -1
- package/LinkList.js +13 -4
- package/LinkList.js.map +1 -1
- package/ListHeader.js +9 -40
- package/ListHeader.js.map +1 -1
- package/PopOver.js +1 -1
- package/PopOver.js.map +1 -1
- package/TabList.js +3 -1
- package/TabList.js.map +1 -1
- package/Title.js +2 -1
- package/Title.js.map +1 -1
- package/components/Avatar/Avatar.d.ts +4 -4
- package/components/Badge/styles.module.scss +1 -6
- package/components/Chip/styles.module.scss +0 -1
- package/components/EmptyState/EmptyBoxBeeCompact.d.ts +4 -0
- package/components/EmptyState/EmptyBoxBeeMedium.d.ts +4 -0
- package/components/EmptyState/EmptyBoxBeeSmall.d.ts +4 -0
- package/components/EmptyState/EmptyState.d.ts +18 -0
- package/components/EmptyState/index.js +315 -155
- package/components/EmptyState/index.js.map +1 -1
- package/components/EmptyState/styles.module.scss +26 -10
- package/components/EmptyState/styles.module.scss.d.ts +3 -1
- package/components/ExpanderHierarchy/expander.module.scss +1 -1
- package/components/ExpanderHierarchy/styles.module.scss +1 -1
- package/components/FormGroup/styles.module.scss +1 -1
- package/components/Input/styles.module.scss +5 -5
- package/components/Label/Label.d.ts +2 -2
- package/components/Label/styles.module.scss +4 -10
- package/components/Label/styles.module.scss.d.ts +1 -1
- package/components/LinkList/LinkList.d.ts +3 -3
- package/components/LinkList/styles.module.scss +120 -40
- package/components/LinkList/styles.module.scss.d.ts +18 -5
- package/components/ListHeader/styles.module.scss +40 -117
- package/components/ListHeader/styles.module.scss.d.ts +1 -21
- package/components/PanelList/styles.module.scss +0 -1
- package/components/StepButtons/styles.module.scss +0 -1
- package/components/Tabs/TabList/TabItem.d.ts +1 -0
- package/components/Tabs/TabPanel/styles.module.scss +0 -1
- package/components/Tabs/Tabs.d.ts +0 -3
- package/components/Tabs/index.js.map +1 -1
- package/components/Tag/styles.module.scss +0 -1
- package/components/Textarea/styles.module.scss +3 -2
- package/components/Title/Title.d.ts +2 -2
- package/components/Title/styles.module.scss +5 -1
- package/components/Title/styles.module.scss.d.ts +1 -0
- package/components/Toggle/Toggle.d.ts +1 -1
- package/components/Toggle/index.js +17 -17
- package/components/Toggle/index.js.map +1 -1
- package/components/Toggle/styles.module.scss +5 -5
- package/components/Toggle/styles.module.scss.d.ts +1 -1
- package/package.json +2 -2
- package/scss/_body.scss +2 -7
- package/scss/_font-mixins.scss +186 -0
- package/scss/_font-settings.scss +0 -2
- package/scss/_input.scss +1 -0
- package/scss/typography.module.scss +27 -27
- package/scss/typography.module.scss.d.ts +6 -1
- package/scss/typography.stories.tsx +18 -2
- package/components/EmptyState/NobodyHome.d.ts +0 -3
- 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,
|
|
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
|
-
|
|
24
|
-
|
|
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:
|
|
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 /**
|
|
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;"}
|