Compare commits

...
Author SHA1 Message Date
github-actions[bot]andgithub-actions[bot] 34f421835c Version Packages (#1871)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-03-21 14:22:57 +01:00
Ken 9c495cf503 💄 Dynamisk typografi for Expansioncard, flere token-muligheter (#1870)
Resolves #1869
2023-03-21 14:20:30 +01:00
Ken b5666ed040 ⬆️ Oppdatert storybook til rc.5 (#1867) 2023-03-21 10:25:20 +01:00
28 changed files with 639 additions and 696 deletions

No files matched your search

+2
View File
@@ -1,5 +1,7 @@
# @navikt/aksel-icons
## 2.8.2
## 2.8.1
## 2.8.0
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/aksel-icons",
"version": "2.8.1",
"version": "2.8.2",
"author": "Aksel | NAV",
"homepage": "https://aksel.nav.no/ikoner",
"repository": {
@@ -53,9 +53,9 @@
"create-icons": "svgr --silent --index-template config/index-template.js --out-dir src icons",
"copy-util": "copyfiles util/* src",
"copy-svg": "copyfiles -f icons/*.svg dist/svg/",
"copy": "yarn copy-util && yarn copy-svg",
"update-metadata": "node config/metadata.js",
"build": "yarn copy-util && yarn copy-svg && yarn create-icons && concurrently \"tsc\" \"tsc -p tsconfig.esm.json\" && node config/cleanTypes.js && yarn update-metadata",
"build:old": "copyfiles util/* src && yarn create-icons && concurrently \"tsc\" \"tsc -p tsconfig.esm.json\" && node cleanTypes.js && yarn create-package-json-pointers-to-esm",
"build": "yarn copy && yarn create-icons && concurrently \"tsc\" \"tsc -p tsconfig.esm.json\" && node config/cleanTypes.js && yarn update-metadata",
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
"fetch-new:icons": "node config/figma/index.mjs",
"zip:icons": "node config/zip.js"
+2
View File
@@ -1,5 +1,7 @@
# @navikt/ds-codemod
## 2.8.2
## 2.8.1
## 2.8.0
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-codemod",
"version": "2.8.1",
"version": "2.8.2",
"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.1",
"@navikt/ds-react": "^2.8.1",
"@navikt/ds-icons": "^2.8.2",
"@navikt/ds-react": "^2.8.2",
"clsx": "^1.1.1"
},
"devDependencies": {
+6
View File
@@ -1,5 +1,11 @@
# @navikt/ds-css
## 2.8.2
### Patch Changes
- [#1870](https://github.com/navikt/aksel/pull/1870) [`9c495cf50`](https://github.com/navikt/aksel/commit/9c495cf5037a7453e51e273ab93e4232576f4958) Thanks [@KenAJoh](https://github.com/KenAJoh)! - Oppdatert typografi for ExpansioCard
## 2.8.1
## 2.8.0
+1
View File
@@ -52,6 +52,7 @@
border-bottom-right-radius: 0;
border: var(--__ac-expansioncard-border-width) solid var(--__ac-expansioncard-border-color);
border-bottom: none;
background-color: var(--ac-expansioncard-header-open-bg, var(--a-surface-transparent));
}
.navds-expansioncard--open > :where(.navds-expansioncard__header):hover {
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-css",
"version": "2.8.1",
"version": "2.8.2",
"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.1",
"@navikt/ds-tokens": "^2.8.2",
"normalize.css": "^8.0.1",
"postcss": "^8.4.0",
"postcss-cli": "^9.0.0",
+1
View File
@@ -110,6 +110,7 @@
"--ac-expansioncard-bg": "--a-surface-default",
"--ac-expansioncard-header-bg": "--a-surface-transparent",
"--ac-expansioncard-header-bg-hover": "--a-surface-hover",
"--ac-expansioncard-header-open-bg": "--a-surface-transparent",
"--ac-expansioncard-border-color": "--a-border-default",
"--ac-expansioncard-border-open-color": "--a-border-default",
"--ac-expansioncard-border-radius": "--a-border-radius-large",
+10
View File
@@ -1,5 +1,15 @@
# @navikt/ds-react
## 2.8.2
### Patch Changes
- [#1870](https://github.com/navikt/aksel/pull/1870) [`9c495cf50`](https://github.com/navikt/aksel/commit/9c495cf5037a7453e51e273ab93e4232576f4958) Thanks [@KenAJoh](https://github.com/KenAJoh)! - Oppdatert typografi for ExpansioCard
- Updated dependencies []:
- @navikt/aksel-icons@2.8.2
- @navikt/ds-icons@2.8.2
## 2.8.1
### Patch Changes
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-react",
"version": "2.8.1",
"version": "2.8.2",
"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.1",
"@navikt/ds-icons": "^2.8.1",
"@navikt/aksel-icons": "^2.8.2",
"@navikt/ds-icons": "^2.8.2",
"@radix-ui/react-tabs": "1.0.0",
"@radix-ui/react-toggle-group": "1.0.0",
"clsx": "^1.2.1",
@@ -55,11 +55,13 @@ export interface ExpansionCardProps
export type ExpansionCardContextProps = {
open: boolean;
toggleOpen: () => void;
size: "medium" | "small";
};
export const ExpansionCardContext = createContext<ExpansionCardContextProps>({
open: false,
toggleOpen: () => {},
size: "medium",
});
export const ExpansionCard = forwardRef<HTMLDivElement, ExpansionCardProps>(
@@ -91,7 +93,7 @@ export const ExpansionCard = forwardRef<HTMLDivElement, ExpansionCardProps>(
return (
<ExpansionCardContext.Provider
value={{ open: open ?? _open, toggleOpen: handleOpen }}
value={{ open: open ?? _open, toggleOpen: handleOpen, size }}
>
<section
{...rest}
@@ -32,6 +32,7 @@ const ExpansionCardContent: ExpansionCardContentType = forwardRef(
"navds-expansioncard__content--closed": !panelContext.open,
})}
aria-hidden={!panelContext.open}
size={panelContext.size}
>
<div className="navds-expansioncard__content-inner">{children}</div>
</BodyLong>
@@ -1,6 +1,7 @@
import React, { forwardRef } from "react";
import React, { forwardRef, useContext } from "react";
import cl from "clsx";
import { BodyLong } from "../typography/BodyLong";
import { ExpansionCardContext } from "./ExpansionCard";
interface ExpansionCardDescriptionProps
extends React.HTMLAttributes<HTMLParagraphElement> {
@@ -12,11 +13,23 @@ export type ExpansionCardDescriptionType = React.ForwardRefExoticComponent<
>;
export const ExpansionCardDescription: ExpansionCardDescriptionType =
forwardRef(({ className, ...rest }, ref) => (
<BodyLong
{...rest}
as="p"
ref={ref}
className={cl("navds-link-panel__description", className)}
/>
));
forwardRef(({ className, ...rest }, ref) => {
const panelContext = useContext(ExpansionCardContext);
if (panelContext === null) {
console.error(
"<ExpansionCard.Header> has to be used within an <ExpansionCard>"
);
return null;
}
return (
<BodyLong
{...rest}
as="p"
ref={ref}
className={cl("navds-link-panel__description", className)}
size={panelContext.size}
/>
);
});
+2
View File
@@ -1,5 +1,7 @@
# @navikt/ds-tailwind
## 2.8.2
## 2.8.1
## 2.8.0
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-tailwind",
"version": "2.8.1",
"version": "2.8.2",
"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.1",
"@navikt/ds-tokens": "^2.8.2",
"@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.2
## 2.8.1
## 2.8.0
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-tokens",
"version": "2.8.1",
"version": "2.8.2",
"description": "Design-tokens for NAV designsystem",
"author": "Aksel | NAV designsystem team",
"keywords": [
+2
View File
@@ -1,5 +1,7 @@
# @navikt/ds-icons
## 2.8.2
## 2.8.1
## 2.8.0
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-icons",
"version": "2.8.1",
"version": "2.8.2",
"description": "Aksel icons for NAV",
"author": "Aksel | NAV designsystem team",
"repository": {
+2
View File
@@ -1,5 +1,7 @@
# @navikt/ds-css-internal
## 2.8.2
## 2.8.1
## 2.8.0
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-css-internal",
"version": "2.8.1",
"version": "2.8.2",
"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.2
### Patch Changes
- Updated dependencies [[`9c495cf50`](https://github.com/navikt/aksel/commit/9c495cf5037a7453e51e273ab93e4232576f4958)]:
- @navikt/ds-react@2.8.2
- @navikt/ds-icons@2.8.2
## 2.8.1
### Patch Changes
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@navikt/ds-react-internal",
"version": "2.8.1",
"version": "2.8.2",
"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.1",
"@navikt/ds-react": "^2.8.1",
"@navikt/ds-icons": "^2.8.2",
"@navikt/ds-react": "^2.8.2",
"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.1",
"@navikt/ds-codemod": "^2.8.1",
"@navikt/ds-css": "^2.8.1",
"@navikt/ds-css-internal": "^2.8.1",
"@navikt/ds-icons": "^2.8.1",
"@navikt/ds-react": "^2.8.1",
"@navikt/ds-react-internal": "^2.8.1",
"@navikt/ds-tailwind": "^2.8.1",
"@navikt/ds-tokens": "^2.8.1"
"@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"
},
"devDependencies": {
"prettier-plugin-tailwindcss": "^0.2.3"
+2 -2
View File
@@ -10,8 +10,8 @@
"preview": "vite preview"
},
"dependencies": {
"@navikt/ds-css": "2.8.1",
"@navikt/ds-react": "2.8.1",
"@navikt/ds-css": "2.8.2",
"@navikt/ds-react": "2.8.2",
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
+12 -11
View File
@@ -7,7 +7,8 @@
"postinstall": "husky install",
"boot": "yarn workspaces foreach -v -pA --topological-dev --no-private run build",
"clean": "node scripts/clean.js && yarn workspace @navikt/ds-codemod clean",
"storybook": "concurrently \"yarn watch:tw\" \"cross-env STORYBOOK_STORIES=all storybook dev -p 6006\"",
"storybook": "storybook dev -p 6006",
"storybook:aksel": "concurrently \"yarn watch:tw\" \"cross-env STORYBOOK_STORIES=all storybook dev -p 6006\"",
"dev": "yarn workspace aksel.nav.no dev",
"docgen": "yarn workspaces foreach -p run docgen",
"chromatic": "npx chromatic --project-token x3xqdfgkujg --build-script-name build:storybook",
@@ -191,15 +192,15 @@
"devDependencies": {
"@changesets/changelog-github": "0.4.7",
"@changesets/cli": "2.25.0",
"@storybook/addon-a11y": "7.0.0-beta.54",
"@storybook/addon-actions": "7.0.0-beta.54",
"@storybook/addon-essentials": "7.0.0-beta.54",
"@storybook/addon-storysource": "7.0.0-beta.54",
"@storybook/addons": "7.0.0-beta.54",
"@storybook/csf-tools": "7.0.0-beta.54",
"@storybook/react": "7.0.0-beta.54",
"@storybook/react-vite": "7.0.0-beta.54",
"@storybook/theming": "7.0.0-beta.54",
"@storybook/addon-a11y": "7.0.0-rc.5",
"@storybook/addon-actions": "7.0.0-rc.5",
"@storybook/addon-essentials": "7.0.0-rc.5",
"@storybook/addon-storysource": "7.0.0-rc.5",
"@storybook/addons": "7.0.0-rc.5",
"@storybook/csf-tools": "7.0.0-rc.5",
"@storybook/react": "7.0.0-rc.5",
"@storybook/react-vite": "7.0.0-rc.5",
"@storybook/theming": "7.0.0-rc.5",
"@typescript-eslint/parser": "^5.41.0",
"@whitespace/storybook-addon-html": "^5.0.3",
"chromatic": "6.5.4",
@@ -220,7 +221,7 @@
"react": "^18.0.0",
"react-docgen-typescript": "2.2.2",
"react-dom": "^18.0.0",
"storybook": "7.0.0-beta.54",
"storybook": "7.0.0-rc.5",
"storybook-addon-next-router": "^4.0.2",
"stylelint": "^14.8.5",
"stylelint-config-prettier": "^9.0.3",
+533 -645
View File
File diff suppressed because it is too large. Load diff