@oslokommune/punkt-css 15.0.4 → 15.2.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 (33) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/dist/css/components/datepicker.css +1 -1
  3. package/dist/css/components/datepicker.min.css +1 -1
  4. package/dist/css/components/fileupload.css +819 -0
  5. package/dist/css/components/fileupload.min.css +1 -0
  6. package/dist/css/components/preview.css +4 -0
  7. package/dist/css/components/preview.min.css +1 -1
  8. package/dist/css/components/textinput.css +1 -1
  9. package/dist/css/components/textinput.min.css +1 -1
  10. package/dist/css/elements/checkbox-radio.css +3 -3
  11. package/dist/css/elements/checkbox-radio.min.css +1 -1
  12. package/dist/css/elements/input.css +1 -1
  13. package/dist/css/elements/input.min.css +1 -1
  14. package/dist/css/elements/select.css +1 -1
  15. package/dist/css/elements/select.min.css +1 -1
  16. package/dist/css/pkt-base.css +12 -1
  17. package/dist/css/pkt-base.min.css +1 -1
  18. package/dist/css/pkt-components.css +826 -2
  19. package/dist/css/pkt-components.min.css +1 -1
  20. package/dist/css/pkt-docs.css +841 -6
  21. package/dist/css/pkt-docs.min.css +1 -1
  22. package/dist/css/pkt-elements.css +4 -4
  23. package/dist/css/pkt-elements.min.css +1 -1
  24. package/dist/css/pkt.css +841 -6
  25. package/dist/css/pkt.min.css +1 -1
  26. package/dist/scss/abstracts/variables/_colors.scss +2 -3
  27. package/dist/scss/abstracts/variables/_index.scss +1 -1
  28. package/dist/scss/base/_colors.scss +3 -3
  29. package/dist/scss/components/_datepicker.scss +1 -1
  30. package/dist/scss/components/_fileupload.scss +830 -0
  31. package/dist/scss/components/_index.scss +1 -0
  32. package/dist/scss/components/_preview.scss +4 -0
  33. package/package.json +2 -2
