@navikt/ds-css 5.8.0 → 5.9.1

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.
@@ -59,12 +59,17 @@
59
59
 
60
60
  @media (min-width: 480px) {
61
61
  .navds-modal {
62
- max-width: calc((100% - 6px) - 2em);
63
- max-height: calc((100% - 6px) - 2em);
62
+ max-width: calc(100% - 6px - 2em);
64
63
  }
65
64
 
66
65
  .navds-modal--autowidth {
67
- max-width: min(700px, calc((100% - 6px) - 2em));
66
+ max-width: min(700px, calc(100% - 6px - 2em));
67
+ }
68
+ }
69
+
70
+ @media (min-height: 480px) {
71
+ .navds-modal {
72
+ max-height: calc(100% - 6px - 2em);
68
73
  }
69
74
  }
70
75
 
@@ -130,6 +135,15 @@
130
135
  margin-left: auto;
131
136
  }
132
137
 
138
+ /* When Datepicker is used nested inside a Modal */
139
+
140
+ .navds-modal--polyfilled .navds-modal--polyfilled.navds-date__nested-modal {
141
+ min-width: fit-content;
142
+ max-width: 100vw;
143
+ max-height: 100vh;
144
+ animation: none;
145
+ }
146
+
133
147
  @keyframes akselModalFadeIn {
134
148
  from {
135
149
  opacity: 0;
@@ -1 +1 @@
1
- .navds-modal__document-body{overflow:hidden}.navds-modal{background-color:var(--ac-modal-bg,var(--a-surface-default));border:none;border-radius:var(--a-border-radius-large);box-shadow:var(--a-shadow-xlarge);color:var(--a-text-default);max-height:100%;max-width:100%;padding:0;position:fixed}.navds-modal[open]{-webkit-animation:akselModalFadeIn .35s cubic-bezier(.15,1,.3,1);animation:akselModalFadeIn .35s cubic-bezier(.15,1,.3,1);display:flex;flex-direction:column}.navds-modal--polyfilled{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;left:0;margin:auto;right:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.navds-modal--polyfilled .navds-modal--polyfilled{overflow:auto}.navds-modal--polyfilled:not([open]){display:none}._dialog_overlay{bottom:0;left:0;position:fixed;right:0;top:0}.navds-modal--small{width:var(--ac-modal-width-small,450px)}.navds-modal--medium{width:var(--ac-modal-width-medium,700px)}@media (min-width:480px){.navds-modal{max-height:calc(100% - 6px - 2em);max-width:calc(100% - 6px - 2em)}.navds-modal--autowidth{max-width:min(700px,calc(100% - 6px - 2em))}}.navds-modal::-webkit-backdrop{-webkit-animation:akselModalBackdropFadeIn .35s cubic-bezier(.15,1,.3,1);animation:akselModalBackdropFadeIn .35s cubic-bezier(.15,1,.3,1);background:var(--ac-modal-backdrop,rgba(2,20,49,.49))}.navds-modal::backdrop{-webkit-animation:akselModalBackdropFadeIn .35s cubic-bezier(.15,1,.3,1);animation:akselModalBackdropFadeIn .35s cubic-bezier(.15,1,.3,1);background:var(--ac-modal-backdrop,rgba(2,20,49,.49))}.navds-modal--polyfilled+.backdrop{background:var(--ac-modal-backdrop,rgba(2,20,49,.49));bottom:0;left:0;position:fixed;right:0;top:0}.navds-modal__button{float:right;margin-left:var(--a-spacing-4)}.navds-modal__header{padding:var(--a-spacing-6) var(--a-spacing-6) var(--a-spacing-4) var(--a-spacing-6)}.navds-modal__header-icon svg{display:inline;margin-right:var(--a-spacing-1);vertical-align:-.25rem}.navds-modal__label{color:var(--a-text-subtle);font-weight:600}.navds-modal__body{overflow:auto;overscroll-behavior:contain;padding:var(--a-spacing-6)}.navds-modal__header+.navds-modal__body{padding-top:var(--a-spacing-0)}.navds-modal__footer{display:flex;flex-flow:row-reverse wrap;gap:var(--a-spacing-4);padding:var(--a-spacing-4) var(--a-spacing-6) var(--a-spacing-6) var(--a-spacing-6)}.navds-modal__footer :nth-of-type(2){margin-left:auto}@-webkit-keyframes akselModalFadeIn{0%{opacity:0;-webkit-transform:translate3d(0,calc(5% + 4px),0);transform:translate3d(0,calc(5% + 4px),0)}50%{opacity:1}to{-webkit-transform:none;transform:none}}@keyframes akselModalFadeIn{0%{opacity:0;-webkit-transform:translate3d(0,calc(5% + 4px),0);transform:translate3d(0,calc(5% + 4px),0)}50%{opacity:1}to{-webkit-transform:none;transform:none}}@-webkit-keyframes akselModalBackdropFadeIn{0%{opacity:0}to{opacity:1}}@keyframes akselModalBackdropFadeIn{0%{opacity:0}to{opacity:1}}
1
+ .navds-modal__document-body{overflow:hidden}.navds-modal{background-color:var(--ac-modal-bg,var(--a-surface-default));border:none;border-radius:var(--a-border-radius-large);box-shadow:var(--a-shadow-xlarge);color:var(--a-text-default);max-height:100%;max-width:100%;padding:0;position:fixed}.navds-modal[open]{-webkit-animation:akselModalFadeIn .35s cubic-bezier(.15,1,.3,1);animation:akselModalFadeIn .35s cubic-bezier(.15,1,.3,1);display:flex;flex-direction:column}.navds-modal--polyfilled{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;left:0;margin:auto;right:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.navds-modal--polyfilled .navds-modal--polyfilled{overflow:auto}.navds-modal--polyfilled:not([open]){display:none}._dialog_overlay{bottom:0;left:0;position:fixed;right:0;top:0}.navds-modal--small{width:var(--ac-modal-width-small,450px)}.navds-modal--medium{width:var(--ac-modal-width-medium,700px)}@media (min-width:480px){.navds-modal{max-width:calc(100% - 6px - 2em)}.navds-modal--autowidth{max-width:min(700px,calc(100% - 6px - 2em))}}@media (min-height:480px){.navds-modal{max-height:calc(100% - 6px - 2em)}}.navds-modal::-webkit-backdrop{-webkit-animation:akselModalBackdropFadeIn .35s cubic-bezier(.15,1,.3,1);animation:akselModalBackdropFadeIn .35s cubic-bezier(.15,1,.3,1);background:var(--ac-modal-backdrop,rgba(2,20,49,.49))}.navds-modal::backdrop{-webkit-animation:akselModalBackdropFadeIn .35s cubic-bezier(.15,1,.3,1);animation:akselModalBackdropFadeIn .35s cubic-bezier(.15,1,.3,1);background:var(--ac-modal-backdrop,rgba(2,20,49,.49))}.navds-modal--polyfilled+.backdrop{background:var(--ac-modal-backdrop,rgba(2,20,49,.49));bottom:0;left:0;position:fixed;right:0;top:0}.navds-modal__button{float:right;margin-left:var(--a-spacing-4)}.navds-modal__header{padding:var(--a-spacing-6) var(--a-spacing-6) var(--a-spacing-4) var(--a-spacing-6)}.navds-modal__header-icon svg{display:inline;margin-right:var(--a-spacing-1);vertical-align:-.25rem}.navds-modal__label{color:var(--a-text-subtle);font-weight:600}.navds-modal__body{overflow:auto;overscroll-behavior:contain;padding:var(--a-spacing-6)}.navds-modal__header+.navds-modal__body{padding-top:var(--a-spacing-0)}.navds-modal__footer{display:flex;flex-flow:row-reverse wrap;gap:var(--a-spacing-4);padding:var(--a-spacing-4) var(--a-spacing-6) var(--a-spacing-6) var(--a-spacing-6)}.navds-modal__footer :nth-of-type(2){margin-left:auto}.navds-modal--polyfilled .navds-modal--polyfilled.navds-date__nested-modal{-webkit-animation:none;animation:none;max-height:100vh;max-width:100vw;min-width:-webkit-fit-content;min-width:-moz-fit-content;min-width:fit-content}@-webkit-keyframes akselModalFadeIn{0%{opacity:0;-webkit-transform:translate3d(0,calc(5% + 4px),0);transform:translate3d(0,calc(5% + 4px),0)}50%{opacity:1}to{-webkit-transform:none;transform:none}}@keyframes akselModalFadeIn{0%{opacity:0;-webkit-transform:translate3d(0,calc(5% + 4px),0);transform:translate3d(0,calc(5% + 4px),0)}50%{opacity:1}to{-webkit-transform:none;transform:none}}@-webkit-keyframes akselModalBackdropFadeIn{0%{opacity:0}to{opacity:1}}@keyframes akselModalBackdropFadeIn{0%{opacity:0}to{opacity:1}}
@@ -4413,12 +4413,17 @@ button.navds-internalheader__title:active,
4413
4413
 
4414
4414
  @media (min-width: 480px) {
4415
4415
  .navds-modal {
4416
- max-width: calc((100% - 6px) - 2em);
4417
- max-height: calc((100% - 6px) - 2em);
4416
+ max-width: calc(100% - 6px - 2em);
4418
4417
  }
4419
4418
 
4420
4419
  .navds-modal--autowidth {
4421
- max-width: min(700px, calc((100% - 6px) - 2em));
4420
+ max-width: min(700px, calc(100% - 6px - 2em));
4421
+ }
4422
+ }
4423
+
4424
+ @media (min-height: 480px) {
4425
+ .navds-modal {
4426
+ max-height: calc(100% - 6px - 2em);
4422
4427
  }
4423
4428
  }
4424
4429
 
@@ -4484,6 +4489,15 @@ button.navds-internalheader__title:active,
4484
4489
  margin-left: auto;
4485
4490
  }
4486
4491
 
4492
+ /* When Datepicker is used nested inside a Modal */
4493
+
4494
+ .navds-modal--polyfilled .navds-modal--polyfilled.navds-date__nested-modal {
4495
+ min-width: fit-content;
4496
+ max-width: 100vw;
4497
+ max-height: 100vh;
4498
+ animation: none;
4499
+ }
4500
+
4487
4501
  @keyframes akselModalFadeIn {
4488
4502
  from {
4489
4503
  opacity: 0;
@@ -4790,19 +4804,6 @@ button.navds-internalheader__title:active,
4790
4804
  width: fit-content;
4791
4805
  }
4792
4806
 
4793
- /* Focus layering */
4794
-
4795
- .navds-date__field-input:focus-visible,
4796
- .navds-date__field-button {
4797
- z-index: 1;
4798
- }
4799
-
4800
- @supports not selector(:focus-visible) {
4801
- .navds-date__field-input:focus {
4802
- z-index: 1;
4803
- }
4804
- }
4805
-
4806
4807
  .navds-date .rdp-day_selected,
4807
4808
  .navds-monthpicker__month--selected {
4808
4809
  color: var(--ac-date-selected-text, var(--a-text-on-action));
@@ -4843,11 +4844,11 @@ button.navds-internalheader__title:active,
4843
4844
  }
4844
4845
 
4845
4846
  .navds-date__field-input {
4846
- padding-right: var(--a-spacing-14);
4847
+ padding-right: var(--a-spacing-12);
4847
4848
  }
4848
4849
 
4849
4850
  .navds-form-field--small .navds-date__field-input {
4850
- padding-right: var(--a-spacing-10);
4851
+ padding-right: var(--a-spacing-8);
4851
4852
  }
4852
4853
 
4853
4854
  /* Error-handling */
@@ -4925,10 +4926,6 @@ button.navds-internalheader__title:active,
4925
4926
  pointer-events: none;
4926
4927
  }
4927
4928
 
4928
- .navds-date__popover:where(.navds-popover) {
4929
- border: none;
4930
- }
4931
-
4932
4929
  /* Readonly */
4933
4930
 
4934
4931
  .navds-date__field--readonly .navds-date__field-button {
@@ -4954,11 +4951,35 @@ button.navds-internalheader__title:active,
4954
4951
  margin: 0;
4955
4952
  }
4956
4953
 
4954
+ .navds-date__modal.navds-date {
4955
+ padding: 0;
4956
+ }
4957
+
4958
+ .navds-date__modal-body {
4959
+ display: flex;
4960
+ flex-direction: column;
4961
+ align-items: flex-end;
4962
+ padding: var(--a-spacing-4);
4963
+ gap: var(--a-spacing-2);
4964
+ }
4965
+
4966
+ .navds-date__modal-body > .navds-date {
4967
+ padding: 0;
4968
+ }
4969
+
4970
+ .navds-date__popover:where(.navds-popover) {
4971
+ border: none;
4972
+ }
4973
+
4957
4974
  @media (min-width: 480px) {
4958
4975
  .navds-date {
4959
4976
  padding: var(--a-spacing-5) var(--a-spacing-4);
4960
4977
  }
4961
4978
 
4979
+ .navds-date__modal-body {
4980
+ padding: var(--a-spacing-6);
4981
+ }
4982
+
4962
4983
  .navds-date__caption {
4963
4984
  gap: var(--a-spacing-2);
4964
4985
  }