Skip to content

Commit

Permalink
Merge branch 'next' into add-typography-based-sizing
Browse files Browse the repository at this point in the history
  • Loading branch information
mimarz authored Dec 19, 2024
2 parents 1815731 + 8f06db7 commit 53c9547
Show file tree
Hide file tree
Showing 104 changed files with 1,304 additions and 704 deletions.
5 changes: 5 additions & 0 deletions .changeset/fresh-planes-complain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet-css": patch
---

Remove `neutral` color on `ValidationMessage`
5 changes: 5 additions & 0 deletions .changeset/green-plums-scream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet-react": patch
---

Field.Counter: Run on mount to support initial `defaultValue`
5 changes: 5 additions & 0 deletions .changeset/popular-parrots-begin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet-react": patch
---

Fixes issue where all React prop types were inlined instead of referenced
13 changes: 13 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,21 @@
"fluffy-coins-run",
"four-pears-tie",
"four-schools-wait",
"fresh-planes-complain",
"friendly-cups-kiss",
"friendly-islands-punch",
"funny-boxes-remember",
"fuzzy-needles-explode",
"gold-chairs-jog",
"gorgeous-geese-boil",
"gorgeous-readers-burn",
"gorgeous-shrimps-crash",
"green-plums-scream",
"grumpy-pianos-lick",
"happy-hounds-tie",
"happy-worms-applaud",
"healthy-apples-explode",
"healthy-monkeys-repair",
"heavy-rabbits-boil",
"hip-brooms-brush",
"hip-masks-greet",
Expand All @@ -76,6 +80,7 @@
"hot-weeks-tease",
"hungry-moles-repeat",
"kind-eyes-cheat",
"lazy-wolves-provide",
"lemon-countries-smoke",
"long-boxes-sniff",
"long-countries-check",
Expand Down Expand Up @@ -105,6 +110,7 @@
"plenty-singers-matter",
"plenty-vans-sneeze",
"popular-jeans-happen",
"popular-parrots-begin",
"pretty-dancers-taste",
"proud-walls-flash",
"purple-berries-repeat",
Expand Down Expand Up @@ -136,19 +142,22 @@
"slow-news-act",
"small-houses-stare",
"small-queens-breathe",
"small-seahorses-add",
"smooth-radios-leave",
"smooth-wombats-grab",
"spotty-oranges-guess",
"spotty-pumas-cross",
"stale-tables-eat",
"strange-jars-compete",
"strange-ligers-search",
"strong-flowers-ring",
"strong-ghosts-marry",
"stupid-tables-applaud",
"sweet-dolphins-hang",
"swift-forks-drop",
"tall-guests-arrive",
"tame-rats-mix",
"tasty-phones-invite",
"ten-wolves-yawn",
"tender-grapes-refuse",
"tender-ties-swim",
Expand All @@ -160,8 +169,12 @@
"tidy-cheetahs-cry",
"twelve-onions-laugh",
"twenty-cheetahs-leave",
"violet-paws-begin",
"violet-steaks-repeat",
"weak-keys-tap",
"wet-scissors-tickle",
"wicked-plants-eat",
"wicked-pots-allow",
"wise-cooks-compare",
"wise-countries-double",
"witty-clouds-judge",
Expand Down
5 changes: 5 additions & 0 deletions .changeset/tasty-phones-invite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet": patch
---

Fix crash when running @digdir/designsystemet CLI due to differences in module resolution when used as a package
5 changes: 5 additions & 0 deletions .changeset/weak-keys-tap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet-react": patch
---

`ValidationMessage` now uses the `p`-element
6 changes: 6 additions & 0 deletions .changeset/wicked-plants-eat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@digdir/designsystemet-css": patch
"@digdir/designsystemet-react": patch
---

Select: Add `width="auto"` option and default to full width
8 changes: 6 additions & 2 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@ on:
- 'biome.jsonc'
jobs:
checks:
name: Lint
name: Checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/gh-setup
- name: Lint code
- name: Build
run: yarn build
- name: Types
run: yarn types
- name: Biome CI
run: yarn biome ci .
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ permissions:
pull-requests: write

