rk-designsystem 1.3.4 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rk-designsystem",
3
- "version": "1.3.4",
3
+ "version": "1.4.0",
4
4
  "description": "A React component library built on top of Digdir Design System",
5
5
  "author": "daniel@tunetek.no",
6
6
  "license": "MIT",
@@ -33,6 +33,7 @@
33
33
  "types": "./dist/index.d.ts",
34
34
  "import": "./dist/index.js"
35
35
  },
36
+ "./package.json": "./package.json",
36
37
  "./styles": "./dist/styles.css",
37
38
  "./styles.css": "./dist/styles.css",
38
39
  "./dist/rk-designsystem.css": "./dist/rk-designsystem.css"
@@ -46,10 +47,10 @@
46
47
  "LICENSE"
47
48
  ],
48
49
  "peerDependencies": {
49
- "@digdir/designsystemet-css": "~1.13.2",
50
- "@digdir/designsystemet-react": "~1.13.2",
51
- "react": ">=18.3.1 || ^19.0.0",
52
- "react-dom": ">=18.3.1 || ^19.0.0"
50
+ "@digdir/designsystemet-css": "^1.21.0",
51
+ "@digdir/designsystemet-react": "^1.21.0",
52
+ "react": "^18.3.1 || ^19.0.0",
53
+ "react-dom": "^18.3.1 || ^19.0.0"
53
54
  },
54
55
  "scripts": {
55
56
  "dev": "vite",
@@ -57,21 +58,18 @@
57
58
  "copy-styles": "node scripts/build-styles.mjs",
58
59
  "test:packaging": "node scripts/packaging-smoke.mjs",
59
60
  "clean": "rimraf dist",
60
- "lint": "eslint .",
61
+ "lint": "eslint . --max-warnings=0",
61
62
  "check:tokens": "node scripts/check-tokens.mjs",
62
63
  "typecheck": "tsc --noEmit -p tsconfig.app.json",
63
64
  "test": "vitest run --config vitest.config.ts",
64
65
  "preview": "vite preview",
65
66
  "prepack": "npm run build",
66
67
  "storybook": "storybook dev -p 6006",
67
- "build-storybook": "npm run generate-metadata && npm run update-ai-guide-components && npm run generate-ai-context-manifest && storybook build --output-dir storybook-build",
68
+ "build-storybook": "npm run generate-metadata && npm run update-ai-guide-components && npm run generate-ai-context-manifest && storybook build --output-dir storybook-build && node scripts/copy-ai-artifacts.mjs",
68
69
  "generate-metadata": "node generate-metadata.mjs",
69
70
  "update-ai-guide-components": "node update-ai-guide-components.mjs",
70
71
  "generate-ai-context-manifest": "node generate-ai-context-manifest.mjs",
71
- "predeploy:storybook": "npm run build-storybook && npm run copy-metadata && npm run copy-ai-guide && npm run copy-ai-context",
72
- "copy-metadata": "node -e \"require('fs').copyFileSync('metadata.json', 'storybook-build/metadata.json')\"",
73
- "copy-ai-guide": "node -e \"require('fs').copyFileSync('AI_DESIGN_SYSTEM_GUIDE.md', 'storybook-build/AI_DESIGN_SYSTEM_GUIDE.md')\"",
74
- "copy-ai-context": "node -e \"require('fs').copyFileSync('ai-context.manifest.json', 'storybook-build/ai-context.manifest.json')\"",
72
+ "predeploy:storybook": "npm run build-storybook",
75
73
  "deploy:storybook": "gh-pages -d storybook-build -b gh-pages -r https://github.com/norwegianredcross/DesignSystem.git --dest storybook",
76
74
  "build:app": "vite build --config vite.app.config.ts",
77
75
  "deploy:app": "npm run build:app && gh-pages -d dist-app -b gh-pages -r https://github.com/norwegianredcross/DesignSystem.git --add",
@@ -79,9 +77,9 @@
79
77
  "test:visual:update": "playwright test -c playwright.visual.config.ts --update-snapshots"
80
78
  },
