Skip to content

Chore/update ds #3231

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 193 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
193 commits
Select commit Hold shift + click to select a range
8508eb6
update ds, wip fixing errors
Magnusrm Jan 27, 2025
d8688c3
re-use visually hidden css
Magnusrm Feb 10, 2025
4e8cf4b
Merge remote-tracking branch 'origin/main' into chore/update-ds
Magnusrm Feb 10, 2025
cd8fbb4
card app component and DS upgrade WIP
Magnusrm Feb 12, 2025
36b0c63
ds update wip
Magnusrm Feb 12, 2025
297e331
fixed last errors
Magnusrm Feb 17, 2025
be55fe9
Merge remote-tracking branch 'origin/main' into chore/update-ds
Magnusrm Feb 17, 2025
5b0df7c
update css variables and classnames
Magnusrm Feb 17, 2025
80bf23e
fix radio tests
Magnusrm Feb 18, 2025
6beb20e
update to next.49 and fix some tests
Magnusrm Feb 19, 2025
d94c005
fix accordion tests
Magnusrm Feb 19, 2025
e723204
fix helptext tests
Magnusrm Feb 19, 2025
893ccfb
fix lang tests
Magnusrm Feb 19, 2025
4e755ce
fix navbar test
Magnusrm Feb 19, 2025
e759ead
fix misc and pagination instance select
Magnusrm Feb 21, 2025
3e67be4
fix instanceselection pagination
Magnusrm Feb 24, 2025
b0960da
remove console.log
Magnusrm Feb 24, 2025
55d6ad4
style instance selection table
Magnusrm Feb 24, 2025
6a42f7a
Merge remote-tracking branch 'origin/main' into chore/update-ds
Magnusrm Feb 24, 2025
02ffe72
fix helptext size
Magnusrm Feb 24, 2025
d3d4403
fix input validation message
Magnusrm Feb 25, 2025
2d16e15
fix field counter size
Magnusrm Feb 25, 2025
ba44d22
Merge remote-tracking branch 'origin/main' into chore/update-ds
Magnusrm Feb 26, 2025
5eed555
checkbox fix
Magnusrm Feb 26, 2025
ba4398e
remove unused value
Magnusrm Feb 26, 2025
730bea0
fix validation message size
Magnusrm Feb 26, 2025
55b314f
fix radiocard
Magnusrm Feb 26, 2025
c6e2819
update to 0.100
Magnusrm Mar 3, 2025
cf2fc66
Merge remote-tracking branch 'origin/main' into chore/update-ds
Magnusrm Mar 4, 2025
c86a764
Merge remote-tracking branch 'origin/main' into chore/update-ds
Magnusrm Mar 4, 2025
5ac90ee
fix closedby any for datepicker
Magnusrm Mar 4, 2025
ef551f5
fix validationmessage placement
Magnusrm Mar 4, 2025
74fa09a
WIP
Magnusrm Mar 5, 2025
6270418
calendar input fixes and card fix
Magnusrm Mar 6, 2025
06ee1cc
Merge remote-tracking branch 'origin/main' into chore/update-ds
Magnusrm Mar 6, 2025
8200ec3
fix different number of hooks from prev render error
Magnusrm Mar 10, 2025
4c9b6e2
fix list pagination page number
Magnusrm Mar 10, 2025
93d7496
fix listcomponent pagesize
Magnusrm Mar 10, 2025
6f968bc
fix datepicker
Magnusrm Mar 11, 2025
c728531
remove css class doing nothing
Magnusrm Mar 11, 2025
b90677a
fix some datepicker styling
Magnusrm Mar 12, 2025
5dedc5f
fix datepicker input button styling
Magnusrm Mar 12, 2025
89432a1
move css where it belongs for likert
Magnusrm Mar 12, 2025
a869b82
Likert styling fixes
Magnusrm Mar 12, 2025
46dad53
Merge remote-tracking branch 'origin/main' into chore/update-ds
Magnusrm Mar 12, 2025
01ec60d
move character counter out of input app component
Magnusrm Mar 12, 2025
ad4258d
remove unused function in datepicker
Magnusrm Mar 13, 2025
9992416
fix eadio tests
Magnusrm Mar 14, 2025
4b3d29c
fix confirmpage test
Magnusrm Mar 14, 2025
80e7653
fix address and checkbox tests
Magnusrm Mar 14, 2025
2318365
fix headercomponent test
Magnusrm Mar 14, 2025
3fa96ba
fix headermenu dropdown styling
Magnusrm Mar 14, 2025
67959a2
fix appheader test
Magnusrm Mar 14, 2025
543344b
tab styling
Magnusrm Mar 17, 2025
943b07e
fix instatiationbutton test
Magnusrm Mar 17, 2025
5b8f880
update snapshots
Magnusrm Mar 17, 2025
0b1552d
fix warnings
Magnusrm Mar 20, 2025
7a2c6b2
attempt to fix accordion cypress test
Magnusrm Mar 20, 2025
30befc8
Merge remote-tracking branch 'origin/main' into chore/update-ds
Magnusrm Mar 20, 2025
2cd68f3
Merge remote-tracking branch 'origin/main' into chore/update-ds
Magnusrm Mar 31, 2025
544d9dc
Use DS ErrorSummary
Magnusrm Mar 31, 2025
b8a1b78
fiix errorsummary
Magnusrm Mar 31, 2025
ebc1733
fix div inside span
Magnusrm Mar 31, 2025
9cd9d4f
Merge remote-tracking branch 'origin/main' into chore/update-ds
Magnusrm Apr 2, 2025
b2f775e
use new MultipleSelect
Magnusrm Apr 2, 2025
714b1ab
fix organisationlookup validationmessage
Magnusrm Apr 2, 2025
1370641
fix multipleselect test
Magnusrm Apr 3, 2025
02715b0
fix personlookup
Magnusrm Apr 3, 2025
1da15b8
fix all-process-steps test
Magnusrm Apr 3, 2025
19f7625
fix button color
Magnusrm Apr 3, 2025
f6c18d9
fix cypress use of datepickerbutton and prefill checkboxes
Magnusrm Apr 3, 2025
1fe4f17
fix css import path
Magnusrm Apr 3, 2025
5672352
remove som of old ds dependency
Magnusrm Apr 3, 2025
b63a284
remove old design-sysmtem-react
Magnusrm Apr 3, 2025
1d059ff
Merge remote-tracking branch 'origin/main' into chore/update-ds
Magnusrm Apr 7, 2025
590c590
Merge remote-tracking branch 'origin/main' into chore/update-ds
Magnusrm Apr 8, 2025
2e88407
fix logout styling
Magnusrm Apr 8, 2025
63c9424
resolve dropdowntest
Magnusrm Apr 11, 2025
ecebf6c
move some multipleselect tests to cypres
Magnusrm Apr 22, 2025
4701153
update snapshots
Magnusrm Apr 22, 2025
cea23ef
Merge remote-tracking branch 'origin/main' into chore/update-ds
Magnusrm Apr 22, 2025
2ae53f5
remove unused props
Magnusrm Apr 22, 2025
16ce720
fix helptext cypress tests
Magnusrm Apr 23, 2025
7cf092e
fix radiobutton test
Magnusrm Apr 25, 2025
e3a44d9
fix dropdown readonly styling
Magnusrm Apr 28, 2025
2a486f4
fix charactercounter for inputcomponent
Magnusrm Apr 30, 2025
f4ee675
fix helptext cypress tests
Magnusrm Apr 30, 2025
10a476e
Merge remote-tracking branch 'origin/main' into chore/update-ds
Magnusrm May 12, 2025
11075d9
fix errorsummaryItem
Magnusrm May 12, 2025
49efa32
clean up input component
Magnusrm May 12, 2025
935f9f9
workaround for mulitpleselect alert on delete
Magnusrm May 12, 2025
b46b1db
fix multipleselect test
Magnusrm May 12, 2025
4a9f72e
improve position of alert on delete for multipleselect
Magnusrm May 14, 2025
4f3d383
fix placement of alertonchange for dropdown
Magnusrm May 15, 2025
4511633
merge main into branch
Magnusrm May 19, 2025
b858144
update signing to new ds
Magnusrm May 19, 2025
1921c3d
fix listcomponent group bug
Magnusrm May 19, 2025
7fd5bb5
fix signing loading test
Magnusrm May 19, 2025
f30877b
update input char countdown test
Magnusrm May 19, 2025
958134b
start updating component-lib multiselect test
Magnusrm May 20, 2025
e667bb6
Merge remote-tracking branch 'origin/main' into chore/update-ds
Magnusrm May 20, 2025
0d3a7f7
multiselect cypress test wip
Magnusrm May 20, 2025
4c97b98
fix multiple-select tests
Magnusrm May 21, 2025
c515a95
clean up comments
Magnusrm May 21, 2025
b41ea06
update lockfile
Magnusrm May 21, 2025
90eafe1
test fix for reuire
Magnusrm May 21, 2025
f6c1108
revert attempted fix
Magnusrm May 21, 2025
8b7d959
test
Magnusrm May 21, 2025
aa9b079
revert test
Magnusrm May 21, 2025
c0eeb25
update to 1.0.6
Magnusrm May 21, 2025
931d6a4
update production webpack to support new DS
Magnusrm May 22, 2025
0507363
remove comment
Magnusrm May 22, 2025
91b4424
Merge remote-tracking branch 'origin/main' into chore/update-ds
Magnusrm May 22, 2025
e268310
fix multiple-select tests
Magnusrm May 22, 2025
279bee7
fix navigation
Magnusrm May 26, 2025
3582c75
Merge remote-tracking branch 'origin/main' into chore/update-ds
Magnusrm May 26, 2025
a7799db
fix subform tests
Magnusrm May 26, 2025
6a9a85e
fix stateless tests
Magnusrm May 26, 2025
1ce547c
fix payment test
Magnusrm May 26, 2025
db6a8a7
fix mobile tests
Magnusrm May 26, 2025
751a088
fix helptext screen reader
Magnusrm May 26, 2025
7b62d36
fix sorting and list component tests
Magnusrm May 26, 2025
60d92a2
conditionally add description radio group
Magnusrm May 26, 2025
48d3c81
Merge remote-tracking branch 'origin/main' into chore/update-ds
Magnusrm May 27, 2025
372ca71
Merge remote-tracking branch 'origin/main' into chore/update-ds
Magnusrm May 28, 2025
86b36e3
attempt to fix regex in test
Magnusrm May 28, 2025
d35fb23
add known wcag violation
Magnusrm May 28, 2025
7beca62
fix group test
Magnusrm May 28, 2025
3f76519
fix group test
Magnusrm May 28, 2025
921c6ed
cant focus paragraph elements
Magnusrm May 28, 2025
50deb28
make validationmessages spans
Magnusrm May 28, 2025
afab549
Merge remote-tracking branch 'origin/main' into chore/update-ds
Magnusrm May 30, 2025
c0e30f0
fix checkboxes test
Magnusrm May 30, 2025
ae74be5
fix some tests in components.ts
Magnusrm May 30, 2025
1f833de
fix grid tests
Magnusrm Jun 2, 2025
a1fa272
fix group test
Magnusrm Jun 2, 2025
eb415af
fix alertOnChange for checkboxes
Magnusrm Jun 2, 2025
87f09d0
fix validation tests
Magnusrm Jun 3, 2025
b66ca23
fix attachments in group test
Magnusrm Jun 3, 2025
308e735
fix custom-confirm test
Magnusrm Jun 3, 2025
bcadf9f
fix attachment in group test
Magnusrm Jun 4, 2025
1254f12
fix on-entry test
Magnusrm Jun 4, 2025
3c4bfcc
Merge remote-tracking branch 'origin/main' into chore/update-ds
Magnusrm Jun 4, 2025
a9f9c98
fix group test
Magnusrm Jun 4, 2025
ed9f53f
fix checkbox alrte on change test
Magnusrm Jun 4, 2025
7f3f463
cleanup
Magnusrm Jun 4, 2025
f27a7c9
fix attachments in group test
Magnusrm Jun 4, 2025
85aea6b
fix group test
Magnusrm Jun 4, 2025
2b19090
fix validation test
Magnusrm Jun 4, 2025
8e5e6aa
Merge remote-tracking branch 'origin/main' into chore/update-ds
Magnusrm Jun 4, 2025
2998583
fix group test and attachment in group test
Magnusrm Jun 4, 2025
dffaecf
fix multipleselect test
Magnusrm Jun 4, 2025
3392aa1
fix attachemnt in group test
Magnusrm Jun 4, 2025
9e81775
update css tokens from later PRs
Magnusrm Jun 4, 2025
5748ffb
update css tokens and some cleanup
Magnusrm Jun 5, 2025
73b467c
fix color contrast
Magnusrm Jun 6, 2025
c136802
fix fullwidth fro button
Magnusrm Jun 6, 2025
dd210dd
update css tokens
Magnusrm Jun 6, 2025
ea8b1a1
update app button
Magnusrm Jun 6, 2025
98248ea
fix card styling
Magnusrm Jun 10, 2025
935fec4
Merge remote-tracking branch 'origin/main' into chore/update-ds
Magnusrm Jun 10, 2025
de752f7
update lockfile
Magnusrm Jun 10, 2025
344883a
update snapshots
Magnusrm Jun 10, 2025
0c7c236
remove char counter for readonly state
Magnusrm Jun 11, 2025
4659ad0
fix accordion style
Magnusrm Jun 11, 2025
86a0535
update css token variable
Magnusrm Jun 11, 2025
b95dc4d
fix alertondelete rep group
Magnusrm Jun 11, 2025
0cd1fc2
fix validation styling radiobuttons
Magnusrm Jun 11, 2025
d01ba5e
Merge remote-tracking branch 'origin/main' into chore/update-ds
Magnusrm Jun 11, 2025
6ef6fa7
fix tab header linewrapping
Magnusrm Jun 11, 2025
ba8abc5
fix styling of readonly legends
Magnusrm Jun 11, 2025
e78fa98
fix mobile listcomponnet styling
Magnusrm Jun 11, 2025
456a027
fix flaky test
Magnusrm Jun 11, 2025
6799955
fix navigation modal height
Magnusrm Jun 12, 2025
25335d3
fix accordion summary
Magnusrm Jun 12, 2025
15d3404
Merge remote-tracking branch 'origin/main' into chore/update-ds
Magnusrm Jun 13, 2025
0b14050
fix signing test
Magnusrm Jun 13, 2025
a6da4db
fix accordion summary2 styling
Magnusrm Jun 13, 2025
000c155
fix grid in cards
Magnusrm Jun 16, 2025
8756456
turn off auto placement navigation popover
Magnusrm Jun 16, 2025
7ab1068
test using chromium for cypress
Magnusrm Jun 16, 2025
5ada442
test using chromium for cypress
Magnusrm Jun 16, 2025
76be434
revert chromium test
Magnusrm Jun 16, 2025
2020d9d
revert chromium test
Magnusrm Jun 16, 2025
41ac7f0
test waiting for snapshots
Magnusrm Jun 16, 2025
23dbf36
revert waiting before snapshot
Magnusrm Jun 16, 2025
5d85c78
fix accordiongroup summary2
Magnusrm Jun 16, 2025
5533e03
fix languageselector
Magnusrm Jun 17, 2025
b885f4c
update language selector
Magnusrm Jun 17, 2025
35c1c3a
fix languageselector test
Magnusrm Jun 17, 2025
784ba93
fix languageselection test
Magnusrm Jun 17, 2025
ca9298a
Merge remote-tracking branch 'origin/main' into chore/update-ds
Magnusrm Jun 18, 2025
40ce64d
cleanup
Magnusrm Jun 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
- [ ] The original issue (or this PR itself) has been added to the Team Apps project and to the current sprint board
- [ ] I don't have permissions to do that, please help me out
- Labels

