@sb1/ffe-icons-react 100.8.2 → 100.9.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.
Files changed (2) hide show
  1. package/README.md +51 -12
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -1,25 +1,64 @@
1
1
  # @sb1/ffe-icons-react
2
2
 
3
- ## Install
3
+ ## Beskrivelse
4
4
 
5
- ```
5
+ Ikonkomponenter som bruker CSS mask-image for SVG-ikoner som kan farges med CSS. Sett `ariaLabel` for meningsbærende ikoner, utelat den for dekorative ikoner (skjules automatisk).
6
+
7
+ ## Installasjon
8
+
9
+ ```bash
6
10
  npm install --save @sb1/ffe-icons-react
7
11
  ```
8
12
 
9
- ## Usage
13
+ ## Bruk
14
+
15
+ Full dokumentasjon: https://sparebank1.github.io/designsystem/
16
+
17
+ Importer CSS:
18
+
19
+ ```css
20
+ @import url('@sb1/ffe-icons/css/ffe-icons.css');
21
+ ```
22
+
23
+ ## Eksempler
10
24
 
11
- Full documentation on icon usage is available at https://design.sparebank1.no/komponenter/ikoner/.
25
+ ```tsx
26
+ import { Icon } from '@sb1/ffe-icons-react';
12
27
 
13
- ## Development
28
+ // Med tilgjengelighetstekst
29
+ <Icon fileUrl="./icons/open/300/md/house.svg" ariaLabel="Hjem" />
14
30
 
15
- To start a local development server, run the following from the designsystem root folder:
31
+ // Dekorativt ikon (skjules fra skjermleser)
32
+ <Icon fileUrl="./icons/open/300/md/arrow-right.svg" />
16
33
 
17
- ```bash
18
- npm install
19
- npm run build
20
- npm start
34
+ // Med størrelse og fargeklasse
35
+ <Icon
36
+ fileUrl="./icons/open/300/sm/star.svg"
37
+ size="sm"
38
+ className="ffe-text-color--vann"
39
+ ariaLabel="Favoritt"
40
+ />
21
41
  ```
22
42
 
23
- A local instance of `Storybook` with live reloading will run at http://localhost:6006/.
43
+ ### Ikonsti-format
44
+
45
+ ```
46
+ ./icons/{variant}/{weight}/{size}/{icon-name}.svg
47
+ ```
48
+
49
+ - **variant**: `open` eller `filled`
50
+ - **weight**: `300`, `400`, eller `500`
51
+ - **size**: `sm`, `md`, `lg`, eller `xl`
52
+
53
+ ### Tilgjengelighet
54
+
55
+ - Sett `ariaLabel` for meningsbærende ikoner
56
+ - Utelat `ariaLabel` for dekorative ikoner (setter automatisk `aria-hidden="true"`)
57
+
58
+ ## Utvikling
59
+
60
+ ```bash
61
+ npm install && npm run build && npm start
62
+ ```
24
63
 
25
- Example implementations using the latest versions of all components are also available at https://sparebank1.github.io/designsystem.
64
+ Lokal Storybook kjører på http://localhost:6006/.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sb1/ffe-icons-react",
3
- "version": "100.8.2",
3
+ "version": "100.9.0",
4
4
  "description": "React-komponenter for ffe-icons",
5
5
  "license": "MIT",
6
6
  "author": "SpareBank 1",
@@ -26,11 +26,11 @@
26
26
  "test": "ffe-buildtool jest"
27
27
  },
28
28
  "dependencies": {
29
- "@sb1/ffe-icons": "^100.8.2",
29
+ "@sb1/ffe-icons": "^100.9.0",
30
30
  "classnames": "^2.5.1"
31
31
  },
32
32
  "devDependencies": {
33
- "@sb1/ffe-buildtool": "^100.8.2",
33
+ "@sb1/ffe-buildtool": "^100.9.0",
34
34
  "eslint": "^9.22.0",
35
35
  "react": "^18.2.0",
36
36
  "react-dom": "^18.2.0"
@@ -41,5 +41,5 @@
41
41
  "publishConfig": {
42
42
  "access": "public"
43
43
  },
44
- "gitHead": "50fbbbdb2023a60add7158e8c5bd6443c4f9c95e"
44
+ "gitHead": "41f20cf10bec5ebe53036c282690983d2114fb45"
45
45
  }