@navikt/ds-css 4.4.2 → 4.6.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 Wed, 28 Jun 2023 09:38:13 GMT
4
+ * Generated on Mon, 03 Jul 2023 11:26:04 GMT
5
5
  */
6
6
  :root, :host {
7
7
  --a-spacing-05: 0.125rem;
@@ -1312,6 +1312,7 @@ body,
1312
1312
  font-size: 1.5rem;
1313
1313
  align-self: flex-start;
1314
1314
  height: var(--a-font-line-height-xlarge);
1315
+ margin: var(--a-spacing-1);
1315
1316
  background: radial-gradient(circle, var(--a-surface-default) 50%, 0, transparent);
1316
1317
  }
1317
1318
  .navds-alert--small > .navds-alert__icon {
@@ -1351,6 +1352,13 @@ body,
1351
1352
  border: none;
1352
1353
  padding: 0;
1353
1354
  }
1355
+ .navds-alert__button-wrapper {
1356
+ align-self: flex-start;
1357
+ flex: 1;
1358
+ display: flex;
1359
+ flex-flow: row nowrap;
1360
+ justify-content: flex-end;
1361
+ }
1354
1362
  .navds-button {
1355
1363
  --__ac-button-padding: var(--a-spacing-3) var(--a-spacing-5);
1356
1364
 
@@ -1579,7 +1587,6 @@ body,
1579
1587
  .navds-button--tertiary:active {
1580
1588
  color: var(--ac-button-tertiary-active-text, var(--a-text-on-action));
1581
1589
  background-color: var(--ac-button-tertiary-active-bg, var(--a-surface-action-active));
1582
- box-shadow: inset 0 0 0 1px var(--a-surface-default);
1583
1590
  }
1584
1591
  .navds-button--tertiary:active:hover {
1585
1592
  background-color: var(--ac-button-tertiary-active-hover-bg, var(--a-surface-action-active));
@@ -1621,7 +1628,6 @@ body,
1621
1628
  .navds-button--tertiary-neutral:active {
1622
1629
  color: var(--ac-button-tertiary-neutral-active-text, var(--a-text-on-neutral));
1623
1630
  background-color: var(--ac-button-tertiary-neutral-active-bg, var(--a-surface-neutral-active));
1624
- box-shadow: inset 0 0 0 1px var(--a-surface-default);
1625
1631
  }
1626
1632
  .navds-button--tertiary-neutral:active:hover {
1627
1633
  background-color: var(--ac-button-tertiary-neutral-active-hover-bg, var(--a-surface-neutral-active));
@@ -2410,6 +2416,11 @@ body,
2410
2416
  .navds-form-field__subdescription {
2411
2417
  color: var(--ac-form-subdescription, var(--a-text-subtle));
2412
2418
  }
2419
+ .navds-form-field__readonly-icon {
2420
+ margin-right: var(--a-spacing-2);
2421
+ vertical-align: middle;
2422
+ margin-bottom: 3px;
2423
+ }
2413
2424
  .navds-error-summary {
2414
2425
  background-color: var(--ac-error-summary-bg, var(--a-surface-default));
2415
2426
  padding: var(--a-spacing-5);
@@ -2488,6 +2499,9 @@ body,
2488
2499
  cursor: pointer;
2489
2500
  display: flex;
2490
2501
  gap: var(--a-spacing-2);
2502
+
2503
+ --__ac-radio-checkbox-readonly-bg: var(--a-surface-subtle);
2504
+ --__ac-radio-checkbox-readonly-border: var(--a-border-subtle);
2491
2505
  }
2492
2506
  .navds-checkbox__label::before,
2493
2507
  .navds-radio__label::before {
@@ -2556,7 +2570,7 @@ body,
2556
2570
  background-color: var(--ac-radio-checkbox-bg, var(--a-surface-default));
2557
2571
  width: 0.75rem;
2558
2572
  height: 0.25rem;
2559
- border-radius: 1px; /* Custom value OK */
2573
+ border-radius: 1px;
2560
2574
  flex-shrink: 0;
2561
2575
  }
2562
2576
  .navds-checkbox--small .navds-checkbox__input:indeterminate + .navds-checkbox__label::after {
@@ -2678,6 +2692,48 @@ body,
2678
2692
  .navds-radio--disabled > .navds-radio__label {
2679
2693
  cursor: not-allowed;
2680
2694
  }
2695
+ /* Readonly */
2696
+ .navds-checkbox--readonly > :where(.navds-checkbox__input, .navds-checkbox__label),
2697
+ .navds-radio--readonly > :where(.navds-radio__input, .navds-radio__label) {
2698
+ cursor: default;
2699
+ }
2700
+ .navds-checkbox--readonly > .navds-checkbox__input:hover + .navds-checkbox__label,
2701
+ .navds-radio--readonly > .navds-radio__input:hover + .navds-radio__label {
2702
+ color: var(--a-text-default);
2703
+ }
2704
+ .navds-checkbox--readonly
2705
+ > .navds-checkbox__input:not(:disabled):not(:checked):not(:indeterminate)
2706
+ + .navds-checkbox__label::before,
2707
+ .navds-checkbox--readonly
2708
+ > .navds-checkbox__input:hover:not(:checked):not(:indeterminate):not(:focus-visible)
2709
+ + .navds-checkbox__label::before,
2710
+ .navds-radio--readonly > .navds-radio__input:not(:disabled):not(:checked):not(:indeterminate) + .navds-radio__label::before,
2711
+ .navds-radio--readonly
2712
+ > .navds-radio__input:hover:not(:checked):not(:indeterminate):not(:focus-visible)
2713
+ + .navds-radio__label::before {
2714
+ background-color: var(--__ac-radio-checkbox-readonly-bg);
2715
+ box-shadow: inset 0 0 0 2px var(--__ac-radio-checkbox-readonly-border);
2716
+ }
2717
+ .navds-checkbox--readonly > .navds-checkbox__input:focus-visible + .navds-checkbox__label::before,
2718
+ .navds-radio--readonly > .navds-radio__input:focus-visible + .navds-radio__label::before {
2719
+ --__ac-radio-checkbox-readonly-border: var(--a-border-subtle), var(--a-shadow-focus);
2720
+ }
2721
+ .navds-checkbox--readonly > .navds-checkbox__input:checked + .navds-checkbox__label::before {
2722
+ background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMyAxMCI+ICAgIDxnPiAgICA8cGF0aCBmaWxsPSJyZ2JhKDAsIDAsIDAsIDAuNjUpIiBkPSJNNCwxMGMtMC40LDAtMC44LTAuMS0xLjEtMC40TDAuNCw3LjFDMC4xLDYuOCwwLDYuNCwwLDZzMC4yLTAuOCwwLjUtMS4xQzEsNC40LDIsNC40LDIuNSw0LjlMNCw2LjRsNi40LTYgICAgQzEwLjgsMC4xLDExLjEsMCwxMS41LDBjMC40LDAsMC44LDAuMiwxLDAuNWMwLjYsMC42LDAuNSwxLjYtMC4xLDIuMXYwTDUsOS42QzQuNyw5LjksNC40LDEwLDQsMTB6IE0xMS44LDEuOUwxMS44LDEuOSAgICBDMTEuOCwxLjksMTEuOCwxLjksMTEuOCwxLjl6IE0xMS4yLDEuMUMxMS4yLDEuMSwxMS4yLDEuMSwxMS4yLDEuMUwxMS4yLDEuMXoiLz4gICAgPC9nPjwvc3ZnPg==);
2723
+ box-shadow: inset 0 0 0 2px var(--__ac-radio-checkbox-readonly-border);
2724
+ background-color: var(--__ac-radio-checkbox-readonly-bg);
2725
+ }
2726
+ .navds-radio--readonly > .navds-radio__input:checked + .navds-radio__label::before {
2727
+ box-shadow: inset 0 0 0 2px var(--__ac-radio-checkbox-readonly-border), inset 0 0 0 4px var(--__ac-radio-checkbox-readonly-bg);
2728
+ background-color: var(--a-icon-subtle);
2729
+ }
2730
+ .navds-checkbox--readonly > .navds-checkbox__input:indeterminate + .navds-checkbox__label::before {
2731
+ box-shadow: inset 0 0 0 2px var(--__ac-radio-checkbox-readonly-border);
2732
+ background-color: var(--__ac-radio-checkbox-readonly-bg);
2733
+ }
2734
+ .navds-checkbox--readonly > .navds-checkbox__input:indeterminate + .navds-checkbox__label::after {
2735
+ background-color: var(--a-icon-subtle);
2736
+ }
2681
2737
  .navds-select__input {
2682
2738
  appearance: none;
2683
2739
  background-color: var(--ac-select-bg, var(--a-surface-default));
@@ -2749,6 +2805,11 @@ body,
2749
2805
  .navds-select__input:disabled > option {
2750
2806
  color: var(--a-text-default);
2751
2807
  }
2808
+ .navds-select--readonly .navds-select__input {
2809
+ background-color: var(--a-surface-subtle);
2810
+ border-color: var(--a-border-subtle);
2811
+ cursor: default;
2812
+ }
2752
2813
  .navds-switch {
2753
2814
  position: relative;
2754
2815
  min-height: 48px;
@@ -2898,6 +2959,37 @@ body,
2898
2959
  .navds-switch__input:disabled ~ .navds-switch__label-wrapper {
2899
2960
  cursor: not-allowed;
2900
2961
  }
2962
+ /* Readonly */
2963
+ .navds-switch--readonly > .navds-switch__track,
2964
+ .navds-switch--readonly > .navds-switch__input:hover ~ .navds-switch__track,
2965
+ .navds-switch--readonly > .navds-switch__input:checked ~ .navds-switch__track,
2966
+ .navds-switch--readonly > .navds-switch__input:checked:hover ~ .navds-switch__track {
2967
+ background-color: var(--a-surface-neutral-moderate);
2968
+ }
2969
+ .navds-switch--readonly > .navds-switch__label-wrapper,
2970
+ .navds-switch--readonly > .navds-switch__input {
2971
+ cursor: default;
2972
+ }
2973
+ .navds-switch--readonly > .navds-switch__input:hover ~ .navds-switch__label-wrapper,
2974
+ .navds-switch--readonly .navds-switch__label-wrapper:hover {
2975
+ color: var(--a-text-default);
2976
+ }
2977
+ .navds-switch--readonly .navds-switch__thumb {
2978
+ background-color: var(--a-surface-subtle);
2979
+ box-shadow: 0 0 0 2px var(--a-border-default);
2980
+ }
2981
+ .navds-switch--readonly > .navds-switch__input:checked ~ .navds-switch__track > .navds-switch__thumb {
2982
+ color: var(--a-icon-subtle);
2983
+ }
2984
+ @media (hover: hover) and (pointer: fine) {
2985
+ .navds-switch--readonly > .navds-switch__input:hover ~ .navds-switch__track > .navds-switch__thumb {
2986
+ transform: translateX(0);
2987
+ }
2988
+
2989
+ .navds-switch--readonly > .navds-switch__input:checked:hover ~ .navds-switch__track > .navds-switch__thumb {
2990
+ transform: translateX(20px);
2991
+ }
2992
+ }
2901
2993
  .navds-text-field__input {
2902
2994
  appearance: none;
2903
2995
  padding: var(--a-spacing-2);
@@ -2953,11 +3045,10 @@ body,
2953
3045
  box-shadow: none;
2954
3046
  cursor: not-allowed;
2955
3047
  }
2956
- .navds-text-field__input[readonly] {
2957
- background-color: var(--ac-textfield-bg, var(--a-surface-default));
2958
- border-color: var(--ac-textfield-border, var(--a-border-default));
2959
- box-shadow: none;
2960
- cursor: not-allowed;
3048
+ .navds-text-field--readonly .navds-text-field__input {
3049
+ background-color: var(--a-surface-subtle);
3050
+ border-color: var(--a-border-subtle);
3051
+ cursor: default;
2961
3052
  }
2962
3053
  /**
2963
3054
  * Removes default search icon
@@ -3043,11 +3134,10 @@ body,
3043
3134
  box-shadow: none;
3044
3135
  cursor: not-allowed;
3045
3136
  }
3046
- .navds-textarea__input[readonly] {
3047
- background-color: var(--ac-textarea-bg, var(--a-surface-default));
3048
- border-color: var(--ac-textarea-border, var(--a-border-default));
3049
- box-shadow: none;
3050
- cursor: not-allowed;
3137
+ .navds-textarea--readonly .navds-textarea__input {
3138
+ background-color: var(--a-surface-subtle);
3139
+ border-color: var(--a-border-subtle);
3140
+ cursor: default;
3051
3141
  }
3052
3142
  .navds-search {
3053
3143
  display: flex;
@@ -3875,6 +3965,10 @@ button.navds-internalheader__title:active,
3875
3965
  .navds-date__popover:where(.navds-popover) {
3876
3966
  border: none;
3877
3967
  }
3968
+ /* Readonly */
3969
+ .navds-date__field--readonly .navds-date__field-button {
3970
+ cursor: default;
3971
+ }
3878
3972
  .navds-tag {
3879
3973
  border: 1px solid;
3880
3974
  border-radius: var(--a-border-radius-small);