Skip to content
Commits on Source (205)
......@@ -4,7 +4,12 @@ module.exports = {
ecmaVersion: "latest",
sourceType: "module",
},
ignorePatterns: [".eslintrc.js", "*.config.ts", "docs/tutorial/**"],
ignorePatterns: [
".eslintrc.js",
"*.config.ts",
"docs/tutorial/**",
"turbo/generators/**",
],
rules: {},
overrides: [
{
......
default:
image: node:20.15.0
image: node:20.17.0
interruptible: true
include:
......@@ -109,6 +109,41 @@ test-e2e:
except:
- schedules
test-e2e-update-snapshots:
stage: test
extends: .npm_cache
id_tokens:
VAULT_ID_TOKEN:
aud: "https://vault.sikt.no:8200"
secrets:
CI_TOKEN:
vault: "gitlab/${CI_PROJECT_PATH}/ci-token@secret"
token: $VAULT_ID_TOKEN
file: false
script:
- npm pkg delete scripts.prepare
- npm ci
- npx playwright install --with-deps
- npm run test:e2e -- --update-snapshots
after_script:
- git config user.name "CI Pipeline"
- git config user.email "cipipeline@example.com"
- git add "packages/**/playwright/**/*.png"
- >
git commit -m "test: update playwright snapshots"
- git remote set-url --push origin "https://$CI_TOKEN@gitlab.sikt.no/designsystem/sds-komponentbibliotek.git"
- git push origin HEAD:$CI_COMMIT_REF_NAME
needs:
- install
- packages
when: manual
only:
- branches
- merge_requests
except:
- main
- schedules
.vuln:
stage: test
extends: .imagescan
......@@ -202,7 +237,7 @@ storybook:
name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
expire_in: 1 days
paths:
- storybook/storybook-static
- apps/storybook/storybook-static
needs:
- install
- packages
......@@ -228,13 +263,13 @@ gatsby:
policy: pull
- key: "$CI_JOB_NAME-$CI_COMMIT_BRANCH"
paths:
- gatsby/.cache/
- gatsby/public/
- apps/gatsby/.cache/
- apps/gatsby/public/
artifacts:
name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
expire_in: 1 days
paths:
- gatsby/public
- apps/gatsby/public
dependencies:
- packages
needs:
......@@ -352,6 +387,6 @@ release-report:
extends: .tag
script:
- >
curl --request POST --header "Content-Type: application/json" --data "{\"text\":\"Tag $CI_COMMIT_TAG succeeded on $CI_COMMIT_BRANCH <$CI_PIPELINE_URL|$CI_PIPELINE_ID>\"}" "${SLACK_WEBHOOK_URL_PUBLIC}"
curl --request POST --header "Content-Type: application/json" --data "{\"text\":\"Release <https://${CI_SERVER_HOST}/${CI_PROJECT_PATH}/-/releases/${CI_COMMIT_TAG}|$CI_COMMIT_TAG> succeeded on $CI_COMMIT_BRANCH <$CI_PIPELINE_URL|$CI_PIPELINE_ID>\"}" "${SLACK_WEBHOOK_URL_PUBLIC}"
needs:
- publish
20.17.0
......@@ -5,3 +5,4 @@ storybook-static
gatsby/public
.cache
gatsby-types.d.ts
turbo/generators/template
\ No newline at end of file
......@@ -113,8 +113,10 @@ See [Example](./docs/tutorial/__example__) component for base setup.
Initialize a package:
When asked, enter a package name without `sds-` prefix.
```sh
npm run init --package=<package-name>
npm run init
```
If you have custom build needs, the build script and entry points may vary.
......@@ -163,6 +165,8 @@ npx playwright install --with-deps
CI=true npx playwright test --update-snapshots
```
This can also be done in the CI pipeline with the manual job `test-e2e-update-snapshots`.
**Note** This should only be done when you add new components or you have made changes to existing ones and have verified everything is correct!
#### Merge request
......
FROM nginx:latest
RUN rm -rf /usr/share/nginx/html
COPY gatsby/public /usr/share/nginx/html
COPY storybook/storybook-static /usr/share/nginx/html/storybook
COPY apps/gatsby/public /usr/share/nginx/html
COPY apps/storybook/storybook-static /usr/share/nginx/html/storybook
COPY nginx.conf /etc/nginx/conf.d/default.conf
......@@ -59,7 +59,7 @@ const config: GatsbyConfig = {
resolve: "gatsby-source-filesystem",
options: {
name: "components",
path: `${__dirname}/../packages`,
path: `${__dirname}/../../packages`,
ignore: [
"**/.*",
"**/*.png",
......
......@@ -63,6 +63,7 @@ export const createPages: GatsbyNode["createPages"] = async ({
const pathToPackageJson = path.resolve(
__dirname,
"..",
"..",
"packages",
packageDir,
"package.json",
......
......@@ -14,12 +14,11 @@
"@mdx-js/mdx": "^3.0.1",
"@mdx-js/react": "^3.0.1",
"@phosphor-icons/react": "^2.1.7",
"@sikt/sds-accordion": "^2.0.2",
"@sikt/sds-badge": "^2.0.0",
"@sikt/sds-breadcrumbs": "^2.0.0",
"@sikt/sds-button": "^3.1.0",
"@sikt/sds-card": "^3.1.0",
"@sikt/sds-core": "^3.0.2",
"@sikt/sds-card": "^4.0.0",
"@sikt/sds-core": "^3.1.0",
"@sikt/sds-footer": "^2.0.0",
"@sikt/sds-header": "^3.0.3",
"@sikt/sds-icons": "^2.0.1",
......@@ -27,11 +26,11 @@
"@sikt/sds-logo": "^2.0.0",
"@sikt/sds-section": "^3.0.0",
"@sikt/sds-table": "^2.0.1",
"@sikt/sds-tokens": "^1.0.1",
"@sikt/sds-tokens": "^2.0.1",
"canvas-confetti": "^1.9.3",
"clsx": "^2.1.1",
"gatsby": "^5.13.6",
"gatsby-plugin-matomo": "^0.16.2",
"gatsby": "^5.13.7",
"gatsby-plugin-matomo": "^0.16.3",
"gatsby-plugin-mdx": "^5.13.1",
"gatsby-plugin-robots-txt": "^1.8.0",
"gatsby-plugin-sitemap": "^6.13.1",
......@@ -42,16 +41,16 @@
},
"devDependencies": {
"@types/canvas-confetti": "^1.6.4",
"@types/node": "^20.14.9",
"@types/react": "^18.3.3",
"@types/node": "^20.16.5",
"@types/react": "^18.3.8",
"@types/react-dom": "^18.3.0",
"eslint-config-react-app": "^7.0.1",
"gatsby-plugin-force-file-loader": "^5.0.1",
"gatsby-plugin-layout": "^4.13.1",
"gatsby-plugin-manifest": "^5.13.1",
"gatsby-plugin-postcss": "^6.13.1",
"postcss": "^8.4.39",
"style-dictionary": "^4.0.0",
"typescript": "^5.5.2"
"postcss": "^8.4.47",
"style-dictionary": "^4.1.2",
"typescript": "^5.6.2"
}
}
......@@ -27,12 +27,20 @@ const Contributors = ({
: []),
],
[
{ name: "Kjartan", role: "Teknologi", team: "Opptak Søker" },
{ name: "Sondre S.", role: "Teknologi", team: "Opptak Søker" },
{ name: "Erik", role: "Teknologi", team: "Opptak Søker" },
{ name: "Vegard", role: "Teknologi", team: "Opptak Søker" },
{ name: "Hilde", role: "Design", team: "Opptak Søker" },
{ name: "Jakob", role: "Teknologi", team: "Opptak Søker" },
{
name: "Kjartan",
role: "Teknologi",
team: "Studieadm. Min utdanning",
},
{
name: "Sondre S.",
role: "Teknologi",
team: "Studieadm. Min utdanning",
},
{ name: "Erik", role: "Teknologi", team: "Studieadm. Min utdanning" },
{ name: "Vegard", role: "Teknologi", team: "Studieadm. Min utdanning" },
{ name: "Hilde", role: "Design", team: "Studieadm. Min utdanning" },
{ name: "Jakob", role: "Teknologi", team: "Studieadm. Min utdanning" },
],
[
{ name: "Sigurd", role: "Teknologi", team: "Kudaf" },
......@@ -40,16 +48,17 @@ const Contributors = ({
{ name: "Glaysa", role: "Teknologi", team: "Kudaf" },
],
[
{ name: "Marius", role: "Teknologi", team: "Opptak Søknadsbehandling" },
{ name: "Patrick", role: "Teknologi", team: "Opptak Søknadsbehandling" },
{ name: "An", role: "Teknologi", team: "Opptak Søknadsbehandling" },
{ name: "Mats", role: "Teknologi", team: "Studieadm. Admin" },
{ name: "Marius", role: "Teknologi", team: "Studieadm. Admin" },
{ name: "Patrick", role: "Teknologi", team: "Studieadm. Admin" },
{ name: "An", role: "Teknologi", team: "Studieadm. Admin" },
],
[
{ name: "Jonas", role: "Teknologi", team: "FS Studentportal" },
{ name: "Christian", role: "Design", team: "FS Studentportal" },
{ name: "Lasse", role: "Teknologi", team: "FS Studentportal" },
],
[{ name: "Sondre L.", role: "Teknologi", team: "Opptak Kjerne" }],
[{ name: "Sondre L.", role: "Teknologi", team: "Studieadm. Kjerne" }],
[{ name: "John-Magne", role: "Teknologi", team: "Feide Kundeportal" }],
[{ name: "Deg", role: "Din rolle", team: "Ditt team" }],
];
......
......@@ -3,7 +3,7 @@ import { Footer as SdsFooter } from "@sikt/sds-footer";
import * as style from "./footer.module.css";
import { ButtonLink } from "@sikt/sds-button";
import { Link } from "@sikt/sds-core";
import clsx from "clsx";
import { clsx } from "clsx/lite";
const Footer = ({ className }: { className?: string }) => {
return (
......
import { ReactNode } from "react";
import clsx from "clsx";
import { clsx } from "clsx/lite";
import { BreadcrumbItem, Breadcrumbs } from "@sikt/sds-breadcrumbs";
import { Link as GatsbyLink } from "gatsby-link";
import { Heading1 } from "@sikt/sds-core";
......
import { ElementType, forwardRef, ReactNode } from "react";
import clsx from "clsx";
import { clsx } from "clsx/lite";
import { ArrowRightIcon } from "@sikt/sds-icons";
import * as style from "./nav-card.module.css";
......
import { ReactNode } from "react";
import clsx from "clsx";
import { clsx } from "clsx/lite";
import { WarningIcon } from "@sikt/sds-icons";
import * as style from "./notice.module.css";
......