Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1f37816e72 | ||
|
|
5c3f4e4bc7 | ||
|
|
29711bf44d | ||
|
|
ed2ad43915 | ||
|
|
c02c0a585a | ||
|
|
ca680926fe | ||
|
|
a4fd1dd227 | ||
|
|
4da85498e5 | ||
|
|
6cee85ce9a | ||
|
|
c95480c724 | ||
|
|
185349e9b5 | ||
|
|
60d325fcc5 | ||
|
|
ccbaa18df9 | ||
|
|
853f2ae760 | ||
|
|
411bb36c32 | ||
|
|
2bfd685ca1 | ||
|
|
4d24fa2c07 | ||
|
|
b305323f31 | ||
|
|
0b21e96448 | ||
|
|
70d89690bd | ||
|
|
bae6c74116 | ||
|
|
27532dfe53 | ||
|
|
9f2957436d | ||
|
|
5c5c860a03 | ||
|
|
622b48fc1a | ||
|
|
5a6f5d4c81 | ||
|
|
2f6135c1a6 | ||
|
|
0da0b63e1d | ||
|
|
7d9517cf90 |
No files matched your search
@@ -30,6 +30,7 @@ Alle base-pakkene våre har `fixed versjonering`. Dette tilsier at en bump på e
|
||||
```sh
|
||||
"@navikt/ds-react",
|
||||
"@navikt/ds-css",
|
||||
"@navikt/aksel-icons",
|
||||
"@navikt/ds-icons",
|
||||
"@navikt/ds-tokens",
|
||||
"@navikt/ds-tailwind",
|
||||
|
||||
@@ -13,6 +13,11 @@ jobs:
|
||||
name: "Release packages"
|
||||
if: "!contains(github.event.head_commit.message, '[ci skip]')"
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
id-token: "write"
|
||||
contents: "write"
|
||||
packages: "write"
|
||||
pull-requests: "write"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
|
||||
@@ -1,5 +1,39 @@
|
||||
# @navikt/aksel-icons
|
||||
|
||||
## 2.7.6
|
||||
|
||||
## 2.7.5
|
||||
|
||||
## 2.7.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#1852](https://github.com/navikt/aksel/pull/1852) [`a4fd1dd22`](https://github.com/navikt/aksel/commit/a4fd1dd227b9b56b747f962aa0c2b2dc9b4e30a4) Thanks [@KenAJoh](https://github.com/KenAJoh)! - Oppdatert ikonpakke med nye ikoner :rocket:
|
||||
|
||||
- :tada: CaretDownFill
|
||||
- :tada: CaretLeft
|
||||
- :tada: CaretLeftFill
|
||||
- :tada: CaretLeftRight
|
||||
- :tada: CaretLeftRightFill
|
||||
- :tada: CaretRight
|
||||
- :tada: CaretRightFill
|
||||
- :tada: CaretUpDownFill
|
||||
- :tada: CaretUpFill
|
||||
- :tada: Escalator
|
||||
- :tada: Moon
|
||||
- :tada: MoonFill
|
||||
- :fire: EscalatorStroke
|
||||
|
||||
## 2.7.3
|
||||
|
||||
## 2.7.2
|
||||
|
||||
## 2.7.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [`7d9517cf9`](https://github.com/navikt/aksel/commit/7d9517cf90331b57441a0787a04eef66efd1b9b0) Thanks [@KenAJoh](https://github.com/KenAJoh)! - Public-access for ny ikonpakke i GPR
|
||||
|
||||
## 2.7.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
@@ -16,15 +16,17 @@
|
||||
|
||||
## Use
|
||||
|
||||
For previous users of `@navikt/ds-icons`, this package utilizes the same API. The only difference is that the icons are suffixed with `Icon` to avoid naming conflicts and visual changes to the icons themselves.
|
||||
|
||||
```jsx
|
||||
import { StarIcon } from "@navikt/ds-icons";
|
||||
import { StarIcon } from "@navikt/aksel-icons";
|
||||
|
||||
function App() {
|
||||
return <StarIcon title="star" fontSize="1.5rem"/>;
|
||||
return <StarIcon title="star" fontSize="1.5rem" />;
|
||||
}
|
||||
```
|
||||
|
||||
Tip: Use the `title` prop for accessible icons.
|
||||
```
|
||||
|
||||
### Sizing
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ name: BellDot
|
||||
category: Status
|
||||
sub_category: Notification
|
||||
keywords:
|
||||
- "English: alert"
|
||||
- message
|
||||
- update
|
||||
- reminder
|
||||
|
||||
@@ -2,7 +2,6 @@ name: BellDotFill
|
||||
category: Status
|
||||
sub_category: Notification
|
||||
keywords:
|
||||
- "English: alert"
|
||||
- message
|
||||
- update
|
||||
- reminder
|
||||
|
||||
@@ -10,5 +10,5 @@ keywords:
|
||||
- åpner
|
||||
- mer
|
||||
variant: Stroke
|
||||
updated_at: 08.03.2023
|
||||
updated_at: 10.03.2023
|
||||
created_at: 07.03.2023
|
||||
@@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.5 9.25C6.19665 9.25 5.92318 9.43273 5.80709 9.71299C5.691 9.99324 5.75517 10.3158 5.96967 10.5303L11.4697 16.0303C11.7626 16.3232 12.2374 16.3232 12.5303 16.0303L18.0303 10.5303C18.2448 10.3158 18.309 9.99324 18.1929 9.71299C18.0768 9.43273 17.8033 9.25 17.5 9.25H6.5Z" fill="#262626"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 442 B |
@@ -0,0 +1,14 @@
|
||||
name: CaretDownFill
|
||||
category: Arrows
|
||||
sub_category: Caret
|
||||
keywords:
|
||||
- down
|
||||
- ned
|
||||
- expand
|
||||
- expanding
|
||||
- åpne
|
||||
- åpner
|
||||
- mer
|
||||
variant: Fill
|
||||
updated_at: 10.03.2023
|
||||
created_at: 10.03.2023
|
||||
@@ -1,3 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.287 5.80711C14.5673 5.9232 14.75 6.19668 14.75 6.50002V17.5C14.75 17.8034 14.5673 18.0768 14.287 18.1929C14.0068 18.309 13.6842 18.2449 13.4697 18.0304L7.96967 12.5303C7.82902 12.3897 7.75 12.1989 7.75 12C7.75 11.8011 7.82902 11.6103 7.96967 11.4697L13.4697 5.96969C13.6842 5.75519 14.0068 5.69103 14.287 5.80711ZM9.56066 12L13.25 15.6894V8.31068L9.56066 12Z" fill="#262626"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.037 6.55711C15.3173 6.6732 15.5 6.94668 15.5 7.25002L15.5 18.25C15.5 18.5534 15.3173 18.8268 15.037 18.9429C14.7568 19.059 14.4342 18.9949 14.2197 18.7804L8.71967 13.2804C8.42678 12.9875 8.42678 12.5126 8.71967 12.2197L14.2197 6.71969C14.4342 6.50519 14.7568 6.44103 15.037 6.55711ZM14 9.06068L10.3107 12.75L14 16.4394L14 9.06068Z" fill="#262626"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 533 B After Width: | Height: | Size: 505 B |
@@ -2,9 +2,13 @@ name: CaretLeft
|
||||
category: Arrows
|
||||
sub_category: Caret
|
||||
keywords:
|
||||
- left
|
||||
- venstre
|
||||
- side
|
||||
- down
|
||||
- ned
|
||||
- expand
|
||||
- expanding
|
||||
- åpne
|
||||
- åpner
|
||||
- mer
|
||||
variant: Stroke
|
||||
updated_at: 08.03.2023
|
||||
created_at: 07.03.2023
|
||||
updated_at: 10.03.2023
|
||||
created_at: 10.03.2023
|
||||
@@ -6,5 +6,5 @@ keywords:
|
||||
- venstre
|
||||
- side
|
||||
variant: Stroke
|
||||
updated_at: 08.03.2023
|
||||
updated_at: 10.03.2023
|
||||
created_at: 07.03.2023
|
||||
@@ -6,5 +6,5 @@ keywords:
|
||||
- venstre
|
||||
- side
|
||||
variant: Fill
|
||||
updated_at: 08.03.2023
|
||||
updated_at: 10.03.2023
|
||||
created_at: 07.03.2023
|
||||
@@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.5 7.25001C15.5 6.94666 15.3173 6.67318 15.037 6.5571C14.7567 6.44101 14.4342 6.50518 14.2197 6.71968L8.71965 12.2197C8.42676 12.5126 8.42676 12.9874 8.71965 13.2803L14.2197 18.7803C14.4342 18.9948 14.7567 19.059 15.037 18.9429C15.3173 18.8268 15.5 18.5534 15.5 18.25L15.5 7.25001Z" fill="#262626"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 455 B |
@@ -0,0 +1,14 @@
|
||||
name: CaretLeftFill
|
||||
category: Arrows
|
||||
sub_category: Caret
|
||||
keywords:
|
||||
- down
|
||||
- ned
|
||||
- expand
|
||||
- expanding
|
||||
- åpne
|
||||
- åpner
|
||||
- mer
|
||||
variant: Fill
|
||||
updated_at: 10.03.2023
|
||||
created_at: 10.03.2023
|
||||
@@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.46967 11.4696C4.17678 11.7625 4.17678 12.2374 4.46967 12.5303L7.96967 16.0303C8.18417 16.2448 8.50676 16.309 8.78701 16.1929C9.06727 16.0768 9.25 15.8033 9.25 15.5L9.25 8.49998C9.25 8.19663 9.06727 7.92315 8.78701 7.80707C8.50676 7.69098 8.18417 7.75515 7.96967 7.96965L4.46967 11.4696ZM6.06066 12L7.75 10.3106L7.75 13.6893L6.06066 12ZM14.75 15.5C14.75 15.8033 14.9327 16.0768 15.213 16.1929C15.4932 16.309 15.8158 16.2448 16.0303 16.0303L19.5303 12.5303C19.8232 12.2374 19.8232 11.7625 19.5303 11.4696L16.0303 7.96965C15.8158 7.75515 15.4932 7.69098 15.213 7.80707C14.9327 7.92315 14.75 8.19663 14.75 8.49998L14.75 15.5ZM17.9393 12L16.25 13.6893L16.25 10.3106L17.9393 12Z" fill="#262626"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 846 B |
@@ -0,0 +1,13 @@
|
||||
name: CaretLeftRight
|
||||
category: Arrows
|
||||
sub_category: Caret
|
||||
keywords:
|
||||
- Expand/collapse
|
||||
- show/hide
|
||||
- toggle
|
||||
- Utvide/skjule
|
||||
- vise/skjule
|
||||
- bytte
|
||||
variant: Stroke
|
||||
updated_at: 10.03.2023
|
||||
created_at: 10.03.2023
|
||||
@@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.4697 12.5303C4.17681 12.2374 4.17681 11.7626 4.4697 11.4697L7.9697 7.96968C8.1842 7.75518 8.50679 7.69101 8.78704 7.8071C9.0673 7.92318 9.25003 8.19666 9.25003 8.50001L9.25003 15.5C9.25003 15.8034 9.0673 16.0768 8.78704 16.1929C8.50679 16.309 8.1842 16.2448 7.9697 16.0303L4.4697 12.5303ZM15.213 16.1929C14.9328 16.0768 14.75 15.8034 14.75 15.5L14.75 8.50001C14.75 8.19666 14.9328 7.92318 15.213 7.8071C15.4933 7.69101 15.8159 7.75518 16.0304 7.96968L19.5304 11.4697C19.8233 11.7626 19.8233 12.2374 19.5304 12.5303L16.0304 16.0303C15.8159 16.2448 15.4933 16.309 15.213 16.1929Z" fill="#262626"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 751 B |
@@ -0,0 +1,13 @@
|
||||
name: CaretLeftRightFill
|
||||
category: Arrows
|
||||
sub_category: Caret
|
||||
keywords:
|
||||
- Expand/collapse
|
||||
- show/hide
|
||||
- toggle
|
||||
- Utvide/skjule
|
||||
- vise/skjule
|
||||
- bytte
|
||||
variant: Fill
|
||||
updated_at: 10.03.2023
|
||||
created_at: 10.03.2023
|
||||
@@ -1,3 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.71299 5.80711C9.99324 5.69103 10.3158 5.75519 10.5303 5.96969L16.0303 11.4697C16.3232 11.7626 16.3232 12.2375 16.0303 12.5304L10.5303 18.0304C10.3158 18.2449 9.99324 18.309 9.71299 18.1929C9.43273 18.0768 9.25 17.8034 9.25 17.5V6.50002C9.25 6.19668 9.43273 5.9232 9.71299 5.80711ZM10.75 8.31068V15.6894L14.4393 12L10.75 8.31068Z" fill="#262626"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.96299 18.9429C8.68273 18.8268 8.5 18.5533 8.5 18.25L8.5 7.24998C8.5 6.94663 8.68273 6.67315 8.96299 6.55707C9.24324 6.44098 9.56583 6.50515 9.78033 6.71965L15.2803 12.2196C15.5732 12.5125 15.5732 12.9874 15.2803 13.2803L9.78033 18.7803C9.56583 18.9948 9.24324 19.059 8.96299 18.9429ZM10 16.4393L13.6893 12.75L10 9.06064L10 16.4393Z" fill="#262626"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 502 B After Width: | Height: | Size: 505 B |
@@ -2,9 +2,13 @@ name: CaretRight
|
||||
category: Arrows
|
||||
sub_category: Caret
|
||||
keywords:
|
||||
- right
|
||||
- høyre
|
||||
- side
|
||||
- down
|
||||
- ned
|
||||
- expand
|
||||
- expanding
|
||||
- åpne
|
||||
- åpner
|
||||
- mer
|
||||
variant: Stroke
|
||||
updated_at: 08.03.2023
|
||||
created_at: 07.03.2023
|
||||
updated_at: 10.03.2023
|
||||
created_at: 10.03.2023
|
||||
@@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.5 18.25C8.5 18.5534 8.68273 18.8268 8.96299 18.9429C9.24324 19.059 9.56583 18.9948 9.78033 18.7803L15.2803 13.2803C15.5732 12.9874 15.5732 12.5126 15.2803 12.2197L9.78033 6.71968C9.56583 6.50518 9.24324 6.44101 8.96299 6.5571C8.68273 6.67318 8.5 6.94666 8.5 7.25001L8.5 18.25Z" fill="#262626"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 450 B |
@@ -0,0 +1,14 @@
|
||||
name: CaretRightFill
|
||||
category: Arrows
|
||||
sub_category: Caret
|
||||
keywords:
|
||||
- down
|
||||
- ned
|
||||
- expand
|
||||
- expanding
|
||||
- åpne
|
||||
- åpner
|
||||
- mer
|
||||
variant: Fill
|
||||
updated_at: 10.03.2023
|
||||
created_at: 10.03.2023
|
||||
@@ -10,5 +10,5 @@ keywords:
|
||||
- lukk
|
||||
- lukke
|
||||
variant: Stroke
|
||||
updated_at: 08.03.2023
|
||||
updated_at: 10.03.2023
|
||||
created_at: 07.03.2023
|
||||
@@ -9,5 +9,5 @@ keywords:
|
||||
- vise/skjule
|
||||
- bytte
|
||||
variant: Stroke
|
||||
updated_at: 08.03.2023
|
||||
updated_at: 10.03.2023
|
||||
created_at: 07.03.2023
|
||||
@@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.4697 4.46967C11.7626 4.17678 12.2374 4.17678 12.5303 4.46967L16.0303 7.96967C16.2448 8.18417 16.309 8.50676 16.1929 8.78701C16.0768 9.06727 15.8034 9.25 15.5 9.25H8.50001C8.19666 9.25 7.92318 9.06727 7.8071 8.78701C7.69101 8.50676 7.75518 8.18417 7.96968 7.96967L11.4697 4.46967ZM7.8071 15.213C7.92318 14.9327 8.19666 14.75 8.50001 14.75H15.5C15.8034 14.75 16.0768 14.9327 16.1929 15.213C16.309 15.4932 16.2448 15.8158 16.0303 16.0303L12.5303 19.5303C12.2374 19.8232 11.7626 19.8232 11.4697 19.5303L7.96968 16.0303C7.75518 15.8158 7.69101 15.4932 7.8071 15.213Z" fill="#262626"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 736 B |
@@ -0,0 +1,13 @@
|
||||
name: CaretUpDownFill
|
||||
category: Arrows
|
||||
sub_category: Caret
|
||||
keywords:
|
||||
- Expand/collapse
|
||||
- show/hide
|
||||
- toggle
|
||||
- Utvide/skjule
|
||||
- vise/skjule
|
||||
- bytte
|
||||
variant: Fill
|
||||
updated_at: 10.03.2023
|
||||
created_at: 10.03.2023
|
||||
@@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.5303 7.96967C12.2374 7.67678 11.7626 7.67678 11.4697 7.96967L5.96967 13.4697C5.75517 13.6842 5.691 14.0068 5.80709 14.287C5.92318 14.5673 6.19665 14.75 6.5 14.75H17.5C17.8033 14.75 18.0768 14.5673 18.1929 14.287C18.309 14.0068 18.2448 13.6842 18.0303 13.4697L12.5303 7.96967Z" fill="#262626"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 450 B |
@@ -0,0 +1,14 @@
|
||||
name: CaretUpFill
|
||||
category: Arrows
|
||||
sub_category: Caret
|
||||
keywords:
|
||||
- up
|
||||
- opp
|
||||
- collapse
|
||||
- collapsing
|
||||
- kollaps
|
||||
- lukk
|
||||
- lukke
|
||||
variant: Fill
|
||||
updated_at: 10.03.2023
|
||||
created_at: 10.03.2023
|
||||
@@ -8,5 +8,5 @@ keywords:
|
||||
- barn
|
||||
- baby
|
||||
variant: Stroke
|
||||
updated_at: 08.03.2023
|
||||
updated_at: 10.03.2023
|
||||
created_at: 07.03.2023
|
||||
@@ -8,5 +8,5 @@ keywords:
|
||||
- barn
|
||||
- baby
|
||||
variant: Fill
|
||||
updated_at: 08.03.2023
|
||||
updated_at: 10.03.2023
|
||||
created_at: 07.03.2023
|
||||
@@ -1,9 +1,9 @@
|
||||
name: EscalatorStroke
|
||||
name: Escalator
|
||||
category: Accessibility
|
||||
sub_category: Mobility
|
||||
keywords:
|
||||
- trapp
|
||||
- rulletrapp
|
||||
variant: Stroke
|
||||
updated_at: 08.03.2023
|
||||
updated_at: 09.03.2023
|
||||
created_at: 07.03.2023
|
||||
@@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.8238 3.11549C15.0363 2.90303 15.3551 2.83787 15.6338 2.94991C19.2176 4.39011 21.75 7.89842 21.75 12C21.75 17.3848 17.3848 21.75 12 21.75C7.8984 21.75 4.3901 19.2176 2.9499 15.6339C2.83786 15.3551 2.90302 15.0363 3.11547 14.8239C3.32793 14.6114 3.64668 14.5462 3.92547 14.6583C4.87464 15.0397 5.91184 15.25 6.99999 15.25C11.5563 15.25 15.25 11.5564 15.25 7C15.25 5.91185 15.0397 4.87465 14.6583 3.92548C14.5462 3.64669 14.6114 3.32795 14.8238 3.11549ZM16.5708 5.13072C16.6884 5.73604 16.75 6.36106 16.75 7C16.75 12.3848 12.3848 16.75 6.99999 16.75C6.36105 16.75 5.73603 16.6884 5.1307 16.5709C6.61 18.7895 9.13505 20.25 12 20.25C16.5563 20.25 20.25 16.5564 20.25 12C20.25 9.13507 18.7895 6.61002 16.5708 5.13072Z" fill="#262626"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 886 B |
@@ -0,0 +1,12 @@
|
||||
name: Moon
|
||||
category: Nature and animals
|
||||
sub_category: Nature
|
||||
keywords:
|
||||
- Måne
|
||||
- night
|
||||
- natt
|
||||
- dark
|
||||
- mørk
|
||||
variant: Stroke
|
||||
updated_at: 10.03.2023
|
||||
created_at: 09.03.2023
|
||||
@@ -0,0 +1,3 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.8238 3.11549C15.0363 2.90303 15.3551 2.83787 15.6338 2.94991C19.2176 4.39011 21.75 7.89842 21.75 12C21.75 17.3848 17.3848 21.75 12 21.75C7.8984 21.75 4.3901 19.2176 2.9499 15.6339C2.83786 15.3551 2.90302 15.0363 3.11547 14.8239C3.32793 14.6114 3.64668 14.5462 3.92547 14.6583C4.87464 15.0397 5.91184 15.25 6.99999 15.25C11.5563 15.25 15.25 11.5564 15.25 7C15.25 5.91185 15.0397 4.87465 14.6583 3.92548C14.5462 3.64669 14.6114 3.32795 14.8238 3.11549Z" fill="#262626"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 625 B |
@@ -0,0 +1,12 @@
|
||||
name: MoonFill
|
||||
category: Nature and animals
|
||||
sub_category: Nature
|
||||
keywords:
|
||||
- Måne
|
||||
- night
|
||||
- natt
|
||||
- dark
|
||||
- mørk
|
||||
variant: Fill
|
||||
updated_at: 10.03.2023
|
||||
created_at: 09.03.2023
|
||||
@@ -9,5 +9,5 @@ keywords:
|
||||
- tid
|
||||
- pause
|
||||
variant: Stroke
|
||||
updated_at: 08.03.2023
|
||||
updated_at: 10.03.2023
|
||||
created_at: 07.03.2023
|
||||
@@ -9,5 +9,5 @@ keywords:
|
||||
- tid
|
||||
- pause
|
||||
variant: Fill
|
||||
updated_at: 08.03.2023
|
||||
updated_at: 10.03.2023
|
||||
created_at: 07.03.2023
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@navikt/aksel-icons",
|
||||
"version": "2.7.0",
|
||||
"version": "2.7.6",
|
||||
"author": "Aksel | NAV",
|
||||
"homepage": "https://aksel.nav.no/ikoner",
|
||||
"repository": {
|
||||
@@ -16,6 +16,9 @@
|
||||
"react",
|
||||
"svg"
|
||||
],
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"sideEffects": [
|
||||
"*.svg"
|
||||
],
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# @navikt/ds-codemod
|
||||
|
||||
## 2.7.6
|
||||
|
||||
## 2.7.5
|
||||
|
||||
## 2.7.4
|
||||
|
||||
## 2.7.3
|
||||
|
||||
## 2.7.2
|
||||
|
||||
## 2.7.1
|
||||
|
||||
## 2.7.0
|
||||
|
||||
## 2.6.2
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@navikt/ds-codemod",
|
||||
"version": "2.7.0",
|
||||
"version": "2.7.6",
|
||||
"description": "Aksel codemods for NAVs designsystem",
|
||||
"author": "Aksel | NAV designsystem team",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
"build-pict": "svgr --silent --index-template index-template.js --out-dir src/pictograms pictograms"
|
||||
},
|
||||
"dependencies": {
|
||||
"@navikt/ds-icons": "^2.7.0",
|
||||
"@navikt/ds-react": "^2.7.0",
|
||||
"@navikt/ds-icons": "^2.7.6",
|
||||
"@navikt/ds-react": "^2.7.6",
|
||||
"clsx": "^1.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -1,5 +1,21 @@
|
||||
# @navikt/ds-css
|
||||
|
||||
## 2.7.6
|
||||
|
||||
## 2.7.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- :bug: Fikset token-bug i togglegroup
|
||||
|
||||
## 2.7.4
|
||||
|
||||
## 2.7.3
|
||||
|
||||
## 2.7.2
|
||||
|
||||
## 2.7.1
|
||||
|
||||
## 2.7.0
|
||||
|
||||
## 2.6.2
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@navikt/ds-css",
|
||||
"version": "2.7.0",
|
||||
"version": "2.7.6",
|
||||
"description": "CSS for NAV Designsystem",
|
||||
"author": "Aksel | NAV designsystem team",
|
||||
"keywords": [
|
||||
@@ -20,7 +20,7 @@
|
||||
"watch": "postcss --watch --use postcss-import -o dist/index.css index.css"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@navikt/ds-tokens": "^2.7.0",
|
||||
"@navikt/ds-tokens": "^2.7.6",
|
||||
"normalize.css": "^8.0.1",
|
||||
"postcss": "^8.4.0",
|
||||
"postcss-cli": "^9.0.0",
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
.navds-toggle-group--neutral > .navds-toggle-group__button {
|
||||
background-color: var(--ac-toggle-group-button-neutral-bg, var(--a-surface-transparent));
|
||||
color: var(--ac-toggle-group-button-neutral-text, var(c));
|
||||
color: var(--ac-toggle-group-button-neutral-text, var(--a-text-default));
|
||||
}
|
||||
|
||||
.navds-toggle-group__button:hover {
|
||||
|
||||
@@ -256,7 +256,7 @@
|
||||
"--ac-toggle-group-selected-bg": "--a-surface-action-selected",
|
||||
"--ac-toggle-group-selected-text": "--a-text-on-action",
|
||||
"--ac-toggle-group-button-neutral-bg": "--a-surface-transparent",
|
||||
"--ac-toggle-group-button-neutral-text": "--ac-toggle-group-button-neutral-text",
|
||||
"--ac-toggle-group-button-neutral-text": "--a-text-default",
|
||||
"--ac-toggle-group-button-neutral-hover-bg": "--a-surface-neutral-subtle-hover",
|
||||
"--ac-toggle-group-button-neutral-hover-text": "--a-text-default",
|
||||
"--ac-toggle-group-neutral-selected-bg": "--a-surface-neutral",
|
||||
|
||||
@@ -1,5 +1,47 @@
|
||||
# @navikt/ds-react
|
||||
|
||||
## 2.7.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @navikt/ds-icons@2.7.6
|
||||
|
||||
## 2.7.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @navikt/ds-icons@2.7.5
|
||||
|
||||
## 2.7.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @navikt/ds-icons@2.7.4
|
||||
|
||||
## 2.7.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @navikt/ds-icons@2.7.3
|
||||
|
||||
## 2.7.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @navikt/ds-icons@2.7.2
|
||||
|
||||
## 2.7.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @navikt/ds-icons@2.7.1
|
||||
|
||||
## 2.7.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@navikt/ds-react",
|
||||
"version": "2.7.0",
|
||||
"version": "2.7.6",
|
||||
"description": "Aksel react-components for NAV designsystem",
|
||||
"author": "Aksel | NAV designsystem team",
|
||||
"license": "MIT",
|
||||
@@ -37,7 +37,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@floating-ui/react": "0.17.0",
|
||||
"@navikt/ds-icons": "^2.7.0",
|
||||
"@navikt/ds-icons": "^2.7.6",
|
||||
"@radix-ui/react-tabs": "1.0.0",
|
||||
"@radix-ui/react-toggle-group": "1.0.0",
|
||||
"clsx": "^1.2.1",
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# @navikt/ds-tailwind
|
||||
|
||||
## 2.7.6
|
||||
|
||||
## 2.7.5
|
||||
|
||||
## 2.7.4
|
||||
|
||||
## 2.7.3
|
||||
|
||||
## 2.7.2
|
||||
|
||||
## 2.7.1
|
||||
|
||||
## 2.7.0
|
||||
|
||||
## 2.6.2
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@navikt/ds-tailwind",
|
||||
"version": "2.7.0",
|
||||
"version": "2.7.6",
|
||||
"description": "Tailwind config based on @navikt/ds-tokens",
|
||||
"author": "Aksel | NAV designsystem team",
|
||||
"keywords": [
|
||||
@@ -22,7 +22,7 @@
|
||||
"directory": "@navikt/core/tailwind"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@navikt/ds-tokens": "^2.7.0",
|
||||
"@navikt/ds-tokens": "^2.7.6",
|
||||
"@types/jest": "^29.0.0",
|
||||
"color": "4.2.3",
|
||||
"jest": "^29.0.0",
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# @navikt/ds-tokens
|
||||
|
||||
## 2.7.6
|
||||
|
||||
## 2.7.5
|
||||
|
||||
## 2.7.4
|
||||
|
||||
## 2.7.3
|
||||
|
||||
## 2.7.2
|
||||
|
||||
## 2.7.1
|
||||
|
||||
## 2.7.0
|
||||
|
||||
## 2.6.2
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@navikt/ds-tokens",
|
||||
"version": "2.7.0",
|
||||
"version": "2.7.6",
|
||||
"description": "Design-tokens for NAV designsystem",
|
||||
"author": "Aksel | NAV designsystem team",
|
||||
"keywords": [
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# @navikt/ds-icons
|
||||
|
||||
## 2.7.6
|
||||
|
||||
## 2.7.5
|
||||
|
||||
## 2.7.4
|
||||
|
||||
## 2.7.3
|
||||
|
||||
## 2.7.2
|
||||
|
||||
## 2.7.1
|
||||
|
||||
## 2.7.0
|
||||
|
||||
## 2.6.2
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@navikt/ds-icons",
|
||||
"version": "2.7.0",
|
||||
"version": "2.7.6",
|
||||
"description": "Aksel icons for NAV",
|
||||
"author": "Aksel | NAV designsystem team",
|
||||
"repository": {
|
||||
|
||||
@@ -1,5 +1,25 @@
|
||||
# @navikt/ds-css-internal
|
||||
|
||||
## 2.7.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Justert Timeline Period sentrering
|
||||
|
||||
## 2.7.5
|
||||
|
||||
## 2.7.4
|
||||
|
||||
## 2.7.3
|
||||
|
||||
## 2.7.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [`4d24fa2c0`](https://github.com/navikt/aksel/commit/4d24fa2c07e6c7fe56abf76b939e34b3529e73c1) Thanks [@KenAJoh](https://github.com/KenAJoh)! - Timeline.Row støtter nå className, fikset css alignment ved høyde-endring i Timeline
|
||||
|
||||
## 2.7.1
|
||||
|
||||
## 2.7.0
|
||||
|
||||
## 2.6.2
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@navikt/ds-css-internal",
|
||||
"version": "2.7.0",
|
||||
"version": "2.7.6",
|
||||
"description": "CSS for NAV internal Designsystem-components",
|
||||
"author": "Aksel | NAV designsystem team",
|
||||
"keywords": [
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
grid-template-columns: auto minmax(0, 1fr);
|
||||
width: 100%;
|
||||
min-width: fit-content;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.navdsi-timeline__axislabels {
|
||||
@@ -11,7 +12,6 @@
|
||||
height: 1rem;
|
||||
box-sizing: content-box;
|
||||
grid-column: 2;
|
||||
margin-bottom: var(--a-spacing-4);
|
||||
margin-left: var(--a-spacing-8);
|
||||
}
|
||||
|
||||
@@ -20,12 +20,16 @@
|
||||
width: auto;
|
||||
margin-right: var(--a-spacing-4);
|
||||
grid-column: 1;
|
||||
height: 1.5rem;
|
||||
min-height: 1.5rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--a-spacing-2);
|
||||
}
|
||||
|
||||
.navdsi-timeline__row-label:where(:nth-last-child(2)) {
|
||||
align-self: flex-end;
|
||||
}
|
||||
|
||||
.navdsi-timeline__axislabels-label {
|
||||
position: absolute;
|
||||
color: var(--ac-timeline-axislabel-text, var(--a-text-subtle));
|
||||
@@ -35,7 +39,7 @@
|
||||
.navdsi-timeline__row {
|
||||
display: flex;
|
||||
background: var(--ac-timeline-row-bg, var(--a-surface-subtle));
|
||||
margin: 0 0 var(--a-spacing-8);
|
||||
margin: var(--a-spacing-4) 0;
|
||||
padding-left: var(--a-spacing-8);
|
||||
grid-column: 2;
|
||||
}
|
||||
@@ -49,7 +53,7 @@
|
||||
}
|
||||
|
||||
.navdsi-timeline__row-periods {
|
||||
height: 1.5rem;
|
||||
min-height: 1.5rem;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
@@ -77,13 +81,10 @@
|
||||
white-space: nowrap;
|
||||
text-overflow: clip;
|
||||
text-align: left;
|
||||
height: 1rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* .navdsi-timeline__period > * {
|
||||
flex-shrink: 0;
|
||||
} */
|
||||
|
||||
.navdsi-timeline__period--clickable {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,57 @@
|
||||
# @navikt/ds-react-internal
|
||||
|
||||
## 2.7.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @navikt/ds-react@2.7.6
|
||||
- @navikt/ds-icons@2.7.6
|
||||
|
||||
## 2.7.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @navikt/ds-react@2.7.5
|
||||
- @navikt/ds-icons@2.7.5
|
||||
|
||||
## 2.7.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @navikt/ds-react@2.7.4
|
||||
- @navikt/ds-icons@2.7.4
|
||||
|
||||
## 2.7.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- :fire: Fjernet unødvendig logging
|
||||
|
||||
- Updated dependencies []:
|
||||
- @navikt/ds-react@2.7.3
|
||||
- @navikt/ds-icons@2.7.3
|
||||
|
||||
## 2.7.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [`4d24fa2c0`](https://github.com/navikt/aksel/commit/4d24fa2c07e6c7fe56abf76b939e34b3529e73c1) Thanks [@KenAJoh](https://github.com/KenAJoh)! - Timeline.Row støtter nå className, fikset css alignment ved høyde-endring i Timeline
|
||||
|
||||
- Updated dependencies []:
|
||||
- @navikt/ds-react@2.7.2
|
||||
- @navikt/ds-icons@2.7.2
|
||||
|
||||
## 2.7.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies []:
|
||||
- @navikt/ds-react@2.7.1
|
||||
- @navikt/ds-icons@2.7.1
|
||||
|
||||
## 2.7.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@navikt/ds-react-internal",
|
||||
"version": "2.7.0",
|
||||
"version": "2.7.6",
|
||||
"description": "Aksel react components for internal UIs in NAV",
|
||||
"author": "Aksel | NAV designsystem team",
|
||||
"license": "MIT",
|
||||
@@ -35,8 +35,8 @@
|
||||
"watch": "tsc --watch -p tsconfig.esm.json"
|
||||
},
|
||||
"dependencies": {
|
||||
"@navikt/ds-icons": "^2.7.0",
|
||||
"@navikt/ds-react": "^2.7.0",
|
||||
"@navikt/ds-icons": "^2.7.6",
|
||||
"@navikt/ds-react": "^2.7.6",
|
||||
"clsx": "^1.1.1",
|
||||
"copy-to-clipboard": "^3.3.1"
|
||||
},
|
||||
|
||||
@@ -36,7 +36,7 @@ export interface TimelineRowType
|
||||
}
|
||||
|
||||
export const TimelineRow = forwardRef<HTMLOListElement, TimelineRowProps>(
|
||||
({ label, headingTag = "h3", icon, ...rest }, ref) => {
|
||||
({ label, className, headingTag = "h3", icon, ...rest }, ref) => {
|
||||
const { periods, id, active } = useRowContext();
|
||||
const { setActiveRow } = useTimelineContext();
|
||||
|
||||
@@ -81,7 +81,7 @@ export const TimelineRow = forwardRef<HTMLOListElement, TimelineRowProps>(
|
||||
"dd.MM.yyyy"
|
||||
)}`
|
||||
}
|
||||
className="navdsi-timeline__row-periods"
|
||||
className={cl("navdsi-timeline__row-periods", className)}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
|
||||
e.preventDefault();
|
||||
|
||||
@@ -24,16 +24,16 @@ Nettside: [http://localhost:3000](http://localhost:3000)
|
||||
## Utviklingsmiljø
|
||||
|
||||
Vi bruker storybook [https://storybook.js.org/](https://storybook.js.org/) for utvikling av nye komponenter.
|
||||
Skriv `stories` for komponentene man vil teste [(hvordan skrive storybook stories)](https://storybook.js.org/docs/react/writing-stories/introduction)
|
||||
Lag `stories` for komponentene man vil teste [(hvordan skrive storybook stories)](https://storybook.js.org/docs/react/writing-stories/introduction)
|
||||
|
||||
## Utvikling av nye komponenter
|
||||
|
||||
Det er ikke satt opp en template for nye komponenter, men vi følger til dels en mal.
|
||||
Det er ikke satt opp en template for nye komponenter, men vi følger en mal.
|
||||
|
||||
```sh
|
||||
@navikt/pakkenavn
|
||||
└─ src # Komponenter
|
||||
├─ index.ts # Alle exports
|
||||
└─ src # Komponenter
|
||||
├─ index.ts # Alle exports
|
||||
└─ pakkenavn
|
||||
├─ index.ts # Alle exports fra komponent
|
||||
├─ komponent.tsx # Komponentkode
|
||||
@@ -42,15 +42,15 @@ Det er ikke satt opp en template for nye komponenter, men vi følger til dels en
|
||||
|
||||
## Dokumentasjon
|
||||
|
||||
Dokumentasjon ang komponentter finner man på [aksel.nav.no](https://design.nav.no/). Hvis man ønsker å skrive noe dokumentasjon selv gjør vi det via CMS et Sanity. Kode-eksempler blir skrevet lokalt i (https://github.com/navikt/aksel-website/tree/main/website/pages/eksempler)[aksel-website repo]
|
||||
Dokumentasjon for komponenter finner man på [aksel.nav.no](https://aksel.nav.no/). Hvis man ønsker å skrive noe dokumentasjon selv gjør vi det via CMS et Sanity. Kode-eksempler blir skrevet lokalt i (https://github.com/navikt/aksel/tree/main/aksel.nav.no/website/pages/eksempler)[/pages/eksempler]
|
||||
|
||||
## Versjonering av pakker
|
||||
|
||||
Vi bruker `changeset` for versionering av pakker. Se [README](https://github.com/navikt/aksel/blob/main/.changeset/README.md) for mer informasjon.
|
||||
Vi bruker `changeset` for versjonering av pakker. Se [README](https://github.com/navikt/aksel/blob/main/.changeset/README.md) for mer informasjon.
|
||||
|
||||
## Kodekvalitet og testing
|
||||
|
||||
Noen komponenter og løsninger blir testet med jest + react-testing-library.
|
||||
Komponenter og løsninger blir testet med jest + react-testing-library.
|
||||
|
||||
- Commit: Kjører prettier på endrede filer + linter
|
||||
- Ved PR: Kjører tester, linter og visuell regresjonstester
|
||||
|
||||
@@ -31,11 +31,13 @@
|
||||
├── core/tailwind # @navikt/ds-tailwind, tailwind-config
|
||||
├── internal/react # @navikt/ds-react-internal, komponenter interne flater
|
||||
├── internal/css # @navikt/ds-css-internal, css interne flater
|
||||
├── icons # @navikt/ds-icons, ikonpakke
|
||||
├── aksel-icons # @navikt/aksel-icons, ikonpakke
|
||||
├── icons # @navikt/ds-icons (ikke lengre i bruk)
|
||||
└── codemod # @navikt/ds-codemod, migrerings-scripts
|
||||
|
||||
aksel.nav.no/
|
||||
└── website # NEXT.JS app (v12) website/sanity # Sanity CMS-app (v3)
|
||||
├── website # NEXT.JS app (v13)
|
||||
└── website/sanity # Sanity CMS-app (v3)
|
||||
```
|
||||
|
||||
## Commands
|
||||
@@ -52,14 +54,14 @@ yarn && yarn boot
|
||||
| `yarn storybook` | Starter storybook |
|
||||
| `yarn dev` | Starter aksel-nettsiden [(Mer info)](https://github.com/navikt/aksel/blob/main/aksel.nav.no/README.md) |
|
||||
| `yarn example:shadow-dom` | Starter demo-app med shadow-dom |
|
||||
| `yarn lint` | Lints react and css workspaces |
|
||||
| `yarn test` | Runs tests |
|
||||
| `yarn lint` | Linter react and css workspaces |
|
||||
| `yarn test` | Kjører tester |
|
||||
| `yarn clean` | Fjerner genererte filer |
|
||||
| `yarn changeset` | Ny versjon-entry [(how-to)](https://github.com/navikt/aksel/blob/main/.changeset/README.md) |
|
||||
|
||||
## Bidra
|
||||
|
||||
Vi tar gjerne i mot PR-er [CONTRIBUTING.md](https://github.com/navikt/aksel/blob/main/CONTRIBUTING.md)
|
||||
Vi tar gjerne i mot PR-er! [CONTRIBUTING.md](https://github.com/navikt/aksel/blob/main/CONTRIBUTING.md)
|
||||
|
||||
## Lisenser
|
||||
|
||||
|
||||
@@ -4,13 +4,16 @@ RUN apk add --no-cache libc6-compat
|
||||
ENV NODE_ENV production
|
||||
|
||||
WORKDIR /app
|
||||
COPY aksel.nav.no/website/package.json .
|
||||
COPY aksel.nav.no/website/.next/ .next/
|
||||
COPY aksel.nav.no/website/public/ public
|
||||
COPY aksel.nav.no/website/.env .
|
||||
COPY aksel.nav.no/website/next.config.js .
|
||||
COPY node_modules/ node_modules/
|
||||
COPY @navikt/ @navikt/
|
||||
COPY aksel.nav.no/website/.next/standalone ./
|
||||
# COPY aksel.nav.no/website/package.json .
|
||||
# COPY aksel.nav.no/website/.next/ .next/
|
||||
# COPY aksel.nav.no/website/public/ public
|
||||
# COPY aksel.nav.no/website/.env .
|
||||
# COPY aksel.nav.no/website/next.config.js .
|
||||
# COPY node_modules/ node_modules/
|
||||
# COPY @navikt/ @navikt/
|
||||
# CMD yarn start
|
||||
|
||||
EXPOSE 3000
|
||||
CMD yarn start
|
||||
CMD ["node", "aksel.nav.no/website/server.js"]
|
||||
|
||||
@@ -9,11 +9,22 @@ spec:
|
||||
image: {{ image }}
|
||||
port: 3000
|
||||
ingresses:
|
||||
- "https://aksel.dev.nav.no"
|
||||
- "https://aksel.ekstern.dev.nav.no"
|
||||
liveness:
|
||||
path: /api/isAlive
|
||||
initialDelay: 10
|
||||
readiness:
|
||||
path: /api/isAlive
|
||||
initialDelay: 10
|
||||
|
||||
resources:
|
||||
limits:
|
||||
cpu: 2000m
|
||||
memory: 2048Mi
|
||||
requests:
|
||||
cpu: 500m
|
||||
memory: 1024Mi
|
||||
|
||||
accessPolicy:
|
||||
outbound:
|
||||
external:
|
||||
|
||||
@@ -15,15 +15,15 @@
|
||||
"website"
|
||||
],
|
||||
"dependencies": {
|
||||
"@navikt/aksel-icons": "^2.7.0",
|
||||
"@navikt/ds-codemod": "^2.7.0",
|
||||
"@navikt/ds-css": "^2.7.0",
|
||||
"@navikt/ds-css-internal": "^2.7.0",
|
||||
"@navikt/ds-icons": "^2.7.0",
|
||||
"@navikt/ds-react": "^2.7.0",
|
||||
"@navikt/ds-react-internal": "^2.7.0",
|
||||
"@navikt/ds-tailwind": "^2.7.0",
|
||||
"@navikt/ds-tokens": "^2.7.0"
|
||||
"@navikt/aksel-icons": "^2.7.6",
|
||||
"@navikt/ds-codemod": "^2.7.6",
|
||||
"@navikt/ds-css": "^2.7.6",
|
||||
"@navikt/ds-css-internal": "^2.7.6",
|
||||
"@navikt/ds-icons": "^2.7.6",
|
||||
"@navikt/ds-react": "^2.7.6",
|
||||
"@navikt/ds-react-internal": "^2.7.6",
|
||||
"@navikt/ds-tailwind": "^2.7.6",
|
||||
"@navikt/ds-tokens": "^2.7.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"prettier-plugin-tailwindcss": "^0.2.3"
|
||||
|
||||
@@ -26,11 +26,17 @@ import {
|
||||
} from ".";
|
||||
|
||||
export const InlineCode = (props: React.HTMLAttributes<HTMLElement>) => (
|
||||
<code className="inline-code" {...props} />
|
||||
<code
|
||||
className="bg-surface-alt-3-subtle/50 py-05 rounded px-1 leading-normal [font-size:_calc(16em_/_18)]"
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
|
||||
export const KBD = (props: React.HTMLAttributes<HTMLElement>) => (
|
||||
<kbd className="inline-kbd" {...props} />
|
||||
<kbd
|
||||
className="text-text-default bg-surface-default py-05 text-medium whitespace-nowrap rounded px-1 leading-normal shadow-[0_0_0_1px_var(--a-border-strong)]"
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
|
||||
const serializers = {
|
||||
|
||||
@@ -13,11 +13,11 @@ export { default as PropsSeksjon } from "./sanity-modules/props/PropsSeksjon";
|
||||
export { default as PropTable } from "./sanity-modules/props/PropTabell";
|
||||
export { default as SideModul } from "./sanity-modules/SideModul";
|
||||
export { default as Tabell } from "./sanity-modules/Tabell";
|
||||
export { default as TastaturModul } from "./sanity-modules/tastatur";
|
||||
export { default as TastaturModul } from "./sanity-modules/TastaturTabell";
|
||||
export { default as Tips } from "./sanity-modules/tips";
|
||||
export { default as TokenTable } from "./sanity-modules/TokenTable";
|
||||
export * from "./sanity-modules/UuFeedback";
|
||||
export { default as Video } from "./sanity-modules/video";
|
||||
export { default as Video } from "./sanity-modules/VideoEmbed";
|
||||
export * from "./website-modules/BreadCrumbs";
|
||||
export { default as EditButton } from "./website-modules/EditButton";
|
||||
export { default as Feedback } from "./website-modules/feedback";
|
||||
|
||||
@@ -6,6 +6,7 @@ import { useRouter } from "next/router";
|
||||
import { useEffect, useState } from "react";
|
||||
import ReactModal from "react-modal";
|
||||
import { logNav } from "../..";
|
||||
import styles from "./header.module.css";
|
||||
|
||||
const LinkElement = ({ name, href, onClick }) => {
|
||||
const { asPath } = useRouter();
|
||||
@@ -61,7 +62,7 @@ export const Hamburger = () => {
|
||||
isOpen={open}
|
||||
onRequestClose={() => setOpen(false)}
|
||||
aria={{ modal: true }}
|
||||
overlayClassName="header-modal__overlay"
|
||||
overlayClassName={styles.modalOverlay}
|
||||
contentLabel="Meny"
|
||||
className="bg-surface-default absolute left-4 top-0 right-4 block rounded py-14 px-11 sm:right-6 sm:left-auto sm:w-96 sm:max-w-[90%] lg:hidden"
|
||||
>
|
||||
@@ -70,7 +71,10 @@ export const Hamburger = () => {
|
||||
<Button
|
||||
variant="tertiary"
|
||||
onClick={() => setOpen(false)}
|
||||
className="aksel-tertiary-button absolute top-2 right-2"
|
||||
className={cl(
|
||||
styles.akselTertiaryButton,
|
||||
"absolute top-2 right-2"
|
||||
)}
|
||||
icon={<Close title="lukk meny" className="h-5 w-5" />}
|
||||
/>
|
||||
<LinkElement
|
||||
|
||||
@@ -6,7 +6,7 @@ import { useRouter } from "next/router";
|
||||
import { Hamburger } from "components/layout/header/Hamburger";
|
||||
import { GlobalSearch } from "./search";
|
||||
|
||||
const LinkElement = ({ name, href, prefetch = true }) => {
|
||||
const LinkElement = ({ name, href, prefetch = undefined }) => {
|
||||
const { asPath } = useRouter();
|
||||
return (
|
||||
<li>
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
.modalOverlay {
|
||||
z-index: var(--a-z-index-modal);
|
||||
@apply bg-surface-backdrop fixed inset-0 grid place-items-center lg:hidden;
|
||||
}
|
||||
|
||||
.modalOverlaySearch {
|
||||
z-index: 3000;
|
||||
@apply bg-surface-backdrop fixed inset-0 grid place-items-center;
|
||||
}
|
||||
|
||||
.akselTertiaryButton {
|
||||
--a-text-action: var(--a-deepblue-800);
|
||||
--a-text-action-on-action-subtle: var(--a-deepblue-800);
|
||||
}
|
||||
@@ -117,7 +117,7 @@ export function IconHit({
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div className="hidden aspect-square w-24 sm:block">
|
||||
<div className="hidden aspect-square w-24 place-content-center sm:grid">
|
||||
<Image
|
||||
src={`https://raw.githubusercontent.com/navikt/aksel/main/%40navikt/aksel-icons/icons/${hit.item.name}.svg`}
|
||||
decoding="sync"
|
||||
|
||||
@@ -14,6 +14,7 @@ import { useRouter } from "next/router";
|
||||
import React, { useCallback, useEffect, useRef, useState } from "react";
|
||||
import ReactModal from "react-modal";
|
||||
import { Group, GroupComponent } from "./Group";
|
||||
import styles from "../header.module.css";
|
||||
|
||||
/**
|
||||
* https://www.figma.com/file/71Sm1h6VV23lbBbQ3CJJ9t/Aksel-v2?node-id=1861%3A186079&t=ARKgZcA6B7ysmG3V-0
|
||||
@@ -212,7 +213,7 @@ export const GlobalSearch = () => {
|
||||
aria={{ modal: true }}
|
||||
contentLabel="Søk"
|
||||
className="bg-surface-default absolute inset-0 block w-screen overflow-x-auto px-4 md:px-6"
|
||||
overlayClassName="header-modal__overlay-search"
|
||||
overlayClassName={styles.modalOverlaySearch}
|
||||
>
|
||||
<div className="search-grid-wrapper relative mx-auto max-w-4xl gap-4 gap-x-8 py-24">
|
||||
<button
|
||||
|
||||
@@ -69,6 +69,7 @@ const AkselPrinsippTemplate = ({
|
||||
id="hovedinnhold"
|
||||
className={cl("aksel-artikkel pt-4 focus:outline-none", {
|
||||
"bg-white": mainPage,
|
||||
"bg-surface-subtle": !mainPage,
|
||||
})}
|
||||
>
|
||||
<article className="overflow-x-clip">
|
||||
|
||||
@@ -1,138 +0,0 @@
|
||||
import { SanityT } from "@/lib";
|
||||
import { SanityBlockContent } from "@/sanity-block";
|
||||
import { ExternalLink } from "@navikt/ds-icons";
|
||||
import { BodyShort, Heading } from "@navikt/ds-react";
|
||||
import IntroSeksjon from "components/sanity-modules/IntroSeksjon";
|
||||
import Head from "next/head";
|
||||
import { dateStr, Feedback, TableOfContents } from "../..";
|
||||
|
||||
const kodepakker = {
|
||||
"ds-react": {
|
||||
title: "@navikt/ds-react",
|
||||
git: "https://github.com/navikt/nav-frontend-moduler/tree/master/%40navikt/core",
|
||||
},
|
||||
"ds-css": {
|
||||
title: "@navikt/ds-css",
|
||||
git: "https://github.com/navikt/nav-frontend-moduler/tree/master/%40navikt/core",
|
||||
},
|
||||
"ds-react-internal": {
|
||||
title: "@navikt/ds-react-internal",
|
||||
git: "https://github.com/navikt/nav-frontend-moduler/tree/master/%40navikt/internal",
|
||||
},
|
||||
"ds-css-internal": {
|
||||
title: "@navikt/ds-css-internal",
|
||||
git: "https://github.com/navikt/nav-frontend-moduler/tree/master/%40navikt/internal",
|
||||
},
|
||||
"ds-icons": {
|
||||
title: "@navikt/ds-reaciconst",
|
||||
git: "https://github.com/navikt/nav-frontend-moduler/tree/master/%40navikt/core",
|
||||
},
|
||||
"ds-tokens": {
|
||||
title: "@navikt/ds-tokens",
|
||||
git: "https://github.com/navikt/nav-frontend-moduler/tree/master/%40navikt/core",
|
||||
},
|
||||
"ds-tailwind": {
|
||||
title: "@navikt/ds-tailwind",
|
||||
git: "https://github.com/navikt/nav-frontend-moduler/tree/master/%40navikt/core",
|
||||
},
|
||||
};
|
||||
|
||||
const KomponentArtikkelTemplate = ({
|
||||
data,
|
||||
title,
|
||||
}: {
|
||||
data: SanityT.Schema.komponent_artikkel;
|
||||
title: string;
|
||||
}): JSX.Element => {
|
||||
const pack = data?.kodepakker?.length > 0 && kodepakker[data?.kodepakker[0]];
|
||||
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<title>{data?.heading ? `${data?.heading} - ${title}` : title}</title>
|
||||
<meta
|
||||
property="og:title"
|
||||
content={`${data.heading} - Designsystemet`}
|
||||
/>
|
||||
</Head>
|
||||
<div className="content-box">
|
||||
<div className="pt-8">
|
||||
<div className="flex flex-wrap gap-2"></div>
|
||||
<Heading
|
||||
size="xlarge"
|
||||
level="1"
|
||||
spacing
|
||||
className="text-deepblue-800 flex flex-wrap items-center gap-4"
|
||||
>
|
||||
{data.heading}
|
||||
</Heading>
|
||||
<BodyShort
|
||||
as="div"
|
||||
size="small"
|
||||
className="mb-4 flex flex-wrap items-center justify-start gap-x-4 gap-y-3"
|
||||
>
|
||||
<BodyShort
|
||||
size="small"
|
||||
as="span"
|
||||
className="text-text-subtle flex items-center"
|
||||
>
|
||||
{`Oppdatert ${dateStr(data._updatedAt)}`}
|
||||
</BodyShort>
|
||||
</BodyShort>
|
||||
<BodyShort
|
||||
as="span"
|
||||
size="small"
|
||||
className="text-text-subtle flex gap-4"
|
||||
>
|
||||
{pack && (
|
||||
<>
|
||||
<a
|
||||
target="_blank"
|
||||
rel="noreferrer noopener"
|
||||
href={`https://yarnpkg.com/package/${pack.title}`}
|
||||
className="hover:text-text-default focus:text-text-on-inverted focus:shadow-focus flex items-center gap-1 underline hover:no-underline focus:bg-blue-800 focus:no-underline focus:outline-none"
|
||||
>
|
||||
Yarn
|
||||
<ExternalLink title="Gå til yarn pakke" />
|
||||
</a>
|
||||
<a
|
||||
target="_blank"
|
||||
rel="noreferrer noopener"
|
||||
href={pack.git}
|
||||
className="hover:text-text-default focus:text-text-on-inverted focus:shadow-focus flex items-center gap-1 underline hover:no-underline focus:bg-blue-800 focus:no-underline focus:outline-none"
|
||||
>
|
||||
Kode
|
||||
<ExternalLink title="Gå til github-kode" />
|
||||
</a>
|
||||
</>
|
||||
)}
|
||||
|
||||
{data.figma_link && (
|
||||
<a
|
||||
target="_blank"
|
||||
rel="noreferrer noopener"
|
||||
href={data.figma_link}
|
||||
className="hover:text-text-default focus:text-text-on-inverted focus:shadow-focus flex items-center gap-1 underline hover:no-underline focus:bg-blue-800 focus:no-underline focus:outline-none"
|
||||
>
|
||||
Figma
|
||||
<ExternalLink title="Åpne i Figma" />
|
||||
</a>
|
||||
)}
|
||||
</BodyShort>
|
||||
</div>
|
||||
</div>
|
||||
<div className="relative flex max-w-full md:max-w-7xl">
|
||||
<TableOfContents changedState={data["content"]} hideToc={false} />
|
||||
<div className="content-box">
|
||||
<div className="mt-12">
|
||||
<IntroSeksjon node={data.intro} />
|
||||
<SanityBlockContent blocks={data["content"]} />
|
||||
</div>
|
||||
<Feedback docId={data?._id} docType={data?._type} />
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default KomponentArtikkelTemplate;
|
||||
@@ -4,12 +4,10 @@ import React from "react";
|
||||
|
||||
export const NoSidebarLayout = ({
|
||||
children,
|
||||
variant = "artikkel",
|
||||
aside = null,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
aside?: React.ReactNode;
|
||||
variant?: "forside" | "artikkel" | "blogg";
|
||||
}) => {
|
||||
return (
|
||||
<>
|
||||
@@ -17,7 +15,7 @@ export const NoSidebarLayout = ({
|
||||
<main
|
||||
tabIndex={-1}
|
||||
id="hovedinnhold"
|
||||
className="aksel-artikkel bg-gray-50 pt-4 focus:outline-none"
|
||||
className="aksel-artikkel bg-surface-subtle pt-4 focus:outline-none"
|
||||
>
|
||||
<div className="max-w-aksel mx-auto px-4 sm:w-[90%]">
|
||||
<article className="pt-12 pb-16 md:pb-32">{children}</article>
|
||||
|
||||
@@ -6,7 +6,7 @@ import React from "react";
|
||||
const KBD = (props: React.HTMLAttributes<HTMLElement>) => (
|
||||
<kbd
|
||||
className={cl(
|
||||
"my-0 mx-1 inline-block min-w-[2rem] rounded-md border border-gray-300 bg-gray-100 py-[1px] px-2 text-center font-mono text-sm text-gray-900"
|
||||
"mx-05 my-0 inline-block min-w-[2rem] rounded-md border border-gray-300 bg-gray-100 py-[1px] px-2 text-center font-mono text-sm text-gray-900"
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
@@ -26,8 +26,11 @@ const UuSeksjon = ({
|
||||
{s
|
||||
.trim()
|
||||
.split(" ")
|
||||
.map((x) => (
|
||||
<KBD key={x}>{x}</KBD>
|
||||
.map((x, i, arr) => (
|
||||
<React.Fragment key={x}>
|
||||
<KBD>{x}</KBD>
|
||||
{i !== arr.length - 1 && <span>+</span>}
|
||||
</React.Fragment>
|
||||
))}
|
||||
</span>
|
||||
);
|
||||
@@ -36,7 +36,7 @@ const mockData: SanityT.Schema.tips & { _key: string } = {
|
||||
|
||||
export const TipsDemo = () => <Tips node={mockData as any} />;
|
||||
export const TipsDemoAksel = () => (
|
||||
<div className="aksel-artikkel">
|
||||
<div className="aksel-artikkel bg-surface-subtle">
|
||||
<Tips node={mockData as any} />
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
html.overflow-hidden > body.ReactModal__Body--open {
|
||||
overflow: unset;
|
||||
}
|
||||
|
||||
.override-secondary-button {
|
||||
.overrideSecondaryButton {
|
||||
--ac-button-secondary-text: var(--a-deepblue-500);
|
||||
--ac-button-secondary-bg: var(--a-surface-default);
|
||||
--ac-button-secondary-border: var(--a-deepblue-500);
|
||||
@@ -11,13 +7,8 @@ html.overflow-hidden > body.ReactModal__Body--open {
|
||||
--ac-button-secondary-focus-border: var(--a-deepblue-500);
|
||||
}
|
||||
|
||||
.override-secondary-button-active {
|
||||
.overrideSecondaryButtonActive {
|
||||
--ac-button-secondary-text: var(--a-text-on-action);
|
||||
--ac-button-secondary-hover-bg: var(--a-deepblue-700);
|
||||
--ac-button-secondary-hover-text: var(--a-text-on-action);
|
||||
}
|
||||
|
||||
.aksel-tertiary-button {
|
||||
--a-text-action: var(--a-deepblue-800);
|
||||
--a-text-action-on-action-subtle: var(--a-deepblue-800);
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import cl from "clsx";
|
||||
import { useRouter } from "next/router";
|
||||
import { useCallback, useContext, useEffect, useRef, useState } from "react";
|
||||
import { AmplitudeEvents, IdContext, logAmplitudeEvent } from "../utils";
|
||||
import styles from "./feedback.module.css";
|
||||
|
||||
const Feedback = ({
|
||||
docId,
|
||||
@@ -171,14 +172,17 @@ const Feedback = ({
|
||||
</Heading>
|
||||
<div
|
||||
className={cl("flex w-full gap-4", {
|
||||
"override-secondary-button justify-start": akselFeedback,
|
||||
"justify-start": akselFeedback,
|
||||
[styles.overrideSecondaryButton]: akselFeedback,
|
||||
"justify-center": center,
|
||||
})}
|
||||
>
|
||||
<Button
|
||||
variant="secondary"
|
||||
className={cl({
|
||||
"override-secondary-button-active bg-deepblue-800 text-text-on-inverted ring-deepblue-800 focus-visible:shadow-focus ring-2 ring-inset focus-visible:ring-1 focus-visible:ring-white":
|
||||
"bg-deepblue-800 text-text-on-inverted ring-deepblue-800 focus-visible:shadow-focus ring-2 ring-inset focus-visible:ring-1 focus-visible:ring-white":
|
||||
activeState === HelpfulArticleEnum.JA,
|
||||
[styles.overrideSecondaryButtonActive]:
|
||||
activeState === HelpfulArticleEnum.JA,
|
||||
})}
|
||||
onClick={() =>
|
||||
@@ -192,7 +196,9 @@ const Feedback = ({
|
||||
<Button
|
||||
variant="secondary"
|
||||
className={cl({
|
||||
"override-secondary-button-active bg-deepblue-800 text-text-on-inverted ring-deepblue-800 focus-visible:shadow-focus ring-2 ring-inset focus-visible:ring-1 focus-visible:ring-white":
|
||||
"bg-deepblue-800 text-text-on-inverted ring-deepblue-800 focus-visible:shadow-focus ring-2 ring-inset focus-visible:ring-1 focus-visible:ring-white":
|
||||
activeState === HelpfulArticleEnum.NEI,
|
||||
[styles.overrideSecondaryButtonActive]:
|
||||
activeState === HelpfulArticleEnum.NEI,
|
||||
})}
|
||||
onClick={() =>
|
||||
@@ -206,7 +212,9 @@ const Feedback = ({
|
||||
<Button
|
||||
variant="secondary"
|
||||
className={cl({
|
||||
"override-secondary-button-active bg-deepblue-800 text-text-on-inverted ring-deepblue-800 focus-visible:shadow-focus ring-2 ring-inset focus-visible:ring-1 focus-visible:ring-white":
|
||||
"bg-deepblue-800 text-text-on-inverted ring-deepblue-800 focus-visible:shadow-focus ring-2 ring-inset focus-visible:ring-1 focus-visible:ring-white":
|
||||
activeState === HelpfulArticleEnum.MISC,
|
||||
[styles.overrideSecondaryButtonActive]:
|
||||
activeState === HelpfulArticleEnum.MISC,
|
||||
})}
|
||||
onClick={() =>
|
||||
|
||||
@@ -93,7 +93,7 @@ export const IconPage = ({ name }: { name: string }) => {
|
||||
/>
|
||||
<meta
|
||||
property="og:image"
|
||||
content="https://aksel.nav.no/images/og/og-ikoner.png"
|
||||
content="https://aksel.nav.no/images/og/ikoner/og-ikoner.png"
|
||||
key="ogimage"
|
||||
/>
|
||||
</Head>
|
||||
@@ -252,7 +252,7 @@ export const IconPage = ({ name }: { name: string }) => {
|
||||
closeButton={false}
|
||||
aria-modal
|
||||
aria-label={`${name} ikon`}
|
||||
className="bg-surface-default focus-visible:shadow-focus z-modal absolute block h-full overflow-y-auto rounded py-6 px-6 focus:outline-none"
|
||||
className="bg-surface-default focus-visible:shadow-focus z-modal absolute block h-full overflow-y-auto rounded py-6 px-2 focus:outline-none sm:px-6"
|
||||
>
|
||||
{name && <IconSidebar name={name} focusRef={focusRef} />}
|
||||
</Modal>
|
||||
|
||||
@@ -63,7 +63,7 @@ export const IconSidebar = ({
|
||||
|
||||
useEffect(() => {
|
||||
if (wrapperRef.current) {
|
||||
wrapperRef.current.focus();
|
||||
wrapperRef.current.focus({ preventScroll: true });
|
||||
}
|
||||
}, [name]);
|
||||
|
||||
@@ -95,7 +95,7 @@ export const IconSidebar = ({
|
||||
return (
|
||||
<section
|
||||
ref={wrapperRef}
|
||||
className="animate-fadeIn min-h-96 h-fit w-full basis-1/3 px-6 py-8 focus:outline-none lg:sticky lg:top-16"
|
||||
className="animate-fadeIn min-h-96 h-fit w-full basis-1/3 py-8 focus:outline-none sm:px-6 lg:sticky lg:top-16"
|
||||
tabIndex={-1}
|
||||
aria-labelledby="icon-details"
|
||||
>
|
||||
|
||||
@@ -34,7 +34,7 @@ export const TitleLinks = () => (
|
||||
</DsLink>
|
||||
</NextLink>
|
||||
</li>
|
||||
{/* <Divider />
|
||||
<Divider />
|
||||
<li className="flex items-center gap-1 leading-none">
|
||||
<DsLink
|
||||
className="text-text-default no-underline hover:underline"
|
||||
@@ -46,12 +46,10 @@ export const TitleLinks = () => (
|
||||
format: "zip",
|
||||
});
|
||||
}}
|
||||
target="_blank"
|
||||
rel="noreferrer noopener"
|
||||
>
|
||||
<DownloadIcon className="text-2xl" aria-hidden /> Last ned ikonpakke
|
||||
</DsLink>
|
||||
</li> */}
|
||||
</li>
|
||||
<Divider />
|
||||
<li className="flex items-center gap-2 leading-none">
|
||||
<NextLink
|
||||
|
||||
@@ -20,8 +20,8 @@ export enum AmplitudeEvents {
|
||||
|
||||
export const initAmplitude = () => {
|
||||
if (amplitude && !(typeof window === "undefined")) {
|
||||
amplitude.getInstance().init("default", "", {
|
||||
apiEndpoint: "amplitude.nav.no/collect-auto",
|
||||
amplitude.getInstance().init("1a9a84a5e557ac9635a250bc27d75030", "", {
|
||||
apiEndpoint: "amplitude.nav.no/collect",
|
||||
saveEvents: false,
|
||||
includeUtm: true,
|
||||
includeReferrer: true,
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
import { GetServerSidePropsContext, NextApiRequest } from "next";
|
||||
import { isDevelopment } from "..";
|
||||
import { tokenIsValid } from "./azure";
|
||||
|
||||
export function getBearerToken(req) {
|
||||
return req.headers?.authorization?.substring("Bearer ".length);
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to authenticate Next.JS pages. Assumes application is behind
|
||||
* Wonderwall (https://doc.nais.io/security/auth/idporten/sidecar/).
|
||||
*/
|
||||
export const isValidated = async (context: GetServerSidePropsContext) => {
|
||||
if (isDevelopment()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const request = context.req;
|
||||
|
||||
if (request == null) {
|
||||
throw new Error("Context is missing request. This should not happen");
|
||||
}
|
||||
|
||||
const bearerToken = getBearerToken(request);
|
||||
|
||||
if (!bearerToken) {
|
||||
process.env.NODE_ENV !== "production" && console.log("No bearer token");
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
await tokenIsValid(bearerToken);
|
||||
return true;
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
export const isValidatedApi = async (req: NextApiRequest) => {
|
||||
if (isDevelopment()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (req == null) {
|
||||
throw new Error("No request given, this should not happend");
|
||||
}
|
||||
|
||||
const bearerToken = getBearerToken(req);
|
||||
|
||||
if (!bearerToken) {
|
||||
/* console.log("No bearer token"); */
|
||||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
const payload = await tokenIsValid(bearerToken);
|
||||
return payload;
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
return null;
|
||||
}
|
||||
};
|
||||
@@ -1,47 +0,0 @@
|
||||
import { createRemoteJWKSet, errors, jwtVerify } from "jose";
|
||||
import {
|
||||
FlattenedJWSInput,
|
||||
GetKeyFunction,
|
||||
JWSHeaderParameters,
|
||||
JWTPayload,
|
||||
} from "jose/dist/types/types";
|
||||
import getConfig from "next/config";
|
||||
const { serverRuntimeConfig } = getConfig();
|
||||
|
||||
const clientId = serverRuntimeConfig.azureAppClientId;
|
||||
const issuer = serverRuntimeConfig.azureAppIssuer;
|
||||
const jwksUri = serverRuntimeConfig.azureJwksUri;
|
||||
|
||||
let remoteJWKSet: GetKeyFunction<JWSHeaderParameters, FlattenedJWSInput>;
|
||||
|
||||
export const opprettRemoteJWKSet = () => {
|
||||
const jwksUrl = new URL(jwksUri);
|
||||
remoteJWKSet = createRemoteJWKSet(jwksUrl);
|
||||
};
|
||||
|
||||
export const tokenIsValid = async (
|
||||
accessToken: string
|
||||
): Promise<JWTPayload> => {
|
||||
try {
|
||||
if (!remoteJWKSet) opprettRemoteJWKSet();
|
||||
|
||||
const { payload } = await jwtVerify(accessToken, remoteJWKSet, {
|
||||
audience: clientId,
|
||||
issuer: issuer,
|
||||
});
|
||||
|
||||
return Promise.resolve(payload);
|
||||
} catch (error) {
|
||||
let feilmelding: string;
|
||||
if (error instanceof errors.JWTExpired) {
|
||||
feilmelding = "Token har utløpt";
|
||||
} else if (error instanceof errors.JWTInvalid) {
|
||||
feilmelding = "Payload i tokenet må være gyldig JSON!";
|
||||
} else if (error instanceof errors.JWTClaimValidationFailed) {
|
||||
feilmelding = `Token mottatt har ugyldig claim ${error.claim}`;
|
||||
} else {
|
||||
feilmelding = "Token er ugyldig";
|
||||
}
|
||||
return Promise.reject(new Error(feilmelding));
|
||||
}
|
||||
};
|
||||
@@ -2,7 +2,6 @@ export * from "./sanity/queries";
|
||||
export * from "./sanity/santiy";
|
||||
export * from "./types/types";
|
||||
export * from "./types/search";
|
||||
export * from "./auth/auth";
|
||||
export type { default as SanityT } from "./types/schema";
|
||||
|
||||
export function isDevelopment(): boolean {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||
/* eslint-disable no-undef */
|
||||
const path = require("path");
|
||||
|
||||
const withBundleAnalyzer = require("@next/bundle-analyzer")({
|
||||
enabled: process.env.ANALYZE === "true",
|
||||
@@ -17,7 +18,7 @@ const ContentSecurityPolicy = `
|
||||
connect-src 'self' ${cdnUrl} https://raw.githubusercontent.com/navikt/ wss://hnbe3yhs.api.sanity.io cdn.sanity.io *.api.sanity.io https://amplitude.nav.no https://sentry.gc.nav.no https://in2.taskanalytics.com/03346;
|
||||
frame-ancestors localhost:3333 'self' localhost:3000 https://verktoykasse.sanity.studio/;
|
||||
media-src 'self' ${cdnUrl} cdn.sanity.io;
|
||||
frame-src 'self' https://web.microsoftstream.com localhost:3000 https://aksel.dev.nav.no/;
|
||||
frame-src 'self' https://web.microsoftstream.com localhost:3000 https://aksel.dev.nav.no/ https://aksel.ekstern.dev.nav.no;
|
||||
`;
|
||||
|
||||
const securityHeaders = [
|
||||
@@ -56,14 +57,6 @@ const useCdn = process.env.USE_CDN_ASSETS === "true";
|
||||
const config = () =>
|
||||
withBundleAnalyzer({
|
||||
transpilePackages: ["@navikt/ds-tokens"],
|
||||
serverRuntimeConfig: {
|
||||
// Will only be available on the server side
|
||||
azureAppClientId: process.env.AZURE_APP_CLIENT_ID,
|
||||
azureJwksUri: process.env.AZURE_OPENID_CONFIG_JWKS_URI,
|
||||
azureAppIssuer: process.env.AZURE_OPENID_CONFIG_ISSUER,
|
||||
azureAppWellKnownUrl: process.env.AZURE_APP_WELL_KNOWN_URL,
|
||||
azureAppJWK: process.env.AZURE_APP_JWK,
|
||||
},
|
||||
publicRuntimeConfig: {
|
||||
NEXT_PUBLIC_TEST: process.env.NEXT_PUBLIC_TEST,
|
||||
},
|
||||
@@ -118,6 +111,10 @@ const config = () =>
|
||||
domains: ["cdn.sanity.io", "raw.githubusercontent.com"],
|
||||
dangerouslyAllowSVG: true,
|
||||
},
|
||||
output: "standalone",
|
||||
experimental: {
|
||||
outputFileTracingRoot: path.join(__dirname, "../../"),
|
||||
},
|
||||
});
|
||||
|
||||
if (process.env.NODE_ENV === "production") {
|
||||
|
||||
@@ -6,8 +6,10 @@
|
||||
"author": "Aksel | NAV designsystem team",
|
||||
"scripts": {
|
||||
"dev": "next",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"build:old": "next build",
|
||||
"build": "next build && yarn cp:assets",
|
||||
"start": "cd .next/standalone/aksel.nav.no/website && node server.js",
|
||||
"cp:assets": "cross-env cp -R public .next/standalone/aksel.nav.no/website/ && cross-env cp -R .next/static .next/standalone/aksel.nav.no/website/.next/static",
|
||||
"e2e": "yarn build && NEXT_PUBLIC_TEST=true yarn start-server-and-test start http://localhost:3000 playwright",
|
||||
"e2e:full": "yarn build && ts-node ./e2e/genUrls.ts && NEXT_PUBLIC_TEST=true FULL_TEST=true yarn start-server-and-test start http://localhost:3000 playwright",
|
||||
"e2e:ci": "NEXT_PUBLIC_TEST=true yarn start-server-and-test start http://localhost:3000 playwright",
|
||||
@@ -16,7 +18,7 @@
|
||||
"update:tokens": "ts-node --project tsconfig.tsnode.json ./scripts/update-tokens",
|
||||
"update:eksempler": "ts-node --project tsconfig.tsnode.json ./scripts/examples/update-sanity",
|
||||
"update:sanity": "yarn update:tokens && yarn update:props && yarn update:eksempler",
|
||||
"analyze": "cross-env ANALYZE=true next build",
|
||||
"analyze": "cross-env ANALYZE=true yarn build",
|
||||
"test": "jest",
|
||||
"playwright": "playwright test",
|
||||
"test:watch": "jest --watch",
|
||||
@@ -33,7 +35,7 @@
|
||||
"@sanity/preview-kit": "^1.3.4",
|
||||
"@sanity/table": "1.0.1",
|
||||
"@sanity/ui": "^1.3.0",
|
||||
"@sanity/vision": "3.5.1",
|
||||
"@sanity/vision": "3.6.0",
|
||||
"@svgr/webpack": "^5.5.0",
|
||||
"amplitude-js": "^8.21.5",
|
||||
"boring-avatars": "1.7.0",
|
||||
@@ -42,7 +44,6 @@
|
||||
"copy-to-clipboard": "^3.3.1",
|
||||
"date-fns": "2.29.3",
|
||||
"fuse.js": "^6.6.2",
|
||||
"jose": "4.10.0",
|
||||
"lodash": "^4.17.21",
|
||||
"next": "^13.2.1",
|
||||
"next-sanity": "^4.1.5",
|
||||
@@ -52,10 +53,11 @@
|
||||
"react-dom": "^18.0.0",
|
||||
"react-modal": "3.15.1",
|
||||
"recharts": "^2.2.0",
|
||||
"sanity": "3.5.1",
|
||||
"sanity": "3.6.0",
|
||||
"sanity-plugin-asset-source-unsplash": "^1.0.6",
|
||||
"sanity-plugin-iframe-pane": "^2.2.0",
|
||||
"sanity-plugin-media": "^2.0.5",
|
||||
"sharp": "0.31.3",
|
||||
"sitemap": "^7.0.0",
|
||||
"styled-components": "^5.2",
|
||||
"swr": "^1.1.2",
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
import { isValidatedApi } from "@/lib";
|
||||
import type { NextApiRequest, NextApiResponse } from "next";
|
||||
|
||||
export default async (
|
||||
req: NextApiRequest,
|
||||
res: NextApiResponse
|
||||
): Promise<void> => {
|
||||
const payload = await isValidatedApi(req);
|
||||
|
||||
const user = payload
|
||||
? { name: payload?.name, mail: payload?.preferred_username }
|
||||
: {};
|
||||
|
||||
res.status(200).json({
|
||||
status: payload ? 200 : 401,
|
||||
...user,
|
||||
});
|
||||
};
|
||||
@@ -25,10 +25,7 @@ const Example = () => {
|
||||
end={p.end}
|
||||
status={p.status}
|
||||
icon={p.icon}
|
||||
onSelectPeriod={() => {
|
||||
setActivePeriod(p.id);
|
||||
p?.onSelectPeriod?.();
|
||||
}}
|
||||
onSelectPeriod={() => setActivePeriod(p.id)}
|
||||
isActive={activePeriod && activePeriod === p.id}
|
||||
/>
|
||||
);
|
||||
@@ -43,10 +40,7 @@ const Example = () => {
|
||||
end={p.end}
|
||||
status={p.status}
|
||||
icon={p.icon}
|
||||
onSelectPeriod={() => {
|
||||
setActivePeriod(p.id);
|
||||
p?.onSelectPeriod?.();
|
||||
}}
|
||||
onSelectPeriod={() => setActivePeriod(p.id)}
|
||||
isActive={activePeriod && activePeriod === p.id}
|
||||
/>
|
||||
);
|
||||
@@ -138,6 +132,7 @@ export default withDsExample(Example);
|
||||
/* Storybook story */
|
||||
export const Demo = {
|
||||
render: Example,
|
||||
desc: "'onSelectPeriod' og 'isActive' lar deg velge aktive perioder for visning av ekstra informasjon en annen plass i UI.",
|
||||
};
|
||||
|
||||
export const args = {
|
||||
|
||||
@@ -4,7 +4,7 @@ import { getClient } from "@/sanity-client";
|
||||
import { Heading, Ingress } from "@navikt/ds-react";
|
||||
import cl from "clsx";
|
||||
import { WithSidebar } from "components/layout/page-templates/WithSidebar";
|
||||
import ComponentOverview from "components/sanity-modules/component-overview";
|
||||
import ComponentOverview from "components/sanity-modules/ComponentOverview";
|
||||
import { PreviewSuspense } from "next-sanity/preview";
|
||||
import Head from "next/head";
|
||||
import { lazy } from "react";
|
||||
|
||||
@@ -11,7 +11,7 @@ import { SanityBlockContent } from "@/sanity-block";
|
||||
import { getClient } from "@/sanity-client";
|
||||
import { BodyShort, Detail, Heading } from "@navikt/ds-react";
|
||||
import { WithSidebar } from "components/layout/page-templates/WithSidebar";
|
||||
import ComponentOverview from "components/sanity-modules/component-overview";
|
||||
import ComponentOverview from "components/sanity-modules/ComponentOverview";
|
||||
import IntroSeksjon from "components/sanity-modules/IntroSeksjon";
|
||||
import { StatusTag } from "components/website-modules/StatusTag";
|
||||
import { SuggestionBlock } from "components/website-modules/suggestionblock";
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
StorybookIcon,
|
||||
} from "components/assets";
|
||||
import { WithSidebar } from "components/layout/page-templates/WithSidebar";
|
||||
import ComponentOverview from "components/sanity-modules/component-overview";
|
||||
import ComponentOverview from "components/sanity-modules/ComponentOverview";
|
||||
import { SuggestionBlock } from "components/website-modules/suggestionblock";
|
||||
import { PreviewSuspense } from "next-sanity/preview";
|
||||
import Head from "next/head";
|
||||
|
||||
@@ -88,7 +88,7 @@ const Page = ({
|
||||
<main
|
||||
tabIndex={-1}
|
||||
id="hovedinnhold"
|
||||
className="aksel-artikkel #FEFCE9 overflow-hidden bg-[#FEFCE9] pt-[8vw] pb-16 focus:outline-none sm:pb-32"
|
||||
className="aksel-artikkel overflow-hidden bg-[#FEFCE9] pt-[8vw] pb-16 focus:outline-none sm:pb-32"
|
||||
>
|
||||
<div className="px-4">
|
||||
<div className="dynamic-wrapper-prose text-center">
|
||||
|
||||
@@ -41,7 +41,7 @@ const Page = ({
|
||||
<main
|
||||
tabIndex={-1}
|
||||
id="hovedinnhold"
|
||||
className="aksel-artikkel bg-gray-50 pt-[8vw] pb-16 focus:outline-none sm:pb-32"
|
||||
className="aksel-artikkel bg-surface-subtle pt-[8vw] pb-16 focus:outline-none sm:pb-32"
|
||||
>
|
||||
<div className="px-4">
|
||||
<div className="dynamic-wrapper-prose">
|
||||
|
||||
|
Before Width: | Height: | Size: 183 KiB After Width: | Height: | Size: 294 KiB |
@@ -1,37 +0,0 @@
|
||||
.skiplink {
|
||||
@apply z-modal bg-border-focus text-text-on-inverted absolute left-0 -translate-y-full p-4 no-underline focus-within:translate-y-0 focus-within:shadow-[inset_0_0_0_2px_white] focus-within:outline-none;
|
||||
}
|
||||
|
||||
.inline-code {
|
||||
border-radius: 0.25rem;
|
||||
background-color: rgb(226 232 240);
|
||||
padding: 0.125em 0.25em;
|
||||
font-size: calc(16em / 18); /* scale font-size with parent */
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.inline-kbd {
|
||||
white-space: nowrap;
|
||||
border-radius: 0.25rem;
|
||||
background-color: var(--a-surface-default);
|
||||
padding: 0.125rem 0.25rem;
|
||||
font-size: 1rem;
|
||||
line-height: 1.5rem;
|
||||
box-shadow: 0 0 0 1px var(--a-border-strong);
|
||||
color: var(--a-text-default);
|
||||
}
|
||||
|
||||
.aksel.ReactModal__Body--open {
|
||||
overflow: hidden;
|
||||
max-height: 100vh;
|
||||
}
|
||||
|
||||
.header-modal__overlay {
|
||||
z-index: var(--a-z-index-modal);
|
||||
@apply bg-surface-backdrop fixed inset-0 grid place-items-center lg:hidden;
|
||||
}
|
||||
|
||||
.header-modal__overlay-search {
|
||||
z-index: 3000;
|
||||
@apply bg-surface-backdrop fixed inset-0 grid place-items-center;
|
||||
}
|
||||