@sb1/ffe-file-upload 11.1.9 → 12.0.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 CHANGED
@@ -11,7 +11,7 @@ npm install --save @sb1/ffe-file-upload
11
11
  Full documentation on file upload usage is available at https://design.sparebank1.no/komponenter/skjemaelementer/#fileupload.
12
12
 
13
13
  ```less
14
- @import 'path/to/node_modules/@sb1/ffe-file.upload/less/ffe-file-upload.less';
14
+ @import 'path/to/node_modules/@sb1/ffe-file.upload/less/file-upload.less';
15
15
  ```
16
16
 
17
17
  ### Importing compiled CSS
@@ -24,16 +24,6 @@ If your project does not use Less, you can import the compiled styling:
24
24
 
25
25
  See also `@sb1/ffe-file-upload-react`.
26
26
 
27
- ## Theming with CSS custom properties
28
-
29
- In order to support theming of components, this package contains styling that depends on a set of custom properties, defined in `less/theme.less`. These properties in turn depend on a base theme defined in `ffe-core`.
30
-
31
- If your project uses the `ffe-core`, you're probably good to go. If not, make sure to import the core properties in `theme.less`:
32
-
33
- ```css
34
- @import '~@sb1/ffe-core/less/theme';
35
- ```
36
-
37
27
  ## Development
38
28
 
39
29
  To start a local development server, run the following from the designsystem root folder:
