@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.
@@ -2165,26 +2165,110 @@ pkt-listbox {
2165
2165
  /*
2166
2166
  * Modal component
2167
2167
  */
2168
- .pkt-modal:not([open]) {
2169
- display: none;
2168
+ .pkt-modal {
2169
+ border: none;
2170
+ padding: 0;
2171
+ background-color: transparent;
2172
+ opacity: 0;
2173
+ 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;
2174
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
2175
+ position: fixed;
2176
+ }
2177
+ .pkt-modal:focus {
2178
+ outline: none;
2170
2179
  }
2171
2180
  .pkt-modal[open] {
2172
- background-color: transparent;
2173
- border: none;
2181
+ opacity: 1;
2182
+ }
2183
+ @starting-style {
2184
+ .pkt-modal[open] {
2185
+ opacity: 0;
2186
+ }
2187
+ }
2188
+ .pkt-modal__wrapper {
2189
+ display: grid;
2190
+ grid-template-columns: 1fr;
2191
+ grid-template-rows: auto 1fr;
2192
+ }
2193
+ .pkt-modal__dialog {
2174
2194
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
2175
- padding: 0;
2195
+ translate: 0 10%;
2196
+ }
2197
+ .pkt-modal__dialog[open] {
2198
+ translate: 0 0;
2199
+ }
2200
+ @starting-style {
2201
+ .pkt-modal__dialog[open] {
2202
+ translate: 0 -10%;
2203
+ }
2204
+ }
2205
+ .pkt-modal__dialog .pkt-modal__wrapper {
2176
2206
  max-height: 90vh;
2177
2207
  max-height: 90svh;
2178
- display: block;
2179
2208
  }
2180
2209
  @supports not (selector(::backdrop)) {
2181
- .pkt-modal[open] {
2182
- position: fixed;
2210
+ .pkt-modal__dialog {
2183
2211
  top: 50%;
2184
2212
  left: 50%;
2185
2213
  transform: translate(-50%, -50%);
2186
2214
  }
2187
- .pkt-modal[open] + .backdrop {
2215
+ }
2216
+ .pkt-modal__drawer {
2217
+ top: 0;
2218
+ height: 100vh;
2219
+ height: 100dvh;
2220
+ max-height: 100vh;
2221
+ max-height: 100dvh;
2222
+ margin: 0;
2223
+ overflow-y: auto;
2224
+ }
2225
+ .pkt-modal__drawer .pkt-modal__wrapper {
2226
+ min-height: 100vh;
2227
+ min-height: 100dvh;
2228
+ }
2229
+ .pkt-modal__drawer[open] {
2230
+ translate: 0 0;
2231
+ }
2232
+ .pkt-modal__drawer--right {
2233
+ left: auto;
2234
+ right: 0;
2235
+ margin-right: 0;
2236
+ translate: 100% 0;
2237
+ }
2238
+ @starting-style {
2239
+ .pkt-modal__drawer--right[open] {
2240
+ translate: 100% 0;
2241
+ }
2242
+ }
2243
+ .pkt-modal__drawer--left {
2244
+ left: 0;
2245
+ right: auto;
2246
+ margin-left: 0;
2247
+ translate: -100% 0;
2248
+ }
2249
+ @starting-style {
2250
+ .pkt-modal__drawer--left[open] {
2251
+ translate: -100% 0;
2252
+ }
2253
+ }
2254
+ .pkt-modal::backdrop {
2255
+ opacity: 0;
2256
+ background-color: rgba(0, 0, 0, 0.55);
2257
+ transition: opacity 0.2s ease-out, overlay 0.2s ease-out allow-discrete, display 0.2s allow-discrete;
2258
+ }
2259
+ .pkt-modal[open]::backdrop {
2260
+ opacity: 1;
2261
+ }
2262
+ @starting-style {
2263
+ .pkt-modal[open]::backdrop {
2264
+ opacity: 0;
2265
+ }
2266
+ }
2267
+ @supports not (selector(::backdrop)) {
2268
+ .pkt-modal {
2269
+ position: fixed;
2270
+ }
2271
+ .pkt-modal + .backdrop {
2188
2272
  background-color: rgba(0, 0, 0, 0.55);
2189
2273
  position: fixed;
2190
2274
  top: 0;
@@ -2193,51 +2277,44 @@ pkt-listbox {
2193
2277
  height: 100vh;
2194
2278
  }
2195
2279
  }
2196
- .pkt-modal[open]::backdrop {
2197
- background-color: rgba(0, 0, 0, 0.55);
2198
- }
2199
- .pkt-modal[open] .pkt-modal__container {
2280
+ .pkt-modal .pkt-modal__container {
2200
2281
  padding-top: 2rem;
2201
2282
  background: var(--pkt-color-background-default);
2202
2283
  overflow-y: auto;
2203
- max-height: calc(100vh - 4rem);
2204
2284
  }
2205
- .pkt-modal[open] .pkt-modal__header {
2285
+ .pkt-modal .pkt-modal__header {
2206
2286
  display: grid;
2207
- grid-template-columns: 1fr auto;
2208
- grid-template-rows: auto;
2287
+ grid-template-columns: 1fr 4rem;
2288
+ grid-template-rows: 4rem 1fr;
2289
+ grid-template-areas: "header close" "header empty";
2209
2290
  justify-content: flex-start;
2210
2291
  width: 100%;
2211
2292
  }
2212
- .pkt-modal[open] .pkt-modal__header-background {
2293
+ .pkt-modal .pkt-modal__header-background {
2213
2294
  background: var(--pkt-color-background-default);
2214
- grid-column: 1/2;
2215
- grid-row: 1/2;
2216
- width: 100%;
2217
- height: 100%;
2295
+ grid-area: empty;
2218
2296
  }
2219
- .pkt-modal[open] .pkt-modal__headingText {
2220
- grid-column: 1/2;
2221
- grid-row: 1/2;
2297
+ .pkt-modal .pkt-modal__headingText {
2298
+ background: var(--pkt-color-background-default);
2299
+ grid-area: header;
2222
2300
  padding: 2rem 0 0 2.5rem;
2223
2301
  margin: 0;
2224
2302
  color: var(--pkt-color-text-body-default);
2225
2303
  }
2226
- .pkt-modal[open] .pkt-modal__closeButton {
2227
- grid-column: 2/3;
2228
- grid-row: 1/2;
2304
+ .pkt-modal .pkt-modal__closeButton {
2305
+ grid-area: close;
2229
2306
  display: flex;
2230
2307
  flex-direction: row-reverse;
2231
2308
  align-self: flex-start;
2232
2309
  }
2233
- .pkt-modal[open] .pkt-modal__closeButton--blue {
2310
+ .pkt-modal .pkt-modal__closeButton--blue {
2234
2311
  height: 100%;
2235
2312
  background: var(--pkt-color-background-default);
2236
2313
  }
2237
- .pkt-modal[open] .pkt-modal__closeButton--blue .pkt-btn {
2314
+ .pkt-modal .pkt-modal__closeButton--blue .pkt-btn {
2238
2315
  margin: 0.25rem;
2239
2316
  }
2240
- .pkt-modal[open] .pkt-modal__closeButton--yellow-filled .pkt-btn {
2317
+ .pkt-modal .pkt-modal__closeButton--yellow-filled .pkt-btn {
2241
2318
  height: 4rem;
2242
2319
  width: 4rem;
2243
2320
  justify-content: center;
@@ -2246,19 +2323,26 @@ pkt-listbox {
2246
2323
  border-radius: 50%;
2247
2324
  color: var(--pkt-color-surface-strong-dark-blue);
2248
2325
  background-color: var(--pkt-color-brand-yellow-1000);
2326
+ border: 4px solid var(--pkt-color-brand-yellow-1000);
2327
+ outline: 0;
2249
2328
  }
2250
- .pkt-modal[open] .pkt-modal__closeButton--yellow-filled .pkt-btn:hover, .pkt-modal[open] .pkt-modal__closeButton--yellow-filled .pkt-btn:focus {
2329
+ .pkt-modal .pkt-modal__closeButton--yellow-filled .pkt-btn:hover, .pkt-modal .pkt-modal__closeButton--yellow-filled .pkt-btn:focus {
2251
2330
  background-color: var(--pkt-color-brand-warm-blue-1000);
2331
+ border-color: var(--pkt-color-brand-warm-blue-1000);
2252
2332
  color: var(--pkt-color-background-default);
2253
2333
  }
2254
- .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 {
2334
+ .pkt-modal .pkt-modal__closeButton--yellow-filled .pkt-btn:hover .pkt-icon, .pkt-modal .pkt-modal__closeButton--yellow-filled .pkt-btn:focus .pkt-icon {
2255
2335
  color: var(--pkt-color-background-default);
2256
2336
  }
2257
- .pkt-modal[open] .pkt-modal__closeButton--yellow-filled .pkt-btn .pkt-link__icon {
2258
- width: unset;
2259
- height: 1.75rem;
2337
+ .pkt-modal .pkt-modal__closeButton--yellow-filled .pkt-btn:focus-visible {
2338
+ outline: 0;
2339
+ border-color: var(--pkt-color-border-states-focus);
2260
2340
  }
2261
- .pkt-modal[open] .pkt-modal__content {
2341
+ .pkt-modal .pkt-modal__closeButton--yellow-filled .pkt-btn .pkt-btn__icon {
2342
+ width: 2rem;
2343
+ height: 2rem;
2344
+ }
2345
+ .pkt-modal .pkt-modal__content {
2262
2346
  display: flex;
2263
2347
  flex-direction: column;
2264
2348
  flex-grow: 1;
@@ -2272,7 +2356,6 @@ pkt-listbox {
2272
2356
  background-attachment: local, local, scroll, scroll;
2273
2357
  background-repeat: no-repeat;
2274
2358
  background-size: 100% 40px, 100% 50px, 100% 16px, 100% 16px;
2275
- max-height: calc(100vh - 10rem);
2276
2359
  }
2277
2360
 
2278
2361
  body.pkt-modal--open {
@@ -2282,7 +2365,6 @@ body.pkt-modal--open {
2282
2365
 
2283
2366
  .pkt-modal--small {
2284
2367
  width: 480px;
2285
- padding: 1rem 2rem;
2286
2368
  }
2287
2369
 
2288
2370
  .pkt-modal--medium {
@@ -2304,7 +2386,6 @@ body.pkt-modal--open {
2304
2386
 
2305
2387
  @media screen and (max-width: 640px) {
2306
2388
  .pkt-modal[open] {
2307
- gap: 1rem 0;
2308
2389
  line-height: 1.5rem;
2309
2390
  }
2310
2391
  .pkt-modal[open] .pkt-modal__headingText {
@@ -2315,20 +2396,16 @@ body.pkt-modal--open {
2315
2396
  font-size: 1rem;
2316
2397
  }
2317
2398
  .pkt-modal--large {
2318
- position: absolute;
2319
2399
  width: 100vh;
2320
- padding: 1rem 1.5rem;
2321
2400
  }
2322
2401
  }
2323
2402
  @media screen and (max-width: 480px) {
2324
2403
  .pkt-modal--small {
2325
- position: absolute;
2326
2404
  width: 100vh;
2327
2405
  }
2328
2406
  }
2329
2407
  @media screen and (max-width: 36rem) {
2330
2408
  .pkt-modal--medium {
2331
- position: absolute;
2332
2409
  width: 100vh;
2333
2410
  }
2334
2411
  }
@@ -2343,6 +2420,19 @@ body.pkt-modal--open {
2343
2420
  justify-content: center;
2344
2421
  }
2345
2422
  }
2423
+ .pkt-modal--noShadow {
2424
+ box-shadow: none;
2425
+ }
2426
+
2427
+ .pkt-modal--transparentBackdrop::backdrop, .pkt-modal--transparentBackdrop[open]::backdrop {
2428
+ background-color: transparent;
2429
+ }
2430
+ @supports not (selector(::backdrop)) {
2431
+ .pkt-modal--transparentBackdrop + .backdrop {
2432
+ background-color: transparent;
2433
+ }
2434
+ }
2435
+
2346
2436
  .pkt-modal.pkt-modal--removePadding .pkt-modal__headingText,
2347
2437
  .pkt-modal.pkt-modal--removePadding .pkt-modal__content,
2348
2438
  .pkt-modal.pkt-modal--removePadding .pkt-modal__container {
@@ -3382,7 +3472,7 @@ pkt-select {
3382
3472
  padding-right: 3rem;
3383
3473
  }
3384
3474
  .pkt-input:is(select):not([multiple]), .pkt-textinput__input:is(select):not([multiple]) {
3385
- --svg: url(https://punkt-cdn.oslo.kommune.no/12.38/icons/chevron-thin-down.svg);
3475
+ --svg: url(https://punkt-cdn.oslo.kommune.no/12.39/icons/chevron-thin-down.svg);
3386
3476
  background-image: var(--svg);
3387
3477
  background-repeat: no-repeat;
3388
3478
  background-position: right 0.7rem top 50%;