@sb1/ffe-lists-react 100.8.3 → 100.10.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/README.md +120 -11
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,21 +1,132 @@
|
|
|
1
1
|
# @sb1/ffe-lists-react
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Beskrivelse
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Liste-komponenter for punktlister, nummererte lister, sjekklister og beskrivelseslister.
|
|
6
|
+
|
|
7
|
+
### Tilgjengelige komponenter
|
|
8
|
+
|
|
9
|
+
| Komponent | Beskrivelse |
|
|
10
|
+
| ---------------------------------------------------------------------- | ------------------------------------------- |
|
|
11
|
+
| `BulletList`, `BulletListItem` | Standard punktliste med kulepunkter |
|
|
12
|
+
| `NumberedList`, `NumberedListItem` | Nummerert liste (ordered list) |
|
|
13
|
+
| `StylizedNumberedList`, `StylizedNumberedListItem` | Nummerert liste med visuelt fremhevede tall |
|
|
14
|
+
| `CheckList`, `CheckListItem` | Sjekkliste med hake- eller kryssikoner |
|
|
15
|
+
| `DescriptionList`, `DescriptionListTerm`, `DescriptionListDescription` | Beskrivelsesliste for term/definisjon-par |
|
|
16
|
+
| `DescriptionListMultiCol` | Beskrivelsesliste i flere kolonner |
|
|
17
|
+
| `DetailListCard`, `DetailListCardItem` | Kortbasert liste for detaljvisning |
|
|
18
|
+
|
|
19
|
+
## Installasjon
|
|
20
|
+
|
|
21
|
+
```bash
|
|
6
22
|
npm install --save @sb1/ffe-lists-react
|
|
7
23
|
```
|
|
8
24
|
|
|
9
|
-
##
|
|
25
|
+
## Bruk
|
|
26
|
+
|
|
27
|
+
Full dokumentasjon: https://sparebank1.github.io/designsystem/
|
|
28
|
+
|
|
29
|
+
Importer CSS:
|
|
30
|
+
|
|
31
|
+
```css
|
|
32
|
+
@import url('@sb1/ffe-lists/css/ffe-lists.css');
|
|
33
|
+
```
|
|
10
34
|
|
|
11
|
-
|
|
35
|
+
## Eksempler
|
|
12
36
|
|
|
13
|
-
|
|
14
|
-
Make sure you import the less-files.
|
|
37
|
+
### Punktliste
|
|
15
38
|
|
|
16
|
-
|
|
39
|
+
```tsx
|
|
40
|
+
import { BulletList, BulletListItem } from '@sb1/ffe-lists-react';
|
|
17
41
|
|
|
18
|
-
|
|
42
|
+
<BulletList>
|
|
43
|
+
<BulletListItem>Første punkt</BulletListItem>
|
|
44
|
+
<BulletListItem>Andre punkt</BulletListItem>
|
|
45
|
+
</BulletList>;
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Nummerert liste
|
|
49
|
+
|
|
50
|
+
```tsx
|
|
51
|
+
import { NumberedList, NumberedListItem } from '@sb1/ffe-lists-react';
|
|
52
|
+
|
|
53
|
+
<NumberedList condensed={true}>
|
|
54
|
+
<NumberedListItem>Steg 1</NumberedListItem>
|
|
55
|
+
<NumberedListItem>Steg 2</NumberedListItem>
|
|
56
|
+
</NumberedList>;
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Stilisert nummerert liste
|
|
60
|
+
|
|
61
|
+
```tsx
|
|
62
|
+
import {
|
|
63
|
+
StylizedNumberedList,
|
|
64
|
+
StylizedNumberedListItem,
|
|
65
|
+
} from '@sb1/ffe-lists-react';
|
|
66
|
+
|
|
67
|
+
<StylizedNumberedList>
|
|
68
|
+
<StylizedNumberedListItem>Første steg</StylizedNumberedListItem>
|
|
69
|
+
<StylizedNumberedListItem>Andre steg</StylizedNumberedListItem>
|
|
70
|
+
</StylizedNumberedList>;
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Sjekkliste
|
|
74
|
+
|
|
75
|
+
```tsx
|
|
76
|
+
import { CheckList, CheckListItem } from '@sb1/ffe-lists-react';
|
|
77
|
+
|
|
78
|
+
<CheckList columns={2}>
|
|
79
|
+
<CheckListItem>Inkludert</CheckListItem>
|
|
80
|
+
<CheckListItem isCross={true}>Ikke inkludert</CheckListItem>
|
|
81
|
+
</CheckList>;
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Beskrivelsesliste
|
|
85
|
+
|
|
86
|
+
```tsx
|
|
87
|
+
import {
|
|
88
|
+
DescriptionList,
|
|
89
|
+
DescriptionListTerm,
|
|
90
|
+
DescriptionListDescription,
|
|
91
|
+
} from '@sb1/ffe-lists-react';
|
|
92
|
+
|
|
93
|
+
<DescriptionList horizontal={true} size="lg">
|
|
94
|
+
<DescriptionListTerm>Kontonummer</DescriptionListTerm>
|
|
95
|
+
<DescriptionListDescription>1234 56 78901</DescriptionListDescription>
|
|
96
|
+
<DescriptionListTerm>Saldo</DescriptionListTerm>
|
|
97
|
+
<DescriptionListDescription>10 000 kr</DescriptionListDescription>
|
|
98
|
+
</DescriptionList>;
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Beskrivelsesliste med flere kolonner
|
|
102
|
+
|
|
103
|
+
```tsx
|
|
104
|
+
import {
|
|
105
|
+
DescriptionListMultiCol,
|
|
106
|
+
DescriptionListTerm,
|
|
107
|
+
DescriptionListDescription,
|
|
108
|
+
} from '@sb1/ffe-lists-react';
|
|
109
|
+
|
|
110
|
+
<DescriptionListMultiCol>
|
|
111
|
+
<DescriptionListTerm>Navn</DescriptionListTerm>
|
|
112
|
+
<DescriptionListDescription>Ola Nordmann</DescriptionListDescription>
|
|
113
|
+
<DescriptionListTerm>Adresse</DescriptionListTerm>
|
|
114
|
+
<DescriptionListDescription>Husgata 14</DescriptionListDescription>
|
|
115
|
+
</DescriptionListMultiCol>;
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Detaljkort-liste
|
|
119
|
+
|
|
120
|
+
```tsx
|
|
121
|
+
import { DetailListCard, DetailListCardItem } from '@sb1/ffe-lists-react';
|
|
122
|
+
|
|
123
|
+
<DetailListCard appearance="accent" bgColor="secondary">
|
|
124
|
+
<DetailListCardItem label="Kontonavn" value="Daglig konto" />
|
|
125
|
+
<DetailListCardItem label="Kontonummer" value="1234 45 34554" />
|
|
126
|
+
</DetailListCard>;
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Utvikling
|
|
19
130
|
|
|
20
131
|
```bash
|
|
21
132
|
npm install
|
|
@@ -23,6 +134,4 @@ npm run build
|
|
|
23
134
|
npm start
|
|
24
135
|
```
|
|
25
136
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
Example implementations using the latest versions of all components are also available at https://sparebank1.github.io/designsystem.
|
|
137
|
+
Lokal Storybook kjorer pa http://localhost:6006/.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sb1/ffe-lists-react",
|
|
3
|
-
"version": "100.
|
|
3
|
+
"version": "100.10.0",
|
|
4
4
|
"description": "React implementation of ffe-lists",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "SpareBank 1",
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
"test:watch": "ffe-buildtool jest --watch"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@sb1/ffe-icons-react": "^100.
|
|
29
|
-
"@sb1/ffe-lists": "^100.
|
|
28
|
+
"@sb1/ffe-icons-react": "^100.10.0",
|
|
29
|
+
"@sb1/ffe-lists": "^100.10.0",
|
|
30
30
|
"classnames": "^2.3.1"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@sb1/ffe-buildtool": "^100.
|
|
33
|
+
"@sb1/ffe-buildtool": "^100.10.0",
|
|
34
34
|
"react": "^18.2.0",
|
|
35
35
|
"react-dom": "^18.2.0"
|
|
36
36
|
},
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "efdd3866d59d794436a97a8dd6760f4c76466a71"
|
|
44
44
|
}
|