@cleen/ui-core 0.1.0 → 0.1.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.
- package/README.md +40 -0
- package/dist/index.d.ts +258 -0
- package/dist/index.js +758 -0
- package/dist/styles.css +4560 -0
- package/package.json +42 -42
- package/tailwind-entry.css +81 -81
- package/tailwind.config.js +10 -10
- package/tailwind.preset.js +30 -30
- package/src/hooks/useAnimateNumber.ts +0 -56
- package/src/hooks/useControlled.ts +0 -40
- package/src/hooks/useDebounce.ts +0 -17
- package/src/hooks/useDisclosure.ts +0 -33
- package/src/hooks/useForm.ts +0 -38
- package/src/hooks/useOutsideClick.ts +0 -42
- package/src/hooks/usePaginationState.ts +0 -39
- package/src/hooks/usePositionClose.ts +0 -69
- package/src/hooks/useValidation.ts +0 -33
- package/src/hooks/useWatchResize.ts +0 -52
- package/src/index.ts +0 -21
- package/src/store/colors.ts +0 -98
- package/src/types/position.ts +0 -9
- package/src/types/styles.ts +0 -24
- package/src/types/utils.ts +0 -6
- package/src/utils/audio.ts +0 -69
- package/src/utils/cn.ts +0 -13
- package/src/utils/colors.ts +0 -159
- package/src/utils/images.ts +0 -42
- package/src/utils/object.ts +0 -86
- package/src/utils/position.ts +0 -140
- package/src/utils/string.ts +0 -27
- package/styles/react-day-styles.css +0 -457
- package/tsconfig.json +0 -27
- package/tsup.config.ts +0 -10
package/src/utils/position.ts
DELETED
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
import type { Position } from '@/types/position';
|
|
2
|
-
|
|
3
|
-
// Neat lil' helper to calculate the optimal position based on viewport
|
|
4
|
-
export const calculateOptimalPosition = (
|
|
5
|
-
overlayRect: DOMRect,
|
|
6
|
-
triggerRect: DOMRect,
|
|
7
|
-
preferredPosition: Position
|
|
8
|
-
): Position => {
|
|
9
|
-
const viewport = {
|
|
10
|
-
width: window.innerWidth,
|
|
11
|
-
height: window.innerHeight,
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
let newPosition = preferredPosition;
|
|
15
|
-
|
|
16
|
-
// Handle side positions (left/right)
|
|
17
|
-
if (preferredPosition === 'left' || preferredPosition === 'right') {
|
|
18
|
-
const isLeft = preferredPosition === 'left';
|
|
19
|
-
const spaceLeft = triggerRect.left;
|
|
20
|
-
const spaceRight = viewport.width - triggerRect.right;
|
|
21
|
-
|
|
22
|
-
if (
|
|
23
|
-
isLeft &&
|
|
24
|
-
spaceLeft < overlayRect.width &&
|
|
25
|
-
spaceRight > overlayRect.width
|
|
26
|
-
) {
|
|
27
|
-
return 'right';
|
|
28
|
-
} else if (
|
|
29
|
-
!isLeft &&
|
|
30
|
-
spaceRight < overlayRect.width &&
|
|
31
|
-
spaceLeft > overlayRect.width
|
|
32
|
-
) {
|
|
33
|
-
return 'left';
|
|
34
|
-
}
|
|
35
|
-
return newPosition;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// Check vertical bounds for top/bottom positions
|
|
39
|
-
const isBottom = preferredPosition.startsWith('bottom');
|
|
40
|
-
const spaceBelow = viewport.height - triggerRect.bottom;
|
|
41
|
-
const spaceAbove = triggerRect.top;
|
|
42
|
-
|
|
43
|
-
if (
|
|
44
|
-
isBottom &&
|
|
45
|
-
spaceBelow < overlayRect.height &&
|
|
46
|
-
spaceAbove > overlayRect.height
|
|
47
|
-
) {
|
|
48
|
-
newPosition = preferredPosition.replace('bottom', 'top') as Position;
|
|
49
|
-
} else if (
|
|
50
|
-
!isBottom &&
|
|
51
|
-
preferredPosition.startsWith('top') &&
|
|
52
|
-
spaceAbove < overlayRect.height &&
|
|
53
|
-
spaceBelow > overlayRect.height
|
|
54
|
-
) {
|
|
55
|
-
newPosition = preferredPosition.replace('top', 'bottom') as Position;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
// Check horizontal bounds for corner positions
|
|
59
|
-
if (preferredPosition.includes('-')) {
|
|
60
|
-
const isLeft = preferredPosition.endsWith('left');
|
|
61
|
-
const spaceRight = viewport.width - triggerRect.right;
|
|
62
|
-
const spaceLeft = triggerRect.left;
|
|
63
|
-
|
|
64
|
-
if (
|
|
65
|
-
isLeft &&
|
|
66
|
-
spaceRight < overlayRect.width &&
|
|
67
|
-
spaceLeft > overlayRect.width
|
|
68
|
-
) {
|
|
69
|
-
newPosition = newPosition.replace('left', 'right') as Position;
|
|
70
|
-
} else if (
|
|
71
|
-
!isLeft &&
|
|
72
|
-
spaceRight < overlayRect.width &&
|
|
73
|
-
spaceLeft > overlayRect.width
|
|
74
|
-
) {
|
|
75
|
-
newPosition = newPosition.replace('right', 'left') as Position;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
return newPosition;
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
// Calculate the top/left values based on the final position
|
|
83
|
-
export const calculatePositionValues = (
|
|
84
|
-
overlayRect: DOMRect,
|
|
85
|
-
triggerRect: DOMRect,
|
|
86
|
-
position: Position,
|
|
87
|
-
offset?: number
|
|
88
|
-
) => {
|
|
89
|
-
if (!triggerRect) {
|
|
90
|
-
return { top: 0, left: 0 };
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
const scrollY = window.scrollY;
|
|
94
|
-
const scrollX = window.scrollX;
|
|
95
|
-
const gap = offset || 0;
|
|
96
|
-
|
|
97
|
-
// Handle vertical positioning (top/bottom)
|
|
98
|
-
let top = 0;
|
|
99
|
-
if (position.startsWith('bottom')) {
|
|
100
|
-
top = triggerRect.bottom + scrollY + gap;
|
|
101
|
-
} else if (position.startsWith('top')) {
|
|
102
|
-
top = triggerRect.top + scrollY - (overlayRect?.height || 0) - gap;
|
|
103
|
-
} else {
|
|
104
|
-
// left/right positions - vertically center
|
|
105
|
-
top =
|
|
106
|
-
triggerRect.top +
|
|
107
|
-
scrollY +
|
|
108
|
-
triggerRect.height / 2 -
|
|
109
|
-
(overlayRect?.height || 0) / 2;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
// Handle horizontal positioning (left/right)
|
|
113
|
-
let left = 0;
|
|
114
|
-
if (position === 'left') {
|
|
115
|
-
// Pure "left" - place overlay outside to the left of trigger
|
|
116
|
-
left = triggerRect.left + scrollX - (overlayRect?.width || 0) - gap;
|
|
117
|
-
} else if (position === 'right') {
|
|
118
|
-
// Pure "right" - place overlay outside to the right of trigger
|
|
119
|
-
left = triggerRect.right + scrollX + gap;
|
|
120
|
-
} else if (
|
|
121
|
-
position.endsWith('left') ||
|
|
122
|
-
position === 'bottom' ||
|
|
123
|
-
position === 'top'
|
|
124
|
-
) {
|
|
125
|
-
left = triggerRect.left + scrollX;
|
|
126
|
-
} else if (position.endsWith('right')) {
|
|
127
|
-
left = triggerRect.right + scrollX - (overlayRect?.width || 0);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
// Special handling for centered positions
|
|
131
|
-
if (position === 'bottom' || position === 'top') {
|
|
132
|
-
left =
|
|
133
|
-
triggerRect.left +
|
|
134
|
-
scrollX +
|
|
135
|
-
triggerRect.width / 2 -
|
|
136
|
-
(overlayRect?.width || 0) / 2;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
return { top, left };
|
|
140
|
-
};
|
package/src/utils/string.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export const formatFileSize = (bytes?: number) => {
|
|
2
|
-
if (bytes === 0 || !bytes) {
|
|
3
|
-
return '0 B';
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
const k = 1024;
|
|
7
|
-
const sizes = ['B', 'KB', 'MB', 'GB', 'TB'];
|
|
8
|
-
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
9
|
-
return Math.round(bytes / Math.pow(k, i)) + ' ' + sizes[i];
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
// Calculate "mm:ss" from seconds
|
|
13
|
-
export const formatAudioTime = (seconds: number): string => {
|
|
14
|
-
const mins = Math.floor(seconds / 60);
|
|
15
|
-
const secs = Math.floor(seconds % 60);
|
|
16
|
-
return `${String(mins).padStart(2, '0')}:${String(secs).padStart(2, '0')}`;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
// Calculate "created X days ago"
|
|
20
|
-
export const getCreatedDate = (date: string) => {
|
|
21
|
-
const created = new Date(date);
|
|
22
|
-
const now = new Date();
|
|
23
|
-
|
|
24
|
-
const diffTime = Math.abs(now.getTime() - created.getTime());
|
|
25
|
-
const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
|
|
26
|
-
return `Created ${diffDays} days ago`;
|
|
27
|
-
};
|
|
@@ -1,457 +0,0 @@
|
|
|
1
|
-
/* Variables declaration */
|
|
2
|
-
.rdp-root {
|
|
3
|
-
--rdp-accent-color: blue; /* The accent color used for selected days and UI elements. */
|
|
4
|
-
--rdp-accent-background-color: #f0f0ff; /* The accent background color used for selected days and UI elements. */
|
|
5
|
-
|
|
6
|
-
--rdp-day-height: 44px; /* The height of the day cells. */
|
|
7
|
-
--rdp-day-width: 44px; /* The width of the day cells. */
|
|
8
|
-
|
|
9
|
-
--rdp-day_button-border-radius: 100%; /* The border radius of the day cells. */
|
|
10
|
-
--rdp-day_button-border: 2px solid transparent; /* The border of the day cells. */
|
|
11
|
-
--rdp-day_button-height: 42px; /* The height of the day cells. */
|
|
12
|
-
--rdp-day_button-width: 42px; /* The width of the day cells. */
|
|
13
|
-
|
|
14
|
-
--rdp-selected-border: 2px solid var(--rdp-accent-color); /* The border of the selected days. */
|
|
15
|
-
--rdp-disabled-opacity: 0.5; /* The opacity of the disabled days. */
|
|
16
|
-
--rdp-outside-opacity: 0.75; /* The opacity of the days outside the current month. */
|
|
17
|
-
--rdp-today-color: var(--rdp-accent-color); /* The color of the today's date. */
|
|
18
|
-
|
|
19
|
-
--rdp-dropdown-gap: 0.5rem; /* The gap between the dropdowns used in the month captons. */
|
|
20
|
-
|
|
21
|
-
--rdp-months-gap: 2rem; /* The gap between the months in the multi-month view. */
|
|
22
|
-
|
|
23
|
-
--rdp-nav_button-disabled-opacity: 0.5; /* The opacity of the disabled navigation buttons. */
|
|
24
|
-
--rdp-nav_button-height: 2.25rem; /* The height of the navigation buttons. */
|
|
25
|
-
--rdp-nav_button-width: 2.25rem; /* The width of the navigation buttons. */
|
|
26
|
-
--rdp-nav-height: 2.75rem; /* The height of the navigation bar. */
|
|
27
|
-
|
|
28
|
-
--rdp-range_middle-background-color: var(--rdp-accent-background-color); /* The color of the background for days in the middle of a range. */
|
|
29
|
-
--rdp-range_middle-color: inherit; /* The color of the range text. */
|
|
30
|
-
|
|
31
|
-
--rdp-range_start-color: white; /* The color of the range text. */
|
|
32
|
-
--rdp-range_start-background: linear-gradient(
|
|
33
|
-
var(--rdp-gradient-direction),
|
|
34
|
-
transparent 50%,
|
|
35
|
-
var(--rdp-range_middle-background-color) 50%
|
|
36
|
-
); /* Used for the background of the start of the selected range. */
|
|
37
|
-
--rdp-range_start-date-background-color: var(--rdp-accent-color); /* The background color of the date when at the start of the selected range. */
|
|
38
|
-
|
|
39
|
-
--rdp-range_end-background: linear-gradient(
|
|
40
|
-
var(--rdp-gradient-direction),
|
|
41
|
-
var(--rdp-range_middle-background-color) 50%,
|
|
42
|
-
transparent 50%
|
|
43
|
-
); /* Used for the background of the end of the selected range. */
|
|
44
|
-
--rdp-range_end-color: white; /* The color of the range text. */
|
|
45
|
-
--rdp-range_end-date-background-color: var(--rdp-accent-color); /* The background color of the date when at the end of the selected range. */
|
|
46
|
-
|
|
47
|
-
--rdp-week_number-border-radius: 100%; /* The border radius of the week number. */
|
|
48
|
-
--rdp-week_number-border: 2px solid transparent; /* The border of the week number. */
|
|
49
|
-
|
|
50
|
-
--rdp-week_number-height: var(--rdp-day-height); /* The height of the week number cells. */
|
|
51
|
-
--rdp-week_number-opacity: 0.75; /* The opacity of the week number. */
|
|
52
|
-
--rdp-week_number-width: var(--rdp-day-width); /* The width of the week number cells. */
|
|
53
|
-
--rdp-weeknumber-text-align: center; /* The text alignment of the weekday cells. */
|
|
54
|
-
|
|
55
|
-
--rdp-weekday-opacity: 0.75; /* The opacity of the weekday. */
|
|
56
|
-
--rdp-weekday-padding: 0.5rem 0rem; /* The padding of the weekday. */
|
|
57
|
-
--rdp-weekday-text-align: center; /* The text alignment of the weekday cells. */
|
|
58
|
-
|
|
59
|
-
--rdp-gradient-direction: 90deg;
|
|
60
|
-
|
|
61
|
-
--rdp-animation_duration: 0.3s;
|
|
62
|
-
--rdp-animation_timing: cubic-bezier(0.4, 0, 0.2, 1);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.rdp-root[dir="rtl"] {
|
|
66
|
-
--rdp-gradient-direction: -90deg;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.rdp-root[data-broadcast-calendar="true"] {
|
|
70
|
-
--rdp-outside-opacity: unset;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/* Root of the component. */
|
|
74
|
-
.rdp-root {
|
|
75
|
-
position: relative; /* Required to position the navigation toolbar. */
|
|
76
|
-
box-sizing: border-box;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.rdp-root * {
|
|
80
|
-
box-sizing: border-box;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.rdp-day {
|
|
84
|
-
width: var(--rdp-day-width);
|
|
85
|
-
height: var(--rdp-day-height);
|
|
86
|
-
text-align: center;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.rdp-day_button {
|
|
90
|
-
background: none;
|
|
91
|
-
padding: 0;
|
|
92
|
-
margin: 0;
|
|
93
|
-
cursor: pointer;
|
|
94
|
-
font: inherit;
|
|
95
|
-
color: inherit;
|
|
96
|
-
justify-content: center;
|
|
97
|
-
align-items: center;
|
|
98
|
-
display: flex;
|
|
99
|
-
|
|
100
|
-
width: var(--rdp-day_button-width);
|
|
101
|
-
height: var(--rdp-day_button-height);
|
|
102
|
-
border: var(--rdp-day_button-border);
|
|
103
|
-
border-radius: var(--rdp-day_button-border-radius);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.rdp-day_button:disabled {
|
|
107
|
-
cursor: revert;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.rdp-caption_label {
|
|
111
|
-
z-index: 1;
|
|
112
|
-
|
|
113
|
-
position: relative;
|
|
114
|
-
display: inline-flex;
|
|
115
|
-
align-items: center;
|
|
116
|
-
|
|
117
|
-
white-space: nowrap;
|
|
118
|
-
border: 0;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.rdp-dropdown:focus-visible ~ .rdp-caption_label {
|
|
122
|
-
outline: 5px auto Highlight;
|
|
123
|
-
/* biome-ignore lint/suspicious/noDuplicateProperties: backward compatibility */
|
|
124
|
-
outline: 5px auto -webkit-focus-ring-color;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.rdp-button_next,
|
|
128
|
-
.rdp-button_previous {
|
|
129
|
-
border: none;
|
|
130
|
-
background: none;
|
|
131
|
-
padding: 0;
|
|
132
|
-
margin: 0;
|
|
133
|
-
cursor: pointer;
|
|
134
|
-
font: inherit;
|
|
135
|
-
color: inherit;
|
|
136
|
-
-moz-appearance: none;
|
|
137
|
-
-webkit-appearance: none;
|
|
138
|
-
display: inline-flex;
|
|
139
|
-
align-items: center;
|
|
140
|
-
justify-content: center;
|
|
141
|
-
position: relative;
|
|
142
|
-
appearance: none;
|
|
143
|
-
|
|
144
|
-
width: var(--rdp-nav_button-width);
|
|
145
|
-
height: var(--rdp-nav_button-height);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
.rdp-button_next:disabled,
|
|
149
|
-
.rdp-button_next[aria-disabled="true"],
|
|
150
|
-
.rdp-button_previous:disabled,
|
|
151
|
-
.rdp-button_previous[aria-disabled="true"] {
|
|
152
|
-
cursor: revert;
|
|
153
|
-
|
|
154
|
-
opacity: var(--rdp-nav_button-disabled-opacity);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.rdp-chevron {
|
|
158
|
-
display: inline-block;
|
|
159
|
-
fill: var(--rdp-accent-color);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
.rdp-root[dir="rtl"] .rdp-nav .rdp-chevron {
|
|
163
|
-
transform: rotate(180deg);
|
|
164
|
-
transform-origin: 50%;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
.rdp-dropdowns {
|
|
168
|
-
position: relative;
|
|
169
|
-
display: inline-flex;
|
|
170
|
-
align-items: center;
|
|
171
|
-
gap: var(--rdp-dropdown-gap);
|
|
172
|
-
}
|
|
173
|
-
.rdp-dropdown {
|
|
174
|
-
z-index: 2;
|
|
175
|
-
|
|
176
|
-
/* Reset */
|
|
177
|
-
opacity: 0;
|
|
178
|
-
appearance: none;
|
|
179
|
-
position: absolute;
|
|
180
|
-
inset-block-start: 0;
|
|
181
|
-
inset-block-end: 0;
|
|
182
|
-
inset-inline-start: 0;
|
|
183
|
-
width: 100%;
|
|
184
|
-
margin: 0;
|
|
185
|
-
padding: 0;
|
|
186
|
-
cursor: inherit;
|
|
187
|
-
border: none;
|
|
188
|
-
line-height: inherit;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
.rdp-dropdown_root {
|
|
192
|
-
position: relative;
|
|
193
|
-
display: inline-flex;
|
|
194
|
-
align-items: center;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
.rdp-dropdown_root[data-disabled="true"] .rdp-chevron {
|
|
198
|
-
opacity: var(--rdp-disabled-opacity);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
.rdp-month_caption {
|
|
202
|
-
display: flex;
|
|
203
|
-
align-content: center;
|
|
204
|
-
height: var(--rdp-nav-height);
|
|
205
|
-
font-weight: bold;
|
|
206
|
-
font-size: large;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
.rdp-root[data-nav-layout="around"] .rdp-month,
|
|
210
|
-
.rdp-root[data-nav-layout="after"] .rdp-month {
|
|
211
|
-
position: relative;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
.rdp-root[data-nav-layout="around"] .rdp-month_caption {
|
|
215
|
-
justify-content: center;
|
|
216
|
-
margin-inline-start: var(--rdp-nav_button-width);
|
|
217
|
-
margin-inline-end: var(--rdp-nav_button-width);
|
|
218
|
-
position: relative;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
.rdp-root[data-nav-layout="around"] .rdp-button_previous {
|
|
222
|
-
position: absolute;
|
|
223
|
-
inset-inline-start: 0;
|
|
224
|
-
top: 0;
|
|
225
|
-
height: var(--rdp-nav-height);
|
|
226
|
-
display: inline-flex;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
.rdp-root[data-nav-layout="around"] .rdp-button_next {
|
|
230
|
-
position: absolute;
|
|
231
|
-
inset-inline-end: 0;
|
|
232
|
-
top: 0;
|
|
233
|
-
height: var(--rdp-nav-height);
|
|
234
|
-
display: inline-flex;
|
|
235
|
-
justify-content: center;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
.rdp-months {
|
|
239
|
-
position: relative;
|
|
240
|
-
display: flex;
|
|
241
|
-
flex-wrap: wrap;
|
|
242
|
-
gap: var(--rdp-months-gap);
|
|
243
|
-
max-width: fit-content;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
.rdp-month_grid {
|
|
247
|
-
border-collapse: collapse;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
.rdp-nav {
|
|
251
|
-
position: absolute;
|
|
252
|
-
inset-block-start: 0;
|
|
253
|
-
inset-inline-end: 0;
|
|
254
|
-
|
|
255
|
-
display: flex;
|
|
256
|
-
align-items: center;
|
|
257
|
-
|
|
258
|
-
height: var(--rdp-nav-height);
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
.rdp-weekday {
|
|
262
|
-
opacity: var(--rdp-weekday-opacity);
|
|
263
|
-
padding: var(--rdp-weekday-padding);
|
|
264
|
-
font-weight: 500;
|
|
265
|
-
font-size: smaller;
|
|
266
|
-
text-align: var(--rdp-weekday-text-align);
|
|
267
|
-
text-transform: var(--rdp-weekday-text-transform);
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
.rdp-week_number {
|
|
271
|
-
opacity: var(--rdp-week_number-opacity);
|
|
272
|
-
font-weight: 400;
|
|
273
|
-
font-size: small;
|
|
274
|
-
height: var(--rdp-week_number-height);
|
|
275
|
-
width: var(--rdp-week_number-width);
|
|
276
|
-
border: var(--rdp-week_number-border);
|
|
277
|
-
border-radius: var(--rdp-week_number-border-radius);
|
|
278
|
-
text-align: var(--rdp-weeknumber-text-align);
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
/* DAY MODIFIERS */
|
|
282
|
-
.rdp-today:not(.rdp-outside) {
|
|
283
|
-
color: var(--rdp-today-color);
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
.rdp-selected {
|
|
287
|
-
font-weight: bold;
|
|
288
|
-
font-size: large;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
.rdp-selected .rdp-day_button {
|
|
292
|
-
border: var(--rdp-selected-border);
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
.rdp-outside {
|
|
296
|
-
opacity: var(--rdp-outside-opacity);
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
.rdp-disabled {
|
|
300
|
-
opacity: var(--rdp-disabled-opacity);
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
.rdp-hidden {
|
|
304
|
-
visibility: hidden;
|
|
305
|
-
color: var(--rdp-range_start-color);
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
.rdp-range_start {
|
|
309
|
-
background: var(--rdp-range_start-background);
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
.rdp-range_start .rdp-day_button {
|
|
313
|
-
background-color: var(--rdp-range_start-date-background-color);
|
|
314
|
-
color: var(--rdp-range_start-color);
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
.rdp-range_middle {
|
|
318
|
-
background-color: var(--rdp-range_middle-background-color);
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
.rdp-range_middle .rdp-day_button {
|
|
322
|
-
border: unset;
|
|
323
|
-
border-radius: unset;
|
|
324
|
-
color: var(--rdp-range_middle-color);
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
.rdp-range_end {
|
|
328
|
-
background: var(--rdp-range_end-background);
|
|
329
|
-
color: var(--rdp-range_end-color);
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
.rdp-range_end .rdp-day_button {
|
|
333
|
-
color: var(--rdp-range_start-color);
|
|
334
|
-
background-color: var(--rdp-range_end-date-background-color);
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
.rdp-range_start.rdp-range_end {
|
|
338
|
-
background: revert;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
.rdp-focusable {
|
|
342
|
-
cursor: pointer;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
@keyframes rdp-slide_in_left {
|
|
346
|
-
0% {
|
|
347
|
-
transform: translateX(-100%);
|
|
348
|
-
}
|
|
349
|
-
100% {
|
|
350
|
-
transform: translateX(0);
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
@keyframes rdp-slide_in_right {
|
|
355
|
-
0% {
|
|
356
|
-
transform: translateX(100%);
|
|
357
|
-
}
|
|
358
|
-
100% {
|
|
359
|
-
transform: translateX(0);
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
@keyframes rdp-slide_out_left {
|
|
364
|
-
0% {
|
|
365
|
-
transform: translateX(0);
|
|
366
|
-
}
|
|
367
|
-
100% {
|
|
368
|
-
transform: translateX(-100%);
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
@keyframes rdp-slide_out_right {
|
|
373
|
-
0% {
|
|
374
|
-
transform: translateX(0);
|
|
375
|
-
}
|
|
376
|
-
100% {
|
|
377
|
-
transform: translateX(100%);
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
.rdp-weeks_before_enter {
|
|
382
|
-
animation: rdp-slide_in_left var(--rdp-animation_duration)
|
|
383
|
-
var(--rdp-animation_timing) forwards;
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
.rdp-weeks_before_exit {
|
|
387
|
-
animation: rdp-slide_out_left var(--rdp-animation_duration)
|
|
388
|
-
var(--rdp-animation_timing) forwards;
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
.rdp-weeks_after_enter {
|
|
392
|
-
animation: rdp-slide_in_right var(--rdp-animation_duration)
|
|
393
|
-
var(--rdp-animation_timing) forwards;
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
.rdp-weeks_after_exit {
|
|
397
|
-
animation: rdp-slide_out_right var(--rdp-animation_duration)
|
|
398
|
-
var(--rdp-animation_timing) forwards;
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
.rdp-root[dir="rtl"] .rdp-weeks_after_enter {
|
|
402
|
-
animation: rdp-slide_in_left var(--rdp-animation_duration)
|
|
403
|
-
var(--rdp-animation_timing) forwards;
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
.rdp-root[dir="rtl"] .rdp-weeks_before_exit {
|
|
407
|
-
animation: rdp-slide_out_right var(--rdp-animation_duration)
|
|
408
|
-
var(--rdp-animation_timing) forwards;
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
.rdp-root[dir="rtl"] .rdp-weeks_before_enter {
|
|
412
|
-
animation: rdp-slide_in_right var(--rdp-animation_duration)
|
|
413
|
-
var(--rdp-animation_timing) forwards;
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
.rdp-root[dir="rtl"] .rdp-weeks_after_exit {
|
|
417
|
-
animation: rdp-slide_out_left var(--rdp-animation_duration)
|
|
418
|
-
var(--rdp-animation_timing) forwards;
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
@keyframes rdp-fade_in {
|
|
422
|
-
from {
|
|
423
|
-
opacity: 0;
|
|
424
|
-
}
|
|
425
|
-
to {
|
|
426
|
-
opacity: 1;
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
@keyframes rdp-fade_out {
|
|
431
|
-
from {
|
|
432
|
-
opacity: 1;
|
|
433
|
-
}
|
|
434
|
-
to {
|
|
435
|
-
opacity: 0;
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
.rdp-caption_after_enter {
|
|
440
|
-
animation: rdp-fade_in var(--rdp-animation_duration)
|
|
441
|
-
var(--rdp-animation_timing) forwards;
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
.rdp-caption_after_exit {
|
|
445
|
-
animation: rdp-fade_out var(--rdp-animation_duration)
|
|
446
|
-
var(--rdp-animation_timing) forwards;
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
.rdp-caption_before_enter {
|
|
450
|
-
animation: rdp-fade_in var(--rdp-animation_duration)
|
|
451
|
-
var(--rdp-animation_timing) forwards;
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
.rdp-caption_before_exit {
|
|
455
|
-
animation: rdp-fade_out var(--rdp-animation_duration)
|
|
456
|
-
var(--rdp-animation_timing) forwards;
|
|
457
|
-
}
|
package/tsconfig.json
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2022",
|
|
4
|
-
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
5
|
-
"module": "ESNext",
|
|
6
|
-
"moduleResolution": "bundler",
|
|
7
|
-
"allowImportingTsExtensions": true,
|
|
8
|
-
"verbatimModuleSyntax": true,
|
|
9
|
-
"moduleDetection": "force",
|
|
10
|
-
"noEmit": true,
|
|
11
|
-
"jsx": "react-jsx",
|
|
12
|
-
"strict": true,
|
|
13
|
-
"noUnusedLocals": true,
|
|
14
|
-
"noUnusedParameters": true,
|
|
15
|
-
"noFallthroughCasesInSwitch": true,
|
|
16
|
-
|
|
17
|
-
// Urls
|
|
18
|
-
"baseUrl": ".",
|
|
19
|
-
"paths": {
|
|
20
|
-
"@/*": ["src/*"]
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
// For types in watch mode
|
|
24
|
-
"outDir": "./dist"
|
|
25
|
-
},
|
|
26
|
-
"include": ["src"]
|
|
27
|
-
}
|