@skatteetaten/ds-overlays 2.7.1 → 2.8.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.
- package/Modal/Modal.css +1 -1
- package/Modal/Modal.module.css +1 -1
- package/Popover/PopoverContent/PopoverContent.css +1 -1
- package/Popover/PopoverContent/PopoverContent.module.css +1 -1
- package/RolePicker/RolePickerPeopleList/RolePickerPeopleList.esm.js +9 -5
- package/RolePicker/index.esm.js +3 -2
- package/RolePicker/utils.esm.js +24 -0
- package/WordInfo/WordInfoTrigger/WordInfoTrigger.esm.js +1 -0
- package/package.json +11 -11
- package/src/RolePicker/RolePicker.types.d.ts +1 -0
- package/src/RolePicker/utils.d.ts +3 -0
package/Modal/Modal.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
html:has(dialog[open]){overflow:hidden}.Modal-module_modal__Kyr-Y{--ds-modal-footer-height: 0px;position:fixed;min-width:18rem;max-width:calc(100vw - 2*var(--spacing-m));max-height:calc(100dvh - 2*var(--spacing-m));box-sizing:border-box;padding:0;padding-bottom:calc(env(safe-area-inset-bottom, 0px) + var(--ds-modal-footer-height));border:.25rem solid var(--theme-primary);background-color:var(--palette-graphite-0);box-shadow:0 0 8px 2px rgba(0,0,0,.16),0 2px 4px -4px rgba(0,0,0,.16);font-size:var(--font-size-m);font-weight:var(--font-weight-regular);line-height:var(--semantic-line-height-article);overflow-y:auto}@media(min-width: 640px){.Modal-module_modal__Kyr-Y{max-width:var(--semantic-responsive-article)}}@supports not (height: 100dvh){.Modal-module_modal__Kyr-Y{max-height:calc(100vh - 2*var(--spacing-m))}}.Modal-module_modal__Kyr-Y::backdrop{background:hsla(0,0%,100%,.8)}.Modal-module_modalContainer__muf75{outline:none}.Modal-module_modalHeading__uwT1R{padding-right:var(--spacing-xl)}.Modal-module_modalHeadingNoPadding__t2hkH{padding-right:0}.Modal-module_modalIllustration__jbA32{width:100%;margin-bottom:var(--spacing-m)}.Modal-module_modal__Kyr-Y[data-variant=plain]{border:none}.Modal-module_modalContent__bSZMh[data-padding=none]{padding:0}.Modal-module_modalContent__bSZMh[data-padding=s]{padding:calc(var(--spacing-s) - .25rem)}.Modal-module_modalContent__bSZMh[data-padding=m]{padding:calc(var(--spacing-m) - .25rem)}.Modal-module_modalContent__bSZMh[data-padding=l]{padding:calc(var(--spacing-l) - .25rem)}.Modal-module_modalContent__bSZMh[data-padding=mega]{padding:calc(var(--spacing-mega) - .25rem)}.Modal-module_modalContent__bSZMh[data-no-padding-top=true]{padding-top:0}.Modal-module_closeButton__jgbDq{position:absolute;top:0;right:0;margin:var(--spacing-s)}.Modal-module_closeButton__jgbDq:
|
|
1
|
+
html:has(dialog[open]){overflow:hidden}.Modal-module_modal__Kyr-Y{--ds-modal-footer-height: 0px;position:fixed;min-width:18rem;max-width:calc(100vw - 2*var(--spacing-m));max-height:calc(100dvh - 2*var(--spacing-m));box-sizing:border-box;padding:0;padding-bottom:calc(env(safe-area-inset-bottom, 0px) + var(--ds-modal-footer-height));border:.25rem solid var(--theme-primary);background-color:var(--palette-graphite-0);box-shadow:0 0 8px 2px rgba(0,0,0,.16),0 2px 4px -4px rgba(0,0,0,.16);font-size:var(--font-size-m);font-weight:var(--font-weight-regular);line-height:var(--semantic-line-height-article);overflow-y:auto}@media(min-width: 640px){.Modal-module_modal__Kyr-Y{max-width:var(--semantic-responsive-article)}}@supports not (height: 100dvh){.Modal-module_modal__Kyr-Y{max-height:calc(100vh - 2*var(--spacing-m))}}.Modal-module_modal__Kyr-Y::backdrop{background:hsla(0,0%,100%,.8)}.Modal-module_modalContainer__muf75{outline:none}.Modal-module_modalHeading__uwT1R{padding-right:var(--spacing-xl)}.Modal-module_modalHeadingNoPadding__t2hkH{padding-right:0}.Modal-module_modalIllustration__jbA32{width:100%;margin-bottom:var(--spacing-m)}.Modal-module_modal__Kyr-Y[data-variant=plain]{border:none}.Modal-module_modalContent__bSZMh[data-padding=none]{padding:0}.Modal-module_modalContent__bSZMh[data-padding=s]{padding:calc(var(--spacing-s) - .25rem)}.Modal-module_modalContent__bSZMh[data-padding=m]{padding:calc(var(--spacing-m) - .25rem)}.Modal-module_modalContent__bSZMh[data-padding=l]{padding:calc(var(--spacing-l) - .25rem)}.Modal-module_modalContent__bSZMh[data-padding=mega]{padding:calc(var(--spacing-mega) - .25rem)}.Modal-module_modalContent__bSZMh[data-no-padding-top=true]{padding-top:0}.Modal-module_closeButton__jgbDq{position:absolute;top:0;right:0;margin:var(--spacing-s);--icon-button-icon-color: var(--palette-graphite-100)}.Modal-module_closeButton__jgbDq:active{--icon-button-icon-color: var(--palette-graphite-0)}.Modal-module_srOnly__W8dQv{position:absolute;overflow:hidden;width:1px;height:1px;padding:0;border:0;margin:-1px;clip:rect(0, 0, 0, 0);white-space:nowrap}
|
package/Modal/Modal.module.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
html:has(dialog[open]){overflow:hidden}.Modal-module_modal__Kyr-Y{--ds-modal-footer-height: 0px;position:fixed;min-width:18rem;max-width:calc(100vw - 2*var(--spacing-m));max-height:calc(100dvh - 2*var(--spacing-m));box-sizing:border-box;padding:0;padding-bottom:calc(env(safe-area-inset-bottom, 0px) + var(--ds-modal-footer-height));border:.25rem solid var(--theme-primary);background-color:var(--palette-graphite-0);box-shadow:0 0 8px 2px rgba(0,0,0,.16),0 2px 4px -4px rgba(0,0,0,.16);font-size:var(--font-size-m);font-weight:var(--font-weight-regular);line-height:var(--semantic-line-height-article);overflow-y:auto}@media(min-width: 640px){.Modal-module_modal__Kyr-Y{max-width:var(--semantic-responsive-article)}}@supports not (height: 100dvh){.Modal-module_modal__Kyr-Y{max-height:calc(100vh - 2*var(--spacing-m))}}.Modal-module_modal__Kyr-Y::backdrop{background:hsla(0,0%,100%,.8)}.Modal-module_modalContainer__muf75{outline:none}.Modal-module_modalHeading__uwT1R{padding-right:var(--spacing-xl)}.Modal-module_modalHeadingNoPadding__t2hkH{padding-right:0}.Modal-module_modalIllustration__jbA32{width:100%;margin-bottom:var(--spacing-m)}.Modal-module_modal__Kyr-Y[data-variant=plain]{border:none}.Modal-module_modalContent__bSZMh[data-padding=none]{padding:0}.Modal-module_modalContent__bSZMh[data-padding=s]{padding:calc(var(--spacing-s) - .25rem)}.Modal-module_modalContent__bSZMh[data-padding=m]{padding:calc(var(--spacing-m) - .25rem)}.Modal-module_modalContent__bSZMh[data-padding=l]{padding:calc(var(--spacing-l) - .25rem)}.Modal-module_modalContent__bSZMh[data-padding=mega]{padding:calc(var(--spacing-mega) - .25rem)}.Modal-module_modalContent__bSZMh[data-no-padding-top=true]{padding-top:0}.Modal-module_closeButton__jgbDq{position:absolute;top:0;right:0;margin:var(--spacing-s)}.Modal-module_closeButton__jgbDq:
|
|
1
|
+
html:has(dialog[open]){overflow:hidden}.Modal-module_modal__Kyr-Y{--ds-modal-footer-height: 0px;position:fixed;min-width:18rem;max-width:calc(100vw - 2*var(--spacing-m));max-height:calc(100dvh - 2*var(--spacing-m));box-sizing:border-box;padding:0;padding-bottom:calc(env(safe-area-inset-bottom, 0px) + var(--ds-modal-footer-height));border:.25rem solid var(--theme-primary);background-color:var(--palette-graphite-0);box-shadow:0 0 8px 2px rgba(0,0,0,.16),0 2px 4px -4px rgba(0,0,0,.16);font-size:var(--font-size-m);font-weight:var(--font-weight-regular);line-height:var(--semantic-line-height-article);overflow-y:auto}@media(min-width: 640px){.Modal-module_modal__Kyr-Y{max-width:var(--semantic-responsive-article)}}@supports not (height: 100dvh){.Modal-module_modal__Kyr-Y{max-height:calc(100vh - 2*var(--spacing-m))}}.Modal-module_modal__Kyr-Y::backdrop{background:hsla(0,0%,100%,.8)}.Modal-module_modalContainer__muf75{outline:none}.Modal-module_modalHeading__uwT1R{padding-right:var(--spacing-xl)}.Modal-module_modalHeadingNoPadding__t2hkH{padding-right:0}.Modal-module_modalIllustration__jbA32{width:100%;margin-bottom:var(--spacing-m)}.Modal-module_modal__Kyr-Y[data-variant=plain]{border:none}.Modal-module_modalContent__bSZMh[data-padding=none]{padding:0}.Modal-module_modalContent__bSZMh[data-padding=s]{padding:calc(var(--spacing-s) - .25rem)}.Modal-module_modalContent__bSZMh[data-padding=m]{padding:calc(var(--spacing-m) - .25rem)}.Modal-module_modalContent__bSZMh[data-padding=l]{padding:calc(var(--spacing-l) - .25rem)}.Modal-module_modalContent__bSZMh[data-padding=mega]{padding:calc(var(--spacing-mega) - .25rem)}.Modal-module_modalContent__bSZMh[data-no-padding-top=true]{padding-top:0}.Modal-module_closeButton__jgbDq{position:absolute;top:0;right:0;margin:var(--spacing-s);--icon-button-icon-color: var(--palette-graphite-100)}.Modal-module_closeButton__jgbDq:active{--icon-button-icon-color: var(--palette-graphite-0)}.Modal-module_srOnly__W8dQv{position:absolute;overflow:hidden;width:1px;height:1px;padding:0;border:0;margin:-1px;clip:rect(0, 0, 0, 0);white-space:nowrap}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.PopoverContent-module_popover__p0BhU{--popover-max-height: 560px;z-index:50;width:-moz-fit-content;width:fit-content;max-width:var(--container-s);border:1px solid var(--border-color);background-color:var(--background-color)}.PopoverContent-module_popover_forest__HD4fi{--background-color: var(--semantic-success-background);--border-color: var(--semantic-success-foreground)}.PopoverContent-module_popover_ochre__KKnbi{--background-color: var(--semantic-warning-background);--border-color: var(--semantic-warning-foreground)}.PopoverContent-module_popover_white__TaNXR{--background-color: var(--palette-graphite-0);--border-color: var(--palette-graphite-100)}.PopoverContent-module_popoverContent__q0qTL{display:flex;max-height:var(--popover-max-height);overflow-y:auto}.PopoverContent-module_popoverContentWrapper__-lefQ{flex-grow:1;padding:var(--spacing-s) 0 var(--spacing-s) var(--spacing-s);margin:0}@media(min-width: 480px){.PopoverContent-module_popoverContentWrapper__-lefQ{padding:var(--spacing-m) 0 var(--spacing-m) var(--spacing-m)}}.PopoverContent-module_popoverContentCloseButton__ryJUt{align-self:start;margin:var(--spacing-s) var(--spacing-s) 0 0}.PopoverContent-module_popoverContentCloseButton__ryJUt:
|
|
1
|
+
.PopoverContent-module_popover__p0BhU{--popover-max-height: 560px;z-index:50;width:-moz-fit-content;width:fit-content;max-width:var(--container-s);border:1px solid var(--border-color);background-color:var(--background-color)}.PopoverContent-module_popover_forest__HD4fi{--background-color: var(--semantic-success-background);--border-color: var(--semantic-success-foreground)}.PopoverContent-module_popover_ochre__KKnbi{--background-color: var(--semantic-warning-background);--border-color: var(--semantic-warning-foreground)}.PopoverContent-module_popover_white__TaNXR{--background-color: var(--palette-graphite-0);--border-color: var(--palette-graphite-100)}.PopoverContent-module_popoverContent__q0qTL{display:flex;max-height:var(--popover-max-height);overflow-y:auto}.PopoverContent-module_popoverContentWrapper__-lefQ{flex-grow:1;padding:var(--spacing-s) 0 var(--spacing-s) var(--spacing-s);margin:0}@media(min-width: 480px){.PopoverContent-module_popoverContentWrapper__-lefQ{padding:var(--spacing-m) 0 var(--spacing-m) var(--spacing-m)}}.PopoverContent-module_popoverContentCloseButton__ryJUt{align-self:start;margin:var(--spacing-s) var(--spacing-s) 0 0;--icon-button-icon-color: var(--palette-graphite-100)}.PopoverContent-module_popoverContentCloseButton__ryJUt:active{--icon-button-icon-color: var(--palette-graphite-0)}.PopoverContent-module_popoverArrow__t-CMj{position:absolute;z-index:-1;width:var(--size-large);height:var(--size-large);border:1px solid var(--border-color);background-color:var(--background-color);transform:rotate(45deg)}.PopoverContent-module_popoverArrow_top__pDZp9{border-top-color:rgba(0,0,0,0);border-left-color:rgba(0,0,0,0)}.PopoverContent-module_popoverArrow_bottom__PG8BL{border-right-color:rgba(0,0,0,0);border-bottom-color:rgba(0,0,0,0)}.PopoverContent-module_popoverArrow_left__92grH{border-bottom-color:rgba(0,0,0,0);border-left-color:rgba(0,0,0,0)}.PopoverContent-module_popoverArrow_right__-NMZe{border-top-color:rgba(0,0,0,0);border-right-color:rgba(0,0,0,0)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.PopoverContent-module_popover__p0BhU{--popover-max-height: 560px;z-index:50;width:-moz-fit-content;width:fit-content;max-width:var(--container-s);border:1px solid var(--border-color);background-color:var(--background-color)}.PopoverContent-module_popover_forest__HD4fi{--background-color: var(--semantic-success-background);--border-color: var(--semantic-success-foreground)}.PopoverContent-module_popover_ochre__KKnbi{--background-color: var(--semantic-warning-background);--border-color: var(--semantic-warning-foreground)}.PopoverContent-module_popover_white__TaNXR{--background-color: var(--palette-graphite-0);--border-color: var(--palette-graphite-100)}.PopoverContent-module_popoverContent__q0qTL{display:flex;max-height:var(--popover-max-height);overflow-y:auto}.PopoverContent-module_popoverContentWrapper__-lefQ{flex-grow:1;padding:var(--spacing-s) 0 var(--spacing-s) var(--spacing-s);margin:0}@media(min-width: 480px){.PopoverContent-module_popoverContentWrapper__-lefQ{padding:var(--spacing-m) 0 var(--spacing-m) var(--spacing-m)}}.PopoverContent-module_popoverContentCloseButton__ryJUt{align-self:start;margin:var(--spacing-s) var(--spacing-s) 0 0}.PopoverContent-module_popoverContentCloseButton__ryJUt:
|
|
1
|
+
.PopoverContent-module_popover__p0BhU{--popover-max-height: 560px;z-index:50;width:-moz-fit-content;width:fit-content;max-width:var(--container-s);border:1px solid var(--border-color);background-color:var(--background-color)}.PopoverContent-module_popover_forest__HD4fi{--background-color: var(--semantic-success-background);--border-color: var(--semantic-success-foreground)}.PopoverContent-module_popover_ochre__KKnbi{--background-color: var(--semantic-warning-background);--border-color: var(--semantic-warning-foreground)}.PopoverContent-module_popover_white__TaNXR{--background-color: var(--palette-graphite-0);--border-color: var(--palette-graphite-100)}.PopoverContent-module_popoverContent__q0qTL{display:flex;max-height:var(--popover-max-height);overflow-y:auto}.PopoverContent-module_popoverContentWrapper__-lefQ{flex-grow:1;padding:var(--spacing-s) 0 var(--spacing-s) var(--spacing-s);margin:0}@media(min-width: 480px){.PopoverContent-module_popoverContentWrapper__-lefQ{padding:var(--spacing-m) 0 var(--spacing-m) var(--spacing-m)}}.PopoverContent-module_popoverContentCloseButton__ryJUt{align-self:start;margin:var(--spacing-s) var(--spacing-s) 0 0;--icon-button-icon-color: var(--palette-graphite-100)}.PopoverContent-module_popoverContentCloseButton__ryJUt:active{--icon-button-icon-color: var(--palette-graphite-0)}.PopoverContent-module_popoverArrow__t-CMj{position:absolute;z-index:-1;width:var(--size-large);height:var(--size-large);border:1px solid var(--border-color);background-color:var(--background-color);transform:rotate(45deg)}.PopoverContent-module_popoverArrow_top__pDZp9{border-top-color:rgba(0,0,0,0);border-left-color:rgba(0,0,0,0)}.PopoverContent-module_popoverArrow_bottom__PG8BL{border-right-color:rgba(0,0,0,0);border-bottom-color:rgba(0,0,0,0)}.PopoverContent-module_popoverArrow_left__92grH{border-bottom-color:rgba(0,0,0,0);border-left-color:rgba(0,0,0,0)}.PopoverContent-module_popoverArrow_right__-NMZe{border-top-color:rgba(0,0,0,0);border-right-color:rgba(0,0,0,0)}
|
|
@@ -2,12 +2,13 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { useState, useContext, useRef, useMemo, useCallback } from 'react';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
4
|
import { Button } from '@skatteetaten/ds-buttons';
|
|
5
|
-
import { dsI18n
|
|
5
|
+
import { dsI18n } from '@skatteetaten/ds-core-utils';
|
|
6
6
|
import { Checkbox } from '@skatteetaten/ds-forms';
|
|
7
7
|
import { PersonSVGpath } from '@skatteetaten/ds-icons';
|
|
8
8
|
import { Heading } from '@skatteetaten/ds-typography';
|
|
9
9
|
import { RolePickerContext } from '../RolePickerContext.esm.js';
|
|
10
10
|
import { RolePickerRow } from '../RolePickerRow/RolePickerRow.esm.js';
|
|
11
|
+
import { getDateOfBirthAsLocaleString, getPersonDescription } from '../utils.esm.js';
|
|
11
12
|
import styles from './RolePickerPeopleList.module.scss.esm.js';
|
|
12
13
|
|
|
13
14
|
import './RolePickerPeopleList.css';
|
|
@@ -32,11 +33,14 @@ const RolePickerPeopleList = ({ people, filterQuery, showDeceasedPeople: showDec
|
|
|
32
33
|
ctx?.onEntitySelect?.(entity);
|
|
33
34
|
};
|
|
34
35
|
const visibleItems = useMemo(()=>{
|
|
35
|
-
// lager en
|
|
36
|
-
let items =
|
|
36
|
+
// lager en kopi av person-listen for å unngå mutasjon
|
|
37
|
+
let items = people.list.slice();
|
|
37
38
|
items = !showDeceasedPeople ? items.filter((p)=>!p.isDeleted) : items;
|
|
38
39
|
if (filterQuery) {
|
|
39
|
-
return items.filter((f)=>
|
|
40
|
+
return items.filter((f)=>{
|
|
41
|
+
const personIdentifier = f.dateOfBirth ? getDateOfBirthAsLocaleString(f.dateOfBirth, dsI18n.language) : f.personId;
|
|
42
|
+
return f.name.toLowerCase().includes(filterQuery.toLowerCase()) || personIdentifier.includes(filterQuery.toLowerCase());
|
|
43
|
+
});
|
|
40
44
|
}
|
|
41
45
|
if (isExpanded) {
|
|
42
46
|
return items;
|
|
@@ -80,7 +84,7 @@ const RolePickerPeopleList = ({ people, filterQuery, showDeceasedPeople: showDec
|
|
|
80
84
|
children: jsx(RolePickerRow, {
|
|
81
85
|
id: item.personId,
|
|
82
86
|
title: `${item.name}${item.isDeleted ? ` (${t('rolepicker.Deceased')})` : ''}`,
|
|
83
|
-
description:
|
|
87
|
+
description: getPersonDescription(item),
|
|
84
88
|
svgPath: PersonSVGpath,
|
|
85
89
|
onClick: ()=>handleEntityClicked(item)
|
|
86
90
|
})
|
package/RolePicker/index.esm.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
|
2
2
|
import { useState, useDeferredValue, useRef, useImperativeHandle, useCallback, useMemo } from 'react';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
4
|
import { Button } from '@skatteetaten/ds-buttons';
|
|
5
|
-
import { dsI18n, getCommonClassNameDefault
|
|
5
|
+
import { dsI18n, getCommonClassNameDefault } from '@skatteetaten/ds-core-utils';
|
|
6
6
|
import { FavoriteSVGpath, LogOutSVGpath } from '@skatteetaten/ds-icons';
|
|
7
7
|
import { Paragraph } from '@skatteetaten/ds-typography';
|
|
8
8
|
import { getRolePickerHideCloseButtonDefault, getRolePickerShowDeceasedPeopleDefault, getRolePickerShowInactiveBusinessesDefault, getRolePickerShowSubunitsDefault, getRolePickerMinimumEntitiesForSearchDefault } from './defaults.esm.js';
|
|
@@ -13,6 +13,7 @@ import { RolePickerContext } from './RolePickerContext.esm.js';
|
|
|
13
13
|
import { RolePickerFilterInput } from './RolePickerFilterInput/RolePickerFilterInput.esm.js';
|
|
14
14
|
import { RolePickerPeopleList } from './RolePickerPeopleList/RolePickerPeopleList.esm.js';
|
|
15
15
|
import { RolePickerRow } from './RolePickerRow/RolePickerRow.esm.js';
|
|
16
|
+
import { getPersonDescription } from './utils.esm.js';
|
|
16
17
|
import styles from './RolePicker.module.scss.esm.js';
|
|
17
18
|
|
|
18
19
|
import './RolePicker.css';
|
|
@@ -126,7 +127,7 @@ import './RolePicker.css';
|
|
|
126
127
|
me ? jsx(RolePickerRow, {
|
|
127
128
|
id: me.personId,
|
|
128
129
|
title: t('rolepicker.MeHeading'),
|
|
129
|
-
description:
|
|
130
|
+
description: getPersonDescription(me),
|
|
130
131
|
svgPath: FavoriteSVGpath,
|
|
131
132
|
titleAs: 'h2',
|
|
132
133
|
onClick: ()=>handleEntitySelect(me)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { dsI18n, formatNationalIdentityNumber } from '@skatteetaten/ds-core-utils';
|
|
2
|
+
|
|
3
|
+
const getDateOfBirthAsLocaleString = (dateOfBirth, language)=>{
|
|
4
|
+
const locale = language === 'en_GB' ? 'en-GB' : 'no-NO';
|
|
5
|
+
const dateFormat = locale === 'en-GB' ? {
|
|
6
|
+
day: 'numeric',
|
|
7
|
+
month: 'long',
|
|
8
|
+
year: 'numeric'
|
|
9
|
+
} : {
|
|
10
|
+
day: '2-digit',
|
|
11
|
+
month: '2-digit',
|
|
12
|
+
year: 'numeric'
|
|
13
|
+
};
|
|
14
|
+
return dateOfBirth.toLocaleDateString(locale, dateFormat);
|
|
15
|
+
};
|
|
16
|
+
const getPersonDescription = ({ dateOfBirth, personId })=>{
|
|
17
|
+
const { t, language } = dsI18n;
|
|
18
|
+
if (!dateOfBirth) {
|
|
19
|
+
return `${t('ds_overlays:rolepicker.PeopleDescriptionPrefix')} ${formatNationalIdentityNumber(personId)}`;
|
|
20
|
+
}
|
|
21
|
+
return `${t('ds_overlays:rolepicker.DateOfBirth')} ${getDateOfBirthAsLocaleString(dateOfBirth, language)}`;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export { getDateOfBirthAsLocaleString, getPersonDescription };
|
|
@@ -22,6 +22,7 @@ const WordInfoTrigger = ({ ref, id, className = getCommonClassNameDefault(), lan
|
|
|
22
22
|
ref: mergedRef,
|
|
23
23
|
id: id,
|
|
24
24
|
className: `${styles.wordInfoTrigger} ${className}`.trim(),
|
|
25
|
+
type: 'button',
|
|
25
26
|
lang: lang,
|
|
26
27
|
"data-testid": dataTestId,
|
|
27
28
|
"aria-expanded": isOpen,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skatteetaten/ds-overlays",
|
|
3
3
|
"groupId": "no.skatteetaten.aurora",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.8.1",
|
|
5
5
|
"main": "./index.esm.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"module": "./index.esm.js",
|
|
@@ -16,18 +16,18 @@
|
|
|
16
16
|
"i18next": "^24 || ^25",
|
|
17
17
|
"react": "^19.2.0",
|
|
18
18
|
"react-i18next": "^15",
|
|
19
|
-
"@skatteetaten/ds-core-utils": "2.
|
|
20
|
-
"@skatteetaten/ds-buttons": "2.
|
|
21
|
-
"@skatteetaten/ds-forms": "2.
|
|
22
|
-
"@skatteetaten/ds-icons": "2.
|
|
23
|
-
"@skatteetaten/ds-navigation": "2.
|
|
24
|
-
"@skatteetaten/ds-typography": "2.
|
|
25
|
-
"@skatteetaten/ds-progress": "2.
|
|
26
|
-
"@skatteetaten/ds-status": "2.
|
|
19
|
+
"@skatteetaten/ds-core-utils": "2.8.1",
|
|
20
|
+
"@skatteetaten/ds-buttons": "2.8.1",
|
|
21
|
+
"@skatteetaten/ds-forms": "2.8.1",
|
|
22
|
+
"@skatteetaten/ds-icons": "2.8.1",
|
|
23
|
+
"@skatteetaten/ds-navigation": "2.8.1",
|
|
24
|
+
"@skatteetaten/ds-typography": "2.8.1",
|
|
25
|
+
"@skatteetaten/ds-progress": "2.8.1",
|
|
26
|
+
"@skatteetaten/ds-status": "2.8.1",
|
|
27
27
|
"date-fns": "^4",
|
|
28
|
-
"@skatteetaten/ds-content": "2.
|
|
28
|
+
"@skatteetaten/ds-content": "2.8.1",
|
|
29
29
|
"@floating-ui/react": "0.26.28",
|
|
30
|
-
"@skatteetaten/ds-collections": "2.
|
|
30
|
+
"@skatteetaten/ds-collections": "2.8.1"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {},
|
|
33
33
|
"scripts": {}
|