@navikt/ds-css 7.3.1 → 7.4.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.
Files changed (71) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/darkside/accordion.darkside.css +198 -0
  3. package/darkside/action-menu.darkside.css +227 -0
  4. package/darkside/alert.darkside.css +113 -0
  5. package/darkside/baseline/theme.darkside.css +4 -2
  6. package/darkside/button.darkside.css +318 -4
  7. package/darkside/chat.darkside.css +120 -0
  8. package/darkside/chips.darkside.css +234 -0
  9. package/darkside/copybutton.darkside.css +226 -0
  10. package/darkside/date.darkside.css +344 -0
  11. package/darkside/dropdown.darkside.css +91 -0
  12. package/darkside/expansioncard.darkside.css +235 -0
  13. package/darkside/form/combobox.darkside.css +441 -0
  14. package/darkside/form/confirmation-panel.darkside.css +53 -0
  15. package/darkside/form/error-summary.darkside.css +55 -0
  16. package/darkside/form/fieldset.darkside.css +51 -0
  17. package/darkside/form/file-upload.darkside.css +230 -0
  18. package/darkside/form/form-progress.darkside.css +52 -0
  19. package/darkside/form/form-summary.darkside.css +78 -0
  20. package/darkside/form/form.darkside.css +61 -0
  21. package/darkside/form/index.css +16 -0
  22. package/darkside/form/radio-checkbox.darkside.css +356 -0
  23. package/darkside/form/search.darkside.css +228 -0
  24. package/darkside/form/select.darkside.css +115 -0
  25. package/darkside/form/switch.darkside.css +269 -0
  26. package/darkside/form/text-field.darkside.css +112 -0
  27. package/darkside/form/textarea.darkside.css +144 -0
  28. package/darkside/guide-panel.darkside.css +96 -0
  29. package/darkside/help-text.darkside.css +85 -0
  30. package/darkside/index copy.css +37 -0
  31. package/darkside/index.css +36 -1
  32. package/darkside/internalheader.darkside.css +105 -0
  33. package/darkside/link-panel.darkside.css +47 -0
  34. package/darkside/link.darkside.css +79 -0
  35. package/darkside/list.darkside.css +85 -0
  36. package/darkside/loader.darkside.css +119 -0
  37. package/darkside/modal.darkside.css +209 -0
  38. package/darkside/pagination.darkside.css +73 -0
  39. package/darkside/panel.darkside.css +10 -0
  40. package/darkside/popover.darkside.css +84 -0
  41. package/darkside/primitives/base.darkside.css +809 -0
  42. package/darkside/primitives/bleed.darkside.css +103 -0
  43. package/darkside/primitives/box.darkside.css +66 -0
  44. package/darkside/primitives/hgrid.darkside.css +80 -0
  45. package/darkside/primitives/index.css +36 -0
  46. package/darkside/primitives/page.darkside.css +63 -0
  47. package/darkside/primitives/responsive.darkside.css +59 -0
  48. package/darkside/primitives/stack.darkside.css +155 -0
  49. package/darkside/progress-bar.darkside.css +108 -0
  50. package/darkside/read-more.darkside.css +91 -0
  51. package/darkside/skeleton.darkside.css +67 -0
  52. package/darkside/stepper.darkside.css +308 -0
  53. package/darkside/table.darkside.css +286 -0
  54. package/darkside/tabs.darkside.css +154 -0
  55. package/darkside/tag.darkside.css +194 -0
  56. package/darkside/timeline.darkside.css +449 -0
  57. package/darkside/toggle-group.darkside.css +181 -0
  58. package/darkside/tooltip.darkside.css +81 -0
  59. package/darkside/typography.darkside.css +253 -0
  60. package/dist/component/form.css +4 -1
  61. package/dist/component/form.min.css +1 -1
  62. package/dist/component/index.css +6 -2
  63. package/dist/component/index.min.css +2 -2
  64. package/dist/components.css +6 -2
  65. package/dist/components.min.css +2 -2
  66. package/dist/global/tokens.css +1 -1
  67. package/dist/global/tokens.min.css +1 -1
  68. package/dist/index.css +6 -2
  69. package/dist/index.min.css +2 -2
  70. package/form/combobox.css +5 -1
  71. package/package.json +2 -2
