Compare commits

...
Author SHA1 Message Date
Ken 7ef1be47b7 📝 Changeset 2022-11-16 15:29:46 +01:00
Ken dde30617e3 💄 Toggle-small gap 2022-11-16 15:29:03 +01:00
Ken 609678667f 🔥 Fjernet console.log 2022-11-16 09:46:42 +01:00
Ken 180ecd89bf 🎨 defaultMonth/Year prop 2022-11-15 12:15:09 +01:00
Ken 635b0859b8 defaultMonth/Year prop 2022-11-15 12:13:02 +01:00
Ken 10cbe105bc 🐛 Redirect funker nå med æøå 2022-11-12 21:20:11 +01:00
Ken f97eed8396 📝 Hide redirects from sanity search 2022-11-12 20:03:33 +01:00
Ken 119d9df7b5 📝 Sanity types 2022-11-12 19:45:02 +01:00
Ken 846d18cd23 🎨 Dynamic redirects 2022-11-12 19:40:14 +01:00
Ken 833c35cbbc 🐛 Headings i alert scrollet ikke ved linking 2022-11-11 12:43:35 +01:00
Ken 08353f50b5 💄 tema-lenker 2022-11-11 11:34:55 +01:00
Ken fba81fb4eb 🐛 Fikset tags komponentoversikt 2022-11-10 12:00:49 +01:00
Ken 9d9c6e9bfa 🐛 Fikset tags komponentoversikt 2022-11-10 11:07:34 +01:00
Ken 4dad81714f 🎨 Oppdatert tilbakemeldingsform for personvern 2022-11-09 13:19:34 +01:00
Ken 8e9135149b 🐛 Datepicker funket ikke i shadow-dom (open)
🐛 Datepicker funket ikke i shadow-dom

