@navikt/ds-css 6.6.1 → 6.7.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.
@@ -1,7 +1,7 @@
1
1
  @charset "UTF-8";
2
2
  /**
3
3
  * Do not edit directly
4
- * Generated on Mon, 22 Apr 2024 13:50:35 GMT
4
+ * Generated on Thu, 02 May 2024 10:37:29 GMT
5
5
  */
6
6
  :root, :host {
7
7
  --a-spacing-1-alt: 0.375rem;
@@ -687,7 +687,7 @@ button,
687
687
  }
688
688
  /* https://web.dev/prefers-reduced-motion/ */
689
689
  @media (prefers-reduced-motion: reduce) {
690
- *:not(.navds-loader *):not(.navds-loader),
690
+ *:not(.navds-loader *):not(.navds-loader):not(.navds-progress-bar *):not(.navds-progress-bar),
691
691
  ::before,
692
692
  ::after {
693
693
  animation-delay: -1ms !important;
@@ -3021,8 +3021,8 @@ body,
3021
3021
  width: calc(1.25rem - 0.25rem);
3022
3022
  height: calc(1.25rem - 0.25rem);
3023
3023
  }
3024
- .navds-checkbox__input:focus-visible + .navds-checkbox__label::before,
3025
- .navds-radio__input:focus-visible + .navds-radio__label::before {
3024
+ .navds-checkbox__input:focus + .navds-checkbox__label::before,
3025
+ .navds-radio__input:focus + .navds-radio__label::before {
3026
3026
  outline: 2px solid transparent;
3027
3027
  outline-offset: 2px;
3028
3028
  box-shadow:
@@ -3030,30 +3030,12 @@ body,
3030
3030
  0 0 0 2px var(--ac-radio-checkbox-bg, var(--a-surface-default)),
3031
3031
  0 0 0 4px var(--a-border-focus);
3032
3032
  }
3033
- @supports not selector(:focus-visible) {
3034
- .navds-checkbox__input:focus + .navds-checkbox__label::before,
3035
- .navds-radio__input:focus + .navds-radio__label::before {
3036
- outline: 2px solid transparent;
3037
- outline-offset: 2px;
3038
- box-shadow:
3039
- 0 0 0 2px var(--ac-radio-checkbox-border, var(--a-border-default)),
3040
- 0 0 0 4px var(--a-border-focus);
3041
- }
3042
- }
3043
- .navds-checkbox__input:hover:focus-visible + .navds-checkbox__label::before,
3044
- .navds-radio__input:hover:focus-visible + .navds-radio__label::before {
3033
+ .navds-checkbox__input:hover:focus + .navds-checkbox__label::before,
3034
+ .navds-radio__input:hover:focus + .navds-radio__label::before {
3045
3035
  box-shadow:
3046
3036
  0 0 0 2px var(--ac-radio-checkbox-action, var(--a-surface-action-hover)),
3047
3037
  0 0 0 4px var(--a-border-focus);
3048
3038
  }
3049
- @supports not selector(:focus-visible) {
3050
- .navds-checkbox__input:hover:focus + .navds-checkbox__label::before,
3051
- .navds-radio__input:hover:focus + .navds-radio__label::before {
3052
- box-shadow:
3053
- 0 0 0 2px var(--ac-radio-checkbox-action, var(--a-surface-action-hover)),
3054
- 0 0 0 4px var(--a-border-focus);
3055
- }
3056
- }
3057
3039
  .navds-checkbox__input:indeterminate + .navds-checkbox__label::after {
3058
3040
  content: "";
3059
3041
  position: absolute;
@@ -3101,57 +3083,33 @@ body,
3101
3083
  .navds-checkbox--small > .navds-checkbox__input:checked + .navds-checkbox__label::before {
3102
3084
  background-position: 0.25rem center;
3103
3085
  }
3104
- .navds-checkbox__input:indeterminate:focus-visible + .navds-checkbox__label::before,
3105
- .navds-checkbox__input:checked:focus-visible + .navds-checkbox__label::before {
3086
+ .navds-checkbox__input:indeterminate:focus + .navds-checkbox__label::before,
3087
+ .navds-checkbox__input:checked:focus + .navds-checkbox__label::before {
3106
3088
  box-shadow:
3107
3089
  0 0 0 1px var(--ac-radio-checkbox-action, var(--a-surface-action-selected)),
3108
3090
  0 0 0 2px var(--ac-radio-checkbox-bg, var(--a-surface-default)),
3109
3091
  0 0 0 4px var(--a-border-focus);
3110
3092
  }
3111
- @supports not selector(:focus-visible) {
3112
- .navds-checkbox__input:indeterminate:focus + .navds-checkbox__label::before,
3113
- .navds-checkbox__input:checked:focus + .navds-checkbox__label::before {
3114
- box-shadow:
3115
- 0 0 0 1px var(--ac-radio-checkbox-action, var(--a-surface-action-selected)),
3116
- 0 0 0 2px var(--ac-radio-checkbox-bg, var(--a-surface-default)),
3117
- 0 0 0 4px var(--a-border-focus);
3118
- }
3119
- }
3120
3093
  .navds-radio__input:checked + .navds-radio__label::before {
3121
3094
  box-shadow:
3122
3095
  0 0 0 2px var(--ac-radio-checkbox-action, var(--a-surface-action-selected)),
3123
3096
  inset 0 0 0 2px var(--ac-radio-checkbox-bg, var(--a-surface-default));
3124
3097
  background-color: var(--ac-radio-checkbox-action, var(--a-surface-action-selected));
3125
3098
  }
3126
- .navds-radio__input:checked:focus-visible + .navds-radio__label::before {
3099
+ .navds-radio__input:checked:focus + .navds-radio__label::before {
3127
3100
  box-shadow:
3128
3101
  0 0 0 2px var(--ac-radio-checkbox-action, var(--a-surface-action-selected)),
3129
3102
  inset 0 0 0 2px var(--ac-radio-checkbox-bg, var(--a-surface-default)),
3130
3103
  0 0 0 4px var(--a-border-focus);
3131
3104
  }
3132
- @supports not selector(:focus-visible) {
3133
- .navds-radio__input:checked:focus + .navds-radio__label::before {
3134
- box-shadow:
3135
- 0 0 0 2px var(--ac-radio-checkbox-action, var(--a-surface-action)),
3136
- inset 0 0 0 2px var(--ac-radio-checkbox-bg, var(--a-surface-default)),
3137
- 0 0 0 4px var(--a-border-focus);
3138
- }
3139
- }
3140
3105
  .navds-checkbox__input:hover:not(:disabled) + .navds-checkbox__label,
3141
3106
  .navds-radio__input:hover:not(:disabled) + .navds-radio__label {
3142
3107
  color: var(--ac-radio-checkbox-action, var(--a-surface-action-hover));
3143
3108
  }
3144
- .navds-checkbox__input:hover:not(:disabled):not(:checked):not(:indeterminate):not(:focus-visible)
3145
- + .navds-checkbox__label::before,
3146
- .navds-radio__input:hover:not(:disabled):not(:checked):not(:focus-visible) + .navds-radio__label::before {
3109
+ .navds-checkbox__input:hover:not(:disabled):not(:checked):not(:indeterminate):not(:focus) + .navds-checkbox__label::before,
3110
+ .navds-radio__input:hover:not(:disabled):not(:checked):not(:focus) + .navds-radio__label::before {
3147
3111
  box-shadow: 0 0 0 2px var(--ac-radio-checkbox-action, var(--a-surface-action-hover));
3148
3112
  }
3149
- @supports not selector(:focus-visible) {
3150
- .navds-checkbox__input:hover:not(:disabled):not(:checked):not(:indeterminate):not(:focus) + .navds-checkbox__label::before,
3151
- .navds-radio__input:hover:not(:disabled):not(:checked):not(:focus) + .navds-radio__label::before {
3152
- box-shadow: 0 0 0 2px var(--ac-radio-checkbox-action, var(--a-surface-action-hover));
3153
- }
3154
- }
3155
3113
  .navds-checkbox__input:hover:not(:disabled):not(:checked):not(:indeterminate) + .navds-checkbox__label::before,
3156
3114
  .navds-radio__input:hover:not(:disabled):not(:checked) + .navds-radio__label::before {
3157
3115
  background-color: var(--ac-radio-checkbox-action-hover-bg, var(--a-surface-action-subtle));
@@ -3163,58 +3121,29 @@ body,
3163
3121
  box-shadow: 0 0 0 2px var(--ac-radio-checkbox-error-border, var(--a-border-danger));
3164
3122
  }
3165
3123
  .navds-checkbox--error
3166
- > .navds-checkbox__input:focus-visible:not(:hover):not(:disabled):not(:checked):not(:indeterminate)
3124
+ > .navds-checkbox__input:focus:not(:hover):not(:disabled):not(:checked):not(:indeterminate)
3167
3125
  + .navds-checkbox__label::before,
3168
- .navds-radio--error > .navds-radio__input:focus-visible:not(:hover):not(:disabled):not(:checked) + .navds-radio__label::before {
3126
+ .navds-radio--error > .navds-radio__input:focus:not(:hover):not(:disabled):not(:checked) + .navds-radio__label::before {
3169
3127
  box-shadow:
3170
3128
  0 0 0 2px var(--ac-radio-checkbox-error-border, var(--a-border-danger)),
3171
3129
  0 0 0 4px var(--a-border-focus);
3172
3130
  }
3173
- @supports not selector(:focus-visible) {
3174
- .navds-checkbox--error
3175
- > .navds-checkbox__input:focus:not(:hover):not(:disabled):not(:checked):not(:indeterminate)
3176
- + .navds-checkbox__label::before,
3177
- .navds-radio--error > .navds-radio__input:focus:not(:hover):not(:disabled):not(:checked) + .navds-radio__label::before {
3178
- box-shadow:
3179
- 0 0 0 2px var(--ac-radio-checkbox-error-border, var(--a-border-danger)),
3180
- 0 0 0 4px var(--a-border-focus);
3181
- }
3182
- }
3183
3131
  .navds-checkbox--error
3184
- > .navds-checkbox__input:hover:not(:disabled):not(:checked):not(:indeterminate):not(:focus-visible)
3132
+ > .navds-checkbox__input:hover:not(:disabled):not(:checked):not(:indeterminate):not(:focus)
3185
3133
  + .navds-checkbox__label::before,
3186
- .navds-radio--error > .navds-radio__input:hover:not(:disabled):not(:checked):not(:focus-visible) + .navds-radio__label::before {
3134
+ .navds-radio--error > .navds-radio__input:hover:not(:disabled):not(:checked):not(:focus) + .navds-radio__label::before {
3187
3135
  background-color: var(--ac-radio-checkbox-error-hover-bg, var(--a-surface-danger-subtle));
3188
3136
  box-shadow: 0 0 0 2px var(--ac-radio-checkbox-error-border, var(--a-border-danger));
3189
3137
  }
3190
3138
  .navds-checkbox--error
3191
- > .navds-checkbox__input:focus-visible:hover:not(:disabled):not(:checked):not(:indeterminate)
3139
+ > .navds-checkbox__input:focus:hover:not(:disabled):not(:checked):not(:indeterminate)
3192
3140
  + .navds-checkbox__label::before,
3193
- .navds-radio--error > .navds-radio__input:focus-visible:hover:not(:disabled):not(:checked) + .navds-radio__label::before {
3141
+ .navds-radio--error > .navds-radio__input:focus:hover:not(:disabled):not(:checked) + .navds-radio__label::before {
3194
3142
  background-color: var(--ac-radio-checkbox-error-hover-bg, var(--a-surface-danger-subtle));
3195
3143
  box-shadow:
3196
3144
  0 0 0 2px var(--ac-radio-checkbox-error-border, var(--a-border-danger)),
3197
3145
  0 0 0 4px var(--a-border-focus);
3198
3146
  }
3199
- @supports not selector(:focus-visible) {
3200
- .navds-checkbox--error
3201
- > .navds-checkbox__input:hover:not(:disabled):not(:checked):not(:indeterminate):not(:focus)
3202
- + .navds-checkbox__label::before,
3203
- .navds-radio--error > .navds-radio__input:hover:not(:disabled):not(:checked):not(:focus) + .navds-radio__label::before {
3204
- background-color: var(--ac-radio-checkbox-error-hover-bg, var(--a-surface-danger-subtle));
3205
- box-shadow: 0 0 0 2px var(--ac-radio-checkbox-error-border, var(--a-border-danger));
3206
- }
3207
-
3208
- .navds-checkbox--error
3209
- > .navds-checkbox__input:focus:hover:not(:disabled):not(:checked):not(:indeterminate)
3210
- + .navds-checkbox__label::before,
3211
- .navds-radio--error > .navds-radio__input:focus:hover:not(:disabled):not(:checked) + .navds-radio__label::before {
3212
- background-color: var(--ac-radio-checkbox-error-hover-bg, var(--a-surface-danger-subtle));
3213
- box-shadow:
3214
- 0 0 0 2px var(--ac-radio-checkbox-error-border, var(--a-border-danger)),
3215
- 0 0 0 4px var(--a-border-focus);
3216
- }
3217
- }
3218
3147
  .navds-checkbox--disabled,
3219
3148
  .navds-radio--disabled {
3220
3149
  opacity: 0.3;
@@ -3241,15 +3170,15 @@ body,
3241
3170
  > .navds-checkbox__input:not(:disabled):not(:checked):not(:indeterminate)
3242
3171
  + .navds-checkbox__label::before,
3243
3172
  .navds-checkbox--readonly
3244
- > .navds-checkbox__input:hover:not(:checked):not(:indeterminate):not(:focus-visible)
3173
+ > .navds-checkbox__input:hover:not(:checked):not(:indeterminate):not(:focus)
3245
3174
  + .navds-checkbox__label::before,
3246
3175
  .navds-radio--readonly > .navds-radio__input:not(:disabled):not(:checked) + .navds-radio__label::before,
3247
- .navds-radio--readonly > .navds-radio__input:hover:not(:checked):not(:focus-visible) + .navds-radio__label::before {
3176
+ .navds-radio--readonly > .navds-radio__input:hover:not(:checked):not(:focus) + .navds-radio__label::before {
3248
3177
  background-color: var(--__ac-radio-checkbox-readonly-bg);
3249
3178
  box-shadow: 0 0 0 2px var(--__ac-radio-checkbox-readonly-border);
3250
3179
  }
3251
- .navds-checkbox--readonly > .navds-checkbox__input:focus-visible + .navds-checkbox__label::before,
3252
- .navds-radio--readonly > .navds-radio__input:focus-visible + .navds-radio__label::before {
3180
+ .navds-checkbox--readonly > .navds-checkbox__input:focus + .navds-checkbox__label::before,
3181
+ .navds-radio--readonly > .navds-radio__input:focus + .navds-radio__label::before {
3253
3182
  --__ac-radio-checkbox-readonly-border: var(--a-border-subtle), var(--a-shadow-focus);
3254
3183
  }
3255
3184
  .navds-checkbox--readonly > .navds-checkbox__input:checked + .navds-checkbox__label::before {
@@ -3273,8 +3202,8 @@ body,
3273
3202
  background-color: var(--a-icon-subtle);
3274
3203
  }
3275
3204
  @media (forced-colors: active) {
3276
- .navds-checkbox__input:focus-visible + .navds-checkbox__label::before,
3277
- .navds-radio__input:focus-visible + .navds-radio__label::before {
3205
+ .navds-checkbox__input:focus + .navds-checkbox__label::before,
3206
+ .navds-radio__input:focus + .navds-radio__label::before {
3278
3207
  outline-color: highlight;
3279
3208
  }
3280
3209
 
@@ -3306,7 +3235,7 @@ body,
3306
3235
  background-color: var(--__ac-radio-checkbox-high-contrast-text);
3307
3236
  }
3308
3237
 
3309
- .navds-radio__input:checked:focus-visible + .navds-radio__label::before {
3238
+ .navds-radio__input:checked:focus + .navds-radio__label::before {
3310
3239
  border: 1px solid var(--__ac-radio-checkbox-high-contrast-bg);
3311
3240
  outline: 2px solid highlight;
3312
3241
  outline-offset: 2px;
@@ -3317,7 +3246,7 @@ body,
3317
3246
  color: highlight;
3318
3247
  }
3319
3248
 
3320
- .navds-checkbox__input:focus-visible + .navds-checkbox__label::before {
3249
+ .navds-checkbox__input:focus + .navds-checkbox__label::before {
3321
3250
  outline: 2px solid var(--__ac-radio-checkbox-high-contrast-highlight);
3322
3251
  }
3323
3252
 
@@ -5762,7 +5691,7 @@ button.navds-internalheader__title:active,
5762
5691
  .navds-timeline__pin-wrapper::before {
5763
5692
  content: "";
5764
5693
  top: var(--navdsc-timeline-pin-size);
5765
- height: calc(88% - var(--navdsc-timeline-pin-size));
5694
+ height: calc(100% - var(--navdsc-timeline-pin-size) * 2);
5766
5695
  width: 1px;
5767
5696
  margin: 0 auto;
5768
5697
  background: var(--a-surface-inverted);
@@ -6301,6 +6230,104 @@ button.navds-internalheader__title:active,
6301
6230
  .navds-read-more--open > .navds-read-more__button:hover > .navds-read-more__expand-icon {
6302
6231
  transform: translateY(-1px) rotate(-180deg);
6303
6232
  }
6233
+ .navds-progress-bar {
6234
+ background: var(--a-surface-neutral-subtle);
6235
+ position: relative;
6236
+ border-radius: var(--a-border-radius-full);
6237
+ overflow: hidden;
6238
+ box-shadow:
6239
+ inset 0 1px 3px 0 rgba(0 0 0 / 0.15),
6240
+ inset 0 0 1px 0 rgba(0 0 0 / 0.2);
6241
+ }
6242
+ .navds-progress-bar--small {
6243
+ height: 12px;
6244
+ min-width: 12px;
6245
+ }
6246
+ .navds-progress-bar--medium {
6247
+ height: 16px;
6248
+ min-width: 16px;
6249
+ }
6250
+ .navds-progress-bar--large {
6251
+ height: 24px;
6252
+ min-width: 24px;
6253
+ }
6254
+ .navds-progress-bar__foreground {
6255
+ --__ac-progress-bar-translate: initial;
6256
+
6257
+ transform: translateX(var(--__ac-progress-bar-translate));
6258
+ background: var(--ac-progress-bar-fg, var(--a-surface-alt-3));
6259
+ transform-origin: left;
6260
+ position: absolute;
6261
+ top: 0;
6262
+ left: 0;
6263
+ bottom: 0;
6264
+ width: 100%;
6265
+ border-radius: inherit;
6266
+ transition: transform 0.2s ease;
6267
+ }
6268
+ .navds-progress-bar__foreground--indeterminate {
6269
+ --__ac-progress-bar-duration: initial;
6270
+ --__ac-progress-bar-delay: initial;
6271
+
6272
+ animation-name: navds-progress-bar-indeterminate-grow, navds-progress-bar-indeterminate;
6273
+ animation-timing-function: ease-in-out, ease-in-out;
6274
+ animation-duration: var(--__ac-progress-bar-duration), 2500ms;
6275
+ animation-fill-mode: forwards, none;
6276
+ animation-iteration-count: 1, infinite;
6277
+ animation-delay: 0s, calc((var(--__ac-progress-bar-duration) + var(--__ac-progress-bar-delay)));
6278
+ }
6279
+ /* navds-progress-bar-indeterminate wave animation */
6280
+ @keyframes navds-progress-bar-indeterminate {
6281
+ 0% {
6282
+ left: -50%;
6283
+ width: 50%;
6284
+ transform: translateX(0%);
6285
+ }
6286
+
6287
+ 50% {
6288
+ animation-direction: reverse;
6289
+ left: 100%;
6290
+ transform: translateX(0%);
6291
+ width: 50%;
6292
+ }
6293
+
6294
+ 100% {
6295
+ left: -50%;
6296
+ transform: translateX(0%);
6297
+ width: 50%;
6298
+ }
6299
+ }
6300
+ @keyframes navds-progress-bar-indeterminate-grow {
6301
+ 0% {
6302
+ transform: translateX(-100%);
6303
+ }
6304
+
6305
+ 20% {
6306
+ transform: translateX(-80%);
6307
+ }
6308
+
6309
+ 30% {
6310
+ transform: translateX(-40%);
6311
+ }
6312
+
6313
+ 40%,
6314
+ 50% {
6315
+ transform: translateX(-20%);
6316
+ }
6317
+
6318
+ 100% {
6319
+ transform: translateX(-10%);
6320
+ }
6321
+ }
6322
+ @media (forced-colors: active) {
6323
+ .navds-progress-bar__foreground {
6324
+ background: Highlight;
6325
+ }
6326
+
6327
+ .navds-progress-bar {
6328
+ outline: 1px solid transparent;
6329
+ }
6330
+ }
6304
6331
  .navds-skeleton {
6305
6332
  background-color: var(--ac-skeleton-bg, var(--a-surface-neutral-moderate));
6306
6333
  height: 1.3em;