@oslokommune/punkt-css 15.3.1 → 15.4.2

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.
@@ -6,7 +6,7 @@
6
6
  @forward 'spacing';
7
7
 
8
8
  // Default icon path
9
- $icon-path: 'https://punkt-cdn.oslo.kommune.no/15.3/icons' !default;
9
+ $icon-path: 'https://punkt-cdn.oslo.kommune.no/15.4/icons' !default;
10
10
 
11
11
  // Borders
12
12
  $border-width: (
@@ -230,6 +230,7 @@ pkt-fileupload,
230
230
  display: grid;
231
231
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
232
232
  gap: 1rem;
233
+ max-width: 100%;
233
234
 
234
235
  // Successfully uploaded thumbnails become grid items
235
236
  .pkt-fileupload__queue-display__item:has(.pkt-fileupload__queue-display__item__thumbnail) {
@@ -272,15 +273,16 @@ pkt-fileupload,
272
273
 
273
274
  &__item {
274
275
  display: grid;
275
- grid-template-columns: auto 1fr;
276
+ grid-template-columns: auto minmax(0, 1fr);
276
277
  align-items: center;
277
278
  gap: 0.5rem;
278
279
  padding: map.get(variables.$spacing, 'size-16');
279
280
  border: 2px solid var(--pkt-color-border-subtle);
280
281
 
282
+ container-type: inline-size;
283
+
281
284
  @include bp('tablet-big-up') {
282
- grid-template-columns: auto 1fr auto auto;
283
- align-items: end;
285
+ grid-template-columns: auto minmax(0, 1fr) auto auto;
284
286
  }
285
287
 
286
288
  // ----------------------------------------
@@ -303,6 +305,8 @@ pkt-fileupload,
303
305
  max-width: 100%;
304
306
  overflow: hidden; // Truncate component clamps internally; this prevents layout overflow
305
307
  white-space: normal;
308
+ overflow-wrap: anywhere;
309
+ word-break: break-word;
306
310
  align-self: center;
307
311
  margin: 0;
308
312
  }
@@ -546,6 +550,12 @@ pkt-fileupload,
546
550
  text-overflow: ellipsis;
547
551
  min-width: 0; // Required for text-overflow to work in flex containers
548
552
  }
553
+
554
+ &--fallback {
555
+ .pkt-fileupload__queue-display__item__thumbnail__title {
556
+ @include typography.get-text('pkt-txt-12');
557
+ }
558
+ }
549
559
  }
550
560
 
551
561
  // ----------------------------------------
@@ -672,11 +682,38 @@ pkt-fileupload,
672
682
  }
673
683
  }
674
684
 
685
+ .pkt-fileupload__queue-display__item {
686
+ container-type: inline-size;
687
+ }
688
+
689
+ @container (max-width: 560px) {
690
+ .pkt-fileupload__queue-display__item__actions {
691
+ flex-direction: column;
692
+ gap: 0.5rem;
693
+ }
694
+
695
+ .pkt-fileupload__queue-display__item__title {
696
+ -webkit-line-clamp: 2;
697
+ display: -webkit-box;
698
+ -webkit-box-orient: vertical;
699
+ overflow: hidden;
700
+ }
701
+ }
702
+
675
703
  // ============================================
676
704
  // WRAPPER INTEGRATION (InputWrapper)
677
705
  // ============================================
678
706
 
679
707
  .pkt-fileupload-wrapper {
708
+ &--full-width {
709
+ width: 100%;
710
+
711
+ .pkt-inputwrapper__fieldset {
712
+ width: 100%;
713
+ align-items: stretch;
714
+ }
715
+ }
716
+
680
717
  .pkt-inputwrapper__fieldset {
681
718
  margin-bottom: 0;
682
719
  }
@@ -771,7 +808,7 @@ pkt-fileupload,
771
808
  gap: 1rem;
772
809
 
773
810
  &__content {
774
- height: 75vh;
811
+ min-height: 75vh;
775
812
  grid-area: prev-start / prev-start / next-end / next-end;
776
813
  display: flex;
777
814
  align-items: center;
@@ -22,6 +22,10 @@
22
22
  &--fullwidth > div {
23
23
  width: 100%;
24
24
  }
25
+ &--fullwidth > div > .pkt-fileupload,
26
+ &--fullwidth > div > .pkt-fileupload-wrapper {
27
+ width: 100%;
28
+ }
25
29
  &-container {
26
30
  position: relative;
27
31
  border: 2px solid var(--pkt-color-border-gray);
@@ -33,9 +37,6 @@
33
37
  .pkt-preview__component {
34
38
  flex: 1 1 0;
35
39
  min-width: 0;
36
- div {
37
- justify-self: center;
38
- }
39
40
  }
40
41
  .pkt-preview__panel {
41
42
  flex: 0 0 auto;
@@ -45,6 +46,11 @@
45
46
  }
46
47
  }
47
48
  }
49
+ &__inner-container {
50
+ display: flex;
51
+ justify-content: center;
52
+ width: 100%;
53
+ }
48
54
  }
49
55
  &__panel {
50
56
  display: flex;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oslokommune/punkt-css",
3
- "version": "15.3.1",
3
+ "version": "15.4.2",
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",
@@ -55,5 +55,5 @@
55
55
  "url": "https://github.com/oslokommune/punkt/issues"
56
56
  },
57
57
  "license": "MIT",
58
- "gitHead": "b4500307b2fb41eb76b25433aec3d99ec66f27e2"
58
+ "gitHead": "1186b7601af17e09107f3f8e55410af0fea62248"
59
59
  }