@sb1/ffe-pagination 2.0.6 → 2.1.1
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 +8 -0
- package/css/pagination.css +171 -0
- package/less/pagination.less +1 -0
- package/package.json +7 -5
package/README.md
CHANGED
|
@@ -14,6 +14,14 @@ Full documentation on lists usage is available at https://design.sparebank1.no/k
|
|
|
14
14
|
@import 'path/to/node_modules/@sb1/ffe-pagination/less/pagination';
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
+
### Importing compiled CSS
|
|
18
|
+
|
|
19
|
+
If your project does not use Less, you can import the compiled styling:
|
|
20
|
+
|
|
21
|
+
```css
|
|
22
|
+
@import '~@sb1/ffe-pagination/css/pagination.css';
|
|
23
|
+
```
|
|
24
|
+
|
|
17
25
|
See also `@sb1/ffe-pagination-react`.
|
|
18
26
|
|
|
19
27
|
## Theming with CSS custom properties
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
:root,
|
|
2
|
+
:host {
|
|
3
|
+
--ffe-v-pagination-dots: var(--ffe-farge-vann);
|
|
4
|
+
}
|
|
5
|
+
@media (prefers-color-scheme: dark) {
|
|
6
|
+
:root .regard-color-scheme-preference,
|
|
7
|
+
:host .regard-color-scheme-preference {
|
|
8
|
+
--ffe-v-pagination-dots: var(--ffe-farge-vann-70);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
.ffe-pagination {
|
|
12
|
+
--circular-button-size: 2.5rem;
|
|
13
|
+
--buttons-distance: var(--ffe-spacing-xs);
|
|
14
|
+
display: -webkit-box;
|
|
15
|
+
display: -ms-flexbox;
|
|
16
|
+
display: flex;
|
|
17
|
+
-webkit-box-orient: vertical;
|
|
18
|
+
-webkit-box-direction: normal;
|
|
19
|
+
-ms-flex-direction: column;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
gap: var(--ffe-spacing-md);
|
|
22
|
+
}
|
|
23
|
+
.ffe-pagination__rows {
|
|
24
|
+
display: -webkit-box;
|
|
25
|
+
display: -ms-flexbox;
|
|
26
|
+
display: flex;
|
|
27
|
+
-webkit-box-orient: vertical;
|
|
28
|
+
-webkit-box-direction: normal;
|
|
29
|
+
-ms-flex-direction: column;
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
-webkit-box-pack: justify;
|
|
32
|
+
-ms-flex-pack: justify;
|
|
33
|
+
justify-content: space-between;
|
|
34
|
+
-webkit-box-align: center;
|
|
35
|
+
-ms-flex-align: center;
|
|
36
|
+
align-items: center;
|
|
37
|
+
gap: var(--ffe-spacing-sm);
|
|
38
|
+
}
|
|
39
|
+
@media (min-width: 480px) {
|
|
40
|
+
.ffe-pagination__rows {
|
|
41
|
+
-webkit-box-orient: horizontal;
|
|
42
|
+
-webkit-box-direction: normal;
|
|
43
|
+
-ms-flex-direction: row;
|
|
44
|
+
flex-direction: row;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
.ffe-pagination__rows:empty {
|
|
48
|
+
display: none;
|
|
49
|
+
}
|
|
50
|
+
.ffe-pagination__rows-item {
|
|
51
|
+
-webkit-box-flex: 1;
|
|
52
|
+
-ms-flex-positive: 1;
|
|
53
|
+
flex-grow: 1;
|
|
54
|
+
}
|
|
55
|
+
.ffe-pagination__buttons {
|
|
56
|
+
display: -webkit-box;
|
|
57
|
+
display: -ms-flexbox;
|
|
58
|
+
display: flex;
|
|
59
|
+
-webkit-box-pack: center;
|
|
60
|
+
-ms-flex-pack: center;
|
|
61
|
+
justify-content: center;
|
|
62
|
+
gap: var(--buttons-distance);
|
|
63
|
+
}
|
|
64
|
+
.ffe-pagination__page-buttons {
|
|
65
|
+
list-style: none;
|
|
66
|
+
margin: 0;
|
|
67
|
+
padding: 0;
|
|
68
|
+
display: -webkit-box;
|
|
69
|
+
display: -ms-flexbox;
|
|
70
|
+
display: flex;
|
|
71
|
+
-ms-flex-wrap: wrap;
|
|
72
|
+
flex-wrap: wrap;
|
|
73
|
+
-webkit-box-pack: center;
|
|
74
|
+
-ms-flex-pack: center;
|
|
75
|
+
justify-content: center;
|
|
76
|
+
-webkit-box-align: center;
|
|
77
|
+
-ms-flex-align: center;
|
|
78
|
+
align-items: center;
|
|
79
|
+
gap: var(--buttons-distance);
|
|
80
|
+
}
|
|
81
|
+
.ffe-pagination__buttons-nav {
|
|
82
|
+
-ms-flex-negative: 0;
|
|
83
|
+
flex-shrink: 0;
|
|
84
|
+
}
|
|
85
|
+
.ffe-pagination-info {
|
|
86
|
+
margin: 0;
|
|
87
|
+
width: 100%;
|
|
88
|
+
text-align: center;
|
|
89
|
+
}
|
|
90
|
+
@media (min-width: 480px) {
|
|
91
|
+
.ffe-pagination-info {
|
|
92
|
+
text-align: left;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
.ffe-pagination-rows-per-page {
|
|
96
|
+
display: -webkit-box;
|
|
97
|
+
display: -ms-flexbox;
|
|
98
|
+
display: flex;
|
|
99
|
+
-webkit-box-align: center;
|
|
100
|
+
-ms-flex-align: center;
|
|
101
|
+
align-items: center;
|
|
102
|
+
gap: var(--ffe-spacing-xs);
|
|
103
|
+
width: 100%;
|
|
104
|
+
-webkit-box-pack: center;
|
|
105
|
+
-ms-flex-pack: center;
|
|
106
|
+
justify-content: center;
|
|
107
|
+
}
|
|
108
|
+
@media (min-width: 480px) {
|
|
109
|
+
.ffe-pagination-rows-per-page {
|
|
110
|
+
-webkit-box-pack: end;
|
|
111
|
+
-ms-flex-pack: end;
|
|
112
|
+
justify-content: end;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
.ffe-pagination-rows-per-page .ffe-dropdown {
|
|
116
|
+
max-width: 90px;
|
|
117
|
+
}
|
|
118
|
+
.ffe-pagination-navigation-block {
|
|
119
|
+
display: -webkit-box;
|
|
120
|
+
display: -ms-flexbox;
|
|
121
|
+
display: flex;
|
|
122
|
+
-webkit-box-align: center;
|
|
123
|
+
-ms-flex-align: center;
|
|
124
|
+
align-items: center;
|
|
125
|
+
gap: var(--ffe-spacing-xs);
|
|
126
|
+
}
|
|
127
|
+
.ffe-pagination-navigation-block--hidden {
|
|
128
|
+
visibility: hidden;
|
|
129
|
+
}
|
|
130
|
+
.ffe-pagination-navigation-block--next .ffe-icons {
|
|
131
|
+
-webkit-transform: rotate(180deg);
|
|
132
|
+
transform: rotate(180deg);
|
|
133
|
+
}
|
|
134
|
+
.ffe-pagination-navigation-block__button-text {
|
|
135
|
+
display: none;
|
|
136
|
+
}
|
|
137
|
+
@media (min-width: 480px) {
|
|
138
|
+
.ffe-pagination-navigation-block__button-text {
|
|
139
|
+
display: block;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
.ffe-pagination-navigation-block--prev .ffe-button,
|
|
143
|
+
.ffe-pagination-navigation-block--next .ffe-button,
|
|
144
|
+
.ffe-pagination-navigation-block--no-text .ffe-button {
|
|
145
|
+
width: var(--circular-button-size);
|
|
146
|
+
aspect-ratio: 1;
|
|
147
|
+
}
|
|
148
|
+
@media (min-width: 480px) {
|
|
149
|
+
.ffe-pagination-navigation-block--prev:not(.ffe-pagination-navigation-block--no-text) .ffe-button,
|
|
150
|
+
.ffe-pagination-navigation-block--next:not(.ffe-pagination-navigation-block--no-text) .ffe-button {
|
|
151
|
+
width: auto;
|
|
152
|
+
aspect-ratio: auto;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
.ffe-pagination-dots {
|
|
156
|
+
fill: var(--ffe-v-pagination-dots);
|
|
157
|
+
}
|
|
158
|
+
.ffe-pagination-page-button {
|
|
159
|
+
width: var(--circular-button-size);
|
|
160
|
+
aspect-ratio: 1;
|
|
161
|
+
white-space: nowrap;
|
|
162
|
+
}
|
|
163
|
+
.ffe-pagination-page-button--active,
|
|
164
|
+
.ffe-pagination-page-button--active:focus {
|
|
165
|
+
background-color: var(--ffe-farge-vann);
|
|
166
|
+
border-color: var(--ffe-farge-vann);
|
|
167
|
+
}
|
|
168
|
+
.ffe-pagination-page-button--active .ffe-button__label,
|
|
169
|
+
.ffe-pagination-page-button--active:focus .ffe-button__label {
|
|
170
|
+
color: var(--ffe-farge-hvit);
|
|
171
|
+
}
|
package/less/pagination.less
CHANGED
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sb1/ffe-pagination",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "Pagination in ffe",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "SpareBank 1",
|
|
7
7
|
"files": [
|
|
8
|
-
"less"
|
|
8
|
+
"less",
|
|
9
|
+
"css"
|
|
9
10
|
],
|
|
10
11
|
"repository": {
|
|
11
12
|
"type": "git",
|
|
@@ -13,10 +14,11 @@
|
|
|
13
14
|
},
|
|
14
15
|
"scripts": {
|
|
15
16
|
"lint": "ffe-buildtool stylelint less/*.less",
|
|
16
|
-
"test": "npm run lint"
|
|
17
|
+
"test": "npm run lint",
|
|
18
|
+
"build": "lessc less/pagination.less css/pagination.css --autoprefix"
|
|
17
19
|
},
|
|
18
20
|
"dependencies": {
|
|
19
|
-
"@sb1/ffe-core": "^29.
|
|
21
|
+
"@sb1/ffe-core": "^29.3.0"
|
|
20
22
|
},
|
|
21
23
|
"devDependencies": {
|
|
22
24
|
"@sb1/ffe-buildtool": "^0.9.0"
|
|
@@ -24,5 +26,5 @@
|
|
|
24
26
|
"publishConfig": {
|
|
25
27
|
"access": "public"
|
|
26
28
|
},
|
|
27
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "f474381dd349e5f8a64b9e6883aa9cb4a6d184d8"
|
|
28
30
|
}
|