@folkehelseinstituttet/designsystem 0.1.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/.gitignore +31 -0
- package/.release-it.json +36 -0
- package/.storybook/main.ts +15 -0
- package/.storybook/preview.ts +16 -0
- package/CHANGELOG.md +42 -0
- package/README.md +40 -0
- package/dist/cdn/fhi-designsystem.js +1259 -0
- package/dist/cdn/fhi-designsystem.js.map +1 -0
- package/dist/cdn/fhi-designsystem.umd.cjs +647 -0
- package/dist/cdn/fhi-designsystem.umd.cjs.map +1 -0
- package/dist/cdn/index.html +0 -0
- package/dist/cdn/staticwebapp.config.json +6 -0
- package/dist/cdn/theme/default.css +309 -0
- package/dist/npm/README.md +40 -0
- package/dist/npm/fhi-button.js +1259 -0
- package/dist/npm/fhi-button.js.map +1 -0
- package/dist/npm/index.js +6 -0
- package/dist/npm/index.js.map +1 -0
- package/dist/npm/package.json +85 -0
- package/dist/npm/theme/default.css +309 -0
- package/index.html +19 -0
- package/package.json +85 -0
- package/src/components/fhi-button/fhi-button.docs.mdx +83 -0
- package/src/components/fhi-button/fhi-button.stories.ts +118 -0
- package/src/components/fhi-button/fhi-button.test.ts +82 -0
- package/src/components/fhi-button/fhi-button.ts +693 -0
- package/src/library.ts +3 -0
- package/src/storybook/getting_started.mdx +187 -0
- package/src/theme/default.css +309 -0
- package/src/vite-env.d.ts +1 -0
- package/staticwebapp.config.json +6 -0
- package/tsconfig.json +24 -0
- package/vite.config.js +93 -0
- package/web-test-runner.config.mjs +6 -0
package/.gitignore
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Logs
|
|
2
|
+
logs
|
|
3
|
+
*.log
|
|
4
|
+
npm-debug.log*
|
|
5
|
+
yarn-debug.log*
|
|
6
|
+
yarn-error.log*
|
|
7
|
+
pnpm-debug.log*
|
|
8
|
+
lerna-debug.log*
|
|
9
|
+
|
|
10
|
+
node_modules
|
|
11
|
+
dist
|
|
12
|
+
dist-ssr
|
|
13
|
+
*.local
|
|
14
|
+
|
|
15
|
+
# Editor directories and files
|
|
16
|
+
.vscode/*
|
|
17
|
+
!.vscode/extensions.json
|
|
18
|
+
.idea
|
|
19
|
+
.DS_Store
|
|
20
|
+
*.suo
|
|
21
|
+
*.ntvs*
|
|
22
|
+
*.njsproj
|
|
23
|
+
*.sln
|
|
24
|
+
*.sw?
|
|
25
|
+
/test-results/
|
|
26
|
+
/playwright-report/
|
|
27
|
+
/blob-report/
|
|
28
|
+
/playwright/.cache/
|
|
29
|
+
|
|
30
|
+
*storybook.log
|
|
31
|
+
index.html
|
package/.release-it.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://unpkg.com/release-it@17.6.0/schema/release-it.json",
|
|
3
|
+
"git": {
|
|
4
|
+
"commitMessage": "chore: release v${version}",
|
|
5
|
+
"requireCleanWorkingDir": true,
|
|
6
|
+
"tagAnnotation": "Release v${version}",
|
|
7
|
+
"tagName": "v${version}"
|
|
8
|
+
},
|
|
9
|
+
"github": {
|
|
10
|
+
"draft": false,
|
|
11
|
+
"release": true,
|
|
12
|
+
"releaseName": "v${version}",
|
|
13
|
+
"assets": ["dist/cdn/fhi-designsystem.js", "dist/cdn/theme/default.css"]
|
|
14
|
+
},
|
|
15
|
+
"npm": {
|
|
16
|
+
"publish": false
|
|
17
|
+
},
|
|
18
|
+
"hooks": {
|
|
19
|
+
"after:release": "echo Successfully created a release v${version} for ${repo.repository}!"
|
|
20
|
+
},
|
|
21
|
+
"plugins": {
|
|
22
|
+
"@release-it/conventional-changelog": {
|
|
23
|
+
"header": "# Changelog",
|
|
24
|
+
"preset": {
|
|
25
|
+
"name": "conventionalcommits",
|
|
26
|
+
"types": [
|
|
27
|
+
{ "type": "feat", "section": "🚀 Features" },
|
|
28
|
+
{ "type": "fix", "section": "🛠️ Bug Fixes" },
|
|
29
|
+
{ "type": "docs", "section": "📑 Documentation" },
|
|
30
|
+
{ "type": "chore", "section": "Other" }
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
"infile": "CHANGELOG.md"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { StorybookConfig } from "@storybook/web-components-vite";
|
|
2
|
+
|
|
3
|
+
const config: StorybookConfig = {
|
|
4
|
+
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
|
|
5
|
+
addons: [
|
|
6
|
+
"@storybook/addon-links",
|
|
7
|
+
"@storybook/addon-essentials",
|
|
8
|
+
"@chromatic-com/storybook",
|
|
9
|
+
],
|
|
10
|
+
framework: {
|
|
11
|
+
name: "@storybook/web-components-vite",
|
|
12
|
+
options: {},
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
export default config;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Preview } from '@storybook/web-components';
|
|
2
|
+
|
|
3
|
+
import '../src/theme/default.css';
|
|
4
|
+
|
|
5
|
+
const preview: Preview = {
|
|
6
|
+
parameters: {
|
|
7
|
+
controls: {
|
|
8
|
+
matchers: {
|
|
9
|
+
color: /(background|color)$/i,
|
|
10
|
+
date: /Date$/i,
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export default preview;
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.0 (2025-03-28)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### 🚀 Features
|
|
7
|
+
|
|
8
|
+
* La på -default på tokens. ([#144](https://github.com/FHIDev/Fhi.Designsystem/issues/144)) ([c24fcc0](https://github.com/FHIDev/Fhi.Designsystem/commit/c24fcc048bf0b02018bcb54674a4c26a19a6f63c))
|
|
9
|
+
* New component: Button ([#99](https://github.com/FHIDev/Fhi.Designsystem/issues/99)) ([13bdae4](https://github.com/FHIDev/Fhi.Designsystem/commit/13bdae48b9dd1ce5643aa7a7b5ee6c15634e991b))
|
|
10
|
+
* Updated and adjusted color system ([#108](https://github.com/FHIDev/Fhi.Designsystem/issues/108)) ([9ed0abc](https://github.com/FHIDev/Fhi.Designsystem/commit/9ed0abcfca694ee99177caa27e601f884ad1eb62))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### 🛠️ Bug Fixes
|
|
14
|
+
|
|
15
|
+
* Letter-spacing applies as expected ([e76fd53](https://github.com/FHIDev/Fhi.Designsystem/commit/e76fd53102cbac34924169d770185f28de04495e))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### 📑 Documentation
|
|
19
|
+
|
|
20
|
+
* Implement component development guidelines for contributers ([#67](https://github.com/FHIDev/Fhi.Designsystem/issues/67)) ([8176cd7](https://github.com/FHIDev/Fhi.Designsystem/commit/8176cd7aab61e24f0ef19917607f8a8ada9ce61c))
|
|
21
|
+
* 92 create first interation of getting started guide ([#102](https://github.com/FHIDev/Fhi.Designsystem/issues/102)) ([8a005a2](https://github.com/FHIDev/Fhi.Designsystem/commit/8a005a2d69a4e00e0c08616b0de3cebca2a4e033))
|
|
22
|
+
* fix styling ([#129](https://github.com/FHIDev/Fhi.Designsystem/issues/129)) ([3201b21](https://github.com/FHIDev/Fhi.Designsystem/commit/3201b21e0301f4ca436f530a5466008dc7f3d3ed))
|
|
23
|
+
* Noen mindre rettinger på Storybooks "Getting Started" ([#126](https://github.com/FHIDev/Fhi.Designsystem/issues/126)) ([4975b03](https://github.com/FHIDev/Fhi.Designsystem/commit/4975b03a767eddb5b67fa75d9ec9c90a294db3f7))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Other
|
|
27
|
+
|
|
28
|
+
* 111 some semantic tokens lack group signifiers ([#116](https://github.com/FHIDev/Fhi.Designsystem/issues/116)) ([766789f](https://github.com/FHIDev/Fhi.Designsystem/commit/766789f4aab8b48aad51f8c374e8ce228e61c63f))
|
|
29
|
+
* 60 add release pipeline ([#63](https://github.com/FHIDev/Fhi.Designsystem/issues/63)) ([9a6ea17](https://github.com/FHIDev/Fhi.Designsystem/commit/9a6ea17be22feba903ea7b06a0a14c9a2491e69f))
|
|
30
|
+
* 86 implement typography tokens ([#89](https://github.com/FHIDev/Fhi.Designsystem/issues/89)) ([de2d9ec](https://github.com/FHIDev/Fhi.Designsystem/commit/de2d9ecad6201441b0ccdff57a2d98327bbc8fd5))
|
|
31
|
+
* add azure config file to cdn ([#106](https://github.com/FHIDev/Fhi.Designsystem/issues/106)) ([ddeff56](https://github.com/FHIDev/Fhi.Designsystem/commit/ddeff56047b908d4c747cc373aec78140eeae328))
|
|
32
|
+
* add CODEOWNERS file ([#65](https://github.com/FHIDev/Fhi.Designsystem/issues/65)) ([6d4265e](https://github.com/FHIDev/Fhi.Designsystem/commit/6d4265eb6bdefa850ab85f17c6c7013f04f09048))
|
|
33
|
+
* add design tokens ([#69](https://github.com/FHIDev/Fhi.Designsystem/issues/69)) ([9840c6c](https://github.com/FHIDev/Fhi.Designsystem/commit/9840c6c86e173f68664ce38f9b4cf1d86f0389eb))
|
|
34
|
+
* add dimension tokens ([#91](https://github.com/FHIDev/Fhi.Designsystem/issues/91)) ([f74bd8e](https://github.com/FHIDev/Fhi.Designsystem/commit/f74bd8ece760fb62e1a6a012d3fd4a60176029c0))
|
|
35
|
+
* add other tokens ([#101](https://github.com/FHIDev/Fhi.Designsystem/issues/101)) ([6078f79](https://github.com/FHIDev/Fhi.Designsystem/commit/6078f79045248d7b8cb6740e62416c86e39543df))
|
|
36
|
+
* add pipeline that will fail if commit message i wrong ([#109](https://github.com/FHIDev/Fhi.Designsystem/issues/109)) ([d5353f9](https://github.com/FHIDev/Fhi.Designsystem/commit/d5353f9e05fe675d18b7bd4ce35e686cf56edd3b))
|
|
37
|
+
* add pr pipeline ([#66](https://github.com/FHIDev/Fhi.Designsystem/issues/66)) ([f89db0a](https://github.com/FHIDev/Fhi.Designsystem/commit/f89db0af018e387d5dbda19befc89c77d1c109ea))
|
|
38
|
+
* add prefix ([#98](https://github.com/FHIDev/Fhi.Designsystem/issues/98)) ([6d6d331](https://github.com/FHIDev/Fhi.Designsystem/commit/6d6d3311b876e7b0b1b39f68f0fafd0ed1445de5))
|
|
39
|
+
* add storybook introduction page ([#80](https://github.com/FHIDev/Fhi.Designsystem/issues/80)) ([5742661](https://github.com/FHIDev/Fhi.Designsystem/commit/5742661271f68e7efe5c40487adb72d3d6ea9042))
|
|
40
|
+
* Split up Pipeline ([#84](https://github.com/FHIDev/Fhi.Designsystem/issues/84)) ([1de6bba](https://github.com/FHIDev/Fhi.Designsystem/commit/1de6bba3c9a2e4d754f24eeb9ce4f022747dc989))
|
|
41
|
+
* update playwright ([#136](https://github.com/FHIDev/Fhi.Designsystem/issues/136)) ([760f7d5](https://github.com/FHIDev/Fhi.Designsystem/commit/760f7d5d77a474850c649ebb02c712fa9ae1bfca))
|
|
42
|
+
* use deploy token in pipeline ([#140](https://github.com/FHIDev/Fhi.Designsystem/issues/140)) ([32476f0](https://github.com/FHIDev/Fhi.Designsystem/commit/32476f0760fbb0acd9de47aca7774f98936f7608))
|
package/README.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# FHI Designsystem
|
|
2
|
+
|
|
3
|
+
## Kom i gang
|
|
4
|
+
|
|
5
|
+
### Installering av Node og pnpm
|
|
6
|
+
|
|
7
|
+
Om du mangler begge, eller en av dem på din maskin:
|
|
8
|
+
|
|
9
|
+
- Last ned og installer [Node](https://nodejs.org/en)
|
|
10
|
+
- Last ned og installer [pnpm](https://pnpm.io/installation)
|
|
11
|
+
|
|
12
|
+
### Jobbe i lokalt miljø
|
|
13
|
+
|
|
14
|
+
*Alle kommandoer kjøres fra samme folder som denne README-en.*
|
|
15
|
+
|
|
16
|
+
#### Installering
|
|
17
|
+
|
|
18
|
+
1. Kjør `pnpm i`
|
|
19
|
+
2. Kjør `pnpm exec playwright install`
|
|
20
|
+
|
|
21
|
+
#### Utvikling
|
|
22
|
+
|
|
23
|
+
Kjør `pnpm storybook`
|
|
24
|
+
|
|
25
|
+
#### Testing
|
|
26
|
+
|
|
27
|
+
Kjør `pnpm test`
|
|
28
|
+
|
|
29
|
+
#### Bygg
|
|
30
|
+
|
|
31
|
+
Kjør `pnpm build`
|
|
32
|
+
|
|
33
|
+
#### Nye komponenter
|
|
34
|
+
|
|
35
|
+
Om du har lagt til en ny komponent, pass på at den:
|
|
36
|
+
|
|
37
|
+
- er referert i `build.lib.entry` objektet inne i "switch case"-en `npm`, i filen `./vite.config.js`
|
|
38
|
+
- blir eksportert i filen `./library.ts`
|
|
39
|
+
|
|
40
|
+
Mer informasjon om hvordan opprette nye komponenter finnes i vår ["Hvordan hjelpe til"](../../CONTRIBUTING.md#hvordan-utvikle-en-ny-komponent)-guide.
|