@navikt/ds-css 1.3.8 → 1.3.9

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/button.css CHANGED
@@ -324,7 +324,7 @@
324
324
  cursor: not-allowed;
325
325
  }
326
326
 
327
- .navds-button:disabled:not(.navds-button--loading) {
327
+ .navds-button:where(:disabled:not(.navds-button--loading)) {
328
328
  opacity: 0.3;
329
329
  }
330
330
 
package/date.css ADDED
@@ -0,0 +1,202 @@
1
+ .navds-date {
2
+ padding: var(--navds-spacing-3);
3
+ }
4
+
5
+ .navds-date .rdp-day_range_middle.rdp-day_disabled {
6
+ color: var(--navds-global-color-white);
7
+ background: var(--navds-global-color-deepblue-500);
8
+ }
9
+
10
+ .navds-date .rdp-month,
11
+ .navds-date.rdp-month {
12
+ display: grid;
13
+ gap: var(--navds-spacing-5);
14
+ }
15
+
16
+ .navds-date__caption-label {
17
+ text-transform: capitalize;
18
+ }
19
+
20
+ .navds-date .rdp-head_cell {
21
+ text-transform: capitalize;
22
+ font-size: var(--navds-font-size-small);
23
+ }
24
+
25
+ .navds-date .rdp-weeknumber {
26
+ color: var(--navds-global-color-white);
27
+ background: var(--navds-global-color-gray-800);
28
+ font-size: var(--navds-font-size-small);
29
+ display: flex;
30
+ justify-content: center;
31
+ align-items: center;
32
+ padding: 0.125rem var(--navds-spacing-1);
33
+ border-radius: var(--navds-border-radius-small);
34
+ }
35
+
36
+ .navds-date__caption-dropdown {
37
+ display: flex;
38
+ justify-content: space-between;
39
+ gap: var(--navds-spacing-2);
40
+ align-items: center;
41
+ }
42
+
43
+ .navds-date__caption__month-wrapper {
44
+ display: flex;
45
+ justify-content: center;
46
+ gap: var(--navds-spacing-2);
47
+ align-items: center;
48
+ }
49
+
50
+ .navds-date__caption__month .navds-select__container select {
51
+ text-transform: capitalize;
52
+ }
53
+
54
+ .navds-date .rdp-button {
55
+ all: unset;
56
+ width: 2.5rem;
57
+ height: 2.5rem;
58
+ text-align: center;
59
+ border-radius: var(--navds-border-radius-medium);
60
+ }
61
+
62
+ .navds-date .rdp-day_range_start {
63
+ border-radius: 12px 2px 2px 12px;
64
+ border-radius: var(--navds-border-radius-xlarge)
65
+ var(--navds-border-radius-small) var(--navds-border-radius-small)
66
+ var(--navds-border-radius-xlarge);
67
+ }
68
+
69
+ .navds-date .rdp-day_range_end:not(.rdp-day_range_start) {
70
+ border-radius: var(--navds-border-radius-small)
71
+ var(--navds-border-radius-xlarge) var(--navds-border-radius-xlarge)
72
+ var(--navds-border-radius-small);
73
+ }
74
+
75
+ .navds-date .rdp-day_range_start.rdp-day_range_end {
76
+ border-radius: var(--navds-border-radius-xlarge);
77
+ }
78
+
79
+ .navds-date .rdp-button:not(.rdp-day_selected):not([disabled]):focus,
80
+ .navds-date
81
+ .navds-date__month-button:not(.rdp-day_selected):not([disabled]):focus {
82
+ box-shadow: var(--navds-shadow-focus);
83
+ }
84
+
85
+ .navds-date .rdp-button.rdp-day_selected:not([disabled]):focus,
86
+ .navds-date .navds-date__month-button.rdp-day_selected:not([disabled]):focus {
87
+ box-shadow: inset 0 0 0 1px var(--navds-global-color-white),
88
+ 0 0 0 3px var(--navds-global-color-blue-800);
89
+ }
90
+
91
+ /* Monthpicker */
92
+ .navds-date__month-button {
93
+ all: unset;
94
+ text-align: center;
95
+ width: 3rem;
96
+ height: 2.75rem;
97
+ text-transform: capitalize;
98
+ border-radius: var(--navds-border-radius-medium);
99
+ cursor: pointer;
100
+ }
101
+
102
+ .navds-date__month-button:focus,
103
+ .navds-monthpicker__caption-button:focus {
104
+ box-shadow: var(--navds-shadow-focus);
105
+ z-index: 1;
106
+ }
107
+
108
+ .navds-date__year-label {
109
+ display: flex;
110
+ align-items: center;
111
+ }
112
+
113
+ .navds-date__wrapper,
114
+ .navds-date__standalone-wrapper {
115
+ height: fit-content;
116
+ width: fit-content;
117
+ }
118
+
119
+ .navds-date .navds-date__field {
120
+ display: flex;
121
+ flex-direction: column;
122
+ width: 100%;
123
+ position: relative;
124
+ }
125
+
126
+ .navds-date__field-wrapper {
127
+ display: inline-flex;
128
+ align-items: center;
129
+ position: relative;
130
+ width: fit-content;
131
+ }
132
+
133
+ /* Focus layering */
134
+ .navds-date__field-input:focus,
135
+ .navds-date__field-button {
136
+ z-index: 1;
137
+ }
138
+
139
+ .navds-date .rdp-day_selected,
140
+ .navds-monthpicker__month--selected {
141
+ color: var(--navds-global-color-white);
142
+ background: var(--navds-global-color-deepblue-500);
143
+ }
144
+
145
+ .navds-date .rdp-day_disabled {
146
+ opacity: 0.7;
147
+ cursor: not-allowed;
148
+ }
149
+
150
+ .navds-date .rdp-button:where(:not(.rdp-day_selected):not([disabled])):hover,
151
+ .navds-date__month-button:where(:not(.rdp-day_selected):not([disabled])):hover {
152
+ background: var(--navds-global-color-blue-50);
153
+ cursor: pointer;
154
+ }
155
+
156
+ .navds-date .rdp-day_today {
157
+ box-shadow: 0 0 0 1px var(--navds-global-color-deepblue-500);
158
+ }
159
+
160
+ .navds-date__caption {
161
+ display: flex;
162
+ justify-content: space-between;
163
+ align-items: center;
164
+ gap: var(--navds-spacing-2);
165
+ }
166
+
167
+ .navds-date__caption-button {
168
+ color: var(--navds-global-color-gray-900);
169
+ }
170
+
171
+ .navds-date__field-input {
172
+ padding-right: var(--navds-spacing-12);
173
+ }
174
+
175
+ .navds-form-field--small .navds-date__field-input {
176
+ padding-right: var(--navds-spacing-8);
177
+ }
178
+
179
+ .navds-date__field-button {
180
+ position: absolute;
181
+ right: var(--navds-spacing-2);
182
+ top: 50%;
183
+ transform: translateY(-50%);
184
+ }
185
+
186
+ .navds-form-field--small .navds-date__field-button {
187
+ right: var(--navds-spacing-2);
188
+ height: 1.5rem;
189
+ width: 1.5rem;
190
+ }
191
+
192
+ .navds-form-field--small .navds-date__field-button svg {
193
+ font-size: var(--navds-font-size-medium);
194
+ }
195
+
196
+ .navds-form-field--disabled .navds-date__field-button {
197
+ opacity: 1;
198
+ }
199
+
200
+ .navds-date__caption__year {
201
+ width: 5rem;
202
+ }