Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
812df58952 | ||
|
|
8fa7bdf245 | ||
|
|
993b443614 | ||
|
|
fb5d5e2662 | ||
|
|
7b467323c2 | ||
|
|
a9f626593f | ||
|
|
3e41d0e6c5 | ||
|
|
d304309962 | ||
|
|
360294cab3 | ||
|
|
cac9c5d1ed |
No files matched your search
@@ -0,0 +1,39 @@
|
||||
# This workflow will run will build the component library and the storybook, then publish it to https://navikt.github.io/Designsystemet
|
||||
|
||||
name: Publish Storybook
|
||||
|
||||
on:
|
||||
workflow_dispatch
|
||||
|
||||
jobs:
|
||||
publish-storybook:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: "0"
|
||||
token: ${{secrets.GIT_REPO}}
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 14
|
||||
- name: Node-modules cache
|
||||
uses: actions/cache@v2
|
||||
id: node-cache
|
||||
with:
|
||||
path: "**/node_modules"
|
||||
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
|
||||
- name: Install deps
|
||||
if: steps.node-cache.outputs.cache-hit != 'true'
|
||||
run: yarn install --frozen-lockfile
|
||||
- name: Gulp-build
|
||||
run: yarn boot
|
||||
- name: Building Storybook
|
||||
run: yarn build-storybook
|
||||
- name: Deploy storybook
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
personal_token: ${{secrets.GIT_REPO}}
|
||||
external_repository: navikt/designsystemet
|
||||
publish_dir: ./storybook-static
|
||||
user_name: "github-actions[bot]"
|
||||
user_email: "github-actions[bot]@users.noreply.github.com"
|
||||
@@ -1,6 +0,0 @@
|
||||
<div id="decorator-wrapper">
|
||||
<div id="decorator-header" style="display: none"></div>
|
||||
<div id="root"></div>
|
||||
<div id="docs-root"></div>
|
||||
<div id="decorator-footer" style="display: none"></div>
|
||||
</div>
|
||||
@@ -1,18 +0,0 @@
|
||||
<!-- prettier-ignore -->
|
||||
<div data-src='https://www.nav.no/dekoratoren/env?availableLanguages=[{"locale":"nb","url":"http://localhost:8088/dekoratoren/","handleInApp":true},{"locale":"en","url":"http://localhost:8088/dekoratoren/en/","handleInApp":true}]&breadcrumbs=[{"url":"https://www.nav.no/person/dittnav","title":"ditt%20nav"},%20{"url":"https://www.nav.no/person/kontakt-oss/nb/","title":"kontakt%20oss"}]' id="decorator-env"></div>
|
||||
<link href="https://www.nav.no/dekoratoren/css/client.css" rel="stylesheet" />
|
||||
<script async src="https://www.nav.no/dekoratoren/client.js"></script>
|
||||
<style>
|
||||
html,
|
||||
body,
|
||||
#decorator-wrapper {
|
||||
min-height: 100vh;
|
||||
}
|
||||
#decorator-wrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
#decorator-footer {
|
||||
margin-top: auto;
|
||||
}
|
||||
</style>
|
||||
@@ -1,8 +1,8 @@
|
||||
.navds-accordion-anchor-menu {
|
||||
padding: 1rem 0;
|
||||
padding: var(--navds-spacing-4) 0;
|
||||
}
|
||||
|
||||
.navds-accordion-anchor-menu__title {
|
||||
margin-left: 1rem;
|
||||
margin-right: 1rem;
|
||||
margin-left: var(--navds-spacing-4);
|
||||
margin-right: var(--navds-spacing-4);
|
||||
}
|
||||
@@ -32,7 +32,7 @@
|
||||
.navds-accordion-menu-item,
|
||||
.navds-accordion-menu-collapsable__button {
|
||||
display: flex;
|
||||
padding: 0.75rem 1rem;
|
||||
padding: var(--navds-spacing-3) var(--navds-spacing-4);
|
||||
line-height: 1.5rem; /* TODO: fix typography. */
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
font-size: 1.5rem;
|
||||
color: var(--navds-color-text-link);
|
||||
flex-shrink: 0;
|
||||
margin-left: 0.5rem;
|
||||
margin-left: var(--navds-spacing-2);
|
||||
}
|
||||
|
||||
.navds-accordion-menu-collapsable--open
|
||||
@@ -53,7 +53,7 @@
|
||||
.navds-accordion-menu-collapsable
|
||||
.navds-accordion-menu-collapsable
|
||||
.navds-accordion-menu-collapsable__button {
|
||||
padding-left: 2rem;
|
||||
padding-left: var(--navds-spacing-8);
|
||||
}
|
||||
|
||||
.navds-accordion-menu-collapsable
|
||||
@@ -63,7 +63,7 @@
|
||||
.navds-accordion-menu-collapsable
|
||||
.navds-accordion-menu-collapsable
|
||||
.navds-accordion-menu-collapsable__button {
|
||||
padding-left: 3rem;
|
||||
padding-left: var(--navds-spacing-12);
|
||||
}
|
||||
|
||||
.navds-accordion-menu-collapsable
|
||||
@@ -75,7 +75,7 @@
|
||||
.navds-accordion-menu-collapsable
|
||||
.navds-accordion-menu-collapsable
|
||||
.navds-accordion-menu-collapsable__button {
|
||||
padding-left: 4rem;
|
||||
padding-left: var(--navds-spacing-16);
|
||||
}
|
||||
|
||||
.navds-accordion-menu-item:focus,
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
height: 1.25em;
|
||||
transform: rotateZ(0deg);
|
||||
flex-shrink: 0;
|
||||
margin-left: 1rem;
|
||||
margin-left: var(--navds-spacing-4);
|
||||
}
|
||||
|
||||
.navds-accordion__chevron--up {
|
||||
@@ -38,7 +38,7 @@
|
||||
}
|
||||
|
||||
.navds-accordion__button {
|
||||
padding: 1rem;
|
||||
padding: var(--navds-spacing-4);
|
||||
border-radius: 4px;
|
||||
background: transparent;
|
||||
border: 0;
|
||||
@@ -57,7 +57,7 @@
|
||||
}
|
||||
|
||||
.navds-accordion__content {
|
||||
padding: 0.5rem 1rem 1rem;
|
||||
padding: var(--navds-spacing-2) var(--navds-spacing-4) var(--navds-spacing-4);
|
||||
}
|
||||
|
||||
.navds-accordion--open .navds-accordion__content {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
border: var(--navds-border-default);
|
||||
|
||||
/* Padding calculated based on 16px font for 64px tall alert */
|
||||
padding: 1.1875em 1em;
|
||||
padding: 1.1875rem var(--navds-spacing-4);
|
||||
display: grid;
|
||||
grid-auto-flow: column;
|
||||
column-gap: 0.75rem;
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
.navds-alert--small {
|
||||
border-radius: 0;
|
||||
padding: 0.5em 1em;
|
||||
padding: var(--navds-spacing-2) var(--navds-spacing-4);
|
||||
}
|
||||
|
||||
.navds-alert > svg {
|
||||
|
||||
@@ -11,13 +11,13 @@
|
||||
border-style: solid;
|
||||
border-width: 2px;
|
||||
|
||||
/* Padding calculated based on 16px font for 40px tall button */
|
||||
padding: calc(0.5625em - 2px) calc(2em - 2px);
|
||||
/* Padding calculated based on 18px font for 44px tall button */
|
||||
padding: calc(0.625rem - 2px) calc(var(--navds-spacing-8) - 2px);
|
||||
}
|
||||
|
||||
.navds-button.navds-button--small {
|
||||
.navds-button--small {
|
||||
/* Padding calculated based on 16px font for 32px tall button */
|
||||
padding: calc(0.3125em - 2px) calc(1.11em - 2px);
|
||||
padding: calc(0.3125rem - 2px) calc(var(--navds-spacing-4) - 2px);
|
||||
}
|
||||
|
||||
.navds-button:focus {
|
||||
@@ -35,14 +35,14 @@
|
||||
background-color: var(--navds-color-action-hover);
|
||||
border-width: 0;
|
||||
|
||||
/* Padding calculated based on 16px font for 40px tall button */
|
||||
padding: 0.5625em 2em;
|
||||
/* Padding calculated based on 18px font for 44px tall button */
|
||||
padding: 0.625rem var(--navds-spacing-8);
|
||||
}
|
||||
|
||||
.navds-button--primary:hover.navds-button--small,
|
||||
.navds-button--primary:active.navds-button--small {
|
||||
/* Padding calculated based on 16px font for 32px tall button */
|
||||
padding: 0.3125em 1.11em;
|
||||
padding: 0.3125rem var(--navds-spacing-4);
|
||||
}
|
||||
|
||||
.navds-button--primary:active {
|
||||
@@ -86,8 +86,8 @@
|
||||
|
||||
.navds-button--action,
|
||||
.navds-button--danger {
|
||||
/* Padding calculated based on 16px font for 40px tall button */
|
||||
padding: 0.5625em 2em;
|
||||
/* Padding calculated based on 18px font for 44px tall button */
|
||||
padding: 0.625rem var(--navds-spacing-8);
|
||||
border-width: 0;
|
||||
transform: translateY(calc(-1 * 2px));
|
||||
position: relative;
|
||||
@@ -97,7 +97,7 @@
|
||||
.navds-button--action.navds-button--small,
|
||||
.navds-button--danger.navds-button--small {
|
||||
/* Padding calculated based on 16px font for 32px tall button */
|
||||
padding: 0.3125em 1.11em;
|
||||
padding: 0.3125rem var(--navds-spacing-4);
|
||||
}
|
||||
|
||||
.navds-button--action:not(:focus),
|
||||
@@ -155,8 +155,8 @@
|
||||
|
||||
.navds-button--danger:focus,
|
||||
.navds-button--action:focus {
|
||||
/* Padding calculated based on 16px font for 40px tall button */
|
||||
padding: calc(0.5625em - 2px) calc(2em - 2px);
|
||||
/* Padding calculated based on 18px font for 44px tall button */
|
||||
padding: calc(0.625rem - 2px) calc(var(--navds-spacing-8) - 2px);
|
||||
transform: translateY(calc(-1 * 2px));
|
||||
position: relative;
|
||||
border-width: 2px;
|
||||
@@ -165,7 +165,7 @@
|
||||
.navds-button--action:focus.navds-button--small,
|
||||
.navds-button--danger:focus.navds-button--small {
|
||||
/* Padding calculated based on 16px font for 32px tall button */
|
||||
padding: calc(0.3125em - 2px) calc(1.11em - 2px);
|
||||
padding: calc(0.3125rem - 2px) calc(var(--navds-spacing-4) - 2px);
|
||||
}
|
||||
|
||||
.navds-button--action:hover:focus {
|
||||
@@ -178,8 +178,8 @@
|
||||
|
||||
.navds-button--action:hover:focus,
|
||||
.navds-button--danger:hover:focus {
|
||||
/* Padding calculated based on 16px font for 40px tall button */
|
||||
padding: 0.5625em 2em;
|
||||
/* Padding calculated based on 18px font for 44px tall button */
|
||||
padding: 0.625rem var(--navds-spacing-8);
|
||||
border-width: 0;
|
||||
color: var(--navds-color-text-inverse);
|
||||
}
|
||||
@@ -187,7 +187,7 @@
|
||||
.navds-button--action:hover:focus.navds-button--small,
|
||||
.navds-button--danger:hover:focus.navds-button--small {
|
||||
/* Padding calculated based on 16px font for 32px tall button */
|
||||
padding: 0.3125em 1.11em;
|
||||
padding: 0.3125rem var(--navds-spacing-4);
|
||||
}
|
||||
|
||||
.navds-button--action:active:focus {
|
||||
@@ -202,8 +202,8 @@
|
||||
|
||||
.navds-button--action:active:focus,
|
||||
.navds-button--danger:active:focus {
|
||||
/* Padding calculated based on 16px font for 40px tall button */
|
||||
padding: calc(0.5625em - 2px) calc(2em - 2px);
|
||||
/* Padding calculated based on 18px font for 44px tall button */
|
||||
padding: calc(0.625rem - 2px) calc(var(--navds-spacing-8) - 2px);
|
||||
transform: translateY(0);
|
||||
position: relative;
|
||||
border-width: 2px;
|
||||
@@ -213,7 +213,7 @@
|
||||
.navds-button--action:active:focus.navds-button--small,
|
||||
.navds-button--danger:active:focus.navds-button--small {
|
||||
/* Padding calculated based on 16px font for 32px tall button */
|
||||
padding: calc(0.3125em - 2px) calc(1.11em - 2px);
|
||||
padding: calc(0.3125rem - 2px) calc(var(--navds-spacing-4) - 2px);
|
||||
}
|
||||
|
||||
.navds-button--action:hover:focus:active {
|
||||
@@ -264,8 +264,8 @@
|
||||
**************************/
|
||||
|
||||
.navds-button:disabled:disabled {
|
||||
/* Padding calculated based on 16px font for 40px tall button */
|
||||
padding: 0.5625em 2em;
|
||||
/* Padding calculated based on 18px font for 44px tall button */
|
||||
padding: 0.625rem var(--navds-spacing-8);
|
||||
background-color: var(--navds-color-disabled);
|
||||
color: var(--navds-color-text-inverse);
|
||||
cursor: not-allowed;
|
||||
@@ -276,5 +276,5 @@
|
||||
|
||||
.navds-button:disabled:disabled.navds-button--small {
|
||||
/* Padding calculated based on 16px font for 32px tall button */
|
||||
padding: 0.3125em 1.11em;
|
||||
padding: 0.3125rem var(--navds-spacing-4);
|
||||
}
|
||||
@@ -2,9 +2,9 @@
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
column-gap: 0.5em;
|
||||
padding: 0.25em;
|
||||
padding: var(--navds-spacing-1);
|
||||
}
|
||||
|
||||
.navds-copy-to-clipboard__popover {
|
||||
padding: 0.25rem;
|
||||
padding: var(--navds-spacing-1);
|
||||
}
|
||||
@@ -21,7 +21,7 @@
|
||||
**************************/
|
||||
|
||||
.navds-header__title {
|
||||
padding: 0 1.5rem 0 1.5rem;
|
||||
padding: 0 var(--navds-spacing-6);
|
||||
border-right: 1px solid var(--navds-color-gray-40);
|
||||
display: flex;
|
||||
align-self: stretch;
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
.navds-header__user {
|
||||
color: var(--navds-color-text-inverse);
|
||||
padding: 0 1.5rem 0 1.5rem;
|
||||
padding: 0 var(--navds-spacing-6);
|
||||
margin-left: auto;
|
||||
border-left: 1px solid var(--navds-color-gray-40);
|
||||
display: flex;
|
||||
@@ -56,5 +56,5 @@
|
||||
}
|
||||
|
||||
.navds-header__name.navds-body-short {
|
||||
margin-right: 1rem;
|
||||
margin-right: var(--navds-spacing-4);
|
||||
}
|
||||
@@ -168,12 +168,12 @@
|
||||
}
|
||||
|
||||
.navds-layout__header-title {
|
||||
margin: 0.25rem 0.85rem;
|
||||
margin: var(--navds-spacing-1) var(--navds-spacing-3);
|
||||
}
|
||||
|
||||
@media (min-width: 448px) {
|
||||
.navds-layout__header-title {
|
||||
margin: 0.25rem 0;
|
||||
margin: var(--navds-spacing-1) 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
background-color: var(--navds-color-background);
|
||||
display: block;
|
||||
position: relative;
|
||||
padding: 1rem;
|
||||
padding: var(--navds-spacing-4);
|
||||
border-radius: 4px;
|
||||
overflow: auto;
|
||||
max-height: 100%;
|
||||
@@ -29,7 +29,7 @@
|
||||
left: 0;
|
||||
right: 0;
|
||||
background-color: var(--navds-color-modal-overlay);
|
||||
padding: 1rem;
|
||||
padding: var(--navds-spacing-4);
|
||||
}
|
||||
|
||||
.navds-modal__button--shake {
|
||||
@@ -45,9 +45,10 @@
|
||||
|
||||
.navds-modal__button {
|
||||
position: fixed;
|
||||
top: 1rem;
|
||||
right: 1rem;
|
||||
top: var(--navds-spacing-4);
|
||||
right: var(--navds-spacing-4);
|
||||
display: flex;
|
||||
padding: var(--navds-spacing-2);
|
||||
}
|
||||
|
||||
.navds-modal__button svg {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@navikt/ds-css",
|
||||
"version": "0.5.2",
|
||||
"version": "0.5.3",
|
||||
"private": false,
|
||||
"description": "Css for NAV Designsystem components",
|
||||
"author": "NAV Designsystem team",
|
||||
@@ -21,7 +21,7 @@
|
||||
"watch-css": "postcss -w --use postcss-import -o dist/index.css index.css"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@navikt/ds-tokens": "^0.3.1",
|
||||
"@navikt/ds-tokens": "^0.3.2",
|
||||
"normalize.css": "^8.0.1",
|
||||
"postcss": "^8.2.7",
|
||||
"postcss-cli": "^8.3.1",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.navds-panel {
|
||||
background-color: var(--navds-color-white);
|
||||
display: block;
|
||||
padding: 1rem;
|
||||
padding: var(--navds-spacing-4);
|
||||
border-radius: var(--navds-border-radius);
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
display: inline-block;
|
||||
|
||||
/* Padding calculated based on 16px font for 24px tall tag */
|
||||
padding: 0.0625rem 0.5rem;
|
||||
padding: 0.0625rem var(--navds-spacing-2);
|
||||
}
|
||||
|
||||
.navds-tag--error {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
}
|
||||
|
||||
.navds-title--2xl.navds-typo--spacing {
|
||||
margin-bottom: var(--navds-font-spacing-s);
|
||||
margin-bottom: var(--navds-spacing-5);
|
||||
}
|
||||
|
||||
.navds-title--xl {
|
||||
@@ -21,7 +21,7 @@
|
||||
}
|
||||
|
||||
.navds-title--xl.navds-typo--spacing {
|
||||
margin-bottom: var(--navds-font-spacing-xs);
|
||||
margin-bottom: var(--navds-spacing-4);
|
||||
}
|
||||
|
||||
.navds-title--l {
|
||||
@@ -31,7 +31,7 @@
|
||||
}
|
||||
|
||||
.navds-title--l.navds-typo--spacing {
|
||||
margin-bottom: var(--navds-font-spacing-2xs);
|
||||
margin-bottom: var(--navds-spacing-3);
|
||||
}
|
||||
|
||||
.navds-title--m {
|
||||
@@ -41,7 +41,7 @@
|
||||
}
|
||||
|
||||
.navds-title--m.navds-typo--spacing {
|
||||
margin-bottom: var(--navds-font-spacing-2xs);
|
||||
margin-bottom: var(--navds-spacing-3);
|
||||
}
|
||||
|
||||
.navds-title--s {
|
||||
@@ -51,7 +51,7 @@
|
||||
}
|
||||
|
||||
.navds-title--s.navds-typo--spacing {
|
||||
margin-bottom: var(--navds-font-spacing-2xs);
|
||||
margin-bottom: var(--navds-spacing-3);
|
||||
}
|
||||
|
||||
/* Ingress */
|
||||
@@ -63,7 +63,7 @@
|
||||
}
|
||||
|
||||
.navds-ingress.navds-typo--spacing {
|
||||
margin-bottom: var(--navds-font-spacing-3xl);
|
||||
margin-bottom: var(--navds-spacing-10);
|
||||
}
|
||||
|
||||
/* Body */
|
||||
@@ -82,11 +82,11 @@
|
||||
}
|
||||
|
||||
.navds-body-long.navds-typo--spacing {
|
||||
margin-bottom: var(--navds-font-spacing-l);
|
||||
margin-bottom: var(--navds-spacing-7);
|
||||
}
|
||||
|
||||
.navds-body-short.navds-typo--spacing {
|
||||
margin-bottom: var(--navds-font-spacing-2xs);
|
||||
margin-bottom: var(--navds-spacing-3);
|
||||
}
|
||||
|
||||
.navds-body--s {
|
||||
@@ -96,11 +96,11 @@
|
||||
}
|
||||
|
||||
.navds-body-long.navds-body--s.navds-typo--spacing {
|
||||
margin-bottom: var(--navds-font-spacing-m);
|
||||
margin-bottom: var(--navds-spacing-6);
|
||||
}
|
||||
|
||||
.navds-body-short.navds-body--s.navds-typo--spacing {
|
||||
margin-bottom: var(--navds-font-spacing-3xs);
|
||||
margin-bottom: var(--navds-spacing-2);
|
||||
}
|
||||
|
||||
/* Label */
|
||||
@@ -113,7 +113,7 @@
|
||||
}
|
||||
|
||||
.navds-label.navds-typo--spacing {
|
||||
margin-bottom: var(--navds-font-spacing-2xs);
|
||||
margin-bottom: var(--navds-spacing-3);
|
||||
}
|
||||
|
||||
.navds-label--s {
|
||||
@@ -123,7 +123,7 @@
|
||||
}
|
||||
|
||||
.navds-label--s.navds-typo--spacing {
|
||||
margin-bottom: var(--navds-font-spacing-3xs);
|
||||
margin-bottom: var(--navds-spacing-2);
|
||||
}
|
||||
|
||||
/* Small text */
|
||||
@@ -136,7 +136,7 @@
|
||||
}
|
||||
|
||||
.navds-detail.navds-typo--spacing {
|
||||
margin-bottom: var(--navds-font-spacing-3xs);
|
||||
margin-bottom: var(--navds-spacing-2);
|
||||
}
|
||||
|
||||
.navds-detail--s {
|
||||
@@ -144,5 +144,5 @@
|
||||
}
|
||||
|
||||
.navds-detail--s.navds-typo--spacing {
|
||||
margin-bottom: var(--navds-font-spacing-3xs);
|
||||
margin-bottom: var(--navds-spacing-2);
|
||||
}
|
||||
@@ -31,6 +31,22 @@
|
||||
"pageName": "Interface",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"name": "AddPeople",
|
||||
"description": "",
|
||||
"created_at": "2021-06-15T15:06:55.651Z",
|
||||
"updated_at": "2021-06-15T15:06:55.651Z",
|
||||
"pageName": "People",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"name": "AddPeopleFilled",
|
||||
"description": "",
|
||||
"created_at": "2021-06-15T15:06:55.654Z",
|
||||
"updated_at": "2021-06-15T15:06:55.654Z",
|
||||
"pageName": "People",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"name": "Applicant",
|
||||
"description": "",
|
||||
@@ -107,7 +123,7 @@
|
||||
"name": "Bag",
|
||||
"description": "",
|
||||
"created_at": "2020-07-01T10:37:42.673Z",
|
||||
"updated_at": "2021-04-09T13:32:23.625Z",
|
||||
"updated_at": "2021-06-14T07:21:59.055Z",
|
||||
"pageName": "Jobs",
|
||||
"visible": true
|
||||
},
|
||||
@@ -115,7 +131,7 @@
|
||||
"name": "BagFilled",
|
||||
"description": "",
|
||||
"created_at": "2021-01-11T13:37:55.239Z",
|
||||
"updated_at": "2021-04-09T13:32:16.648Z",
|
||||
"updated_at": "2021-06-14T07:21:59.051Z",
|
||||
"pageName": "Jobs",
|
||||
"visible": true
|
||||
},
|
||||
@@ -235,7 +251,7 @@
|
||||
"name": "Calculator",
|
||||
"description": "",
|
||||
"created_at": "2020-07-01T10:37:42.917Z",
|
||||
"updated_at": "2021-04-09T13:32:16.330Z",
|
||||
"updated_at": "2021-06-14T07:21:59.043Z",
|
||||
"pageName": "Money",
|
||||
"visible": true
|
||||
},
|
||||
@@ -347,7 +363,7 @@
|
||||
"name": "Caseworker",
|
||||
"description": "",
|
||||
"created_at": "2021-04-28T14:10:50.983Z",
|
||||
"updated_at": "2021-04-30T07:23:11.918Z",
|
||||
"updated_at": "2021-06-14T07:21:59.040Z",
|
||||
"pageName": "People",
|
||||
"visible": true
|
||||
},
|
||||
@@ -355,7 +371,7 @@
|
||||
"name": "CaseworkerFilled",
|
||||
"description": "",
|
||||
"created_at": "2021-04-28T14:11:08.212Z",
|
||||
"updated_at": "2021-04-29T18:47:14.999Z",
|
||||
"updated_at": "2021-06-14T07:21:59.036Z",
|
||||
"pageName": "People",
|
||||
"visible": true
|
||||
},
|
||||
@@ -655,6 +671,22 @@
|
||||
"pageName": "Communication",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"name": "DirectionSign",
|
||||
"description": "",
|
||||
"created_at": "2021-06-14T07:21:59.013Z",
|
||||
"updated_at": "2021-06-14T07:21:59.013Z",
|
||||
"pageName": "Jobs",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"name": "DirectionSignFilled",
|
||||
"description": "",
|
||||
"created_at": "2021-06-14T07:21:59.009Z",
|
||||
"updated_at": "2021-06-14T07:21:59.009Z",
|
||||
"pageName": "Jobs",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"name": "Disability",
|
||||
"description": "",
|
||||
@@ -2371,7 +2403,7 @@
|
||||
"name": "Service",
|
||||
"description": "",
|
||||
"created_at": "2020-07-01T10:37:42.707Z",
|
||||
"updated_at": "2021-04-09T13:32:23.429Z",
|
||||
"updated_at": "2021-06-14T07:21:59.047Z",
|
||||
"pageName": "People",
|
||||
"visible": true
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@navikt/ds-icons",
|
||||
"version": "0.3.2",
|
||||
"version": "0.3.3",
|
||||
"private": false,
|
||||
"description": "NAVs egne ikoner i SVG og React format",
|
||||
"repository": {
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<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="M18 24V14H20V24H18Z" fill="#262626"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M14 18L24 18L24 20L14 20L14 18Z" fill="#262626"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M15 5C15 6.65685 13.6569 8 12 8C10.3431 8 9 6.65685 9 5C9 3.34315 10.3431 2 12 2C13.6569 2 15 3.34315 15 5ZM17 5C17 7.76142 14.7614 10 12 10C9.23858 10 7 7.76142 7 5C7 2.23858 9.23858 0 12 0C14.7614 0 17 2.23858 17 5ZM15.2322 14.185L16.8296 12.9329C15.5735 11.7353 13.8726 11 12 11C8.13401 11 5 14.134 5 18H7C7 15.2386 9.23858 13 12 13C13.2323 13 14.3606 13.4458 15.2322 14.185Z" fill="#262626"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 735 B |
@@ -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 10C14.7614 10 17 7.76142 17 5C17 2.23858 14.7614 0 12 0C9.23858 0 7 2.23858 7 5C7 7.76142 9.23858 10 12 10ZM12 16H16L16 12.2547C14.8662 11.4638 13.4873 11 12 11C8.13401 11 5 14.134 5 18H12V16ZM18 18H14V20H18V24H20V20H24V18H20V14H18V18Z" fill="#262626"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 410 B |
@@ -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 4H10C9.44772 4 9 4.44772 9 5V6H15V5C15 4.44772 14.5523 4 14 4ZM7 5V6H1C0.447715 6 0 6.44772 0 7V12C0 12.5523 0.447716 13 1 13H11V12C11 11.4477 11.4477 11 12 11C12.5523 11 13 11.4477 13 12V13H23C23.5523 13 24 12.5523 24 12V7C24 6.44772 23.5523 6 23 6H17V5C17 3.34315 15.6569 2 14 2H10C8.34315 2 7 3.34315 7 5ZM11 15V16C11 16.5523 11.4477 17 12 17C12.5523 17 13 16.5523 13 16V15H23V20C23 21.1046 22.1046 22 21 22H3C1.89543 22 1 21.1046 1 20V15H11Z" fill="#262626"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M14 3H10C9.44772 3 9 3.44772 9 4V5H15V4C15 3.44772 14.5523 3 14 3ZM7 4V5H1C0.447715 5 0 5.44772 0 6V12C0 12.5523 0.447716 13 1 13H11V12C11 11.4477 11.4477 11 12 11C12.5523 11 13 11.4477 13 12V13H23C23.5523 13 24 12.5523 24 12V6C24 5.44772 23.5523 5 23 5H17V4C17 2.34315 15.6569 1 14 1H10C8.34315 1 7 2.34315 7 4ZM11 15V16C11 16.5523 11.4477 17 12 17C12.5523 17 13 16.5523 13 16V15H23V21C23 22.1046 22.1046 23 21 23H3C1.89543 23 1 22.1046 1 21V15H11Z" fill="#262626"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 620 B After Width: | Height: | Size: 620 B |
@@ -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="M12 8C13.6569 8 15 6.65685 15 5C15 3.34315 13.6569 2 12 2C10.3431 2 9 3.34315 9 5C9 6.65685 10.3431 8 12 8ZM12 10C14.7614 10 17 7.76142 17 5C17 2.23858 14.7614 0 12 0C9.23858 0 7 2.23858 7 5C7 7.76142 9.23858 10 12 10ZM17.0997 13.2048C15.823 11.8476 14.0105 11 12 11C8.13401 11 5 14.134 5 18H7C7 15.2386 9.23858 13 12 13C13.4582 13 14.7706 13.6242 15.6845 14.62L17.0997 13.2048ZM21.689 16.8125L17.2773 21.2243L15.4587 21.5413L15.7757 19.7227L20.1875 15.311C20.6021 14.8963 21.2744 14.8963 21.689 15.311C22.1037 15.7256 22.1037 16.3979 21.689 16.8125ZM23.1032 18.2267L18.2441 23.0859L13 24L13.9141 18.7559L18.7733 13.8968C19.969 12.7011 21.9076 12.7011 23.1032 13.8968C24.2989 15.0924 24.2989 17.031 23.1032 18.2267Z" fill="#262626"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.75 8.5C13.5449 8.5 15 7.04493 15 5.25C15 3.45507 13.5449 2 11.75 2C9.95504 2 8.49996 3.45507 8.49996 5.25C8.49996 7.04493 9.95504 8.5 11.75 8.5ZM11.75 10.5C14.6495 10.5 17 8.1495 17 5.25C17 2.35051 14.6495 0 11.75 0C8.85047 0 6.49996 2.35051 6.49996 5.25C6.49996 8.1495 8.85047 10.5 11.75 10.5ZM17.0996 13.9384C15.752 12.5057 13.8388 11.6111 11.7166 11.6111C7.63588 11.6111 4.32776 14.9192 4.32776 19H6.43887C6.43887 16.0852 8.80181 13.7222 11.7166 13.7222C13.2558 13.7222 14.6411 14.3811 15.6059 15.4322L17.0996 13.9384ZM20.8991 17.4659L16.8884 21.4766L15.2352 21.7648L15.5234 20.1116L19.534 16.1009C19.911 15.7239 20.5221 15.7239 20.8991 16.1009C21.276 16.4778 21.276 17.089 20.8991 17.4659ZM22.1847 18.7516L17.7673 23.169L13 24L13.831 19.2327L18.2484 14.8152C19.3354 13.7283 21.0977 13.7283 22.1847 14.8152C23.2717 15.9022 23.2717 17.6646 22.1847 18.7516Z" fill="#262626"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 886 B After Width: | Height: | Size: 1.0 KiB |
@@ -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="M17 4.99999C17 7.7614 14.7614 9.99998 12 9.99998C9.23855 9.99998 6.99998 7.7614 6.99998 4.99999C6.99998 2.23857 9.23855 0 12 0C14.7614 0 17 2.23857 17 4.99999ZM12 11C8.13399 11 4.99999 14.134 4.99999 18H14.6289L18.0873 14.5415C16.883 12.4263 14.6081 11 12 11ZM23.2663 15.7337C22.288 14.7554 20.7019 14.7554 19.7236 15.7337L15.4573 20L15 23.9999L19 23.5426L23.2663 19.2764C24.2446 18.2981 24.2446 16.712 23.2663 15.7337Z" fill="#262626"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M17 5.25C17 8.1495 14.6495 10.5 11.75 10.5C8.85047 10.5 6.49996 8.1495 6.49996 5.25C6.49996 2.35051 8.85047 0 11.75 0C14.6495 0 17 2.35051 17 5.25ZM11.6618 11.6111C7.58101 11.6111 4.27289 14.9192 4.27289 19H14.4367L18.0873 15.3494C16.8161 13.1167 14.4148 11.6111 11.6618 11.6111ZM22.3478 16.6522C21.4782 15.7826 20.0683 15.7826 19.1987 16.6522L15.4065 20.4444L15 24L18.5555 23.5935L22.3478 19.8013C23.2174 18.9317 23.2174 17.5218 22.3478 16.6522Z" fill="#262626"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 590 B After Width: | Height: | Size: 617 B |
@@ -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="M13 1V4H19.4648C19.7992 4 20.1114 4.1671 20.2969 4.4453L24 10L20.2969 15.5547C20.1114 15.8329 19.7992 16 19.4648 16H13V24H11V16H0.934253C0.534905 16 0.296708 15.5549 0.518226 15.2227L3.99999 10L0.518226 4.77735C0.296708 4.44507 0.534904 4 0.934252 4H11V1C11 0.447715 11.4477 0 12 0C12.5523 0 13 0.447715 13 1ZM3.73703 6L6.40369 10L3.73703 14H18.9296L21.5963 10L18.9296 6H3.73703Z" fill="#262626"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 550 B |
@@ -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="M13 1V3H11V1C11 0.447715 11.4477 0 12 0C12.5523 0 13 0.447715 13 1ZM0.518226 4.77735C0.296708 4.44507 0.534904 4 0.934252 4H19.4648C19.7992 4 20.1114 4.1671 20.2969 4.4453L24 10L20.2969 15.5547C20.1114 15.8329 19.7992 16 19.4648 16H0.934253C0.534905 16 0.296708 15.5549 0.518226 15.2227L3.99999 10L0.518226 4.77735ZM11 17V24H13V17H11Z" fill="#262626"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 505 B |
@@ -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="M10 2H14V3H13H11H10V2ZM8 3.58152V2C8 0.89543 8.89543 0 10 0H14C15.1046 0 16 0.895431 16 2V3.58152C18.9318 4.76829 21 7.64262 21 11V20C21 22.2091 19.2091 24 17 24H7C4.79086 24 3 22.2091 3 20V11C3 7.64262 5.06817 4.76829 8 3.58152ZM2 22V20V15V13C0.895431 13 0 13.8954 0 15V20C0 21.1046 0.895431 22 2 22ZM22 20V22C23.1046 22 24 21.1046 24 20V15C24 13.8954 23.1046 13 22 13V15V20ZM9 8C8.44772 8 8 8.44772 8 9C8 9.55228 8.44772 10 9 10H15C15.5523 10 16 9.55228 16 9C16 8.44772 15.5523 8 15 8H9ZM9 15H15V18H9V15ZM7 15C7 13.8954 7.89543 13 9 13H15C16.1046 13 17 13.8954 17 15V18C17 19.1046 16.1046 20 15 20H9C7.89543 20 7 19.1046 7 18V15Z" fill="#262626"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M10 2H14V3H13H11H10V2ZM8 3.58152V2C8 0.89543 8.89543 0 10 0H14C15.1046 0 16 0.895431 16 2V3.58152C18.9318 4.76829 21 7.64262 21 11V13H22C23.1046 13 24 13.8954 24 15V20C24 21.1046 23.1046 22 22 22H20.4649C19.7733 23.1956 18.4806 24 17 24H7C5.51944 24 4.22675 23.1956 3.53513 22H2C0.89543 22 0 21.1046 0 20V15C0 13.8954 0.895431 13 2 13H3V11C3 7.64262 5.06817 4.76829 8 3.58152ZM19 20V13V11C19 7.68629 16.3137 5 13 5H11C7.68629 5 5 7.68629 5 11V13V20C5 21.1046 5.89543 22 7 22H17C18.1046 22 19 21.1046 19 20ZM21 15V20H22V15H21ZM2 15H3V20H2L2 15ZM15 15H9V18H15V15ZM9 13C7.89543 13 7 13.8954 7 15V18C7 19.1046 7.89543 20 9 20H15C16.1046 20 17 19.1046 17 18V15C17 13.8954 16.1046 13 15 13H9ZM9 8C8.44772 8 8 8.44772 8 9C8 9.55228 8.44772 10 9 10H15C15.5523 10 16 9.55228 16 9C16 8.44772 15.5523 8 15 8H9Z" fill="#262626"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 802 B After Width: | Height: | Size: 970 B |
@@ -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 4H10C9.44772 4 9 4.44772 9 5V6H15V5C15 4.44772 14.5523 4 14 4ZM7 5V6H1C0.447715 6 0 6.44772 0 7V13C0 13.7403 0.402199 14.3866 1 14.7324V20C1 21.1046 1.89543 22 3 22H21C22.1046 22 23 21.1046 23 20V14.7324C23.5978 14.3866 24 13.7403 24 13V7C24 6.44772 23.5523 6 23 6H17V5C17 3.34315 15.6569 2 14 2H10C8.34315 2 7 3.34315 7 5ZM7 8H17H22V13H13V12C13 11.4477 12.5523 11 12 11C11.4477 11 11 11.4477 11 12V13H2L2 8H7ZM11 15H3L3 20H21V15H13V16C13 16.5523 12.5523 17 12 17C11.4477 17 11 16.5523 11 16V15Z" fill="#262626"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M14 3H10C9.44772 3 9 3.44772 9 4V5H15V4C15 3.44772 14.5523 3 14 3ZM7 4V5H1C0.447715 5 0 5.44772 0 6V13C0 13.7403 0.402199 14.3866 1 14.7324V21C1 22.1046 1.89543 23 3 23H21C22.1046 23 23 22.1046 23 21V14.7324C23.5978 14.3866 24 13.7403 24 13V6C24 5.44772 23.5523 5 23 5H17V4C17 2.34315 15.6569 1 14 1H10C8.34315 1 7 2.34315 7 4ZM7 7H17H22V13H13V12C13 11.4477 12.5523 11 12 11C11.4477 11 11 11.4477 11 12V13H2L2 7H7ZM11 15H3L3 21H21V15H13V16C13 16.5523 12.5523 17 12 17C11.4477 17 11 16.5523 11 16V15Z" fill="#262626"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 670 B After Width: | Height: | Size: 670 B |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@navikt/ds-react",
|
||||
"version": "0.5.2",
|
||||
"version": "0.5.4",
|
||||
"private": false,
|
||||
"description": "NAV designsystem react components",
|
||||
"author": "NAV Designsystem team",
|
||||
@@ -34,7 +34,7 @@
|
||||
"watch": "tsc --watch -p tsconfig-esm.json"
|
||||
},
|
||||
"dependencies": {
|
||||
"@navikt/ds-icons": "^0.3.2",
|
||||
"@navikt/ds-icons": "^0.3.3",
|
||||
"@popperjs/core": "^2.5.4",
|
||||
"classnames": "^2.2.6",
|
||||
"copy-to-clipboard": "^3.3.1",
|
||||
|
||||
@@ -4,7 +4,6 @@ import {
|
||||
AccordionAnchorMenuCollapsable as Collapsable,
|
||||
AccordionAnchorMenuItem as Item,
|
||||
} from "../index";
|
||||
import { useEffect } from "react";
|
||||
import {
|
||||
ProductPageLayout as Layout,
|
||||
ProductPageSection as Section,
|
||||
@@ -20,19 +19,6 @@ import { Link, HashRouter as Router } from "react-router-dom";
|
||||
export default {
|
||||
title: "ds-react/accordion-anchor-menu",
|
||||
component: { Menu },
|
||||
decorators: [
|
||||
(Story) => {
|
||||
useEffect(() => {
|
||||
document.getElementById("decorator-header").style.display = "block";
|
||||
document.getElementById("decorator-footer").style.display = "block";
|
||||
return () => {
|
||||
document.getElementById("decorator-header").style.display = "none";
|
||||
document.getElementById("decorator-footer").style.display = "none";
|
||||
};
|
||||
}, []);
|
||||
return <Story />;
|
||||
},
|
||||
],
|
||||
parameters: {
|
||||
layout: "fullscreen",
|
||||
},
|
||||
|
||||
@@ -2,24 +2,10 @@ import * as React from "react";
|
||||
import { ContentContainer } from "../index";
|
||||
import { BodyLong } from "../../index";
|
||||
import "./style.css";
|
||||
import { useEffect } from "react";
|
||||
|
||||
export default {
|
||||
title: "ds-react/content-container",
|
||||
component: ContentContainer,
|
||||
decorators: [
|
||||
(Story) => {
|
||||
useEffect(() => {
|
||||
document.getElementById("decorator-header").style.display = "block";
|
||||
document.getElementById("decorator-footer").style.display = "block";
|
||||
return () => {
|
||||
document.getElementById("decorator-header").style.display = "none";
|
||||
document.getElementById("decorator-footer").style.display = "none";
|
||||
};
|
||||
}, []);
|
||||
return <Story />;
|
||||
},
|
||||
],
|
||||
parameters: {
|
||||
layout: "fullscreen",
|
||||
backgrounds: {
|
||||
|
||||
@@ -34,7 +34,7 @@ export { Link, LinkProps } from "./link/index";
|
||||
export { Modal, ModalProps } from "./modal/index";
|
||||
export { Popover, PopoverProps } from "./popover/index";
|
||||
export { Tag, TagProps } from "./tag/index";
|
||||
export { LinkPanel, LinkPanelProps } from "./link-panel/index";
|
||||
export { LinkPanel, LinkPanelProps, LinkPanelTitle } from "./link-panel/index";
|
||||
export { Panel, PanelProps } from "./panel/index";
|
||||
export {
|
||||
Title,
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import * as React from "react";
|
||||
import { useEffect } from "react";
|
||||
import {
|
||||
ProductPageLayout as Layout,
|
||||
ProductPageSection as Section,
|
||||
@@ -14,19 +13,6 @@ import "./components/styles.css";
|
||||
export default {
|
||||
title: "ds-react/layouts/ProductPage",
|
||||
component: Layout,
|
||||
decorators: [
|
||||
(Story) => {
|
||||
useEffect(() => {
|
||||
document.getElementById("decorator-header").style.display = "block";
|
||||
document.getElementById("decorator-footer").style.display = "block";
|
||||
return () => {
|
||||
document.getElementById("decorator-header").style.display = "none";
|
||||
document.getElementById("decorator-footer").style.display = "none";
|
||||
};
|
||||
}, []);
|
||||
return <Story />;
|
||||
},
|
||||
],
|
||||
parameters: {
|
||||
layout: "fullscreen",
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@navikt/ds-tokens",
|
||||
"version": "0.3.1",
|
||||
"version": "0.3.2",
|
||||
"private": false,
|
||||
"description": "Auto-generated design-tokens for NAV design-systems framework",
|
||||
"author": "NAV Designsystem team",
|
||||
|
||||
@@ -161,17 +161,6 @@ module.exports = {
|
||||
m: { value: getFontSize(16) },
|
||||
s: { value: getFontSize(14) },
|
||||
},
|
||||
spacing: {
|
||||
"3xl": { value: getFontSize(40) },
|
||||
"2xl": { value: getFontSize(36) },
|
||||
xl: { value: getFontSize(32) },
|
||||
l: { value: getFontSize(28) },
|
||||
m: { value: getFontSize(24) },
|
||||
s: { value: getFontSize(20) },
|
||||
xs: { value: getFontSize(16) },
|
||||
"2xs": { value: getFontSize(12) },
|
||||
"3xs": { value: getFontSize(8) },
|
||||
},
|
||||
weight: {
|
||||
bold: { value: "600" },
|
||||
regular: { value: "400" },
|
||||
@@ -189,14 +178,14 @@ module.exports = {
|
||||
contentContainer: {
|
||||
maxWidth: { value: "79.5rem" },
|
||||
padding: {
|
||||
small: { value: "1rem" },
|
||||
mediumAndLarger: { value: "1.5rem" },
|
||||
small: { value: "{navds.spacing.4.value}" },
|
||||
mediumAndLarger: { value: "{navds.spacing.6.value}" },
|
||||
},
|
||||
},
|
||||
grid: {
|
||||
gutter: {
|
||||
small: { value: "1rem" },
|
||||
mediumAndLarger: { value: "1.5rem" },
|
||||
small: { value: "{navds.spacing.4.value}" },
|
||||
mediumAndLarger: { value: "{navds.spacing.6.value}" },
|
||||
},
|
||||
},
|
||||
layout: {
|
||||
@@ -205,20 +194,18 @@ module.exports = {
|
||||
gray: { value: "{navds.color.gray.10.value}" },
|
||||
},
|
||||
padding: {
|
||||
small: { value: "1rem" },
|
||||
mediumAndLarger: { value: "2.5rem" },
|
||||
small: { value: "{navds.spacing.4.value}" },
|
||||
mediumAndLarger: { value: "{navds.spacing.10.value}" },
|
||||
},
|
||||
},
|
||||
z: {
|
||||
index: {
|
||||
modal: {
|
||||
content: { value: "1010" },
|
||||
overlay: { value: "1000" },
|
||||
},
|
||||
popover: {
|
||||
default: { value: "2000" },
|
||||
arrow: { value: "-1" },
|
||||
},
|
||||
"z-index": {
|
||||
modal: {
|
||||
content: { value: "1010" },
|
||||
overlay: { value: "1000" },
|
||||
},
|
||||
popover: {
|
||||
default: { value: "2000" },
|
||||
arrow: { value: "-1" },
|
||||
},
|
||||
},
|
||||
sidebar: {
|
||||
@@ -226,5 +213,14 @@ module.exports = {
|
||||
offset: { value: "0" },
|
||||
},
|
||||
},
|
||||
spacing: Array(24)
|
||||
.fill(0)
|
||||
.reduce(
|
||||
(spacing, _, index) => ({
|
||||
...spacing,
|
||||
[index + 1]: { value: `${(index + 1) / 4}rem` },
|
||||
}),
|
||||
{}
|
||||
),
|
||||
},
|
||||
};
|
||||
@@ -1,66 +0,0 @@
|
||||
import React, { useEffect, useState, useRef } from "react";
|
||||
import { Hamburger } from "@navikt/ds-icons";
|
||||
import { InternalHeader } from "@navikt/ds-react";
|
||||
import { Link } from "gatsby";
|
||||
import { GithubLogoEm, NAVLogoWhite } from "../../assets/images/svg";
|
||||
import "./layout.css";
|
||||
import "./theme.css";
|
||||
|
||||
export const Header = ({ onClick, open, onOpenSidebar }) => {
|
||||
const [sidebarOpen, setSidebarOpen] = useState(false);
|
||||
|
||||
const handleClick = () => {
|
||||
onOpenSidebar(!sidebarOpen);
|
||||
setSidebarOpen(!sidebarOpen);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
setSidebarOpen(open);
|
||||
}, [open]);
|
||||
|
||||
const buttonRef = useRef(null);
|
||||
const prevOpen = useRef(open);
|
||||
|
||||
useEffect(() => {
|
||||
if (prevOpen.current && !open) {
|
||||
//buttonRef.current.focus();
|
||||
}
|
||||
prevOpen.current = open;
|
||||
}, [open]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<a href="#hovedinnhold" id="skip-link-v2" className="sr-only">
|
||||
Hopp til innhold
|
||||
</a>
|
||||
<InternalHeader className="ds-header">
|
||||
<div className="ds-header__title--wrapper">
|
||||
<button
|
||||
aria-label="Åpne sidenavigasjon"
|
||||
onClick={() => handleClick()}
|
||||
className="ds-header__icon ds-header__icon--slideIn"
|
||||
ref={buttonRef}
|
||||
>
|
||||
<Hamburger focusable="false" aria-label="Hamburger ikon" />
|
||||
</button>
|
||||
<Link to="/beta/" className="ds-header__title">
|
||||
{/* <NAVLogoWhite /> */}
|
||||
<span>NAV Design System v2</span>
|
||||
</Link>
|
||||
</div>
|
||||
<span className="ds-header__logo">
|
||||
<NAVLogoWhite role="img" aria-label="NAV logo hvit" />
|
||||
</span>
|
||||
<div className="ds-header--right">
|
||||
<a
|
||||
href="https://github.com/navikt/nav-frontend-moduler"
|
||||
className="ds-header__link ds-header__link--right"
|
||||
aria-label="Github lenke"
|
||||
>
|
||||
<GithubLogoEm role="img" aria-label="Github-logo" />
|
||||
</a>
|
||||
</div>
|
||||
</InternalHeader>
|
||||
</>
|
||||
);
|
||||
};
|
||||
@@ -1,82 +0,0 @@
|
||||
import React, { forwardRef, useState } from "react";
|
||||
import { Expand } from "@navikt/ds-icons";
|
||||
import cl from "classnames";
|
||||
import { Link } from "gatsby";
|
||||
import { useBetaMenu } from "../../../useSiteStructure";
|
||||
import "./layout.css";
|
||||
import "./theme.css";
|
||||
|
||||
export const SubMenu = ({ hidden, ...props }) => {
|
||||
const [expanded, setExpanded] = useState(false);
|
||||
return (
|
||||
<>
|
||||
<button
|
||||
className="ds-sidebar__button"
|
||||
onClick={() => setExpanded(!expanded)}
|
||||
aria-expanded={expanded}
|
||||
tabIndex={hidden ? -1 : 0}
|
||||
aria-label={props.title}
|
||||
>
|
||||
{props.title}
|
||||
<Expand
|
||||
className={cl(
|
||||
"navds-accordion__chevron",
|
||||
`navds-accordion__chevron--${expanded ? "up" : "down"}`,
|
||||
"ds-sidebar__chevron"
|
||||
)}
|
||||
focusable="false"
|
||||
/>
|
||||
</button>
|
||||
<ul
|
||||
className={cl("ds-sidebar__submenu", {
|
||||
"ds-sidebar__submenu--hidden": !expanded,
|
||||
})}
|
||||
>
|
||||
{props.children.map((props) => (
|
||||
<li key={props.title}>
|
||||
{
|
||||
<Link
|
||||
to={props.link}
|
||||
className="ds-sidebar__submenu--item"
|
||||
activeClassName="active"
|
||||
tabIndex={hidden ? -1 : 0}
|
||||
>
|
||||
{props.title}
|
||||
</Link>
|
||||
}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export const Menu = forwardRef<HTMLElement, { hidden: boolean }>(
|
||||
({ children, hidden, ...rest }, ref) => {
|
||||
const menu = useBetaMenu();
|
||||
|
||||
return (
|
||||
<nav ref={ref}>
|
||||
<ul className="ds-sidebar__menu">
|
||||
{menu.map((props) => (
|
||||
<li key={props.title}>
|
||||
{props.children ? (
|
||||
<SubMenu {...props} hidden={hidden} />
|
||||
) : (
|
||||
<Link
|
||||
to={props.link}
|
||||
className="ds-sidebar__button"
|
||||
activeClassName="active"
|
||||
tabIndex={hidden ? -1 : 0}
|
||||
aria-label={props.title}
|
||||
>
|
||||
{props.title}
|
||||
</Link>
|
||||
)}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</nav>
|
||||
);
|
||||
}
|
||||
);
|
||||
@@ -1,60 +0,0 @@
|
||||
import { Close } from "@navikt/ds-icons";
|
||||
import cl from "classnames";
|
||||
import { default as React, useEffect, useState } from "react";
|
||||
import { useMediaQuery } from "react-responsive";
|
||||
import useKeypress from "react-use-keypress";
|
||||
import "./layout.css";
|
||||
import { Menu } from "./Menu";
|
||||
import "./theme.css";
|
||||
|
||||
export const Sidebar = ({ open, closeSidebar }) => {
|
||||
const [openButton, setOpenButton] = useState(open);
|
||||
const small = useMediaQuery({
|
||||
query: "(max-width: 960px)",
|
||||
});
|
||||
|
||||
useKeypress("Escape", () => {
|
||||
closeSidebar();
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
if (!open) {
|
||||
setTimeout(() => {
|
||||
setOpenButton(false);
|
||||
}, 150);
|
||||
} else {
|
||||
setOpenButton(true);
|
||||
}
|
||||
}, [open]);
|
||||
|
||||
return (
|
||||
<>
|
||||
{openButton && small && (
|
||||
<div
|
||||
onClick={closeSidebar}
|
||||
className={cl("ds-sidebar--overlay", {
|
||||
"ds-sidebar--overlay--fade": open,
|
||||
})}
|
||||
/>
|
||||
)}
|
||||
<div
|
||||
className={cl("ds-sidebar", {
|
||||
"ds-sidebar__mobile": small,
|
||||
"ds-sidebar__mobile--open": small && open,
|
||||
})}
|
||||
>
|
||||
{small && openButton && (
|
||||
<button
|
||||
aria-label="Lukk sidenavigasjon"
|
||||
onClick={closeSidebar}
|
||||
className="ds-header__icon ds-header__icon--onSidebar"
|
||||
autoFocus
|
||||
>
|
||||
<Close focusable="false" aria-label="Lukk ikon" />
|
||||
</button>
|
||||
)}
|
||||
<Menu hidden={small && !open} />
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
@@ -1,75 +0,0 @@
|
||||
import { MDXProvider } from "@mdx-js/react";
|
||||
import { Title, BodyLong } from "@navikt/ds-react";
|
||||
import cl from "classnames";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { Helmet } from "react-helmet";
|
||||
import Codeblock, { InlineCode } from "../../code/Code";
|
||||
import Example from "../../example/Example";
|
||||
import { Header } from "./Header";
|
||||
import "./layout.css";
|
||||
import { Sidebar } from "./Sidebar";
|
||||
import "./theme.css";
|
||||
|
||||
const BetaLayout = (props) => {
|
||||
const [darkmode, setDarkmode] = useState(false);
|
||||
const [sidebarOpen, setSidebarOpen] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
document.getElementById("gatsby-focus-wrapper").focus();
|
||||
}, [sidebarOpen]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Helmet
|
||||
title={props.pageContext?.frontmatter?.title}
|
||||
titleTemplate="%s - NAV Designsystem"
|
||||
>
|
||||
<html lang="no" />
|
||||
{props.pageContext?.frontmatter?.ingress && (
|
||||
<meta
|
||||
name="description"
|
||||
content={props.pageContext?.frontmatter?.ingress}
|
||||
/>
|
||||
)}
|
||||
</Helmet>
|
||||
|
||||
<div
|
||||
className={cl("ds-page-wrapper", {
|
||||
"ds-lightmode": !darkmode,
|
||||
"ds-darkmode": darkmode,
|
||||
})}
|
||||
>
|
||||
<Header
|
||||
onOpenSidebar={(e) => setSidebarOpen(e)}
|
||||
open={sidebarOpen}
|
||||
onClick={() => setDarkmode(!darkmode)}
|
||||
/>
|
||||
<Sidebar
|
||||
open={sidebarOpen}
|
||||
closeSidebar={() => setSidebarOpen(false)}
|
||||
/>
|
||||
<main className="ds-content--wrapper" id="hovedinnhold">
|
||||
<div className="ds-content">
|
||||
<MDXProvider
|
||||
components={{
|
||||
code: (props) => <Codeblock {...props} />,
|
||||
inlineCode: (props) => <InlineCode {...props} />,
|
||||
Example,
|
||||
h1: (props) => <Title {...props} level={1} size="2xl" />,
|
||||
h2: (props) => <Title {...props} level={2} size="xl" />,
|
||||
h3: (props) => <Title {...props} level={3} size="l" />,
|
||||
h4: (props) => <Title {...props} level={4} size="m" />,
|
||||
h5: (props) => <Title {...props} level={5} size="s" />,
|
||||
p: (props) => <BodyLong {...props} />,
|
||||
}}
|
||||
>
|
||||
{props.children}
|
||||
</MDXProvider>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default BetaLayout;
|
||||
@@ -1,314 +0,0 @@
|
||||
@import "~@navikt/ds-css";
|
||||
|
||||
div[class="ds-content"] > .table-of-contents {
|
||||
display: none;
|
||||
width: 0px;
|
||||
}
|
||||
|
||||
.ds-page-wrapper {
|
||||
display: grid;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
/* max-width: 2560px; */
|
||||
grid-template-areas:
|
||||
"header header"
|
||||
"sidebar content";
|
||||
grid-template-columns: auto 1fr;
|
||||
grid-template-rows: auto 1fr;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.ds-header {
|
||||
grid-area: header;
|
||||
display: flex;
|
||||
z-index: 300;
|
||||
justify-content: space-between;
|
||||
background-color: var(--header-color);
|
||||
min-height: auto;
|
||||
}
|
||||
|
||||
.ds-content--wrapper {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.ds-content {
|
||||
grid-area: content;
|
||||
overflow-y: auto;
|
||||
padding: 24px 0 24px 24px;
|
||||
background-color: var(--background-color);
|
||||
color: var(--text-color);
|
||||
max-width: 750px;
|
||||
margin: 0 auto 0 0;
|
||||
}
|
||||
|
||||
.ds-header__title {
|
||||
text-decoration: none;
|
||||
color: white;
|
||||
display: inline-grid;
|
||||
grid-auto-flow: column;
|
||||
align-items: center;
|
||||
padding: 0 1rem 0 1rem;
|
||||
margin-left: -1.5rem;
|
||||
column-gap: 1rem;
|
||||
font-weight: var(--navds-font-weight-bold);
|
||||
transition: background-color 150ms;
|
||||
white-space: nowrap;
|
||||
height: 3rem;
|
||||
transform: translateX(0);
|
||||
transition: transform 150ms;
|
||||
}
|
||||
|
||||
.ds-header__title--wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-right: 1rem;
|
||||
height: 3rem;
|
||||
}
|
||||
|
||||
.ds-header__icon {
|
||||
font-size: 1.2rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0 1rem 0 1rem;
|
||||
outline: none;
|
||||
border: none;
|
||||
height: 3rem;
|
||||
width: 3rem;
|
||||
background-color: var(--header-color);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.ds-header__icon--slideIn {
|
||||
transform: translateX(-100%);
|
||||
transition: transform 150ms;
|
||||
}
|
||||
|
||||
.ds-header__icon--onSidebar {
|
||||
background-color: transparent;
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
.ds-header__logo {
|
||||
font-size: 3rem;
|
||||
display: flex;
|
||||
position: absolute;
|
||||
left: calc(50% - 32px);
|
||||
}
|
||||
|
||||
.ds-header__title > svg {
|
||||
font-size: 3rem;
|
||||
}
|
||||
|
||||
.ds-header__link {
|
||||
height: 100%;
|
||||
fill: white;
|
||||
padding: 0 1rem 0 1rem;
|
||||
font-size: 2rem;
|
||||
transition: background-color 100ms;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.ds-header__title:hover,
|
||||
.ds-header__icon:hover,
|
||||
.ds-header__link:hover {
|
||||
background-color: var(--header-background-active);
|
||||
}
|
||||
|
||||
.ds-header__title:focus,
|
||||
.ds-header__icon:focus,
|
||||
.ds-header__link:focus {
|
||||
outline: 2px solid white;
|
||||
outline-offset: -2px;
|
||||
}
|
||||
|
||||
.ds-header__icon--onSidebar:hover {
|
||||
background-color: var(--menu-background-active);
|
||||
}
|
||||
.ds-header__icon--onSidebar:focus {
|
||||
background-color: transparent;
|
||||
outline: 2px solid var(--header-color);
|
||||
outline-offset: -2px;
|
||||
}
|
||||
.ds-header__icon--onSidebar:active {
|
||||
background-color: var(--menu-background-active);
|
||||
outline: 2px solid var(--header-color);
|
||||
outline-offset: -2px;
|
||||
}
|
||||
|
||||
.ds-header-darkswitch {
|
||||
height: 30px;
|
||||
width: 30px;
|
||||
}
|
||||
|
||||
.ds-header--right {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.ds-sidebar {
|
||||
grid-area: sidebar;
|
||||
background-color: var(--sidebar-color);
|
||||
/* width: 256px; */
|
||||
overflow-y: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
color: var(--text-color);
|
||||
border-right: var(--sidebar-divider);
|
||||
width: 256px;
|
||||
}
|
||||
|
||||
@media (max-width: 960px) {
|
||||
.ds-sidebar {
|
||||
display: none;
|
||||
}
|
||||
.ds-content {
|
||||
padding-left: 1rem;
|
||||
}
|
||||
.ds-header__icon--slideIn {
|
||||
transform: translateX(0%);
|
||||
}
|
||||
.ds-header__title {
|
||||
transform: translateX(1.5rem);
|
||||
}
|
||||
}
|
||||
|
||||
.ds-sidebar * > li,
|
||||
.ds-sidebar__mobile * > li {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.ds-sidebar__logo {
|
||||
text-decoration: none;
|
||||
color: white;
|
||||
display: inline-grid;
|
||||
grid-auto-flow: column;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
font-weight: var(--navds-font-weight-bold);
|
||||
}
|
||||
|
||||
.ds-sidebar__menu {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin: 0;
|
||||
padding: 2rem 0 0 0;
|
||||
}
|
||||
|
||||
.ds-sidebar__menu-item.active {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.ds-sidebar__submenu {
|
||||
max-height: max-content;
|
||||
visibility: inherit;
|
||||
display: block;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.ds-sidebar__submenu--hidden {
|
||||
visibility: hidden;
|
||||
max-height: 0px;
|
||||
}
|
||||
|
||||
.ds-sidebar__submenu--item {
|
||||
height: 2rem;
|
||||
min-height: 2rem;
|
||||
padding-left: 2rem;
|
||||
text-decoration: none;
|
||||
color: var(--text-color);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.ds-sidebar__button {
|
||||
font-weight: var(--navds-font-weight-bold);
|
||||
background-color: transparent;
|
||||
color: var(--text-color);
|
||||
text-decoration: none;
|
||||
appearance: none;
|
||||
margin: 0;
|
||||
border: none;
|
||||
width: 100%;
|
||||
height: 2rem;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 0 1rem 0 1rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.ds-sidebar__chevron {
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
transition: 150ms transform;
|
||||
}
|
||||
|
||||
.ds-sidebar__button,
|
||||
.ds-sidebar__submenu--item {
|
||||
background-color: transparent;
|
||||
outline-width: 0px;
|
||||
outline-offset: 0px;
|
||||
transition: background-color 100ms;
|
||||
transition: outline-width 100ms;
|
||||
transition: outline-offset 100ms;
|
||||
}
|
||||
|
||||
.ds-sidebar__button:hover,
|
||||
.ds-sidebar__submenu--item:hover {
|
||||
background-color: var(--menu-background-active);
|
||||
}
|
||||
|
||||
.ds-sidebar__button:focus,
|
||||
.ds-sidebar__submenu--item:focus {
|
||||
background-color: var(--menu-background-active);
|
||||
outline: var(--focus-outline);
|
||||
outline-offset: -2px;
|
||||
}
|
||||
|
||||
.ds-sidebar__mobile {
|
||||
z-index: 999;
|
||||
display: flex;
|
||||
background-color: var(--sidebar-color);
|
||||
flex-direction: column;
|
||||
color: var(--text-color);
|
||||
overflow-y: auto;
|
||||
transition: transform 250ms cubic-bezier(0.6, 0.05, 0.28, 0.91);
|
||||
position: fixed;
|
||||
left: -256px;
|
||||
min-height: 100vh;
|
||||
border-right: var(--sidebar-divider);
|
||||
}
|
||||
|
||||
.ds-sidebar__mobile--open {
|
||||
transform: translateX(100%);
|
||||
}
|
||||
|
||||
.ds-sidebar--overlay {
|
||||
display: block;
|
||||
z-index: 200;
|
||||
background: rgba(0, 0, 0, 0);
|
||||
position: fixed;
|
||||
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
top: 0;
|
||||
transition: background 0.15s linear;
|
||||
}
|
||||
|
||||
.ds-sidebar--overlay--fade {
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
#skip-link-v2 {
|
||||
padding: 1rem;
|
||||
border: 2px solid var(--navds-color-action-default);
|
||||
background: white;
|
||||
}
|
||||
|
||||
#skip-link-v2:focus {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
.ds-darkmode {
|
||||
--background-color: #2c3741;
|
||||
--header-color: #222b32;
|
||||
--sidebar-color: #222b32;
|
||||
--text-color: var(--navds-color-text-inverse);
|
||||
--text-color-inverse: var(--navds-color-text-primary);
|
||||
--heading-block-background: #f1f1f1;
|
||||
--menu-background-active: #3c4b58;
|
||||
--header-background-active: #3c4b58;
|
||||
--focus-outline: 2px solid #fff;
|
||||
--sidebar-divider: 2px solid #3c4b58;
|
||||
--header-divider: 1px solid #3c4b58;
|
||||
}
|
||||
|
||||
.ds-lightmode {
|
||||
--background-color: #fff;
|
||||
--sidebar-color: #fff;
|
||||
--header-color: #222b32;
|
||||
--text-color: var(--navds-color-text-primary);
|
||||
--text-color-inverse: var(--navds-color-text-inverse);
|
||||
--heading-block-background: #1a2026;
|
||||
--header-background-active: #3c4b58;
|
||||
--menu-background-active: #e6e6e6;
|
||||
--focus-outline: 2px solid #1a2026;
|
||||
--sidebar-divider: 1px solid #3c4b58;
|
||||
--header-divider: 1px solid #3c4b58;
|
||||
}
|
||||
@@ -23,11 +23,6 @@ const MainNav = () => {
|
||||
</Link>
|
||||
</li>
|
||||
))}
|
||||
{false && (
|
||||
<li>
|
||||
<a href="/beta">Beta</a>
|
||||
</li>
|
||||
)}
|
||||
<li>
|
||||
<a
|
||||
href="https://github.com/navikt/nav-frontend-moduler"
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
import React from "react";
|
||||
import BetaLayout from "./BetaLayout";
|
||||
import OldLayout from "./OldLayout";
|
||||
import "@navikt/ds-css";
|
||||
|
||||
const Layout = (props) => {
|
||||
return props.location.pathname.startsWith("/beta/") ? (
|
||||
<BetaLayout {...props} />
|
||||
) : (
|
||||
<OldLayout {...props} />
|
||||
);
|
||||
return <OldLayout {...props} />;
|
||||
};
|
||||
|
||||
export default Layout;
|
||||
@@ -1,9 +0,0 @@
|
||||
---
|
||||
title: Beta
|
||||
---
|
||||
|
||||
# Velkommen designsystemet 2.0 (beta)!
|
||||
|
||||
Nytt oppsett. Brekker alle apier.
|
||||
|
||||
Fortsatt beta. ustabilt. bla bla bla.
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
title: Komponenter
|
||||
rank: 3
|
||||
---
|
||||
|
||||
Dette er en tom side
|
||||
@@ -1,9 +0,0 @@
|
||||
---
|
||||
title: Alert
|
||||
---
|
||||
|
||||
# Alert component
|
||||
|
||||
Sånn ser den ut: _eksempel med kode_
|
||||
|
||||
Sånn funker den: _api doc_
|
||||
@@ -1,9 +0,0 @@
|
||||
---
|
||||
title: Button
|
||||
---
|
||||
|
||||
# Button component
|
||||
|
||||
Sånn ser den ut: _eksempel med kode_
|
||||
|
||||
Sånn funker den: _api doc_
|
||||
@@ -1,8 +0,0 @@
|
||||
---
|
||||
title: Kom i gang
|
||||
rank: 1
|
||||
---
|
||||
|
||||
# Kom i gang
|
||||
|
||||
Én pakke. Baseline css. Typografi. Komponenter.
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
title: Retningslinjer
|
||||
rank: 2
|
||||
---
|
||||
|
||||
Dette er en tom side
|
||||
@@ -0,0 +1,36 @@
|
||||
---
|
||||
title: "Identitet"
|
||||
rank: 0
|
||||
---
|
||||
|
||||
import { Ingress } from "nav-frontend-typografi";
|
||||
import Lenkepanel, { LenkepanelBase } from "nav-frontend-lenkepanel";
|
||||
|
||||
# Identitet
|
||||
|
||||
<Ingress>
|
||||
NAVs identitet og visuelle profil baserer seg alltid på visjonen vår og de tre
|
||||
verdiene våre.
|
||||
</Ingress>
|
||||
|
||||
## Visjonen vår
|
||||
|
||||
NAVs visjon er «Vi gir mennesker muligheter». Visjonen vår skal skape stolthet og forpliktelse internt, samt fortelle brukere, samarbeidspartnere og resten av samfunnet hva vi ønsker å oppnå.
|
||||
|
||||
Visjonen gjenspeiler de tre samfunnsmessige funksjonene NAV ivaretar:
|
||||
|
||||
- Mulighet for arbeid
|
||||
- Mulighet for meningsfull aktivitet
|
||||
- Mulighet for inntektssikring i henhold til lovfestede rettigheter
|
||||
|
||||
## Verdiene våre
|
||||
|
||||
I NAV er vi: Tydelig, til stede og løsningsdyktig.
|
||||
|
||||
Verdiene skal gjenspeiles i all kommunikasjon med brukerne våre, samarbeidspartnere og kolleger, enten vi møter dem ansikt til ansikt, gjennom elektroniske kanaler, på telefon eller gjennom informasjonsmateriell.
|
||||
|
||||
## Identitetsportal
|
||||
|
||||
<Lenkepanel className="resource-link" href="https://identitet.nav.no/" border>
|
||||
Identitet.nav.no
|
||||
</Lenkepanel>
|
||||
@@ -26,25 +26,6 @@ const usePages = () =>
|
||||
componentPath: edge.node?.componentPath || "",
|
||||
}));
|
||||
|
||||
export const useBetaMenu = () =>
|
||||
usePages()
|
||||
.filter(
|
||||
({ slug }) => slug.split("/").length > 1 && slug.split("/")[0] === "beta"
|
||||
)
|
||||
.sort((a, b) => a.slug.split("/").length - b.slug.split("/").length)
|
||||
.reduce((menu, page) => {
|
||||
if (page.slug.split("/").length === 2) {
|
||||
return [...menu, page];
|
||||
} else {
|
||||
const parent = menu.find(({ slug }) => page.slug.startsWith(slug));
|
||||
parent.children
|
||||
? parent.children.push(page)
|
||||
: (parent.children = [page]);
|
||||
|
||||
return menu;
|
||||
}
|
||||
}, []);
|
||||
|
||||
export const useBreadcrumb = (location) => {
|
||||
const pages = usePages();
|
||||
|
||||
|
||||