@@ -1,25 +1,3 @@
1
- :root,
2
- :host {
3
- --ffe-v-fileupload-bgcolor: var(--ffe-farge-frost-30);
4
- --ffe-v-fileupload-bordercolor: var(--ffe-farge-vann);
5
- --ffe-v-fileupload-btn-delete-color: var(--ffe-g-link-color);
6
- --ffe-v-fileupload-btn-delete-color-hover: var(--ffe-g-link-color-hover);
7
- --ffe-v-fileupload-stencil-bg: var(--ffe-farge-frost-30);
8
- --ffe-v-fileupload-filename-color: var(--ffe-farge-fjell);
9
- --ffe-v-fileupload-error-icon-color: var(--ffe-farge-hvit);
10
- }
11
- @media (prefers-color-scheme: dark) {
12
- :root .regard-color-scheme-preference,
13
- :host .regard-color-scheme-preference {
14
- --ffe-v-fileupload-bgcolor: var(--ffe-farge-svart);
15
- --ffe-v-fileupload-bordercolor: var(--ffe-farge-vann-30);
16
- --ffe-v-fileupload-btn-delete-color: var(--ffe-g-link-color);
17
- --ffe-v-fileupload-btn-delete-color-hover: var(--ffe-g-link-color-hover);
18
- --ffe-v-fileupload-stencil-bg: var(--ffe-farge-frost-70);
19
- --ffe-v-fileupload-filename-color: var(--ffe-farge-vann-30);
20
- --ffe-v-fileupload-error-icon-color: var(--ffe-farge-fjell);
21
- }
22
- }
23
1
  .ffe-file-upload {
24
2
  margin-top: var(--ffe-spacing-2xl);
25
3
  display: grid;
@@ -35,7 +13,7 @@
35
13
  .ffe-file-upload__title {
36
14
  font-family: var(--ffe-g-font-heading-small);
37
15
  font-size: var(--ffe-fontsize-h5);
38
- color: var(--ffe-g-heading-color);
16
+ color: var(--ffe-color-foreground-emphasis);
39
17
  margin-bottom: 0;
40
18
  }
41
19
  .ffe-file-upload input[type='file'] {
@@ -78,7 +56,7 @@
78
56
  }
79
57
  .ffe-file-upload__upload-section {
80
58
  min-height: 150px;
81
- background-color: var(--ffe-v-fileupload-bgcolor);
59
+ background-color: var(--ffe-color-surface-secondary-default);
82
60
  border-radius: 10px;
83
61
  text-align: center;
84
62
  padding: var(--ffe-spacing-2xs);
@@ -111,7 +89,7 @@
111
89
  min-height: 140px;
112
90
  margin: var(--ffe-spacing-2xs);
113
91
  padding: var(--ffe-spacing-2xs) var(--ffe-spacing-lg);
114
- border: 2px dashed var(--ffe-v-fileupload-bordercolor);
92
+ border: 2px dashed var(--ffe-color-border-primary-emphasis);
115
93
  border-radius: 10px;
116
94
  position: relative;
117
95
  width: 100%;
@@ -133,7 +111,7 @@
133
111
  .ffe-file-upload__upload-section-title {
134
112
  font-family: var(--ffe-g-font-heading-small);
135
113
  font-size: var(--ffe-fontsize-h5);
136
- color: var(--ffe-g-heading-color);
114
+ color: var(--ffe-color-foreground-emphasis);
137
115
  margin-bottom: var(--ffe-spacing-xs);
138
116
  display: none;
139
117
  }
@@ -182,7 +160,7 @@
182
160
  border: none;
183
161
  line-height: 1.125rem;
184
162
  position: relative;
185
- color: var(--ffe-v-fileupload-btn-delete-color);
163
+ color: var(--ffe-color-foreground-interactive-link);
186
164
  cursor: pointer;
187
165
  font-size: 0.875rem;
188
166
  grid-column: 3;
@@ -201,7 +179,7 @@
201
179
  }
202
180
  @media (hover: hover) and (pointer: fine) {
203
181
  .ffe-file-upload__file-item-delete-button:hover {
204
- color: var(--ffe-v-fileupload-btn-delete-color-hover);
182
+ color: var(--ffe-color-foreground-interactive-link-hover);
205
183
  }
206
184
  .ffe-file-upload__file-item-delete-button:hover ~ .ffe-file-upload__file-item-filename {
207
185
  text-decoration: underline;
@@ -218,7 +196,7 @@
218
196
  }
219
197
  .ffe-file-upload__file-item-delete-button:active,
220
198
  .ffe-file-upload__file-item-delete-button:focus {
221
- color: var(--ffe-v-fileupload-btn-delete-color-hover);
199
+ color: var(--ffe-color-foreground-interactive-link-hover);
222
200
  }
223
201
  .ffe-file-upload__file-item-delete-button:active ~ .ffe-file-upload__file-item-filename,
224
202
  .ffe-file-upload__file-item-delete-button:focus ~ .ffe-file-upload__file-item-filename {
@@ -250,7 +228,7 @@
250
228
  .ffe-file-upload__file-item-stencil-info-background {
251
229
  height: 10px;
252
230
  border-radius: 5px;
253
- background-color: var(--ffe-v-fileupload-stencil-bg);
231
+ background-color: var(--ffe-color-surface-secondary-default);
254
232
  }
255
233
  .ffe-file-upload__file-item-stencil-info-filename {
256
234
  color: var(--ffe-color-foreground-default);
@@ -282,7 +260,7 @@
282
260
  -o-text-overflow: ellipsis;
283
261
  text-overflow: ellipsis;
284
262
  margin-top: 2px;
285
- color: var(--ffe-v-fileupload-filename-color);
263
+ color: var(--ffe-color-foreground-emphasis);
286
264
  }
287
265
  .ffe-file-upload__file-item-error {
288
266
  display: grid;
@@ -290,7 +268,7 @@
290
268
  grid-template-columns: 25px 1fr;
291
269
  }
292
270
  .ffe-file-upload__file-item-error-icon {
293
- background-color: var(--ffe-v-error-message-icon-color);
271
+ background-color: var(--ffe-color-foreground-feedback-critical);
294
272
  border-radius: 50%;
295
273
  width: 18px;
296
274
  height: 18px;
@@ -312,7 +290,7 @@
312
290
  grid-row: 1;
313
291
  }
314
292
  .ffe-file-upload__file-item-error-icon .ffe-icons {
315
- color: var(--ffe-v-fileupload-error-icon-color);
293
+ color: var(--ffe-color-surface-primary-default);
316
294
  }
317
295
  .ffe-file-upload__file-item-error-info {
318
296
  display: grid;
@@ -1,2 +1,298 @@
1
- @import 'theme';
2
- @import 'ffe-file-upload';
1
+ @import (reference) '@sb1/ffe-core/less/breakpoints';
2
+ @import (reference) '@sb1/ffe-core/less/typography';
3
+
4
+ .ffe-file-upload {
5
+ margin-top: var(--ffe-spacing-2xl);
6
+ display: grid;
7
+ max-width: 400px;
8
+ grid-template-columns: 1fr;
9
+ font-family: var(--ffe-g-font);
10
+
11
+ @media (min-width: @breakpoint-md) {
12
+ max-width: 100%;
13
+ }
14
+
15
+ &__title {
16
+ font-family: var(--ffe-g-font-heading-small);
17
+ font-size: var(--ffe-fontsize-h5);
18
+ color: var(--ffe-color-foreground-emphasis);
19
+ margin-bottom: 0;
20
+ }
21
+
22
+ input[type='file'] {
23
+ display: none;
24
+ }
25
+
26
+ &__info-section {
27
+ .ffe-body-text();
28
+
29
+ margin-bottom: var(--ffe-spacing-md);
30
+ grid-row: 2;
31
+
32
+ @media (min-width: @breakpoint-md) {
33
+ margin-right: var(--ffe-spacing-md);
34
+ margin-bottom: 0;
35
+ grid-column: 1;
36
+ }
37
+ }
38
+
39
+ &__info-section-text {
40
+ margin-bottom: var(--ffe-spacing-sm);
41
+ }
42
+
43
+ &__file-items-section {
44
+ margin-top: var(--ffe-spacing-sm);
45
+ line-height: 2.1875rem;
46
+ grid-row: 4;
47
+
48
+ @media (min-width: @breakpoint-md) {
49
+ margin-top: 0;
50
+ grid-row: 2;
51
+ }
52
+
53
+ li {
54
+ display: grid;
55
+ grid-template-columns: 1fr;
56
+ }
57
+ }
58
+
59
+ &__upload-section {
60
+ min-height: 150px;
61
+ background-color: var(--ffe-color-surface-secondary-default);
62
+ border-radius: 10px;
63
+ text-align: center;
64
+ padding: var(--ffe-spacing-2xs);
65
+ grid-row: 3;
66
+
67
+ @media (min-width: @breakpoint-md) {
68
+ margin-top: 0;
69
+ min-height: 220px;
70
+ width: 280px;
71
+ padding: 0;
72
+ grid-row: 2;
73
+ grid-column: 2;
74
+ }
75
+ }
76
+
77
+ &__upload-section-border {
78
+ display: flex;
79
+ flex-direction: column;
80
+ justify-content: center;
81
+ align-items: center;
82
+ min-height: 140px;
83
+ margin: var(--ffe-spacing-2xs);
84
+ padding: var(--ffe-spacing-2xs) var(--ffe-spacing-lg);
85
+ border: 2px dashed var(--ffe-color-border-primary-emphasis);
86
+ border-radius: 10px;
87
+ position: relative;
88
+ width: 100%;
89
+ right: 5px;
90
+ bottom: 5px;
91
+
92
+ @media (min-width: @breakpoint-md) {
93
+ width: 270px;
94
+ min-height: 210px;
95
+ right: 0;
96
+ bottom: 0;
97
+ }
98
+
99
+ &--hover {
100
+ opacity: 0.5;
101
+ border-style: solid;
102
+ }
103
+ }
104
+
105
+ &__upload-section-title {
106
+ font-family: var(--ffe-g-font-heading-small);
107
+ font-size: var(--ffe-fontsize-h5);
108
+ color: var(--ffe-color-foreground-emphasis);
109
+ margin-bottom: var(--ffe-spacing-xs);
110
+ display: none;
111
+
112
+ @media (min-width: @breakpoint-md) {
113
+ display: block;
114
+ }
115
+ }
116
+
117
+ &__upload-section-microtext {
118
+ .ffe-micro-text();
119
+
120
+ display: none;
121
+
122
+ @media (min-width: @breakpoint-md) {
123
+ display: block;
124
+ }
125
+ }
126
+
127
+ &__upload-section-subtext {
128
+ .ffe-small-text();
129
+
130
+ margin-top: var(--ffe-spacing-xs);
131
+ }
132
+
133
+ &__file-item-delete-icon {
134
+ display: inline-block;
135
+ }
136
+
137
+ &__file-item-delete-button {
138
+ padding-top: var(--ffe-spacing-2xs);
139
+ margin-left: auto;
140
+ background-color: transparent;
141
+ border: none;
142
+ line-height: 1.125rem;
143
+ position: relative;
144
+ color: var(--ffe-color-foreground-interactive-link);
145
+ cursor: pointer;
146
+ font-size: 0.875rem;
147
+ grid-column: 3;
148
+ grid-row: 1;
149
+ display: flex;
150
+ align-items: center;
151
+
152
+ @media (min-width: @breakpoint-md) {
153
+ margin-right: var(--ffe-spacing-sm);
154
+ }
155
+
156
+ @media (hover: hover) and (pointer: fine) {
157
+ &:hover {
158
+ color: var(--ffe-color-foreground-interactive-link-hover);
159
+
160
+ ~ .ffe-file-upload__file-item-filename {
161
+ text-decoration: underline;
162
+ }
163
+
164
+ ~ .ffe-file-upload__file-item-error-info
165
+ > .ffe-file-upload__file-item-error-filename {
166
+ text-decoration: underline;
167
+ }
168
+
169
+ ~ .ffe-file-upload__file-item-stencil-info
170
+ > .ffe-file-upload__file-item-stencil-info-filename {
171
+ text-decoration: underline;
172
+ }
173
+
174
+ .ffe-file-upload__file-item-delete-button-text {
175
+ text-decoration: underline;
176
+ }
177
+ }
178
+ }
179
+
180
+ &:active,
181
+ &:focus {
182
+ color: var(--ffe-color-foreground-interactive-link-hover);
183
+
184
+ ~ .ffe-file-upload__file-item-filename {
185
+ text-decoration: underline;
186
+ }
187
+
188
+ ~ .ffe-file-upload__file-item-error-info
189
+ > .ffe-file-upload__file-item-error-filename {
190
+ text-decoration: underline;
191
+ }
192
+
193
+ ~ .ffe-file-upload__file-item-stencil-info
194
+ > .ffe-file-upload__file-item-stencil-info-filename {
195
+ text-decoration: underline;
196
+ }
197
+
198
+ .ffe-file-upload__file-item-delete-button-text {
199
+ text-decoration: underline;
200
+ }
201
+ }
202
+ }
203
+
204
+ &__file-item-stencil {
205
+ display: grid;
206
+ grid-template-columns: 1fr;
207
+ }
208
+
209
+ &__file-item-stencil-info {
210
+ display: grid;
211
+ grid-column: 1;
212
+ grid-row: 1;
213
+ grid-template-columns: 1fr;
214
+ overflow: hidden;
215
+ }
216
+
217
+ &__file-item-stencil-info-background {
218
+ height: 10px;
219
+ border-radius: 5px;
220
+ background-color: var(--ffe-color-surface-secondary-default);
221
+ }
222
+
223
+ &__file-item-stencil-info-filename {
224
+ .ffe-micro-text();
225
+
226
+ margin-top: var(--ffe-spacing-2xs);
227
+ white-space: nowrap;
228
+ overflow: hidden;
229
+ text-overflow: ellipsis;
230
+ }
231
+
232
+ &__file-item-loaded {
233
+ display: grid;
234
+ grid-template-columns: 1fr;
235
+ }
236
+
237
+ &__file-item-filename {
238
+ grid-row: 1;
239
+ grid-column: 1;
240
+ white-space: nowrap;
241
+ overflow: hidden;
242
+ text-overflow: ellipsis;
243
+ margin-top: 2px;
244
+ color: var(--ffe-color-foreground-emphasis);
245
+ }
246
+
247
+ &__file-item-error {
248
+ display: grid;
249
+ grid-gap: 5px;
250
+ grid-template-columns: 25px 1fr;
251
+ }
252
+
253
+ &__file-item-error-icon {
254
+ background-color: var(--ffe-color-foreground-feedback-critical);
255
+ border-radius: 50%;
256
+ width: 18px;
257
+ height: 18px;
258
+ margin-right: var(--ffe-spacing-2xs);
259
+ padding: 3px;
260
+ font-family: arial, sans-serif;
261
+ display: inline-flex;
262
+ align-items: center;
263
+ justify-content: center;
264
+ align-self: center;
265
+ grid-column: 1;
266
+ grid-row: 1;
267
+
268
+ .ffe-icons {
269
+ color: var(--ffe-color-surface-primary-default);
270
+ }
271
+ }
272
+
273
+ &__file-item-error-info {
274
+ display: grid;
275
+ grid-row: 1;
276
+ grid-column: 2;
277
+ grid-template-columns: 1fr;
278
+ align-content: center;
279
+ }
280
+
281
+ &__file-item-error-filename {
282
+ .ffe-micro-text();
283
+
284
+ grid-row: 1;
285
+ white-space: nowrap;
286
+ overflow: hidden;
287
+ text-overflow: ellipsis;
288
+ }
289
+
290
+ &__file-item-error-message {
291
+ .ffe-micro-text();
292
+
293
+ grid-row: 2;
294
+ white-space: nowrap;
295
+ overflow: hidden;
296
+ text-overflow: ellipsis;
297
+ }
298
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sb1/ffe-file-upload",
3
- "version": "11.1.9",
3
+ "version": "12.0.0",
4
4
  "description": "File upload module",
5
5
  "license": "MIT",
6
6
  "author": "SpareBank 1",
@@ -18,8 +18,8 @@
18
18
  "build": "lessc less/file-upload.less css/file-upload.css --autoprefix"
19
19
  },
20
20
  "dependencies": {
21
- "@sb1/ffe-core": "^30.0.0",
22
- "@sb1/ffe-form": "^31.0.0"
21
+ "@sb1/ffe-core": "^30.0.2",
22
+ "@sb1/ffe-form": "^31.0.2"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@sb1/ffe-buildtool": "^0.10.0"
@@ -27,5 +27,5 @@
27
27
  "publishConfig": {
28
28
  "access": "public"
29
29
  },
30
- "gitHead": "5a72f08b0873cc96b0d439dd029839db4d5d4ea9"
30
+ "gitHead": "587574e9a65e127ec4027c02b5c996ab45b2b664"
31
31
  }
@@ -1,298 +0,0 @@
1
- @import (reference) '@sb1/ffe-core/less/breakpoints';
2
- @import (reference) '@sb1/ffe-core/less/typography';
3
-
4
- .ffe-file-upload {
5
- margin-top: var(--ffe-spacing-2xl);
6
- display: grid;
7
- max-width: 400px;
8
- grid-template-columns: 1fr;
9
- font-family: var(--ffe-g-font);
10
-
11
- @media (min-width: @breakpoint-md) {
12
- max-width: 100%;
13
- }
14
-
15
- &__title {
16
- font-family: var(--ffe-g-font-heading-small);
17
- font-size: var(--ffe-fontsize-h5);
18
- color: var(--ffe-g-heading-color);
19
- margin-bottom: 0;
20
- }
21
-
22
- input[type='file'] {
23
- display: none;
24
- }
25
-
26
- &__info-section {
27
- .ffe-body-text();
28
-
29
- margin-bottom: var(--ffe-spacing-md);
30
- grid-row: 2;
31
-
32
- @media (min-width: @breakpoint-md) {
33
- margin-right: var(--ffe-spacing-md);
34
- margin-bottom: 0;
35
- grid-column: 1;
36
- }
37
- }
38
-
39
- &__info-section-text {
40
- margin-bottom: var(--ffe-spacing-sm);
41
- }
42
-
43
- &__file-items-section {
44
- margin-top: var(--ffe-spacing-sm);
45
- line-height: 2.1875rem;
46
- grid-row: 4;
47
-
48
- @media (min-width: @breakpoint-md) {
49
- margin-top: 0;
50
- grid-row: 2;
51
- }
52
-
53
- li {
54
- display: grid;
55
- grid-template-columns: 1fr;
56
- }
57
- }
58
-
59
- &__upload-section {
60
- min-height: 150px;
61
- background-color: var(--ffe-v-fileupload-bgcolor);
62
- border-radius: 10px;
63
- text-align: center;
64
- padding: var(--ffe-spacing-2xs);
65
- grid-row: 3;
66
-
67
- @media (min-width: @breakpoint-md) {
68
- margin-top: 0;
69
- min-height: 220px;
70
- width: 280px;
71
- padding: 0;
72
- grid-row: 2;
73
- grid-column: 2;
74
- }
75
- }
76
-
77
- &__upload-section-border {
78
- display: flex;
79
- flex-direction: column;
80
- justify-content: center;
81
- align-items: center;
82
- min-height: 140px;
83
- margin: var(--ffe-spacing-2xs);
84
- padding: var(--ffe-spacing-2xs) var(--ffe-spacing-lg);
85
- border: 2px dashed var(--ffe-v-fileupload-bordercolor);
86
- border-radius: 10px;
87
- position: relative;
88
- width: 100%;
89
- right: 5px;
90
- bottom: 5px;
91
-
92
- @media (min-width: @breakpoint-md) {
93
- width: 270px;
94
- min-height: 210px;
95
- right: 0;
96
- bottom: 0;
97
- }
98
-
99
- &--hover {
100
- opacity: 0.5;
101
- border-style: solid;
102
- }
103
- }
104
-
105
- &__upload-section-title {
106
- font-family: var(--ffe-g-font-heading-small);
107
- font-size: var(--ffe-fontsize-h5);
108
- color: var(--ffe-g-heading-color);
109
- margin-bottom: var(--ffe-spacing-xs);
110
- display: none;
111
-
112
- @media (min-width: @breakpoint-md) {
113
- display: block;
114
- }
115
- }
116
-
117
- &__upload-section-microtext {
118
- .ffe-micro-text();
119
-
120
- display: none;
121
-
122
- @media (min-width: @breakpoint-md) {
123
- display: block;
124
- }
125
- }
126
-
127
- &__upload-section-subtext {
128
- .ffe-small-text();
129
-
130
- margin-top: var(--ffe-spacing-xs);
131
- }
132
-
133
- &__file-item-delete-icon {
134
- display: inline-block;
135
- }
136
-
137
- &__file-item-delete-button {
138
- padding-top: var(--ffe-spacing-2xs);
139
- margin-left: auto;
140
- background-color: transparent;
141
- border: none;
142
- line-height: 1.125rem;
143
- position: relative;
144
- color: var(--ffe-v-fileupload-btn-delete-color);
145
- cursor: pointer;
146
- font-size: 0.875rem;
147
- grid-column: 3;
148
- grid-row: 1;
149
- display: flex;
150
- align-items: center;
151
-
152
- @media (min-width: @breakpoint-md) {
153
- margin-right: var(--ffe-spacing-sm);
154
- }
155
-
156
- @media (hover: hover) and (pointer: fine) {
157
- &:hover {
158
- color: var(--ffe-v-fileupload-btn-delete-color-hover);
159
-
160
- ~ .ffe-file-upload__file-item-filename {
161
- text-decoration: underline;
162
- }
163
-
164
- ~ .ffe-file-upload__file-item-error-info
165
- > .ffe-file-upload__file-item-error-filename {
166
- text-decoration: underline;
167
- }
168
-
169
- ~ .ffe-file-upload__file-item-stencil-info
170
- > .ffe-file-upload__file-item-stencil-info-filename {
171
- text-decoration: underline;
172
- }
173
-
174
- .ffe-file-upload__file-item-delete-button-text {
175
- text-decoration: underline;
176
- }
177
- }
178
- }
179
-
180
- &:active,
181
- &:focus {
182
- color: var(--ffe-v-fileupload-btn-delete-color-hover);
183
-
184
- ~ .ffe-file-upload__file-item-filename {
185
- text-decoration: underline;
186
- }
187
-
188
- ~ .ffe-file-upload__file-item-error-info
189
- > .ffe-file-upload__file-item-error-filename {
190
- text-decoration: underline;
191
- }
192
-
193
- ~ .ffe-file-upload__file-item-stencil-info
194
- > .ffe-file-upload__file-item-stencil-info-filename {
195
- text-decoration: underline;
196
- }
197
-
198
- .ffe-file-upload__file-item-delete-button-text {
199
- text-decoration: underline;
200
- }
201
- }
202
- }
203
-
204
- &__file-item-stencil {
205
- display: grid;
206
- grid-template-columns: 1fr;
207
- }
208
-
209
- &__file-item-stencil-info {
210
- display: grid;
211
- grid-column: 1;
212
- grid-row: 1;
213
- grid-template-columns: 1fr;
214
- overflow: hidden;
215
- }
216
-
217
- &__file-item-stencil-info-background {
218
- height: 10px;
219
- border-radius: 5px;
220
- background-color: var(--ffe-v-fileupload-stencil-bg);
221
- }
222
-
223
- &__file-item-stencil-info-filename {
224
- .ffe-micro-text();
225
-
226
- margin-top: var(--ffe-spacing-2xs);
227
- white-space: nowrap;
228
- overflow: hidden;
229
- text-overflow: ellipsis;
230
- }
231
-
232
- &__file-item-loaded {
233
- display: grid;
234
- grid-template-columns: 1fr;
235
- }
236
-
237
- &__file-item-filename {
238
- grid-row: 1;
239
- grid-column: 1;
240
- white-space: nowrap;
241
- overflow: hidden;
242
- text-overflow: ellipsis;
243
- margin-top: 2px;
244
- color: var(--ffe-v-fileupload-filename-color);
245
- }
246
-
247
- &__file-item-error {
248
- display: grid;
249
- grid-gap: 5px;
250
- grid-template-columns: 25px 1fr;
251
- }
252
-
253
- &__file-item-error-icon {
254
- background-color: var(--ffe-v-error-message-icon-color);
255
- border-radius: 50%;
256
- width: 18px;
257
- height: 18px;
258
- margin-right: var(--ffe-spacing-2xs);
259
- padding: 3px;
260
- font-family: arial, sans-serif;
261
- display: inline-flex;
262
- align-items: center;
263
- justify-content: center;
264
- align-self: center;
265
- grid-column: 1;
266
- grid-row: 1;
267
-
268
- .ffe-icons {
269
- color: var(--ffe-v-fileupload-error-icon-color);
270
- }
271
- }
272
-
273
- &__file-item-error-info {
274
- display: grid;
275
- grid-row: 1;
276
- grid-column: 2;
277
- grid-template-columns: 1fr;
278
- align-content: center;
279
- }
280
-
281
- &__file-item-error-filename {
282
- .ffe-micro-text();
283
-
284
- grid-row: 1;
285
- white-space: nowrap;
286
- overflow: hidden;
287
- text-overflow: ellipsis;
288
- }
289
-
290
- &__file-item-error-message {
291
- .ffe-micro-text();
292
-
293
- grid-row: 2;
294
- white-space: nowrap;
295
- overflow: hidden;
296
- text-overflow: ellipsis;
297
- }
298
- }
package/less/theme.less DELETED
@@ -1,24 +0,0 @@
1
- :root,
2
- :host {
3
- --ffe-v-fileupload-bgcolor: var(--ffe-farge-frost-30);
4
- --ffe-v-fileupload-bordercolor: var(--ffe-farge-vann);
5
- --ffe-v-fileupload-btn-delete-color: var(--ffe-g-link-color);
6
- --ffe-v-fileupload-btn-delete-color-hover: var(--ffe-g-link-color-hover);
7
- --ffe-v-fileupload-stencil-bg: var(--ffe-farge-frost-30);
8
- --ffe-v-fileupload-filename-color: var(--ffe-farge-fjell);
9
- --ffe-v-fileupload-error-icon-color: var(--ffe-farge-hvit);
10
-
11
- @media (prefers-color-scheme: dark) {
12
- .regard-color-scheme-preference {
13
- --ffe-v-fileupload-bgcolor: var(--ffe-farge-svart);
14
- --ffe-v-fileupload-bordercolor: var(--ffe-farge-vann-30);
15
- --ffe-v-fileupload-btn-delete-color: var(--ffe-g-link-color);
16
- --ffe-v-fileupload-btn-delete-color-hover: var(
17
- --ffe-g-link-color-hover
18
- );
19
- --ffe-v-fileupload-stencil-bg: var(--ffe-farge-frost-70);
20
- --ffe-v-fileupload-filename-color: var(--ffe-farge-vann-30);
21
- --ffe-v-fileupload-error-icon-color: var(--ffe-farge-fjell);
22
- }
23
- }
24
- }