@navikt/ds-css 4.6.0 → 4.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.
package/dist/index.css CHANGED
@@ -1,7 +1,7 @@
1
1
  @charset "UTF-8";
2
2
  /**
3
3
  * Do not edit directly
4
- * Generated on Mon, 03 Jul 2023 11:26:04 GMT
4
+ * Generated on Mon, 17 Jul 2023 20:38:11 GMT
5
5
  */
6
6
  :root, :host {
7
7
  --a-spacing-05: 0.125rem;
@@ -2384,6 +2384,9 @@ body,
2384
2384
  .navds-fieldset__legend {
2385
2385
  padding: 0;
2386
2386
  }
2387
+ .navds-fieldset--readonly > :where(.navds-fieldset__legend) {
2388
+ display: inline-flex;
2389
+ }
2387
2390
  .navds-fieldset:disabled > .navds-fieldset__legend,
2388
2391
  .navds-fieldset:disabled > .navds-fieldset__description {
2389
2392
  opacity: 0.3;
@@ -2416,10 +2419,14 @@ body,
2416
2419
  .navds-form-field__subdescription {
2417
2420
  color: var(--ac-form-subdescription, var(--a-text-subtle));
2418
2421
  }
2422
+ .navds-form-field--readonly > :where(.navds-form-field__label) {
2423
+ display: inline-flex;
2424
+ }
2419
2425
  .navds-form-field__readonly-icon {
2426
+ margin-top: var(--a-spacing-05);
2420
2427
  margin-right: var(--a-spacing-2);
2421
- vertical-align: middle;
2422
- margin-bottom: 3px;
2428
+ flex-shrink: 0;
2429
+ align-self: flex-start;
2423
2430
  }
2424
2431
  .navds-error-summary {
2425
2432
  background-color: var(--ac-error-summary-bg, var(--a-surface-default));
@@ -2697,6 +2704,9 @@ body,
2697
2704
  .navds-radio--readonly > :where(.navds-radio__input, .navds-radio__label) {
2698
2705
  cursor: default;
2699
2706
  }
2707
+ .navds-checkbox--readonly .navds-checkbox__label-text {
2708
+ display: inline-flex;
2709
+ }
2700
2710
  .navds-checkbox--readonly > .navds-checkbox__input:hover + .navds-checkbox__label,
2701
2711
  .navds-radio--readonly > .navds-radio__input:hover + .navds-radio__label {
2702
2712
  color: var(--a-text-default);
@@ -2974,6 +2984,9 @@ body,
2974
2984
  .navds-switch--readonly .navds-switch__label-wrapper:hover {
2975
2985
  color: var(--a-text-default);
2976
2986
  }
2987
+ .navds-switch--readonly .navds-switch__label {
2988
+ display: inline-flex;
2989
+ }
2977
2990
  .navds-switch--readonly .navds-switch__thumb {
2978
2991
  background-color: var(--a-surface-subtle);
2979
2992
  box-shadow: 0 0 0 2px var(--a-border-default);
@@ -3294,6 +3307,253 @@ body,
3294
3307
  z-index: 1;
3295
3308
  }
3296
3309
  }
3310
+ .navds-combobox__wrapper {
3311
+ display: flex;
3312
+ flex-direction: column;
3313
+ width: 100%;
3314
+ position: relative;
3315
+ }
3316
+ .navds-combobox__wrapper-inner {
3317
+ position: relative;
3318
+ display: flex;
3319
+ flex-direction: row;
3320
+ justify-content: space-between;
3321
+ width: 100%;
3322
+ border: 1px solid black;
3323
+ }
3324
+ .navds-combobox__wrapper-inner > :first-child {
3325
+ flex: 2;
3326
+ }
3327
+ .navds-combobox__wrapper-inner > :last-child {
3328
+ display: flex;
3329
+ flex-flow: row nowrap;
3330
+ }
3331
+ .navds-form-field--small .navds-combobox__wrapper-inner {
3332
+ padding: var(--a-spacing-1) calc(var(--a-spacing-3) / 2);
3333
+ }
3334
+ .navds-combobox__wrapper-inner:hover {
3335
+ cursor: text;
3336
+ }
3337
+ .navds-combobox__selected-options {
3338
+ gap: var(--a-spacing-2);
3339
+ }
3340
+ .navds-combobox__selected-options > li {
3341
+ margin: auto 0;
3342
+ border-radius: var(--a-border-radius-full);
3343
+ }
3344
+ .navds-combobox__selected-options > li:last-of-type {
3345
+ display: flex;
3346
+ flex: 1;
3347
+ }
3348
+ .navds-combobox__selected-options--no-bg {
3349
+ font-family: inherit;
3350
+ font-size: var(--a-font-size-large);
3351
+ font-weight: var(--a-font-weight-regular);
3352
+ letter-spacing: 0;
3353
+ line-height: var(--a-font-line-height-large);
3354
+ margin: 0;
3355
+ padding-left: calc(0.5rem - 4px);
3356
+ }
3357
+ .navds-combobox__input-wrapper {
3358
+ width: 100%;
3359
+ }
3360
+ .navds-combobox__input {
3361
+ z-index: 1;
3362
+ flex: 1;
3363
+ border: none;
3364
+ padding: 0;
3365
+ margin: 0;
3366
+ min-width: 10ch;
3367
+ width: 100%;
3368
+ }
3369
+ .navds-combobox__input:focus-visible {
3370
+ outline: none;
3371
+ border: none;
3372
+ box-shadow: none;
3373
+ }
3374
+ .navds-combobox__wrapper-inner:has(.navds-combobox__input:focus-visible) {
3375
+ box-shadow: 0 0 0 1px var(--a-surface-default) inset, var(--a-shadow-focus);
3376
+ box-shadow: var(--a-shadow-focus);
3377
+ }
3378
+ .navds-combobox__wrapper-inner:has(.navds-combobox__input:focus-visible).navds-combobox__wrapper-inner--virtually-unfocused {
3379
+ box-shadow: none;
3380
+ }
3381
+ @supports not selector(:focus-visible) {
3382
+ .navds-combobox__input:focus-visible {
3383
+ outline: none;
3384
+ border: none;
3385
+ box-shadow: none;
3386
+ }
3387
+
3388
+ .navds-combobox__wrapper-inner:has(.navds-combobox__input:focus) {
3389
+ box-shadow: 0 0 0 1px var(--a-surface-default) inset, var(--a-shadow-focus);
3390
+ box-shadow: var(--a-shadow-focus);
3391
+ }
3392
+
3393
+ .navds-combobox__wrapper-inner:has(.navds-combobox__input:focus).navds-combobox__wrapper-inner--virtually-unfocused {
3394
+ box-shadow: none;
3395
+ }
3396
+ }
3397
+ .navds-combobox__button-clear {
3398
+ border-radius: var(--a-border-radius-medium);
3399
+ color: var(--ac-combobox-clear-icon, var(--a-text-subtle));
3400
+ display: flex;
3401
+ justify-content: center;
3402
+ align-items: center;
3403
+ cursor: pointer;
3404
+ background: none;
3405
+ border: none;
3406
+ font-size: 1rem;
3407
+ padding: 0;
3408
+ }
3409
+ .navds-combobox__button-clear svg {
3410
+ width: 1.5rem;
3411
+ height: 1.5rem;
3412
+ }
3413
+ .navds-combobox__input::-webkit-search-cancel-button {
3414
+ display: none;
3415
+ }
3416
+ .navds-combobox__button-toggle-list {
3417
+ border-radius: var(--a-border-radius-medium);
3418
+ color: var(--a-text-default);
3419
+ display: flex;
3420
+ justify-content: center;
3421
+ align-items: center;
3422
+ cursor: pointer;
3423
+ background: none;
3424
+ border: none;
3425
+ font-size: 1rem;
3426
+ padding: 0;
3427
+ }
3428
+ .navds-combobox__button-clear:active:hover,
3429
+ .navds-combobox__button-toggle-list:active:hover {
3430
+ color: var(--ac-combobox-clear-icon-active, var(--a-text-action));
3431
+ }
3432
+ .navds-combobox__button-clear:hover,
3433
+ .navds-combobox__button-toggle-list:hover {
3434
+ color: var(--ac-combobox-clear-icon-hover, var(--a-text-action-selected));
3435
+ }
3436
+ .navds-combobox__button-toggle-list:focus-visible {
3437
+ box-shadow: 0 0 0 1px var(--a-surface-default) inset, var(--a-shadow-focus);
3438
+ box-shadow: var(--a-shadow-focus);
3439
+ outline: none;
3440
+ }
3441
+ @supports not selector(:focus-visible) {
3442
+ .navds-combobox__button-toggle-list:focus {
3443
+ box-shadow: 0 0 0 1px var(--a-surface-default) inset, var(--a-shadow-focus);
3444
+ box-shadow: var(--a-shadow-focus);
3445
+ outline: none;
3446
+ }
3447
+ }
3448
+ .navds-combobox__button-toggle-list svg {
3449
+ width: 1.5rem;
3450
+ height: 1.5rem;
3451
+ pointer-events: none;
3452
+ }
3453
+ .navds-form-field--small .navds-combobox__button-toggle-list svg,
3454
+ .navds-form-field--small .navds-combobox__button-clear svg {
3455
+ width: 1.25rem;
3456
+ height: 1.25rem;
3457
+ }
3458
+ /* dropdown list */
3459
+ .navds-combobox__list {
3460
+ max-height: 290px;
3461
+ overflow-y: auto;
3462
+ position: absolute;
3463
+ left: 0;
3464
+ right: 0;
3465
+ z-index: 9999;
3466
+ top: calc(100% + var(--a-spacing-2));
3467
+ list-style: none;
3468
+ margin: 0;
3469
+ border: 1px solid var(--ac-combobox-list-border-color, var(--a-border-divider));
3470
+ display: flex;
3471
+ flex-direction: column;
3472
+ align-items: flex-start;
3473
+ padding: 0;
3474
+ box-shadow: var(--a-shadow-small);
3475
+ border-radius: 4px;
3476
+ gap: 4px 0;
3477
+ background-color: var(--ac-combobox-list-bg, var(--a-surface-default));
3478
+ color: var(--ac-combobox-list-text, var(--a-text-default));
3479
+ }
3480
+ .navds-combobox__list--closed {
3481
+ display: none;
3482
+ }
3483
+ .navds-combobox__list svg {
3484
+ height: 1.5rem;
3485
+ width: 1.5rem;
3486
+ }
3487
+ .navds-combobox__list-item,
3488
+ .navds-combobox__list-item__no-options,
3489
+ .navds-combobox__list-item__new-option {
3490
+ display: flex;
3491
+ flex-direction: row;
3492
+ justify-content: space-between;
3493
+ align-items: center;
3494
+ padding: var(--a-spacing-3);
3495
+ width: 100%;
3496
+ background-color: var(--ac-combobox-list-item-bg, var(--a-surface-default));
3497
+ }
3498
+ .navds-form-field--small .navds-combobox__list-item,
3499
+ .navds-form-field--small .navds-combobox__list-item__no-options,
3500
+ .navds-form-field--small .navds-combobox__list-item__new-option {
3501
+ padding: calc(var(--a-spacing-3) / 2) var(--a-spacing-2);
3502
+ }
3503
+ .navds-combobox__list-item--loading {
3504
+ display: flex;
3505
+ justify-content: center;
3506
+ padding: var(--a-spacing-3);
3507
+ background-color: var(--ac-combobox-list-item-loading-bg, var(--a-surface-default));
3508
+ width: 100%;
3509
+ }
3510
+ .navds-combobox__list-item--focus,
3511
+ .navds-combobox__list-item:hover {
3512
+ background-color: var(--ac-combobox-list-item-hover-bg, var(--a-surface-hover));
3513
+ cursor: pointer;
3514
+ border-left: 4px solid var(--ac-combobox-list-item-hover-border-left, var(--a-border-strong));
3515
+ padding-left: calc(var(--a-spacing-3) - 4px);
3516
+ }
3517
+ .navds-combobox__list-item--selected {
3518
+ background-color: var(--ac-combobox-list-item-selected-bg, var(--a-surface-selected));
3519
+ }
3520
+ .navds-combobox__list-item--selected.navds-combobox__list-item--focus,
3521
+ .navds-combobox__list-item--selected:hover {
3522
+ background-color: var(--ac-combobox-list-item-selected-hover-bg, var(--a-surface-action-subtle-hover));
3523
+ border-left: 4px solid var(--ac-combobox-list-item-selected-hover-border-left, var(--a-border-focus));
3524
+ padding-left: calc(var(--a-spacing-3) - 4px);
3525
+ }
3526
+ .navds-combobox__list-item__new-option {
3527
+ border-bottom: 1px solid var(--a-border-divider);
3528
+ background: var(--a-surface-neutral-subtle);
3529
+ cursor: pointer;
3530
+ justify-content: flex-start;
3531
+ gap: 0.25rem;
3532
+ }
3533
+ .navds-combobox__list-item__new-option:hover {
3534
+ border-bottom: 1px solid var(--a-border-divider);
3535
+ background: var(--a-surface-neutral-subtle-hover);
3536
+ }
3537
+ .navds-combobox__list-item__new-option--focus {
3538
+ box-shadow: var(--a-shadow-focus) inset, var(--a-border-action) 0 0 0 5px inset;
3539
+ border-radius: 3px;
3540
+ }
3541
+ /* Mobile */
3542
+ @media (max-width: 479px) {
3543
+ .navds-combobox__button-toggle-list {
3544
+ right: 0.5rem;
3545
+ }
3546
+
3547
+ /* add bigger click area for input */
3548
+ .navds-combobox__input {
3549
+ min-width: min-content;
3550
+ padding: 0.75rem 0;
3551
+ }
3552
+
3553
+ .navds-combobox__selected-options {
3554
+ gap: var(--a-spacing-1);
3555
+ }
3556
+ }
3297
3557
  .navds-help-text__button {
3298
3558
  margin: 0;
3299
3559
  padding: 0;