@nuvui/date-picker 0.0.0-stage → 0.1.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.
Files changed (42) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +36 -2
  3. package/dist/components/calendar/calendar.cjs +163 -0
  4. package/dist/components/calendar/calendar.d.cts +17 -0
  5. package/dist/components/calendar/calendar.d.ts +17 -0
  6. package/dist/components/calendar/calendar.js +163 -0
  7. package/dist/components/calendar/index.cjs +3 -0
  8. package/dist/components/calendar/index.d.cts +2 -0
  9. package/dist/components/calendar/index.d.ts +2 -0
  10. package/dist/components/calendar/index.js +2 -0
  11. package/dist/components/date-picker/date-picker.cjs +340 -0
  12. package/dist/components/date-picker/date-picker.d.cts +169 -0
  13. package/dist/components/date-picker/date-picker.d.ts +169 -0
  14. package/dist/components/date-picker/date-picker.js +339 -0
  15. package/dist/components/date-picker/index.cjs +4 -0
  16. package/dist/components/date-picker/index.d.cts +2 -0
  17. package/dist/components/date-picker/index.d.ts +2 -0
  18. package/dist/components/date-picker/index.js +2 -0
  19. package/dist/components/date-picker/popup.cjs +43 -0
  20. package/dist/components/date-picker/popup.js +43 -0
  21. package/dist/css/calendar.css +291 -0
  22. package/dist/css/date-picker.css +24 -0
  23. package/dist/index.cjs +13 -0
  24. package/dist/index.d.cts +6 -0
  25. package/dist/index.d.ts +6 -0
  26. package/dist/index.js +4 -0
  27. package/dist/locale.cjs +9 -0
  28. package/dist/locale.d.cts +1 -0
  29. package/dist/locale.d.ts +1 -0
  30. package/dist/locale.js +1 -0
  31. package/dist/styles.css +314 -0
  32. package/dist/utils/cx.cjs +6 -0
  33. package/dist/utils/cx.js +6 -0
  34. package/dist/utils/dates.cjs +59 -0
  35. package/dist/utils/dates.js +54 -0
  36. package/dist/utils/use-controlled.cjs +31 -0
  37. package/dist/utils/use-controlled.js +31 -0
  38. package/dist/utils/use-date-text.cjs +83 -0
  39. package/dist/utils/use-date-text.js +83 -0
  40. package/dist/utils/use-is-phone.cjs +18 -0
  41. package/dist/utils/use-is-phone.js +18 -0
  42. package/package.json +118 -3
