diff --git a/.changeset/config.json b/.changeset/config.json index 2a674c4f19..46aeabf092 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -20,11 +20,11 @@ "baseBranch": "main", "updateInternalDependencies": "patch", "ignore": [ - "www.designsystemet.no", + "@web/www", + "@web/storybook", + "@internal/components", + "@plugin/figma", "theme", - "storefront", - "@repo/components", - "@designsystemet/storybook", - "figma-plugin" + "storefront" ] } diff --git a/.changeset/curly-maps-hug.md b/.changeset/curly-maps-hug.md new file mode 100644 index 0000000000..a845151cc8 --- /dev/null +++ b/.changeset/curly-maps-hug.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 66312536d9..dadf12bcad 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -7,6 +7,7 @@ on: - 'apps/**' - 'plugins/**' - 'biome.jsonc' + - 'internal/**' jobs: checks: name: Checks diff --git a/apps/storefront/app/(frontpage)/layout.tsx b/apps/storefront/app/(frontpage)/layout.tsx index 5d6f875706..67b827f62e 100644 --- a/apps/storefront/app/(frontpage)/layout.tsx +++ b/apps/storefront/app/(frontpage)/layout.tsx @@ -1,6 +1,6 @@ import { Heading } from '@digdir/designsystemet-react'; +import { Container } from '@internal/components'; import { ComponentIcon, PaletteIcon, WrenchIcon } from '@navikt/aksel-icons'; -import { Container } from '@repo/components'; import cn from 'clsx/lite'; import type React from 'react'; diff --git a/apps/storefront/app/bloggen/(frontpage)/layout.tsx b/apps/storefront/app/bloggen/(frontpage)/layout.tsx index 1b9e5f24a0..2588e7dad5 100644 --- a/apps/storefront/app/bloggen/(frontpage)/layout.tsx +++ b/apps/storefront/app/bloggen/(frontpage)/layout.tsx @@ -1,5 +1,5 @@ +import { Container } from '@internal/components'; import { PencilIcon } from '@navikt/aksel-icons'; -import { Container } from '@repo/components'; import type { Metadata } from 'next'; import { Banner, BannerHeading, BannerIcon } from 'components/Banner/Banner'; diff --git a/apps/storefront/app/bloggen/_components/PostLayout/PostLayout.tsx b/apps/storefront/app/bloggen/_components/PostLayout/PostLayout.tsx index c972f1dede..afa5bc19f6 100644 --- a/apps/storefront/app/bloggen/_components/PostLayout/PostLayout.tsx +++ b/apps/storefront/app/bloggen/_components/PostLayout/PostLayout.tsx @@ -1,5 +1,5 @@ import { Heading, Link, Paragraph } from '@digdir/designsystemet-react'; -import { Container } from '@repo/components'; +import { Container } from '@internal/components'; import type * as React from 'react'; import { Image, MdxContent } from '../../../../components'; diff --git a/apps/storefront/app/komponenter/layout.tsx b/apps/storefront/app/komponenter/layout.tsx index 6cb2a24e58..ca38d5ce5a 100644 --- a/apps/storefront/app/komponenter/layout.tsx +++ b/apps/storefront/app/komponenter/layout.tsx @@ -1,5 +1,5 @@ +import { Container } from '@internal/components'; import { ComponentFillIcon } from '@navikt/aksel-icons'; -import { Container } from '@repo/components'; import { Banner, diff --git a/apps/storefront/app/layout.tsx b/apps/storefront/app/layout.tsx index 4afd5b01e3..445f211a38 100644 --- a/apps/storefront/app/layout.tsx +++ b/apps/storefront/app/layout.tsx @@ -3,9 +3,8 @@ import '@digdir/designsystemet-css'; import '@digdir/designsystemet-theme'; import { SkipLink } from '@digdir/designsystemet-react'; +import { Figma, Footer, Github, Header, Slack } from '@internal/components'; import { EnvelopeClosedIcon } from '@navikt/aksel-icons'; -import { Figma, Github, Header, Slack } from '@repo/components'; -import { Footer } from '@repo/components'; import type { Metadata } from 'next'; import Script from 'next/script'; import { isProduction } from '../utils/is-production'; diff --git a/apps/storefront/app/not-found.tsx b/apps/storefront/app/not-found.tsx index ac0f28ba6c..4932cd9a0b 100644 --- a/apps/storefront/app/not-found.tsx +++ b/apps/storefront/app/not-found.tsx @@ -1,5 +1,5 @@ import { Heading, Link, Paragraph } from '@digdir/designsystemet-react'; -import { Container } from '@repo/components'; +import { Container } from '@internal/components'; import type { Metadata } from 'next'; import Image from 'next/image'; import NextLink from 'next/link'; diff --git a/apps/storefront/components/GithubLink/GithubLink.tsx b/apps/storefront/components/GithubLink/GithubLink.tsx index 0ed509aea0..98eca269df 100644 --- a/apps/storefront/components/GithubLink/GithubLink.tsx +++ b/apps/storefront/components/GithubLink/GithubLink.tsx @@ -1,6 +1,6 @@ 'use client'; import { Link } from '@digdir/designsystemet-react'; -import { Github } from '@repo/components'; +import { Github } from '@internal/components'; import { usePathname } from 'next/navigation'; import type { HTMLAttributes } from 'react'; diff --git a/apps/storefront/components/ImageBanner/ImageBanner.tsx b/apps/storefront/components/ImageBanner/ImageBanner.tsx index 780a11a1b4..8e631891b9 100644 --- a/apps/storefront/components/ImageBanner/ImageBanner.tsx +++ b/apps/storefront/components/ImageBanner/ImageBanner.tsx @@ -1,7 +1,7 @@ 'use client'; -import type { ButtonProps } from '@digdir/designsystemet-react'; import { Button, Heading, Link, Paragraph } from '@digdir/designsystemet-react'; -import { Container } from '@repo/components'; +import type { ButtonProps } from '@digdir/designsystemet-react'; +import { Container } from '@internal/components'; import cl from 'clsx/lite'; import NextLink from 'next/link'; import type React from 'react'; diff --git a/apps/storefront/components/Section/Section.tsx b/apps/storefront/components/Section/Section.tsx index a21c71854c..72be30fe58 100644 --- a/apps/storefront/components/Section/Section.tsx +++ b/apps/storefront/components/Section/Section.tsx @@ -1,5 +1,5 @@ import { Heading } from '@digdir/designsystemet-react'; -import { Container } from '@repo/components'; +import { Container } from '@internal/components'; import cl from 'clsx/lite'; import Image from 'next/image'; import type * as React from 'react'; diff --git a/apps/storefront/components/Tokens/TokenColor/TokenColor.tsx b/apps/storefront/components/Tokens/TokenColor/TokenColor.tsx index 743e08229a..5a9a5396a2 100644 --- a/apps/storefront/components/Tokens/TokenColor/TokenColor.tsx +++ b/apps/storefront/components/Tokens/TokenColor/TokenColor.tsx @@ -1,5 +1,5 @@ import { getColorMetadataByNumber } from '@digdir/designsystemet/color'; -import { ColorModal } from '@repo/components'; +import { ColorModal } from '@internal/components'; import cl from 'clsx/lite'; import { useRef } from 'react'; import type { TransformedToken } from 'style-dictionary'; diff --git a/apps/storefront/components/Tokens/TokenList/TokenList.tsx b/apps/storefront/components/Tokens/TokenList/TokenList.tsx index a68f60e05a..066f5e2248 100644 --- a/apps/storefront/components/Tokens/TokenList/TokenList.tsx +++ b/apps/storefront/components/Tokens/TokenList/TokenList.tsx @@ -1,6 +1,6 @@ 'use client'; import { Dropdown, Heading, Table } from '@digdir/designsystemet-react'; -import { ClipboardButton } from '@repo/components'; +import { ClipboardButton } from '@internal/components'; import cl from 'clsx/lite'; import type { HTMLAttributes } from 'react'; import { useEffect, useState } from 'react'; diff --git a/apps/storefront/layouts/MenuPageLayout/MenuPageLayout.tsx b/apps/storefront/layouts/MenuPageLayout/MenuPageLayout.tsx index 09452222eb..ce261ba151 100644 --- a/apps/storefront/layouts/MenuPageLayout/MenuPageLayout.tsx +++ b/apps/storefront/layouts/MenuPageLayout/MenuPageLayout.tsx @@ -1,8 +1,8 @@ 'use client'; import { Heading } from '@digdir/designsystemet-react'; +import { Container } from '@internal/components'; import { ComponentIcon } from '@navikt/aksel-icons'; import { Slot } from '@radix-ui/react-slot'; -import { Container } from '@repo/components'; import cn from 'clsx/lite'; import { usePathname } from 'next/navigation'; import type * as React from 'react'; diff --git a/apps/storefront/layouts/NavMenuPageLayout/NavMenuPageLayout.tsx b/apps/storefront/layouts/NavMenuPageLayout/NavMenuPageLayout.tsx index 66bb02a579..563c936d22 100644 --- a/apps/storefront/layouts/NavMenuPageLayout/NavMenuPageLayout.tsx +++ b/apps/storefront/layouts/NavMenuPageLayout/NavMenuPageLayout.tsx @@ -1,5 +1,5 @@ 'use client'; -import { Container } from '@repo/components'; +import { Container } from '@internal/components'; import { usePathname } from 'next/navigation'; import type * as React from 'react'; diff --git a/apps/storefront/layouts/NavPageLayout/NavPageLayout.tsx b/apps/storefront/layouts/NavPageLayout/NavPageLayout.tsx index dd4f096eb3..756002d18b 100644 --- a/apps/storefront/layouts/NavPageLayout/NavPageLayout.tsx +++ b/apps/storefront/layouts/NavPageLayout/NavPageLayout.tsx @@ -1,4 +1,4 @@ -import { Container } from '@repo/components'; +import { Container } from '@internal/components'; import type * as React from 'react'; import { MdxContent } from '../../components'; diff --git a/apps/storefront/layouts/PageLayout/PageLayout.tsx b/apps/storefront/layouts/PageLayout/PageLayout.tsx index 60929de47f..d3404d2bc8 100644 --- a/apps/storefront/layouts/PageLayout/PageLayout.tsx +++ b/apps/storefront/layouts/PageLayout/PageLayout.tsx @@ -1,6 +1,6 @@ import { Heading, Link, Paragraph } from '@digdir/designsystemet-react'; +import { Container } from '@internal/components'; import { ArrowLeftIcon } from '@navikt/aksel-icons'; -import { Container } from '@repo/components'; import NextLink from 'next/link'; import type * as React from 'react'; diff --git a/apps/storefront/mdx-components.tsx b/apps/storefront/mdx-components.tsx index 237e808870..5f737d4dfb 100644 --- a/apps/storefront/mdx-components.tsx +++ b/apps/storefront/mdx-components.tsx @@ -26,7 +26,7 @@ import { TableHeaderCell, TableRow, } from '@digdir/designsystemet-react'; -import { CodeBlock } from '@repo/components'; +import { CodeBlock } from '@internal/components'; import type { MDXComponents } from 'mdx/types'; export function useMDXComponents(components: MDXComponents): MDXComponents { diff --git a/apps/storefront/next.config.mjs b/apps/storefront/next.config.mjs index 48f30f96e6..d067fe4eb1 100644 --- a/apps/storefront/next.config.mjs +++ b/apps/storefront/next.config.mjs @@ -19,7 +19,7 @@ const nextConfig = { '@digdir/designsystemet', '@digdir/designsystemet-css', '@digdir/designsystemet-theme', - '@repo/components', + '@internal/components', ], }; diff --git a/apps/storefront/package.json b/apps/storefront/package.json index 9d7d5991ae..33410d4242 100644 --- a/apps/storefront/package.json +++ b/apps/storefront/package.json @@ -2,6 +2,9 @@ "name": "storefront", "version": "0.1.0", "private": true, + "engines": { + "node": ">=22.15.0" + }, "scripts": { "sitemap": "next-sitemap", "dev": "next dev", @@ -16,12 +19,12 @@ "@digdir/designsystemet-css": "workspace:^", "@digdir/designsystemet-react": "workspace:^", "@digdir/designsystemet-theme": "workspace:^", + "@internal/components": "workspace:^", "@mdx-js/loader": "^3.1.0", "@mdx-js/react": "^3.1.0", "@navikt/aksel-icons": "^7.18.0", "@next/mdx": "^15.2.4", "@radix-ui/react-slot": "^1.1.2", - "@repo/components": "workspace:^", "@types/mdx": "^2.0.13", "@vercel/analytics": "^1.5.0", "clsx": "^2.1.1", @@ -37,7 +40,7 @@ "webpack": "^5.98.0" }, "devDependencies": { - "@types/react": "^19.1.0", + "@types/react": "^19.1.2", "@types/react-dom": "^19.1.1", "next-sitemap": "^4.2.3" } diff --git a/apps/storybook/.storybook/preview.tsx b/apps/storybook/.storybook/preview.tsx index c7b0804933..1a58f90cde 100644 --- a/apps/storybook/.storybook/preview.tsx +++ b/apps/storybook/.storybook/preview.tsx @@ -16,8 +16,8 @@ import { Table, } from '@digdir/designsystemet-react'; +import { CodeBlock } from '@internal/components'; import { Children, type MouseEventHandler } from 'react'; -import { CodeBlock } from '../../_components'; import { customStylesDecorator } from '../story-utils/customStylesDecorator'; import { fontsLoader } from '../story-utils/fontsLoader'; import { allModes, viewportWidths } from '../story-utils/modes'; diff --git a/apps/storybook/package.json b/apps/storybook/package.json index 6adb445447..a218f42dd4 100644 --- a/apps/storybook/package.json +++ b/apps/storybook/package.json @@ -1,7 +1,10 @@ { - "name": "@designsystemet/storybook", - "version": "0.1.0", + "name": "@web/storybook", + "version": "0.0.0", "private": true, + "engines": { + "node": ">=22.15.0" + }, "scripts": { "dev": "storybook dev -p 6006", "build": "storybook build -o ./dist --stats-json", @@ -22,7 +25,7 @@ "@digdir/designsystemet-react": "workspace:^", "@digdir/designsystemet-theme": "workspace:^", "@navikt/aksel-icons": "^7.18.0", - "@repo/components": "workspace:^", + "@internal/components": "workspace:^", "@storybook/addon-a11y": "^8.6.12", "@storybook/addon-essentials": "^8.6.12", "@storybook/addon-links": "^8.6.12", diff --git a/apps/storybook/stories/showcase.stories.tsx b/apps/storybook/stories/showcase.stories.tsx index b776c311a4..ae34f03dd6 100644 --- a/apps/storybook/stories/showcase.stories.tsx +++ b/apps/storybook/stories/showcase.stories.tsx @@ -2,7 +2,7 @@ import type { Meta, StoryFn } from '@storybook/react'; import { useState } from 'react'; import { Fieldset, type Size, ToggleGroup } from '@digdir/designsystemet-react'; -import { Showcase } from '@repo/components'; +import { Showcase } from '@internal/components'; import classes from './showcase.module.css'; diff --git a/apps/storybook/tsconfig.json b/apps/storybook/tsconfig.json index 0773545304..fba946aa0d 100644 --- a/apps/storybook/tsconfig.json +++ b/apps/storybook/tsconfig.json @@ -3,9 +3,12 @@ "compilerOptions": { "types": ["../../packages/theme/brand/colors.d.ts"] }, - "files": ["./.storybook/componentOverrides.module.scss"], + "files": [ + "./.storybook/componentOverrides.module.scss", + "./stories/showcase.module.css" + ], "include": [ - ".", + "**/*", "./.storybook/**/*", "../../packages/css/postcss.config.js", "../../vite.config.ts" diff --git a/apps/theme/app/layout.tsx b/apps/theme/app/layout.tsx index 6bc3002a11..2289c3879d 100644 --- a/apps/theme/app/layout.tsx +++ b/apps/theme/app/layout.tsx @@ -4,8 +4,8 @@ import '@digdir/designsystemet-css'; import '@digdir/designsystemet-theme'; import 'react-color-palette/css'; import './globals.css'; +import { Figma, Footer, Github, Header, Slack } from '@internal/components'; import { EnvelopeClosedIcon } from '@navikt/aksel-icons'; -import { Figma, Footer, Github, Header, Slack } from '@repo/components'; export const metadata: Metadata = { title: 'Temabygger - Designsystemet', diff --git a/apps/theme/app/om-verktoyet/page.tsx b/apps/theme/app/om-verktoyet/page.tsx index 9bdfdd4f06..dfa7079d62 100644 --- a/apps/theme/app/om-verktoyet/page.tsx +++ b/apps/theme/app/om-verktoyet/page.tsx @@ -1,5 +1,5 @@ 'use client'; -import { Container } from '@repo/components'; +import { Container } from '@internal/components'; import classes from './page.module.css'; diff --git a/apps/theme/app/page.tsx b/apps/theme/app/page.tsx index 660cbac469..39a9861dbc 100644 --- a/apps/theme/app/page.tsx +++ b/apps/theme/app/page.tsx @@ -1,9 +1,7 @@ 'use client'; import { Button, Heading, Paragraph } from '@digdir/designsystemet-react'; -import type {} from '@digdir/designsystemet/color'; -import {} from '@digdir/designsystemet/color'; +import { Container } from '@internal/components'; import { BookIcon, PaletteIcon } from '@navikt/aksel-icons'; -import { Container } from '@repo/components'; import NextLink from 'next/link'; import { useSearchParams } from 'next/navigation'; import { useEffect } from 'react'; diff --git a/apps/theme/app/slik-bruker-du-verktoyet/page.tsx b/apps/theme/app/slik-bruker-du-verktoyet/page.tsx index ea953833d9..6651dafc09 100644 --- a/apps/theme/app/slik-bruker-du-verktoyet/page.tsx +++ b/apps/theme/app/slik-bruker-du-verktoyet/page.tsx @@ -1,6 +1,6 @@ 'use client'; import { Heading, Link, Paragraph } from '@digdir/designsystemet-react'; -import { Container } from '@repo/components'; +import { Container } from '@internal/components'; import classes from './page.module.css'; diff --git a/apps/theme/app/test/page.tsx b/apps/theme/app/test/page.tsx index ca94c08409..1efa799be0 100644 --- a/apps/theme/app/test/page.tsx +++ b/apps/theme/app/test/page.tsx @@ -1,5 +1,5 @@ 'use client'; -import { Container } from '@repo/components'; +import { Container } from '@internal/components'; import { type ThemeInfo, diff --git a/apps/theme/components/Group/Group.tsx b/apps/theme/components/Group/Group.tsx index 36ffaaf2d1..d784c932e0 100644 --- a/apps/theme/components/Group/Group.tsx +++ b/apps/theme/components/Group/Group.tsx @@ -10,7 +10,7 @@ import cl from 'clsx/lite'; import { Color as ColorPreview } from '../Color/Color'; -import { ColorModal } from '@repo/components'; +import { ColorModal } from '@internal/components'; import { Fragment, createRef, useRef } from 'react'; import { useThemeStore } from '../../store'; import classes from './Group.module.css'; diff --git a/apps/theme/components/TokenModal/TokenModal.tsx b/apps/theme/components/TokenModal/TokenModal.tsx index a66c768481..0ee4bad27a 100644 --- a/apps/theme/components/TokenModal/TokenModal.tsx +++ b/apps/theme/components/TokenModal/TokenModal.tsx @@ -14,8 +14,8 @@ import { cliOptions, formatThemeCSS, } from '@digdir/designsystemet/tokens'; +import { CodeBlock } from '@internal/components'; import { InformationSquareIcon, StarIcon } from '@navikt/aksel-icons'; -import { CodeBlock } from '@repo/components'; import { useRef, useState } from 'react'; import type { Color, CssColor } from '@digdir/designsystemet/color'; diff --git a/apps/theme/package.json b/apps/theme/package.json index 94df489b94..5b748a5353 100644 --- a/apps/theme/package.json +++ b/apps/theme/package.json @@ -2,6 +2,9 @@ "name": "theme", "version": "0.1.0", "private": true, + "engines": { + "node": ">=22.15.0" + }, "scripts": { "dev": "next dev", "build": "next build", @@ -14,12 +17,12 @@ "@digdir/designsystemet-css": "workspace:^", "@digdir/designsystemet-react": "workspace:^", "@digdir/designsystemet-theme": "workspace:^", + "@internal/components": "workspace:^", "@navikt/aksel-icons": "^7.18.0", - "@repo/components": "workspace:^", + "@radix-ui/react-slot": "^1.1.2", "chroma-js": "^3.1.2", "clsx": "^2.1.1", "next": "^15.2.4", - "@radix-ui/react-slot": "^1.1.2", "react": "^19.1.0", "react-color-palette": "^7.3.0", "react-dom": "^19.1.0", @@ -28,7 +31,7 @@ }, "devDependencies": { "@types/chroma-js": "^3.1.1", - "@types/react": "^19.1.0", + "@types/react": "^19.1.2", "@types/react-dom": "^19.1.1" } } diff --git a/apps/www/package.json b/apps/www/package.json index e03d64b298..c4cb9f965d 100644 --- a/apps/www/package.json +++ b/apps/www/package.json @@ -1,6 +1,10 @@ { - "name": "www.designsystemet.no", + "name": "@web/www", + "version": "0.0.0", "private": true, + "engines": { + "node": ">=22.15.0" + }, "type": "module", "scripts": { "build": "react-router build && node scripts/copy-content.js", @@ -17,7 +21,6 @@ "@radix-ui/react-slot": "^1.1.2", "@react-router/node": "^7.5.2", "@react-router/serve": "^7.5.2", - "@repo/components": "workspace:^", "@vercel/react-router": "^1.1.0", "clsx": "^2.1.1", "i18next": "^25.0.1", @@ -39,7 +42,7 @@ "devDependencies": { "@react-router/dev": "^7.5.2", "@types/node": "^22.14.1", - "@types/react": "^19.1.0", + "@types/react": "^19.1.2", "@types/react-dom": "^19.1.0", "typescript": "^5.8.2", "vite": "^6.3.2", diff --git a/biome.jsonc b/biome.jsonc index 531660c9af..696223acd8 100644 --- a/biome.jsonc +++ b/biome.jsonc @@ -23,7 +23,8 @@ "**/dist/**/*", "packages/theme/**/*.css", "**/tsconfig.*.json", // https://github.com/biomejs/biome/issues/1151 - "**/.react-router/**" + "**/.react-router/**", + "package.json" ] }, "formatter": { @@ -104,9 +105,10 @@ }, { "include": [ - "**/apps/_components/**", + "**/internal/components/**", "**/apps/storefront/**", - "**/apps/theme/**" + "**/apps/theme/**", + "**/apps/www/**" ], "linter": { "rules": { diff --git a/apps/_components/declarations.d.ts b/internal/components/declarations.d.ts similarity index 100% rename from apps/_components/declarations.d.ts rename to internal/components/declarations.d.ts diff --git a/apps/_components/package.json b/internal/components/package.json similarity index 82% rename from apps/_components/package.json rename to internal/components/package.json index a4b827eb4b..6e6cb316ba 100644 --- a/apps/_components/package.json +++ b/internal/components/package.json @@ -1,11 +1,13 @@ { - "name": "@repo/components", + "name": "@internal/components", "version": "0.0.0", "private": true, "author": "Designsystemet team", "main": "src/index.ts", "sideEffects": false, - "files": ["src/**"], + "files": [ + "src/**" + ], "scripts": { "types": "tsc --noEmit" }, @@ -25,13 +27,13 @@ "next": "^15.2.4", "prism-react-renderer": "^2.4.1", "prismjs": "^1.30.0", - "react-code-block": "^1.1.3", "react": "^19.1.0", + "react-code-block": "^1.1.3", "react-dom": "^19.1.0" }, "devDependencies": { - "typescript": "^5.8.2", - "@types/react": "^19.1.0", - "@types/react-dom": "^19.1.1" + "@types/react": "^19.1.2", + "@types/react-dom": "^19.1.1", + "typescript": "^5.8.2" } } diff --git a/apps/_components/src/ClipboardButton/ClipboardButton.module.css b/internal/components/src/ClipboardButton/ClipboardButton.module.css similarity index 100% rename from apps/_components/src/ClipboardButton/ClipboardButton.module.css rename to internal/components/src/ClipboardButton/ClipboardButton.module.css diff --git a/apps/_components/src/ClipboardButton/ClipboardButton.tsx b/internal/components/src/ClipboardButton/ClipboardButton.tsx similarity index 100% rename from apps/_components/src/ClipboardButton/ClipboardButton.tsx rename to internal/components/src/ClipboardButton/ClipboardButton.tsx diff --git a/apps/_components/src/CodeBlock/CodeBlock.module.css b/internal/components/src/CodeBlock/CodeBlock.module.css similarity index 100% rename from apps/_components/src/CodeBlock/CodeBlock.module.css rename to internal/components/src/CodeBlock/CodeBlock.module.css diff --git a/apps/_components/src/CodeBlock/CodeBlock.tsx b/internal/components/src/CodeBlock/CodeBlock.tsx similarity index 100% rename from apps/_components/src/CodeBlock/CodeBlock.tsx rename to internal/components/src/CodeBlock/CodeBlock.tsx diff --git a/apps/_components/src/ColorModal/ColorModal.module.css b/internal/components/src/ColorModal/ColorModal.module.css similarity index 100% rename from apps/_components/src/ColorModal/ColorModal.module.css rename to internal/components/src/ColorModal/ColorModal.module.css diff --git a/apps/_components/src/ColorModal/ColorModal.tsx b/internal/components/src/ColorModal/ColorModal.tsx similarity index 96% rename from apps/_components/src/ColorModal/ColorModal.tsx rename to internal/components/src/ColorModal/ColorModal.tsx index 6b57c37290..6188201df8 100644 --- a/apps/_components/src/ColorModal/ColorModal.tsx +++ b/internal/components/src/ColorModal/ColorModal.tsx @@ -1,13 +1,14 @@ import { Dialog, Heading } from '@digdir/designsystemet-react'; import type { Color } from '@digdir/designsystemet/color'; import { getCssVariable, hexToHsluv } from '@digdir/designsystemet/color'; +import type { Ref } from 'react'; import { ClipboardButton } from '../ClipboardButton/ClipboardButton'; import classes from './ColorModal.module.css'; import { capitalizeFirstLetter, getColorCombinations } from './colorModalUtils'; type ColorModalProps = { - colorModalRef: React.Ref | null; + colorModalRef: Ref | undefined; namespace: string; color: Color; }; diff --git a/apps/_components/src/ColorModal/colorModalUtils.ts b/internal/components/src/ColorModal/colorModalUtils.ts similarity index 100% rename from apps/_components/src/ColorModal/colorModalUtils.ts rename to internal/components/src/ColorModal/colorModalUtils.ts diff --git a/apps/_components/src/ColorModal/components/ContrastBoxes.tsx b/internal/components/src/ColorModal/components/ContrastBoxes.tsx similarity index 100% rename from apps/_components/src/ColorModal/components/ContrastBoxes.tsx rename to internal/components/src/ColorModal/components/ContrastBoxes.tsx diff --git a/apps/_components/src/Container/Container.module.css b/internal/components/src/Container/Container.module.css similarity index 100% rename from apps/_components/src/Container/Container.module.css rename to internal/components/src/Container/Container.module.css diff --git a/apps/_components/src/Container/Container.tsx b/internal/components/src/Container/Container.tsx similarity index 100% rename from apps/_components/src/Container/Container.tsx rename to internal/components/src/Container/Container.tsx diff --git a/apps/_components/src/Footer/Footer.module.css b/internal/components/src/Footer/Footer.module.css similarity index 100% rename from apps/_components/src/Footer/Footer.module.css rename to internal/components/src/Footer/Footer.module.css diff --git a/apps/_components/src/Footer/Footer.tsx b/internal/components/src/Footer/Footer.tsx similarity index 100% rename from apps/_components/src/Footer/Footer.tsx rename to internal/components/src/Footer/Footer.tsx diff --git a/apps/_components/src/Footer/index.ts b/internal/components/src/Footer/index.ts similarity index 100% rename from apps/_components/src/Footer/index.ts rename to internal/components/src/Footer/index.ts diff --git a/apps/_components/src/Header/Header.module.css b/internal/components/src/Header/Header.module.css similarity index 100% rename from apps/_components/src/Header/Header.module.css rename to internal/components/src/Header/Header.module.css diff --git a/apps/_components/src/Header/Header.tsx b/internal/components/src/Header/Header.tsx similarity index 100% rename from apps/_components/src/Header/Header.tsx rename to internal/components/src/Header/Header.tsx diff --git a/apps/_components/src/Header/logos/ds-logo.tsx b/internal/components/src/Header/logos/ds-logo.tsx similarity index 100% rename from apps/_components/src/Header/logos/ds-logo.tsx rename to internal/components/src/Header/logos/ds-logo.tsx diff --git a/apps/_components/src/Header/logos/figma-logo.tsx b/internal/components/src/Header/logos/figma-logo.tsx similarity index 100% rename from apps/_components/src/Header/logos/figma-logo.tsx rename to internal/components/src/Header/logos/figma-logo.tsx diff --git a/apps/_components/src/Header/logos/github-logo.tsx b/internal/components/src/Header/logos/github-logo.tsx similarity index 100% rename from apps/_components/src/Header/logos/github-logo.tsx rename to internal/components/src/Header/logos/github-logo.tsx diff --git a/apps/_components/src/Showcase/Showcase.module.css b/internal/components/src/Showcase/Showcase.module.css similarity index 100% rename from apps/_components/src/Showcase/Showcase.module.css rename to internal/components/src/Showcase/Showcase.module.css diff --git a/apps/_components/src/Showcase/Showcase.tsx b/internal/components/src/Showcase/Showcase.tsx similarity index 100% rename from apps/_components/src/Showcase/Showcase.tsx rename to internal/components/src/Showcase/Showcase.tsx diff --git a/apps/_components/src/index.ts b/internal/components/src/index.ts similarity index 100% rename from apps/_components/src/index.ts rename to internal/components/src/index.ts diff --git a/apps/_components/src/logos/Bronnoysund.tsx b/internal/components/src/logos/Bronnoysund.tsx similarity index 100% rename from apps/_components/src/logos/Bronnoysund.tsx rename to internal/components/src/logos/Bronnoysund.tsx diff --git a/apps/_components/src/logos/Digdir.tsx b/internal/components/src/logos/Digdir.tsx similarity index 100% rename from apps/_components/src/logos/Digdir.tsx rename to internal/components/src/logos/Digdir.tsx diff --git a/apps/_components/src/logos/Figma.tsx b/internal/components/src/logos/Figma.tsx similarity index 100% rename from apps/_components/src/logos/Figma.tsx rename to internal/components/src/logos/Figma.tsx diff --git a/apps/_components/src/logos/Github.tsx b/internal/components/src/logos/Github.tsx similarity index 100% rename from apps/_components/src/logos/Github.tsx rename to internal/components/src/logos/Github.tsx diff --git a/apps/_components/src/logos/KsDigital.tsx b/internal/components/src/logos/KsDigital.tsx similarity index 100% rename from apps/_components/src/logos/KsDigital.tsx rename to internal/components/src/logos/KsDigital.tsx diff --git a/apps/_components/src/logos/Mattilsynet.tsx b/internal/components/src/logos/Mattilsynet.tsx similarity index 100% rename from apps/_components/src/logos/Mattilsynet.tsx rename to internal/components/src/logos/Mattilsynet.tsx diff --git a/apps/_components/src/logos/Slack.tsx b/internal/components/src/logos/Slack.tsx similarity index 100% rename from apps/_components/src/logos/Slack.tsx rename to internal/components/src/logos/Slack.tsx diff --git a/apps/_components/src/logos/Udir.tsx b/internal/components/src/logos/Udir.tsx similarity index 100% rename from apps/_components/src/logos/Udir.tsx rename to internal/components/src/logos/Udir.tsx diff --git a/apps/_components/tsconfig.json b/internal/components/tsconfig.json similarity index 100% rename from apps/_components/tsconfig.json rename to internal/components/tsconfig.json diff --git a/package.json b/package.json index 1663d13ad7..d8503fd0f5 100644 --- a/package.json +++ b/package.json @@ -9,31 +9,31 @@ "scripts": { "test": "vitest", "test:cli": "pnpm --filter @digdir/designsystemet test --verbose", - "test:storybook": "pnpm --filter @designsystemet/storybook test-storybook", + "test:storybook": "pnpm --filter @web/storybook test-storybook", "test:coverage": "vitest run --coverage", - "storybook": "pnpm --filter @designsystemet/storybook dev", + "storybook": "pnpm --filter @web/storybook dev", "storefront": "pnpm --filter storefront dev", - "www": "pnpm --filter www.designsystemet.no dev", + "www": "pnpm --filter @web/www dev", "theme": "pnpm --filter theme dev", - "figma-plugin": "pnpm --filter figma-plugin dev", + "@plugin/figma": "pnpm --filter @plugin/figma dev", "build": "pnpm --filter @digdir/* build", "build:all": "pnpm -r build", "build:theme": "pnpm --filter theme build", - "build:figma-plugin": "pnpm --filter figma-plugin build", + "build:@plugin/figma": "pnpm --filter @plugin/figma build", "build:react": "pnpm --filter @digdir/designsystemet-react build", "build:tokens": "pnpm --filter @digdir/designsystemet build:tokens", "build:css": "pnpm --filter @digdir/designsystemet-css build", "build:cli": "pnpm --filter @digdir/designsystemet build", - "build:storybook": "pnpm --filter @designsystemet/storybook build", + "build:storybook": "pnpm --filter @web/storybook build", "build:storefront": "pnpm --filter storefront build", - "build:www": "pnpm --filter www.designsystemet.no build", + "build:www": "pnpm --filter @web/www build", "start:storefront": "pnpm --filter storefront start", "types": "pnpm -r types", "types:react": "pnpm --filter @digdir/designsystemet-react types", "types:storefront": "pnpm --filter storefront types", "version-packages": "changeset version", "publish": "pnpm build && changeset publish", - "chromatic": "pnpm --filter @designsystemet/storybook chromatic", + "chromatic": "pnpm --filter @web/storybook chromatic", "update:template": "pnpm --filter @digdir/designsystemet update:template", "update:design-tokens": "pnpm --filter @digdir/designsystemet update:design-tokens" }, diff --git a/packages/react/package.json b/packages/react/package.json index 8138c939dc..6412edad24 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -25,7 +25,9 @@ } }, "sideEffects": false, - "files": ["dist/**"], + "files": [ + "dist/**" + ], "scripts": { "build": "pnpm run clean && tsc -b tsconfig.lib.json --emitDeclarationOnly false && rollup -c --bundleConfigAsCjs", "clean": "rimraf dist && rimraf tsc-build && rimraf --glob \"*.tsbuildinfo\"", @@ -51,14 +53,19 @@ "clsx": "^2.1.1" }, "devDependencies": { - "tsx": "4.19.4", + "@digdir/designsystemet-css": "workspace:^", "@rollup/plugin-commonjs": "^28.0.3", "@rollup/plugin-node-resolve": "^16.0.1", + "@storybook/blocks": "^8.6.12", + "@storybook/preview-api": "^8.6.12", + "@storybook/react": "^8.6.12", + "@storybook/test": "^8.6.12", + "@storybook/types": "^8.6.12", "@testing-library/dom": "^10.4.0", "@testing-library/jest-dom": "^6.6.3", "@testing-library/react": "^16.3.0", "@testing-library/user-event": "^14.6.1", - "@types/react": "^19.1.0", + "@types/react": "^19.1.2", "@types/react-dom": "^19.1.1", "copyfiles": "^2.4.1", "jsdom": "^26.0.0", @@ -67,12 +74,7 @@ "rimraf": "^6.0.1", "rollup": "^4.39.0", "rollup-plugin-copy": "^3.5.0", - "typescript": "^5.8.2", - "@digdir/designsystemet-css": "workspace:^", - "@storybook/types": "^8.6.12", - "@storybook/test": "^8.6.12", - "@storybook/react": "^8.6.12", - "@storybook/blocks": "^8.6.12", - "@storybook/preview-api": "^8.6.12" + "tsx": "4.19.4", + "typescript": "^5.8.2" } } diff --git a/plugins/figma/package.json b/plugins/figma/package.json index d4e02ef96b..85f023b110 100644 --- a/plugins/figma/package.json +++ b/plugins/figma/package.json @@ -1,7 +1,7 @@ { - "name": "figma-plugin", + "name": "@plugin/figma", + "version": "0.0.0", "private": true, - "version": "0.4.0", "type": "module", "scripts": { "dev": "run-s watch", @@ -21,15 +21,15 @@ "@digdir/designsystemet-css": "workspace:^", "@digdir/designsystemet-react": "workspace:^", "@digdir/designsystemet-theme": "workspace:^", + "@navikt/aksel-icons": "^7.18.0", "clsx": "^2.1.1", "react": "^19.1.0", "react-dom": "^19.1.0", - "react-router-dom": "^7.4.1", - "@navikt/aksel-icons": "^7.18.0" + "react-router-dom": "^7.4.1" }, "devDependencies": { "@figma/plugin-typings": "^1.109.0", - "@types/react": "^19.1.0", + "@types/react": "^19.1.2", "@types/react-color": "^3.0.13", "@types/react-dom": "^19.1.1", "@vitejs/plugin-react": "^4.3.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a05cd7f7c5..64406f94f6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -60,52 +60,6 @@ importers: specifier: 3.1.1 version: 3.1.1(@types/node@22.15.3)(@vitest/browser@3.1.1)(jsdom@26.1.0)(less@4.2.0)(sass@1.71.1)(stylus@0.62.0)(terser@5.39.0)(tsx@4.19.4)(yaml@2.7.1) - apps/_components: - dependencies: - '@digdir/designsystemet': - specifier: workspace:^ - version: link:../../packages/cli - '@digdir/designsystemet-react': - specifier: workspace:^ - version: link:../../packages/react - '@digdir/designsystemet-theme': - specifier: workspace:^ - version: link:../../packages/theme - '@navikt/aksel-icons': - specifier: ^7.18.0 - version: 7.21.0 - clsx: - specifier: ^2.1.1 - version: 2.1.1 - next: - specifier: ^15.2.4 - version: 15.3.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.71.1) - prism-react-renderer: - specifier: ^2.4.1 - version: 2.4.1(react@19.1.0) - prismjs: - specifier: ^1.30.0 - version: 1.30.0 - react: - specifier: ^19.1.0 - version: 19.1.0 - react-code-block: - specifier: ^1.1.3 - version: 1.1.3(prism-react-renderer@2.4.1(react@19.1.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0) - react-dom: - specifier: ^19.1.0 - version: 19.1.0(react@19.1.0) - devDependencies: - '@types/react': - specifier: ^19.1.0 - version: 19.1.2 - '@types/react-dom': - specifier: ^19.1.1 - version: 19.1.3(@types/react@19.1.2) - typescript: - specifier: ^5.8.2 - version: 5.8.3 - apps/storefront: dependencies: '@digdir/designsystemet': @@ -120,6 +74,9 @@ importers: '@digdir/designsystemet-theme': specifier: workspace:^ version: link:../../packages/theme + '@internal/components': + specifier: workspace:^ + version: link:../../internal/components '@mdx-js/loader': specifier: ^3.1.0 version: 3.1.0(webpack@5.99.7) @@ -135,9 +92,6 @@ importers: '@radix-ui/react-slot': specifier: ^1.1.2 version: 1.2.0(@types/react@19.1.2)(react@19.1.0) - '@repo/components': - specifier: workspace:^ - version: link:../_components '@types/mdx': specifier: ^2.0.13 version: 2.0.13 @@ -179,7 +133,7 @@ importers: version: 5.99.7 devDependencies: '@types/react': - specifier: ^19.1.0 + specifier: ^19.1.2 version: 19.1.2 '@types/react-dom': specifier: ^19.1.1 @@ -206,12 +160,12 @@ importers: '@digdir/designsystemet-theme': specifier: workspace:^ version: link:../../packages/theme + '@internal/components': + specifier: workspace:^ + version: link:../../internal/components '@navikt/aksel-icons': specifier: ^7.18.0 version: 7.21.0 - '@repo/components': - specifier: workspace:^ - version: link:../_components '@storybook/addon-a11y': specifier: ^8.6.12 version: 8.6.12(storybook@8.6.12(prettier@3.5.3)) @@ -326,15 +280,15 @@ importers: '@digdir/designsystemet-theme': specifier: workspace:^ version: link:../../packages/theme + '@internal/components': + specifier: workspace:^ + version: link:../../internal/components '@navikt/aksel-icons': specifier: ^7.18.0 version: 7.21.0 '@radix-ui/react-slot': specifier: ^1.1.2 version: 1.2.0(@types/react@19.1.2)(react@19.1.0) - '@repo/components': - specifier: workspace:^ - version: link:../_components chroma-js: specifier: ^3.1.2 version: 3.1.2 @@ -364,7 +318,7 @@ importers: specifier: ^3.1.1 version: 3.1.1 '@types/react': - specifier: ^19.1.0 + specifier: ^19.1.2 version: 19.1.2 '@types/react-dom': specifier: ^19.1.1 @@ -396,9 +350,6 @@ importers: '@react-router/serve': specifier: ^7.5.2 version: 7.5.3(react-router@7.5.3(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(typescript@5.8.3) - '@repo/components': - specifier: workspace:^ - version: link:../_components '@vercel/react-router': specifier: ^1.1.0 version: 1.1.0(@react-router/dev@7.5.3(@react-router/serve@7.5.3(react-router@7.5.3(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(typescript@5.8.3))(@types/node@22.15.3)(less@4.2.0)(react-router@7.5.3(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(sass@1.71.1)(stylus@0.62.0)(terser@5.39.0)(tsx@4.19.4)(typescript@5.8.3)(vite@6.3.4(@types/node@22.15.3)(less@4.2.0)(sass@1.71.1)(stylus@0.62.0)(terser@5.39.0)(tsx@4.19.4)(yaml@2.7.1))(yaml@2.7.1))(@react-router/node@7.5.3(react-router@7.5.3(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(typescript@5.8.3))(isbot@5.1.27)(react-dom@19.1.0(react@19.1.0))(react@19.1.0) @@ -458,7 +409,7 @@ importers: specifier: ^22.14.1 version: 22.15.3 '@types/react': - specifier: ^19.1.0 + specifier: ^19.1.2 version: 19.1.2 '@types/react-dom': specifier: ^19.1.0 @@ -476,6 +427,52 @@ importers: specifier: ^5.1.4 version: 5.1.4(typescript@5.8.3)(vite@6.3.4(@types/node@22.15.3)(less@4.2.0)(sass@1.71.1)(stylus@0.62.0)(terser@5.39.0)(tsx@4.19.4)(yaml@2.7.1)) + internal/components: + dependencies: + '@digdir/designsystemet': + specifier: workspace:^ + version: link:../../packages/cli + '@digdir/designsystemet-react': + specifier: workspace:^ + version: link:../../packages/react + '@digdir/designsystemet-theme': + specifier: workspace:^ + version: link:../../packages/theme + '@navikt/aksel-icons': + specifier: ^7.18.0 + version: 7.21.0 + clsx: + specifier: ^2.1.1 + version: 2.1.1 + next: + specifier: ^15.2.4 + version: 15.3.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.71.1) + prism-react-renderer: + specifier: ^2.4.1 + version: 2.4.1(react@19.1.0) + prismjs: + specifier: ^1.30.0 + version: 1.30.0 + react: + specifier: ^19.1.0 + version: 19.1.0 + react-code-block: + specifier: ^1.1.3 + version: 1.1.3(prism-react-renderer@2.4.1(react@19.1.0))(react-dom@19.1.0(react@19.1.0))(react@19.1.0) + react-dom: + specifier: ^19.1.0 + version: 19.1.0(react@19.1.0) + devDependencies: + '@types/react': + specifier: ^19.1.2 + version: 19.1.2 + '@types/react-dom': + specifier: ^19.1.1 + version: 19.1.3(@types/react@19.1.2) + typescript: + specifier: ^5.8.2 + version: 5.8.3 + packages/cli: dependencies: '@commander-js/extra-typings': @@ -664,7 +661,7 @@ importers: specifier: ^14.6.1 version: 14.6.1(@testing-library/dom@10.4.0) '@types/react': - specifier: ^19.1.0 + specifier: ^19.1.2 version: 19.1.2 '@types/react-dom': specifier: ^19.1.1 @@ -740,7 +737,7 @@ importers: specifier: ^1.109.0 version: 1.110.0 '@types/react': - specifier: ^19.1.0 + specifier: ^19.1.2 version: 19.1.2 '@types/react-color': specifier: ^3.0.13 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 7990829a6b..503f17fb44 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -3,6 +3,7 @@ packages: - packages/* - apps/* - plugins/* + - internal/* ignoredBuiltDependencies: - '@bundled-es-modules/glob' - sharp