@hamsterbase/ui 0.1.0 → 0.2.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/dist/styles.css CHANGED
@@ -34,20 +34,7 @@
34
34
  }
35
35
  }
36
36
 
37
- @layer theme {
38
- :root, :host {
39
- --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial,
40
- sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
41
- --spacing: .25rem;
42
- --font-weight-medium: 500;
43
- --ease-out: cubic-bezier(0, 0, .2, 1);
44
- --ease-in-out: cubic-bezier(.4, 0, .2, 1);
45
- --default-transition-duration: .15s;
46
- --default-transition-timing-function: cubic-bezier(.4, 0, .2, 1);
47
- }
48
- }
49
-
50
- @layer base, components;
37
+ @layer theme, base, components;
51
38
 
52
39
  @layer utilities {
53
40
  .pointer-events-none {
@@ -78,42 +65,77 @@
78
65
  top: -50%;
79
66
  }
80
67
 
81
- .right-\[-3\.5px\] {
82
- right: -3.5px;
68
+ .right-6 {
69
+ right: calc(var(--spacing, .25rem) * 6);
70
+ }
71
+
72
+ .right-\[calc\(var\(--hub-hit-area\)_\/_-2\)\] {
73
+ right: calc(var(--hub-hit-area) / -2);
74
+ }
75
+
76
+ .bottom-6 {
77
+ bottom: calc(var(--spacing, .25rem) * 6);
83
78
  }
84
79
 
85
80
  .left-0 {
86
81
  left: 0;
87
82
  }
88
83
 
89
- .left-\[-3\.5px\] {
90
- left: -3.5px;
84
+ .left-\[calc\(\(var\(--hub-hit-area\)_-_1px\)_\/_2\)\] {
85
+ left: calc((var(--hub-hit-area) - 1px) / 2);
86
+ }
87
+
88
+ .left-\[calc\(var\(--hub-hit-area\)_\/_-2\)\] {
89
+ left: calc(var(--hub-hit-area) / -2);
91
90
  }
92
91
 
93
- .left-\[3px\] {
94
- left: 3px;
92
+ .z-\(--hub-z-overlay\) {
93
+ z-index: var(--hub-z-overlay);
95
94
  }
96
95
 
97
- .z-10 {
98
- z-index: 10;
96
+ .z-\(--hub-z-raised\) {
97
+ z-index: var(--hub-z-raised);
99
98
  }
100
99
 
101
- .z-40 {
102
- z-index: 40;
100
+ .z-\(--hub-z-toast\) {
101
+ z-index: var(--hub-z-toast);
102
+ }
103
+
104
+ .-m-1 {
105
+ margin: calc(var(--spacing, .25rem) * -1);
103
106
  }
104
107
 
105
108
  .m-0 {
106
109
  margin: 0;
107
110
  }
108
111
 
112
+ .mt-2 {
113
+ margin-top: calc(var(--spacing, .25rem) * 2);
114
+ }
115
+
116
+ .mt-3 {
117
+ margin-top: calc(var(--spacing, .25rem) * 3);
118
+ }
119
+
109
120
  .box-border {
110
121
  box-sizing: border-box;
111
122
  }
112
123
 
124
+ .line-clamp-2 {
125
+ -webkit-line-clamp: 2;
126
+ -webkit-box-orient: vertical;
127
+ display: -webkit-box;
128
+ overflow: hidden;
129
+ }
130
+
113
131
  .block {
114
132
  display: block;
115
133
  }
116
134
 
135
+ .flex {
136
+ display: flex;
137
+ }
138
+
117
139
  .grid {
118
140
  display: grid;
119
141
  }
@@ -131,23 +153,28 @@
131
153
  }
132
154
 
133
155
  .size-3\.5 {
134
- width: calc(var(--spacing) * 3.5);
135
- height: calc(var(--spacing) * 3.5);
156
+ width: calc(var(--spacing, .25rem) * 3.5);
157
+ height: calc(var(--spacing, .25rem) * 3.5);
158
+ }
159
+
160
+ .size-4 {
161
+ width: calc(var(--spacing, .25rem) * 4);
162
+ height: calc(var(--spacing, .25rem) * 4);
136
163
  }
137
164
 
138
165
  .size-6 {
139
- width: calc(var(--spacing) * 6);
140
- height: calc(var(--spacing) * 6);
166
+ width: calc(var(--spacing, .25rem) * 6);
167
+ height: calc(var(--spacing, .25rem) * 6);
141
168
  }
142
169
 
143
170
  .size-7 {
144
- width: calc(var(--spacing) * 7);
145
- height: calc(var(--spacing) * 7);
171
+ width: calc(var(--spacing, .25rem) * 7);
172
+ height: calc(var(--spacing, .25rem) * 7);
146
173
  }
147
174
 
148
175
  .size-8 {
149
- width: calc(var(--spacing) * 8);
150
- height: calc(var(--spacing) * 8);
176
+ width: calc(var(--spacing, .25rem) * 8);
177
+ height: calc(var(--spacing, .25rem) * 8);
151
178
  }
152
179
 
153
180
  .size-full {
@@ -155,32 +182,36 @@
155
182
  height: 100%;
156
183
  }
157
184
 
185
+ .h-\(--hub-hairline\) {
186
+ height: var(--hub-hairline);
187
+ }
188
+
158
189
  .h-6 {
159
- height: calc(var(--spacing) * 6);
190
+ height: calc(var(--spacing, .25rem) * 6);
160
191
  }
161
192
 
162
193
  .h-7 {
163
- height: calc(var(--spacing) * 7);
194
+ height: calc(var(--spacing, .25rem) * 7);
164
195
  }
165
196
 
166
197
  .h-8 {
167
- height: calc(var(--spacing) * 8);
168
- }
169
-
170
- .h-\[0\.5px\] {
171
- height: .5px;
198
+ height: calc(var(--spacing, .25rem) * 8);
172
199
  }
173
200
 
174
201
  .h-\[200\%\] {
175
202
  height: 200%;
176
203
  }
177
204
 
178
- .w-\[0\.5px\] {
179
- width: .5px;
205
+ .w-\(--hub-hairline\) {
206
+ width: var(--hub-hairline);
207
+ }
208
+
209
+ .w-\(--hub-hit-area\) {
210
+ width: var(--hub-hit-area);
180
211
  }
181
212
 
182
- .w-\[7px\] {
183
- width: 7px;
213
+ .w-fit {
214
+ width: fit-content;
184
215
  }
185
216
 
186
217
  .w-full {
@@ -191,10 +222,30 @@
191
222
  width: 1px;
192
223
  }
193
224
 
225
+ .max-w-\[calc\(100vw_-_var\(--hub-float-gutter\)_\*_2\)\] {
226
+ max-width: calc(100vw - var(--hub-float-gutter) * 2);
227
+ }
228
+
229
+ .max-w-\[min\(var\(--hub-float-width\)\,calc\(100vw_-_var\(--hub-float-gutter\)_\*_2\)\)\] {
230
+ max-width: min(var(--hub-float-width), calc(100vw - var(--hub-float-gutter) * 2));
231
+ }
232
+
233
+ .min-w-0 {
234
+ min-width: 0;
235
+ }
236
+
237
+ .flex-1 {
238
+ flex: 1;
239
+ }
240
+
194
241
  .flex-none {
195
242
  flex: none;
196
243
  }
197
244
 
245
+ .shrink-0 {
246
+ flex-shrink: 0;
247
+ }
248
+
198
249
  .origin-left {
199
250
  transform-origin: 0;
200
251
  }
@@ -208,6 +259,10 @@
208
259
  transform: var(--tw-rotate-x, ) var(--tw-rotate-y, ) var(--tw-rotate-z, ) var(--tw-skew-x, ) var(--tw-skew-y, );
209
260
  }
210
261
 
262
+ .animate-\[hub-toast-in_var\(--hub-duration-enter\)_ease\] {
263
+ animation: hub-toast-in var(--hub-duration-enter) ease;
264
+ }
265
+
211
266
  .cursor-col-resize {
212
267
  cursor: col-resize;
213
268
  }
@@ -224,6 +279,10 @@
224
279
  resize: both;
225
280
  }
226
281
 
282
+ .flex-col {
283
+ flex-direction: column;
284
+ }
285
+
227
286
  .place-items-center {
228
287
  place-items: center;
229
288
  }
@@ -232,12 +291,24 @@
232
291
  align-items: center;
233
292
  }
234
293
 
294
+ .items-end {
295
+ align-items: flex-end;
296
+ }
297
+
298
+ .items-start {
299
+ align-items: flex-start;
300
+ }
301
+
235
302
  .justify-center {
236
303
  justify-content: center;
237
304
  }
238
305
 
239
306
  .gap-1\.5 {
240
- gap: calc(var(--spacing) * 1.5);
307
+ gap: calc(var(--spacing, .25rem) * 1.5);
308
+ }
309
+
310
+ .gap-2 {
311
+ gap: calc(var(--spacing, .25rem) * 2);
241
312
  }
242
313
 
243
314
  .self-stretch {
@@ -248,24 +319,38 @@
248
319
  overflow: hidden;
249
320
  }
250
321
 
251
- .rounded-\[3px\] {
252
- border-radius: 3px;
253
- }
254
-
255
322
  .rounded-full {
256
323
  border-radius: 2147483647px;
257
324
  }
258
325
 
326
+ .rounded-hub-lg {
327
+ border-radius: var(--hub-radius-lg);
328
+ }
329
+
330
+ .rounded-hub-sm {
331
+ border-radius: var(--hub-radius-sm);
332
+ }
333
+
259
334
  .border {
260
335
  border-style: var(--tw-border-style);
261
336
  border-width: 1px;
262
337
  }
263
338
 
339
+ .border-\(length\:--hub-hairline\) {
340
+ border-style: var(--tw-border-style);
341
+ border-width: var(--hub-hairline);
342
+ }
343
+
264
344
  .border-0 {
265
345
  border-style: var(--tw-border-style);
266
346
  border-width: 0;
267
347
  }
268
348
 
349
+ .border-solid {
350
+ --tw-border-style: solid;
351
+ border-style: solid;
352
+ }
353
+
269
354
  .border-hub-border {
270
355
  border-color: var(--hub-border);
271
356
  }
@@ -282,14 +367,12 @@
282
367
  background-color: var(--hub-bg-panel);
283
368
  }
284
369
 
285
- .bg-hub-border, .bg-hub-border\/50 {
370
+ .bg-hub-border {
286
371
  background-color: var(--hub-border);
287
372
  }
288
373
 
289
- @supports (color: color-mix(in lab, red, red)) {
290
- .bg-hub-border\/50 {
291
- background-color: color-mix(in oklab, var(--hub-border) 50%, transparent);
292
- }
374
+ .bg-hub-border-subtle {
375
+ background-color: var(--hub-border-subtle);
293
376
  }
294
377
 
295
378
  .bg-hub-error-solid {
@@ -304,6 +387,10 @@
304
387
  background-color: var(--hub-primary-solid);
305
388
  }
306
389
 
390
+ .bg-hub-success-solid {
391
+ background-color: var(--hub-success-solid);
392
+ }
393
+
307
394
  .bg-transparent {
308
395
  background-color: #0000;
309
396
  }
@@ -318,16 +405,24 @@
318
405
  mask-image: linear-gradient(#0000 5%, #000 40% 60%, #0000 95%);
319
406
  }
320
407
 
408
+ .p-0 {
409
+ padding: 0;
410
+ }
411
+
412
+ .p-3 {
413
+ padding: calc(var(--spacing, .25rem) * 3);
414
+ }
415
+
321
416
  .px-2\.5 {
322
- padding-inline: calc(var(--spacing) * 2.5);
417
+ padding-inline: calc(var(--spacing, .25rem) * 2.5);
323
418
  }
324
419
 
325
420
  .px-3 {
326
- padding-inline: calc(var(--spacing) * 3);
421
+ padding-inline: calc(var(--spacing, .25rem) * 3);
327
422
  }
328
423
 
329
424
  .px-4 {
330
- padding-inline: calc(var(--spacing) * 4);
425
+ padding-inline: calc(var(--spacing, .25rem) * 4);
331
426
  }
332
427
 
333
428
  .align-middle {
@@ -335,7 +430,8 @@
335
430
  }
336
431
 
337
432
  .font-sans {
338
- font-family: var(--font-sans);
433
+ font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial,
434
+ sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
339
435
  }
340
436
 
341
437
  .text-hub-md {
@@ -347,13 +443,22 @@
347
443
  }
348
444
 
349
445
  .leading-4 {
350
- --tw-leading: calc(var(--spacing) * 4);
351
- line-height: calc(var(--spacing) * 4);
446
+ --tw-leading: calc(var(--spacing, .25rem) * 4);
447
+ line-height: calc(var(--spacing, .25rem) * 4);
448
+ }
449
+
450
+ .leading-5 {
451
+ --tw-leading: calc(var(--spacing, .25rem) * 5);
452
+ line-height: calc(var(--spacing, .25rem) * 5);
352
453
  }
353
454
 
354
455
  .font-medium {
355
- --tw-font-weight: var(--font-weight-medium);
356
- font-weight: var(--font-weight-medium);
456
+ --tw-font-weight: var(--font-weight-medium, 500);
457
+ font-weight: var(--font-weight-medium, 500);
458
+ }
459
+
460
+ .break-words {
461
+ overflow-wrap: break-word;
357
462
  }
358
463
 
359
464
  .whitespace-nowrap {
@@ -364,6 +469,10 @@
364
469
  color: var(--hub-error-contrast);
365
470
  }
366
471
 
472
+ .text-hub-error-solid {
473
+ color: var(--hub-error-solid);
474
+ }
475
+
367
476
  .text-hub-fg {
368
477
  color: var(--hub-fg);
369
478
  }
@@ -376,10 +485,23 @@
376
485
  color: var(--hub-primary-contrast);
377
486
  }
378
487
 
488
+ .text-hub-primary-solid {
489
+ color: var(--hub-primary-solid);
490
+ }
491
+
492
+ .text-hub-success-contrast {
493
+ color: var(--hub-success-contrast);
494
+ }
495
+
379
496
  .opacity-0 {
380
497
  opacity: 0;
381
498
  }
382
499
 
500
+ .shadow-hub-md {
501
+ --tw-shadow: var(--hub-shadow-md);
502
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
503
+ }
504
+
383
505
  .shadow-hub-sm {
384
506
  --tw-shadow: var(--hub-shadow-sm);
385
507
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
@@ -387,44 +509,39 @@
387
509
 
388
510
  .transition-colors {
389
511
  transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;
390
- transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
391
- transition-duration: var(--tw-duration, var(--default-transition-duration));
512
+ transition-timing-function: var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));
513
+ transition-duration: var(--tw-duration, var(--default-transition-duration, .15s));
392
514
  }
393
515
 
394
516
  .transition-opacity {
395
517
  transition-property: opacity;
396
- transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
397
- transition-duration: var(--tw-duration, var(--default-transition-duration));
518
+ transition-timing-function: var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(.4, 0, .2, 1)));
519
+ transition-duration: var(--tw-duration, var(--default-transition-duration, .15s));
398
520
  }
399
521
 
400
- .duration-100 {
401
- --tw-duration: .1s;
402
- transition-duration: .1s;
522
+ .duration-\(--hub-duration-fast\) {
523
+ --tw-duration: var(--hub-duration-fast);
524
+ transition-duration: var(--hub-duration-fast);
403
525
  }
404
526
 
405
- .duration-150 {
406
- --tw-duration: .15s;
407
- transition-duration: .15s;
527
+ .duration-\(--hub-duration-normal\) {
528
+ --tw-duration: var(--hub-duration-normal);
529
+ transition-duration: var(--hub-duration-normal);
408
530
  }
409
531
 
410
- .duration-250 {
411
- --tw-duration: .25s;
412
- transition-duration: .25s;
413
- }
414
-
415
- .duration-\[80ms\] {
416
- --tw-duration: 80ms;
417
- transition-duration: 80ms;
532
+ .duration-\(--hub-duration-slow\) {
533
+ --tw-duration: var(--hub-duration-slow);
534
+ transition-duration: var(--hub-duration-slow);
418
535
  }
419
536
 
420
537
  .ease-in-out {
421
- --tw-ease: var(--ease-in-out);
422
- transition-timing-function: var(--ease-in-out);
538
+ --tw-ease: var(--ease-in-out, cubic-bezier(.4, 0, .2, 1));
539
+ transition-timing-function: var(--ease-in-out, cubic-bezier(.4, 0, .2, 1));
423
540
  }
424
541
 
425
542
  .ease-out {
426
- --tw-ease: var(--ease-out);
427
- transition-timing-function: var(--ease-out);
543
+ --tw-ease: var(--ease-out, cubic-bezier(0, 0, .2, 1));
544
+ transition-timing-function: var(--ease-out, cubic-bezier(0, 0, .2, 1));
428
545
  }
429
546
 
430
547
  .outline-none {
@@ -488,17 +605,13 @@
488
605
  outline-color: var(--hub-focus-ring);
489
606
  }
490
607
 
491
- :is(:where(.peer):disabled ~ .peer-disabled\:opacity-40) {
492
- opacity: .4;
493
- }
494
-
495
- .focus-visible\:ring-1:focus-visible {
496
- --tw-ring-shadow: var(--tw-ring-inset, ) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
497
- box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
608
+ :is(:where(.peer):focus-visible ~ .peer-focus-visible\:outline-solid) {
609
+ --tw-outline-style: solid;
610
+ outline-style: solid;
498
611
  }
499
612
 
500
- .focus-visible\:ring-hub-focus-ring:focus-visible {
501
- --tw-ring-color: var(--hub-focus-ring);
613
+ :is(:where(.peer):disabled ~ .peer-disabled\:opacity-50) {
614
+ opacity: .5;
502
615
  }
503
616
 
504
617
  .focus-visible\:outline-2:focus-visible {
@@ -514,11 +627,6 @@
514
627
  outline-color: var(--hub-focus-ring);
515
628
  }
516
629
 
517
- .focus-visible\:outline-none:focus-visible {
518
- --tw-outline-style: none;
519
- outline-style: none;
520
- }
521
-
522
630
  .focus-visible\:outline-solid:focus-visible {
523
631
  --tw-outline-style: solid;
524
632
  outline-style: solid;
@@ -529,29 +637,21 @@
529
637
  background-color: var(--hub-bg-muted);
530
638
  }
531
639
 
532
- .enabled\:hover\:bg-hub-error-solid\/90:enabled:hover {
533
- background-color: var(--hub-error-solid);
640
+ .enabled\:hover\:bg-hub-error-solid-hover:enabled:hover {
641
+ background-color: var(--hub-error-solid-hover);
534
642
  }
535
643
 
536
- @supports (color: color-mix(in lab, red, red)) {
537
- .enabled\:hover\:bg-hub-error-solid\/90:enabled:hover {
538
- background-color: color-mix(in oklab, var(--hub-error-solid) 90%, transparent);
539
- }
540
- }
541
-
542
- .enabled\:hover\:bg-hub-primary-solid\/90:enabled:hover {
543
- background-color: var(--hub-primary-solid);
544
- }
545
-
546
- @supports (color: color-mix(in lab, red, red)) {
547
- .enabled\:hover\:bg-hub-primary-solid\/90:enabled:hover {
548
- background-color: color-mix(in oklab, var(--hub-primary-solid) 90%, transparent);
549
- }
644
+ .enabled\:hover\:bg-hub-primary-solid-hover:enabled:hover {
645
+ background-color: var(--hub-primary-solid-hover);
550
646
  }
551
647
 
552
648
  .enabled\:hover\:text-hub-fg:enabled:hover {
553
649
  color: var(--hub-fg);
554
650
  }
651
+
652
+ .enabled\:hover\:underline:enabled:hover {
653
+ text-decoration-line: underline;
654
+ }
555
655
  }
556
656
 
557
657
  .enabled\:active\:bg-hub-bg-emphasized:enabled:active {
@@ -592,20 +692,40 @@
592
692
  background-color: var(--hub-bg-emphasized);
593
693
  }
594
694
 
695
+ .data-closing\:pointer-events-none[data-closing] {
696
+ pointer-events: none;
697
+ }
698
+
699
+ .data-closing\:animate-\[hub-toast-out_var\(--hub-duration-exit\)_ease_forwards\][data-closing] {
700
+ animation: hub-toast-out var(--hub-duration-exit) ease forwards;
701
+ }
702
+
703
+ .data-expanded\:w-\(--hub-float-width\)[data-expanded] {
704
+ width: var(--hub-float-width);
705
+ }
706
+
595
707
  @media (prefers-reduced-motion: reduce) {
708
+ .motion-reduce\:animate-none {
709
+ animation: none;
710
+ }
711
+
596
712
  .motion-reduce\:transition-none {
597
713
  transition-property: none;
598
714
  }
715
+
716
+ .motion-reduce\:data-closing\:animate-none[data-closing] {
717
+ animation: none;
718
+ }
599
719
  }
600
720
 
601
721
  .\[\&_svg\]\:size-3\.5 svg {
602
- width: calc(var(--spacing) * 3.5);
603
- height: calc(var(--spacing) * 3.5);
722
+ width: calc(var(--spacing, .25rem) * 3.5);
723
+ height: calc(var(--spacing, .25rem) * 3.5);
604
724
  }
605
725
 
606
726
  .\[\&_svg\]\:size-4 svg {
607
- width: calc(var(--spacing) * 4);
608
- height: calc(var(--spacing) * 4);
727
+ width: calc(var(--spacing, .25rem) * 4);
728
+ height: calc(var(--spacing, .25rem) * 4);
609
729
  }
610
730
  }
611
731
 
@@ -620,13 +740,75 @@
620
740
  --hub-fg: #25252a;
621
741
  --hub-fg-muted: #73737a;
622
742
  --hub-border: #dedee5;
623
- --hub-border-strong: lch(69.4% 0 142.924);
743
+ --hub-border-strong: lch(61% 0 142.924);
744
+ --hub-border-subtle: var(--hub-border);
745
+ }
746
+
747
+ @supports (color: color-mix(in lab, red, red)) {
748
+ :root {
749
+ --hub-border-subtle: color-mix(in oklab, var(--hub-border) 50%, transparent);
750
+ }
751
+ }
752
+
753
+ :root {
624
754
  --hub-primary-solid: #7560d5;
625
755
  --hub-primary-contrast: #fff;
756
+ --hub-primary-solid-hover: var(--hub-primary-solid);
757
+ }
758
+
759
+ @supports (color: color-mix(in lab, red, red)) {
760
+ :root {
761
+ --hub-primary-solid-hover: color-mix(in oklab, var(--hub-primary-solid) 90%, transparent);
762
+ }
763
+ }
764
+
765
+ :root {
626
766
  --hub-error-solid: #c93645;
627
767
  --hub-error-contrast: #fff;
768
+ --hub-error-solid-hover: var(--hub-error-solid);
769
+ }
770
+
771
+ @supports (color: color-mix(in lab, red, red)) {
772
+ :root {
773
+ --hub-error-solid-hover: color-mix(in oklab, var(--hub-error-solid) 90%, transparent);
774
+ }
775
+ }
776
+
777
+ :root {
778
+ --hub-success-solid: #62b963;
779
+ --hub-success-contrast: #fff;
628
780
  --hub-shadow-sm: 0 0 0 .5px #0000000f, 0 3px 6px -2px #00000005, 0 1px 1px #0000000a;
781
+ --hub-shadow-md: 0 6px 18px #00000005, 0 3px 9px #0000000a, 0 1px 1px #0000000a;
629
782
  --hub-focus-ring: #7560d5;
783
+ --hub-radius-sm: 3px;
784
+ --hub-radius-lg: 12px;
785
+ --hub-hairline: .5px;
786
+ --hub-hit-area: 7px;
787
+ --hub-float-width: 320px;
788
+ --hub-float-gutter: 16px;
789
+ --hub-duration-fast: .1s;
790
+ --hub-duration-normal: .15s;
791
+ --hub-duration-slow: .25s;
792
+ --hub-duration-enter: .4s;
793
+ --hub-duration-exit: .2s;
794
+ --hub-duration-emphasis: .8s;
795
+ --hub-z-raised: 10;
796
+ --hub-z-overlay: 40;
797
+ --hub-z-toast: 1500;
798
+ }
799
+
800
+ @keyframes hub-toast-in {
801
+ from {
802
+ opacity: 0;
803
+ transform: translateY(100%);
804
+ }
805
+ }
806
+
807
+ @keyframes hub-toast-out {
808
+ to {
809
+ opacity: 0;
810
+ transform: translateY(12px);
811
+ }
630
812
  }
631
813
 
632
814
  @property --tw-scale-x {
@@ -0,0 +1,4 @@
1
+ /** 元素自身获得键盘焦点时。 */
2
+ export declare const focusRing = "focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-offset-2 focus-visible:outline-hub-focus-ring";
3
+ /** 前一个兄弟节点(peer,如隐藏的原生 input)获得键盘焦点时。 */
4
+ export declare const peerFocusRing = "peer-focus-visible:outline-2 peer-focus-visible:outline-solid peer-focus-visible:outline-offset-2 peer-focus-visible:outline-hub-focus-ring";
package/docs/Checkbox.md CHANGED
@@ -3,3 +3,5 @@
3
3
  | 属性 | 类型 | 默认值 | 说明 |
4
4
  | --- | --- | --- | --- |
5
5
  | indeterminate | `boolean` | `false` | 半选状态,显示横线;独立于 checked,不改变表单提交值。 |
6
+
7
+ `className` 落在外层的 `span` 上,用于调整布局与间距;`ref`、`style` 和其余原生属性落在内部的 `input` 上。
@@ -2,6 +2,6 @@
2
2
 
3
3
  | 属性 | 类型 | 默认值 | 说明 |
4
4
  | --- | --- | --- | --- |
5
- | variant | `'primary' \| 'secondary'` | `'primary'` | primary 带描边与轻阴影;secondary 透明、无边框。 |
5
+ | variant | `'surface' \| 'ghost'` | `'surface'` | surface 带描边与轻阴影;ghost 透明、无边框,与 Button 的 ghost 含义一致。 |
6
6
  | size | `'sm' \| 'md' \| 'lg'` | `'md'` | 按钮尺寸分别为 24、28、32px;内部 SVG 尺寸分别为 14、14、16px。 |
7
7
  | pressed | `boolean` | `undefined` | 受控选中状态,内部映射为 `aria-pressed`。不传时为普通按钮;点击不会自动修改状态。 |