@@ -0,0 +1,291 @@
1
+ @layer tokens, base, components;
2
+ @layer components {
3
+ .nuv-calendar {
4
+ display: inline-block;
5
+ max-inline-size: 100%;
6
+ color: var(--nuv-calendar-fg, var(--color-foreground));
7
+ font-size: var(--nuv-calendar-font-size, var(--text-sm));
8
+ line-height: var(--text-sm--line-height);
9
+ }
10
+ .nuv-calendar[data-pending] {
11
+ visibility: hidden;
12
+ }
13
+ .nuv-calendar__months {
14
+ display: flex;
15
+ flex-wrap: wrap;
16
+ gap: var(--nuv-calendar-months-gap, calc(var(--spacing) * 6));
17
+ }
18
+ .nuv-calendar__month {
19
+ display: grid;
20
+ grid-template-areas: "previous caption next" "grid grid grid";
21
+ grid-template-columns: var(--nuv-calendar-cell-size, var(--nuv-touch-size)) 1fr var(--nuv-calendar-cell-size, var(--nuv-touch-size));
22
+ row-gap: calc(var(--spacing) * 2);
23
+ }
24
+ @media (pointer: fine) {
25
+ .nuv-calendar__month {
26
+ grid-template-columns: var(--nuv-calendar-cell-size, var(--nuv-control-height-md)) 1fr var(--nuv-calendar-cell-size, var(--nuv-control-height-md));
27
+ }
28
+ }
29
+ .nuv-calendar__caption {
30
+ display: flex;
31
+ grid-area: caption;
32
+ align-items: center;
33
+ justify-content: center;
34
+ min-block-size: var(--nuv-calendar-cell-size, var(--nuv-touch-size));
35
+ font-weight: var(--font-weight-medium);
36
+ }
37
+ @media (pointer: fine) {
38
+ .nuv-calendar__caption {
39
+ min-block-size: var(--nuv-calendar-cell-size, var(--nuv-control-height-md));
40
+ }
41
+ }
42
+ .nuv-calendar__nav {
43
+ display: flex;
44
+ grid-area: next;
45
+ align-items: center;
46
+ justify-content: flex-end;
47
+ }
48
+ .nuv-calendar__nav-button {
49
+ display: inline-flex;
50
+ align-items: center;
51
+ justify-content: center;
52
+ inline-size: var(--nuv-calendar-cell-size, var(--nuv-touch-size));
53
+ }
54
+ @media (pointer: fine) {
55
+ .nuv-calendar__nav-button {
56
+ inline-size: var(--nuv-calendar-cell-size, var(--nuv-control-height-md));
57
+ }
58
+ }
59
+ .nuv-calendar__nav-button {
60
+ block-size: var(--nuv-calendar-cell-size, var(--nuv-touch-size));
61
+ }
62
+ @media (pointer: fine) {
63
+ .nuv-calendar__nav-button {
64
+ block-size: var(--nuv-calendar-cell-size, var(--nuv-control-height-md));
65
+ }
66
+ }
67
+ .nuv-calendar__nav-button {
68
+ padding: 0;
69
+ border: 0;
70
+ border-radius: var(--nuv-calendar-radius, var(--radius-md));
71
+ background-color: transparent;
72
+ color: inherit;
73
+ cursor: pointer;
74
+ -webkit-tap-highlight-color: transparent;
75
+ }
76
+ .nuv-calendar__nav-button:focus-visible {
77
+ outline: var(--nuv-focus-ring-width, 2px) solid var(--nuv-focus-ring-color, var(--color-ring));
78
+ outline-offset: var(--nuv-focus-ring-offset, 2px);
79
+ }
80
+ @media (hover: hover) {
81
+ .nuv-calendar__nav-button:hover {
82
+ background-color: var(--nuv-calendar-day-bg-hover, var(--color-muted));
83
+ }
84
+ }
85
+ .nuv-calendar__nav-button[aria-disabled=true] {
86
+ opacity: var(--nuv-disabled-opacity);
87
+ cursor: not-allowed;
88
+ }
89
+ .nuv-calendar__nav-button--previous {
90
+ grid-area: previous;
91
+ }
92
+ .nuv-calendar__nav-button--next {
93
+ grid-area: next;
94
+ }
95
+ .nuv-calendar__chevron {
96
+ flex: none;
97
+ }
98
+ .nuv-calendar__dropdowns {
99
+ display: inline-flex;
100
+ gap: calc(var(--spacing) * 2);
101
+ align-items: center;
102
+ }
103
+ .nuv-calendar__select {
104
+ --nuv-select-width: 0;
105
+ --nuv-select-height: var(--nuv-calendar-cell-size, var(--nuv-touch-size));
106
+ font-weight: var(--font-weight-medium);
107
+ }
108
+ @media (pointer: fine) {
109
+ .nuv-calendar__select {
110
+ --nuv-select-height: var(--nuv-calendar-cell-size, var(--nuv-control-height-md));
111
+ }
112
+ }
113
+ .nuv-calendar__options {
114
+ --nuv-select-content-max-height: var(--nuv-calendar-options-height, 18rem);
115
+ }
116
+ .nuv-calendar__caption-label {
117
+ display: inline-flex;
118
+ gap: var(--spacing);
119
+ align-items: center;
120
+ white-space: nowrap;
121
+ }
122
+ .nuv-calendar__grid {
123
+ grid-area: grid;
124
+ border-collapse: collapse;
125
+ border-spacing: 0;
126
+ }
127
+ .nuv-calendar__weekday {
128
+ inline-size: var(--nuv-calendar-cell-size, var(--nuv-touch-size));
129
+ }
130
+ @media (pointer: fine) {
131
+ .nuv-calendar__weekday {
132
+ inline-size: var(--nuv-calendar-cell-size, var(--nuv-control-height-md));
133
+ }
134
+ }
135
+ .nuv-calendar__weekday {
136
+ padding: 0;
137
+ padding-block-end: var(--spacing);
138
+ color: var(--nuv-calendar-weekday-fg, var(--color-muted-foreground));
139
+ font-size: var(--text-xs);
140
+ font-weight: var(--font-weight-normal);
141
+ line-height: var(--text-xs--line-height);
142
+ text-align: center;
143
+ }
144
+ .nuv-calendar__week-number-header,
145
+ .nuv-calendar__week-number {
146
+ inline-size: var(--nuv-calendar-cell-size, var(--nuv-touch-size));
147
+ }
148
+ @media (pointer: fine) {
149
+ .nuv-calendar__week-number-header,
150
+ .nuv-calendar__week-number {
151
+ inline-size: var(--nuv-calendar-cell-size, var(--nuv-control-height-md));
152
+ }
153
+ }
154
+ .nuv-calendar__week-number-header,
155
+ .nuv-calendar__week-number {
156
+ padding: 0;
157
+ color: var(--nuv-calendar-weekday-fg, var(--color-muted-foreground));
158
+ font-size: var(--text-xs);
159
+ font-weight: var(--font-weight-normal);
160
+ line-height: var(--text-xs--line-height);
161
+ text-align: center;
162
+ }
163
+ .nuv-calendar__day {
164
+ inline-size: var(--nuv-calendar-cell-size, var(--nuv-touch-size));
165
+ }
166
+ @media (pointer: fine) {
167
+ .nuv-calendar__day {
168
+ inline-size: var(--nuv-calendar-cell-size, var(--nuv-control-height-md));
169
+ }
170
+ }
171
+ .nuv-calendar__day {
172
+ block-size: var(--nuv-calendar-cell-size, var(--nuv-touch-size));
173
+ }
174
+ @media (pointer: fine) {
175
+ .nuv-calendar__day {
176
+ block-size: var(--nuv-calendar-cell-size, var(--nuv-control-height-md));
177
+ }
178
+ }
179
+ .nuv-calendar__day {
180
+ padding: 0;
181
+ text-align: center;
182
+ }
183
+ .nuv-calendar__day-button {
184
+ display: flex;
185
+ align-items: center;
186
+ justify-content: center;
187
+ inline-size: var(--nuv-calendar-cell-size, var(--nuv-touch-size));
188
+ }
189
+ @media (pointer: fine) {
190
+ .nuv-calendar__day-button {
191
+ inline-size: var(--nuv-calendar-cell-size, var(--nuv-control-height-md));
192
+ }
193
+ }
194
+ .nuv-calendar__day-button {
195
+ block-size: var(--nuv-calendar-cell-size, var(--nuv-touch-size));
196
+ }
197
+ @media (pointer: fine) {
198
+ .nuv-calendar__day-button {
199
+ block-size: var(--nuv-calendar-cell-size, var(--nuv-control-height-md));
200
+ }
201
+ }
202
+ .nuv-calendar__day-button {
203
+ padding: 0;
204
+ border: 0;
205
+ border-radius: var(--nuv-calendar-radius, var(--radius-md));
206
+ background-color: transparent;
207
+ color: inherit;
208
+ font: inherit;
209
+ font-variant-numeric: tabular-nums;
210
+ cursor: pointer;
211
+ -webkit-tap-highlight-color: transparent;
212
+ }
213
+ .nuv-calendar__day-button:focus-visible {
214
+ outline: var(--nuv-focus-ring-width, 2px) solid var(--nuv-focus-ring-color, var(--color-ring));
215
+ outline-offset: var(--nuv-focus-ring-offset, 2px);
216
+ }
217
+ @media (hover: hover) {
218
+ .nuv-calendar__day-button:hover {
219
+ background-color: var(--nuv-calendar-day-bg-hover, var(--color-muted));
220
+ }
221
+ }
222
+ .nuv-calendar__day-button:disabled, .nuv-calendar__day-button[aria-disabled=true] {
223
+ cursor: not-allowed;
224
+ }
225
+ .nuv-calendar__day--today > .nuv-calendar__day-button {
226
+ border: var(--nuv-border-width) solid var(--nuv-calendar-today-border, var(--color-border-strong));
227
+ font-weight: var(--font-weight-semibold);
228
+ }
229
+ .nuv-calendar__day--outside {
230
+ color: var(--nuv-calendar-outside-fg, var(--color-muted-foreground));
231
+ }
232
+ .nuv-calendar__day--disabled {
233
+ opacity: var(--nuv-disabled-opacity);
234
+ text-decoration: line-through;
235
+ }
236
+ .nuv-calendar__day--hidden {
237
+ visibility: hidden;
238
+ }
239
+ .nuv-calendar__day--range-middle {
240
+ background-color: var(--nuv-calendar-range-bg, var(--color-muted));
241
+ }
242
+ @media (forced-colors: active) {
243
+ .nuv-calendar__day--range-middle {
244
+ background-color: highlight;
245
+ color: highlighttext;
246
+ forced-color-adjust: none;
247
+ }
248
+ }
249
+ .nuv-calendar__day--range-start {
250
+ background-image: linear-gradient(to right, transparent 50%, var(--nuv-calendar-range-bg, var(--color-muted)) 50%);
251
+ }
252
+ .nuv-calendar__day--range-start:dir(rtl) {
253
+ background-image: linear-gradient(to left, transparent 50%, var(--nuv-calendar-range-bg, var(--color-muted)) 50%);
254
+ }
255
+ .nuv-calendar__day--range-end {
256
+ background-image: linear-gradient(to left, transparent 50%, var(--nuv-calendar-range-bg, var(--color-muted)) 50%);
257
+ }
258
+ .nuv-calendar__day--range-end:dir(rtl) {
259
+ background-image: linear-gradient(to right, transparent 50%, var(--nuv-calendar-range-bg, var(--color-muted)) 50%);
260
+ }
261
+ .nuv-calendar__day--range-start.nuv-calendar__day--range-end {
262
+ background-image: none;
263
+ }
264
+ .nuv-calendar__day--selected > .nuv-calendar__day-button {
265
+ border-color: var(--nuv-calendar-selected-bg, var(--color-primary));
266
+ background-color: var(--nuv-calendar-selected-bg, var(--color-primary));
267
+ color: var(--nuv-calendar-selected-fg, var(--color-primary-foreground));
268
+ }
269
+ @media (forced-colors: active) {
270
+ .nuv-calendar__day--selected > .nuv-calendar__day-button {
271
+ border-color: highlight;
272
+ background-color: highlight;
273
+ color: highlighttext;
274
+ forced-color-adjust: none;
275
+ }
276
+ }
277
+ .nuv-calendar__day--range-middle > .nuv-calendar__day-button {
278
+ border-color: var(--nuv-calendar-today-border, var(--color-border-strong));
279
+ background-color: transparent;
280
+ color: inherit;
281
+ }
282
+ @media (hover: hover) {
283
+ .nuv-calendar__day--range-middle > .nuv-calendar__day-button:hover {
284
+ border: var(--nuv-border-width) solid var(--nuv-calendar-today-border, var(--color-border-strong));
285
+ }
286
+ }
287
+ .nuv-calendar__footer {
288
+ padding-block-start: calc(var(--spacing) * 2);
289
+ color: var(--nuv-calendar-footer-fg, var(--color-muted-foreground));
290
+ }
291
+ }
@@ -0,0 +1,24 @@
1
+ @layer tokens, base, components;
2
+ @layer components {
3
+ .nuv-date-picker {
4
+ inline-size: var(--nuv-date-picker-width, 100%);
5
+ }
6
+ .nuv-date-picker--range > .nuv-input {
7
+ flex: 1 1 0;
8
+ text-align: center;
9
+ }
10
+ .nuv-date-picker__separator {
11
+ flex: none;
12
+ color: var(--nuv-date-picker-separator-fg, var(--color-muted-foreground));
13
+ }
14
+ .nuv-date-picker__button {
15
+ color: var(--nuv-date-picker-icon-fg, var(--color-muted-foreground));
16
+ }
17
+ .nuv-date-picker__popover {
18
+ --nuv-popover-width: auto;
19
+ --nuv-popover-padding: var(--nuv-date-picker-padding, calc(var(--spacing) * 3));
20
+ }
21
+ .nuv-date-picker__sheet > .nuv-calendar {
22
+ align-self: center;
23
+ }
24
+ }
package/dist/index.cjs ADDED
@@ -0,0 +1,13 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_calendar = require("./components/calendar/calendar.cjs");
3
+ const require_date_picker = require("./components/date-picker/date-picker.cjs");
4
+ let _date_fns_tz = require("@date-fns/tz");
5
+ exports.Calendar = require_calendar.Calendar;
6
+ exports.DatePicker = require_date_picker.DatePicker;
7
+ exports.DateRangePicker = require_date_picker.DateRangePicker;
8
+ Object.defineProperty(exports, "TZDate", {
9
+ enumerable: true,
10
+ get: function() {
11
+ return _date_fns_tz.TZDate;
12
+ }
13
+ });
@@ -0,0 +1,6 @@
1
+ import { Calendar, CalendarLocale, CalendarOptions, CalendarProps, DateRange, Matcher } from "./components/calendar/calendar.cjs";
2
+ import "./components/calendar/index.cjs";
3
+ import { DatePicker, DatePickerCalendarProps, DatePickerOwnProps, DatePickerProps, DateRangePicker, DateRangePickerCalendarProps, DateRangePickerOwnProps, DateRangePickerProps } from "./components/date-picker/date-picker.cjs";
4
+ import "./components/date-picker/index.cjs";
5
+ import { TZDate } from "@date-fns/tz";
6
+ export { Calendar, type CalendarLocale, type CalendarOptions, type CalendarProps, DatePicker, type DatePickerCalendarProps, type DatePickerOwnProps, type DatePickerProps, type DateRange, DateRangePicker, type DateRangePickerCalendarProps, type DateRangePickerOwnProps, type DateRangePickerProps, type Matcher, TZDate };
@@ -0,0 +1,6 @@
1
+ import { Calendar, CalendarLocale, CalendarOptions, CalendarProps, DateRange, Matcher } from "./components/calendar/calendar.js";
2
+ import "./components/calendar/index.js";
3
+ import { DatePicker, DatePickerCalendarProps, DatePickerOwnProps, DatePickerProps, DateRangePicker, DateRangePickerCalendarProps, DateRangePickerOwnProps, DateRangePickerProps } from "./components/date-picker/date-picker.js";
4
+ import "./components/date-picker/index.js";
5
+ import { TZDate } from "@date-fns/tz";
6
+ export { Calendar, type CalendarLocale, type CalendarOptions, type CalendarProps, DatePicker, type DatePickerCalendarProps, type DatePickerOwnProps, type DatePickerProps, type DateRange, DateRangePicker, type DateRangePickerCalendarProps, type DateRangePickerOwnProps, type DateRangePickerProps, type Matcher, TZDate };
package/dist/index.js ADDED
@@ -0,0 +1,4 @@
1
+ import { Calendar } from "./components/calendar/calendar.js";
2
+ import { DatePicker, DateRangePicker } from "./components/date-picker/date-picker.js";
3
+ import { TZDate } from "@date-fns/tz";
4
+ export { Calendar, DatePicker, DateRangePicker, TZDate };
@@ -0,0 +1,9 @@
1
+ var react_day_picker_locale = require("react-day-picker/locale");
2
+ Object.keys(react_day_picker_locale).forEach(function(k) {
3
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
4
+ enumerable: true,
5
+ get: function() {
6
+ return react_day_picker_locale[k];
7
+ }
8
+ });
9
+ });
@@ -0,0 +1 @@
1
+ export * from "react-day-picker/locale";
@@ -0,0 +1 @@
1
+ export * from "react-day-picker/locale";
package/dist/locale.js ADDED
@@ -0,0 +1 @@
1
+ export * from "react-day-picker/locale";
@@ -0,0 +1,314 @@
1
+ @layer tokens, base, components;
2
+ @layer components {
3
+ .nuv-calendar {
4
+ display: inline-block;
5
+ max-inline-size: 100%;
6
+ color: var(--nuv-calendar-fg, var(--color-foreground));
7
+ font-size: var(--nuv-calendar-font-size, var(--text-sm));
8
+ line-height: var(--text-sm--line-height);
9
+ }
10
+ .nuv-calendar[data-pending] {
11
+ visibility: hidden;
12
+ }
13
+ .nuv-calendar__months {
14
+ display: flex;
15
+ flex-wrap: wrap;
16
+ gap: var(--nuv-calendar-months-gap, calc(var(--spacing) * 6));
17
+ }
18
+ .nuv-calendar__month {
19
+ display: grid;
20
+ grid-template-areas: "previous caption next" "grid grid grid";
21
+ grid-template-columns: var(--nuv-calendar-cell-size, var(--nuv-touch-size)) 1fr var(--nuv-calendar-cell-size, var(--nuv-touch-size));
22
+ row-gap: calc(var(--spacing) * 2);
23
+ }
24
+ @media (pointer: fine) {
25
+ .nuv-calendar__month {
26
+ grid-template-columns: var(--nuv-calendar-cell-size, var(--nuv-control-height-md)) 1fr var(--nuv-calendar-cell-size, var(--nuv-control-height-md));
27
+ }
28
+ }
29
+ .nuv-calendar__caption {
30
+ display: flex;
31
+ grid-area: caption;
32
+ align-items: center;
33
+ justify-content: center;
34
+ min-block-size: var(--nuv-calendar-cell-size, var(--nuv-touch-size));
35
+ font-weight: var(--font-weight-medium);
36
+ }
37
+ @media (pointer: fine) {
38
+ .nuv-calendar__caption {
39
+ min-block-size: var(--nuv-calendar-cell-size, var(--nuv-control-height-md));
40
+ }
41
+ }
42
+ .nuv-calendar__nav {
43
+ display: flex;
44
+ grid-area: next;
45
+ align-items: center;
46
+ justify-content: flex-end;
47
+ }
48
+ .nuv-calendar__nav-button {
49
+ display: inline-flex;
50
+ align-items: center;
51
+ justify-content: center;
52
+ inline-size: var(--nuv-calendar-cell-size, var(--nuv-touch-size));
53
+ }
54
+ @media (pointer: fine) {
55
+ .nuv-calendar__nav-button {
56
+ inline-size: var(--nuv-calendar-cell-size, var(--nuv-control-height-md));
57
+ }
58
+ }
59
+ .nuv-calendar__nav-button {
60
+ block-size: var(--nuv-calendar-cell-size, var(--nuv-touch-size));
61
+ }
62
+ @media (pointer: fine) {
63
+ .nuv-calendar__nav-button {
64
+ block-size: var(--nuv-calendar-cell-size, var(--nuv-control-height-md));
65
+ }
66
+ }
67
+ .nuv-calendar__nav-button {
68
+ padding: 0;
69
+ border: 0;
70
+ border-radius: var(--nuv-calendar-radius, var(--radius-md));
71
+ background-color: transparent;
72
+ color: inherit;
73
+ cursor: pointer;
74
+ -webkit-tap-highlight-color: transparent;
75
+ }
76
+ .nuv-calendar__nav-button:focus-visible {
77
+ outline: var(--nuv-focus-ring-width, 2px) solid var(--nuv-focus-ring-color, var(--color-ring));
78
+ outline-offset: var(--nuv-focus-ring-offset, 2px);
79
+ }
80
+ @media (hover: hover) {
81
+ .nuv-calendar__nav-button:hover {
82
+ background-color: var(--nuv-calendar-day-bg-hover, var(--color-muted));
83
+ }
84
+ }
85
+ .nuv-calendar__nav-button[aria-disabled=true] {
86
+ opacity: var(--nuv-disabled-opacity);
87
+ cursor: not-allowed;
88
+ }
89
+ .nuv-calendar__nav-button--previous {
90
+ grid-area: previous;
91
+ }
92
+ .nuv-calendar__nav-button--next {
93
+ grid-area: next;
94
+ }
95
+ .nuv-calendar__chevron {
96
+ flex: none;
97
+ }
98
+ .nuv-calendar__dropdowns {
99
+ display: inline-flex;
100
+ gap: calc(var(--spacing) * 2);
101
+ align-items: center;
102
+ }
103
+ .nuv-calendar__select {
104
+ --nuv-select-width: 0;
105
+ --nuv-select-height: var(--nuv-calendar-cell-size, var(--nuv-touch-size));
106
+ font-weight: var(--font-weight-medium);
107
+ }
108
+ @media (pointer: fine) {
109
+ .nuv-calendar__select {
110
+ --nuv-select-height: var(--nuv-calendar-cell-size, var(--nuv-control-height-md));
111
+ }
112
+ }
113
+ .nuv-calendar__options {
114
+ --nuv-select-content-max-height: var(--nuv-calendar-options-height, 18rem);
115
+ }
116
+ .nuv-calendar__caption-label {
117
+ display: inline-flex;
118
+ gap: var(--spacing);
119
+ align-items: center;
120
+ white-space: nowrap;
121
+ }
122
+ .nuv-calendar__grid {
123
+ grid-area: grid;
124
+ border-collapse: collapse;
125
+ border-spacing: 0;
126
+ }
127
+ .nuv-calendar__weekday {
128
+ inline-size: var(--nuv-calendar-cell-size, var(--nuv-touch-size));
129
+ }
130
+ @media (pointer: fine) {
131
+ .nuv-calendar__weekday {
132
+ inline-size: var(--nuv-calendar-cell-size, var(--nuv-control-height-md));
133
+ }
134
+ }
135
+ .nuv-calendar__weekday {
136
+ padding: 0;
137
+ padding-block-end: var(--spacing);
138
+ color: var(--nuv-calendar-weekday-fg, var(--color-muted-foreground));
139
+ font-size: var(--text-xs);
140
+ font-weight: var(--font-weight-normal);
141
+ line-height: var(--text-xs--line-height);
142
+ text-align: center;
143
+ }
144
+ .nuv-calendar__week-number-header,
145
+ .nuv-calendar__week-number {
146
+ inline-size: var(--nuv-calendar-cell-size, var(--nuv-touch-size));
147
+ }
148
+ @media (pointer: fine) {
149
+ .nuv-calendar__week-number-header,
150
+ .nuv-calendar__week-number {
151
+ inline-size: var(--nuv-calendar-cell-size, var(--nuv-control-height-md));
152
+ }
153
+ }
154
+ .nuv-calendar__week-number-header,
155
+ .nuv-calendar__week-number {
156
+ padding: 0;
157
+ color: var(--nuv-calendar-weekday-fg, var(--color-muted-foreground));
158
+ font-size: var(--text-xs);
159
+ font-weight: var(--font-weight-normal);
160
+ line-height: var(--text-xs--line-height);
161
+ text-align: center;
162
+ }
163
+ .nuv-calendar__day {
164
+ inline-size: var(--nuv-calendar-cell-size, var(--nuv-touch-size));
165
+ }
166
+ @media (pointer: fine) {
167
+ .nuv-calendar__day {
168
+ inline-size: var(--nuv-calendar-cell-size, var(--nuv-control-height-md));
169
+ }
170
+ }
171
+ .nuv-calendar__day {
172
+ block-size: var(--nuv-calendar-cell-size, var(--nuv-touch-size));
173
+ }
174
+ @media (pointer: fine) {
175
+ .nuv-calendar__day {
176
+ block-size: var(--nuv-calendar-cell-size, var(--nuv-control-height-md));
177
+ }
178
+ }
179
+ .nuv-calendar__day {
180
+ padding: 0;
181
+ text-align: center;
182
+ }
183
+ .nuv-calendar__day-button {
184
+ display: flex;
185
+ align-items: center;
186
+ justify-content: center;
187
+ inline-size: var(--nuv-calendar-cell-size, var(--nuv-touch-size));
188
+ }
189
+ @media (pointer: fine) {
190
+ .nuv-calendar__day-button {
191
+ inline-size: var(--nuv-calendar-cell-size, var(--nuv-control-height-md));
192
+ }
193
+ }
194
+ .nuv-calendar__day-button {
195
+ block-size: var(--nuv-calendar-cell-size, var(--nuv-touch-size));
196
+ }
197
+ @media (pointer: fine) {
198
+ .nuv-calendar__day-button {
199
+ block-size: var(--nuv-calendar-cell-size, var(--nuv-control-height-md));
200
+ }
201
+ }
202
+ .nuv-calendar__day-button {
203
+ padding: 0;
204
+ border: 0;
205
+ border-radius: var(--nuv-calendar-radius, var(--radius-md));
206
+ background-color: transparent;
207
+ color: inherit;
208
+ font: inherit;
209
+ font-variant-numeric: tabular-nums;
210
+ cursor: pointer;
211
+ -webkit-tap-highlight-color: transparent;
212
+ }
213
+ .nuv-calendar__day-button:focus-visible {
214
+ outline: var(--nuv-focus-ring-width, 2px) solid var(--nuv-focus-ring-color, var(--color-ring));
215
+ outline-offset: var(--nuv-focus-ring-offset, 2px);
216
+ }
217
+ @media (hover: hover) {
218
+ .nuv-calendar__day-button:hover {
219
+ background-color: var(--nuv-calendar-day-bg-hover, var(--color-muted));
220
+ }
221
+ }
222
+ .nuv-calendar__day-button:disabled, .nuv-calendar__day-button[aria-disabled=true] {
223
+ cursor: not-allowed;
224
+ }
225
+ .nuv-calendar__day--today > .nuv-calendar__day-button {
226
+ border: var(--nuv-border-width) solid var(--nuv-calendar-today-border, var(--color-border-strong));
227
+ font-weight: var(--font-weight-semibold);
228
+ }
229
+ .nuv-calendar__day--outside {
230
+ color: var(--nuv-calendar-outside-fg, var(--color-muted-foreground));
231
+ }
232
+ .nuv-calendar__day--disabled {
233
+ opacity: var(--nuv-disabled-opacity);
234
+ text-decoration: line-through;
235
+ }
236
+ .nuv-calendar__day--hidden {
237
+ visibility: hidden;
238
+ }
239
+ .nuv-calendar__day--range-middle {
240
+ background-color: var(--nuv-calendar-range-bg, var(--color-muted));
241
+ }
242
+ @media (forced-colors: active) {
243
+ .nuv-calendar__day--range-middle {
244
+ background-color: highlight;
245
+ color: highlighttext;
246
+ forced-color-adjust: none;
247
+ }
248
+ }
249
+ .nuv-calendar__day--range-start {
250
+ background-image: linear-gradient(to right, transparent 50%, var(--nuv-calendar-range-bg, var(--color-muted)) 50%);
251
+ }
252
+ .nuv-calendar__day--range-start:dir(rtl) {
253
+ background-image: linear-gradient(to left, transparent 50%, var(--nuv-calendar-range-bg, var(--color-muted)) 50%);
254
+ }
255
+ .nuv-calendar__day--range-end {
256
+ background-image: linear-gradient(to left, transparent 50%, var(--nuv-calendar-range-bg, var(--color-muted)) 50%);
257
+ }
258
+ .nuv-calendar__day--range-end:dir(rtl) {
259
+ background-image: linear-gradient(to right, transparent 50%, var(--nuv-calendar-range-bg, var(--color-muted)) 50%);
260
+ }
261
+ .nuv-calendar__day--range-start.nuv-calendar__day--range-end {
262
+ background-image: none;
263
+ }
264
+ .nuv-calendar__day--selected > .nuv-calendar__day-button {
265
+ border-color: var(--nuv-calendar-selected-bg, var(--color-primary));
266
+ background-color: var(--nuv-calendar-selected-bg, var(--color-primary));
267
+ color: var(--nuv-calendar-selected-fg, var(--color-primary-foreground));
268
+ }
269
+ @media (forced-colors: active) {
270
+ .nuv-calendar__day--selected > .nuv-calendar__day-button {
271
+ border-color: highlight;
272
+ background-color: highlight;
273
+ color: highlighttext;
274
+ forced-color-adjust: none;
275
+ }
276
+ }
277
+ .nuv-calendar__day--range-middle > .nuv-calendar__day-button {
278
+ border-color: var(--nuv-calendar-today-border, var(--color-border-strong));
279
+ background-color: transparent;
280
+ color: inherit;
281
+ }
282
+ @media (hover: hover) {
283
+ .nuv-calendar__day--range-middle > .nuv-calendar__day-button:hover {
284
+ border: var(--nuv-border-width) solid var(--nuv-calendar-today-border, var(--color-border-strong));
285
+ }
286
+ }
287
+ .nuv-calendar__footer {
288
+ padding-block-start: calc(var(--spacing) * 2);
289
+ color: var(--nuv-calendar-footer-fg, var(--color-muted-foreground));
290
+ }
291
+ }
292
+ @layer components {
293
+ .nuv-date-picker {
294
+ inline-size: var(--nuv-date-picker-width, 100%);
295
+ }
296
+ .nuv-date-picker--range > .nuv-input {
297
+ flex: 1 1 0;
298
+ text-align: center;
299
+ }
300
+ .nuv-date-picker__separator {
301
+ flex: none;
302
+ color: var(--nuv-date-picker-separator-fg, var(--color-muted-foreground));
303
+ }
304
+ .nuv-date-picker__button {
305
+ color: var(--nuv-date-picker-icon-fg, var(--color-muted-foreground));
306
+ }
307
+ .nuv-date-picker__popover {
308
+ --nuv-popover-width: auto;
309
+ --nuv-popover-padding: var(--nuv-date-picker-padding, calc(var(--spacing) * 3));
310
+ }
311
+ .nuv-date-picker__sheet > .nuv-calendar {
312
+ align-self: center;
313
+ }
314
+ }
@@ -0,0 +1,6 @@
1
+ //#region src/utils/cx.ts
2
+ function cx(...classes) {
3
+ return classes.filter(Boolean).join(" ");
4
+ }
5
+ //#endregion
6
+ exports.cx = cx;
@@ -0,0 +1,6 @@
1
+ //#region src/utils/cx.ts
2
+ function cx(...classes) {
3
+ return classes.filter(Boolean).join(" ");
4
+ }
5
+ //#endregion
6
+ export { cx };