81
79
  "devDependencies": {
82
- "@digdir/designsystemet": "~1.13.3",
83
- "@digdir/designsystemet-css": "~1.13.3",
84
- "@digdir/designsystemet-react": "~1.13.3",
80
+ "@digdir/designsystemet": "^1.21.0",
81
+ "@digdir/designsystemet-css": "^1.21.0",
82
+ "@digdir/designsystemet-react": "^1.21.0",
85
83
  "@eslint/js": "^9.21.0",
86
84
  "@playwright/test": "^1.56.1",
87
85
  "@storybook/addon-a11y": "^10.2.12",
@@ -94,10 +92,10 @@
94
92
  "@vitest/browser": "^3.1.2",
95
93
  "eslint": "^9.21.0",
96
94
  "eslint-plugin-react-hooks": "^5.1.0",
97
- "eslint-plugin-react-refresh": "^0.4.19",
95
+ "eslint-plugin-react-refresh": "^0.5.5",
98
96
  "gh-pages": "^6.3.0",
99
- "glob": "^11.0.3",
100
- "globals": "^15.15.0",
97
+ "glob": "^13.0.6",
98
+ "globals": "^17.11.0",
101
99
  "playwright": "^1.52.0",
102
100
  "prettier": "^3.6.2",
103
101
  "react": "^19.2.0",
@@ -105,21 +103,15 @@
105
103
  "react-dom": "^19.0.0",
106
104
  "rimraf": "^6.0.1",
107
105
  "storybook": "^10.2.12",
108
- "typescript": "~5.7.2",
106
+ "typescript": "~5.9.3",
109
107
  "typescript-eslint": "^8.24.1",
110
108
  "vite": "^6.2.0",
111
109
  "vite-plugin-dts": "^4.5.4",
112
110
  "vitest": "^3.1.2"
113
111
  },
