@m5kdev/web-ui 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.
- package/LICENSE +621 -0
- package/README.md +17 -0
- package/package.json +169 -0
- package/src/animations/card.motion.ts +9 -0
- package/src/components/AvatarUpload.tsx +133 -0
- package/src/components/Button.tsx +14 -0
- package/src/components/Calendar.css +684 -0
- package/src/components/Calendar.tsx +32 -0
- package/src/components/CardsSelect.tsx +155 -0
- package/src/components/CollapsibleSidebarMenuItem.tsx +57 -0
- package/src/components/ColorPicker.tsx +56 -0
- package/src/components/CopyButton.tsx +45 -0
- package/src/components/CropDialog.tsx +154 -0
- package/src/components/DialogProvider.tsx +105 -0
- package/src/components/ErrorFallback.tsx +17 -0
- package/src/components/FileDropzone.tsx +120 -0
- package/src/components/MultiSelectDropdown.tsx +233 -0
- package/src/components/Orb.tsx +288 -0
- package/src/components/PageAlert.tsx +121 -0
- package/src/components/SelectChips.tsx +40 -0
- package/src/components/SidebarItem.tsx +26 -0
- package/src/components/Steps.tsx +340 -0
- package/src/components/TablerIconPicker.tsx +4260 -0
- package/src/components/app-header.tsx +40 -0
- package/src/components/blur-card.tsx +132 -0
- package/src/components/features-section-demo-1.tsx +127 -0
- package/src/components/features-section-demo-2.tsx +102 -0
- package/src/components/features-section-demo-3.tsx +272 -0
- package/src/components/mode-toggle.tsx +31 -0
- package/src/components/nav-main.tsx +69 -0
- package/src/components/pricing-cards.tsx +133 -0
- package/src/components/shared/ButtonCopy.tsx +50 -0
- package/src/components/team-switcher.tsx +83 -0
- package/src/components/theme-provider.tsx +74 -0
- package/src/components/typewriter.tsx +90 -0
- package/src/components/ui/alert-dialog.tsx +133 -0
- package/src/components/ui/alert.tsx +60 -0
- package/src/components/ui/avatar.tsx +47 -0
- package/src/components/ui/badge.tsx +33 -0
- package/src/components/ui/bento-grid.tsx +54 -0
- package/src/components/ui/bento-grid2.tsx +66 -0
- package/src/components/ui/breadcrumb.tsx +101 -0
- package/src/components/ui/button.tsx +50 -0
- package/src/components/ui/card.tsx +55 -0
- package/src/components/ui/checkbox.tsx +26 -0
- package/src/components/ui/collapsible.tsx +9 -0
- package/src/components/ui/dialog.tsx +119 -0
- package/src/components/ui/dropdown-menu.tsx +186 -0
- package/src/components/ui/floating-navbar.tsx +78 -0
- package/src/components/ui/form.tsx +167 -0
- package/src/components/ui/image.tsx +55 -0
- package/src/components/ui/input.tsx +22 -0
- package/src/components/ui/label.tsx +19 -0
- package/src/components/ui/pagination.tsx +105 -0
- package/src/components/ui/progress.tsx +23 -0
- package/src/components/ui/resizable-navbar.tsx +260 -0
- package/src/components/ui/segment-control.tsx +143 -0
- package/src/components/ui/select.tsx +153 -0
- package/src/components/ui/separator.tsx +24 -0
- package/src/components/ui/sheet.tsx +121 -0
- package/src/components/ui/sidebar.tsx +736 -0
- package/src/components/ui/skeleton.tsx +7 -0
- package/src/components/ui/slider.tsx +23 -0
- package/src/components/ui/sonner.tsx +27 -0
- package/src/components/ui/spinner.tsx +45 -0
- package/src/components/ui/switch.tsx +27 -0
- package/src/components/ui/table.tsx +90 -0
- package/src/components/ui/tabs.tsx +52 -0
- package/src/components/ui/textarea.tsx +18 -0
- package/src/components/ui/timeline.tsx +95 -0
- package/src/components/ui/toast.tsx +126 -0
- package/src/components/ui/tooltip.tsx +55 -0
- package/src/components/ui/typewriter-effect.tsx +181 -0
- package/src/hooks/use-mobile.ts +19 -0
- package/src/hooks/useDialog.ts +25 -0
- package/src/icons/GoogleIcon.tsx +32 -0
- package/src/icons/LinkedInIcon.tsx +30 -0
- package/src/icons/MicrosoftIcon.tsx +21 -0
- package/src/lib/chatwoot.ts +51 -0
- package/src/lib/utils.ts +6 -0
- package/src/modules/app/components/AppLoader.tsx +9 -0
- package/src/modules/app/components/AppShell.tsx +21 -0
- package/src/modules/app/components/AppSidebar.tsx +26 -0
- package/src/modules/app/components/AppSidebarContent.tsx +73 -0
- package/src/modules/app/components/AppSidebarHeader.tsx +57 -0
- package/src/modules/app/components/AppSidebarInvites.tsx +32 -0
- package/src/modules/app/components/AppSidebarUser.tsx +128 -0
- package/src/modules/auth/components/AdminUserManagement.tsx +1136 -0
- package/src/modules/auth/components/AdminWaitlist.tsx +358 -0
- package/src/modules/auth/components/AuthLayout.tsx +13 -0
- package/src/modules/auth/components/AuthProviders.tsx +105 -0
- package/src/modules/auth/components/AuthRouter.tsx +29 -0
- package/src/modules/auth/components/ClaimAccountRoute.tsx +242 -0
- package/src/modules/auth/components/ErrorAuthRoute.tsx +121 -0
- package/src/modules/auth/components/ForgotPasswordForm.tsx +58 -0
- package/src/modules/auth/components/ForgotPasswordRoute.tsx +27 -0
- package/src/modules/auth/components/InviteFriends.tsx +273 -0
- package/src/modules/auth/components/LastUsedBadge.tsx +22 -0
- package/src/modules/auth/components/LoginForm.tsx +104 -0
- package/src/modules/auth/components/LoginRoute.tsx +31 -0
- package/src/modules/auth/components/LogoutRoute.tsx +21 -0
- package/src/modules/auth/components/OrganizationAcceptInvitationRoute.tsx +161 -0
- package/src/modules/auth/components/OrganizationMembersRoute.tsx +730 -0
- package/src/modules/auth/components/OrganizationSettingsRoute.tsx +280 -0
- package/src/modules/auth/components/OrganizationSwitcher.tsx +148 -0
- package/src/modules/auth/components/ProfileRoute.tsx +104 -0
- package/src/modules/auth/components/RangeNuqsDatePicker.tsx +365 -0
- package/src/modules/auth/components/ResetPasswordForm.tsx +103 -0
- package/src/modules/auth/components/ResetPasswordRoute.tsx +27 -0
- package/src/modules/auth/components/SignupFormRoute.tsx +189 -0
- package/src/modules/auth/components/SignupRoute.tsx +53 -0
- package/src/modules/auth/components/UserPreferences.tsx +144 -0
- package/src/modules/auth/components/WaitlistCard.tsx +78 -0
- package/src/modules/auth/components/WaitlistCodeValidation.tsx +79 -0
- package/src/modules/billing/components/BillingBetaPage.tsx +124 -0
- package/src/modules/billing/components/BillingInvoicePage.tsx +180 -0
- package/src/modules/billing/components/BillingPlanSelect.tsx +14 -0
- package/src/modules/billing/components/BillingRouter.tsx +20 -0
- package/src/modules/billing/components/BillingSinglePlanSelect.tsx +172 -0
- package/src/modules/table/components/ColumnOrderAndVisibility.tsx +127 -0
- package/src/modules/table/components/NuqsTable.tsx +396 -0
- package/src/modules/table/components/TableFiltering.tsx +520 -0
- package/src/modules/table/components/TablePagination.tsx +59 -0
- package/src/modules/table/components/table.types.ts +11 -0
- package/src/modules/table/filterTransformers.ts +323 -0
- package/src/types.ts +4 -0
- package/src/vite-env.d.ts +1 -0
|
@@ -0,0 +1,684 @@
|
|
|
1
|
+
.rbc-btn {
|
|
2
|
+
color: inherit;
|
|
3
|
+
font: inherit;
|
|
4
|
+
margin: 0;
|
|
5
|
+
}
|
|
6
|
+
button.rbc-btn {
|
|
7
|
+
overflow: visible;
|
|
8
|
+
text-transform: none;
|
|
9
|
+
-webkit-appearance: button;
|
|
10
|
+
cursor: pointer;
|
|
11
|
+
}
|
|
12
|
+
button[disabled].rbc-btn {
|
|
13
|
+
cursor: not-allowed;
|
|
14
|
+
}
|
|
15
|
+
button.rbc-input::-moz-focus-inner {
|
|
16
|
+
border: 0;
|
|
17
|
+
padding: 0;
|
|
18
|
+
}
|
|
19
|
+
.rbc-calendar {
|
|
20
|
+
box-sizing: border-box;
|
|
21
|
+
height: max-content;
|
|
22
|
+
display: -webkit-flex;
|
|
23
|
+
display: -ms-flexbox;
|
|
24
|
+
display: flex;
|
|
25
|
+
-webkit-flex-direction: column;
|
|
26
|
+
-ms-flex-direction: column;
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
-webkit-align-items: stretch;
|
|
29
|
+
-ms-flex-align: stretch;
|
|
30
|
+
align-items: stretch;
|
|
31
|
+
}
|
|
32
|
+
.rbc-calendar *,
|
|
33
|
+
.rbc-calendar *:before,
|
|
34
|
+
.rbc-calendar *:after {
|
|
35
|
+
box-sizing: inherit;
|
|
36
|
+
}
|
|
37
|
+
.rbc-abs-full,
|
|
38
|
+
.rbc-row-bg {
|
|
39
|
+
overflow: hidden;
|
|
40
|
+
position: absolute;
|
|
41
|
+
top: 0;
|
|
42
|
+
left: 0;
|
|
43
|
+
right: 0;
|
|
44
|
+
bottom: 0;
|
|
45
|
+
}
|
|
46
|
+
.rbc-month-view .rbc-row-bg > .rbc-day-bg:last-child {
|
|
47
|
+
border-right: none;
|
|
48
|
+
}
|
|
49
|
+
.rbc-month-view > .rbc-month-header > .rbc-header:last-child {
|
|
50
|
+
border-right: none;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.rbc-ellipsis,
|
|
54
|
+
.rbc-event-label,
|
|
55
|
+
.rbc-row-segment .rbc-event-content,
|
|
56
|
+
.rbc-show-more {
|
|
57
|
+
display: block;
|
|
58
|
+
overflow: hidden;
|
|
59
|
+
text-overflow: ellipsis;
|
|
60
|
+
white-space: nowrap;
|
|
61
|
+
}
|
|
62
|
+
.rbc-rtl {
|
|
63
|
+
direction: rtl;
|
|
64
|
+
}
|
|
65
|
+
.rbc-off-range {
|
|
66
|
+
color: var(--muted-foreground);
|
|
67
|
+
}
|
|
68
|
+
.rbc-off-range-bg {
|
|
69
|
+
background: var(--muted);
|
|
70
|
+
}
|
|
71
|
+
.rbc-header {
|
|
72
|
+
overflow: hidden;
|
|
73
|
+
-webkit-flex: 1 0 0%;
|
|
74
|
+
-ms-flex: 1 0 0%;
|
|
75
|
+
flex: 1 0 0%;
|
|
76
|
+
text-overflow: ellipsis;
|
|
77
|
+
white-space: nowrap;
|
|
78
|
+
padding: 0 3px;
|
|
79
|
+
text-align: center;
|
|
80
|
+
vertical-align: middle;
|
|
81
|
+
font-weight: bold;
|
|
82
|
+
font-size: 90%;
|
|
83
|
+
min-height: 0;
|
|
84
|
+
border-bottom: 1px solid var(--border);
|
|
85
|
+
border-right: 1px solid var(--border);
|
|
86
|
+
}
|
|
87
|
+
.rbc-rtl .rbc-header + .rbc-header {
|
|
88
|
+
border-left-width: 0;
|
|
89
|
+
border-right: 1px solid var(--border);
|
|
90
|
+
}
|
|
91
|
+
.rbc-header > a,
|
|
92
|
+
.rbc-header > a:active,
|
|
93
|
+
.rbc-header > a:visited {
|
|
94
|
+
text-decoration: none;
|
|
95
|
+
}
|
|
96
|
+
.rbc-row-content {
|
|
97
|
+
position: relative;
|
|
98
|
+
-moz-user-select: none;
|
|
99
|
+
-ms-user-select: none;
|
|
100
|
+
user-select: none;
|
|
101
|
+
-webkit-user-select: none;
|
|
102
|
+
z-index: 4;
|
|
103
|
+
}
|
|
104
|
+
.rbc-today {
|
|
105
|
+
background-color: var(--muted);
|
|
106
|
+
}
|
|
107
|
+
.rbc-toolbar {
|
|
108
|
+
display: -webkit-flex;
|
|
109
|
+
display: -ms-flexbox;
|
|
110
|
+
display: flex;
|
|
111
|
+
flex-wrap: wrap;
|
|
112
|
+
-webkit-align-items: center;
|
|
113
|
+
-ms-flex-align: center;
|
|
114
|
+
align-items: center;
|
|
115
|
+
margin-bottom: 10px;
|
|
116
|
+
font-size: 16px;
|
|
117
|
+
justify-content: space-between;
|
|
118
|
+
padding: 0 0.25rem 0 0.25rem;
|
|
119
|
+
border-bottom: solid 1px var(--border);
|
|
120
|
+
margin-bottom: 0;
|
|
121
|
+
}
|
|
122
|
+
.rbc-toolbar .rbc-toolbar-label {
|
|
123
|
+
-webkit-flex-grow: 1;
|
|
124
|
+
-ms-flex-positive: 1;
|
|
125
|
+
flex-grow: 1;
|
|
126
|
+
margin: 0 0.25rem;
|
|
127
|
+
text-align: center;
|
|
128
|
+
font-weight: 700;
|
|
129
|
+
min-width: 200px;
|
|
130
|
+
}
|
|
131
|
+
.rbc-btn-group {
|
|
132
|
+
display: inline-block;
|
|
133
|
+
white-space: nowrap;
|
|
134
|
+
}
|
|
135
|
+
.rbc-btn-group > button:first-child:not(:last-child) {
|
|
136
|
+
border-top-right-radius: 0;
|
|
137
|
+
border-bottom-right-radius: 0;
|
|
138
|
+
}
|
|
139
|
+
.rbc-btn-group > button:last-child:not(:first-child) {
|
|
140
|
+
border-top-left-radius: 0;
|
|
141
|
+
border-bottom-left-radius: 0;
|
|
142
|
+
}
|
|
143
|
+
.rbc-rtl .rbc-btn-group > button:first-child:not(:last-child) {
|
|
144
|
+
border-radius: var(--radius);
|
|
145
|
+
border-top-left-radius: 0;
|
|
146
|
+
border-bottom-left-radius: 0;
|
|
147
|
+
}
|
|
148
|
+
.rbc-rtl .rbc-btn-group > button:last-child:not(:first-child) {
|
|
149
|
+
border-radius: var(--radius);
|
|
150
|
+
border-top-right-radius: 0;
|
|
151
|
+
border-bottom-right-radius: 0;
|
|
152
|
+
}
|
|
153
|
+
.rbc-btn-group > button:not(:first-child):not(:last-child) {
|
|
154
|
+
border-radius: 0;
|
|
155
|
+
}
|
|
156
|
+
.rbc-btn-group button + button {
|
|
157
|
+
margin-left: -1px;
|
|
158
|
+
}
|
|
159
|
+
.rbc-rtl .rbc-btn-group button + button {
|
|
160
|
+
margin-left: 0;
|
|
161
|
+
margin-right: -1px;
|
|
162
|
+
}
|
|
163
|
+
.rbc-btn-group + .rbc-btn-group,
|
|
164
|
+
.rbc-btn-group + button {
|
|
165
|
+
margin-left: 10px;
|
|
166
|
+
}
|
|
167
|
+
.rbc-event,
|
|
168
|
+
.rbc-slot-selection {
|
|
169
|
+
background-color: var(--primary);
|
|
170
|
+
color: var(--primary-foreground);
|
|
171
|
+
padding: 3px;
|
|
172
|
+
border-radius: var(--radius);
|
|
173
|
+
outline: 1px solid var(--background);
|
|
174
|
+
cursor: pointer;
|
|
175
|
+
}
|
|
176
|
+
.rbc-slot-selecting .rbc-event {
|
|
177
|
+
cursor: inherit;
|
|
178
|
+
pointer-events: none;
|
|
179
|
+
}
|
|
180
|
+
.rbc-event.rbc-selected {
|
|
181
|
+
background-color: color-mix(in oklch, var(--primary) 90%, transparent);
|
|
182
|
+
}
|
|
183
|
+
.rbc-event-label {
|
|
184
|
+
display: none;
|
|
185
|
+
}
|
|
186
|
+
.rbc-event-overlaps {
|
|
187
|
+
box-shadow: -1px 1px 5px 0px var(--primary-foreground);
|
|
188
|
+
}
|
|
189
|
+
.rbc-event-continues-prior {
|
|
190
|
+
border-top-left-radius: 0;
|
|
191
|
+
border-bottom-left-radius: 0;
|
|
192
|
+
}
|
|
193
|
+
.rbc-event-continues-after {
|
|
194
|
+
border-top-right-radius: 0;
|
|
195
|
+
border-bottom-right-radius: 0;
|
|
196
|
+
}
|
|
197
|
+
.rbc-event-continues-earlier {
|
|
198
|
+
border-top-left-radius: 0;
|
|
199
|
+
border-top-right-radius: 0;
|
|
200
|
+
}
|
|
201
|
+
.rbc-event-continues-later {
|
|
202
|
+
border-bottom-left-radius: 0;
|
|
203
|
+
border-bottom-right-radius: 0;
|
|
204
|
+
}
|
|
205
|
+
.rbc-event-continues-day-after {
|
|
206
|
+
border-bottom-left-radius: 0;
|
|
207
|
+
border-bottom-right-radius: 0;
|
|
208
|
+
}
|
|
209
|
+
.rbc-event-continues-day-prior {
|
|
210
|
+
border-top-left-radius: 0;
|
|
211
|
+
border-top-right-radius: 0;
|
|
212
|
+
}
|
|
213
|
+
.rbc-row {
|
|
214
|
+
display: -webkit-flex;
|
|
215
|
+
display: -ms-flexbox;
|
|
216
|
+
display: flex;
|
|
217
|
+
-webkit-flex-direction: row;
|
|
218
|
+
-ms-flex-direction: row;
|
|
219
|
+
flex-direction: row;
|
|
220
|
+
}
|
|
221
|
+
.rbc-row-segment {
|
|
222
|
+
padding: 0 1px 1px 1px;
|
|
223
|
+
}
|
|
224
|
+
.rbc-selected-cell {
|
|
225
|
+
background-color: color-mix(in oklch, var(--primary) 10%, transparent);
|
|
226
|
+
}
|
|
227
|
+
.rbc-show-more {
|
|
228
|
+
background-color: var(--muted);
|
|
229
|
+
padding: 2px;
|
|
230
|
+
border-radius: 4px;
|
|
231
|
+
z-index: 4;
|
|
232
|
+
font-weight: bold;
|
|
233
|
+
font-size: 85%;
|
|
234
|
+
height: auto;
|
|
235
|
+
line-height: normal;
|
|
236
|
+
white-space: nowrap;
|
|
237
|
+
}
|
|
238
|
+
.rbc-month-view {
|
|
239
|
+
position: relative;
|
|
240
|
+
border: 0.1px solid var(--border);
|
|
241
|
+
display: -webkit-flex;
|
|
242
|
+
display: -ms-flexbox;
|
|
243
|
+
display: flex;
|
|
244
|
+
-webkit-flex-direction: column;
|
|
245
|
+
-ms-flex-direction: column;
|
|
246
|
+
flex-direction: column;
|
|
247
|
+
-webkit-flex: 1 0 0;
|
|
248
|
+
-ms-flex: 1 0 0px;
|
|
249
|
+
flex: 1 0 0;
|
|
250
|
+
width: 100%;
|
|
251
|
+
-moz-user-select: none;
|
|
252
|
+
-ms-user-select: none;
|
|
253
|
+
user-select: none;
|
|
254
|
+
-webkit-user-select: none;
|
|
255
|
+
height: 100%;
|
|
256
|
+
}
|
|
257
|
+
.rbc-month-header {
|
|
258
|
+
display: -webkit-flex;
|
|
259
|
+
display: -ms-flexbox;
|
|
260
|
+
display: flex;
|
|
261
|
+
-webkit-flex-direction: row;
|
|
262
|
+
-ms-flex-direction: row;
|
|
263
|
+
flex-direction: row;
|
|
264
|
+
}
|
|
265
|
+
.rbc-month-row {
|
|
266
|
+
display: -webkit-flex;
|
|
267
|
+
display: -ms-flexbox;
|
|
268
|
+
display: flex;
|
|
269
|
+
position: relative;
|
|
270
|
+
-webkit-flex-direction: column;
|
|
271
|
+
-ms-flex-direction: column;
|
|
272
|
+
flex-direction: column;
|
|
273
|
+
-webkit-flex: 1 0 0;
|
|
274
|
+
-ms-flex: 1 0 0px;
|
|
275
|
+
flex: 1 0 0;
|
|
276
|
+
-webkit-flex-basis: 0px;
|
|
277
|
+
-ms-flex-preferred-size: 0px;
|
|
278
|
+
flex-basis: 0px;
|
|
279
|
+
overflow: hidden;
|
|
280
|
+
height: 100%;
|
|
281
|
+
}
|
|
282
|
+
.rbc-month-row + .rbc-month-row {
|
|
283
|
+
border-top: 1px solid var(--border);
|
|
284
|
+
}
|
|
285
|
+
.rbc-date-cell {
|
|
286
|
+
-webkit-flex: 1 1 0;
|
|
287
|
+
-ms-flex: 1 1 0px;
|
|
288
|
+
flex: 1 1 0;
|
|
289
|
+
min-width: 0;
|
|
290
|
+
padding-right: 5px;
|
|
291
|
+
text-align: right;
|
|
292
|
+
}
|
|
293
|
+
.rbc-date-cell.rbc-now {
|
|
294
|
+
font-weight: bold;
|
|
295
|
+
}
|
|
296
|
+
.rbc-date-cell > a,
|
|
297
|
+
.rbc-date-cell > a:active,
|
|
298
|
+
.rbc-date-cell > a:visited {
|
|
299
|
+
color: inherit;
|
|
300
|
+
text-decoration: none;
|
|
301
|
+
}
|
|
302
|
+
.rbc-row-bg {
|
|
303
|
+
display: -webkit-flex;
|
|
304
|
+
display: -ms-flexbox;
|
|
305
|
+
display: flex;
|
|
306
|
+
-webkit-flex-direction: row;
|
|
307
|
+
-ms-flex-direction: row;
|
|
308
|
+
flex-direction: row;
|
|
309
|
+
-webkit-flex: 1 0 0;
|
|
310
|
+
-ms-flex: 1 0 0px;
|
|
311
|
+
flex: 1 0 0;
|
|
312
|
+
overflow: hidden;
|
|
313
|
+
}
|
|
314
|
+
.rbc-day-bg {
|
|
315
|
+
-webkit-flex: 1 0 0%;
|
|
316
|
+
-ms-flex: 1 0 0%;
|
|
317
|
+
flex: 1 0 0%;
|
|
318
|
+
}
|
|
319
|
+
.rbc-rtl .rbc-day-bg + .rbc-day-bg {
|
|
320
|
+
border-left-width: 0;
|
|
321
|
+
border-right: 1px solid var(--border);
|
|
322
|
+
}
|
|
323
|
+
.rbc-overlay {
|
|
324
|
+
position: absolute;
|
|
325
|
+
z-index: 5;
|
|
326
|
+
border: 1px solid var(--border);
|
|
327
|
+
background-color: var(--card);
|
|
328
|
+
padding: 10px;
|
|
329
|
+
}
|
|
330
|
+
.rbc-overlay > * + * {
|
|
331
|
+
margin-top: 1px;
|
|
332
|
+
}
|
|
333
|
+
.rbc-overlay-header {
|
|
334
|
+
border-bottom: 1px solid var(--border);
|
|
335
|
+
margin: -10px -10px 5px -10px;
|
|
336
|
+
padding: 2px 10px;
|
|
337
|
+
}
|
|
338
|
+
.rbc-agenda-view {
|
|
339
|
+
display: -webkit-flex;
|
|
340
|
+
display: -ms-flexbox;
|
|
341
|
+
display: flex;
|
|
342
|
+
-webkit-flex-direction: column;
|
|
343
|
+
-ms-flex-direction: column;
|
|
344
|
+
flex-direction: column;
|
|
345
|
+
-webkit-flex: 1 0 0;
|
|
346
|
+
-ms-flex: 1 0 0px;
|
|
347
|
+
flex: 1 0 0;
|
|
348
|
+
}
|
|
349
|
+
.rbc-agenda-view table.rbc-agenda-table {
|
|
350
|
+
width: 100%;
|
|
351
|
+
border-bottom: 1px solid var(--border);
|
|
352
|
+
border-spacing: 0;
|
|
353
|
+
border-collapse: collapse;
|
|
354
|
+
}
|
|
355
|
+
.rbc-agenda-view .rbc-agenda-table .rbc-header:last-child {
|
|
356
|
+
border-right: none;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
.rbc-agenda-view table.rbc-agenda-table tbody > tr > td {
|
|
360
|
+
padding: 5px 10px;
|
|
361
|
+
vertical-align: top;
|
|
362
|
+
}
|
|
363
|
+
.rbc-agenda-view table.rbc-agenda-table .rbc-agenda-time-cell {
|
|
364
|
+
padding-left: 15px;
|
|
365
|
+
padding-right: 15px;
|
|
366
|
+
text-transform: lowercase;
|
|
367
|
+
}
|
|
368
|
+
.rbc-agenda-view table.rbc-agenda-table tbody > tr > td + td {
|
|
369
|
+
border-left: 1px solid var(--border);
|
|
370
|
+
}
|
|
371
|
+
.rbc-rtl .rbc-agenda-view table.rbc-agenda-table tbody > tr > td + td {
|
|
372
|
+
border-left-width: 0;
|
|
373
|
+
border-right: 1px solid var(--border);
|
|
374
|
+
}
|
|
375
|
+
.rbc-agenda-view table.rbc-agenda-table tbody > tr + tr {
|
|
376
|
+
border-top: 1px solid var(--border);
|
|
377
|
+
}
|
|
378
|
+
.rbc-agenda-view table.rbc-agenda-table thead > tr > th {
|
|
379
|
+
padding: 3px 5px;
|
|
380
|
+
text-align: left;
|
|
381
|
+
border-bottom: 1px solid var(--border);
|
|
382
|
+
}
|
|
383
|
+
.rbc-rtl .rbc-agenda-view table.rbc-agenda-table thead > tr > th {
|
|
384
|
+
text-align: right;
|
|
385
|
+
}
|
|
386
|
+
.rbc-agenda-time-cell {
|
|
387
|
+
text-transform: lowercase;
|
|
388
|
+
}
|
|
389
|
+
.rbc-agenda-time-cell .rbc-continues-after:after {
|
|
390
|
+
content: " »";
|
|
391
|
+
}
|
|
392
|
+
.rbc-agenda-time-cell .rbc-continues-prior:before {
|
|
393
|
+
content: "« ";
|
|
394
|
+
}
|
|
395
|
+
.rbc-agenda-date-cell,
|
|
396
|
+
.rbc-agenda-time-cell {
|
|
397
|
+
white-space: nowrap;
|
|
398
|
+
}
|
|
399
|
+
.rbc-agenda-event-cell {
|
|
400
|
+
width: 100%;
|
|
401
|
+
}
|
|
402
|
+
.rbc-time-column {
|
|
403
|
+
display: -webkit-flex;
|
|
404
|
+
display: -ms-flexbox;
|
|
405
|
+
display: flex;
|
|
406
|
+
-webkit-flex-direction: column;
|
|
407
|
+
-ms-flex-direction: column;
|
|
408
|
+
flex-direction: column;
|
|
409
|
+
min-height: 100%;
|
|
410
|
+
}
|
|
411
|
+
.rbc-time-column .rbc-timeslot-group {
|
|
412
|
+
-webkit-flex: 1;
|
|
413
|
+
-ms-flex: 1;
|
|
414
|
+
flex: 1;
|
|
415
|
+
}
|
|
416
|
+
.rbc-timeslot-group {
|
|
417
|
+
border-bottom: 1px solid var(--border);
|
|
418
|
+
min-height: 40px;
|
|
419
|
+
display: -webkit-flex;
|
|
420
|
+
display: -ms-flexbox;
|
|
421
|
+
font-size: 14px;
|
|
422
|
+
display: flex;
|
|
423
|
+
-webkit-flex-flow: column nowrap;
|
|
424
|
+
-ms-flex-flow: column nowrap;
|
|
425
|
+
flex-flow: column nowrap;
|
|
426
|
+
}
|
|
427
|
+
.rbc-time-gutter,
|
|
428
|
+
.rbc-header-gutter {
|
|
429
|
+
-webkit-flex: none;
|
|
430
|
+
-ms-flex: none;
|
|
431
|
+
flex: none;
|
|
432
|
+
}
|
|
433
|
+
.rbc-label {
|
|
434
|
+
padding: 0 5px;
|
|
435
|
+
}
|
|
436
|
+
.rbc-day-slot {
|
|
437
|
+
position: relative;
|
|
438
|
+
}
|
|
439
|
+
.rbc-day-slot .rbc-events-container {
|
|
440
|
+
bottom: 0;
|
|
441
|
+
left: 0;
|
|
442
|
+
position: absolute;
|
|
443
|
+
right: 10px;
|
|
444
|
+
top: 0;
|
|
445
|
+
}
|
|
446
|
+
.rbc-day-slot .rbc-events-container.rbc-is-rtl {
|
|
447
|
+
left: 10px;
|
|
448
|
+
right: 0;
|
|
449
|
+
}
|
|
450
|
+
.rbc-day-slot .rbc-event {
|
|
451
|
+
border: 1px solid color-mix(in oklch, var(--primary) 90%, transparent);
|
|
452
|
+
display: -webkit-flex;
|
|
453
|
+
display: -ms-flexbox;
|
|
454
|
+
display: flex;
|
|
455
|
+
max-height: 100%;
|
|
456
|
+
min-height: 20px;
|
|
457
|
+
-webkit-flex-flow: column wrap;
|
|
458
|
+
-ms-flex-flow: column wrap;
|
|
459
|
+
flex-flow: column wrap;
|
|
460
|
+
-webkit-align-items: flex-start;
|
|
461
|
+
-ms-flex-align: start;
|
|
462
|
+
align-items: flex-start;
|
|
463
|
+
overflow: hidden;
|
|
464
|
+
position: absolute;
|
|
465
|
+
}
|
|
466
|
+
.rbc-day-slot .rbc-event-label {
|
|
467
|
+
-webkit-flex: none;
|
|
468
|
+
-ms-flex: none;
|
|
469
|
+
flex: none;
|
|
470
|
+
padding-right: 5px;
|
|
471
|
+
width: auto;
|
|
472
|
+
}
|
|
473
|
+
.rbc-day-slot .rbc-event-content {
|
|
474
|
+
width: 100%;
|
|
475
|
+
-webkit-flex: 1 1 0;
|
|
476
|
+
-ms-flex: 1 1 0px;
|
|
477
|
+
flex: 1 1 0;
|
|
478
|
+
word-wrap: break-word;
|
|
479
|
+
line-height: 1;
|
|
480
|
+
height: 100%;
|
|
481
|
+
min-height: 1em;
|
|
482
|
+
}
|
|
483
|
+
.rbc-day-slot .rbc-time-slot {
|
|
484
|
+
border-top: 1px solid color-mix(in oklch, var(--border) 50%, transparent);
|
|
485
|
+
}
|
|
486
|
+
.rbc-time-slot {
|
|
487
|
+
-webkit-flex: 1 0 0;
|
|
488
|
+
-ms-flex: 1 0 0px;
|
|
489
|
+
flex: 1 0 0;
|
|
490
|
+
}
|
|
491
|
+
.rbc-time-slot.rbc-now {
|
|
492
|
+
font-weight: bold;
|
|
493
|
+
}
|
|
494
|
+
.rbc-day-header {
|
|
495
|
+
text-align: center;
|
|
496
|
+
}
|
|
497
|
+
.rbc-slot-selection {
|
|
498
|
+
z-index: 10;
|
|
499
|
+
position: absolute;
|
|
500
|
+
background-color: var(--primary);
|
|
501
|
+
}
|
|
502
|
+
.rbc-slot-selecting {
|
|
503
|
+
cursor: move;
|
|
504
|
+
}
|
|
505
|
+
.rbc-time-view {
|
|
506
|
+
display: -webkit-flex;
|
|
507
|
+
display: -ms-flexbox;
|
|
508
|
+
display: flex;
|
|
509
|
+
-webkit-flex-direction: column;
|
|
510
|
+
-ms-flex-direction: column;
|
|
511
|
+
flex-direction: column;
|
|
512
|
+
-webkit-flex: 1;
|
|
513
|
+
-ms-flex: 1;
|
|
514
|
+
flex: 1;
|
|
515
|
+
width: 100%;
|
|
516
|
+
border: 1px solid var(--border);
|
|
517
|
+
min-height: 0;
|
|
518
|
+
}
|
|
519
|
+
.rbc-time-view .rbc-time-gutter {
|
|
520
|
+
white-space: nowrap;
|
|
521
|
+
color: var(--muted-foreground);
|
|
522
|
+
}
|
|
523
|
+
.rbc-time-view .rbc-allday-cell {
|
|
524
|
+
box-sizing: content-box;
|
|
525
|
+
width: 100%;
|
|
526
|
+
position: relative;
|
|
527
|
+
}
|
|
528
|
+
.rbc-time-view .rbc-allday-events {
|
|
529
|
+
position: relative;
|
|
530
|
+
z-index: 4;
|
|
531
|
+
}
|
|
532
|
+
.rbc-time-view .rbc-row {
|
|
533
|
+
box-sizing: border-box;
|
|
534
|
+
min-height: 20px;
|
|
535
|
+
}
|
|
536
|
+
.rbc-time-header {
|
|
537
|
+
display: -webkit-flex;
|
|
538
|
+
display: -ms-flexbox;
|
|
539
|
+
display: flex;
|
|
540
|
+
-webkit-flex: 0 0 auto;
|
|
541
|
+
-ms-flex: 0 0 auto;
|
|
542
|
+
flex: 0 0 auto;
|
|
543
|
+
-webkit-flex-direction: row;
|
|
544
|
+
-ms-flex-direction: row;
|
|
545
|
+
flex-direction: row;
|
|
546
|
+
}
|
|
547
|
+
.rbc-rtl .rbc-time-header.rbc-overflowing {
|
|
548
|
+
border-right-width: 0;
|
|
549
|
+
border-left: 1px solid var(--border);
|
|
550
|
+
}
|
|
551
|
+
.rbc-time-header > .rbc-row:first-child {
|
|
552
|
+
border-bottom: 1px solid var(--border);
|
|
553
|
+
}
|
|
554
|
+
.rbc-time-header > .rbc-row.rbc-row-resource {
|
|
555
|
+
border-bottom: 1px solid var(--border);
|
|
556
|
+
}
|
|
557
|
+
.rbc-time-header-content {
|
|
558
|
+
-webkit-flex: 1;
|
|
559
|
+
-ms-flex: 1;
|
|
560
|
+
flex: 1;
|
|
561
|
+
min-width: 0;
|
|
562
|
+
-webkit-flex-direction: column;
|
|
563
|
+
-ms-flex-direction: column;
|
|
564
|
+
flex-direction: column;
|
|
565
|
+
border-left: 1px solid var(--border);
|
|
566
|
+
}
|
|
567
|
+
.rbc-rtl .rbc-time-header-content {
|
|
568
|
+
border-left-width: 0;
|
|
569
|
+
border-right: 1px solid var(--border);
|
|
570
|
+
}
|
|
571
|
+
.rbc-time-content {
|
|
572
|
+
display: -webkit-flex;
|
|
573
|
+
display: -ms-flexbox;
|
|
574
|
+
display: flex;
|
|
575
|
+
-webkit-flex: 1 0 0%;
|
|
576
|
+
-ms-flex: 1 0 0%;
|
|
577
|
+
flex: 1 0 0%;
|
|
578
|
+
-webkit-align-items: flex-start;
|
|
579
|
+
-ms-flex-align: start;
|
|
580
|
+
align-items: flex-start;
|
|
581
|
+
width: 100%;
|
|
582
|
+
border-top: 2px solid var(--border);
|
|
583
|
+
overflow-y: auto;
|
|
584
|
+
position: relative;
|
|
585
|
+
}
|
|
586
|
+
.rbc-time-content > .rbc-time-gutter {
|
|
587
|
+
-webkit-flex: none;
|
|
588
|
+
-ms-flex: none;
|
|
589
|
+
flex: none;
|
|
590
|
+
}
|
|
591
|
+
.rbc-time-content > * + * > * {
|
|
592
|
+
border-left: 1px solid var(--border);
|
|
593
|
+
}
|
|
594
|
+
.rbc-rtl .rbc-time-content > * + * > * {
|
|
595
|
+
border-left-width: 0;
|
|
596
|
+
border-right: 1px solid var(--border);
|
|
597
|
+
}
|
|
598
|
+
.rbc-time-content > .rbc-day-slot {
|
|
599
|
+
width: 100%;
|
|
600
|
+
-moz-user-select: none;
|
|
601
|
+
-ms-user-select: none;
|
|
602
|
+
user-select: none;
|
|
603
|
+
-webkit-user-select: none;
|
|
604
|
+
}
|
|
605
|
+
.rbc-current-time-indicator {
|
|
606
|
+
border-top: 2px solid var(--destructive) !important;
|
|
607
|
+
width: 100%;
|
|
608
|
+
z-index: 10;
|
|
609
|
+
position: absolute;
|
|
610
|
+
pointer-events: none;
|
|
611
|
+
}
|
|
612
|
+
.rbc-calendar {
|
|
613
|
+
background-color: var(--background);
|
|
614
|
+
color: var(--foreground);
|
|
615
|
+
overflow: hidden;
|
|
616
|
+
}
|
|
617
|
+
.rbc-toolbar button {
|
|
618
|
+
background-color: transparent;
|
|
619
|
+
border: none;
|
|
620
|
+
height: 40px;
|
|
621
|
+
padding: 8px 16px;
|
|
622
|
+
border-radius: var(--radius);
|
|
623
|
+
cursor: pointer;
|
|
624
|
+
transition: none;
|
|
625
|
+
margin-top: 0.25rem;
|
|
626
|
+
margin-bottom: 0.25rem;
|
|
627
|
+
box-shadow: none !important;
|
|
628
|
+
color: var(--foreground) !important;
|
|
629
|
+
}
|
|
630
|
+
.rbc-toolbar button.rbc-active {
|
|
631
|
+
color: var(--accent-foreground) !important;
|
|
632
|
+
background-color: var(--accent) !important;
|
|
633
|
+
}
|
|
634
|
+
.rbc-toolbar button:hover {
|
|
635
|
+
background-color: var(--accent) !important;
|
|
636
|
+
color: var(--accent-foreground);
|
|
637
|
+
}
|
|
638
|
+
.rbc-time-view {
|
|
639
|
+
margin-top: 0;
|
|
640
|
+
border: none;
|
|
641
|
+
}
|
|
642
|
+
.rbc-time-header {
|
|
643
|
+
background-color: var(--card);
|
|
644
|
+
border-bottom: 1px solid var(--border);
|
|
645
|
+
}
|
|
646
|
+
.rbc-time-gutter {
|
|
647
|
+
background-color: var(--card);
|
|
648
|
+
}
|
|
649
|
+
.rbc-time-gutter .rbc-time-slot {
|
|
650
|
+
background-color: var(--card) !important;
|
|
651
|
+
}
|
|
652
|
+
.rbc-day-bg {
|
|
653
|
+
background-color: var(--background);
|
|
654
|
+
border-right: 1px solid var(--border);
|
|
655
|
+
}
|
|
656
|
+
.rbc-month-view {
|
|
657
|
+
border: none;
|
|
658
|
+
}
|
|
659
|
+
.rbc-event:hover {
|
|
660
|
+
background-color: var(--ring);
|
|
661
|
+
}
|
|
662
|
+
.event-component {
|
|
663
|
+
background-color: var(--primary);
|
|
664
|
+
color: var(--primary-foreground);
|
|
665
|
+
padding: 5px;
|
|
666
|
+
border-radius: var(--radius);
|
|
667
|
+
font-size: 14px;
|
|
668
|
+
overflow: hidden;
|
|
669
|
+
white-space: nowrap;
|
|
670
|
+
text-overflow: ellipsis;
|
|
671
|
+
}
|
|
672
|
+
.rbc-current-time-indicator {
|
|
673
|
+
z-index: 3;
|
|
674
|
+
position: absolute;
|
|
675
|
+
pointer-events: none;
|
|
676
|
+
height: 1px;
|
|
677
|
+
}
|
|
678
|
+
.rbc-agenda-empty {
|
|
679
|
+
color: var(--muted-foreground);
|
|
680
|
+
display: flex;
|
|
681
|
+
height: 100%;
|
|
682
|
+
align-items: center;
|
|
683
|
+
justify-content: center;
|
|
684
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import dayjs from "dayjs";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
import { Calendar as BigCalendar, type CalendarProps, dayjsLocalizer } from "react-big-calendar";
|
|
4
|
+
import withDragAndDrop from "react-big-calendar/lib/addons/dragAndDrop";
|
|
5
|
+
import "react-big-calendar/lib/addons/dragAndDrop/styles.css";
|
|
6
|
+
import "./Calendar.css";
|
|
7
|
+
|
|
8
|
+
const DnDCalendar = withDragAndDrop(BigCalendar);
|
|
9
|
+
const localizer = dayjsLocalizer(dayjs);
|
|
10
|
+
|
|
11
|
+
type CalendarComponents = NonNullable<CalendarProps["components"]>;
|
|
12
|
+
export type CalendarEventRenderer = CalendarComponents extends { event?: infer T }
|
|
13
|
+
? Exclude<T, undefined>
|
|
14
|
+
: never;
|
|
15
|
+
|
|
16
|
+
interface DragAndDropCalendarProps extends Omit<CalendarProps, "localizer"> {
|
|
17
|
+
onEventDrop?: (args: { event: unknown; start: Date; end: Date }) => void;
|
|
18
|
+
onEventResize?: (args: { event: unknown; start: Date; end: Date }) => void;
|
|
19
|
+
onDragStart?: (args: { event: unknown; action: "move" | "resize"; direction?: unknown }) => void;
|
|
20
|
+
dragFromOutsideItem?: () => unknown;
|
|
21
|
+
onDropFromOutside?: (args: { start: Date; end: Date; allDay?: boolean }) => void;
|
|
22
|
+
onDragOverFromOutside?: (event: React.DragEvent) => void;
|
|
23
|
+
resizable?: boolean;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const TypedDnDCalendar = DnDCalendar as React.ComponentType<
|
|
27
|
+
DragAndDropCalendarProps & { localizer: typeof localizer }
|
|
28
|
+
>;
|
|
29
|
+
|
|
30
|
+
export const Calendar = (props: DragAndDropCalendarProps) => (
|
|
31
|
+
<TypedDnDCalendar {...props} localizer={localizer} />
|
|
32
|
+
);
|