📝 Changeset@
2022-11-08 15:06:02 +01:00
KenandKenAJoh 852b53d6b9 Ikonsynk Figma (#1713)
Co-authored-by: KenAJoh <KenAJoh@users.noreply.github.com>
2022-11-08 09:34:22 +01:00
github-actions[bot]andgithub-actions[bot] ede1f5858a Version Packages (#1711)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-11-04 14:50:55 +01:00
Ken ad9e7165bb 💚 dispatch cdn-publish 2022-11-04 14:46:55 +01:00
Kenandolejorgenbakken 77302a30b8 Ikonsynk Figma (#1709)
Co-authored-by: olejorgenbakken <olejorgenbakken@users.noreply.github.com>
2022-11-04 14:45:15 +01:00
Andreas Nordahl 0ef12ef601 upload font files to cdn (#1710) 2022-11-04 14:29:56 +01:00
Ken 4174f9a7b4 📝 Patch-version 2022-11-02 23:37:19 +01:00
Ken 608f158d70 🐛 Datepicker validation error var flipped 2022-11-02 22:40:36 +01:00
71 changed files with 790 additions and 174 deletions

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
name: "push-to-cdn"
on:
workflow_dispatch:
push:
branches:
- "master"
paths:
- "fonts/**"
jobs:
upload:
runs-on: ubuntu-latest
permissions:
contents: "read"
id-token: "write"
steps:
- uses: "actions/checkout@v3"
- id: upload
uses: nais/frontend-plattform-cdn-upload-action@main
with:
cdn-environment: cdn.nav.no
cdn-team-name: aksel
source: ./fonts
destination: "" # uploads folder to team root
- run: echo uploaded file ${{ steps.upload.outputs.uploaded }}
shell: bash
+14
View File
@@ -1,5 +1,19 @@
# @navikt/ds-codemod
## 1.5.9
## 1.5.8
## 1.5.7
## 1.5.6
## 1.5.5
## 1.5.4
## 1.5.3
## 1.5.2
## 1.5.1
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-codemod",
"version": "1.5.2",
"version": "1.5.9",
"description": "NAV designsystem codemods",
"author": "NAV Designsystem team",
"license": "MIT",
+26
View File
@@ -1,5 +1,31 @@
# @navikt/ds-css
## 1.5.9
### Patch Changes
- 4px -> 2px gap chips-toggle active
## 1.5.8
## 1.5.7
## 1.5.6
## 1.5.5
## 1.5.4
### Patch Changes
- [#1709](https://github.com/navikt/Designsystemet/pull/1709) [`77302a30b`](https://github.com/navikt/Designsystemet/commit/77302a30b8eef8dc00b2d2e9c904a3f57da81a11) Thanks [@KenAJoh](https://github.com/KenAJoh)! - Oppdatert ikoner
## 1.5.3
### Patch Changes
- Byttet om på alt-farge rekkefølge
## 1.5.2
### Patch Changes
+16 -4
View File
@@ -73,8 +73,7 @@
box-shadow: inset 0 0 0 1px var(--ac-chip-removable-neutral-border, var(--navds-global-color-gray-500));
}
.navds-chips__removable-icon,
.navds-chips__toggle-icon {
.navds-chips__removable-icon {
width: 1.5rem;
height: 1.5rem;
display: grid;
@@ -82,6 +81,19 @@
border-radius: var(--navds-border-radius-full);
}
.navds-chips__toggle-icon {
width: 1.25rem;
height: 1.25rem;
display: grid;
place-items: center;
border-radius: var(--navds-border-radius-full);
}
.navds-chips--small .navds-chips__toggle-icon {
width: 1rem;
height: 1rem;
}
.navds-chips--small .navds-chips__removable-icon {
width: 1.25rem;
height: 1.25rem;
@@ -109,7 +121,7 @@
}
.navds-chips--icon-left {
padding-left: var(--navds-spacing-1);
padding-left: 0.375rem;
}
.navds-chips--icon-right {
@@ -121,5 +133,5 @@
}
.navds-chips--small .navds-chips--icon-left {
padding-left: 0.125rem;
padding-left: 0.375rem;
}
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-css",
"version": "1.5.2",
"version": "1.5.9",
"description": "Css for NAV Designsystem components",
"author": "NAV Designsystem team",
"keywords": [
@@ -20,7 +20,7 @@
"watch": "postcss --watch --use postcss-import -o dist/index.css index.css"
},
"devDependencies": {
"@navikt/ds-tokens": "^1.5.2",
"@navikt/ds-tokens": "^1.5.9",
"normalize.css": "^8.0.1",
"postcss": "^8.4.0",
"postcss-cli": "^9.0.0",
+11 -11
View File
@@ -94,37 +94,37 @@
}
.navds-tag--alt1 {
border-color: var(--ac-tag-alt1-border, var(--navds-global-color-deepblue-400));
background-color: var(--ac-tag-alt1-bg, var(--navds-global-color-deepblue-100));
border-color: var(--ac-tag-alt1-border, var(--navds-global-color-purple-400));
background-color: var(--ac-tag-alt1-bg, var(--navds-global-color-purple-100));
color: var(--ac-tag-alt1-text, var(--navds-global-color-gray-900));
}
.navds-tag--alt1-filled {
border-color: transparent;
background-color: var(--ac-tag-alt1-filled-bg, var(--navds-global-color-deepblue-500));
background-color: var(--ac-tag-alt1-filled-bg, var(--navds-global-color-purple-400));
color: var(--ac-tag-alt1-filled-text, var(--navds-global-color-white));
}
.navds-tag--alt2 {
border-color: var(--ac-tag-alt2-border, var(--navds-global-color-purple-400));
background-color: var(--ac-tag-alt2-bg, var(--navds-global-color-purple-100));
border-color: var(--ac-tag-alt2-border, var(--navds-global-color-limegreen-500));
background-color: var(--ac-tag-alt2-bg, var(--navds-global-color-limegreen-100));
color: var(--ac-tag-alt2-text, var(--navds-global-color-gray-900));
}
.navds-tag--alt2-filled {
border-color: transparent;
background-color: var(--ac-tag-alt2-filled-bg, var(--navds-global-color-purple-400));
color: var(--ac-tag-alt2-filled-text, var(--navds-global-color-white));
background-color: var(--ac-tag-alt2-filled-bg, var(--navds-global-color-limegreen-400));
color: var(--ac-tag-alt2-filled-text, var(--navds-global-color-gray-900));
}
.navds-tag--alt3 {
border-color: var(--ac-tag-alt3-border, var(--navds-global-color-limegreen-500));
background-color: var(--ac-tag-alt3-bg, var(--navds-global-color-limegreen-100));
border-color: var(--ac-tag-alt3-border, var(--navds-global-color-deepblue-400));
background-color: var(--ac-tag-alt3-bg, var(--navds-global-color-deepblue-100));
color: var(--ac-tag-alt3-text, var(--navds-global-color-gray-900));
}
.navds-tag--alt3-filled {
border-color: transparent;
background-color: var(--ac-tag-alt3-filled-bg, var(--navds-global-color-limegreen-400));
color: var(--ac-tag-alt3-filled-text, var(--navds-global-color-gray-900));
background-color: var(--ac-tag-alt3-filled-bg, var(--navds-global-color-deepblue-500));
color: var(--ac-tag-alt3-filled-text, var(--navds-global-color-white));
}
+55
View File
@@ -1,5 +1,60 @@
# @navikt/ds-react
## 1.5.9
### Patch Changes
- Updated dependencies []:
- @navikt/ds-icons@1.5.9
## 1.5.8
### Patch Changes
- console.log removed
- Updated dependencies []:
- @navikt/ds-icons@1.5.8
## 1.5.7
### Patch Changes
- defaultMonth/Year prop date-komponent
- Updated dependencies []:
- @navikt/ds-icons@1.5.7
## 1.5.6
### Patch Changes
- Datepicker fungerte ikke med open shadow-dom
- Updated dependencies []:
- @navikt/ds-icons@1.5.6
## 1.5.5
### Patch Changes
- Updated dependencies []:
- @navikt/ds-icons@1.5.5
## 1.5.4
### Patch Changes
- Updated dependencies [[`77302a30b`](https://github.com/navikt/Designsystemet/commit/77302a30b8eef8dc00b2d2e9c904a3f57da81a11)]:
- @navikt/ds-icons@1.5.4
## 1.5.3
### Patch Changes
- Updated dependencies []:
- @navikt/ds-icons@1.5.3
## 1.5.2
### Patch Changes
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-react",
"version": "1.5.2",
"version": "1.5.9",
"description": "NAV designsystem react components",
"author": "NAV Designsystem team",
"license": "MIT",
@@ -37,7 +37,7 @@
},
"dependencies": {
"@floating-ui/react-dom-interactions": "0.9.2",
"@navikt/ds-icons": "^1.5.2",
"@navikt/ds-icons": "^1.5.9",
"@radix-ui/react-tabs": "1.0.0",
"@radix-ui/react-toggle-group": "1.0.0",
"clsx": "^1.2.1",
@@ -286,3 +286,19 @@ export const UseRangedDatepickerValidation = () => {
</div>
);
};
export const defaultShownMonth = () => {
const { datepickerProps, inputProps } = UNSAFE_useDatepicker({
fromDate: new Date("Aug 23 2019"),
onDateChange: console.log,
defaultMonth: new Date("Oct 23 2022"),
});
return (
<div style={{ display: "flex", gap: "1rem" }}>
<DatePicker {...datepickerProps}>
<DatePicker.Input {...inputProps} label="Velg dato" />
</DatePicker>
</div>
);
};
@@ -28,6 +28,10 @@ export interface UseDatepickerOptions
* The initially selected Date
*/
defaultSelected?: Date;
/**
* Default shown month
*/
defaultMonth?: Date;
/**
* Make selection of Date required
*/
@@ -107,6 +111,7 @@ export const useDatepicker = (
onDateChange,
inputFormat,
onValidate,
defaultMonth,
} = opt;
const locale = getLocaleFromString(_locale);
@@ -117,7 +122,7 @@ export const useDatepicker = (
const [defaultSelected, setDefaultSelected] = useState(_defaultSelected);
// Initialize states
const [month, setMonth] = useState(defaultSelected ?? today);
const [month, setMonth] = useState(defaultSelected ?? defaultMonth ?? today);
const [selectedDay, setSelectedDay] = useState(defaultSelected);
const [open, setOpen] = useState(false);
@@ -138,14 +143,19 @@ export const useDatepicker = (
const handleFocusIn = useCallback(
(e) => {
if (!e?.target || !e?.target?.nodeType) {
/* Workaround for shadow-dom users (open) */
const composed = e.composedPath?.()?.[0];
if (!e?.target || !e?.target?.nodeType || !composed) {
return;
}
![
daypickerRef.current,
inputRef.current,
inputRef.current?.nextSibling,
].some((element) => element?.contains(e.target)) &&
].some(
(element) => element?.contains(e.target) || element?.contains(composed)
) &&
open &&
setOpen(false);
},
@@ -163,14 +173,14 @@ export const useDatepicker = (
const reset = () => {
updateDate(defaultSelected);
setMonth(defaultSelected ?? today);
setMonth(defaultSelected ?? defaultMonth ?? today);
setInputValue(defaultInputValue ?? "");
setDefaultSelected(_defaultSelected);
};
const setSelected = (date: Date | undefined) => {
updateDate(date);
setMonth(date ?? today);
setMonth(date ?? defaultMonth ?? today);
setInputValue(
date ? formatDateForInput(date, locale, "date", inputFormat) : ""
);
@@ -178,7 +188,6 @@ export const useDatepicker = (
const handleFocus: React.FocusEventHandler<HTMLInputElement> = (e) => {
!open && setOpen(true);
let day = parseDate(e.target.value, today, locale, "date");
if (isValidDate(day)) {
setMonth(day);
@@ -253,7 +262,7 @@ export const useDatepicker = (
}
updateDate(day);
updateValidation();
setMonth(day);
setMonth(defaultMonth ?? day);
};
const handleClose = useCallback(() => {
@@ -31,6 +31,10 @@ export interface UseMonthPickerOptions
* validation-callback
*/
onValidate?: (val: MonthValidationT) => void;
/**
* Default shown year
*/
defaultYear?: Date;
}
interface UseMonthPickerValue {
@@ -89,6 +93,7 @@ export const useMonthpicker = (
onMonthChange,
inputFormat,
onValidate,
defaultYear,
} = opt;
const [defaultSelected, setDefaultSelected] = useState(_defaultSelected);
@@ -100,7 +105,7 @@ export const useMonthpicker = (
const monthpickerRef = useRef<HTMLDivElement>(null);
// Initialize states
const [year, setYear] = useState(defaultSelected ?? today);
const [year, setYear] = useState(defaultSelected ?? defaultYear ?? today);
const [selectedMonth, setSelectedMonth] = useState(defaultSelected);
const [open, setOpen] = useState(false);
@@ -122,14 +127,18 @@ export const useMonthpicker = (
const handleFocusIn = useCallback(
(e) => {
if (!e?.target || !e?.target?.nodeType) {
/* Workaround for shadow-dom users (open) */
const composed = e.composedPath?.()?.[0];
if (!e?.target || !e?.target?.nodeType || !composed) {
return;
}
![
monthpickerRef.current,
inputRef.current,
inputRef.current?.nextSibling,
].some((element) => element?.contains(e.target)) &&
].some(
(element) => element?.contains(e.target) || element?.contains(composed)
) &&
open &&
setOpen(false);
},
@@ -147,14 +156,14 @@ export const useMonthpicker = (
const reset = () => {
updateMonth(defaultSelected);
setYear(defaultSelected ?? today);
setYear(defaultSelected ?? defaultYear ?? today);
setInputValue(defaultInputValue ?? "");
setDefaultSelected(_defaultSelected);
};
const setSelected = (date: Date | undefined) => {
updateMonth(date);
setYear(date ?? today);
setYear(date ?? defaultYear ?? today);
setInputValue(
date ? formatDateForInput(date, locale, "month", inputFormat) : ""
);
@@ -201,6 +201,7 @@ export const useRangeDatepicker = (
onRangeChange,
inputFormat,
onValidate,
defaultMonth,
} = opt;
const locale = getLocaleFromString(_locale);
@@ -213,7 +214,7 @@ export const useRangeDatepicker = (
// Initialize states
const [month, setMonth] = useState(
defaultSelected ? defaultSelected?.from : today
defaultSelected ? defaultSelected?.from : defaultMonth ?? today
);
const [selectedRange, setSelectedRange] = useState<DateRange | undefined>(
defaultSelected ?? { from: undefined, to: undefined }
@@ -253,7 +254,9 @@ export const useRangeDatepicker = (
const handleFocusIn = useCallback(
(e) => {
if (!e?.target || !e?.target?.nodeType) {
/* Workaround for shadow-dom users (open) */
const composed = e.composedPath?.()?.[0];
if (!e?.target || !e?.target?.nodeType || !composed) {
return;
}
![
@@ -262,7 +265,9 @@ export const useRangeDatepicker = (
inputRefFrom.current,
inputRefTo.current?.nextSibling,
inputRefFrom.current?.nextSibling,
].some((element) => element?.contains(e.target)) &&
].some(
(element) => element?.contains(e.target) || element?.contains(composed)
) &&
open &&
setOpen(false);
},
@@ -280,7 +285,7 @@ export const useRangeDatepicker = (
const reset = () => {
updateRange(defaultSelected ?? { from: undefined, to: undefined });
setMonth(defaultSelected ? defaultSelected?.from : today);
setMonth(defaultSelected ? defaultSelected?.from : defaultMonth ?? today);
setValidation(
initialValidation(
defaultSelected ?? { from: undefined, to: undefined },
+14
View File
@@ -1,5 +1,19 @@
# @navikt/ds-tailwind
## 1.5.9
## 1.5.8
## 1.5.7
## 1.5.6
## 1.5.5
## 1.5.4
## 1.5.3
## 1.5.2
## 1.5.1
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-tailwind",
"version": "1.5.2",
"version": "1.5.9",
"description": "Auto-generated tailwind config based on @navikt/ds-tokens",
"author": "NAV Designsystem team",
"keywords": [
@@ -22,7 +22,7 @@
"directory": "@navikt/core/tailwind"
},
"devDependencies": {
"@navikt/ds-tokens": "^1.5.2",
"@navikt/ds-tokens": "^1.5.9",
"@types/jest": "^29.0.0",
"@types/node": "^17.0.35",
"jest": "^29.0.0",
+14
View File
@@ -1,5 +1,19 @@
# @navikt/ds-tokens
## 1.5.9
## 1.5.8
## 1.5.7
## 1.5.6
## 1.5.5
## 1.5.4
## 1.5.3
## 1.5.2
## 1.5.1
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-tokens",
"version": "1.5.2",
"version": "1.5.9",
"description": "Auto-generated design-tokens for NAV design-systems framework",
"author": "NAV Designsystem team",
"keywords": [
+22
View File
@@ -1,5 +1,27 @@
# @navikt/ds-icons
## 1.5.9
## 1.5.8
## 1.5.7
## 1.5.6
## 1.5.5
### Patch Changes
- Error-ikon hadde avrundede kanter
## 1.5.4
### Patch Changes
- [#1709](https://github.com/navikt/Designsystemet/pull/1709) [`77302a30b`](https://github.com/navikt/Designsystemet/commit/77302a30b8eef8dc00b2d2e9c904a3f57da81a11) Thanks [@KenAJoh](https://github.com/KenAJoh)! - Oppdatert ikoner
## 1.5.3
## 1.5.2
## 1.5.1
+126
View File
@@ -311,6 +311,102 @@
"created_at": "2021-04-28T14:11:08.212Z",
"pageName": "People"
},
{
"name": "ChevronDownCircle",
"description": "",
"created_at": "2022-11-02T08:31:54.965Z",
"pageName": "Arrows"
},
{
"name": "ChevronDownCircleFilled",
"description": "",
"created_at": "2022-11-02T08:31:55.048Z",
"pageName": "Arrows"
},
{
"name": "ChevronDownDouble",
"description": "",
"created_at": "2022-11-02T08:31:54.957Z",
"pageName": "Arrows"
},
{
"name": "ChevronDownDoubleFilled",
"description": "",
"created_at": "2022-11-02T08:31:54.949Z",
"pageName": "Arrows"
},
{
"name": "ChevronLeftCircle",
"description": "",
"created_at": "2022-11-02T08:31:54.938Z",
"pageName": "Arrows"
},
{
"name": "ChevronLeftCircleFilled",
"description": "",
"created_at": "2022-11-02T08:31:54.930Z",
"pageName": "Arrows"
},
{
"name": "ChevronLeftDouble",
"description": "",
"created_at": "2022-11-02T08:31:55.040Z",
"pageName": "Arrows"
},
{
"name": "ChevronLeftDoubleFilled",
"description": "",
"created_at": "2022-11-02T08:31:54.922Z",
"pageName": "Arrows"
},
{
"name": "ChevronRightCircle",
"description": "",
"created_at": "2022-11-02T08:31:54.993Z",
"pageName": "Arrows"
},
{
"name": "ChevronRightCircleFilled",
"description": "",
"created_at": "2022-11-02T08:31:54.985Z",
"pageName": "Arrows"
},
{
"name": "ChevronRightDouble",
"description": "",
"created_at": "2022-11-02T08:31:55.003Z",
"pageName": "Arrows"
},
{
"name": "ChevronRightDoubleFilled",
"description": "",
"created_at": "2022-11-02T08:31:55.013Z",
"pageName": "Arrows"
},
{
"name": "ChevronUpCircle",
"description": "",
"created_at": "2022-11-02T08:31:54.906Z",
"pageName": "Arrows"
},
{
"name": "ChevronUpCircleFilled",
"description": "",
"created_at": "2022-11-02T08:31:55.021Z",
"pageName": "Arrows"
},
{
"name": "ChevronUpDouble",
"description": "",
"created_at": "2022-11-02T08:31:55.031Z",
"pageName": "Arrows"
},
{
"name": "ChevronUpDoubleFilled",
"description": "",
"created_at": "2022-11-02T08:31:54.914Z",
"pageName": "Arrows"
},
{
"name": "Child",
"description": "",
@@ -761,6 +857,12 @@
"created_at": "2021-01-11T13:37:55.499Z",
"pageName": "Status"
},
{
"name": "ErrorStroke",
"description": "",
"created_at": "2022-10-27T14:42:57.018Z",
"pageName": "Status"
},
{
"name": "Eu",
"description": "",
@@ -1355,6 +1457,12 @@
"created_at": "2021-01-11T13:37:55.736Z",
"pageName": "Status"
},
{
"name": "InformationStroke",
"description": "",
"created_at": "2022-10-27T14:42:57.034Z",
"pageName": "Status"
},
{
"name": "Laptop",
"description": "",
@@ -1613,6 +1721,18 @@
"created_at": "2020-07-01T10:37:42.664Z",
"pageName": "Arrows"
},
{
"name": "NextDouble",
"description": "",
"created_at": "2022-11-02T08:31:54.896Z",
"pageName": "Arrows"
},
{
"name": "NextDoubleFilled",
"description": "",
"created_at": "2022-11-02T08:31:54.975Z",
"pageName": "Arrows"
},
{
"name": "NextFilled",
"description": "",
@@ -2651,6 +2771,12 @@
"created_at": "2021-01-11T13:37:55.590Z",
"pageName": "Status"
},
{
"name": "WarningStroke",
"description": "",
"created_at": "2022-10-27T14:42:57.027Z",
"pageName": "Status"
},
{
"name": "Washing",
"description": "",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-icons",
"version": "1.5.2",
"version": "1.5.9",
"description": "Aksel icons",
"repository": {
"type": "git",
+4
View File
@@ -0,0 +1,4 @@
<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="M21.25 12C21.25 6.89137 17.1086 2.75 12 2.75C6.89137 2.75 2.75 6.89137 2.75 12C2.75 17.1086 6.89137 21.25 12 21.25C17.1086 21.25 21.25 17.1086 21.25 12ZM12 1.25C17.9371 1.25 22.75 6.06294 22.75 12C22.75 17.9371 17.9371 22.75 12 22.75C6.06294 22.75 1.25 17.9371 1.25 12C1.25 6.06294 6.06294 1.25 12 1.25Z" fill="#262626"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 15.5607L7.46967 11.0303L8.53033 9.96967L12 13.4393L15.4697 9.96967L16.5303 11.0303L12 15.5607Z" fill="#262626"/>
</svg>

After

Width:  |  Height:  |  Size: 640 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 1.25C17.9371 1.25 22.75 6.06294 22.75 12C22.75 17.9371 17.9371 22.75 12 22.75C6.06294 22.75 1.25 17.9371 1.25 12C1.25 6.06294 6.06294 1.25 12 1.25ZM12 15.5607L16.5303 11.0303L15.4697 9.96967L12 13.4393L8.53033 9.96967L7.46967 11.0303L12 15.5607Z" fill="#262626"/>
</svg>

After

Width:  |  Height:  |  Size: 420 B

+5
View File
@@ -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="M21.25 12C21.25 6.89137 17.1086 2.75 12 2.75C6.89137 2.75 2.75 6.89137 2.75 12C2.75 17.1086 6.89137 21.25 12 21.25C17.1086 21.25 21.25 17.1086 21.25 12ZM12 1.25C17.9371 1.25 22.75 6.06294 22.75 12C22.75 17.9371 17.9371 22.75 12 22.75C6.06294 22.75 1.25 17.9371 1.25 12C1.25 6.06294 6.06294 1.25 12 1.25Z" fill="#262626"/>
<path d="M12 13.5607L16.5303 9.03033L15.4697 7.96967L12 11.4393L8.53033 7.96967L7.46967 9.03033L12 13.5607Z" fill="#262626"/>
<path d="M12 17.0607L16.5303 12.5303L15.4697 11.4697L12 14.9393L8.53033 11.4697L7.46967 12.5303L12 17.0607Z" fill="#262626"/>
</svg>

After

Width:  |  Height:  |  Size: 726 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="M22.75 12C22.75 17.9371 17.9371 22.75 12 22.75C6.06294 22.75 1.25 17.9371 1.25 12C1.25 6.06294 6.06294 1.25 12 1.25C17.9371 1.25 22.75 6.06294 22.75 12ZM11.9984 13.4579L6.94365 8.40316L8.27389 7.07292L11.9984 10.7974L15.7228 7.07292L17.0531 8.40316L11.9984 13.4579ZM6.94365 13.241L11.9984 18.2957L17.0531 13.241L15.7228 11.9108L11.9984 15.6352L8.27389 11.9108L6.94365 13.241Z" fill="#262626"/>
</svg>

After

Width:  |  Height:  |  Size: 546 B

+4
View File
@@ -0,0 +1,4 @@
<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 21.25C17.1086 21.25 21.25 17.1086 21.25 12C21.25 6.89137 17.1086 2.75 12 2.75C6.89137 2.75 2.75 6.89137 2.75 12C2.75 17.1086 6.89137 21.25 12 21.25ZM22.75 12C22.75 17.9371 17.9371 22.75 12 22.75C6.06294 22.75 1.25 17.9371 1.25 12C1.25 6.06294 6.06294 1.25 12 1.25C17.9371 1.25 22.75 6.06294 22.75 12Z" fill="#262626"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.43934 12L12.9697 7.46967L14.0303 8.53033L10.5607 12L14.0303 15.4697L12.9697 16.5303L8.43934 12Z" fill="#262626"/>
</svg>

After

Width:  |  Height:  |  Size: 641 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="M22.75 12C22.75 17.9371 17.9371 22.75 12 22.75C6.06294 22.75 1.25 17.9371 1.25 12C1.25 6.06294 6.06294 1.25 12 1.25C17.9371 1.25 22.75 6.06294 22.75 12ZM8.43934 12L12.9697 16.5303L14.0303 15.4697L10.5607 12L14.0303 8.53033L12.9697 7.46967L8.43934 12Z" fill="#262626"/>
</svg>

After

Width:  |  Height:  |  Size: 421 B

+5
View File
@@ -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="M12 21.25C17.1086 21.25 21.25 17.1086 21.25 12C21.25 6.89137 17.1086 2.75 12 2.75C6.89137 2.75 2.75 6.89137 2.75 12C2.75 17.1086 6.89137 21.25 12 21.25ZM22.75 12C22.75 17.9371 17.9371 22.75 12 22.75C6.06294 22.75 1.25 17.9371 1.25 12C1.25 6.06294 6.06294 1.25 12 1.25C17.9371 1.25 22.75 6.06294 22.75 12Z" fill="#262626"/>
<path d="M10.4393 12L14.9697 16.5303L16.0303 15.4697L12.5607 12L16.0303 8.53033L14.9697 7.46967L10.4393 12Z" fill="#262626"/>
<path d="M6.93934 12L11.4697 16.5303L12.5303 15.4697L9.06066 12L12.5303 8.53033L11.4697 7.46967L6.93934 12Z" fill="#262626"/>
</svg>

After

Width:  |  Height:  |  Size: 727 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 22.75C6.06294 22.75 1.25 17.9371 1.25 12C1.25 6.06294 6.06294 1.25 12 1.25C17.9371 1.25 22.75 6.06294 22.75 12C22.75 17.9371 17.9371 22.75 12 22.75ZM10.5421 11.9984L15.5968 6.94365L16.9271 8.27389L13.2026 11.9984L16.9271 15.7228L15.5968 17.0531L10.5421 11.9984ZM10.759 6.94365L5.70428 11.9984L10.759 17.0531L12.0892 15.7228L8.36477 11.9984L12.0892 8.27389L10.759 6.94365Z" fill="#262626"/>
</svg>

After

Width:  |  Height:  |  Size: 546 B

+4
View File
@@ -0,0 +1,4 @@
<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 2.75C6.89137 2.75 2.75 6.89137 2.75 12C2.75 17.1086 6.89137 21.25 12 21.25C17.1086 21.25 21.25 17.1086 21.25 12C21.25 6.89137 17.1086 2.75 12 2.75ZM1.25 12C1.25 6.06294 6.06294 1.25 12 1.25C17.9371 1.25 22.75 6.06294 22.75 12C22.75 17.9371 17.9371 22.75 12 22.75C6.06294 22.75 1.25 17.9371 1.25 12Z" fill="#262626"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.5607 12L11.0303 16.5303L9.96967 15.4697L13.4393 12L9.96967 8.53033L11.0303 7.46967L15.5607 12Z" fill="#262626"/>
</svg>

After

Width:  |  Height:  |  Size: 639 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="M1.25 12C1.25 6.06294 6.06294 1.25 12 1.25C17.9371 1.25 22.75 6.06294 22.75 12C22.75 17.9371 17.9371 22.75 12 22.75C6.06294 22.75 1.25 17.9371 1.25 12ZM15.5607 12L11.0303 7.46967L9.96967 8.53033L13.4393 12L9.96967 15.4697L11.0303 16.5303L15.5607 12Z" fill="#262626"/>
</svg>

After

Width:  |  Height:  |  Size: 420 B

+5
View File
@@ -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="M12 2.75C6.89137 2.75 2.75 6.89137 2.75 12C2.75 17.1086 6.89137 21.25 12 21.25C17.1086 21.25 21.25 17.1086 21.25 12C21.25 6.89137 17.1086 2.75 12 2.75ZM1.25 12C1.25 6.06294 6.06294 1.25 12 1.25C17.9371 1.25 22.75 6.06294 22.75 12C22.75 17.9371 17.9371 22.75 12 22.75C6.06294 22.75 1.25 17.9371 1.25 12Z" fill="#262626"/>
<path d="M13.5607 12L9.03033 7.46967L7.96967 8.53033L11.4393 12L7.96967 15.4697L9.03033 16.5303L13.5607 12Z" fill="#262626"/>
<path d="M17.0607 12L12.5303 7.46967L11.4697 8.53033L14.9393 12L11.4697 15.4697L12.5303 16.5303L17.0607 12Z" fill="#262626"/>
</svg>

After

Width:  |  Height:  |  Size: 725 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 1.25C17.9371 1.25 22.75 6.06294 22.75 12C22.75 17.9371 17.9371 22.75 12 22.75C6.06294 22.75 1.25 17.9371 1.25 12C1.25 6.06294 6.06294 1.25 12 1.25ZM13.4579 12.0016L8.40316 17.0564L7.07292 15.7261L10.7974 12.0016L7.07292 8.27718L8.40316 6.94694L13.4579 12.0016ZM13.241 17.0564L18.2957 12.0016L13.241 6.94694L11.9108 8.27718L15.6352 12.0016L11.9108 15.7261L13.241 17.0564Z" fill="#262626"/>
</svg>

After

Width:  |  Height:  |  Size: 545 B

+4
View File
@@ -0,0 +1,4 @@
<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="M2.75 12C2.75 17.1086 6.89137 21.25 12 21.25C17.1086 21.25 21.25 17.1086 21.25 12C21.25 6.89137 17.1086 2.75 12 2.75C6.89137 2.75 2.75 6.89137 2.75 12ZM12 22.75C6.06294 22.75 1.25 17.9371 1.25 12C1.25 6.06294 6.06294 1.25 12 1.25C17.9371 1.25 22.75 6.06294 22.75 12C22.75 17.9371 17.9371 22.75 12 22.75Z" fill="#262626"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 8.43934L16.5303 12.9697L15.4697 14.0303L12 10.5607L8.53033 14.0303L7.46967 12.9697L12 8.43934Z" fill="#262626"/>
</svg>

After

Width:  |  Height:  |  Size: 640 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 22.75C6.06294 22.75 1.25 17.9371 1.25 12C1.25 6.06294 6.06294 1.25 12 1.25C17.9371 1.25 22.75 6.06294 22.75 12C22.75 17.9371 17.9371 22.75 12 22.75ZM12 8.43934L7.46967 12.9697L8.53033 14.0303L12 10.5607L15.4697 14.0303L16.5303 12.9697L12 8.43934Z" fill="#262626"/>
</svg>

After

Width:  |  Height:  |  Size: 421 B

+5
View File
@@ -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="M2.75 12C2.75 17.1086 6.89137 21.25 12 21.25C17.1086 21.25 21.25 17.1086 21.25 12C21.25 6.89137 17.1086 2.75 12 2.75C6.89137 2.75 2.75 6.89137 2.75 12ZM12 22.75C6.06294 22.75 1.25 17.9371 1.25 12C1.25 6.06294 6.06294 1.25 12 1.25C17.9371 1.25 22.75 6.06294 22.75 12C22.75 17.9371 17.9371 22.75 12 22.75Z" fill="#262626"/>
<path d="M12 10.4393L7.46967 14.9697L8.53033 16.0303L12 12.5607L15.4697 16.0303L16.5303 14.9697L12 10.4393Z" fill="#262626"/>
<path d="M12 6.93934L7.46967 11.4697L8.53033 12.5303L12 9.06066L15.4697 12.5303L16.5303 11.4697L12 6.93934Z" fill="#262626"/>
</svg>

After

Width:  |  Height:  |  Size: 726 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="M1.25 12C1.25 6.06294 6.06294 1.25 12 1.25C17.9371 1.25 22.75 6.06294 22.75 12C22.75 17.9371 17.9371 22.75 12 22.75C6.06294 22.75 1.25 17.9371 1.25 12ZM12.0016 10.5421L17.0564 15.5968L15.7261 16.9271L12.0016 13.2026L8.27718 16.9271L6.94694 15.5968L12.0016 10.5421ZM17.0564 10.759L12.0016 5.70428L6.94694 10.759L8.27718 12.0892L12.0016 8.36477L15.7261 12.0892L17.0564 10.759Z" fill="#262626"/>
</svg>

After

Width:  |  Height:  |  Size: 545 B

+1 -1
View File
@@ -1,4 +1,4 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M11.999 0C5.39479 0 0.0125453 5.37181 2.35603e-05 11.976C-0.00623729 15.1815 1.2355 18.1972 3.49775 20.4688C5.76001 22.7394 8.77148 23.9937 11.977 23.9999H12C18.6031 23.9999 23.9864 18.6271 24 12.0219C24.0125 5.40625 18.6396 0.0125217 11.999 0Z" fill="#BA3A26"/>
<path d="M12 10.6512L15.3719 7.27932C15.7443 6.90687 16.3482 6.90687 16.7206 7.27932C17.0931 7.65177 17.0931 8.25563 16.7206 8.62808L13.3487 12L16.7206 15.3719C17.0931 15.7443 17.0931 16.3482 16.7206 16.7206C16.3482 17.0931 15.7443 17.0931 15.3719 16.7206L12 13.3487L8.62808 16.7206C8.25563 17.0931 7.65177 17.0931 7.27932 16.7206C6.90687 16.3482 6.90687 15.7443 7.27932 15.3719L10.6512 12L7.27932 8.62808C6.90687 8.25563 6.90687 7.65177 7.27932 7.27932C7.65177 6.90687 8.25563 6.90687 8.62808 7.27932L12 10.6512Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.5714 6.99998L17 8.42855L13.428 12L17 15.5714L15.5714 17L12 13.428L8.42855 17L6.99998 15.5714L10.572 12L6.99998 8.42855L8.42855 6.99998L12 10.572L15.5714 6.99998Z" fill="white"/>
</svg>

Before

Width:  |  Height:  |  Size: 905 B

After

Width:  |  Height:  |  Size: 606 B

+3
View File
@@ -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="M17 5L19 7L13.9992 12L19 17L17 19L12 13.9992L7 19L5 17L10.0008 12L5 7L7 5L12 10.0008L17 5Z" fill="#262626"/>
</svg>

After

Width:  |  Height:  |  Size: 261 B

+3
View File
@@ -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.57141 20V17.7143H10.8571V12H8.57141V9.71429H13.1428V17.7143H15.4286V20H8.57141ZM12 4C12.9467 4 13.7142 4.76751 13.7142 5.71429C13.7142 6.66106 12.9467 7.42857 12 7.42857C11.0532 7.42857 10.2857 6.66106 10.2857 5.71429C10.2857 4.76751 11.0532 4 12 4Z" fill="#262626"/>
</svg>

After

Width:  |  Height:  |  Size: 423 B

+4
View File
@@ -0,0 +1,4 @@
<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.1213 12L6.41421 19.7071L5 18.2929L11.2929 12L5 5.70711L6.41421 4.29289L14.1213 12Z" fill="#262626"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M19.62 12L11.9129 19.7071L10.4987 18.2929L16.7916 12L10.4987 5.70711L11.9129 4.29289L19.62 12Z" fill="#262626"/>
</svg>

After

Width:  |  Height:  |  Size: 419 B

+4
View File
@@ -0,0 +1,4 @@
<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.182 12L6.12132 20.0607L4 17.9393L9.93934 12L4 6.06067L6.12132 3.93935L14.182 12Z" fill="#262626"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M21.2426 12L13.182 20.0607L11.0607 17.9393L17 12L11.0607 6.06067L13.182 3.93935L21.2426 12Z" fill="#262626"/>
</svg>

After

Width:  |  Height:  |  Size: 414 B

+1 -1
View File
@@ -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.0465 7.67114L18.4456 9.10034L9.71768 17.4992L6 14.0182L7.39516 12.5852L9.71359 14.7034L17.0465 7.67114Z" fill="#262626"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M18.2014 6L20 7.89047L8.77943 19L4 14.3955L5.79361 12.5L8.77418 15.3019L18.2014 6Z" fill="#262626"/>
</svg>

Before

Width:  |  Height:  |  Size: 278 B

After

Width:  |  Height:  |  Size: 253 B

+3
View File
@@ -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="M10.6667 4V13.3333H13.3333V4H10.6667ZM12 20C13.1046 20 14 19.1046 14 18C14 16.8954 13.1046 16 12 16C10.8954 16 10 16.8954 10 18C10 19.1046 10.8954 20 12 20Z" fill="#262626"/>
</svg>

After

Width:  |  Height:  |  Size: 327 B

+14
View File
@@ -1,5 +1,19 @@
# @navikt/ds-css-internal
## 1.5.9
## 1.5.8
## 1.5.7
## 1.5.6
## 1.5.5
## 1.5.4
## 1.5.3
## 1.5.2
## 1.5.1
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-css-internal",
"version": "1.5.2",
"version": "1.5.9",
"description": "Css for NAV internal Designsystem components",
"author": "NAV Designsystem team",
"keywords": [
+56
View File
@@ -1,5 +1,61 @@
# @navikt/ds-react-internal
## 1.5.9
### Patch Changes
- Updated dependencies []:
- @navikt/ds-react@1.5.9
- @navikt/ds-icons@1.5.9
## 1.5.8
### Patch Changes
- Updated dependencies []:
- @navikt/ds-react@1.5.8
- @navikt/ds-icons@1.5.8
## 1.5.7
### Patch Changes
- Updated dependencies []:
- @navikt/ds-react@1.5.7
- @navikt/ds-icons@1.5.7
## 1.5.6
### Patch Changes
- Updated dependencies []:
- @navikt/ds-react@1.5.6
- @navikt/ds-icons@1.5.6
## 1.5.5
### Patch Changes
- Updated dependencies []:
- @navikt/ds-icons@1.5.5
- @navikt/ds-react@1.5.5
## 1.5.4
### Patch Changes
- Updated dependencies [[`77302a30b`](https://github.com/navikt/Designsystemet/commit/77302a30b8eef8dc00b2d2e9c904a3f57da81a11)]:
- @navikt/ds-icons@1.5.4
- @navikt/ds-react@1.5.4
## 1.5.3
### Patch Changes
- Updated dependencies []:
- @navikt/ds-react@1.5.3
- @navikt/ds-icons@1.5.3
## 1.5.2
### Patch Changes
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-react-internal",
"version": "1.5.2",
"version": "1.5.9",
"description": "NAV internal designsystem react components",
"author": "NAV Designsystem team",
"license": "MIT",
@@ -35,8 +35,8 @@
"watch": "tsc --watch -p tsconfig.esm.json"
},
"dependencies": {
"@navikt/ds-icons": "^1.5.2",
"@navikt/ds-react": "^1.5.2",
"@navikt/ds-icons": "^1.5.9",
"@navikt/ds-react": "^1.5.9",
"clsx": "^1.1.1",
"copy-to-clipboard": "^3.3.1"
},
+8 -8
View File
@@ -18,14 +18,14 @@
"website"
],
"dependencies": {
"@navikt/ds-codemod": "^1.5.2",
"@navikt/ds-css": "^1.5.2",
"@navikt/ds-css-internal": "^1.5.2",
"@navikt/ds-icons": "^1.5.2",
"@navikt/ds-react": "^1.5.2",
"@navikt/ds-react-internal": "^1.5.2",
"@navikt/ds-tailwind": "^1.5.2",
"@navikt/ds-tokens": "^1.5.2"
"@navikt/ds-codemod": "^1.5.9",
"@navikt/ds-css": "^1.5.9",
"@navikt/ds-css-internal": "^1.5.9",
"@navikt/ds-icons": "^1.5.9",
"@navikt/ds-react": "^1.5.9",
"@navikt/ds-react-internal": "^1.5.9",
"@navikt/ds-tailwind": "^1.5.9",
"@navikt/ds-tokens": "^1.5.9"
},
"devDependencies": {
"prettier-plugin-tailwindcss": "^0.1.13"
@@ -19,8 +19,6 @@ export default function SetAndPublishAction(props) {
}
}, [props.draft]);
console.log(markers);
return {
disabled:
publish.disabled ||
@@ -19,5 +19,6 @@ export const adminPanel = async (roles) =>
S.listItem()
.title("Standalone-sider")
.child(S.documentTypeList("aksel_standalone")),
S.listItem().title("Redirects").child(S.documentTypeList("redirect")),
])
);
@@ -0,0 +1,49 @@
const limits = [
"/blogg/",
"/artikkel/",
"/prinsipper/",
"/designsystem/side/",
"/designsystem/komponenter/",
];
export default {
name: "redirect",
title: "Redirect",
type: "document",
fields: [
{
name: "source",
title: "Fra",
type: "string",
validation: (Rule) =>
Rule.required().custom((_, { parent }) => {
if (!parent?.source?.startsWith?.("/")) {
return "Kan bare redirecte fra relativ-url, eks /min/gamle/sideurl";
}
const valid = limits.find(
(x) => parent?.source?.startsWith?.(x) && parent.source > x
);
if (!valid) {
return `Kan bare redirecte fra sider som starter med en av disse url-ene ${limits.join(
", "
)}`;
}
return true;
}),
},
{
name: "destination",
title: "Til",
type: "string",
validation: (Rule) => Rule.required(),
},
{
name: "permanent",
title: "Permanent",
type: "boolean",
initialValue: () => true,
},
],
__experimental_omnisearch_visibility: false,
};
+2
View File
@@ -6,6 +6,7 @@ import schemaTypes from "all:part:@sanity/base/schema-type";
import editors from "./documents/editors";
import navigation, { dropdown, link } from "./documents/navigation";
import frontpage from "./documents/frontpage";
import redirect from "./documents/redirects";
import * as Designsystem from "./documents/designsystem";
import * as Aksel from "./documents/aksel";
@@ -20,6 +21,7 @@ export default createSchema({
navigation,
link,
dropdown,
redirect,
Designsystem.Color,
Designsystem.ds_header_heading,
@@ -1,26 +1,16 @@
import {
BodyLong,
Button,
Heading,
Label,
Textarea,
TextField,
} from "@navikt/ds-react";
import cl from "classnames";
import { Button, Heading, Label, Textarea } from "@navikt/ds-react";
import { useRouter } from "next/router";
import { useEffect, useState } from "react";
import isEmail from "validator/lib/isEmail";
import isEmpty from "validator/lib/isEmpty";
const FooterForm = () => {
const [contactForm, setContactForm] = useState({
content: "",
mail: "",
hasWritten: false,
});
const [contentError, setContentError] = useState({ content: "", mail: "" });
const [sent, setSent] = useState({ status: false, hadMail: false });
const [contentError, setContentError] = useState({ content: "" });
const [sent, setSent] = useState({ status: false });
const { asPath, basePath } = useRouter();
@@ -34,36 +24,26 @@ const FooterForm = () => {
});
fail = true;
}
if (
!isEmpty(contactForm.mail, { ignore_whitespace: true }) &&
!isEmail(contactForm.mail)
) {
setContentError({
...contentError,
mail: "Email ikke gyldig.",
});
fail = true;
}
if (fail) return;
setContentError({ content: "", mail: "" });
setContentError({ content: "" });
fetch("/api/generalFeedback", {
method: "POST",
body: JSON.stringify({
message: contactForm.content,
user: contactForm.mail,
url: `${basePath}${asPath}`,
}),
});
setSent({ status: true, hadMail: !!contactForm?.mail });
setContactForm({ content: "", mail: "", hasWritten: false });
setSent({ status: true });
setContactForm({ content: "", hasWritten: false });
};
useEffect(() => {
setSent({ status: false, hadMail: false });
setContactForm({ content: "", mail: "", hasWritten: false });
setContentError({ content: "", mail: "" });
setSent({ status: false });
setContactForm({ content: "", hasWritten: false });
setContentError({ content: "" });
}, [asPath]);
return (
@@ -72,13 +52,8 @@ const FooterForm = () => {
{sent.status ? (
<div>
<Label spacing as="p">
Melding er sendt til designsystemet
Meldingen er sendt til Aksel, takk for tilbakemeldingen!
</Label>
<BodyLong>
{`Takk skal du ha!${
sent.hadMail ? " Vi svarer deg så fort som mulig." : ""
}`}
</BodyLong>
</div>
) : (
<form onSubmit={(e) => handleSubmit(e)} className="w-full">
@@ -102,27 +77,9 @@ const FooterForm = () => {
!isEmpty(e.target.value, { ignore_whitespace: true }) &&
setContentError({ ...contentError, content: "" });
}}
description="Ikke skriv inn navn eller andre personopplysninger"
minRows={2}
/>
{contactForm.hasWritten && (
<TextField
className={cl("inverted-textfield")}
label="Vi svarer til e-post (valgfritt)"
error={contentError.mail}
value={contactForm.mail}
autoComplete="work email"
onChange={(e) => {
setContactForm({
...contactForm,
mail: e.target.value,
hasWritten: true,
});
e.target.value &&
isEmail(e.target.value) &&
setContentError({ ...contentError, mail: "" });
}}
/>
)}
</div>
{contactForm.hasWritten && (
<Button className="override-primary-button-dark">
@@ -66,7 +66,7 @@ const NavItem = ({
size="xsmall"
variant={
item.link.status?.tag === "beta"
? "alt2"
? "alt1"
: item.link.status?.tag === "deprecated"
? "neutral"
: "info"
@@ -35,7 +35,7 @@ const AkselArtikkelTemplate = ({
<FooterSlope />
<div className="relative bg-gray-100 pt-12 pb-16">
<div className="dynamic-wrapper">
<Heading level="2" size="medium" className="px-4 text-deepblue-700">
<Heading level="2" size="medium" className="text-deepblue-700 px-4">
{data?.relevante_artikler?.length === 1
? `Les også`
: `Relevante artikler`}
@@ -85,7 +85,7 @@ const AkselArtikkelTemplate = ({
<Heading
level="1"
size="large"
className="algolia-index-lvl1 mt-4 text-deepblue-700 md:text-5xl"
className="algolia-index-lvl1 text-deepblue-700 mt-4 md:text-5xl"
>
{data.heading}
</Heading>
@@ -98,7 +98,7 @@ const AkselArtikkelTemplate = ({
<BodyShort
size="small"
as="span"
className="whitespace-nowrap text-text-muted"
className="text-text-muted whitespace-nowrap"
>
{dateStr(data?._updatedAt)}
</BodyShort>
@@ -120,7 +120,7 @@ const AkselArtikkelTemplate = ({
<BodyShort
size="small"
as="a"
className="algolia-index-lvl5 flex min-h-8 items-center justify-center gap-[2px] rounded-full bg-gray-200 pl-4 pr-1 capitalize text-deepblue-800 no-underline hover:bg-gray-100 hover:underline focus:outline-none focus-visible:shadow-focus"
className="algolia-index-lvl5 min-h-8 text-deepblue-800 focus-visible:shadow-focus flex items-center justify-center gap-[2px] rounded-full bg-gray-200 pl-4 pr-1 capitalize no-underline hover:underline focus:outline-none"
>
{title}
<Next aria-hidden />
@@ -141,14 +141,14 @@ const AkselArtikkelTemplate = ({
<SanityBlockContent blocks={data?.content ?? []} variant="aksel" />
<div className="mt-12">
{authors?.length > 0 && (
<Label className="mb-2 text-deepblue-700" as="p">
<Label className="text-deepblue-700 mb-2" as="p">
Bidragsytere
</Label>
)}
{authors?.length > 0 && (
<BodyShort
as="div"
className="mb-1 flex flex-wrap gap-1 text-text/80"
className="text-text/80 mb-1 flex flex-wrap gap-1"
>
{authors.map(abbrName).map((x, y) => (
<address className="not-italic" key={x}>
@@ -158,7 +158,7 @@ const AkselArtikkelTemplate = ({
))}
</BodyShort>
)}
<BodyShort as="span" className="whitespace-nowrap text-text/80">
<BodyShort as="span" className="text-text/80 whitespace-nowrap">
Publisert: {dateStr(data?.publishedAt ?? data?._updatedAt)}
</BodyShort>
</div>
@@ -12,7 +12,13 @@ const Alert = ({
<div className="mb-7 max-w-2xl">
<DsAlert variant={node.variant}>
{node.heading && (
<Heading spacing size="small" as={node.heading_level} id={node._key}>
<Heading
spacing
size="small"
as={node.heading_level}
id={node._key}
className="scroll-m-20"
>
{node.heading}
</Heading>
)}
@@ -1,6 +1,6 @@
/* eslint-disable @next/next/no-img-element */
import { SanityT, urlFor } from "@/lib";
import { Heading } from "@navikt/ds-react";
import { Heading, Tag } from "@navikt/ds-react";
import Nextlink from "next/link";
import cl from "classnames";
@@ -8,25 +8,24 @@ const getStatus = (status?: SanityT.Schema.komponent_artikkel["status"]) => {
switch (status?.tag) {
case "beta":
return (
<span className="ml-2 rounded bg-purple-400 px-1 text-sm text-white">
<Tag variant="alt1" size="small">
Beta
</span>
</Tag>
);
case "new":
return (
<span className="ml-2 rounded bg-green-300 px-1 text-sm text-gray-900">
Ready
</span>
<Tag variant="info" size="small">
New
</Tag>
);
case "ready":
return null;
case "deprecated":
return (
<span className="ml-2 rounded bg-gray-200 px-1 text-sm text-gray-900">
<Tag variant="neutral" size="small">
Deprecated
</span>
</Tag>
);
default:
return null;
}
@@ -61,7 +60,7 @@ const ComponentOverview = ({
<ul className="component-card-grid">
{sorted.map((x) => (
<li key={x._id}>
<div className="group relative rounded shadow-small ring-1 ring-gray-900/10 focus-within:shadow-focus hover:shadow-medium">
<div className="shadow-small focus-within:shadow-focus hover:shadow-medium group relative rounded ring-1 ring-gray-900/10">
<div
className={cl(
"flex max-h-64 items-center justify-center overflow-hidden rounded-t bg-gray-50",
@@ -87,7 +86,7 @@ const ComponentOverview = ({
aria-hidden
xmlns="http://www.w3.org/2000/svg"
viewBox="-11.5 -10.23174 23 20.46348"
className="aspect-[1.25/1] h-auto max-h-64 min-h-40 p-4"
className="min-h-40 aspect-[1.25/1] h-auto max-h-64 p-4"
>
<title>React Logo</title>
<circle
@@ -152,7 +152,7 @@ export function TableOfContents({
</Heading>
<div
id="toc-scroll"
className="flex max-h-[80vh] flex-col overflow-y-scroll"
className="flex max-h-[80vh] flex-col overflow-y-auto"
>
<nav aria-labelledby="toc-heading">
<ul>
@@ -172,7 +172,7 @@ const Feedback = ({
<Button
variant="secondary"
className={cl({
"override-secondary-button-active bg-deepblue-800 text-text-inverted ring-2 ring-inset ring-deepblue-800 focus-visible:shadow-focus focus-visible:ring-1 focus-visible:ring-white":
"override-secondary-button-active bg-deepblue-800 text-text-inverted ring-deepblue-800 focus-visible:shadow-focus ring-2 ring-inset focus-visible:ring-1 focus-visible:ring-white":
activeState === HelpfulArticleEnum.JA,
})}
onClick={() =>
@@ -186,7 +186,7 @@ const Feedback = ({
<Button
variant="secondary"
className={cl({
"override-secondary-button-active bg-deepblue-800 text-text-inverted ring-2 ring-inset ring-deepblue-800 focus-visible:shadow-focus focus-visible:ring-1 focus-visible:ring-white":
"override-secondary-button-active bg-deepblue-800 text-text-inverted ring-deepblue-800 focus-visible:shadow-focus ring-2 ring-inset focus-visible:ring-1 focus-visible:ring-white":
activeState === HelpfulArticleEnum.NEI,
})}
onClick={() =>
@@ -200,7 +200,7 @@ const Feedback = ({
<Button
variant="secondary"
className={cl({
"override-secondary-button-active bg-deepblue-800 text-text-inverted ring-2 ring-inset ring-deepblue-800 focus-visible:shadow-focus focus-visible:ring-1 focus-visible:ring-white":
"override-secondary-button-active bg-deepblue-800 text-text-inverted ring-deepblue-800 focus-visible:shadow-focus ring-2 ring-inset focus-visible:ring-1 focus-visible:ring-white":
activeState === HelpfulArticleEnum.MISC,
})}
onClick={() =>
@@ -215,7 +215,7 @@ const Feedback = ({
{activeState !== null && (
<form
className={cl(
"mt-4 flex w-full max-w-sm animate-fadeIn flex-col gap-4",
"animate-fadeIn mt-4 flex w-full max-w-sm flex-col gap-4",
{
"override-primary-button": akselFeedback,
}
@@ -229,6 +229,7 @@ const Feedback = ({
onChange={(e) => setTextValue(e.target.value)}
maxLength={600}
minRows={3}
description="Ikke skriv inn navn eller andre personopplysninger"
/>
<Button className="mr-auto" onClick={handleSend}>
Send inn svar
+23
View File
@@ -117,6 +117,28 @@ Linker eller dropdowns med linker. Maks dybde på 2 dropdowns er støttet. Sider
>;
}
/**
* Redirect
*/
interface redirect extends Sanity.Document {
_type: "redirect";
/**
* Fra - `String`
*/
source?: string;
/**
* Til - `String`
*/
destination?: string;
/**
* Permanent - `Boolean`
*/
permanent?: boolean;
}
/**
* Fargekategori
*/
@@ -1546,6 +1568,7 @@ Husk å legge denne til i menyen også, hvis ikke blir den bare tilgjengelig via
| vk_frontpage
| editor
| navigation
| redirect
| ds_color_categories
| ds_tokens
| kode_eksempler_fil
+30
View File
@@ -0,0 +1,30 @@
import { getClient } from "@/sanity-client";
import { NextResponse } from "next/server";
export async function middleware(req) {
try {
const redirects = await getClient().fetch(`
*[_type == 'redirect'] {
destination,
source,
permanent
}
`);
const redirect = redirects.find(
(redirect) =>
decodeURIComponent(req.nextUrl.pathname) === redirect?.source
);
if (redirect) {
if (redirect.destination.startsWith("http")) {
return NextResponse.redirect(new URL(redirect.destination));
}
return NextResponse.redirect(new URL(redirect.destination, req.url));
}
return NextResponse.next();
} catch (e) {
return NextResponse.next();
}
}
@@ -19,9 +19,7 @@ export default async function handler(
return;
}
const card = `&name=${data.message}&desc=**Bruker:** %0A ${
data.user ? data.user : "Ukjent"
} %0A **Side:** %0A ${data.url}`;
const card = `&name=${data.message}&desc=**Bruker:** %0A **Side:** %0A ${data.url}`;
const url = `https://api.trello.com/1/cards?idList=619cc5721924df5816bcc45f&idLabels=${labels}&key=${trelloKey}&token=${trelloToken}${card}`;
const postRes = await fetch(url, {
@@ -7,7 +7,7 @@ const Example = () => {
const { datepickerProps, inputProps } = UNSAFE_useDatepicker({
fromDate: new Date("Aug 23 2019"),
onValidate: (val) => {
setHasError(val.isValidDate);
setHasError(!val.isValidDate);
console.log(val);
},
});
@@ -8,7 +8,7 @@ const Example = () => {
fromDate: new Date("Aug 23 2019"),
toDate: new Date("Aug 23 2025"),
onValidate: (val) => {
setHasError(val.isValidMonth);
setHasError(!val.isValidMonth);
console.log(val);
},
});
+5 -5
View File
@@ -9,16 +9,16 @@
"lint": "next lint"
},
"dependencies": {
"@navikt/ds-css": "^1.5.2",
"@navikt/ds-icons": "^1.5.2",
"@navikt/ds-react": "^1.5.2",
"@navikt/ds-react-internal": "^1.5.2",
"@navikt/ds-css": "^1.5.9",
"@navikt/ds-icons": "^1.5.9",
"@navikt/ds-react": "^1.5.9",
"@navikt/ds-react-internal": "^1.5.9",
"next": "^12.2.0",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
"devDependencies": {
"@navikt/ds-tailwind": "^1.5.2",
"@navikt/ds-tailwind": "^1.5.9",
"@types/node": "^17.0.35",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
+4
View File
@@ -5,7 +5,11 @@
<title>shadow-dom example</title>
</head>
<body>
<h2>Closed dom</h2>
<custom-component></custom-component>
<h2>Open dom</h2>
<custom-opencomponent></custom-opencomponent>
<script type="module" src="/main.tsx"></script>
<script type="module" src="/open.tsx"></script>
</body>
</html>
+3 -2
View File
@@ -25,10 +25,11 @@ class CustomComponent extends HTMLElement {
<Checkbox value="tekst">Checkboxtekst</Checkbox>
<Checkbox value="tekst2">Checkboxtekst</Checkbox>
</CheckboxGroup>
<ModalWrapper />
<Tooltip content="Skriv ut dokument">
<Button>yo!</Button>
<Button>Tooltip</Button>
</Tooltip>
<ModalWrapper />
<br />
</Provider>
);
}
+47
View File
@@ -0,0 +1,47 @@
import ReactDOM from "react-dom/client";
import {
Provider,
Button,
Checkbox,
CheckboxGroup,
Modal,
Tooltip,
UNSAFE_DatePicker,
UNSAFE_useDatepicker,
} from "@navikt/ds-react";
import styles from "@navikt/ds-css/dist/index.css?inline";
import React, { useState } from "react";
class CustomComponent extends HTMLElement {
connectedCallback() {
const rootElement = document.createElement("div");
const appElement = document.createElement("div");
rootElement.appendChild(appElement);
this.attachShadow({ mode: "open" }).appendChild(rootElement);
ReactDOM.createRoot(appElement).render(
<Provider rootElement={rootElement} appElement={appElement}>
<style>{styles}</style>
<DateWrapper />
</Provider>
);
}
}
const DateWrapper = () => {
const { datepickerProps, inputProps, selectedDay } = UNSAFE_useDatepicker({
fromDate: new Date("Aug 23 2019"),
onDateChange: console.log,
});
return (
<div className="min-h-96">
<UNSAFE_DatePicker {...datepickerProps}>
<UNSAFE_DatePicker.Input {...inputProps} label="Velg dato" />
</UNSAFE_DatePicker>
<div className="pt-4">{selectedDay && selectedDay.toDateString()}</div>
</div>
);
};
window.customElements.define("custom-opencomponent", CustomComponent);
Binary file not shown.
Binary file not shown.
+26 -26
View File
@@ -3166,7 +3166,7 @@ __metadata:
languageName: node
linkType: hard
"@navikt/ds-codemod@^1.5.2, @navikt/ds-codemod@workspace:@navikt/codemod":
"@navikt/ds-codemod@^1.5.8, @navikt/ds-codemod@workspace:@navikt/codemod":
version: 0.0.0-use.local
resolution: "@navikt/ds-codemod@workspace:@navikt/codemod"
dependencies:
@@ -3193,7 +3193,7 @@ __metadata:
languageName: unknown
linkType: soft
"@navikt/ds-css-internal@^1.5.2, @navikt/ds-css-internal@workspace:@navikt/internal/css":
"@navikt/ds-css-internal@^1.5.8, @navikt/ds-css-internal@workspace:@navikt/internal/css":
version: 0.0.0-use.local
resolution: "@navikt/ds-css-internal@workspace:@navikt/internal/css"
dependencies:
@@ -3204,11 +3204,11 @@ __metadata:
languageName: unknown
linkType: soft
"@navikt/ds-css@*, @navikt/ds-css@^1.5.2, @navikt/ds-css@workspace:@navikt/core/css":
"@navikt/ds-css@*, @navikt/ds-css@^1.5.8, @navikt/ds-css@workspace:@navikt/core/css":
version: 0.0.0-use.local
resolution: "@navikt/ds-css@workspace:@navikt/core/css"
dependencies:
"@navikt/ds-tokens": ^1.5.2
"@navikt/ds-tokens": ^1.5.8
normalize.css: ^8.0.1
postcss: ^8.4.0
postcss-cli: ^9.0.0
@@ -3217,7 +3217,7 @@ __metadata:
languageName: unknown
linkType: soft
"@navikt/ds-icons@^1.5.2, @navikt/ds-icons@workspace:@navikt/icons":
"@navikt/ds-icons@^1.5.8, @navikt/ds-icons@workspace:@navikt/icons":
version: 0.0.0-use.local
resolution: "@navikt/ds-icons@workspace:@navikt/icons"
dependencies:
@@ -3247,12 +3247,12 @@ __metadata:
languageName: unknown
linkType: soft
"@navikt/ds-react-internal@^1.5.2, @navikt/ds-react-internal@workspace:@navikt/internal/react":
"@navikt/ds-react-internal@^1.5.8, @navikt/ds-react-internal@workspace:@navikt/internal/react":
version: 0.0.0-use.local
resolution: "@navikt/ds-react-internal@workspace:@navikt/internal/react"
dependencies:
"@navikt/ds-icons": ^1.5.2
"@navikt/ds-react": ^1.5.2
"@navikt/ds-icons": ^1.5.8
"@navikt/ds-react": ^1.5.8
"@types/node": ^17.0.35
clsx: ^1.1.1
concurrently: 7.2.1
@@ -3269,12 +3269,12 @@ __metadata:
languageName: unknown
linkType: soft
"@navikt/ds-react@*, @navikt/ds-react@^1.5.2, @navikt/ds-react@workspace:@navikt/core/react":
"@navikt/ds-react@*, @navikt/ds-react@^1.5.8, @navikt/ds-react@workspace:@navikt/core/react":
version: 0.0.0-use.local
resolution: "@navikt/ds-react@workspace:@navikt/core/react"
dependencies:
"@floating-ui/react-dom-interactions": 0.9.2
"@navikt/ds-icons": ^1.5.2
"@navikt/ds-icons": ^1.5.8
"@radix-ui/react-tabs": 1.0.0
"@radix-ui/react-toggle-group": 1.0.0
"@testing-library/dom": 8.13.0
@@ -3311,11 +3311,11 @@ __metadata:
languageName: unknown
linkType: soft
"@navikt/ds-tailwind@^1.5.2, @navikt/ds-tailwind@workspace:@navikt/core/tailwind":
"@navikt/ds-tailwind@^1.5.8, @navikt/ds-tailwind@workspace:@navikt/core/tailwind":
version: 0.0.0-use.local
resolution: "@navikt/ds-tailwind@workspace:@navikt/core/tailwind"
dependencies:
"@navikt/ds-tokens": ^1.5.2
"@navikt/ds-tokens": ^1.5.8
"@types/jest": ^29.0.0
"@types/node": ^17.0.35
jest: ^29.0.0
@@ -3326,7 +3326,7 @@ __metadata:
languageName: unknown
linkType: soft
"@navikt/ds-tokens@^1.5.2, @navikt/ds-tokens@workspace:@navikt/core/tokens":
"@navikt/ds-tokens@^1.5.8, @navikt/ds-tokens@workspace:@navikt/core/tokens":
version: 0.0.0-use.local
resolution: "@navikt/ds-tokens@workspace:@navikt/core/tokens"
dependencies:
@@ -8341,14 +8341,14 @@ __metadata:
version: 0.0.0-use.local
resolution: "aksel.nav.no@workspace:aksel.nav.no"
dependencies:
"@navikt/ds-codemod": ^1.5.2
"@navikt/ds-css": ^1.5.2
"@navikt/ds-css-internal": ^1.5.2
"@navikt/ds-icons": ^1.5.2
"@navikt/ds-react": ^1.5.2
"@navikt/ds-react-internal": ^1.5.2
"@navikt/ds-tailwind": ^1.5.2
"@navikt/ds-tokens": ^1.5.2
"@navikt/ds-codemod": ^1.5.8
"@navikt/ds-css": ^1.5.8
"@navikt/ds-css-internal": ^1.5.8
"@navikt/ds-icons": ^1.5.8
"@navikt/ds-react": ^1.5.8
"@navikt/ds-react-internal": ^1.5.8
"@navikt/ds-tailwind": ^1.5.8
"@navikt/ds-tokens": ^1.5.8
prettier-plugin-tailwindcss: ^0.1.13
languageName: unknown
linkType: soft
@@ -21068,11 +21068,11 @@ __metadata:
version: 0.0.0-use.local
resolution: "nextjs-demo@workspace:examples/next"
dependencies:
"@navikt/ds-css": ^1.5.2
"@navikt/ds-icons": ^1.5.2
"@navikt/ds-react": ^1.5.2
"@navikt/ds-react-internal": ^1.5.2
"@navikt/ds-tailwind": ^1.5.2
"@navikt/ds-css": ^1.5.8
"@navikt/ds-icons": ^1.5.8
"@navikt/ds-react": ^1.5.8
"@navikt/ds-react-internal": ^1.5.8
"@navikt/ds-tailwind": ^1.5.8
"@types/node": ^17.0.35
"@types/react": ^18.0.0
"@types/react-dom": ^18.0.0