114
- "eslintConfig": {
115
- "extends": [
116
- "plugin:storybook/recommended"
117
- ]
118
- },
119
112
  "dependencies": {
120
- "@digdir/designsystemet-types": "1.13.3",
121
- "@navikt/aksel-icons": "^7.20.0",
122
- "classnames": "^2.5.1",
113
+ "@digdir/designsystemet-types": "^1.21.0",
114
+ "@navikt/aksel-icons": "^8.16.1",
123
115
  "date-fns": "^4.1.0",
124
116
  "embla-carousel-react": "^8.6.0",
125
117
  "rk-design-tokens": "^1.0.49"
@@ -1,106 +0,0 @@
1
- "use client";
2
- const e = [
3
- // Pages
4
- { id: "home", title: "Hjem", category: "Page", path: "home", description: { NO: "Forsiden", EN: "The front page" } },
5
- { id: "components", title: "Komponenter", category: "Page", path: "components", description: { NO: "Oversikt over alle komponenter", EN: "Overview of all components" } },
6
- { id: "whats-new", title: "Hva er nytt", category: "Page", path: "whats-new", description: { NO: "Utgivelser og endringer i designsystemet", EN: "Releases and changes in the design system" } },
7
- { id: "design", title: "Design", category: "Page", path: "design", description: { NO: "Designretningslinjer og prinsipper", EN: "Design guidelines and principles" } },
8
- { id: "designretning", title: "Designretning", category: "Page", path: "designretning", description: { NO: "Prinsipper og virkemidler for digitale flater", EN: "Principles and approaches for digital surfaces" } },
9
- { id: "code", title: "Kode", category: "Page", path: "code", description: { NO: "Utviklerdokumentasjon og oppsett", EN: "Developer documentation and setup" } },
10
- { id: "tokens", title: "Tokens", category: "Page", path: "tokens", description: { NO: "Design tokens: farger, størrelser og typografi", EN: "Design tokens: colors, sizes and typography" } },
11
- // Components (samme utvalg som komponentkatalogen)
12
- { id: "alert", title: "Alert", category: "Component", path: "components/alert", description: { NO: "Varselbokser for viktige meldinger", EN: "Alert boxes for important messages" } },
13
- { id: "avatar", title: "Avatar", category: "Component", path: "components/avatar", description: { NO: "Profilbilder og initialer", EN: "Profile pictures and initials" } },
14
- { id: "badge", title: "Badge", category: "Component", path: "components/badge", description: { NO: "Små merker for status eller antall", EN: "Small badges for status or counts" } },
15
- { id: "breadcrumbs", title: "Breadcrumbs", category: "Component", path: "components/breadcrumbs", description: { NO: "Brødsmulesti for navigasjon", EN: "Breadcrumb trail for navigation" } },
16
- { id: "button", title: "Button", category: "Component", path: "components/button", description: { NO: "Knapper for handlinger", EN: "Buttons for actions" } },
17
- { id: "card", title: "Card", category: "Component", path: "components/card", description: { NO: "Kort for gruppering av innhold", EN: "Cards for grouping content" } },
18
- { id: "carousel", title: "Carousel", category: "Component", path: "components/carousel", description: { NO: "Bildekarusell", EN: "Image carousel" } },
19
- { id: "checkbox", title: "Checkbox", category: "Component", path: "components/checkbox", description: { NO: "Valg av flere alternativer", EN: "Selecting multiple options" } },
20
- { id: "chip", title: "Chip", category: "Component", path: "components/chip", description: { NO: "Filtrering og valg i kompakte merker", EN: "Filtering and selection in compact badges" } },
21
- { id: "dateinput", title: "DateInput", category: "Component", path: "components/dateinput", description: { NO: "Tekstfelt for dato (dd.mm.åååå)", EN: "Text field for dates (dd.mm.yyyy)" } },
22
- { id: "datepicker", title: "DatePicker", category: "Component", path: "components/datepicker", description: { NO: "Kalender for valg av dato", EN: "Calendar for picking a date" } },
23
- { id: "details", title: "Details", category: "Component", path: "components/details", description: { NO: "Ekspanderbare seksjoner", EN: "Expandable sections" } },
24
- { id: "dialog", title: "Dialog", category: "Component", path: "components/dialog", description: { NO: "Modale vinduer", EN: "Modal windows" } },
25
- { id: "divider", title: "Divider", category: "Component", path: "components/divider", description: { NO: "Skillelinjer", EN: "Divider lines" } },
26
- { id: "donor", title: "Donor", category: "Component", path: "components/donor", description: { NO: "Donasjonsmodul med beløpsvalg og Vipps", EN: "Donation module with amount selection and Vipps" } },
27
- { id: "dropdown", title: "Dropdown", category: "Component", path: "components/dropdown", description: { NO: "Nedtrekksmenyer", EN: "Dropdown menus" } },
28
- { id: "errorsummary", title: "ErrorSummary", category: "Component", path: "components/errorsummary", description: { NO: "Oppsummering av skjemafeil", EN: "Summary of form errors" } },
29
- { id: "field", title: "Field", category: "Component", path: "components/field", description: { NO: "Feltoppsett med etikett og beskrivelse", EN: "Field layout with label and description" } },
30
- { id: "fieldset", title: "Fieldset", category: "Component", path: "components/fieldset", description: { NO: "Gruppering av skjemafelt", EN: "Grouping of form fields" } },
31
- { id: "footer", title: "Footer", category: "Component", path: "components/footer", description: { NO: "Bunntekst med lenker og kontaktinformasjon", EN: "Footer with links and contact information" } },
32
- { id: "graphicelement", title: "GraphicElement", category: "Component", path: "components/graphicelement", description: { NO: "Grafiske merkevareelementer fra designretningen", EN: "Graphic brand elements from the visual direction" } },
33
- { id: "header", title: "Header", category: "Component", path: "components/header", description: { NO: "Topptekst og navigasjon", EN: "Header and navigation" } },
34
- { id: "heading", title: "Heading", category: "Component", path: "components/heading", description: { NO: "Overskrifter", EN: "Headings" } },
35
- { id: "input", title: "Input", category: "Component", path: "components/input", description: { NO: "Tekstfelt for brukerinput", EN: "Text field for user input" } },
36
- { id: "label", title: "Label", category: "Component", path: "components/label", description: { NO: "Etiketter for skjemafelt", EN: "Labels for form fields" } },
37
- { id: "link", title: "Link", category: "Component", path: "components/link", description: { NO: "Lenker til andre sider", EN: "Links to other pages" } },
38
- { id: "list", title: "List", category: "Component", path: "components/list", description: { NO: "Ordnede og uordnede lister", EN: "Ordered and unordered lists" } },
39
- { id: "pagination", title: "Pagination", category: "Component", path: "components/pagination", description: { NO: "Navigasjon mellom sider", EN: "Navigation between pages" } },
40
- { id: "paragraph", title: "Paragraph", category: "Component", path: "components/paragraph", description: { NO: "Brødtekst", EN: "Body text" } },
41
- { id: "popover", title: "Popover", category: "Component", path: "components/popover", description: { NO: "Flytende innholdsbokser", EN: "Floating content boxes" } },
42
- { id: "radio", title: "Radio", category: "Component", path: "components/radio", description: { NO: "Valg av ett alternativ", EN: "Selecting a single option" } },
43
- { id: "search", title: "Search", category: "Component", path: "components/search", description: { NO: "Søkefelter", EN: "Search fields" } },
44
- { id: "select", title: "Select", category: "Component", path: "components/select", description: { NO: "Valgmeny", EN: "Select menu" } },
45
- { id: "skeletonloader", title: "SkeletonLoader", category: "Component", path: "components/skeletonloader", description: { NO: "Plassholdere under lasting", EN: "Placeholders while loading" } },
46
- { id: "skiplink", title: "SkipLink", category: "Component", path: "components/skiplink", description: { NO: "Hopp til hovedinnhold", EN: "Skip to main content" } },
47
- { id: "spinnerloader", title: "SpinnerLoader", category: "Component", path: "components/spinnerloader", description: { NO: "Lasteindikator", EN: "Loading indicator" } },
48
- { id: "suggestion", title: "Suggestion", category: "Component", path: "components/suggestion", description: { NO: "Søkefelt med forslag", EN: "Search field with suggestions" } },
49
- { id: "switch", title: "Switch", category: "Component", path: "components/switch", description: { NO: "Av/på bryter", EN: "On/off toggle" } },
50
- { id: "table", title: "Table", category: "Component", path: "components/table", description: { NO: "Tabeller for data", EN: "Tables for data" } },
51
- { id: "tabs", title: "Tabs", category: "Component", path: "components/tabs", description: { NO: "Faner for inndeling av innhold", EN: "Tabs for dividing content" } },
52
- { id: "tag", title: "Tag", category: "Component", path: "components/tag", description: { NO: "Merkelapper og emneknagger", EN: "Labels and hashtags" } },
53
- { id: "textarea", title: "Textarea", category: "Component", path: "components/textarea", description: { NO: "Flerlinjers tekstfelt", EN: "Multi-line text field" } },
54
- { id: "textfield", title: "Textfield", category: "Component", path: "components/textfield", description: { NO: "Komplett tekstfelt med etikett", EN: "Complete text field with label" } },
55
- { id: "togglegroup", title: "ToggleGroup", category: "Component", path: "components/togglegroup", description: { NO: "Grupperte veksleknapper", EN: "Grouped toggle buttons" } },
56
- { id: "tooltip", title: "Tooltip", category: "Component", path: "components/tooltip", description: { NO: "Hjelpetekster ved hover", EN: "Help text on hover" } },
57
- { id: "validationmessage", title: "ValidationMessage", category: "Component", path: "components/validationmessage", description: { NO: "Feilmeldinger for skjemafelt", EN: "Error messages for form fields" } },
58
- // Designretning — kapitler
59
- { id: "designretning-varm", title: "Varm — farger og typografi", category: "Design", path: "designretning/varm", description: { NO: "Utvidet fargepalett, fargehierarki og typografi", EN: "Extended color palette, color hierarchy and typography" } },
60
- { id: "designretning-rod-trad", title: "Rød tråd (kors)", category: "Design", path: "designretning/rod-trad", description: { NO: "Grafisk formspråk avledet av korset", EN: "Graphic language derived from the cross" } },
61
- { id: "designretning-mennesker", title: "Mennesker i fokus", category: "Design", path: "designretning/mennesker-i-fokus", description: { NO: "Ekte historier og mennesker som bærende element", EN: "Real stories and people as a load-bearing element" } },
62
- { id: "designretning-sosial", title: "Sosial tilstedeværelse", category: "Design", path: "designretning/sosial-tilstedevaerelse", description: { NO: "Deling og distribusjon uten dobbeltarbeid", EN: "Sharing and distribution without duplicate work" } },
63
- { id: "designretning-framdrift", title: "Framdrift og effekt", category: "Design", path: "designretning/framdrift-og-effekt", description: { NO: "Vise at handling skaper effekt", EN: "Showing that action creates impact" } },
64
- // Design — For designere
65
- { id: "figma-oppkobling", title: "Figma tilkobling", category: "Design", path: "design/figma-oppkobling", description: { NO: "Hvordan koble til Figma-biblioteket", EN: "How to connect to the Figma library" } },
66
- { id: "oppstart", title: "Oppstart", category: "Design", path: "design/oppstart", description: { NO: "Oppsett av arbeidsområde", EN: "Setting up your workspace" } },
67
- { id: "lage-komponenter", title: "Lage en ny komponent", category: "Design", path: "design/lage-komponenter", description: { NO: "Veileder for komponentbygging", EN: "Guide to building components" } },
68
- { id: "praktiske-eksempler", title: "Praktiske eksempler", category: "Design", path: "design/praktiske-eksempler", description: { NO: "Eksempler på bruk av designsystemet", EN: "Examples of using the design system" } },
69
- { id: "token-studio", title: "Token Studio", category: "Design", path: "design/token-studio", description: { NO: "Bruk av Token Studio", EN: "Using Token Studio" } },
70
- // Design — Farger
71
- { id: "fargesystem", title: "Sette opp ditt eget fargesystem", category: "Design", path: "design/fargesystem", description: { NO: "Hvordan sette opp farger", EN: "How to set up colors" } },
72
- { id: "temabygger", title: "Temabygger", category: "Design", path: "design/temabygger", description: { NO: "Designsystemets temagenerator", EN: "The design system's theme generator" } },
73
- { id: "bruk-farger", title: "Bruk fargene", category: "Design", path: "design/bruk-farger", description: { NO: "Bruk genererte farger", EN: "Using the generated colors" } },
74
- // Design — Guider
75
- { id: "vedlikeholde-design-tokens", title: "Vedlikeholde design tokens", category: "Design", path: "design/vedlikeholde-design-tokens", description: { NO: "Endre tokens og publisere ny versjon", EN: "Changing tokens and publishing a new version" } },
76
- { id: "endre-bygge-tema", title: "Endre og bygge tema", category: "Design", path: "design/endre-bygge-tema", description: { NO: "Temaoppsett og bygging av tokens", EN: "Theme setup and building tokens" } },
77
- { id: "koble-tokens-til-figma", title: "Koble tokens til Figma", category: "Design", path: "design/koble-tokens-til-figma", description: { NO: "Synkronisere tokens med Figma", EN: "Synchronizing tokens with Figma" } },
78
- // Design — Bidra
79
- { id: "foresla-design", title: "Foreslå nytt design", category: "Design", path: "design/foresla-design", description: { NO: "Hvordan bidra med nytt design", EN: "How to contribute new design" } },
80
- // Design — Designelementer
81
- { id: "hva-er-design-tokens", title: "Hva er design tokens", category: "Design", path: "design/hva-er-design-tokens", description: { NO: "Introduksjon til design tokens", EN: "Introduction to design tokens" } },
82
- { id: "design-tokens-i-figma", title: "Design tokens i Figma", category: "Design", path: "design/design-tokens-i-figma", description: { NO: "Bruke tokens i Figma", EN: "Using tokens in Figma" } },
83
- { id: "farger-navnestruktur", title: "Farger: Navnestruktur", category: "Design", path: "design/farger-navnestruktur", description: { NO: "Navngiving av farger", EN: "Naming of colors" } },
84
- { id: "farger-oversikt", title: "Farger: Oversikt", category: "Design", path: "design/farger-oversikt", description: { NO: "Oversikt og forklaringer av farger", EN: "Overview and explanations of the colors" } },
85
- { id: "farge-tokens", title: "Farge-tokens", category: "Design", path: "design/farge-tokens", description: { NO: "Tokens for farger", EN: "Tokens for colors" } },
86
- { id: "skygger-bruk", title: "Bruk av skygger", category: "Design", path: "design/skygger-bruk", description: { NO: "Retningslinjer for skygger", EN: "Guidelines for shadows" } },
87
- { id: "skygge-tokens", title: "Skygge-tokens", category: "Design", path: "design/skygge-tokens", description: { NO: "Tokens for skygger", EN: "Tokens for shadows" } },
88
- { id: "komponent-storrelser", title: "Komponentstørrelser", category: "Design", path: "design/komponent-storrelser", description: { NO: "Størrelsesguide for komponenter", EN: "Size guide for components" } },
89
- { id: "storrelse-tokens", title: "Størrelse-tokens", category: "Design", path: "design/storrelse-tokens", description: { NO: "Tokens for størrelser", EN: "Tokens for sizes" } },
90
- { id: "font-family", title: "Typografi: Font-family", category: "Design", path: "design/font-family", description: { NO: "Font-familier", EN: "Font families" } },
91
- { id: "typografi-tokens", title: "Typografi-tokens", category: "Design", path: "design/typografi-tokens", description: { NO: "Tokens for typografi", EN: "Tokens for typography" } },
92
- // Code
93
- { id: "kom-i-gang", title: "Kom i gang (Kode)", category: "Code", path: "code/kom-i-gang", description: { NO: "Installasjon og oppsett", EN: "Installation and setup" } },
94
- { id: "code-design-tokens", title: "Design tokens (Kode)", category: "Code", path: "code/design-tokens", description: { NO: "Bruke tokens i kode", EN: "Using tokens in code" } },
95
- { id: "fonts", title: "Fonter", category: "Code", path: "code/fonts", description: { NO: "Oppsett av Source Sans 3", EN: "Setting up Source Sans 3" } },
96
- { id: "icons", title: "Ikoner", category: "Code", path: "code/icons", description: { NO: "Ikonbibliotek og bruk", EN: "Icon library and usage" } },
97
- { id: "contributing", title: "Bidra med kode", category: "Code", path: "code/contributing", description: { NO: "Retningslinjer for bidrag", EN: "Contribution guidelines" } },
98
- { id: "figma-mcp-intro", title: "Fra Figma til kode (MCP)", category: "Code", path: "code/figma-mcp-intro", description: { NO: "Automatisert arbeidsflyt med MCP", EN: "Automated workflow with MCP" } },
99
- { id: "figma-mcp-cursor", title: "Figma MCP i Cursor", category: "Code", path: "code/figma-mcp-cursor", description: { NO: "Oppsett av MCP i Cursor", EN: "Setting up MCP in Cursor" } },
100
- { id: "figma-mcp-claude", title: "Figma MCP i Claude", category: "Code", path: "code/figma-mcp-claude", description: { NO: "Oppsett av MCP i Claude", EN: "Setting up MCP in Claude" } },
101
- { id: "komponent-kreasjon", title: "Komponentkreasjon", category: "Code", path: "code/komponent-kreasjon", description: { NO: "Opprette nye komponenter", EN: "Creating new components" } },
102
- { id: "metadata-files", title: "Metadata-filer", category: "Code", path: "code/metadata-files", description: { NO: "Struktur og bruk av metadata.json", EN: "Structure and use of metadata.json" } }
103
- ];
104
- export {
105
- e as searchIndex
106
- };