jobs:
checks:
test:
name: Build & test
runs-on: ubuntu-latest
steps:
Expand Down
7 changes: 6 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
"source.organizeImports.biome": "explicit"
},
"editor.defaultFormatter": "biomejs.biome",
"css.customData": ["./.vscode/css-data.json"],
"css.customData": [
"./.vscode/css-data.json"
],
"[css]": {
"editor.defaultFormatter": "biomejs.biome"
},
Expand All @@ -24,5 +26,8 @@
},
"[html]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[jsonc]": {
"editor.defaultFormatter": "biomejs.biome"
}
}
4 changes: 4 additions & 0 deletions apps/_components/declarations.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
declare module '*.css' {
const styles: { [className: string]: string };
export default styles;
}
1 change: 1 addition & 0 deletions apps/_components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"@navikt/aksel-icons": "^6.14.0",
"@types/react-syntax-highlighter": "^15.5.13",
"clsx": "^2.1.1",
"next": "^14.2.5",
"prettier": "^3.3.3",
"react-syntax-highlighter": "^15.5.0"
},
Expand Down
2 changes: 1 addition & 1 deletion apps/_components/src/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ const Header = ({
onClick={() => setOpen(false)}
prefetch={false}
className={cl(
pathname.includes(item.href) && classes.active,
pathname?.includes(item.href) && classes.active,
classes.link,
'ds-focus',
)}
Expand Down
9 changes: 7 additions & 2 deletions apps/_components/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"extends": "../../tsconfig.base.json",
"rootDir": "./src",
"compilerOptions": {
"outDir": "./tsc-build",
"declarationDir": "./dist/types",
Expand All @@ -9,8 +10,12 @@
"noEmit": false,
"incremental": true,
"moduleResolution": "Bundler",
"types": ["@digdir/designsystemet-theme/colors.d.ts"]
"types": ["@digdir/designsystemet-theme/colors.d.ts", "./declarations.d.ts"]
},
"include": ["./src", "./stories", "declarations.d.ts"],
"rootDir": "./src"
"plugins": [
{
"name": "next"
}
]
}
58 changes: 58 additions & 0 deletions apps/storefront/app/monstre/bekreftelsesdialog/page.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import { Card, CardContent, Heading, Paragraph } from '@digdir/designsystemet-react';

import { Image } from '@components';
import { MenuPageLayout } from '@layouts';
import { Contributors } from '@blog';

export const metadata = {
title: 'Bekreftelsesdialog',
description: '...'
};

export default ({ children }) => (
<MenuPageLayout
content={children}
data={{
title: 'Bekreftelsesdialog',
date: '23. oktober 2024',
}}
/>
);

## Innledning
I tillegg til [brukerutløste feilmeldinger](/monstre/feilmeldinger) og [systemvarsler](/monstre/systemvarsler), har vi også bekreftelsesdialoger. Bekreftelsesdialoger vises i form av en `modal` eller `popover` og ber brukeren bekrefte en handling som har alvorlige eller irreversible konsekvenser.


#### Popover
En `popover` er et ui-element som legger seg over grensesnittet. I motsetning til `modal` så vil ikke grensesnittet bak bli tonet ned, og brukeren vil ikke bli "låst" inne i popover komponenten. Disse kan være nyttige å bruke om du vil gi en beskjed basert på en handling. For eksempel at du vil informere brukeren om at det elementet de ønsker å slette ikke kan gjenopprettes om de velger å slette det. Disse burde kun brukes om det er lite informasjon som skal gis. Om du har bruk for mer plass kan `modal` være et bedre alternativ.

Eksempelet under viser en popover der du må bekrefte at du ønsker å slette en rad i en tabell.
<Image dataUnstyled
src='/img/popover-systemvarsler.png'
alt='Skjermbilde av tabell med medlemsliste. Popover viser en knapp der du må bekrefte at du ønsker å fjerne et medlem.'
/>


<Card color='brand3' data-unstyled>
*Retningslinjene er under arbeid fra 5. juni 2024 i en tverretatlig arbeidsgruppe med deltakere fra Digdir, Nav, Skatt, Brreg, Politiet, KS DIF og Oslo kommune. Alle er velkommen til å påvirke arbeidet på [Github](https://github.com/digdir/designsystemet/discussions/1801) eller i [#Mønster-kanalen](https://designsystemet.slack.com/archives/C05RBGB92MC/p1712751837722749)[Slack](https://join.slack.com/t/designsystemet/shared_invite/zt-2438eotl3-a4266Vd2IeqMWO8TBw5PrQ).
</Card>

<Contributors
authors={[
'Roy Halvor Frimanslund (Brreg)',
'Astrid Eline Øksnes (Politiet)',
'Bernard Tommerbakke (Oslo Kommune)',
'Vegard Haugstvedt (NAV)',
'Eirik Backer (Mattilsynet)',
'Lasse Febakke Straum (Digdir)',
'Frida Almqvist (Entur)',
'Marianne Røsvik (Digdir)',
'Camilla Orten (SKD)',
'Gørild Døhl (Digdir)',
'Viveca Krishnamoorthi (Digdir)',

]}
/>
<br />
<br />
<br />
Loading

0 comments on commit 53c9547

Please sign in to comment.