Compare commits

...
Author SHA1 Message Date
github-actions[bot]andgithub-actions[bot] ffac16cb05 Version Packages (#1756)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-01-19 15:53:44 +01:00
Ken 98177d0cd3 📝 changeset 2023-01-19 15:19:46 +01:00
Ken 2c5be718e6 🎨 Fikset hjelp ønskes modul 2023-01-19 10:00:56 +01:00
github-actions[bot]andgithub-actions[bot] 019d92dd7b Version Packages (#1754)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-01-18 15:24:10 +01:00
Ken 5b72afbb93 Merge branch 'master' of https://github.com/navikt/Designsystemet 2023-01-18 15:14:13 +01:00
Ken 56348cdddf ♿ Aria-labels for sanity riktekst-editor 2023-01-18 15:13:58 +01:00
26 changed files with 121 additions and 62 deletions

No files matched your search

+2
View File
@@ -1,5 +1,7 @@
# @navikt/ds-codemod
## 2.0.18
## 2.0.17
## 2.0.16
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-codemod",
"version": "2.0.17",
"version": "2.0.18",
"description": "Aksel codemods for NAVs designsystem",
"author": "Aksel | NAV designsystem team",
"license": "MIT",
+2 -2
View File
@@ -39,8 +39,8 @@
"build-pict": "svgr --silent --index-template index-template.js --out-dir src/pictograms pictograms"
},
"dependencies": {
"@navikt/ds-icons": "^2.0.17",
"@navikt/ds-react": "^2.0.17",
"@navikt/ds-icons": "^2.0.18",
"@navikt/ds-react": "^2.0.18",
"clsx": "^1.1.1"
},
"devDependencies": {
+2
View File
@@ -1,5 +1,7 @@
# @navikt/ds-css
## 2.0.18
## 2.0.17
## 2.0.16
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-css",
"version": "2.0.17",
"version": "2.0.18",
"description": "CSS for NAV Designsystem",
"author": "Aksel | NAV designsystem team",
"keywords": [
@@ -20,7 +20,7 @@
"watch": "postcss --watch --use postcss-import -o dist/index.css index.css"
},
"devDependencies": {
"@navikt/ds-tokens": "^2.0.17",
"@navikt/ds-tokens": "^2.0.18",
"normalize.css": "^8.0.1",
"postcss": "^8.4.0",
"postcss-cli": "^9.0.0",
+9
View File
@@ -1,5 +1,14 @@
# @navikt/ds-react
## 2.0.18
### Patch Changes
- [`98177d0cd`](https://github.com/navikt/Designsystemet/commit/98177d0cd3802029dcf398ce93c1767d3b0860c5) Thanks [@KenAJoh](https://github.com/KenAJoh)! - Bedre typer for ref i datepicker
- Updated dependencies []:
- @navikt/ds-icons@2.0.18
## 2.0.17
### Patch Changes
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-react",
"version": "2.0.17",
"version": "2.0.18",
"description": "Aksel react-components for NAV designsystem",
"author": "Aksel | NAV designsystem team",
"license": "MIT",
@@ -37,7 +37,7 @@
},
"dependencies": {
"@floating-ui/react": "0.17.0",
"@navikt/ds-icons": "^2.0.17",
"@navikt/ds-icons": "^2.0.18",
"@radix-ui/react-tabs": "1.0.0",
"@radix-ui/react-toggle-group": "1.0.0",
"clsx": "^1.2.1",
@@ -59,7 +59,10 @@ interface UseDatepickerValue {
/**
* Use: <DatePicker.Input {...inputProps}/>
*/
inputProps: Pick<DateInputProps, "onChange" | "onFocus" | "onBlur" | "value">;
inputProps: Pick<
DateInputProps,
"onChange" | "onFocus" | "onBlur" | "value"
> & { ref: React.RefObject<HTMLInputElement> };
/**
* Resets all states (callback)
*/
@@ -45,7 +45,9 @@ interface UseMonthPickerValue {
/**
* Use: <MonthPicker.Input {...inputProps} />
*/
inputProps: Pick<DateInputProps, "onChange" | "onFocus" | "value">;
inputProps: Pick<DateInputProps, "onChange" | "onFocus" | "value"> & {
ref: React.RefObject<HTMLInputElement>;
};
/**
* Currently selected Date
* Up to user to validate value and extract month
@@ -101,7 +103,7 @@ export const useMonthpicker = (
const today = new Date();
const locale = getLocaleFromString(_locale);
const inputRef = useRef<HTMLDivElement>(null);
const inputRef = useRef<HTMLInputElement>(null);
const monthpickerRef = useRef<HTMLDivElement>(null);
// Initialize states
@@ -1,6 +1,6 @@
import differenceInCalendarDays from "date-fns/differenceInCalendarDays";
import isWeekend from "date-fns/isWeekend";
import { useCallback, useEffect, useRef, useState } from "react";
import React, { useCallback, useEffect, useRef, useState } from "react";
import { DateRange, isMatch } from "react-day-picker";
import { DateInputProps } from "../DateInput";
import { DatePickerProps } from "../datepicker/DatePicker";
@@ -71,14 +71,14 @@ interface UseRangeDatepickerValue {
fromInputProps: Pick<
DateInputProps,
"onChange" | "onFocus" | "onBlur" | "value"
>;
> & { ref: React.RefObject<HTMLInputElement> };
/**
* Use: <DatePicker.Input label="to" {...toInputProps}/>
*/
toInputProps: Pick<
DateInputProps,
"onChange" | "onFocus" | "onBlur" | "value"
>;
> & { ref: React.RefObject<HTMLInputElement> };
/**
* Resets all states (callback)
*/
@@ -206,8 +206,8 @@ export const useRangeDatepicker = (
const locale = getLocaleFromString(_locale);
const inputRefTo = useRef<HTMLDivElement>(null);
const inputRefFrom = useRef<HTMLDivElement>(null);
const inputRefTo = useRef<HTMLInputElement>(null);
const inputRefFrom = useRef<HTMLInputElement>(null);
const datePickerRef = useRef<HTMLDivElement | null>(null);
const [defaultSelected, setDefaultSelected] = useState(_defaultSelected);
+2
View File
@@ -1,5 +1,7 @@
# @navikt/ds-tailwind
## 2.0.18
## 2.0.17
## 2.0.16
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-tailwind",
"version": "2.0.17",
"version": "2.0.18",
"description": "Tailwind config based on @navikt/ds-tokens",
"author": "Aksel | NAV designsystem team",
"keywords": [
@@ -22,7 +22,7 @@
"directory": "@navikt/core/tailwind"
},
"devDependencies": {
"@navikt/ds-tokens": "^2.0.17",
"@navikt/ds-tokens": "^2.0.18",
"@types/jest": "^29.0.0",
"color": "4.2.3",
"jest": "^29.0.0",
+2
View File
@@ -1,5 +1,7 @@
# @navikt/ds-tokens
## 2.0.18
## 2.0.17
## 2.0.16
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-tokens",
"version": "2.0.17",
"version": "2.0.18",
"description": "Design-tokens for NAV designsystem",
"author": "Aksel | NAV designsystem team",
"keywords": [
+2
View File
@@ -1,5 +1,7 @@
# @navikt/ds-icons
## 2.0.18
## 2.0.17
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-icons",
"version": "2.0.17",
"version": "2.0.18",
"description": "Aksel icons for NAV",
"author": "Aksel | NAV designsystem team",
"repository": {
+2
View File
@@ -1,5 +1,7 @@
# @navikt/ds-css-internal
## 2.0.18
## 2.0.17
## 2.0.16
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-css-internal",
"version": "2.0.17",
"version": "2.0.18",
"description": "CSS for NAV internal Designsystem-components",
"author": "Aksel | NAV designsystem team",
"keywords": [
+8
View File
@@ -1,5 +1,13 @@
# @navikt/ds-react-internal
## 2.0.18
### Patch Changes
- Updated dependencies [[`98177d0cd`](https://github.com/navikt/Designsystemet/commit/98177d0cd3802029dcf398ce93c1767d3b0860c5)]:
- @navikt/ds-react@2.0.18
- @navikt/ds-icons@2.0.18
## 2.0.17
### Patch Changes
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-react-internal",
"version": "2.0.17",
"version": "2.0.18",
"description": "Aksel react components for internal UIs in NAV",
"author": "Aksel | NAV designsystem team",
"license": "MIT",
@@ -35,8 +35,8 @@
"watch": "tsc --watch -p tsconfig.esm.json"
},
"dependencies": {
"@navikt/ds-icons": "^2.0.17",
"@navikt/ds-react": "^2.0.17",
"@navikt/ds-icons": "^2.0.18",
"@navikt/ds-react": "^2.0.18",
"clsx": "^1.1.1",
"copy-to-clipboard": "^3.3.1"
},
+8 -8
View File
@@ -15,14 +15,14 @@
"website"
],
"dependencies": {
"@navikt/ds-codemod": "^2.0.17",
"@navikt/ds-css": "^2.0.17",
"@navikt/ds-css-internal": "^2.0.17",
"@navikt/ds-icons": "^2.0.17",
"@navikt/ds-react": "^2.0.17",
"@navikt/ds-react-internal": "^2.0.17",
"@navikt/ds-tailwind": "^2.0.17",
"@navikt/ds-tokens": "^2.0.17"
"@navikt/ds-codemod": "^2.0.18",
"@navikt/ds-css": "^2.0.18",
"@navikt/ds-css-internal": "^2.0.18",
"@navikt/ds-icons": "^2.0.18",
"@navikt/ds-react": "^2.0.18",
"@navikt/ds-react-internal": "^2.0.18",
"@navikt/ds-tailwind": "^2.0.18",
"@navikt/ds-tokens": "^2.0.18"
},
"devDependencies": {
"prettier-plugin-tailwindcss": "^0.1.13"
@@ -220,6 +220,7 @@ const Feedback = ({
x === HelpfulArticleEnum.MISC ? null : HelpfulArticleEnum.MISC
)
}
id="feedback-forbedringer-button"
>
<Label as="span">Foreslå forbedring</Label>
</Button>
@@ -1,4 +1,5 @@
import { ExternalLink, FileContent, Link } from "@navikt/ds-icons";
import { BoldIcon, CodeIcon, ItalicIcon, OlistIcon } from "@sanity/icons";
import { KBD } from "@sanity/ui";
import React from "react";
import { allArticleDocsRef } from "../../../config";
@@ -18,16 +19,33 @@ export const block = {
type: "block",
styles: [...styles],
lists: [
{ title: "Bullet-liste", value: "bullet" },
{ title: "Nummerert-liste", value: "number" },
{
title: "Bullet-liste",
value: "bullet",
blockEditor: { icon: () => <OlistIcon aria-label="Ul-liste" /> },
},
{
title: "Nummerert-liste",
value: "number",
blockEditor: { icon: () => <OlistIcon aria-label="Ol-liste" /> },
},
],
marks: {
decorators: [
{ title: "Strong", value: "strong" },
{ title: "Italic", value: "em" },
{
title: "Strong",
value: "strong",
blockEditor: { icon: () => <BoldIcon aria-label="Bold" /> },
},
{
title: "Italic",
value: "em",
blockEditor: { icon: () => <ItalicIcon aria-label="Italic" /> },
},
{
title: "Inline-Kode",
value: "code",
blockEditor: { icon: () => <CodeIcon aria-label="Kode" /> },
},
{
title: "KBD",
@@ -15,6 +15,12 @@ export const Tips = defineType({
validation: (Rule) =>
Rule.required().error("Tips-modul må ha noe innhold"),
}),
defineField({
title: "Hjelp ønskes",
name: "eksperiment",
type: "boolean",
initialValue: false,
}),
],
preview: {
select: {
+2 -2
View File
@@ -10,8 +10,8 @@
"preview": "vite preview"
},
"dependencies": {
"@navikt/ds-css": "2.0.17",
"@navikt/ds-react": "2.0.17",
"@navikt/ds-css": "2.0.18",
"@navikt/ds-react": "2.0.18",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
+25 -25
View File
@@ -3080,7 +3080,7 @@ __metadata:
languageName: node
linkType: hard
"@navikt/ds-codemod@^2.0.16, @navikt/ds-codemod@workspace:@navikt/codemod":
"@navikt/ds-codemod@^2.0.17, @navikt/ds-codemod@workspace:@navikt/codemod":
version: 0.0.0-use.local
resolution: "@navikt/ds-codemod@workspace:@navikt/codemod"
dependencies:
@@ -3107,7 +3107,7 @@ __metadata:
languageName: unknown
linkType: soft
"@navikt/ds-css-internal@^2.0.16, @navikt/ds-css-internal@workspace:@navikt/internal/css":
"@navikt/ds-css-internal@^2.0.17, @navikt/ds-css-internal@workspace:@navikt/internal/css":
version: 0.0.0-use.local
resolution: "@navikt/ds-css-internal@workspace:@navikt/internal/css"
dependencies:
@@ -3118,11 +3118,11 @@ __metadata:
languageName: unknown
linkType: soft
"@navikt/ds-css@2.0.16, @navikt/ds-css@^2.0.16, @navikt/ds-css@workspace:@navikt/core/css":
"@navikt/ds-css@2.0.17, @navikt/ds-css@^2.0.17, @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": ^2.0.16
"@navikt/ds-tokens": ^2.0.17
normalize.css: ^8.0.1
postcss: ^8.4.0
postcss-cli: ^9.0.0
@@ -3131,7 +3131,7 @@ __metadata:
languageName: unknown
linkType: soft
"@navikt/ds-icons@^2.0.16, @navikt/ds-icons@workspace:@navikt/icons":
"@navikt/ds-icons@^2.0.17, @navikt/ds-icons@workspace:@navikt/icons":
version: 0.0.0-use.local
resolution: "@navikt/ds-icons@workspace:@navikt/icons"
dependencies:
@@ -3167,8 +3167,8 @@ __metadata:
"@babel/preset-env": 7.19.4
"@babel/preset-react": 7.18.6
"@babel/preset-typescript": 7.18.6
"@navikt/ds-icons": ^2.0.16
"@navikt/ds-react": ^2.0.16
"@navikt/ds-icons": ^2.0.17
"@navikt/ds-react": ^2.0.17
"@rollup/plugin-babel": 6.0.2
"@rollup/plugin-commonjs": 23.0.2
"@rollup/plugin-node-resolve": ^15.0.1
@@ -3193,12 +3193,12 @@ __metadata:
languageName: unknown
linkType: soft
"@navikt/ds-react-internal@^2.0.16, @navikt/ds-react-internal@workspace:@navikt/internal/react":
"@navikt/ds-react-internal@^2.0.17, @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": ^2.0.16
"@navikt/ds-react": ^2.0.16
"@navikt/ds-icons": ^2.0.17
"@navikt/ds-react": ^2.0.17
clsx: ^1.1.1
concurrently: 7.2.1
copy-to-clipboard: ^3.3.1
@@ -3214,12 +3214,12 @@ __metadata:
languageName: unknown
linkType: soft
"@navikt/ds-react@2.0.16, @navikt/ds-react@^2.0.16, @navikt/ds-react@workspace:@navikt/core/react":
"@navikt/ds-react@2.0.17, @navikt/ds-react@^2.0.17, @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": 0.17.0
"@navikt/ds-icons": ^2.0.16
"@navikt/ds-icons": ^2.0.17
"@radix-ui/react-tabs": 1.0.0
"@radix-ui/react-toggle-group": 1.0.0
"@testing-library/dom": 8.13.0
@@ -3255,11 +3255,11 @@ __metadata:
languageName: unknown
linkType: soft
"@navikt/ds-tailwind@^2.0.16, @navikt/ds-tailwind@workspace:@navikt/core/tailwind":
"@navikt/ds-tailwind@^2.0.17, @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": ^2.0.16
"@navikt/ds-tokens": ^2.0.17
"@types/jest": ^29.0.0
color: 4.2.3
jest: ^29.0.0
@@ -3270,7 +3270,7 @@ __metadata:
languageName: unknown
linkType: soft
"@navikt/ds-tokens@^2.0.16, @navikt/ds-tokens@workspace:@navikt/core/tokens":
"@navikt/ds-tokens@^2.0.17, @navikt/ds-tokens@workspace:@navikt/core/tokens":
version: 0.0.0-use.local
resolution: "@navikt/ds-tokens@workspace:@navikt/core/tokens"
dependencies:
@@ -7763,14 +7763,14 @@ __metadata:
version: 0.0.0-use.local
resolution: "aksel.nav.no@workspace:aksel.nav.no"
dependencies:
"@navikt/ds-codemod": ^2.0.16
"@navikt/ds-css": ^2.0.16
"@navikt/ds-css-internal": ^2.0.16
"@navikt/ds-icons": ^2.0.16
"@navikt/ds-react": ^2.0.16
"@navikt/ds-react-internal": ^2.0.16
"@navikt/ds-tailwind": ^2.0.16
"@navikt/ds-tokens": ^2.0.16
"@navikt/ds-codemod": ^2.0.17
"@navikt/ds-css": ^2.0.17
"@navikt/ds-css-internal": ^2.0.17
"@navikt/ds-icons": ^2.0.17
"@navikt/ds-react": ^2.0.17
"@navikt/ds-react-internal": ^2.0.17
"@navikt/ds-tailwind": ^2.0.17
"@navikt/ds-tokens": ^2.0.17
prettier-plugin-tailwindcss: ^0.1.13
languageName: unknown
linkType: soft
@@ -23898,8 +23898,8 @@ __metadata:
version: 0.0.0-use.local
resolution: "shadow-dom@workspace:examples/shadow-dom"
dependencies:
"@navikt/ds-css": 2.0.16
"@navikt/ds-react": 2.0.16
"@navikt/ds-css": 2.0.17
"@navikt/ds-react": 2.0.17
"@types/react": ^18.0.0
"@types/react-dom": ^18.0.0
"@vitejs/plugin-react": ^2.1.0