@oslokommune/punkt-css 16.13.3 → 16.15.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/CHANGELOG.md +35 -0
- package/dist/css/components/combobox.css +4 -0
- package/dist/css/components/combobox.min.css +1 -1
- package/dist/css/components/fileupload.css +223 -138
- package/dist/css/components/fileupload.min.css +1 -1
- package/dist/css/components/header-service.css +184 -112
- package/dist/css/components/header-service.min.css +1 -1
- package/dist/css/components/textinput.css +16 -6
- package/dist/css/components/textinput.min.css +1 -1
- package/dist/css/elements/checkbox-radio.css +3 -3
- package/dist/css/elements/checkbox-radio.min.css +1 -1
- package/dist/css/elements/input.css +16 -6
- package/dist/css/elements/input.min.css +1 -1
- package/dist/css/elements/select.css +19 -7
- package/dist/css/elements/select.min.css +1 -1
- package/dist/css/pkt-base.css +1 -1
- package/dist/css/pkt-base.min.css +1 -1
- package/dist/css/pkt-components.css +427 -256
- package/dist/css/pkt-components.min.css +1 -1
- package/dist/css/pkt-docs.css +434 -261
- package/dist/css/pkt-docs.min.css +1 -1
- package/dist/css/pkt-elements.css +22 -10
- package/dist/css/pkt-elements.min.css +1 -1
- package/dist/css/pkt.css +434 -261
- package/dist/css/pkt.min.css +1 -1
- package/dist/scss/abstracts/mixins/_container-queries.scss +8 -6
- package/dist/scss/abstracts/variables/_index.scss +1 -1
- package/dist/scss/components/_combobox.scss +4 -0
- package/dist/scss/components/_fileupload.scss +220 -133
- package/dist/scss/elements/_input.scss +19 -7
- package/package.json +2 -2
|
@@ -17,14 +17,16 @@
|
|
|
17
17
|
// @param $min-width - The minimum width threshold (in rem or other CSS units)
|
|
18
18
|
|
|
19
19
|
@mixin cq($container-name, $min-width) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
@supports not (container-type: inline-size) {
|
|
21
|
+
@media screen and (min-width: $min-width) {
|
|
22
|
+
@content;
|
|
23
|
+
}
|
|
23
24
|
}
|
|
24
25
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
@supports (container-type: inline-size) {
|
|
27
|
+
@container #{$container-name} (min-width: #{$min-width}) {
|
|
28
|
+
@content;
|
|
29
|
+
}
|
|
28
30
|
}
|
|
29
31
|
}
|
|
30
32
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use '../abstracts/variables';
|
|
3
3
|
@use '../abstracts/mixins/breakpoints' as *;
|
|
4
|
+
@use '../abstracts/mixins/container-queries' as *;
|
|
4
5
|
@use '../abstracts/mixins/typography';
|
|
5
6
|
|
|
6
7
|
$-module-name: 'pkt-fileupload';
|
|
@@ -8,7 +9,7 @@ $-module-name: 'pkt-fileupload';
|
|
|
8
9
|
pkt-fileupload,
|
|
9
10
|
.pkt-fileupload {
|
|
10
11
|
display: block;
|
|
11
|
-
width:
|
|
12
|
+
width: min(100%, 31rem);
|
|
12
13
|
--fg-color: var(--pkt-color-text-body-default);
|
|
13
14
|
|
|
14
15
|
// Visually hide file input but keep it accessible for screen readers
|
|
@@ -28,7 +29,8 @@ pkt-fileupload,
|
|
|
28
29
|
// COMPONENT MODIFIERS
|
|
29
30
|
// ============================================
|
|
30
31
|
|
|
31
|
-
&--full-width
|
|
32
|
+
&--full-width,
|
|
33
|
+
&[fullwidth] {
|
|
32
34
|
width: 100%;
|
|
33
35
|
|
|
34
36
|
.pkt-fileupload__drop-zone,
|
|
@@ -58,7 +60,7 @@ pkt-fileupload,
|
|
|
58
60
|
}
|
|
59
61
|
|
|
60
62
|
p,
|
|
61
|
-
|
|
63
|
+
label,
|
|
62
64
|
button,
|
|
63
65
|
input[type='text'] {
|
|
64
66
|
color: var(--pkt-color-text-action-disabled);
|
|
@@ -201,6 +203,9 @@ pkt-fileupload,
|
|
|
201
203
|
margin-bottom: 1rem;
|
|
202
204
|
row-gap: map.get(variables.$spacing, 'size-8');
|
|
203
205
|
|
|
206
|
+
container-type: inline-size;
|
|
207
|
+
container-name: queue-item;
|
|
208
|
+
|
|
204
209
|
&__item__rename-input {
|
|
205
210
|
// Bruker <input>, og ikke <PktInput> for å ikke måtte resette masse stiler fra PktInput. Så må settes manuelt.
|
|
206
211
|
border: 2px solid var(--pkt-color-input-border-normal);
|
|
@@ -223,17 +228,14 @@ pkt-fileupload,
|
|
|
223
228
|
|
|
224
229
|
// Thumbnail grid layout (when thumbnails are present)
|
|
225
230
|
// In-progress and error items are always full width (not in grid)
|
|
226
|
-
|
|
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) {
|
|
231
|
+
&:is(:has(.pkt-fileupload__queue-display__item__thumbnail)) {
|
|
230
232
|
display: grid;
|
|
231
233
|
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
|
|
232
234
|
gap: 1rem;
|
|
233
235
|
max-width: 100%;
|
|
234
236
|
|
|
235
237
|
// Successfully uploaded thumbnails become grid items
|
|
236
|
-
.pkt-fileupload__queue-display__item:has(.pkt-fileupload__queue-display__item__thumbnail) {
|
|
238
|
+
.pkt-fileupload__queue-display__item:is(:has(.pkt-fileupload__queue-display__item__thumbnail)) {
|
|
237
239
|
border: 2px solid var(--pkt-color-border-subtle);
|
|
238
240
|
display: flex;
|
|
239
241
|
flex-direction: column;
|
|
@@ -280,12 +282,6 @@ pkt-fileupload,
|
|
|
280
282
|
padding: map.get(variables.$spacing, 'size-16');
|
|
281
283
|
border: 2px solid var(--pkt-color-border-subtle);
|
|
282
284
|
|
|
283
|
-
container-type: inline-size;
|
|
284
|
-
|
|
285
|
-
@include bp('tablet-big-up') {
|
|
286
|
-
grid-template-columns: auto minmax(0, 1fr) auto auto;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
285
|
// ----------------------------------------
|
|
290
286
|
// Queue Item Elements
|
|
291
287
|
// ----------------------------------------
|
|
@@ -304,35 +300,30 @@ pkt-fileupload,
|
|
|
304
300
|
grid-row: 1;
|
|
305
301
|
min-width: 0;
|
|
306
302
|
max-width: 100%;
|
|
307
|
-
overflow: hidden; // Truncate component clamps internally; this prevents layout overflow
|
|
308
|
-
white-space: normal;
|
|
309
|
-
overflow-wrap: anywhere;
|
|
310
|
-
word-break: break-word;
|
|
311
303
|
align-self: center;
|
|
312
304
|
margin: 0;
|
|
305
|
+
display: flex;
|
|
306
|
+
align-items: baseline;
|
|
307
|
+
flex-wrap: nowrap;
|
|
308
|
+
overflow: hidden;
|
|
313
309
|
}
|
|
314
310
|
|
|
315
311
|
&__actions {
|
|
316
|
-
grid-column: 1
|
|
312
|
+
grid-column: 1/-1;
|
|
317
313
|
grid-row: 2;
|
|
318
314
|
align-self: center;
|
|
319
315
|
justify-self: flex-start;
|
|
320
316
|
display: flex;
|
|
321
317
|
gap: 1rem;
|
|
322
|
-
|
|
323
|
-
@include bp('tablet-big-up') {
|
|
324
|
-
justify-self: end;
|
|
325
|
-
padding-left: 1rem;
|
|
326
|
-
grid-column: 4;
|
|
327
|
-
grid-row: 1;
|
|
328
|
-
}
|
|
318
|
+
flex-wrap: wrap;
|
|
329
319
|
}
|
|
330
320
|
|
|
331
321
|
&__filesize {
|
|
332
|
-
@include typography.get-text('pkt-txt-
|
|
322
|
+
@include typography.get-text('pkt-txt-14-light');
|
|
333
323
|
color: var(--pkt-color-text-placeholder);
|
|
334
|
-
|
|
335
|
-
|
|
324
|
+
flex: 0 0 auto;
|
|
325
|
+
white-space: nowrap;
|
|
326
|
+
padding-left: 0.5rem;
|
|
336
327
|
}
|
|
337
328
|
|
|
338
329
|
&__cancel-button {
|
|
@@ -402,7 +393,6 @@ pkt-fileupload,
|
|
|
402
393
|
|
|
403
394
|
&__operation-content {
|
|
404
395
|
grid-column: 1 / -1;
|
|
405
|
-
grid-row: 2;
|
|
406
396
|
padding: 0.75rem 1rem;
|
|
407
397
|
background: var(--pkt-color-surface-default-gray);
|
|
408
398
|
margin-top: 0.5rem;
|
|
@@ -418,15 +408,23 @@ pkt-fileupload,
|
|
|
418
408
|
grid-template-columns: auto 1fr;
|
|
419
409
|
align-items: flex-start;
|
|
420
410
|
gap: 0.5rem;
|
|
411
|
+
|
|
412
|
+
.pkt-btn {
|
|
413
|
+
grid-row: 3;
|
|
414
|
+
}
|
|
421
415
|
}
|
|
422
416
|
|
|
423
417
|
&__comment-label {
|
|
418
|
+
grid-column: 1/-1;
|
|
419
|
+
|
|
420
|
+
grid-row: 1;
|
|
421
|
+
|
|
424
422
|
@include typography.get-text('pkt-txt-16-medium');
|
|
425
423
|
}
|
|
426
424
|
|
|
427
425
|
&__comment-input {
|
|
428
426
|
grid-column: 1/-1;
|
|
429
|
-
grid-row:
|
|
427
|
+
grid-row: 2;
|
|
430
428
|
width: 100%;
|
|
431
429
|
font: inherit;
|
|
432
430
|
@include typography.get-text('pkt-txt-14');
|
|
@@ -503,16 +501,24 @@ pkt-fileupload,
|
|
|
503
501
|
&__thumbnail {
|
|
504
502
|
min-width: 0;
|
|
505
503
|
|
|
506
|
-
|
|
504
|
+
// Same element as React: .thumbnail__image-wrapper and .pkt-btn on one <button>
|
|
505
|
+
&__image-wrapper.pkt-btn {
|
|
507
506
|
position: relative;
|
|
508
507
|
display: block;
|
|
509
508
|
width: 100%;
|
|
510
509
|
height: max-content;
|
|
510
|
+
min-height: 0;
|
|
511
511
|
padding: 0;
|
|
512
512
|
border: 0;
|
|
513
513
|
background: none;
|
|
514
514
|
cursor: pointer;
|
|
515
515
|
|
|
516
|
+
.pkt-btn__text {
|
|
517
|
+
display: block;
|
|
518
|
+
width: 100%;
|
|
519
|
+
line-height: 0;
|
|
520
|
+
}
|
|
521
|
+
|
|
516
522
|
img {
|
|
517
523
|
display: block;
|
|
518
524
|
width: 100%;
|
|
@@ -546,10 +552,15 @@ pkt-fileupload,
|
|
|
546
552
|
&__title {
|
|
547
553
|
@include typography.get-text('pkt-txt-14');
|
|
548
554
|
margin-top: 0.5rem;
|
|
555
|
+
margin-bottom: 0.25rem;
|
|
556
|
+
min-width: 0;
|
|
557
|
+
max-width: 100%;
|
|
549
558
|
overflow: hidden;
|
|
550
559
|
white-space: nowrap;
|
|
551
|
-
|
|
552
|
-
|
|
560
|
+
overflow-wrap: anywhere;
|
|
561
|
+
word-break: break-word;
|
|
562
|
+
-webkit-line-clamp: 2;
|
|
563
|
+
line-clamp: 2;
|
|
553
564
|
}
|
|
554
565
|
|
|
555
566
|
&--fallback {
|
|
@@ -592,13 +603,6 @@ pkt-fileupload,
|
|
|
592
603
|
margin: 0;
|
|
593
604
|
}
|
|
594
605
|
|
|
595
|
-
.pkt-fileupload__queue-display__item__filesize {
|
|
596
|
-
@include typography.get-text('pkt-txt-12-medium');
|
|
597
|
-
color: var(--pkt-color-text-subtle);
|
|
598
|
-
grid-column: 1 / 3;
|
|
599
|
-
grid-row: 3;
|
|
600
|
-
}
|
|
601
|
-
|
|
602
606
|
.pkt-fileupload__queue-display__item__cancel-button {
|
|
603
607
|
grid-column: 3;
|
|
604
608
|
grid-row: 1;
|
|
@@ -632,7 +636,7 @@ pkt-fileupload,
|
|
|
632
636
|
}
|
|
633
637
|
|
|
634
638
|
// Error state with progress bar (determinate upload that failed)
|
|
635
|
-
&:has(.pkt-fileupload__queue-display__item__progress--error) {
|
|
639
|
+
&:is(:has(.pkt-fileupload__queue-display__item__progress--error)) {
|
|
636
640
|
background-color: var(--pkt-color-surface-default-faded-red);
|
|
637
641
|
grid-template-rows: auto auto auto;
|
|
638
642
|
|
|
@@ -677,28 +681,69 @@ pkt-fileupload,
|
|
|
677
681
|
@include typography.get-text('pkt-txt-12');
|
|
678
682
|
grid-column: 2;
|
|
679
683
|
grid-row: 2;
|
|
684
|
+
|
|
685
|
+
&::after {
|
|
686
|
+
content: '...';
|
|
687
|
+
display: inline-block;
|
|
688
|
+
overflow: hidden;
|
|
689
|
+
vertical-align: baseline;
|
|
690
|
+
width: 0;
|
|
691
|
+
animation: pkt-fileupload-loading-dots 1.2s steps(4, end) infinite;
|
|
692
|
+
}
|
|
680
693
|
}
|
|
681
694
|
}
|
|
682
695
|
}
|
|
683
696
|
}
|
|
684
697
|
}
|
|
685
698
|
|
|
686
|
-
|
|
687
|
-
|
|
699
|
+
@keyframes pkt-fileupload-loading-dots {
|
|
700
|
+
0%,
|
|
701
|
+
100% {
|
|
702
|
+
width: 0;
|
|
703
|
+
}
|
|
704
|
+
33% {
|
|
705
|
+
width: 0.4em;
|
|
706
|
+
}
|
|
707
|
+
66% {
|
|
708
|
+
width: 0.8em;
|
|
709
|
+
}
|
|
710
|
+
99% {
|
|
711
|
+
width: 1.2em;
|
|
712
|
+
}
|
|
688
713
|
}
|
|
689
714
|
|
|
690
|
-
@
|
|
691
|
-
.pkt-fileupload__queue-
|
|
692
|
-
|
|
693
|
-
|
|
715
|
+
@media (prefers-reduced-motion: reduce) {
|
|
716
|
+
.pkt-fileupload__queue-display__item__loading-text::after {
|
|
717
|
+
animation: none;
|
|
718
|
+
width: 1.2em; // show the three dots at rest rather than stepping
|
|
694
719
|
}
|
|
720
|
+
}
|
|
695
721
|
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
722
|
+
// Middle-truncation for long filenames — head shrinks, tail and filesize stay fixed.
|
|
723
|
+
.pkt-fileupload__queue-display__item__title__head {
|
|
724
|
+
min-width: 0;
|
|
725
|
+
flex: 0 1 auto;
|
|
726
|
+
overflow: hidden;
|
|
727
|
+
white-space: nowrap;
|
|
728
|
+
text-overflow: ellipsis;
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
.pkt-fileupload__queue-display__item__title__tail {
|
|
732
|
+
flex: 0 0 auto;
|
|
733
|
+
white-space: nowrap;
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
[data-pkt-truncate-part='first']:not(.pkt-fileupload__queue-display__item__title__head) {
|
|
737
|
+
min-width: 0;
|
|
738
|
+
overflow: hidden;
|
|
739
|
+
white-space: nowrap;
|
|
740
|
+
text-overflow: ellipsis;
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
.pkt-fileupload__queue-display__item__thumbnail__title:is(:has(> .pkt-fileupload__queue-display__item__title__tail)) {
|
|
744
|
+
display: flex;
|
|
745
|
+
flex-wrap: nowrap;
|
|
746
|
+
overflow: hidden;
|
|
702
747
|
}
|
|
703
748
|
|
|
704
749
|
// ============================================
|
|
@@ -727,71 +772,98 @@ pkt-fileupload,
|
|
|
727
772
|
// ============================================
|
|
728
773
|
// IMAGE PREVIEW MODAL
|
|
729
774
|
// ============================================
|
|
775
|
+
// React: `className` is merged onto <dialog class="pkt-modal … pkt-fileupload__image-preview-modal">`.
|
|
776
|
+
// Elements: the same class lives on <pkt-modal>, dialog is only `.pkt-modal`.
|
|
777
|
+
// Use both selector forms so lightbox sizing and header/content overrides apply everywhere.
|
|
730
778
|
|
|
731
779
|
.pkt-fileupload__image-preview-modal {
|
|
732
|
-
// Reset padding from modal
|
|
780
|
+
// Reset padding from modal (docs / legacy)
|
|
733
781
|
.pkt-contents {
|
|
734
782
|
padding: 0;
|
|
735
783
|
}
|
|
784
|
+
}
|
|
736
785
|
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
// ============================================
|
|
786
|
+
// ============================================
|
|
787
|
+
// MODAL OVERRIDES to make it look like a lightbox!
|
|
788
|
+
// TODO: When we get an actual PktLightBox component, we can remove these overrides.
|
|
789
|
+
// ============================================
|
|
742
790
|
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
791
|
+
.pkt-modal.pkt-fileupload__image-preview-modal,
|
|
792
|
+
pkt-modal.pkt-fileupload__image-preview-modal .pkt-modal {
|
|
793
|
+
// Shrink-wrap to content; beat `.pkt-modal--medium { width: … }` and full-viewport dialog defaults.
|
|
794
|
+
box-sizing: border-box;
|
|
795
|
+
width: fit-content;
|
|
796
|
+
max-width: min(92vw, 56rem);
|
|
797
|
+
max-height: min(92vh, 56rem);
|
|
798
|
+
height: auto;
|
|
799
|
+
margin: auto;
|
|
800
|
+
|
|
801
|
+
// Let the body row shrink so tall images cannot push the counter below the viewport.
|
|
802
|
+
.pkt-modal__wrapper {
|
|
803
|
+
max-height: min(92vh, 56rem);
|
|
804
|
+
min-height: 0;
|
|
805
|
+
grid-template-rows: auto minmax(0, 1fr);
|
|
806
|
+
}
|
|
749
807
|
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
808
|
+
.pkt-modal__container {
|
|
809
|
+
min-height: 0;
|
|
810
|
+
}
|
|
753
811
|
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
}
|
|
812
|
+
.pkt-modal__header {
|
|
813
|
+
text-align: left;
|
|
814
|
+
}
|
|
758
815
|
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
816
|
+
.pkt-modal__headingText {
|
|
817
|
+
line-height: 2rem;
|
|
818
|
+
padding: 1rem 0 0 1.5rem;
|
|
819
|
+
overflow: hidden;
|
|
820
|
+
white-space: nowrap;
|
|
821
|
+
text-overflow: ellipsis;
|
|
822
|
+
max-width: calc(100% - 3rem);
|
|
823
|
+
background-color: transparent;
|
|
824
|
+
color: var(--pkt-color-text-body-default);
|
|
825
|
+
}
|
|
762
826
|
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
white-space: nowrap;
|
|
768
|
-
text-overflow: ellipsis;
|
|
769
|
-
max-width: calc(100% - 3rem); // Leave space for close button
|
|
770
|
-
background-color: transparent;
|
|
771
|
-
color: var(--pkt-color-text-body-light);
|
|
772
|
-
}
|
|
827
|
+
.pkt-modal__container {
|
|
828
|
+
padding-top: 0;
|
|
829
|
+
background-color: transparent;
|
|
830
|
+
}
|
|
773
831
|
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
832
|
+
.pkt-modal__content {
|
|
833
|
+
padding: 0 map.get(variables.$spacing, 'size-16') map.get(variables.$spacing, 'size-16');
|
|
834
|
+
// Strip scroll-hint gradients from `_modal.scss` so the image and counter stay clear.
|
|
835
|
+
background: var(--pkt-color-surface-default);
|
|
836
|
+
background-image: none;
|
|
837
|
+
box-shadow: none;
|
|
838
|
+
// Rejoin the modal flex/grid chain: visible overflow lets intrinsic image height ignore the viewport cap.
|
|
839
|
+
min-height: 0;
|
|
840
|
+
overflow: auto;
|
|
841
|
+
overscroll-behavior: contain;
|
|
842
|
+
|
|
843
|
+
// Stretch preview so inner grid `1fr` gets a real height and the image can shrink (light DOM + React).
|
|
844
|
+
.pkt-fileupload__image-preview {
|
|
845
|
+
flex: 1 1 auto;
|
|
846
|
+
min-height: 0;
|
|
847
|
+
align-self: stretch;
|
|
848
|
+
width: 100%;
|
|
849
|
+
}
|
|
850
|
+
}
|
|
778
851
|
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
.pkt-btn {
|
|
782
|
-
color: var(--pkt-color-text-body-light);
|
|
852
|
+
.pkt-modal__closeButton {
|
|
853
|
+
background-color: transparent;
|
|
783
854
|
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
855
|
+
.pkt-btn {
|
|
856
|
+
color: var(--pkt-color-text-body-default);
|
|
857
|
+
|
|
858
|
+
&:hover,
|
|
859
|
+
&:focus-visible {
|
|
860
|
+
color: var(--pkt-color-text-action-hover);
|
|
789
861
|
}
|
|
790
862
|
}
|
|
863
|
+
}
|
|
791
864
|
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
}
|
|
865
|
+
&::backdrop {
|
|
866
|
+
background-color: rgba(0, 0, 0, 0.85);
|
|
795
867
|
}
|
|
796
868
|
}
|
|
797
869
|
|
|
@@ -800,69 +872,84 @@ pkt-fileupload,
|
|
|
800
872
|
background-color: var(--pkt-color-surface-default);
|
|
801
873
|
display: grid;
|
|
802
874
|
grid-template-columns: auto 1fr auto;
|
|
803
|
-
|
|
804
|
-
grid-template-
|
|
805
|
-
'prev content next'
|
|
806
|
-
'. counter .';
|
|
875
|
+
// First row takes remaining space but may shrink (tall portraits); second row keeps the counter on-screen.
|
|
876
|
+
grid-template-rows: minmax(0, 1fr) auto;
|
|
807
877
|
align-items: center;
|
|
808
878
|
justify-content: space-between;
|
|
809
879
|
gap: 1rem;
|
|
880
|
+
min-height: 0;
|
|
881
|
+
// Fallback when host layout does not pass a height down (extra safety vs. huge intrinsic size).
|
|
882
|
+
max-height: min(calc(92vh - 6rem), 56rem);
|
|
810
883
|
|
|
811
884
|
&__content {
|
|
812
|
-
min-height:
|
|
813
|
-
|
|
885
|
+
min-height: 0;
|
|
886
|
+
height: 100%;
|
|
887
|
+
grid-column: 1 / -1;
|
|
888
|
+
grid-row: 1;
|
|
889
|
+
z-index: 0;
|
|
814
890
|
display: flex;
|
|
815
891
|
align-items: center;
|
|
816
892
|
justify-content: center;
|
|
817
893
|
flex: 1;
|
|
818
894
|
min-width: 0;
|
|
819
|
-
|
|
895
|
+
overflow: hidden;
|
|
820
896
|
}
|
|
821
897
|
|
|
822
898
|
&__image {
|
|
823
899
|
max-width: 100%;
|
|
824
|
-
max-height:
|
|
900
|
+
max-height: 100%;
|
|
901
|
+
width: auto;
|
|
902
|
+
height: auto;
|
|
825
903
|
object-fit: contain;
|
|
826
904
|
}
|
|
827
905
|
|
|
828
906
|
&__nav {
|
|
829
|
-
cursor: pointer;
|
|
830
|
-
display: flex;
|
|
831
|
-
align-items: center;
|
|
832
|
-
justify-content: center;
|
|
833
|
-
border-radius: 50%;
|
|
834
|
-
background-color: var(--pkt-color-background-subtle);
|
|
835
|
-
z-index: 2;
|
|
836
|
-
|
|
837
|
-
.pkt-button:hover,
|
|
838
|
-
.pkt-button:focus-visible {
|
|
839
|
-
background-color: var(--pkt-color-text-action-hover);
|
|
840
|
-
}
|
|
841
|
-
|
|
842
907
|
&--prev {
|
|
843
|
-
grid-
|
|
908
|
+
grid-column: 1;
|
|
909
|
+
grid-row: 1;
|
|
844
910
|
margin-left: 0.5rem;
|
|
845
911
|
}
|
|
912
|
+
|
|
846
913
|
&--next {
|
|
847
|
-
grid-
|
|
914
|
+
grid-column: 3;
|
|
915
|
+
grid-row: 1;
|
|
848
916
|
margin-right: 0.5rem;
|
|
849
917
|
}
|
|
850
918
|
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
919
|
+
// Same element as React: nav BEM + `.pkt-btn--medium` — round hit target; skin from `.pkt-btn--secondary`.
|
|
920
|
+
&.pkt-btn {
|
|
921
|
+
cursor: pointer;
|
|
922
|
+
display: flex;
|
|
923
|
+
align-items: center;
|
|
924
|
+
justify-content: center;
|
|
925
|
+
z-index: 2;
|
|
926
|
+
justify-self: center;
|
|
927
|
+
align-self: center;
|
|
928
|
+
border-radius: 50%;
|
|
929
|
+
box-sizing: border-box;
|
|
930
|
+
width: 3rem;
|
|
931
|
+
height: 3rem;
|
|
932
|
+
min-width: 3rem;
|
|
933
|
+
min-height: 3rem;
|
|
934
|
+
padding: 0;
|
|
935
|
+
background-color: var(--pkt-color-background-default);
|
|
854
936
|
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
937
|
+
.pkt-btn__icon,
|
|
938
|
+
.pkt-icon {
|
|
939
|
+
width: 1.5rem;
|
|
940
|
+
height: 1.5rem;
|
|
858
941
|
}
|
|
859
942
|
}
|
|
860
943
|
}
|
|
861
944
|
|
|
862
945
|
&__counter {
|
|
863
946
|
@include typography.get-text('pkt-txt-14-medium');
|
|
864
|
-
color: var(--pkt-color-text-body-
|
|
865
|
-
grid-
|
|
947
|
+
color: var(--pkt-color-text-body-default);
|
|
948
|
+
grid-column: 1 / -1;
|
|
949
|
+
grid-row: 2;
|
|
950
|
+
z-index: 1;
|
|
951
|
+
position: relative;
|
|
866
952
|
justify-self: center;
|
|
953
|
+
text-align: center;
|
|
867
954
|
}
|
|
868
955
|
}
|
|
@@ -99,18 +99,22 @@ pkt-select {
|
|
|
99
99
|
border-color: var(--pkt-color-input-border-hover);
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
+
// Rekkefølge er viktig
|
|
103
|
+
&:focus {
|
|
104
|
+
outline: none;
|
|
105
|
+
border-color: var(--pkt-color-input-border-active);
|
|
106
|
+
}
|
|
107
|
+
|
|
102
108
|
&:focus-visible,
|
|
103
109
|
&.pkt-input__textinput--focus {
|
|
104
|
-
|
|
110
|
+
outline: 2px solid var(--pkt-color-input-border-active);
|
|
111
|
+
outline-offset: 0;
|
|
105
112
|
border-color: var(--pkt-color-input-border-active);
|
|
106
|
-
//outline: 4px solid var(--pkt-color-border-states-focus);
|
|
107
|
-
// TODO: Hva skal vi gjøre her egentlig? Denne fjernet vi for årevis siden men kanskje vi skal ha den tilbake?
|
|
108
113
|
}
|
|
109
114
|
|
|
110
|
-
&:focus {
|
|
111
|
-
outline:
|
|
112
|
-
|
|
113
|
-
border-color: var(--pkt-color-input-border-active);
|
|
115
|
+
:is(.pkt-inputwrapper, .pkt-searchinput):not([data-navtype='pointer']) &:focus-visible {
|
|
116
|
+
outline: 4px solid var(--pkt-color-border-states-focus);
|
|
117
|
+
outline-offset: 0;
|
|
114
118
|
}
|
|
115
119
|
|
|
116
120
|
&:disabled,
|
|
@@ -256,6 +260,14 @@ pkt-select {
|
|
|
256
260
|
border-color: var(--pkt-color-input-border-active);
|
|
257
261
|
}
|
|
258
262
|
}
|
|
263
|
+
|
|
264
|
+
:is(.pkt-inputwrapper, .pkt-searchinput):not([data-navtype='pointer']) &:focus-within {
|
|
265
|
+
outline: 4px solid var(--pkt-color-border-states-focus);
|
|
266
|
+
|
|
267
|
+
.pkt-input:focus-visible {
|
|
268
|
+
outline: none;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
259
271
|
}
|
|
260
272
|
|
|
261
273
|
&__counter {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oslokommune/punkt-css",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.15.0",
|
|
4
4
|
"description": "CSS-rammeverket til Punkt, et designsystem laget av Oslo Origo",
|
|
5
5
|
"homepage": "https://punkt.oslo.kommune.no",
|
|
6
6
|
"author": "Team Designsystem, Oslo Origo",
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"url": "https://github.com/oslokommune/punkt/issues"
|
|
61
61
|
},
|
|
62
62
|
"license": "MIT",
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "5147b31531bab9ff64963a1f091a717bb93d35cf"
|
|
64
64
|
}
|