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

Draft
wants to merge 87 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 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
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.4",
"@digdir/designsystemet-react": "1.0.4",
"@digdir/designsystemet-theme": "1.0.4",
"@navikt/aksel-icons": "^7.17.4",
"@tanstack/react-query": "5.74.4",
"ajv": "8.17.1",
Expand Down
14 changes: 7 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 Down Expand Up @@ -76,13 +76,13 @@ export const Button = forwardRef<HTMLButtonElement, PropsWithChildren<ButtonProp
id={id}
disabled={disabled || isLoading}
variant={variant}
color={color}
size={size}
data-color={color}
data-size={size}
data-fullwidth={fullWidth}
ref={ref}
className={className}
title={title}
icon={icon}
fullWidth={fullWidth}
onClick={onClick}
style={expandedStyle}
tabIndex={tabIndex}
Expand All @@ -101,9 +101,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
4 changes: 4 additions & 0 deletions src/app-components/Card/Card.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.mediaCard {
padding: 0;
margin-bottom: -7px;
}
46 changes: 46 additions & 0 deletions src/app-components/Card/Card.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import React from 'react';

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

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

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;
};

export function AppCard({ title, description, footer, media, color, mediaPosition = 'top', children }: AppCardProps) {
return (
<Card color={color}>
{media && mediaPosition === 'top' && <Card.Block className={classes.mediaCard}>{media}</Card.Block>}
{(title || description) && (
<Card.Block>
{title && <Heading data-size='md'>{title}</Heading>}
{description && <Paragraph>{description}</Paragraph>}
</Card.Block>
)}
{children && (
<Card.Block>
<Flex
container
spacing={6}
>
{children}
</Flex>
</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>
);
}
67 changes: 47 additions & 20 deletions src/app-components/Datepicker/Calendar.module.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
.calendarToggleButton {
margin: 1px;
min-height: 36px;
min-width: 36px;
border-radius: 2px;
.datepickerLabelWrapper span[id*='description-'] {
margin-bottom: 0;
}

.calendarDay {
Expand Down Expand Up @@ -32,10 +29,10 @@
}

.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);
Expand All @@ -45,19 +42,28 @@
}

.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-1);
cursor: not-allowed;
}
.disabledDate button {
text-decoration: line-through;
}
.focusedDate {
border-radius: var(--ds-border-radius-md);
background: var(--ds-blue-2);
}
.today {
border-radius: var(--ds-border-radius-md);
border: var(--ds-border-width-default) solid var(--ds-color-accent-border-subtle);
}
.disabledDate:hover button {
cursor: not-allowed;
}

.calendarWrapper {
max-width: 363px;
max-width: 380px;
box-sizing: content-box;
}
.calendar {
width: 350px;
Expand All @@ -73,40 +79,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 @@ -58,6 +58,7 @@ export function DatePickerInput({
<PatternFormat
format={formatPattern}
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 @@ -75,32 +74,17 @@ export const DatePickerControl: React.FC<DatePickerControlProps> = ({
readOnly={readOnly}
/>
<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