- [ ] I have added a `kind/*` and `backport*` label to this PR for proper release notes grouping
- [ ] I don't have permissions to add labels, please help me out
<!---
Expand Down
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,9 @@
"dependencies": {
"@babel/polyfill": "7.12.1",
"@date-fns/tz": "1.2.0",
"@digdir/design-system-react": "0.54.0",
"@digdir/designsystemet-css": "0.10.0",
"@digdir/designsystemet-react": "0.63.1",
"@digdir/designsystemet-theme": "0.15.3",
"@digdir/designsystemet-css": "1.0.6",
"@digdir/designsystemet-react": "1.0.6",
"@digdir/designsystemet-theme": "1.0.6",
"@navikt/aksel-icons": "^7.17.4",
"@tanstack/react-query": "5.75.2",
"ajv": "8.17.1",
Expand Down
30 changes: 23 additions & 7 deletions src/app-components/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ export type ButtonProps = {
isLoading?: boolean;
size?: 'sm' | 'md' | 'lg';
className?: string;
fullWidth?: boolean;
textAlign?: TextAlign;
} & Pick<
DesignSystemButtonProps,
| 'id'
| 'title'
| 'disabled'
| 'icon'
| 'fullWidth'
| 'onClick'
| 'style'
| 'tabIndex'
Expand All @@ -37,8 +37,22 @@ export type ButtonProps = {
| 'aria-describedby'
| 'onKeyUp'
| 'asChild'
| 'popovertarget'
>;

type DSButtonColor = 'accent' | 'neutral' | 'success' | 'danger' | 'brand1' | 'brand2' | 'brand3' | undefined;

function mapColorNames(color: ButtonColor): DSButtonColor {
switch (color) {
case 'first':
return 'accent';
case 'second':
return 'neutral';
default:
return color ?? 'accent';
}
}

export const Button = forwardRef<HTMLButtonElement, PropsWithChildren<ButtonProps>>(function Button(
{
id,
Expand All @@ -59,6 +73,7 @@ export const Button = forwardRef<HTMLButtonElement, PropsWithChildren<ButtonProp
onKeyUp,
asChild,
textAlign,
popovertarget,
'aria-label': ariaLabel,
'aria-busy': ariaBusy,
'aria-controls': ariaControls,
Expand All @@ -76,19 +91,20 @@ export const Button = forwardRef<HTMLButtonElement, PropsWithChildren<ButtonProp
id={id}
disabled={disabled || isLoading}
variant={variant}
color={color}
size={size}
data-color={mapColorNames(color)}
data-size={size}
data-fullwidth={fullWidth ? true : undefined}
ref={ref}
className={className}
title={title}
icon={icon}
fullWidth={fullWidth}
onClick={onClick}
style={expandedStyle}
tabIndex={tabIndex}
onMouseDown={onMouseDown}
onKeyUp={onKeyUp}
asChild={asChild}
popovertarget={popovertarget}
aria-label={ariaLabel}
aria-busy={ariaBusy}
aria-controls={ariaControls}
Expand All @@ -101,9 +117,9 @@ export const Button = forwardRef<HTMLButtonElement, PropsWithChildren<ButtonProp
<>
<Spinner
aria-hidden='true'
color={color}
size={size === 'lg' ? 'sm' : 'xs'}
title={langAsString('general.loading')}
data-color={color}
data-size={size === 'lg' ? 'sm' : 'xs'}
aria-label={langAsString('general.loading')}
/>
{children}
</>
Expand Down
7 changes: 7 additions & 0 deletions src/app-components/Card/Card.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.mediaCard {
padding: 0;
margin-bottom: -7px;
}
.mediaCard img {
object-fit: cover;
}
48 changes: 48 additions & 0 deletions src/app-components/Card/Card.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import React from 'react';

import { Card, Heading, Paragraph } from '@digdir/designsystemet-react';

import classes from 'src/app-components/Card/Card.module.css';

type AppCardProps = {
title?: React.ReactNode;
description?: React.ReactNode;
footer?: React.ReactNode;
media?: React.ReactNode;
mediaPosition?: 'top' | 'bottom';
color?: Parameters<typeof Card>[0]['color'];
children?: React.ReactNode;
variant?: 'tinted' | 'default';
};

export function AppCard({
title,
description,
footer,
media,
color = 'neutral',
mediaPosition = 'top',
children,
variant = 'tinted',
}: AppCardProps) {
return (
<Card
data-color={color}
variant={variant}
>
{media && mediaPosition === 'top' && <Card.Block className={classes.mediaCard}>{media}</Card.Block>}
<Card.Block>
{title && <Heading data-size='md'>{title}</Heading>}
{description && <Paragraph>{description}</Paragraph>}

{children}
</Card.Block>
{footer && (
<Card.Block>
<Paragraph data-size='sm'>{footer}</Paragraph>
</Card.Block>
)}
{media && mediaPosition === 'bottom' && <Card.Block className={classes.mediaCard}>{media}</Card.Block>}
</Card>
);
}
86 changes: 44 additions & 42 deletions src/app-components/Datepicker/Calendar.module.css
Original file line number Diff line number Diff line change
@@ -1,52 +1,32 @@
.calendarToggleButton {
margin: 1px;
min-height: 36px;
min-width: 36px;
border-radius: 2px;
}

.calendarDay {
width: 48px;
height: 48px;
text-align: center;
}
.calendarDay:hover {
border-radius: var(--fds-border_radius-medium);
background: var(--fds-colors-blue-200);
}

.calendarDayButton {
height: 46px;
width: 46px;
background: transparent;
border: none;
.datepickerLabelWrapper span[id*='description-'] {
margin-bottom: 0;
}

.focusedDate {
border-radius: var(--fds-border_radius-medium);
background: var(--fds-colors-blue-200);
border-radius: var(--ds-border-radius-md);
background: var(--ds-color-accent-surface-active);
}
.today {
border-radius: var(--fds-border_radius-medium);
border: var(--fds-border_width-default) solid var(--fds-colors-blue-200);
border-radius: var(--ds-border-radius-md);
border: var(--ds-border-width-default) solid var(--ds-color-accent-border-subtle);
}

.selectedDate {
background-color: var(--fds-colors-blue-900);
background-color: var(--ds-color-accent-base-active);
color: white;
font-weight: normal;
border-radius: var(--fds-border_radius-medium);
border-radius: var(--ds-border-radius-md);
}
.selectedDate:hover {
background: var(--fds-colors-blue-800);
background: var(--ds-color-accent-base-active);
}
.selectedDate button {
color: white;
}

.disabledDate {
border-radius: var(--fds-border_radius-medium);
background: var(--fds-colors-grey-100);
border-radius: var(--ds-border-radius-md);
background: var(--ds-color-neutral-surface-tinted);
cursor: not-allowed;
}
.disabledDate button {
Expand All @@ -57,7 +37,8 @@
}

.calendarWrapper {
max-width: 363px;
max-width: 380px;
box-sizing: content-box;
}
.calendar {
width: 350px;
Expand All @@ -73,40 +54,61 @@
font: inherit;
font-weight: 500;
}
.calendarDay:hover {
border-radius: var(--ds-border-radius-md);
background: var(--ds-color-accent-surface-hover);
cursor: pointer;
}
.calendarDay {
width: 48px;
height: 48px;
text-align: center;
}
.calendarDayButton {
height: 46px;
width: 46px;
background: transparent;
border: none;
}
.monthWrapper {
display: flex;
flex-direction: column;
gap: var(--fds-spacing-2);
gap: var(--ds-size-2);
align-items: center;
}
.dropdownCaption {
display: flex;
margin-bottom: 10px;
margin-left: 10px;
margin-right: 10px;
gap: 4px;
}

.calendarInputWrapper {
display: flex;
border-radius: 4px;
border: var(--fds-border_width-default, 1px) solid var(--fds-semantic-border-neutral-default);
gap: var(--fds-spacing-1);
border: var(--ds-border-width-default, 1px) solid var(--ds-color-neutral-border-strong);
gap: var(--ds-size-1);
background: white;
}

.calendarInputWrapper button {
margin: 1px;
}

.calendarInputWrapper:hover {
border-color: var(--fds-semantic-border-input-hover);
box-shadow: inset 0 0 0 1px var(--fds-semantic-border-input-hover);
box-shadow: inset 0 0 0 1px var(--ds-color-accent-border-strong);
}
.calendarInput {
padding: 1px;
}
.calendarInput,
.calendarInput * {
height: 36px;
}

.calendarInput input:not(:focus-visible) {
.calendarInput input:not(:focus-visible),
.calendarInput button {
border: none;
background: white;
}

.calendarInput input:not(:focus-visible):hover {
box-shadow: none;
}
1 change: 0 additions & 1 deletion src/app-components/Datepicker/DatePickerCalendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { getLocale } from 'src/app-components/Datepicker/utils/dateHelpers';

export interface CalendarDialogProps {
id: string;
isOpen?: boolean;
selectedDate: Date | undefined;
onSelect: (value: Date) => void;
maxDate?: Date;
Expand Down
1 change: 1 addition & 0 deletions src/app-components/Datepicker/DatePickerInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ function DatePickerInputRef(
getInputRef={ref}
format={getFormatAsPatternFormat(datepickerFormat)}
customInput={Textfield}
data-size='sm'
mask='_'
className={styles.calendarInput}
type='text'
Expand Down
24 changes: 4 additions & 20 deletions src/app-components/Datepicker/Datepicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import type { MonthCaption } from 'react-day-picker';
import { CalendarIcon } from '@navikt/aksel-icons';
import { isValid as isValidDate } from 'date-fns';

import { Button } from 'src/app-components/Button/Button';
import styles from 'src/app-components/Datepicker/Calendar.module.css';
import { DatePickerCalendar } from 'src/app-components/Datepicker/DatePickerCalendar';
import { DatePickerDialog } from 'src/app-components/Datepicker/DatepickerDialog';
Expand Down Expand Up @@ -78,32 +77,17 @@ export const DatePickerControl: React.FC<DatePickerControlProps> = ({
autoComplete={autoComplete}
/>
<DatePickerDialog
id={id}
buttonAriaLabel={buttonAriaLabel}
readOnly={readOnly}
isDialogOpen={isDialogOpen}
setIsDialogOpen={setIsDialogOpen}
trigger={
<Button
id={`${id}-button`}
className={styles.calendarToggleButton}
variant='tertiary'
icon={true}
aria-controls='dialog'
aria-haspopup='dialog'
onClick={() => setIsDialogOpen(!isDialogOpen)}
aria-label={buttonAriaLabel}
aria-expanded={isDialogOpen}
disabled={readOnly}
color='first'
size='sm'
>
<CalendarIcon title={calendarIconTitle} />
</Button>
}
trigger={<CalendarIcon title={calendarIconTitle} />}
>
<DatePickerCalendar
id={id}
locale={locale}
selectedDate={dayPickerDate}
isOpen={isDialogOpen}
onSelect={(date) => {
handleDayPickerSelect(date);
setIsDialogOpen(false);
Expand Down
Loading