@trackunit/css-core 1.3.22 → 1.3.28

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/css-core",
3
- "version": "1.3.22",
3
+ "version": "1.3.28",
4
4
  "main": "src/lib/core.css",
5
5
  "repository": "https://github.com/Trackunit/manager",
6
6
  "license": "SEE LICENSE IN LICENSE.txt",
@@ -1,368 +1,306 @@
1
- :root {
2
- --rdp-cell-size: 40px;
3
- --rdp-accent-color: #0000ff;
4
- --rdp-background-color: #e7edff;
5
- /* Switch to dark colors for dark themes */
6
- --rdp-accent-color-dark: #3003e1;
7
- --rdp-background-color-dark: #180270;
8
- /* Outline border for focused elements */
9
- --rdp-outline: 2px solid var(--rdp-accent-color);
10
- /* Outline border for focused and selected elements */
11
- --rdp-outline-selected: 2px solid rgba(0, 0, 0, 0.75);
12
- }
13
-
14
- /* Hide elements for devices that are not screen readers */
15
- .rdp-vhidden {
1
+ /* Variables declaration */
2
+ /* prettier-ignore */
3
+ .rdp-root {
4
+ --rdp-accent-color: rgb(var(--color-primary-600) / var(--tw-bg-opacity)); /* The accent color used for selected days and UI elements. */
5
+ --rdp-accent-background-color: rgb(var(--color-primary-200) / var(--tw-bg-opacity)); /* The accent background color used for selected days and UI elements. */
6
+
7
+ --rdp-day-height: 44px; /* The height of the day cells. */
8
+ --rdp-day-width: 44px; /* The width of the day cells. */
9
+
10
+ --rdp-day_button-border-radius: 100%; /* The border radius of the day cells. */
11
+ --rdp-day_button-border: 2px solid transparent; /* The border of the day cells. */
12
+ --rdp-day_button-height: 42px; /* The height of the day cells. */
13
+ --rdp-day_button-width: 42px; /* The width of the day cells. */
14
+
15
+ --rdp-selected-border: 2px solid var(--rdp-accent-color); /* The border of the selected days. */
16
+ --rdp-disabled-opacity: 0.5; /* The opacity of the disabled days. */
17
+ --rdp-outside-opacity: 0.75; /* The opacity of the days outside the current month. */
18
+ --rdp-today-color: var(--rdp-accent-color); /* The color of the today's date. */
19
+
20
+ --rdp-dropdown-gap: 0.5rem;/* The gap between the dropdowns used in the month captons. */
21
+
22
+ --rdp-months-gap: 2rem; /* The gap between the months in the multi-month view. */
23
+
24
+ --rdp-nav_button-disabled-opacity: 0.5; /* The opacity of the disabled navigation buttons. */
25
+ --rdp-nav_button-height: 2.25rem; /* The height of the navigation buttons. */
26
+ --rdp-nav_button-width: 2.25rem; /* The width of the navigation buttons. */
27
+ --rdp-nav-height: 2.75rem; /* The height of the navigation bar. */
28
+
29
+ --rdp-range_middle-background-color: var(--rdp-accent-background-color); /* The color of the background for days in the middle of a range. */
30
+ --rdp-range_middle-color: inherit;/* The color of the range text. */
31
+
32
+ --rdp-range_start-color: white; /* The color of the range text. */
33
+ --rdp-range_start-background: linear-gradient(var(--rdp-gradient-direction), transparent 50%, var(--rdp-range_middle-background-color) 50%); /* Used for the background of the start of the selected range. */
34
+ --rdp-range_start-date-background-color: var(--rdp-accent-color); /* The background color of the date when at the start of the selected range. */
35
+
36
+ --rdp-range_end-background: linear-gradient(var(--rdp-gradient-direction), var(--rdp-range_middle-background-color) 50%, transparent 50%); /* Used for the background of the end of the selected range. */
37
+ --rdp-range_end-color: white;/* The color of the range text. */
38
+ --rdp-range_end-date-background-color: var(--rdp-accent-color); /* The background color of the date when at the end of the selected range. */
39
+
40
+ --rdp-week_number-border-radius: 100%; /* The border radius of the week number. */
41
+ --rdp-week_number-border: 2px solid transparent; /* The border of the week number. */
42
+
43
+ --rdp-week_number-height: var(--rdp-day-height); /* The height of the week number cells. */
44
+ --rdp-week_number-opacity: 0.75; /* The opacity of the week number. */
45
+ --rdp-week_number-width: var(--rdp-day-width); /* The width of the week number cells. */
46
+ --rdp-weeknumber-text-align: center; /* The text alignment of the weekday cells. */
47
+
48
+ --rdp-weekday-opacity: 0.75; /* The opacity of the weekday. */
49
+ --rdp-weekday-padding: 0.5rem 0rem; /* The padding of the weekday. */
50
+ --rdp-weekday-text-align: center; /* The text alignment of the weekday cells. */
51
+
52
+ --rdp-gradient-direction: 90deg;
53
+ }
54
+
55
+ .rdp-root[dir="rtl"] {
56
+ --rdp-gradient-direction: -90deg;
57
+ }
58
+
59
+ .rdp-root[data-broadcast-calendar="true"] {
60
+ --rdp-outside-opacity: unset;
61
+ }
62
+
63
+ /* Root of the component. */
64
+ .rdp-root {
65
+ position: relative; /* Required to position the navigation toolbar. */
16
66
  box-sizing: border-box;
17
- padding: 0;
18
- margin: 0;
19
- background: transparent;
20
- border: 0;
21
- -moz-appearance: none;
22
- -webkit-appearance: none;
23
- appearance: none;
24
- position: absolute !important;
25
- top: 0;
26
- width: 1px !important;
27
- height: 1px !important;
28
- padding: 0 !important;
29
- overflow: hidden !important;
30
- clip: rect(1px, 1px, 1px, 1px) !important;
31
- border: 0 !important;
32
- }
33
-
34
- /* Buttons */
35
- .rdp-button_reset {
36
- appearance: none;
37
- position: relative;
38
- margin: 0;
39
- padding: 0;
40
- cursor: default;
41
- color: inherit;
42
- outline: none;
43
- background: none;
44
- font: inherit;
45
-
46
- -moz-appearance: none;
47
- -webkit-appearance: none;
48
67
  }
49
68
 
50
- .rdp-button {
51
- border: 2px solid transparent;
69
+ .rdp-root * {
70
+ box-sizing: border-box;
52
71
  }
53
72
 
54
- .rdp-button[disabled] {
55
- opacity: 0.25;
73
+ .rdp-day {
74
+ width: var(--rdp-day-width);
75
+ height: var(--rdp-day-height);
76
+ text-align: center;
56
77
  }
57
78
 
58
- .rdp-button:not([disabled]) {
79
+ .rdp-day_button {
80
+ background: none;
81
+ padding: 0;
82
+ margin: 0;
59
83
  cursor: pointer;
60
- }
61
-
62
- .rdp-button:focus:not([disabled]),
63
- .rdp-button:active:not([disabled]) {
84
+ font: inherit;
64
85
  color: inherit;
65
- border: var(--rdp-outline);
66
- background-color: var(--rdp-background-color);
67
- }
68
-
69
- .rdp-button:hover:not([disabled]) {
70
- background-color: var(--rdp-background-color);
71
- }
72
-
73
- .rdp-months {
86
+ justify-content: center;
87
+ align-items: center;
74
88
  display: flex;
75
- }
76
-
77
- .rdp-month {
78
- margin: 0 1em;
79
- }
80
89
 
81
- .rdp-month:first-child {
82
- margin-left: 0;
90
+ width: var(--rdp-day_button-width);
91
+ height: var(--rdp-day_button-height);
92
+ border: var(--rdp-day_button-border);
93
+ border-radius: var(--rdp-day_button-border-radius);
83
94
  }
84
95
 
85
- .rdp-month:last-child {
86
- margin-right: 0;
96
+ .rdp-day_button:disabled {
97
+ cursor: revert;
87
98
  }
88
99
 
89
- .rdp-table {
90
- margin: 0;
91
- max-width: calc(var(--rdp-cell-size) * 7);
92
- border-collapse: collapse;
93
- @apply rounded bg-slate-100;
94
- }
95
-
96
- .rdp-with_weeknumber .rdp-table {
97
- max-width: calc(var(--rdp-cell-size) * 8);
98
- border-collapse: collapse;
99
- }
100
+ .rdp-caption_label {
101
+ z-index: 1;
100
102
 
101
- .rdp-caption {
102
- display: flex;
103
+ position: relative;
104
+ display: inline-flex;
103
105
  align-items: center;
104
- justify-content: space-between;
105
- padding: 0;
106
- text-align: left;
107
- }
108
106
 
109
- .rdp-multiple_months .rdp-caption {
110
- position: relative;
111
- display: block;
112
- text-align: center;
107
+ white-space: nowrap;
108
+ border: 0;
113
109
  }
114
110
 
115
- .rdp-caption_dropdowns {
116
- position: relative;
117
- display: inline-flex;
111
+ .rdp-dropdown:focus-visible ~ .rdp-caption_label {
112
+ outline: 5px auto Highlight;
113
+ outline: 5px auto -webkit-focus-ring-color;
118
114
  }
119
115
 
120
- .rdp-caption_label {
121
- position: relative;
122
- z-index: 1;
116
+ .rdp-button_next,
117
+ .rdp-button_previous {
118
+ border: none;
119
+ background: none;
120
+ padding: 0;
121
+ margin: 0;
122
+ cursor: pointer;
123
+ font: inherit;
124
+ color: inherit;
125
+ -moz-appearance: none;
126
+ -webkit-appearance: none;
123
127
  display: inline-flex;
124
128
  align-items: center;
125
- margin: 0;
126
- white-space: nowrap;
127
- color: currentColor;
128
- border: 0;
129
- border: 2px solid transparent;
130
- font-family: inherit;
131
- font-size: 140%;
132
- font-weight: bold;
133
- }
129
+ justify-content: center;
130
+ position: relative;
131
+ appearance: none;
134
132
 
135
- .rdp-nav {
136
- white-space: nowrap;
133
+ width: var(--rdp-nav_button-width);
134
+ height: var(--rdp-nav_button-height);
137
135
  }
138
136
 
139
- .rdp-multiple_months .rdp-caption_start .rdp-nav {
140
- position: absolute;
141
- top: 50%;
142
- left: 0;
143
- transform: translateY(-50%);
137
+ .rdp-button_next:disabled,
138
+ .rdp-button_previous:disabled {
139
+ cursor: revert;
140
+
141
+ opacity: var(--rdp-nav_button-disabled-opacity);
144
142
  }
145
143
 
146
- .rdp-multiple_months .rdp-caption_end .rdp-nav {
147
- position: absolute;
148
- top: 50%;
149
- right: 0;
150
- transform: translateY(-50%);
144
+ .rdp-chevron {
145
+ display: inline-block;
146
+ fill: var(--rdp-accent-color);
151
147
  }
152
148
 
153
- .rdp-nav_button {
154
- display: inline-flex;
155
- align-items: center;
156
- justify-content: center;
157
- width: var(--rdp-cell-size);
158
- height: var(--rdp-cell-size);
159
- padding: 0.25em;
160
- border-radius: 100%;
149
+ .rdp-root[dir="rtl"] .rdp-nav .rdp-chevron {
150
+ transform: rotate(180deg);
161
151
  }
162
152
 
163
- /* ---------- */
164
- /* Dropdowns */
165
- /* ---------- */
153
+ .rdp-root[dir="rtl"] .rdp-nav .rdp-chevron {
154
+ transform: rotate(180deg);
155
+ transform-origin: 50%;
156
+ }
166
157
 
167
- .rdp-dropdown_year,
168
- .rdp-dropdown_month {
158
+ .rdp-dropdowns {
169
159
  position: relative;
170
160
  display: inline-flex;
171
161
  align-items: center;
162
+ gap: var(--rdp-dropdown-gap);
172
163
  }
173
-
174
164
  .rdp-dropdown {
165
+ z-index: 2;
166
+
167
+ /* Reset */
168
+ opacity: 0;
175
169
  appearance: none;
176
170
  position: absolute;
177
- z-index: 2;
178
- top: 0;
179
- bottom: 0;
180
- left: 0;
171
+ inset-block-start: 0;
172
+ inset-block-end: 0;
173
+ inset-inline-start: 0;
181
174
  width: 100%;
182
175
  margin: 0;
183
176
  padding: 0;
184
177
  cursor: inherit;
185
- opacity: 0;
186
178
  border: none;
187
- background-color: transparent;
188
- font-family: inherit;
189
- font-size: inherit;
190
179
  line-height: inherit;
191
180
  }
192
181
 
193
- .rdp-dropdown[disabled] {
194
- opacity: unset;
195
- color: unset;
196
- }
197
-
198
- .rdp-dropdown:focus:not([disabled]) + .rdp-caption_label,
199
- .rdp-dropdown:active:not([disabled]) + .rdp-caption_label {
200
- border: var(--rdp-outline);
201
- border-radius: 6px;
202
- background-color: var(--rdp-background-color);
203
- }
204
-
205
- .rdp-dropdown_icon {
206
- margin: 0 0 0 5px;
207
- }
208
-
209
- .rdp-head {
210
- border: 0;
211
- }
212
-
213
- .rdp-head_row,
214
- .rdp-row {
215
- height: 100%;
216
- }
217
-
218
- .rdp-head_cell {
219
- vertical-align: middle;
220
- text-transform: uppercase;
221
- font-size: 0.75em;
222
- font-weight: 700;
223
- text-align: center;
224
- height: 100%;
225
- height: var(--rdp-cell-size);
226
- padding: 0;
227
- }
228
-
229
- .rdp-tbody {
230
- border: 0;
231
- }
232
-
233
- .rdp-tfoot {
234
- margin: 0.5em;
235
- }
236
-
237
- .rdp-cell {
238
- width: var(--rdp-cell-size);
239
- height: 100%;
240
- height: var(--rdp-cell-size);
241
- padding: 0;
242
- text-align: center;
182
+ .rdp-dropdown_root {
183
+ position: relative;
184
+ display: inline-flex;
185
+ align-items: center;
243
186
  }
244
187
 
245
- .rdp-weeknumber {
246
- font-size: 0.75em;
188
+ .rdp-dropdown_root[data-disabled="true"] .rdp-chevron {
189
+ opacity: var(--rdp-disabled-opacity);
247
190
  }
248
191
 
249
- .rdp-weeknumber,
250
- .rdp-day {
192
+ .rdp-month_caption {
251
193
  display: flex;
252
- overflow: hidden;
253
- align-items: center;
254
- justify-content: center;
255
- box-sizing: border-box;
256
- width: var(--rdp-cell-size);
257
- max-width: var(--rdp-cell-size);
258
- height: var(--rdp-cell-size);
259
- margin: 0;
260
- border: 2px solid transparent;
261
- border-radius: 100%;
262
- }
263
-
264
- .rdp-day_today:not(.rdp-day_outside) {
194
+ align-content: center;
195
+ height: var(--rdp-nav-height);
265
196
  font-weight: bold;
197
+ font-size: large;
266
198
  }
267
199
 
268
- .rdp-day_selected:not([disabled]),
269
- .rdp-day_selected:focus:not([disabled]),
270
- .rdp-day_selected:active:not([disabled]),
271
- .rdp-day_selected:hover:not([disabled]) {
272
- color: white;
273
- background-color: var(--rdp-accent-color);
200
+ .rdp-months {
201
+ position: relative;
202
+ display: flex;
203
+ flex-wrap: wrap;
204
+ gap: var(--rdp-months-gap);
205
+ max-width: fit-content;
274
206
  }
275
207
 
276
- .rdp-day_selected:focus:not([disabled]) {
277
- border: var(--rdp-outline-selected);
208
+ .rdp-month_grid {
209
+ border-collapse: collapse;
278
210
  }
279
211
 
280
- .rdp:not([dir="rtl"]) .rdp-day_range_start:not(.rdp-day_range_end) {
281
- border-top-right-radius: 0;
282
- border-bottom-right-radius: 0;
283
- }
212
+ .rdp-nav {
213
+ position: absolute;
214
+ inset-block-start: 0;
215
+ inset-inline-end: 0;
284
216
 
285
- .rdp:not([dir="rtl"]) .rdp-day_range_end:not(.rdp-day_range_start) {
286
- border-top-left-radius: 0;
287
- border-bottom-left-radius: 0;
288
- }
217
+ display: flex;
218
+ align-items: center;
289
219
 
290
- .rdp[dir="rtl"] .rdp-day_range_start:not(.rdp-day_range_end) {
291
- border-top-left-radius: 0;
292
- border-bottom-left-radius: 0;
220
+ height: var(--rdp-nav-height);
293
221
  }
294
222
 
295
- .rdp[dir="rtl"] .rdp-day_range_end:not(.rdp-day_range_start) {
296
- border-top-right-radius: 0;
297
- border-bottom-right-radius: 0;
223
+ .rdp-weekday {
224
+ opacity: var(--rdp-weekday-opacity);
225
+ padding: var(--rdp-weekday-padding);
226
+ font-weight: 500;
227
+ font-size: smaller;
228
+ text-align: var(--rdp-weekday-text-align);
229
+ text-transform: var(--rdp-weekday-text-transform);
298
230
  }
299
231
 
300
- .rdp-day_range_end.rdp-day_range_start {
301
- border-radius: 100%;
232
+ .rdp-week_number {
233
+ opacity: var(--rdp-week_number-opacity);
234
+ font-weight: 400;
235
+ font-size: small;
236
+ height: var(--rdp-week_number-height);
237
+ width: var(--rdp-week_number-width);
238
+ border: var(--rdp-week_number-border);
239
+ border-radius: var(--rdp-week_number-border-radius);
240
+ text-align: var(--rdp-weeknumber-text-align);
302
241
  }
303
242
 
304
- .rdp-day_range_middle {
305
- border-radius: 0;
243
+ /* DAY MODIFIERS */
244
+ .rdp-today:not(.rdp-outside) {
245
+ color: var(--rdp-today-color);
306
246
  }
307
247
 
308
- .custom-day-picker {
309
- font-size: var(--font-size-sm);
310
- }
311
- .custom-day-picker .rdp-day_today {
312
- color: #000;
248
+ .rdp-selected {
249
+ font-weight: bold;
250
+ font-size: large;
313
251
  }
314
252
 
315
- .custom-day-picker .rdp-day_selected:not(.rdp-day_disabled):not(.rdp-day_outside) {
316
- background-color: rgb(var(--color-primary-600));
253
+ .rdp-selected .rdp-day_button {
254
+ border: var(--rdp-selected-border);
317
255
  }
318
256
 
319
- .custom-day-picker .rdp-day_selected:not(.rdp-day__start):not(.rdp-day__end):not(.rdp-day__outside) {
320
- background-color: rgb(var(--color-primary-600));
321
- color: #fff;
257
+ .rdp-outside {
258
+ opacity: var(--rdp-outside-opacity);
322
259
  }
323
260
 
324
- .custom-day-picker .rdp-day_selected:focus:not([disabled]) {
325
- border: none;
261
+ .rdp-disabled {
262
+ opacity: var(--rdp-disabled-opacity);
326
263
  }
327
264
 
328
- .custom-day-picker .rdp-day {
329
- border-radius: var(--spacing-1);
265
+ .rdp-hidden {
266
+ visibility: hidden;
267
+ color: var(--rdp-range_start-color);
330
268
  }
331
269
 
332
- .custom-day-picker.range-picker .rdp-day {
333
- border-radius: 0;
270
+ .rdp-range_start {
271
+ background: var(--rdp-range_start-background);
334
272
  }
335
273
 
336
- .custom-day-picker.range-picker .rdp-button:focus:not([disabled]):not(.rdp-day_selected),
337
- .custom-day-picker.range-picker .rdp-button:active:not([disabled]):not(.rdp-day_selected),
338
- .custom-day-picker.range-picker .rdp-button:hover:not([disabled]):not(.rdp-day_selected) {
339
- border-radius: 50%;
274
+ .rdp-range_start .rdp-day_button {
275
+ background-color: var(--rdp-range_start-date-background-color);
276
+ color: var(--rdp-range_start-color);
340
277
  }
341
278
 
342
- .custom-day-picker.range-picker .rdp-day_range_start {
343
- border-top-left-radius: 50%;
344
- border-bottom-left-radius: 50%;
279
+ .rdp-range_middle {
280
+ background-color: var(--rdp-range_middle-background-color);
345
281
  }
346
282
 
347
- .custom-day-picker.range-picker .rdp-day_range_end {
348
- border-top-right-radius: 50%;
349
- border-bottom-right-radius: 50%;
283
+ .rdp-range_middle .rdp-day_button {
284
+ border-color: transparent;
285
+ border: unset;
286
+ border-radius: unset;
287
+ color: var(--rdp-range_middle-color);
350
288
  }
351
289
 
352
- .custom-day-picker.range-picker .rdp-month {
353
- margin: 0;
290
+ .rdp-range_end {
291
+ background: var(--rdp-range_end-background);
292
+ color: var(--rdp-range_end-color);
354
293
  }
355
294
 
356
- .custom-day-picker.range-picker .rdp-caption {
357
- padding: 0;
358
- gap: 0.25em;
295
+ .rdp-range_end .rdp-day_button {
296
+ color: var(--rdp-range_start-color);
297
+ background-color: var(--rdp-range_end-date-background-color);
359
298
  }
360
299
 
361
- .custom-day-picker.range-picker .rdp-navButton {
362
- top: 0;
363
- right: 0;
300
+ .rdp-range_start.rdp-range_end {
301
+ background: revert;
364
302
  }
365
303
 
366
- .custom-day-picker.range-picker .rdp-wrapper {
367
- padding: 0;
304
+ .rdp-focusable {
305
+ cursor: pointer;
368
306
  }