@oslokommune/punkt-css 12.38.2 → 12.39.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.
@@ -14209,7 +14209,7 @@ a:active, a.pkt-link--active,
14209
14209
  .pkt-link--external::after {
14210
14210
  display: inline-block;
14211
14211
  content: " ";
14212
- --svg: url(https://punkt-cdn.oslo.kommune.no/12.38/icons/new-window-small.svg);
14212
+ --svg: url(https://punkt-cdn.oslo.kommune.no/12.39/icons/new-window-small.svg);
14213
14213
  background-image: var(--svg);
14214
14214
  background-repeat: no-repeat;
14215
14215
  background-size: 18px 18px;
@@ -18214,7 +18214,7 @@ div.pkt-btn:not([data-disabled]):active, .pkt-btn:enabled:active, .pkt-btn:activ
18214
18214
  outline-color: var(--pkt-color-input-border-hover);
18215
18215
  }
18216
18216
  .pkt-input-check__input-checkbox:checked[type=checkbox] {
18217
- --svg: url(https://punkt-cdn.oslo.kommune.no/12.38/icons/check-medium.svg);
18217
+ --svg: url(https://punkt-cdn.oslo.kommune.no/12.39/icons/check-medium.svg);
18218
18218
  position: relative;
18219
18219
  background-color: var(--pkt-color-input-border-normal);
18220
18220
  }
@@ -18272,7 +18272,7 @@ div.pkt-btn:not([data-disabled]):active, .pkt-btn:enabled:active, .pkt-btn:activ
18272
18272
  cursor: not-allowed;
18273
18273
  }
18274
18274
  .pkt-input-check__input-checkbox:disabled[type=checkbox][role=switch]:checked:after {
18275
- --svg: url(https://punkt-cdn.oslo.kommune.no/12.38/icons/check-medium.svg);
18275
+ --svg: url(https://punkt-cdn.oslo.kommune.no/12.39/icons/check-medium.svg);
18276
18276
  --pkt-color-input-check-border: var(--pkt-color-input-border-normal);
18277
18277
  filter: grayscale(100%) brightness(400%);
18278
18278
  }
@@ -18524,7 +18524,7 @@ pkt-select {
18524
18524
  }
18525
18525
  .pkt-input:is(select):not([multiple]), .pkt-textinput__input:is(select):not([multiple]), .pkt-select select:is(select):not([multiple]),
18526
18526
  .pkt-select:is(select):not([multiple]) {
18527
- --svg: url(https://punkt-cdn.oslo.kommune.no/12.38/icons/chevron-thin-down.svg);
18527
+ --svg: url(https://punkt-cdn.oslo.kommune.no/12.39/icons/chevron-thin-down.svg);
18528
18528
  background-image: var(--svg);
18529
18529
  background-repeat: no-repeat;
18530
18530
  background-position: right 0.7rem top 50%;
@@ -21333,26 +21333,110 @@ pkt-listbox {
21333
21333
  /*
21334
21334
  * Modal component
21335
21335
  */
21336
- .pkt-modal:not([open]) {
21337
- display: none;
21336
+ .pkt-modal {
21337
+ border: none;
21338
+ padding: 0;
21339
+ background-color: transparent;
21340
+ opacity: 0;
21341
+ transition: translate 0.2s ease-in-out, opacity 0.2s ease-in-out, overlay 0.2s ease-in-out allow-discrete, display 0.2s ease-in-out allow-discrete;
21342
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
21343
+ position: fixed;
21344
+ }
21345
+ .pkt-modal:focus {
21346
+ outline: none;
21338
21347
  }
21339
21348
  .pkt-modal[open] {
21340
- background-color: transparent;
21341
- border: none;
21349
+ opacity: 1;
21350
+ }
21351
+ @starting-style {
21352
+ .pkt-modal[open] {
21353
+ opacity: 0;
21354
+ }
21355
+ }
21356
+ .pkt-modal__wrapper {
21357
+ display: grid;
21358
+ grid-template-columns: 1fr;
21359
+ grid-template-rows: auto 1fr;
21360
+ }
21361
+ .pkt-modal__dialog {
21342
21362
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
21343
- padding: 0;
21363
+ translate: 0 10%;
21364
+ }
21365
+ .pkt-modal__dialog[open] {
21366
+ translate: 0 0;
21367
+ }
21368
+ @starting-style {
21369
+ .pkt-modal__dialog[open] {
21370
+ translate: 0 -10%;
21371
+ }
21372
+ }
21373
+ .pkt-modal__dialog .pkt-modal__wrapper {
21344
21374
  max-height: 90vh;
21345
21375
  max-height: 90svh;
21346
- display: block;
21347
21376
  }
21348
21377
  @supports not (selector(::backdrop)) {
21349
- .pkt-modal[open] {
21350
- position: fixed;
21378
+ .pkt-modal__dialog {
21351
21379
  top: 50%;
21352
21380
  left: 50%;
21353
21381
  transform: translate(-50%, -50%);
21354
21382
  }
21355
- .pkt-modal[open] + .backdrop {
21383
+ }
21384
+ .pkt-modal__drawer {
21385
+ top: 0;
21386
+ height: 100vh;
21387
+ height: 100dvh;
21388
+ max-height: 100vh;
21389
+ max-height: 100dvh;
21390
+ margin: 0;
21391
+ overflow-y: auto;
21392
+ }
21393
+ .pkt-modal__drawer .pkt-modal__wrapper {
21394
+ min-height: 100vh;
21395
+ min-height: 100dvh;
21396
+ }
21397
+ .pkt-modal__drawer[open] {
21398
+ translate: 0 0;
21399
+ }
21400
+ .pkt-modal__drawer--right {
21401
+ left: auto;
21402
+ right: 0;
21403
+ margin-right: 0;
21404
+ translate: 100% 0;
21405
+ }
21406
+ @starting-style {
21407
+ .pkt-modal__drawer--right[open] {
21408
+ translate: 100% 0;
21409
+ }
21410
+ }
21411
+ .pkt-modal__drawer--left {
21412
+ left: 0;
21413
+ right: auto;
21414
+ margin-left: 0;
21415
+ translate: -100% 0;
21416
+ }
21417
+ @starting-style {
21418
+ .pkt-modal__drawer--left[open] {
21419
+ translate: -100% 0;
21420
+ }
21421
+ }
21422
+ .pkt-modal::backdrop {
21423
+ opacity: 0;
21424
+ background-color: rgba(0, 0, 0, 0.55);
21425
+ transition: opacity 0.2s ease-out, overlay 0.2s ease-out allow-discrete, display 0.2s allow-discrete;
21426
+ }
21427
+ .pkt-modal[open]::backdrop {
21428
+ opacity: 1;
21429
+ }
21430
+ @starting-style {
21431
+ .pkt-modal[open]::backdrop {
21432
+ opacity: 0;
21433
+ }
21434
+ }
21435
+ @supports not (selector(::backdrop)) {
21436
+ .pkt-modal {
21437
+ position: fixed;
21438
+ }
21439
+ .pkt-modal + .backdrop {
21356
21440
  background-color: rgba(0, 0, 0, 0.55);
21357
21441
  position: fixed;
21358
21442
  top: 0;
@@ -21361,51 +21445,44 @@ pkt-listbox {
21361
21445
  height: 100vh;
21362
21446
  }
21363
21447
  }
21364
- .pkt-modal[open]::backdrop {
21365
- background-color: rgba(0, 0, 0, 0.55);
21366
- }
21367
- .pkt-modal[open] .pkt-modal__container {
21448
+ .pkt-modal .pkt-modal__container {
21368
21449
  padding-top: 2rem;
21369
21450
  background: var(--pkt-color-background-default);
21370
21451
  overflow-y: auto;
21371
- max-height: calc(100vh - 4rem);
21372
21452
  }
21373
- .pkt-modal[open] .pkt-modal__header {
21453
+ .pkt-modal .pkt-modal__header {
21374
21454
  display: grid;
21375
- grid-template-columns: 1fr auto;
21376
- grid-template-rows: auto;
21455
+ grid-template-columns: 1fr 4rem;
21456
+ grid-template-rows: 4rem 1fr;
21457
+ grid-template-areas: "header close" "header empty";
21377
21458
  justify-content: flex-start;
21378
21459
  width: 100%;
21379
21460
  }
21380
- .pkt-modal[open] .pkt-modal__header-background {
21461
+ .pkt-modal .pkt-modal__header-background {
21381
21462
  background: var(--pkt-color-background-default);
21382
- grid-column: 1/2;
21383
- grid-row: 1/2;
21384
- width: 100%;
21385
- height: 100%;
21463
+ grid-area: empty;
21386
21464
  }
21387
- .pkt-modal[open] .pkt-modal__headingText {
21388
- grid-column: 1/2;
21389
- grid-row: 1/2;
21465
+ .pkt-modal .pkt-modal__headingText {
21466
+ background: var(--pkt-color-background-default);
21467
+ grid-area: header;
21390
21468
  padding: 2rem 0 0 2.5rem;
21391
21469
  margin: 0;
21392
21470
  color: var(--pkt-color-text-body-default);
21393
21471
  }
21394
- .pkt-modal[open] .pkt-modal__closeButton {
21395
- grid-column: 2/3;
21396
- grid-row: 1/2;
21472
+ .pkt-modal .pkt-modal__closeButton {
21473
+ grid-area: close;
21397
21474
  display: flex;
21398
21475
  flex-direction: row-reverse;
21399
21476
  align-self: flex-start;
21400
21477
  }
21401
- .pkt-modal[open] .pkt-modal__closeButton--blue {
21478
+ .pkt-modal .pkt-modal__closeButton--blue {
21402
21479
  height: 100%;
21403
21480
  background: var(--pkt-color-background-default);
21404
21481
  }
21405
- .pkt-modal[open] .pkt-modal__closeButton--blue .pkt-btn {
21482
+ .pkt-modal .pkt-modal__closeButton--blue .pkt-btn {
21406
21483
  margin: 0.25rem;
21407
21484
  }
21408
- .pkt-modal[open] .pkt-modal__closeButton--yellow-filled .pkt-btn {
21485
+ .pkt-modal .pkt-modal__closeButton--yellow-filled .pkt-btn {
21409
21486
  height: 4rem;
21410
21487
  width: 4rem;
21411
21488
  justify-content: center;
@@ -21414,19 +21491,26 @@ pkt-listbox {
21414
21491
  border-radius: 50%;
21415
21492
  color: var(--pkt-color-surface-strong-dark-blue);
21416
21493
  background-color: var(--pkt-color-brand-yellow-1000);
21494
+ border: 4px solid var(--pkt-color-brand-yellow-1000);
21495
+ outline: 0;
21417
21496
  }
21418
- .pkt-modal[open] .pkt-modal__closeButton--yellow-filled .pkt-btn:hover, .pkt-modal[open] .pkt-modal__closeButton--yellow-filled .pkt-btn:focus {
21497
+ .pkt-modal .pkt-modal__closeButton--yellow-filled .pkt-btn:hover, .pkt-modal .pkt-modal__closeButton--yellow-filled .pkt-btn:focus {
21419
21498
  background-color: var(--pkt-color-brand-warm-blue-1000);
21499
+ border-color: var(--pkt-color-brand-warm-blue-1000);
21420
21500
  color: var(--pkt-color-background-default);
21421
21501
  }
21422
- .pkt-modal[open] .pkt-modal__closeButton--yellow-filled .pkt-btn:hover .pkt-icon, .pkt-modal[open] .pkt-modal__closeButton--yellow-filled .pkt-btn:focus .pkt-icon {
21502
+ .pkt-modal .pkt-modal__closeButton--yellow-filled .pkt-btn:hover .pkt-icon, .pkt-modal .pkt-modal__closeButton--yellow-filled .pkt-btn:focus .pkt-icon {
21423
21503
  color: var(--pkt-color-background-default);
21424
21504
  }
21425
- .pkt-modal[open] .pkt-modal__closeButton--yellow-filled .pkt-btn .pkt-link__icon {
21426
- width: unset;
21427
- height: 1.75rem;
21505
+ .pkt-modal .pkt-modal__closeButton--yellow-filled .pkt-btn:focus-visible {
21506
+ outline: 0;
21507
+ border-color: var(--pkt-color-border-states-focus);
21428
21508
  }
21429
- .pkt-modal[open] .pkt-modal__content {
21509
+ .pkt-modal .pkt-modal__closeButton--yellow-filled .pkt-btn .pkt-btn__icon {
21510
+ width: 2rem;
21511
+ height: 2rem;
21512
+ }
21513
+ .pkt-modal .pkt-modal__content {
21430
21514
  display: flex;
21431
21515
  flex-direction: column;
21432
21516
  flex-grow: 1;
@@ -21440,7 +21524,6 @@ pkt-listbox {
21440
21524
  background-attachment: local, local, scroll, scroll;
21441
21525
  background-repeat: no-repeat;
21442
21526
  background-size: 100% 40px, 100% 50px, 100% 16px, 100% 16px;
21443
- max-height: calc(100vh - 10rem);
21444
21527
  }
21445
21528
 
21446
21529
  body.pkt-modal--open {
@@ -21450,7 +21533,6 @@ body.pkt-modal--open {
21450
21533
 
21451
21534
  .pkt-modal--small {
21452
21535
  width: 480px;
21453
- padding: 1rem 2rem;
21454
21536
  }
21455
21537
 
21456
21538
  .pkt-modal--medium {
@@ -21472,7 +21554,6 @@ body.pkt-modal--open {
21472
21554
 
21473
21555
  @media screen and (max-width: 640px) {
21474
21556
  .pkt-modal[open] {
21475
- gap: 1rem 0;
21476
21557
  line-height: 1.5rem;
21477
21558
  }
21478
21559
  .pkt-modal[open] .pkt-modal__headingText {
@@ -21483,20 +21564,16 @@ body.pkt-modal--open {
21483
21564
  font-size: 1rem;
21484
21565
  }
21485
21566
  .pkt-modal--large {
21486
- position: absolute;
21487
21567
  width: 100vh;
21488
- padding: 1rem 1.5rem;
21489
21568
  }
21490
21569
  }
21491
21570
  @media screen and (max-width: 480px) {
21492
21571
  .pkt-modal--small {
21493
- position: absolute;
21494
21572
  width: 100vh;
21495
21573
  }
21496
21574
  }
21497
21575
  @media screen and (max-width: 36rem) {
21498
21576
  .pkt-modal--medium {
21499
- position: absolute;
21500
21577
  width: 100vh;
21501
21578
  }
21502
21579
  }
@@ -21511,6 +21588,19 @@ body.pkt-modal--open {
21511
21588
  justify-content: center;
21512
21589
  }
21513
21590
  }
21591
+ .pkt-modal--noShadow {
21592
+ box-shadow: none;
21593
+ }
21594
+
21595
+ .pkt-modal--transparentBackdrop::backdrop, .pkt-modal--transparentBackdrop[open]::backdrop {
21596
+ background-color: transparent;
21597
+ }
21598
+ @supports not (selector(::backdrop)) {
21599
+ .pkt-modal--transparentBackdrop + .backdrop {
21600
+ background-color: transparent;
21601
+ }
21602
+ }
21603
+
21514
21604
  .pkt-modal.pkt-modal--removePadding .pkt-modal__headingText,
21515
21605
  .pkt-modal.pkt-modal--removePadding .pkt-modal__content,
21516
21606
  .pkt-modal.pkt-modal--removePadding .pkt-modal__container {