@navikt/ds-css 1.2.4 → 1.3.0-alpha.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/datepicker.css +201 -0
- package/dist/index.css +225 -2
- package/index.css +2 -0
- package/monthpicker.css +63 -0
- package/package.json +3 -3
package/datepicker.css
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
/* :root,
|
|
2
|
+
[data-theme="light"] {
|
|
3
|
+
--navds-date-color: #123123;
|
|
4
|
+
} */
|
|
5
|
+
|
|
6
|
+
.navds-date__wrapper {
|
|
7
|
+
height: fit-content;
|
|
8
|
+
width: fit-content;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/* Datepicker.Input */
|
|
12
|
+
.navds-date__field {
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
width: 100%;
|
|
16
|
+
position: relative;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.navds-date__field-wrapper {
|
|
20
|
+
display: inline-flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
position: relative;
|
|
23
|
+
width: fit-content;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.navds-date__field-input {
|
|
27
|
+
padding-right: var(--navds-spacing-12);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.navds-form-field--small .navds-date__field-input {
|
|
31
|
+
padding-right: var(--navds-spacing-8);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.navds-date__field-button {
|
|
35
|
+
position: absolute;
|
|
36
|
+
right: 0.5rem;
|
|
37
|
+
top: 50%;
|
|
38
|
+
transform: translateY(-50%);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.navds-form-field--small .navds-date__field-button {
|
|
42
|
+
right: 0.5rem;
|
|
43
|
+
height: 24px;
|
|
44
|
+
width: 24px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.navds-form-field--small .navds-date__field-button svg {
|
|
48
|
+
font-size: 16px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* Focus layering */
|
|
52
|
+
.navds-date__field-input:focus,
|
|
53
|
+
.navds-date__field-button {
|
|
54
|
+
z-index: 1;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* Caption */
|
|
58
|
+
.navds-date__caption-button {
|
|
59
|
+
width: 3rem;
|
|
60
|
+
height: 3rem;
|
|
61
|
+
background: none;
|
|
62
|
+
border: none;
|
|
63
|
+
cursor: pointer;
|
|
64
|
+
font-size: 24px;
|
|
65
|
+
display: flex;
|
|
66
|
+
justify-content: center;
|
|
67
|
+
align-items: center;
|
|
68
|
+
border-radius: 2px;
|
|
69
|
+
color: var(--navds-global-color-gray-900);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.navds-date__caption-button:hover {
|
|
73
|
+
background-color: var(
|
|
74
|
+
--navds-semantic-color-interaction-primary-hover-subtle
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.navds-date__caption-button:focus {
|
|
79
|
+
box-shadow: var(--navds-shadow-focus);
|
|
80
|
+
outline: none;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.navds-date {
|
|
84
|
+
padding: var(--navds-spacing-3);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.navds-date__caption {
|
|
88
|
+
display: flex;
|
|
89
|
+
justify-content: space-between;
|
|
90
|
+
align-items: center;
|
|
91
|
+
gap: 0.5rem;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.navds-date__caption-label {
|
|
95
|
+
text-transform: capitalize;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.navds-date__caption-dropdown {
|
|
99
|
+
display: flex;
|
|
100
|
+
justify-content: space-between;
|
|
101
|
+
gap: 0.5rem;
|
|
102
|
+
align-items: center;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.navds-date__caption__month-wrapper {
|
|
106
|
+
display: flex;
|
|
107
|
+
justify-content: center;
|
|
108
|
+
gap: 0.5rem;
|
|
109
|
+
align-items: center;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.navds-date__caption__month .navds-select__container select {
|
|
113
|
+
text-transform: capitalize;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.navds-date .rdp-month {
|
|
117
|
+
display: flex;
|
|
118
|
+
flex-direction: column;
|
|
119
|
+
gap: var(--navds-spacing-5);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.navds-date .rdp-head_cell {
|
|
123
|
+
text-transform: capitalize;
|
|
124
|
+
font-size: 14px;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.navds-date .rdp-button {
|
|
128
|
+
all: unset;
|
|
129
|
+
width: 2.5rem;
|
|
130
|
+
height: 2.5rem;
|
|
131
|
+
text-align: center;
|
|
132
|
+
border-radius: 4px;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.navds-date .rdp-button:not(.rdp-day_selected):not([disabled]):hover {
|
|
136
|
+
background: var(--navds-semantic-color-interaction-primary-hover-subtle);
|
|
137
|
+
cursor: pointer;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.navds-date .rdp-button:not(.rdp-day_selected):not([disabled]):focus {
|
|
141
|
+
box-shadow: var(--navds-shadow-focus);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.navds-date .rdp-button.rdp-day_selected:not([disabled]):focus {
|
|
145
|
+
box-shadow: inset 0 0 0 1px white,
|
|
146
|
+
0 0 0 3px var(--navds-global-color-blue-800);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.navds-date .rdp-day_today {
|
|
150
|
+
box-shadow: 0 0 0 1px var(--navds-global-color-deepblue-500);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.navds-date .rdp-day_selected {
|
|
154
|
+
color: var(--navds-semantic-color-text-inverted);
|
|
155
|
+
background: var(--navds-global-color-deepblue-500);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/* Design uses image as background, so created bg with css. Need to get a token for the stripes. */
|
|
159
|
+
.navds-date .rdp-day_disabled {
|
|
160
|
+
color: var(--navds-semantic-color-text-muted);
|
|
161
|
+
background-image: linear-gradient(
|
|
162
|
+
135deg,
|
|
163
|
+
#e8e8e8 10%,
|
|
164
|
+
var(--navds-global-color-white) 10%,
|
|
165
|
+
var(--navds-global-color-white) 50%,
|
|
166
|
+
#e8e8e8 50%,
|
|
167
|
+
#e8e8e8 60%,
|
|
168
|
+
var(--navds-global-color-white) 60%,
|
|
169
|
+
var(--navds-global-color-white) 100%
|
|
170
|
+
);
|
|
171
|
+
background-size: 7.07px 7.07px;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.navds-date .rdp-day_range_middle.rdp-day_disabled {
|
|
175
|
+
color: var(--navds-semantic-color-text-inverted);
|
|
176
|
+
background: var(--navds-global-color-deepblue-500);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/* Left-side weeknumbers */
|
|
180
|
+
.navds-date .rdp-weeknumber {
|
|
181
|
+
color: white;
|
|
182
|
+
background: var(--navds-global-color-gray-800);
|
|
183
|
+
font-size: 14px;
|
|
184
|
+
display: flex;
|
|
185
|
+
justify-content: center;
|
|
186
|
+
align-items: center;
|
|
187
|
+
padding: 0.125rem 0.25rem;
|
|
188
|
+
border-radius: 2px;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.navds-date .rdp-day_range_start {
|
|
192
|
+
border-radius: 12px 2px 2px 12px;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.navds-date .rdp-day_range_end:not(.rdp-day_range_start) {
|
|
196
|
+
border-radius: 2px 12px 12px 2px;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.navds-date .rdp-day_range_start.rdp-day_range_end {
|
|
200
|
+
border-radius: 12px;
|
|
201
|
+
}
|