Compare commits

...
Author SHA1 Message Date
github-actions[bot]andgithub-actions[bot] 1609604073 Version Packages (#1876)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-03-23 13:04:48 +01:00
Ken f862aa9c2e 🌐 Textarea-tekster (#1875) 2023-03-23 13:01:49 +01:00
Ken 8fce648c79 🔥 Fjernet unødvendig kommentar 2023-03-21 14:36:39 +01:00
23 changed files with 74 additions and 34 deletions

No files matched your search

+2
View File
@@ -1,5 +1,7 @@
# @navikt/aksel-icons
## 2.8.3
## 2.8.2
## 2.8.1
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/aksel-icons",
"version": "2.8.2",
"version": "2.8.3",
"author": "Aksel | NAV",
"homepage": "https://aksel.nav.no/ikoner",
"repository": {
+2
View File
@@ -1,5 +1,7 @@
# @navikt/ds-codemod
## 2.8.3
## 2.8.2
## 2.8.1
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-codemod",
"version": "2.8.2",
"version": "2.8.3",
"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.8.2",
"@navikt/ds-react": "^2.8.2",
"@navikt/ds-icons": "^2.8.3",
"@navikt/ds-react": "^2.8.3",
"clsx": "^1.1.1"
},
"devDependencies": {
+2
View File
@@ -1,5 +1,7 @@
# @navikt/ds-css
## 2.8.3
## 2.8.2
### Patch Changes
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-css",
"version": "2.8.2",
"version": "2.8.3",
"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.8.2",
"@navikt/ds-tokens": "^2.8.3",
"normalize.css": "^8.0.1",
"postcss": "^8.4.0",
"postcss-cli": "^9.0.0",
+10
View File
@@ -1,5 +1,15 @@
# @navikt/ds-react
## 2.8.3
### Patch Changes
- [#1875](https://github.com/navikt/aksel/pull/1875) [`f862aa9c2`](https://github.com/navikt/aksel/commit/f862aa9c2ec71ffdb295708dc6dad6b77af9519e) Thanks [@KenAJoh](https://github.com/KenAJoh)! - Textarea har oppdatert counter-tekst + mulighet for lokalisering
- Updated dependencies []:
- @navikt/aksel-icons@2.8.3
- @navikt/ds-icons@2.8.3
## 2.8.2
### Patch Changes
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-react",
"version": "2.8.2",
"version": "2.8.3",
"description": "Aksel react-components for NAV designsystem",
"author": "Aksel | NAV designsystem team",
"license": "MIT",
@@ -37,8 +37,8 @@
},
"dependencies": {
"@floating-ui/react": "0.17.0",
"@navikt/aksel-icons": "^2.8.2",
"@navikt/ds-icons": "^2.8.2",
"@navikt/aksel-icons": "^2.8.3",
"@navikt/ds-icons": "^2.8.3",
"@radix-ui/react-tabs": "1.0.0",
"@radix-ui/react-toggle-group": "1.0.0",
"clsx": "^1.2.1",
+14 -3
View File
@@ -45,6 +45,15 @@ export interface TextareaProps
* Enables resizing of field
*/
resize?: boolean;
/**
* i18n-translations for counter-text
*/
i18n?: {
/** @default Antall tegn igjen */
counterLeft?: string;
/** @default tegn for mye */
counterTooMuch?: string;
};
}
export const Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>(
@@ -65,6 +74,7 @@ export const Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>(
maxLength,
hideLabel = false,
resize,
i18n,
...rest
} = props;
@@ -166,6 +176,7 @@ export const Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>(
maxLength={maxLength}
currentLength={props.value?.length ?? controlledValue?.length}
size={size}
i18n={i18n}
/>
</>
)}
@@ -185,7 +196,7 @@ export const Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>(
}
);
export const Counter = ({ maxLength, currentLength, size }) => {
export const Counter = ({ maxLength, currentLength, size, i18n }) => {
const difference = maxLength - currentLength;
return (
@@ -197,8 +208,8 @@ export const Counter = ({ maxLength, currentLength, size }) => {
size={size}
>
{difference < 0
? `Antall tegn for mye ${Math.abs(difference)}`
: `Antall tegn igjen ${difference}`}
? `${Math.abs(difference)} ${i18n?.counterLeft ?? "tegn for mye"}`
: `${difference} ${i18n?.counterTooMuch ?? "tegn igjen"}`}
</BodyShort>
);
};
@@ -3,9 +3,6 @@ import cl from "clsx";
export interface PopoverContentProps
extends React.HTMLAttributes<HTMLDivElement> {
/**
* Modal.Content content
*/
children: React.ReactNode;
}
+2
View File
@@ -1,5 +1,7 @@
# @navikt/ds-tailwind
## 2.8.3
## 2.8.2
## 2.8.1
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-tailwind",
"version": "2.8.2",
"version": "2.8.3",
"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.8.2",
"@navikt/ds-tokens": "^2.8.3",
"@types/jest": "^29.0.0",
"color": "4.2.3",
"jest": "^29.0.0",
+2
View File
@@ -1,5 +1,7 @@
# @navikt/ds-tokens
## 2.8.3
## 2.8.2
## 2.8.1
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-tokens",
"version": "2.8.2",
"version": "2.8.3",
"description": "Design-tokens for NAV designsystem",
"author": "Aksel | NAV designsystem team",
"keywords": [
+2
View File
@@ -1,5 +1,7 @@
# @navikt/ds-icons
## 2.8.3
## 2.8.2
## 2.8.1
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-icons",
"version": "2.8.2",
"version": "2.8.3",
"description": "Aksel icons for NAV",
"author": "Aksel | NAV designsystem team",
"repository": {
+2
View File
@@ -1,5 +1,7 @@
# @navikt/ds-css-internal
## 2.8.3
## 2.8.2
## 2.8.1
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-css-internal",
"version": "2.8.2",
"version": "2.8.3",
"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.8.3
### Patch Changes
- Updated dependencies [[`f862aa9c2`](https://github.com/navikt/aksel/commit/f862aa9c2ec71ffdb295708dc6dad6b77af9519e)]:
- @navikt/ds-react@2.8.3
- @navikt/ds-icons@2.8.3
## 2.8.2
### Patch Changes
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-react-internal",
"version": "2.8.2",
"version": "2.8.3",
"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.8.2",
"@navikt/ds-react": "^2.8.2",
"@navikt/ds-icons": "^2.8.3",
"@navikt/ds-react": "^2.8.3",
"clsx": "^1.1.1",
"copy-to-clipboard": "^3.3.1"
},
+9 -9
View File
@@ -15,15 +15,15 @@
"website"
],
"dependencies": {
"@navikt/aksel-icons": "^2.8.2",
"@navikt/ds-codemod": "^2.8.2",
"@navikt/ds-css": "^2.8.2",
"@navikt/ds-css-internal": "^2.8.2",
"@navikt/ds-icons": "^2.8.2",
"@navikt/ds-react": "^2.8.2",
"@navikt/ds-react-internal": "^2.8.2",
"@navikt/ds-tailwind": "^2.8.2",
"@navikt/ds-tokens": "^2.8.2"
"@navikt/aksel-icons": "^2.8.3",
"@navikt/ds-codemod": "^2.8.3",
"@navikt/ds-css": "^2.8.3",
"@navikt/ds-css-internal": "^2.8.3",
"@navikt/ds-icons": "^2.8.3",
"@navikt/ds-react": "^2.8.3",
"@navikt/ds-react-internal": "^2.8.3",
"@navikt/ds-tailwind": "^2.8.3",
"@navikt/ds-tokens": "^2.8.3"
},
"devDependencies": {
"prettier-plugin-tailwindcss": "^0.2.3"
+2 -2
View File
@@ -10,8 +10,8 @@
"preview": "vite preview"
},
"dependencies": {
"@navikt/ds-css": "2.8.2",
"@navikt/ds-react": "2.8.2",
"@navikt/ds-css": "2.8.3",
"@navikt/ds-react": "2.8.3",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},