@@ -0,0 +1,209 @@
1
+ .navds-modal__document-body {
2
+ overflow: hidden;
3
+ }
4
+
5
+ .navds-modal {
6
+ --__ac-modal-bg: var(--ac-modal-bg, var(--a-surface-default));
7
+
8
+ background-color: var(--__ac-modal-bg);
9
+ border: none;
10
+ border-radius: var(--a-border-radius-large);
11
+ box-shadow: var(--a-shadow-xlarge);
12
+ padding: 0;
13
+ position: fixed;
14
+ max-height: 100%;
15
+ max-width: 100%;
16
+ color: var(--a-text-default);
17
+ }
18
+
19
+ .navds-modal[open] {
20
+ display: flex;
21
+ flex-direction: column;
22
+ animation: akselModalFadeIn 0.35s cubic-bezier(0.15, 1, 0.3, 1);
23
+ }
24
+
25
+ .navds-modal--polyfilled {
26
+ top: 50%;
27
+ transform: translate(0, -50%);
28
+
29
+ /* From polyfill (dialog-polyfill/dist/dialog-polyfill.css): */
30
+ left: 0;
31
+ right: 0;
32
+ width: fit-content;
33
+ height: fit-content;
34
+ margin: auto;
35
+ }
36
+
37
+ .navds-modal--polyfilled .navds-modal--polyfilled {
38
+ overflow: auto;
39
+ }
40
+
41
+ .navds-modal--polyfilled:not([open]) {
42
+ display: none; /* from polyfill */
43
+ }
44
+
45
+ ._dialog_overlay {
46
+ /* From polyfill */
47
+ position: fixed;
48
+ top: 0;
49
+ bottom: 0;
50
+ right: 0;
51
+ /* stylelint-disable-next-line declaration-block-no-redundant-longhand-properties */
52
+ left: 0;
53
+ }
54
+
55
+ .navds-modal--small {
56
+ width: var(--ac-modal-width-small, 450px);
57
+ }
58
+
59
+ .navds-modal--medium {
60
+ width: var(--ac-modal-width-medium, 700px);
61
+ }
62
+
63
+ @media (min-width: 480px) {
64
+ .navds-modal {
65
+ max-width: calc(100% - 2em);
66
+ }
67
+
68
+ .navds-modal--autowidth {
69
+ max-width: min(700px, calc(100% - 2em));
70
+ }
71
+ }
72
+
73
+ @media (min-height: 480px) {
74
+ .navds-modal {
75
+ max-height: calc(100% - 2em);
76
+ }
77
+
78
+ .navds-modal--top {
79
+ margin-top: 2em;
80
+ max-height: calc(100% - 4em);
81
+ }
82
+ }
83
+
84
+ .navds-modal::backdrop {
85
+ /*
86
+ * Cannot use --a-surface-backdrop because ::backdrop does not inherit from anything but itself.
87
+ * But consumers can do `::backdrop { --ac-modal-backdrop: white; }`
88
+ * We can add ::backdrop to tokens.css when we remove the polyfill.
89
+ */
90
+ background: var(--ac-modal-backdrop, rgb(2 20 49 / 0.49));
91
+ animation: akselModalBackdropFadeIn 0.35s cubic-bezier(0.15, 1, 0.3, 1);
92
+ }
93
+
94
+ .navds-modal--polyfilled + .backdrop /* Cannot be combined with ::backdrop selector */ {
95
+ background: var(--ac-modal-backdrop, rgb(2 20 49 / 0.49));
96
+
97
+ /* From polyfill: */
98
+ position: fixed;
99
+ top: 0;
100
+ bottom: 0;
101
+ right: 0;
102
+ /* stylelint-disable-next-line declaration-block-no-redundant-longhand-properties */
103
+ left: 0;
104
+ }
105
+
106
+ .navds-modal__button {
107
+ margin-left: var(--a-spacing-4);
108
+ float: right;
109
+ }
110
+
111
+ .navds-modal__header {
112
+ padding: var(--a-spacing-6) var(--a-spacing-6) var(--a-spacing-4) var(--a-spacing-6);
113
+ }
114
+
115
+ .navds-modal--small .navds-modal__header {
116
+ padding: var(--a-spacing-4) var(--a-spacing-4) var(--a-spacing-3) var(--a-spacing-4);
117
+ }
118
+
119
+ .navds-modal__header-icon svg {
120
+ display: inline;
121
+ vertical-align: -0.25rem;
122
+ margin-right: var(--a-spacing-1);
123
+ }
124
+
125
+ .navds-modal__label {
126
+ font-weight: 600;
127
+ color: var(--a-text-subtle);
128
+ }
129
+
130
+ .navds-modal__body {
131
+ padding: var(--a-spacing-6);
132
+ overflow: auto;
133
+ overscroll-behavior: contain;
134
+ position: relative; /* Needed to make sr-only elements position correctly - see Storybook */
135
+ background:
136
+ linear-gradient(var(--__ac-modal-bg) 30%, transparent) top,
137
+ linear-gradient(transparent, var(--__ac-modal-bg) 60%) bottom,
138
+ radial-gradient(farthest-side at 50% 0, rgba(0 0 0 / 0.3), transparent) top,
139
+ radial-gradient(farthest-side at 50% 100%, rgba(0 0 0 / 0.3), transparent) bottom;
140
+ background-size:
141
+ 100% 40px,
142
+ 100% 50px,
143
+ 100% 16px,
144
+ 100% 16px;
145
+ background-attachment: local, local, scroll, scroll;
146
+ background-repeat: no-repeat;
147
+ }
148
+
149
+ .navds-modal--small .navds-modal__body {
150
+ padding: var(--a-spacing-2) var(--a-spacing-4) var(--a-spacing-4);
151
+ }
152
+
153
+ .navds-modal__header + .navds-modal__body {
154
+ padding-top: var(--a-spacing-0);
155
+ }
156
+
157
+ .navds-modal__footer {
158
+ display: flex;
159
+ flex-flow: row-reverse wrap;
160
+ gap: var(--a-spacing-4);
161
+ padding: var(--a-spacing-4) var(--a-spacing-6) var(--a-spacing-6) var(--a-spacing-6);
162
+ }
163
+
164
+ .navds-modal--small .navds-modal__footer {
165
+ padding: var(--a-spacing-4);
166
+ }
167
+
168
+ .navds-modal__footer :nth-of-type(2) {
169
+ margin-left: auto;
170
+ }
171
+
172
+ /* When Datepicker is used nested inside a Modal */
173
+ .navds-modal--polyfilled .navds-modal--polyfilled.navds-date__nested-modal {
174
+ min-width: fit-content;
175
+ max-width: 100vw;
176
+ max-height: 100vh;
177
+ animation: none;
178
+ }
179
+
180
+ @keyframes akselModalFadeIn {
181
+ 0% {
182
+ opacity: 0.0001; /* Safari will not set focus inside the modal when it opens if we set this to 0 */
183
+ transform: translate3d(0, calc(5% + 4px), 0);
184
+ }
185
+
186
+ 50% {
187
+ opacity: 1;
188
+ }
189
+
190
+ 100% {
191
+ transform: none;
192
+ }
193
+ }
194
+
195
+ @keyframes akselModalBackdropFadeIn {
196
+ from {
197
+ opacity: 0;
198
+ }
199
+
200
+ to {
201
+ opacity: 1;
202
+ }
203
+ }
204
+
205
+ @media (forced-colors: active) {
206
+ .navds-modal {
207
+ outline: 2px solid transparent;
208
+ }
209
+ }
@@ -0,0 +1,73 @@
1
+ .navds-pagination {
2
+ position: relative;
3
+ }
4
+
5
+ .navds-pagination__list {
6
+ margin: 0;
7
+ padding: 0;
8
+ list-style: none;
9
+ display: flex;
10
+ gap: var(--a-spacing-3);
11
+ }
12
+
13
+ .navds-pagination__ellipsis {
14
+ display: flex;
15
+ align-items: center;
16
+ justify-content: center;
17
+ width: var(--a-spacing-12);
18
+ cursor: default;
19
+ }
20
+
21
+ .navds-pagination--small .navds-pagination__ellipsis {
22
+ width: var(--a-spacing-8);
23
+ }
24
+
25
+ .navds-pagination--xsmall .navds-pagination__ellipsis {
26
+ width: var(--a-spacing-6);
27
+ }
28
+
29
+ .navds-pagination__item {
30
+ color: var(--ac-pagination-text, var(--a-text-default));
31
+ }
32
+
33
+ .navds-pagination--medium .navds-pagination__item {
34
+ border-radius: var(--a-border-radius-medium);
35
+ }
36
+
37
+ .navds-pagination__item[aria-current="true"] {
38
+ background-color: var(--ac-pagination-selected-bg, var(--a-surface-action-selected));
39
+ color: var(--ac-pagination-selected-text, var(--a-text-on-action));
40
+ }
41
+
42
+ .navds-pagination__item[aria-current="true"]:focus-visible {
43
+ box-shadow:
44
+ inset 0 0 0 1px var(--a-surface-default),
45
+ var(--a-shadow-focus);
46
+ }
47
+
48
+ @supports not selector(:focus-visible) {
49
+ .navds-pagination__item[aria-current="true"]:focus {
50
+ box-shadow:
51
+ inset 0 0 0 1px var(--a-surface-default),
52
+ var(--a-shadow-focus);
53
+ }
54
+ }
55
+
56
+ .navds-pagination__prev-next {
57
+ display: flex;
58
+ align-items: center;
59
+ gap: var(--a-spacing-1);
60
+ }
61
+
62
+ .navds-pagination--small .navds-pagination__prev-next:where(.navds-pagination--prev-next--with-text) {
63
+ padding-inline: var(--a-spacing-1-alt);
64
+ }
65
+
66
+ .navds-pagination--xsmall .navds-pagination__prev-next:where(.navds-pagination--prev-next--with-text) {
67
+ padding-left: var(--a-spacing-05);
68
+ padding-right: var(--a-spacing-05);
69
+ }
70
+
71
+ .navds-pagination--invisible {
72
+ visibility: hidden;
73
+ }
@@ -0,0 +1,10 @@
1
+ .navds-panel {
2
+ background-color: var(--ac-panel-bg, var(--a-surface-default));
3
+ padding: var(--a-spacing-4);
4
+ border-radius: var(--a-border-radius-small);
5
+ border: 1px solid transparent;
6
+ }
7
+
8
+ .navds-panel--border {
9
+ border-color: var(--ac-panel-border, var(--a-border-default));
10
+ }
@@ -0,0 +1,84 @@
1
+ .navds-popover {
2
+ z-index: var(--a-z-index-popover);
3
+ background-color: var(--ac-popover-bg, var(--a-surface-default));
4
+ box-shadow: var(--a-shadow-medium);
5
+ border: 1px solid;
6
+ border-color: var(--ac-popover-border, var(--a-border-default));
7
+ border-radius: var(--a-border-radius-large);
8
+ max-width: calc(100vw - var(--a-spacing-6));
9
+ }
10
+
11
+ .navds-popover__content {
12
+ padding: var(--a-spacing-4);
13
+ }
14
+
15
+ .navds-popover--hidden {
16
+ display: none;
17
+ }
18
+
19
+ .navds-popover:focus-visible {
20
+ outline: none;
21
+ box-shadow: var(--a-shadow-focus);
22
+ }
23
+
24
+ @supports not selector(:focus-visible) {
25
+ .navds-popover:focus {
26
+ outline: none;
27
+ box-shadow: var(--a-shadow-focus);
28
+ }
29
+ }
30
+
31
+ .navds-popover__arrow {
32
+ position: absolute;
33
+ z-index: -1;
34
+ transform: rotate(45deg);
35
+ background-color: var(--ac-popover-bg, var(--a-surface-default));
36
+ border: 1px solid;
37
+ border-color: var(--ac-popover-border, var(--a-border-default));
38
+ width: 1rem;
39
+ height: 1rem;
40
+ }
41
+
42
+ .navds-popover[data-placement^="top"] > .navds-popover__arrow {
43
+ border-left-color: transparent;
44
+ border-top-color: transparent;
45
+ }
46
+
47
+ /* prettier-ignore */
48
+ .navds-popover[data-placement^="bottom"] > .navds-popover__arrow {
49
+ border-bottom-color: transparent;
50
+ border-right-color: transparent;
51
+ }
52
+
53
+ .navds-popover[data-placement^="left"] > .navds-popover__arrow {
54
+ border-left-color: transparent;
55
+ border-bottom-color: transparent;
56
+ }
57
+
58
+ .navds-popover[data-placement^="right"] > .navds-popover__arrow {
59
+ border-right-color: transparent;
60
+ border-top-color: transparent;
61
+ }
62
+
63
+ @media (forced-colors: active) {
64
+ .navds-popover[data-placement^="top"] > .navds-popover__arrow {
65
+ border-left-color: canvas;
66
+ border-top-color: canvas;
67
+ }
68
+
69
+ /* prettier-ignore */
70
+ .navds-popover[data-placement^="bottom"] > .navds-popover__arrow {
71
+ border-bottom-color: canvas;
72
+ border-right-color: canvas;
73
+ }
74
+
75
+ .navds-popover[data-placement^="left"] > .navds-popover__arrow {
76
+ border-left-color: canvas;
77
+ border-bottom-color: canvas;
78
+ }
79
+
80
+ .navds-popover[data-placement^="right"] > .navds-popover__arrow {
81
+ border-right-color: canvas;
82
+ border-top-color: canvas;
83
+ }
84
+ }