@@ -0,0 +1,830 @@
1
+ @use 'sass:map';
2
+ @use '../abstracts/variables';
3
+ @use '../abstracts/mixins/breakpoints' as *;
4
+ @use '../abstracts/mixins/typography';
5
+
6
+ $-module-name: 'pkt-fileupload';
7
+
8
+ pkt-fileupload,
9
+ .pkt-fileupload {
10
+ display: block;
11
+ width: fit-content;
12
+ --fg-color: var(--pkt-color-text-body-default);
13
+
14
+ // Visually hide file input but keep it accessible for screen readers
15
+ input[type='file'] {
16
+ position: absolute;
17
+ width: 1px;
18
+ height: 1px;
19
+ padding: 0;
20
+ margin: -1px;
21
+ overflow: hidden;
22
+ clip: rect(0, 0, 0, 0);
23
+ white-space: nowrap;
24
+ border: 0;
25
+ }
26
+
27
+ // ============================================
28
+ // COMPONENT MODIFIERS
29
+ // ============================================
30
+
31
+ &--full-width {
32
+ width: 100%;
33
+
34
+ .pkt-fileupload__drop-zone,
35
+ .pkt-fileupload__queue-display,
36
+ .pkt-fileupload__queue-display__item {
37
+ width: 100%;
38
+ }
39
+ }
40
+
41
+ &--error {
42
+ .pkt-fileupload__drop-zone {
43
+ border-color: var(--pkt-color-brand-red-700);
44
+ }
45
+
46
+ .pkt-alert--error.pkt-fileupload__error-alert {
47
+ margin-bottom: 1rem;
48
+ width: 100%;
49
+ }
50
+ }
51
+
52
+ &--disabled {
53
+ pointer-events: none;
54
+ --fg-color: var(--pkt-color-text-action-disabled);
55
+
56
+ .pkt-fileupload__drop-zone__placeholder__icon svg {
57
+ --fg-color: var(--pkt-color-text-action-disabled);
58
+ }
59
+
60
+ p,
61
+ labe,
62
+ button,
63
+ input[type='text'] {
64
+ color: var(--pkt-color-text-action-disabled);
65
+ }
66
+
67
+ .pkt-fileupload__drop-zone {
68
+ cursor: not-allowed;
69
+ border-color: var(--pkt-color-input-border-disabled);
70
+ background: var(--pkt-color-input-background-disabled);
71
+
72
+ &__placeholder__title,
73
+ &__placeholder__title__open-file-dialog {
74
+ color: var(--pkt-color-text-action-disabled);
75
+ text-decoration: underline;
76
+ }
77
+ }
78
+ }
79
+
80
+ // ============================================
81
+ // DROP ZONE
82
+ // ============================================
83
+
84
+ &__drop-zone {
85
+ border: 1px dashed var(--pkt-color-input-border-normal);
86
+ color: var(--pkt-color-text-action-normal);
87
+ cursor: pointer;
88
+ padding: 2rem;
89
+ text-align: center;
90
+ margin-bottom: 1rem;
91
+ font-size: 14px;
92
+
93
+ &:hover {
94
+ border-color: var(--pkt-color-input-border-hover);
95
+ }
96
+
97
+ &:active {
98
+ background-color: var(--pkt-color-surface-subtle-pale-blue);
99
+ border-color: var(--pkt-color-input-border-active);
100
+
101
+ [data-mode='dark'] & {
102
+ background-color: var(--pkt-color-surface-strong-dark-blue);
103
+ }
104
+ }
105
+
106
+ &:focus-within {
107
+ border-color: var(--pkt-color-input-border-active);
108
+ outline: 2px solid var(--pkt-color-border-states-focus);
109
+ outline-offset: 0;
110
+ }
111
+
112
+ &:hover &__placeholder__icon svg,
113
+ &:focus-within &__placeholder__icon svg {
114
+ --fg-color: var(--pkt-color-text-action-hover);
115
+ }
116
+
117
+ &:hover &__placeholder__title,
118
+ &:hover &__placeholder__title__open-file-dialog,
119
+ &:focus-within &__placeholder__title,
120
+ &:focus-within &__placeholder__title__open-file-dialog {
121
+ color: var(--pkt-color-text-action-hover);
122
+ }
123
+
124
+ &--drag-active {
125
+ background-color: var(--pkt-color-surface-subtle-pale-blue);
126
+ border-color: var(--pkt-color-input-border-active);
127
+ }
128
+
129
+ &__placeholder {
130
+ text-align: left;
131
+ display: grid;
132
+ grid-template-areas:
133
+ 'left top'
134
+ 'left bottom';
135
+ grid-template-columns: 24px auto;
136
+ grid-template-rows: auto auto;
137
+ grid-column-gap: 1rem;
138
+ width: fit-content;
139
+ margin: auto;
140
+ line-height: 22px;
141
+ pointer-events: none;
142
+
143
+ p {
144
+ margin: 0;
145
+ }
146
+
147
+ &__icon {
148
+ width: 24px;
149
+ height: 24px;
150
+ grid-area: left;
151
+ align-self: center;
152
+ justify-self: center;
153
+
154
+ svg {
155
+ --fg-color: var(--pkt-color-input-border-normal);
156
+ }
157
+ }
158
+
159
+ &__title {
160
+ @include typography.get-text('pkt-txt-14-light');
161
+ grid-area: top;
162
+
163
+ &__open-file-dialog {
164
+ pointer-events: auto;
165
+ cursor: pointer;
166
+ color: var(--pkt-color-text-action-normal);
167
+ text-decoration: underline;
168
+ background: none;
169
+ border: none;
170
+ padding: 0;
171
+ font: inherit;
172
+
173
+ &:hover {
174
+ color: var(--pkt-color-text-action-hover);
175
+ }
176
+
177
+ &:focus-visible {
178
+ outline: 2px solid var(--pkt-color-border-states-focus);
179
+ outline-offset: 2px;
180
+ }
181
+ }
182
+ }
183
+
184
+ &__formats {
185
+ @include typography.get-text('pkt-txt-12-light');
186
+ color: var(--pkt-color-text-placeholder);
187
+ grid-area: bottom;
188
+ }
189
+ }
190
+ }
191
+
192
+ // ============================================
193
+ // QUEUE DISPLAY
194
+ // ============================================
195
+
196
+ &__queue-display {
197
+ display: flex;
198
+ flex-direction: column;
199
+ padding: 0;
200
+ margin-top: 0;
201
+ margin-bottom: 1rem;
202
+ row-gap: map.get(variables.$spacing, 'size-8');
203
+
204
+ &__item__rename-input {
205
+ // Bruker <input>, og ikke <PktInput> for å ikke måtte resette masse stiler fra PktInput. Så må settes manuelt.
206
+ border: 2px solid var(--pkt-color-input-border-normal);
207
+ color: var(--pkt-color-text-body-default);
208
+ background-color: var(--pkt-color-background-default);
209
+ border-radius: 0;
210
+ margin: 0;
211
+ width: 100%;
212
+
213
+ &:hover {
214
+ border-color: var(--pkt-color-input-border-hover);
215
+ }
216
+
217
+ &:focus-visible,
218
+ &:focus,
219
+ &:active {
220
+ border-color: var(--pkt-color-input-border-active);
221
+ }
222
+ }
223
+
224
+ // Thumbnail grid layout (when thumbnails are present)
225
+ // In-progress and error items are always full width (not in grid)
226
+ // TODO: Find a fallback for browsers that don't support :has()
227
+ // TODO: pakk den inn i en :is slik at filen ikke brekkes
228
+ // TODO: husk å sjekke med browserstack, hvordan stilene brekker for thumbnail viewet.
229
+ &:has(.pkt-fileupload__queue-display__item__thumbnail) {
230
+ display: grid;
231
+ grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
232
+ gap: 1rem;
233
+
234
+ // Successfully uploaded thumbnails become grid items
235
+ .pkt-fileupload__queue-display__item:has(.pkt-fileupload__queue-display__item__thumbnail) {
236
+ border: 2px solid var(--pkt-color-border-subtle);
237
+ display: flex;
238
+ flex-direction: column;
239
+ padding: map.get(variables.$spacing, 'size-8');
240
+ min-width: 0;
241
+ overflow: hidden;
242
+ }
243
+
244
+ // In-progress items span full width
245
+ .pkt-fileupload__queue-display__item--in-progress {
246
+ grid-column: 1 / -1;
247
+ }
248
+
249
+ // Error items span full width
250
+ .pkt-fileupload__queue-display__item--error {
251
+ grid-column: 1 / -1;
252
+ }
253
+
254
+ .pkt-fileupload__queue-display__item__thumbnail {
255
+ width: 100%;
256
+ min-width: 0; // Allow truncation to work
257
+ }
258
+
259
+ .pkt-fileupload__queue-display__item__actions {
260
+ display: flex;
261
+ flex-direction: column;
262
+ width: 100%;
263
+ padding-left: 0;
264
+ align-items: flex-start;
265
+ gap: 0.5rem;
266
+ }
267
+ }
268
+
269
+ // ----------------------------------------
270
+ // Queue Item (base styles)
271
+ // ----------------------------------------
272
+
273
+ &__item {
274
+ display: grid;
275
+ grid-template-columns: auto 1fr;
276
+ align-items: center;
277
+ gap: 0.5rem;
278
+ padding: map.get(variables.$spacing, 'size-16');
279
+ border: 2px solid var(--pkt-color-border-subtle);
280
+
281
+ @include bp('tablet-big-up') {
282
+ grid-template-columns: auto 1fr auto auto;
283
+ align-items: end;
284
+ }
285
+
286
+ // ----------------------------------------
287
+ // Queue Item Elements
288
+ // ----------------------------------------
289
+
290
+ &__icon {
291
+ grid-column: 1;
292
+ grid-row: 1;
293
+ align-self: center;
294
+ justify-self: center;
295
+ color: var(--pkt-color-text-subtle);
296
+ }
297
+
298
+ &__title {
299
+ @include typography.get-text('pkt-txt-16-light');
300
+ grid-column: 2;
301
+ grid-row: 1;
302
+ min-width: 0;
303
+ max-width: 100%;
304
+ overflow: hidden; // Truncate component clamps internally; this prevents layout overflow
305
+ white-space: normal;
306
+ align-self: center;
307
+ margin: 0;
308
+ }
309
+
310
+ &__actions {
311
+ grid-column: 1/3;
312
+ grid-row: 2;
313
+ align-self: center;
314
+ justify-self: flex-start;
315
+ display: flex;
316
+ gap: 1rem;
317
+
318
+ @include bp('tablet-big-up') {
319
+ justify-self: end;
320
+ padding-left: 1rem;
321
+ grid-column: 4;
322
+ grid-row: 1;
323
+ }
324
+ }
325
+
326
+ &__filesize {
327
+ @include typography.get-text('pkt-txt-12');
328
+ color: var(--pkt-color-text-placeholder);
329
+ grid-column: 3;
330
+ grid-row: 1;
331
+ }
332
+
333
+ &__cancel-button {
334
+ @include typography.get-text('pkt-txt-14-light');
335
+ cursor: pointer;
336
+ color: var(--pkt-color-text-action-normal);
337
+ text-decoration: underline;
338
+ background: none;
339
+ border: none;
340
+ padding: 0;
341
+ color: var(--pkt-color-text-body-dark);
342
+
343
+ &:hover {
344
+ color: var(--pkt-color-text-action-hover);
345
+ }
346
+
347
+ &:focus-visible {
348
+ outline: 2px solid var(--pkt-color-border-states-focus);
349
+ outline-offset: 2px;
350
+ }
351
+ }
352
+
353
+ &__operation {
354
+ @include typography.get-text('pkt-txt-14-light');
355
+ cursor: pointer;
356
+ color: var(--pkt-color-text-action-normal);
357
+ text-decoration: underline;
358
+ background: none;
359
+ border: none;
360
+ padding: 0;
361
+
362
+ &:hover {
363
+ color: var(--pkt-color-text-action-hover);
364
+ }
365
+
366
+ &:focus-visible {
367
+ outline: 2px solid var(--pkt-color-border-states-focus);
368
+ outline-offset: 2px;
369
+ }
370
+ }
371
+
372
+ &__inline-ui {
373
+ grid-column: 2 / -1; // Span to end to fill space when actions are hidden
374
+ grid-row: 1;
375
+ display: flex;
376
+ align-items: center;
377
+ gap: 0.5rem;
378
+
379
+ .pkt-input,
380
+ input[type='text'] {
381
+ flex: 1;
382
+ min-width: 0;
383
+ padding: 0 map.get(variables.$spacing, 'size-8');
384
+ border: 2px solid var(--pkt-color-input-border-normal);
385
+ font: inherit;
386
+
387
+ &:focus {
388
+ outline: none;
389
+ border-color: var(--pkt-color-input-border-active);
390
+ }
391
+ }
392
+
393
+ .pkt-btn {
394
+ height: map.get(variables.$spacing, 'size-32');
395
+ }
396
+ }
397
+
398
+ &__operation-content {
399
+ grid-column: 1 / -1;
400
+ grid-row: 2;
401
+ padding: 0.75rem 1rem;
402
+ background: var(--pkt-color-surface-default-gray);
403
+ margin-top: 0.5rem;
404
+
405
+ &:empty {
406
+ display: none;
407
+ }
408
+ }
409
+
410
+ &__expanded-operation-ui {
411
+ grid-column: 1 / -1;
412
+ display: grid;
413
+ grid-template-columns: auto 1fr;
414
+ align-items: flex-start;
415
+ gap: 0.5rem;
416
+ }
417
+
418
+ &__comment-label {
419
+ @include typography.get-text('pkt-txt-16-medium');
420
+ }
421
+
422
+ &__comment-input {
423
+ grid-column: 1/-1;
424
+ grid-row: 1;
425
+ width: 100%;
426
+ font: inherit;
427
+ @include typography.get-text('pkt-txt-14');
428
+
429
+ &:focus {
430
+ outline: none;
431
+ border-color: var(--pkt-color-input-border-active);
432
+ }
433
+
434
+ &::placeholder {
435
+ color: var(--pkt-color-text-placeholder);
436
+ }
437
+ }
438
+
439
+ &__comment {
440
+ display: flex;
441
+ justify-content: space-between;
442
+ align-items: flex-start;
443
+ gap: 1rem;
444
+ color: var(--pkt-color-text-body-dark);
445
+
446
+ &__content {
447
+ flex: 1;
448
+ }
449
+
450
+ &__text {
451
+ @include typography.get-text('pkt-txt-16-light');
452
+ display: block;
453
+ }
454
+
455
+ &__time {
456
+ @include typography.get-text('pkt-txt-12-medium');
457
+ display: block;
458
+ margin-top: 0.25rem;
459
+ color: var(--pkt-color-text-subtle);
460
+ }
461
+
462
+ &__actions {
463
+ display: flex;
464
+ gap: 0.5rem;
465
+ flex-shrink: 0;
466
+
467
+ .pkt-icon svg {
468
+ --fg-color: var(--pkt-color-text-body-dark);
469
+ }
470
+ }
471
+
472
+ &__action {
473
+ background: none;
474
+ border: none;
475
+ padding: 0;
476
+ cursor: pointer;
477
+ color: var(--pkt-color-text-subtle);
478
+ display: flex;
479
+ align-items: center;
480
+ justify-content: center;
481
+
482
+ &:hover {
483
+ color: var(--pkt-color-text-action-hover);
484
+ }
485
+
486
+ &:focus-visible {
487
+ outline: 2px solid var(--pkt-color-border-states-focus);
488
+ outline-offset: 2px;
489
+ }
490
+
491
+ .pkt-icon {
492
+ width: 12px;
493
+ height: 15px;
494
+ }
495
+ }
496
+ }
497
+
498
+ &__thumbnail {
499
+ min-width: 0;
500
+
501
+ &__image-wrapper {
502
+ position: relative;
503
+ display: block;
504
+ width: 100%;
505
+ height: max-content;
506
+ padding: 0;
507
+ border: 0;
508
+ background: none;
509
+ cursor: pointer;
510
+
511
+ img {
512
+ display: block;
513
+ width: 100%;
514
+ aspect-ratio: 1;
515
+ object-fit: cover;
516
+ }
517
+
518
+ &:hover,
519
+ &:focus-visible {
520
+ .pkt-fileupload__queue-display__item__thumbnail__expand-icon {
521
+ background-color: var(--pkt-color-text-action-hover);
522
+ svg {
523
+ --fg-color: var(--pkt-color-text-body-light);
524
+ }
525
+ }
526
+ }
527
+ }
528
+
529
+ &__expand-icon {
530
+ position: absolute;
531
+ top: 0.25rem;
532
+ right: 0.25rem;
533
+ width: 30px;
534
+ height: 30px;
535
+ z-index: 2;
536
+ background-color: var(--pkt-color-background-subtle);
537
+ pointer-events: none;
538
+ padding: 2px;
539
+ }
540
+
541
+ &__title {
542
+ @include typography.get-text('pkt-txt-14');
543
+ margin-top: 0.5rem;
544
+ overflow: hidden;
545
+ white-space: nowrap;
546
+ text-overflow: ellipsis;
547
+ min-width: 0; // Required for text-overflow to work in flex containers
548
+ }
549
+ }
550
+
551
+ // ----------------------------------------
552
+ // Queue Item State Modifiers
553
+ // ----------------------------------------
554
+
555
+ &--canceled {
556
+ opacity: 0.6;
557
+ }
558
+
559
+ // Shared styles for transfer states
560
+ &--in-progress,
561
+ &--error {
562
+ border: none;
563
+ grid-template-columns: auto 1fr auto;
564
+ padding: 1rem;
565
+ row-gap: 0.5rem;
566
+ color: var(--pkt-color-text-body-dark);
567
+
568
+ .pkt-fileupload__queue-display__item__icon {
569
+ grid-column: 1;
570
+ grid-row: 1;
571
+
572
+ svg {
573
+ --fg-color: var(--pkt-color-text-body-dark);
574
+ }
575
+ }
576
+
577
+ .pkt-fileupload__queue-display__item__title {
578
+ @include typography.get-text('pkt-txt-16-medium');
579
+ grid-column: 2;
580
+ grid-row: 1;
581
+ margin: 0;
582
+ }
583
+
584
+ .pkt-fileupload__queue-display__item__filesize {
585
+ @include typography.get-text('pkt-txt-12-medium');
586
+ color: var(--pkt-color-text-subtle);
587
+ grid-column: 1 / 3;
588
+ grid-row: 3;
589
+ }
590
+
591
+ .pkt-fileupload__queue-display__item__cancel-button {
592
+ grid-column: 3;
593
+ grid-row: 1;
594
+ margin-left: 1rem;
595
+
596
+ &:hover {
597
+ color: var(--pkt-color-brand-warm-blue-1000);
598
+ }
599
+ }
600
+
601
+ .pkt-fileupload__queue-display__item__error-message {
602
+ @include typography.get-text('pkt-txt-12');
603
+ grid-column: 2;
604
+ grid-row: 2;
605
+ color: var(--pkt-color-text-default);
606
+ }
607
+
608
+ // Override progress bar wrapper styles
609
+ .pkt-progressbar__bar-wrapper {
610
+ height: map.get(variables.$spacing, 'size-4');
611
+ background-color: var(--pkt-color-surface-default-gray);
612
+ }
613
+ }
614
+
615
+ // Error state (indeterminate - no progress bar)
616
+ &--error {
617
+ background-color: var(--pkt-color-surface-default-faded-red);
618
+
619
+ .pkt-fileupload__queue-display__item__icon {
620
+ align-self: center;
621
+ }
622
+
623
+ // Error state with progress bar (determinate upload that failed)
624
+ &:has(.pkt-fileupload__queue-display__item__progress--error) {
625
+ background-color: var(--pkt-color-surface-default-faded-red);
626
+ grid-template-rows: auto auto auto;
627
+
628
+ .pkt-fileupload__queue-display__item__progress {
629
+ grid-column: 1 / -1;
630
+ grid-row: 2;
631
+ margin: 0;
632
+
633
+ // Override progress bar fill to red
634
+ .pkt-progressbar__bar {
635
+ background-color: var(--pkt-color-brand-red-1000);
636
+ }
637
+ }
638
+
639
+ .pkt-fileupload__queue-display__item__error-message {
640
+ grid-column: 2 / -1;
641
+ grid-row: 3;
642
+ text-align: right;
643
+ }
644
+ }
645
+ }
646
+
647
+ // In-progress state
648
+ &--in-progress {
649
+ background-color: var(--pkt-color-surface-default-light-blue);
650
+ grid-template-rows: auto auto auto;
651
+
652
+ .pkt-fileupload__queue-display__item__progress {
653
+ grid-column: 1 / -1;
654
+ grid-row: 2;
655
+ margin: 0;
656
+ }
657
+
658
+ .pkt-fileupload__queue-display__item__percentage {
659
+ @include typography.get-text('pkt-txt-12');
660
+ grid-column: 3;
661
+ grid-row: 3;
662
+ text-align: right;
663
+ }
664
+
665
+ .pkt-fileupload__queue-display__item__loading-text {
666
+ @include typography.get-text('pkt-txt-12');
667
+ grid-column: 2;
668
+ grid-row: 2;
669
+ }
670
+ }
671
+ }
672
+ }
673
+ }
674
+
675
+ // ============================================
676
+ // WRAPPER INTEGRATION (InputWrapper)
677
+ // ============================================
678
+
679
+ .pkt-fileupload-wrapper {
680
+ .pkt-inputwrapper__fieldset {
681
+ margin-bottom: 0;
682
+ }
683
+
684
+ .pkt-inputwrapper__helptext {
685
+ margin-bottom: 0.5rem;
686
+ }
687
+ }
688
+
689
+ // ============================================
690
+ // IMAGE PREVIEW MODAL
691
+ // ============================================
692
+
693
+ .pkt-fileupload__image-preview-modal {
694
+ // Reset padding from modal
695
+ .pkt-contents {
696
+ padding: 0;
697
+ }
698
+
699
+ // ============================================
700
+ // MODAL OVERRIDES to make it look like a lightbox!
701
+ // TODO: When we get an actual PktLightBox component, we can remove these overrides.
702
+ // For now, we base us on the PktModal component so we maintain the functionality and only override the styles.
703
+ // ============================================
704
+
705
+ .pkt-modal {
706
+ max-height: 100%;
707
+ max-width: 100%;
708
+ height: 100%;
709
+ width: 100%;
710
+ margin: 0;
711
+
712
+ .pkt-modal {
713
+ &__wrapper {
714
+ max-height: 100%;
715
+
716
+ .pkt-modal__content {
717
+ padding: 0;
718
+ }
719
+ }
720
+
721
+ &__header {
722
+ text-align: left;
723
+ }
724
+
725
+ &__headingText {
726
+ line-height: 2rem; // sattt til 34px.
727
+ padding: 1rem 0 0 1.5rem;
728
+ overflow: hidden;
729
+ white-space: nowrap;
730
+ text-overflow: ellipsis;
731
+ max-width: calc(100% - 3rem); // Leave space for close button
732
+ background-color: transparent;
733
+ color: var(--pkt-color-text-body-light);
734
+ }
735
+
736
+ &__container {
737
+ padding-top: 0;
738
+ background-color: transparent;
739
+ }
740
+
741
+ &__closeButton {
742
+ background-color: transparent;
743
+ .pkt-btn {
744
+ color: var(--pkt-color-text-body-light);
745
+
746
+ &:hover,
747
+ &:focus-visible {
748
+ color: var(--pkt-color-warm-blue-1000);
749
+ }
750
+ }
751
+ }
752
+ }
753
+
754
+ &::backdrop {
755
+ background-color: rgba(0, 0, 0, 0.85);
756
+ }
757
+ }
758
+ }
759
+
760
+ .pkt-fileupload__image-preview {
761
+ position: relative;
762
+ background-color: var(--pkt-color-surface-default);
763
+ display: grid;
764
+ grid-template-columns: auto 1fr auto;
765
+ grid-template-rows: 1fr auto;
766
+ grid-template-areas:
767
+ 'prev content next'
768
+ '. counter .';
769
+ align-items: center;
770
+ justify-content: space-between;
771
+ gap: 1rem;
772
+
773
+ &__content {
774
+ height: 75vh;
775
+ grid-area: prev-start / prev-start / next-end / next-end;
776
+ display: flex;
777
+ align-items: center;
778
+ justify-content: center;
779
+ flex: 1;
780
+ min-width: 0;
781
+ max-height: 100%;
782
+ }
783
+
784
+ &__image {
785
+ max-width: 100%;
786
+ max-height: fit-content;
787
+ object-fit: contain;
788
+ }
789
+
790
+ &__nav {
791
+ cursor: pointer;
792
+ display: flex;
793
+ align-items: center;
794
+ justify-content: center;
795
+ border-radius: 50%;
796
+ background-color: var(--pkt-color-background-subtle);
797
+ z-index: 2;
798
+
799
+ .pkt-button:hover,
800
+ .pkt-button:focus-visible {
801
+ background-color: var(--pkt-color-text-action-hover);
802
+ }
803
+
804
+ &--prev {
805
+ grid-area: prev;
806
+ margin-left: 0.5rem;
807
+ }
808
+ &--next {
809
+ grid-area: next;
810
+ margin-right: 0.5rem;
811
+ }
812
+
813
+ .pkt-icon {
814
+ width: 24px;
815
+ height: 24px;
816
+
817
+ &:hover,
818
+ &:focus-visible svg {
819
+ --fg-color: var(--pkt-color-text-body-light);
820
+ }
821
+ }
822
+ }
823
+
824
+ &__counter {
825
+ @include typography.get-text('pkt-txt-14-medium');
826
+ color: var(--pkt-color-text-body-light);
827
+ grid-area: counter;
828
+ justify-self: center;
829
+ }
830
+ }