@lanrenbang/basecoat-ultra 0.1.2
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/CHANGELOG-cn.md +54 -0
- package/CHANGELOG.md +54 -0
- package/LICENSE +21 -0
- package/README-cn.md +186 -0
- package/README.md +173 -0
- package/dist/css/basecoat.cdn.css +7389 -0
- package/dist/css/basecoat.cdn.min.css +2 -0
- package/dist/css/basecoat.css +1797 -0
- package/dist/css/datepicker.css +382 -0
- package/dist/css/datepicker.min.css +1 -0
- package/dist/css/resizable.css +96 -0
- package/dist/css/resizable.min.css +1 -0
- package/dist/js/accordion.js +20 -0
- package/dist/js/accordion.min.js +13 -0
- package/dist/js/all.js +17 -0
- package/dist/js/all.min.js +17 -0
- package/dist/js/basecoat.js +75 -0
- package/dist/js/basecoat.min.js +56 -0
- package/dist/js/carousel.js +104 -0
- package/dist/js/carousel.min.js +41 -0
- package/dist/js/catppuccin-theme-switcher.js +136 -0
- package/dist/js/catppuccin-theme-switcher.min.js +73 -0
- package/dist/js/command.js +132 -0
- package/dist/js/command.min.js +76 -0
- package/dist/js/datepicker.js +2367 -0
- package/dist/js/datepicker.min.js +1422 -0
- package/dist/js/dialog.js +20 -0
- package/dist/js/dialog.min.js +11 -0
- package/dist/js/dropdown-menu.js +148 -0
- package/dist/js/dropdown-menu.min.js +75 -0
- package/dist/js/input-otp.js +94 -0
- package/dist/js/input-otp.min.js +38 -0
- package/dist/js/lighting.js +80 -0
- package/dist/js/lighting.min.js +44 -0
- package/dist/js/popover.js +72 -0
- package/dist/js/popover.min.js +34 -0
- package/dist/js/resizable.js +534 -0
- package/dist/js/resizable.min.js +284 -0
- package/dist/js/select.js +246 -0
- package/dist/js/select.min.js +131 -0
- package/dist/js/sheet.js +85 -0
- package/dist/js/sheet.min.js +40 -0
- package/dist/js/sidebar.js +87 -0
- package/dist/js/sidebar.min.js +53 -0
- package/dist/js/slider.js +18 -0
- package/dist/js/slider.min.js +10 -0
- package/dist/js/tabs.js +53 -0
- package/dist/js/tabs.min.js +40 -0
- package/dist/js/toast.js +137 -0
- package/dist/js/toast.min.js +83 -0
- package/dist/js/toggle.js +36 -0
- package/dist/js/toggle.min.js +20 -0
- package/dist/theme/catppuccin/index.css +448 -0
- package/dist/theme/catppuccin/index.min.css +1 -0
- package/package.json +46 -0
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
/* Flatpickr Overrides (Basecoat Style) */
|
|
2
|
+
/* No @apply used here to avoid Tailwind dependency in this specific file */
|
|
3
|
+
|
|
4
|
+
@import url("../../node_modules/flatpickr/dist/flatpickr.css");
|
|
5
|
+
|
|
6
|
+
@layer components {
|
|
7
|
+
.flatpickr-calendar {
|
|
8
|
+
/* Base Overrides - Using CSS variables instead of @apply */
|
|
9
|
+
background-color: var(--color-popover);
|
|
10
|
+
color: var(--color-popover-foreground);
|
|
11
|
+
border-radius: var(--radius-lg);
|
|
12
|
+
box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); /* shadow-lg */
|
|
13
|
+
border: 1px solid var(--color-border);
|
|
14
|
+
|
|
15
|
+
/* Animation: Slide-in from top */
|
|
16
|
+
transform-origin: top;
|
|
17
|
+
will-change: transform, opacity;
|
|
18
|
+
animation: slide-in-down 0.2s ease-out;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@keyframes slide-in-down {
|
|
23
|
+
from {
|
|
24
|
+
opacity: 0;
|
|
25
|
+
transform: translateY(-0.5rem) scale(0.98);
|
|
26
|
+
}
|
|
27
|
+
to {
|
|
28
|
+
opacity: 1;
|
|
29
|
+
transform: translateY(0) scale(1);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
.flatpickr-calendar {
|
|
35
|
+
border-radius: var(--radius) !important;
|
|
36
|
+
border: 1px solid var(--border) !important;
|
|
37
|
+
padding: 0.75rem !important;
|
|
38
|
+
width: fit-content !important;
|
|
39
|
+
animation: fade-in 0.2s ease-out !important;
|
|
40
|
+
font-family: inherit;
|
|
41
|
+
background-color: var(--popover) !important;
|
|
42
|
+
color: var(--popover-foreground) !important;
|
|
43
|
+
box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1) !important; /* shadow-md */
|
|
44
|
+
|
|
45
|
+
/* Fix bottom padding when time picker is present */
|
|
46
|
+
&.hasTime {
|
|
47
|
+
padding-bottom: 1rem !important;
|
|
48
|
+
.flatpickr-time {
|
|
49
|
+
margin-bottom: 0.25rem;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* Inline Mode Fixes */
|
|
54
|
+
&.inline {
|
|
55
|
+
top: 0 !important;
|
|
56
|
+
box-shadow: none !important; /* Remove shadow for inline */
|
|
57
|
+
margin-top: 0 !important;
|
|
58
|
+
width: auto !important; /* Allow it to fill or fit container */
|
|
59
|
+
max-width: 100% !important;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/* Hiding the arrow triangle */
|
|
64
|
+
.flatpickr-calendar.arrowTop:before,
|
|
65
|
+
.flatpickr-calendar.arrowTop:after,
|
|
66
|
+
.flatpickr-calendar.arrowBottom:before,
|
|
67
|
+
.flatpickr-calendar.arrowBottom:after {
|
|
68
|
+
display: none !important;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* --- Header: Month/Year + Nav --- */
|
|
72
|
+
.flatpickr-months {
|
|
73
|
+
display: flex !important;
|
|
74
|
+
align-items: center !important;
|
|
75
|
+
justify-content: center !important; /* Center alignment */
|
|
76
|
+
position: relative !important;
|
|
77
|
+
margin-bottom: 1rem !important;
|
|
78
|
+
height: 1.75rem !important; /* h-7 */
|
|
79
|
+
width: 100% !important;
|
|
80
|
+
background-color: transparent !important;
|
|
81
|
+
|
|
82
|
+
/* The Wrapper: Absolute fill the container */
|
|
83
|
+
.flatpickr-month {
|
|
84
|
+
position: absolute !important;
|
|
85
|
+
inset: 0 !important;
|
|
86
|
+
display: flex !important;
|
|
87
|
+
align-items: center !important;
|
|
88
|
+
justify-content: center !important;
|
|
89
|
+
background: transparent !important;
|
|
90
|
+
color: var(--foreground) !important;
|
|
91
|
+
fill: var(--foreground) !important;
|
|
92
|
+
overflow: visible !important;
|
|
93
|
+
height: 100% !important;
|
|
94
|
+
width: 100% !important;
|
|
95
|
+
z-index: 0;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/* Navigation Arrows */
|
|
99
|
+
.flatpickr-prev-month,
|
|
100
|
+
.flatpickr-next-month {
|
|
101
|
+
position: absolute !important;
|
|
102
|
+
top: 0 !important;
|
|
103
|
+
z-index: 10 !important;
|
|
104
|
+
display: flex !important;
|
|
105
|
+
align-items: center !important;
|
|
106
|
+
justify-content: center !important;
|
|
107
|
+
width: 1.75rem !important; /* size-7 */
|
|
108
|
+
height: 1.75rem !important;
|
|
109
|
+
padding: 0 !important;
|
|
110
|
+
border-radius: calc(var(--radius) - 2px) !important; /* rounded-md */
|
|
111
|
+
background-color: transparent !important;
|
|
112
|
+
border: 1px solid transparent !important;
|
|
113
|
+
transition: opacity 0.2s, background-color 0.2s;
|
|
114
|
+
opacity: 0.5;
|
|
115
|
+
color: var(--muted-foreground) !important;
|
|
116
|
+
|
|
117
|
+
svg {
|
|
118
|
+
width: 1rem !important; /* size-4 */
|
|
119
|
+
height: 1rem !important;
|
|
120
|
+
stroke-width: 2 !important;
|
|
121
|
+
fill: none !important;
|
|
122
|
+
stroke: currentColor !important;
|
|
123
|
+
}
|
|
124
|
+
&:hover {
|
|
125
|
+
opacity: 1;
|
|
126
|
+
background-color: var(--accent) !important;
|
|
127
|
+
color: var(--accent-foreground) !important;
|
|
128
|
+
svg { stroke: currentColor !important; }
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
.flatpickr-prev-month { left: 0.25rem !important; }
|
|
132
|
+
.flatpickr-next-month { right: 0.25rem !important; }
|
|
133
|
+
|
|
134
|
+
/* Month/Year Text - The Content inside Flex Wrapper */
|
|
135
|
+
.flatpickr-current-month {
|
|
136
|
+
display: flex !important;
|
|
137
|
+
align-items: center !important;
|
|
138
|
+
justify-content: center !important;
|
|
139
|
+
gap: 0.5rem !important;
|
|
140
|
+
font-size: 0.875rem !important; /* text-sm */
|
|
141
|
+
font-weight: 500 !important; /* font-medium */
|
|
142
|
+
position: absolute !important; /* Revert to absolute for perfect centering ignoring siblings */
|
|
143
|
+
width: 75% !important;
|
|
144
|
+
left: 12.5% !important;
|
|
145
|
+
padding: 0 1rem !important; /* Add padding to prevent edge touching */
|
|
146
|
+
height: 100% !important;
|
|
147
|
+
top: 0 !important;
|
|
148
|
+
transform: none !important;
|
|
149
|
+
padding: 0 !important;
|
|
150
|
+
color: inherit !important;
|
|
151
|
+
|
|
152
|
+
.numInputWrapper {
|
|
153
|
+
width: auto !important;
|
|
154
|
+
border-radius: calc(var(--radius) - 2px) !important;
|
|
155
|
+
padding: 0.25rem 0.5rem !important;
|
|
156
|
+
transition: background-color 0.2s;
|
|
157
|
+
|
|
158
|
+
&:hover {
|
|
159
|
+
background-color: var(--accent) !important;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
span { display: none; }
|
|
163
|
+
input.cur-year {
|
|
164
|
+
font-weight: 500 !important;
|
|
165
|
+
font-size: 0.875rem !important;
|
|
166
|
+
height: auto !important;
|
|
167
|
+
padding: 0 !important;
|
|
168
|
+
margin: 0 !important;
|
|
169
|
+
background-color: transparent !important;
|
|
170
|
+
border: 0 !important;
|
|
171
|
+
cursor: pointer !important;
|
|
172
|
+
color: inherit !important;
|
|
173
|
+
box-shadow: none !important;
|
|
174
|
+
/* Fix width and alignment */
|
|
175
|
+
width: 4ch !important;
|
|
176
|
+
text-align: center !important;
|
|
177
|
+
appearance: textfield !important; /* Hide spinners */
|
|
178
|
+
-moz-appearance: textfield !important;
|
|
179
|
+
|
|
180
|
+
&::-webkit-inner-spin-button,
|
|
181
|
+
&::-webkit-outer-spin-button {
|
|
182
|
+
-webkit-appearance: none;
|
|
183
|
+
margin: 0;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.flatpickr-monthDropdown-months {
|
|
189
|
+
font-weight: 500 !important;
|
|
190
|
+
background-color: transparent !important;
|
|
191
|
+
border: 0 !important;
|
|
192
|
+
padding: 0.25rem 0.5rem !important;
|
|
193
|
+
border-radius: calc(var(--radius) - 2px) !important;
|
|
194
|
+
font-size: 0.875rem !important;
|
|
195
|
+
appearance: none;
|
|
196
|
+
outline: none;
|
|
197
|
+
cursor: pointer;
|
|
198
|
+
transition: background-color 0.2s;
|
|
199
|
+
color: inherit !important;
|
|
200
|
+
-moz-appearance: none;
|
|
201
|
+
text-indent: 0.01px;
|
|
202
|
+
text-overflow: '';
|
|
203
|
+
width: auto !important;
|
|
204
|
+
text-align: right !important; /* Align text near the gap */
|
|
205
|
+
|
|
206
|
+
&:hover { background-color: var(--accent) !important; }
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/* Weekdays Header */
|
|
212
|
+
.flatpickr-weekdays {
|
|
213
|
+
width: 100% !important;
|
|
214
|
+
.flatpickr-weekdaycontainer {
|
|
215
|
+
display: flex !important;
|
|
216
|
+
width: 100% !important;
|
|
217
|
+
justify-content: space-between !important;
|
|
218
|
+
}
|
|
219
|
+
span.flatpickr-weekday {
|
|
220
|
+
flex: 1 !important;
|
|
221
|
+
font-size: 0.8rem !important;
|
|
222
|
+
font-weight: 400 !important;
|
|
223
|
+
cursor: default !important;
|
|
224
|
+
text-align: center !important;
|
|
225
|
+
color: var(--muted-foreground) !important;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/* Days Grid */
|
|
230
|
+
.flatpickr-days {
|
|
231
|
+
width: 100% !important;
|
|
232
|
+
border: 0 !important;
|
|
233
|
+
|
|
234
|
+
.dayContainer {
|
|
235
|
+
width: 100% !important;
|
|
236
|
+
min-width: 0 !important;
|
|
237
|
+
max-width: none !important;
|
|
238
|
+
justify-content: space-between !important;
|
|
239
|
+
row-gap: 0.25rem !important; /* gap-y-1 */
|
|
240
|
+
padding: 0 !important;
|
|
241
|
+
display: grid !important;
|
|
242
|
+
grid-template-columns: repeat(7, 1fr) !important;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/* Individual Day Cell */
|
|
247
|
+
.flatpickr-day {
|
|
248
|
+
position: relative !important;
|
|
249
|
+
height: 2.25rem !important; /* h-9 */
|
|
250
|
+
width: 2.25rem !important; /* w-9 */
|
|
251
|
+
font-size: 0.875rem !important; /* text-sm */
|
|
252
|
+
font-weight: 400 !important;
|
|
253
|
+
text-align: center !important;
|
|
254
|
+
display: flex !important;
|
|
255
|
+
align-items: center !important;
|
|
256
|
+
justify-content: center !important;
|
|
257
|
+
border-radius: calc(var(--radius) - 2px) !important;
|
|
258
|
+
border: 1px solid transparent !important;
|
|
259
|
+
background-color: transparent !important;
|
|
260
|
+
box-shadow: none !important;
|
|
261
|
+
margin: 0 !important;
|
|
262
|
+
max-width: 100% !important;
|
|
263
|
+
color: var(--foreground) !important;
|
|
264
|
+
flex-basis: auto !important; /* Override layout */
|
|
265
|
+
|
|
266
|
+
&:hover, &:focus {
|
|
267
|
+
background-color: var(--accent) !important;
|
|
268
|
+
color: var(--accent-foreground) !important;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
&.today {
|
|
272
|
+
background-color: var(--accent) !important;
|
|
273
|
+
color: var(--accent-foreground) !important;
|
|
274
|
+
&:after { display: none !important; }
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
&.selected, &.startRange, &.endRange {
|
|
278
|
+
background-color: var(--primary) !important;
|
|
279
|
+
color: var(--primary-foreground) !important;
|
|
280
|
+
border-color: transparent !important;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
&.inRange {
|
|
284
|
+
background-color: var(--accent) !important;
|
|
285
|
+
color: var(--accent-foreground) !important;
|
|
286
|
+
border-radius: 0 !important;
|
|
287
|
+
}
|
|
288
|
+
&.startRange {
|
|
289
|
+
border-top-left-radius: calc(var(--radius) - 2px) !important;
|
|
290
|
+
border-bottom-left-radius: calc(var(--radius) - 2px) !important;
|
|
291
|
+
border-top-right-radius: 0 !important;
|
|
292
|
+
border-bottom-right-radius: 0 !important;
|
|
293
|
+
}
|
|
294
|
+
&.endRange {
|
|
295
|
+
border-top-right-radius: calc(var(--radius) - 2px) !important;
|
|
296
|
+
border-bottom-right-radius: calc(var(--radius) - 2px) !important;
|
|
297
|
+
border-top-left-radius: 0 !important;
|
|
298
|
+
border-bottom-left-radius: 0 !important;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
&.flatpickr-disabled, &.flatpickr-disabled:hover {
|
|
302
|
+
opacity: 0.5 !important;
|
|
303
|
+
background-color: transparent !important;
|
|
304
|
+
cursor: not-allowed !important;
|
|
305
|
+
color: var(--muted-foreground) !important;
|
|
306
|
+
}
|
|
307
|
+
&.prevMonthDay, &.nextMonthDay {
|
|
308
|
+
opacity: 0.5 !important;
|
|
309
|
+
color: var(--muted-foreground) !important;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
/* Time Picker */
|
|
314
|
+
.flatpickr-time {
|
|
315
|
+
border-top: 1px solid var(--border) !important;
|
|
316
|
+
margin-top: 0.75rem !important;
|
|
317
|
+
padding-top: 0.75rem !important;
|
|
318
|
+
width: 100% !important;
|
|
319
|
+
display: flex !important;
|
|
320
|
+
align-items: center !important;
|
|
321
|
+
justify-content: center !important;
|
|
322
|
+
gap: 0.25rem !important;
|
|
323
|
+
height: auto !important; /* Force auto height to fit inputs */
|
|
324
|
+
max-height: none !important;
|
|
325
|
+
overflow: visible !important; /* Ensure borders aren't clipped */
|
|
326
|
+
|
|
327
|
+
.numInputWrapper {
|
|
328
|
+
flex: 1 1 0% !important;
|
|
329
|
+
width: auto !important;
|
|
330
|
+
height: 2.25rem !important; /* h-9 */
|
|
331
|
+
|
|
332
|
+
&:hover { background-color: transparent !important; }
|
|
333
|
+
|
|
334
|
+
span { display: none; }
|
|
335
|
+
input {
|
|
336
|
+
background-color: transparent !important;
|
|
337
|
+
border: 1px solid var(--input) !important;
|
|
338
|
+
border-radius: calc(var(--radius) - 2px) !important;
|
|
339
|
+
font-size: 0.875rem !important; /* text-sm */
|
|
340
|
+
height: 100% !important;
|
|
341
|
+
font-weight: 400 !important;
|
|
342
|
+
text-align: center !important;
|
|
343
|
+
color: var(--foreground) !important;
|
|
344
|
+
box-shadow: none !important;
|
|
345
|
+
|
|
346
|
+
&:focus {
|
|
347
|
+
border-color: var(--ring) !important;
|
|
348
|
+
/* Ring simulation via box-shadow if needed, or simple border color */
|
|
349
|
+
outline: 2px solid color-mix(in srgb, var(--ring), transparent 50%);
|
|
350
|
+
outline-offset: 2px;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
.flatpickr-time-separator {
|
|
355
|
+
font-weight: 700 !important;
|
|
356
|
+
padding: 0 !important;
|
|
357
|
+
display: flex !important;
|
|
358
|
+
align-items: center !important;
|
|
359
|
+
justify-content: center !important;
|
|
360
|
+
color: var(--muted-foreground) !important;
|
|
361
|
+
}
|
|
362
|
+
.flatpickr-am-pm {
|
|
363
|
+
background-color: transparent !important;
|
|
364
|
+
border: 1px solid var(--input) !important;
|
|
365
|
+
border-radius: calc(var(--radius) - 2px) !important;
|
|
366
|
+
height: 2.25rem !important;
|
|
367
|
+
display: flex !important;
|
|
368
|
+
align-items: center !important;
|
|
369
|
+
justify-content: center !important;
|
|
370
|
+
margin-left: 0.25rem !important;
|
|
371
|
+
cursor: pointer !important;
|
|
372
|
+
width: 3rem !important;
|
|
373
|
+
color: var(--foreground) !important;
|
|
374
|
+
|
|
375
|
+
&:hover { background-color: var(--accent) !important; }
|
|
376
|
+
&:focus {
|
|
377
|
+
border-color: var(--ring) !important;
|
|
378
|
+
outline: 2px solid color-mix(in srgb, var(--ring), transparent 50%);
|
|
379
|
+
outline-offset: 2px;
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import "../../node_modules/flatpickr/dist/flatpickr.css";@layer components{.flatpickr-calendar{background-color:var(--color-popover);color:var(--color-popover-foreground);border-radius:var(--radius-lg);border:1px solid var(--color-border);transform-origin:top;will-change:transform,opacity;animation:.2s ease-out slide-in-down;box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a}}@keyframes slide-in-down{0%{opacity:0;transform:translateY(-.5rem)scale(.98)}to{opacity:1;transform:translateY(0)scale(1)}}.flatpickr-calendar{font-family:inherit;border-radius:var(--radius)!important;border:1px solid var(--border)!important;background-color:var(--popover)!important;width:fit-content!important;color:var(--popover-foreground)!important;padding:.75rem!important;animation:.2s ease-out fade-in!important;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a!important}.flatpickr-calendar.hasTime{padding-bottom:1rem!important}.flatpickr-calendar.hasTime .flatpickr-time{margin-bottom:.25rem}.flatpickr-calendar.inline{box-shadow:none!important;width:auto!important;max-width:100%!important;margin-top:0!important;top:0!important}.flatpickr-calendar.arrowTop:before,.flatpickr-calendar.arrowTop:after,.flatpickr-calendar.arrowBottom:before,.flatpickr-calendar.arrowBottom:after{display:none!important}.flatpickr-months{background-color:#0000!important;justify-content:center!important;align-items:center!important;width:100%!important;height:1.75rem!important;margin-bottom:1rem!important;display:flex!important;position:relative!important}.flatpickr-months .flatpickr-month{z-index:0;color:var(--foreground)!important;fill:var(--foreground)!important;background:0 0!important;justify-content:center!important;align-items:center!important;width:100%!important;height:100%!important;display:flex!important;position:absolute!important;inset:0!important;overflow:visible!important}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{opacity:.5;transition:opacity .2s,background-color .2s;z-index:10!important;border-radius:calc(var(--radius) - 2px)!important;width:1.75rem!important;height:1.75rem!important;color:var(--muted-foreground)!important;background-color:#0000!important;border:1px solid #0000!important;justify-content:center!important;align-items:center!important;padding:0!important;display:flex!important;position:absolute!important;top:0!important}:is(.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month) svg{stroke-width:2px!important;fill:none!important;stroke:currentColor!important;width:1rem!important;height:1rem!important}:is(.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month):hover{opacity:1;background-color:var(--accent)!important;color:var(--accent-foreground)!important}:is(.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month):hover svg{stroke:currentColor!important}.flatpickr-months .flatpickr-prev-month{left:.25rem!important}.flatpickr-months .flatpickr-next-month{right:.25rem!important}.flatpickr-months .flatpickr-current-month{width:75%!important;height:100%!important;color:inherit!important;justify-content:center!important;align-items:center!important;gap:.5rem!important;padding:0!important;font-size:.875rem!important;font-weight:500!important;display:flex!important;position:absolute!important;top:0!important;left:12.5%!important;transform:none!important}.flatpickr-months .flatpickr-current-month .numInputWrapper{transition:background-color .2s;border-radius:calc(var(--radius) - 2px)!important;width:auto!important;padding:.25rem .5rem!important}.flatpickr-months .flatpickr-current-month .numInputWrapper:hover{background-color:var(--accent)!important}.flatpickr-months .flatpickr-current-month .numInputWrapper span{display:none}.flatpickr-months .flatpickr-current-month .numInputWrapper input.cur-year{cursor:pointer!important;height:auto!important;color:inherit!important;box-shadow:none!important;text-align:center!important;appearance:textfield!important;background-color:#0000!important;border:0!important;width:4ch!important;margin:0!important;padding:0!important;font-size:.875rem!important;font-weight:500!important}.flatpickr-months .flatpickr-current-month .numInputWrapper input.cur-year::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.flatpickr-months .flatpickr-current-month .numInputWrapper input.cur-year::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.flatpickr-months .flatpickr-current-month .flatpickr-monthDropdown-months{appearance:none;cursor:pointer;text-indent:.01px;text-overflow:"";outline:none;transition:background-color .2s;border-radius:calc(var(--radius) - 2px)!important;color:inherit!important;text-align:right!important;background-color:#0000!important;border:0!important;width:auto!important;padding:.25rem .5rem!important;font-size:.875rem!important;font-weight:500!important}.flatpickr-months .flatpickr-current-month .flatpickr-monthDropdown-months:hover{background-color:var(--accent)!important}.flatpickr-weekdays{width:100%!important}.flatpickr-weekdays .flatpickr-weekdaycontainer{justify-content:space-between!important;width:100%!important;display:flex!important}.flatpickr-weekdays span.flatpickr-weekday{cursor:default!important;text-align:center!important;color:var(--muted-foreground)!important;flex:1!important;font-size:.8rem!important;font-weight:400!important}.flatpickr-days{border:0!important;width:100%!important}.flatpickr-days .dayContainer{grid-template-columns:repeat(7,1fr)!important;justify-content:space-between!important;row-gap:.25rem!important;width:100%!important;min-width:0!important;max-width:none!important;padding:0!important;display:grid!important}.flatpickr-day{text-align:center!important;border-radius:calc(var(--radius) - 2px)!important;width:2.25rem!important;height:2.25rem!important;box-shadow:none!important;max-width:100%!important;color:var(--foreground)!important;background-color:#0000!important;border:1px solid #0000!important;flex-basis:auto!important;justify-content:center!important;align-items:center!important;margin:0!important;font-size:.875rem!important;font-weight:400!important;display:flex!important;position:relative!important}.flatpickr-day:hover,.flatpickr-day:focus,.flatpickr-day.today{background-color:var(--accent)!important;color:var(--accent-foreground)!important}.flatpickr-day.today:after{display:none!important}.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange{background-color:var(--primary)!important;color:var(--primary-foreground)!important;border-color:#0000!important}.flatpickr-day.inRange{background-color:var(--accent)!important;color:var(--accent-foreground)!important;border-radius:0!important}.flatpickr-day.startRange{border-top-left-radius:calc(var(--radius) - 2px)!important;border-bottom-left-radius:calc(var(--radius) - 2px)!important;border-top-right-radius:0!important;border-bottom-right-radius:0!important}.flatpickr-day.endRange{border-top-right-radius:calc(var(--radius) - 2px)!important;border-bottom-right-radius:calc(var(--radius) - 2px)!important;border-top-left-radius:0!important;border-bottom-left-radius:0!important}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{opacity:.5!important;cursor:not-allowed!important;color:var(--muted-foreground)!important;background-color:#0000!important}.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay{opacity:.5!important;color:var(--muted-foreground)!important}.flatpickr-time{border-top:1px solid var(--border)!important;justify-content:center!important;align-items:center!important;gap:.25rem!important;width:100%!important;height:auto!important;max-height:none!important;margin-top:.75rem!important;padding-top:.75rem!important;display:flex!important;overflow:visible!important}.flatpickr-time .numInputWrapper{flex:1!important;width:auto!important;height:2.25rem!important}.flatpickr-time .numInputWrapper:hover{background-color:#0000!important}.flatpickr-time .numInputWrapper span{display:none}.flatpickr-time .numInputWrapper input{border:1px solid var(--input)!important;border-radius:calc(var(--radius) - 2px)!important;text-align:center!important;height:100%!important;color:var(--foreground)!important;box-shadow:none!important;background-color:#0000!important;font-size:.875rem!important;font-weight:400!important}.flatpickr-time .numInputWrapper input:focus{outline:2px solid color-mix(in srgb,var(--ring),transparent 50%);outline-offset:2px;border-color:var(--ring)!important}.flatpickr-time .flatpickr-time-separator{color:var(--muted-foreground)!important;justify-content:center!important;align-items:center!important;padding:0!important;font-weight:700!important;display:flex!important}.flatpickr-time .flatpickr-am-pm{border:1px solid var(--input)!important;border-radius:calc(var(--radius) - 2px)!important;cursor:pointer!important;width:3rem!important;height:2.25rem!important;color:var(--foreground)!important;background-color:#0000!important;justify-content:center!important;align-items:center!important;margin-left:.25rem!important;display:flex!important}.flatpickr-time .flatpickr-am-pm:hover{background-color:var(--accent)!important}.flatpickr-time .flatpickr-am-pm:focus{outline:2px solid color-mix(in srgb,var(--ring),transparent 50%);outline-offset:2px;border-color:var(--ring)!important}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/* Resizable (Split.js) */
|
|
2
|
+
/* Replaced @apply with standard CSS + vars */
|
|
3
|
+
|
|
4
|
+
@layer components {
|
|
5
|
+
.gutter {
|
|
6
|
+
background-color: transparent !important;
|
|
7
|
+
border: 0 !important;
|
|
8
|
+
outline: none !important;
|
|
9
|
+
box-shadow: none !important;
|
|
10
|
+
position: relative;
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
|
|
15
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
16
|
+
transition-duration: 150ms;
|
|
17
|
+
|
|
18
|
+
/* 1px Central Line */
|
|
19
|
+
&::before {
|
|
20
|
+
content: '';
|
|
21
|
+
position: absolute;
|
|
22
|
+
background-color: var(--border) !important;
|
|
23
|
+
z-index: 10;
|
|
24
|
+
pointer-events: none;
|
|
25
|
+
box-shadow: none !important;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&:hover {
|
|
29
|
+
/* background-color: color-mix(in srgb, var(--ring), transparent 50%); */
|
|
30
|
+
/* Only highlight the line or handle on hover if desired, or keep transparent */
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&.gutter-horizontal {
|
|
34
|
+
width: 0.25rem; /* w-1 */
|
|
35
|
+
cursor: col-resize;
|
|
36
|
+
|
|
37
|
+
&::before {
|
|
38
|
+
width: 1px;
|
|
39
|
+
height: 100%;
|
|
40
|
+
top: 0;
|
|
41
|
+
bottom: 0;
|
|
42
|
+
left: 50%;
|
|
43
|
+
transform: translateX(-50%);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&:after {
|
|
47
|
+
content: '';
|
|
48
|
+
position: absolute;
|
|
49
|
+
left: 50%;
|
|
50
|
+
top: 50%;
|
|
51
|
+
transform: translate(-50%, -50%);
|
|
52
|
+
height: 1rem; /* h-4 */
|
|
53
|
+
width: 0.25rem; /* w-1 */
|
|
54
|
+
background-color: var(--muted-foreground);
|
|
55
|
+
opacity: 0.5;
|
|
56
|
+
border-radius: 9999px;
|
|
57
|
+
transition: opacity 0.2s;
|
|
58
|
+
z-index: 20;
|
|
59
|
+
}
|
|
60
|
+
&:hover:after {
|
|
61
|
+
opacity: 1;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
&.gutter-vertical {
|
|
65
|
+
height: 0.25rem; /* h-1 */
|
|
66
|
+
cursor: row-resize;
|
|
67
|
+
|
|
68
|
+
&::before {
|
|
69
|
+
height: 1px;
|
|
70
|
+
width: 100%;
|
|
71
|
+
left: 0;
|
|
72
|
+
right: 0;
|
|
73
|
+
top: 50%;
|
|
74
|
+
transform: translateY(-50%);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&:after {
|
|
78
|
+
content: '';
|
|
79
|
+
position: absolute;
|
|
80
|
+
left: 50%;
|
|
81
|
+
top: 50%;
|
|
82
|
+
transform: translate(-50%, -50%);
|
|
83
|
+
width: 1rem; /* w-4 */
|
|
84
|
+
height: 0.25rem; /* h-1 */
|
|
85
|
+
background-color: var(--muted-foreground);
|
|
86
|
+
opacity: 0.5;
|
|
87
|
+
border-radius: 9999px;
|
|
88
|
+
transition: opacity 0.2s;
|
|
89
|
+
z-index: 20;
|
|
90
|
+
}
|
|
91
|
+
&:hover:after {
|
|
92
|
+
opacity: 1;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer components{.gutter{justify-content:center;align-items:center;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);display:flex;position:relative;box-shadow:none!important;background-color:#0000!important;border:0!important;outline:none!important}.gutter:before{content:"";z-index:10;pointer-events:none;position:absolute;background-color:var(--border)!important;box-shadow:none!important}.gutter.gutter-horizontal{cursor:col-resize;width:.25rem}.gutter.gutter-horizontal:before{width:1px;height:100%;top:0;bottom:0;left:50%;transform:translate(-50%)}.gutter.gutter-horizontal:after{content:"";background-color:var(--muted-foreground);opacity:.5;z-index:20;border-radius:9999px;width:.25rem;height:1rem;transition:opacity .2s;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.gutter.gutter-horizontal:hover:after{opacity:1}.gutter.gutter-vertical{cursor:row-resize;height:.25rem}.gutter.gutter-vertical:before{width:100%;height:1px;top:50%;left:0;right:0;transform:translateY(-50%)}.gutter.gutter-vertical:after{content:"";background-color:var(--muted-foreground);opacity:.5;z-index:20;border-radius:9999px;width:1rem;height:.25rem;transition:opacity .2s;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.gutter.gutter-vertical:hover:after{opacity:1}}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
(() => {
|
|
2
|
+
const initAccordion = (accordion) => {
|
|
3
|
+
accordion.addEventListener("click", (event) => {
|
|
4
|
+
const summary = event.target.closest("summary");
|
|
5
|
+
if (!summary) return;
|
|
6
|
+
const details = summary.closest("details");
|
|
7
|
+
if (!details) return;
|
|
8
|
+
accordion.querySelectorAll("details").forEach((detailsEl) => {
|
|
9
|
+
if (detailsEl !== details) {
|
|
10
|
+
detailsEl.removeAttribute("open");
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
accordion.dataset.accordionInitialized = true;
|
|
15
|
+
accordion.dispatchEvent(new CustomEvent("basecoat:initialized"));
|
|
16
|
+
};
|
|
17
|
+
if (window.basecoat) {
|
|
18
|
+
window.basecoat.register("accordion", ".accordion:not([data-accordion-initialized])", initAccordion);
|
|
19
|
+
}
|
|
20
|
+
})();
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
(() => {
|
|
2
|
+
const n = (t) => {
|
|
3
|
+
t.addEventListener("click", (o) => {
|
|
4
|
+
const e = o.target.closest("summary");
|
|
5
|
+
if (!e) return;
|
|
6
|
+
const i = e.closest("details");
|
|
7
|
+
i && t.querySelectorAll("details").forEach((a) => {
|
|
8
|
+
a !== i && a.removeAttribute("open");
|
|
9
|
+
});
|
|
10
|
+
}), t.dataset.accordionInitialized = !0, t.dispatchEvent(new CustomEvent("basecoat:initialized"));
|
|
11
|
+
};
|
|
12
|
+
window.basecoat && window.basecoat.register("accordion", ".accordion:not([data-accordion-initialized])", n);
|
|
13
|
+
})();
|
package/dist/js/all.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import "./basecoat.js";
|
|
2
|
+
import "./accordion.js";
|
|
3
|
+
import "./carousel.js";
|
|
4
|
+
import "./catppuccin-theme-switcher.js";
|
|
5
|
+
import "./command.js";
|
|
6
|
+
import "./dialog.js";
|
|
7
|
+
import "./dropdown-menu.js";
|
|
8
|
+
import "./input-otp.js";
|
|
9
|
+
import "./lighting.js";
|
|
10
|
+
import "./popover.js";
|
|
11
|
+
import "./select.js";
|
|
12
|
+
import "./sheet.js";
|
|
13
|
+
import "./sidebar.js";
|
|
14
|
+
import "./slider.js";
|
|
15
|
+
import "./tabs.js";
|
|
16
|
+
import "./toast.js";
|
|
17
|
+
import "./toggle.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import "./basecoat.min.js";
|
|
2
|
+
import "./accordion.min.js";
|
|
3
|
+
import "./carousel.min.js";
|
|
4
|
+
import "./catppuccin-theme-switcher.min.js";
|
|
5
|
+
import "./command.min.js";
|
|
6
|
+
import "./dialog.min.js";
|
|
7
|
+
import "./dropdown-menu.min.js";
|
|
8
|
+
import "./input-otp.min.js";
|
|
9
|
+
import "./lighting.min.js";
|
|
10
|
+
import "./popover.min.js";
|
|
11
|
+
import "./select.min.js";
|
|
12
|
+
import "./sheet.min.js";
|
|
13
|
+
import "./sidebar.min.js";
|
|
14
|
+
import "./slider.min.js";
|
|
15
|
+
import "./tabs.min.js";
|
|
16
|
+
import "./toast.min.js";
|
|
17
|
+
import "./toggle.min.js";
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
(() => {
|
|
2
|
+
const componentRegistry = {};
|
|
3
|
+
let observer = null;
|
|
4
|
+
const registerComponent = (name, selector, initFunction) => {
|
|
5
|
+
componentRegistry[name] = {
|
|
6
|
+
selector,
|
|
7
|
+
init: initFunction
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
const initAllComponents = () => {
|
|
11
|
+
Object.entries(componentRegistry).forEach(([name, { selector, init }]) => {
|
|
12
|
+
document.querySelectorAll(selector).forEach(init);
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
const initNewComponents = (node) => {
|
|
16
|
+
if (node.nodeType !== Node.ELEMENT_NODE) return;
|
|
17
|
+
Object.entries(componentRegistry).forEach(([name, { selector, init }]) => {
|
|
18
|
+
if (node.matches(selector)) {
|
|
19
|
+
init(node);
|
|
20
|
+
}
|
|
21
|
+
node.querySelectorAll(selector).forEach(init);
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
const startObserver = () => {
|
|
25
|
+
if (observer) return;
|
|
26
|
+
let timeout;
|
|
27
|
+
observer = new MutationObserver((mutations) => {
|
|
28
|
+
clearTimeout(timeout);
|
|
29
|
+
timeout = setTimeout(() => {
|
|
30
|
+
mutations.forEach((mutation) => {
|
|
31
|
+
mutation.addedNodes.forEach(initNewComponents);
|
|
32
|
+
});
|
|
33
|
+
}, 50);
|
|
34
|
+
});
|
|
35
|
+
observer.observe(document.body, { childList: true, subtree: true });
|
|
36
|
+
};
|
|
37
|
+
const stopObserver = () => {
|
|
38
|
+
if (observer) {
|
|
39
|
+
observer.disconnect();
|
|
40
|
+
observer = null;
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
const reinitComponent = (componentName) => {
|
|
44
|
+
const component = componentRegistry[componentName];
|
|
45
|
+
if (!component) {
|
|
46
|
+
console.warn(`Component '${componentName}' not found in registry`);
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
const flag = `data-${componentName}-initialized`;
|
|
50
|
+
document.querySelectorAll(`[${flag}]`).forEach((el) => {
|
|
51
|
+
el.removeAttribute(flag);
|
|
52
|
+
});
|
|
53
|
+
document.querySelectorAll(component.selector).forEach(component.init);
|
|
54
|
+
};
|
|
55
|
+
const reinitAll = () => {
|
|
56
|
+
Object.entries(componentRegistry).forEach(([name, { selector }]) => {
|
|
57
|
+
const flag = `data-${name}-initialized`;
|
|
58
|
+
document.querySelectorAll(`[${flag}]`).forEach((el) => {
|
|
59
|
+
el.removeAttribute(flag);
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
initAllComponents();
|
|
63
|
+
};
|
|
64
|
+
window.basecoat = {
|
|
65
|
+
register: registerComponent,
|
|
66
|
+
init: reinitComponent,
|
|
67
|
+
initAll: reinitAll,
|
|
68
|
+
start: startObserver,
|
|
69
|
+
stop: stopObserver
|
|
70
|
+
};
|
|
71
|
+
document.addEventListener("DOMContentLoaded", () => {
|
|
72
|
+
initAllComponents();
|
|
73
|
+
startObserver();
|
|
74
|
+
});
|
|
75
|
+
})();
|