@glasshome/ui 1.5.0 → 2.0.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/README.md +3 -3
- package/SPEC.md +35 -0
- package/dist/index.d.ts +13 -5
- package/dist/index.js +2 -13
- package/dist/lib/alert-tones.d.ts +2 -1
- package/dist/lib/badge-tone.d.ts +3 -1
- package/dist/lib/button-variants.d.ts +2 -1
- package/dist/lib/card-classes.d.ts +8 -7
- package/dist/lib/glass-tone.d.ts +2 -0
- package/dist/lib/input-classes.d.ts +10 -1
- package/dist/lib/layers.d.ts +8 -0
- package/dist/lib/menu-classes.d.ts +5 -0
- package/dist/lib/motion-classes.d.ts +8 -0
- package/dist/lib/overlay-classes.d.ts +11 -4
- package/dist/lib/picker-classes.d.ts +3 -0
- package/dist/lib/pill-classes.d.ts +3 -0
- package/dist/lib/position-bar-classes.d.ts +2 -0
- package/dist/lib/section-tokens.d.ts +3 -2
- package/dist/lib/segment-classes.d.ts +1 -0
- package/dist/lib/thumb-classes.d.ts +5 -0
- package/dist/lib/use-is-mobile.d.ts +2 -1
- package/dist/solid/alert-dialog.d.ts +16 -17
- package/dist/solid/area-picker.d.ts +18 -3
- package/dist/solid/bottom-sheet/bottom-sheet.d.ts +9 -7
- package/dist/solid/bottom-sheet/constants.d.ts +0 -1
- package/dist/solid/bottom-sheet/index.d.ts +1 -1
- package/dist/solid/charts.d.ts +10 -5
- package/dist/solid/checkbox.d.ts +16 -1
- package/dist/solid/context-menu.d.ts +3 -1
- package/dist/solid/count-pill.d.ts +5 -3
- package/dist/solid/data-table.d.ts +4 -3
- package/dist/solid/dialog-parts.d.ts +55 -0
- package/dist/solid/dialog.d.ts +17 -14
- package/dist/solid/dropdown-menu.d.ts +19 -25
- package/dist/solid/empty.d.ts +5 -28
- package/dist/solid/entity-selector.d.ts +2 -0
- package/dist/solid/field.d.ts +3 -1
- package/dist/solid/form.d.ts +27 -7
- package/dist/solid/hero-action.d.ts +15 -0
- package/dist/solid/icon-picker.d.ts +2 -0
- package/dist/solid/index.d.ts +18 -10
- package/dist/solid/index.js +10377 -9274
- package/dist/solid/input-group.d.ts +14 -2
- package/dist/solid/item.d.ts +6 -30
- package/dist/solid/menu-parts.d.ts +47 -0
- package/dist/solid/option-card.d.ts +37 -0
- package/dist/solid/ornament.d.ts +3 -0
- package/dist/solid/page-header.d.ts +11 -1
- package/dist/solid/password-input.d.ts +9 -0
- package/dist/solid/picker-row.d.ts +14 -0
- package/dist/solid/picker-search.d.ts +15 -0
- package/dist/solid/popover.d.ts +9 -18
- package/dist/solid/progress.d.ts +1 -0
- package/dist/solid/radio-group.d.ts +3 -1
- package/dist/solid/responsive-dialog.d.ts +16 -6
- package/dist/solid/schema-form.d.ts +4 -0
- package/dist/solid/scroll-area.d.ts +1 -0
- package/dist/solid/section-card.d.ts +5 -6
- package/dist/solid/settings-row.d.ts +4 -0
- package/dist/solid/sheet.d.ts +22 -16
- package/dist/solid/step-indicator.d.ts +10 -0
- package/dist/solid/switch.d.ts +3 -6
- package/dist/solid/table.d.ts +3 -0
- package/dist/solid/tabs.d.ts +7 -5
- package/dist/solid/tooltip.d.ts +1 -1
- package/dist/solid/widget-identity.d.ts +4 -1
- package/dist/tokens/index.js +1 -1
- package/dist/{utils-8e8QCynI.js → utils-CiJUMt2j.js} +560 -523
- package/package.json +5 -3
- package/src/lib/alert-tones.ts +8 -3
- package/src/lib/badge-tone.ts +9 -2
- package/src/lib/button-variants.ts +8 -4
- package/src/lib/card-classes.ts +12 -7
- package/src/lib/carousel-classes.ts +2 -3
- package/src/lib/glass-tone.ts +8 -0
- package/src/lib/input-classes.ts +23 -1
- package/src/lib/layers.ts +12 -0
- package/src/lib/menu-classes.ts +21 -0
- package/src/lib/motion-classes.ts +40 -0
- package/src/lib/overlay-classes.ts +22 -5
- package/src/lib/picker-classes.ts +17 -0
- package/src/lib/pill-classes.ts +13 -0
- package/src/lib/position-bar-classes.ts +10 -0
- package/src/lib/section-tokens.ts +9 -4
- package/src/lib/segment-classes.ts +7 -0
- package/src/lib/thumb-classes.ts +21 -0
- package/src/lib/use-is-mobile.ts +10 -6
- package/src/styles/globals.css +97 -25
- package/src/styles/theme.css +67 -6
package/src/styles/theme.css
CHANGED
|
@@ -31,6 +31,10 @@
|
|
|
31
31
|
--font-mono: var(--font-mono);
|
|
32
32
|
--font-serif: var(--font-serif);
|
|
33
33
|
|
|
34
|
+
/* Below --radius-sm: a box small enough that the theme's smallest token would
|
|
35
|
+
round it into a circle (checkbox, OTP slot). Clamped, so a tiny --radius
|
|
36
|
+
theme never grows it. */
|
|
37
|
+
--radius-xs: min(5px, var(--radius-sm));
|
|
34
38
|
--radius-sm: calc(var(--radius) - 4px);
|
|
35
39
|
--radius-md: calc(var(--radius) - 2px);
|
|
36
40
|
--radius-lg: var(--radius);
|
|
@@ -54,8 +58,15 @@
|
|
|
54
58
|
* exposes no data-side, only --kb-select-content-transform-origin (set to the
|
|
55
59
|
* trigger edge per placement), so a scaleY from that origin grows the panel
|
|
56
60
|
* down when it opens below and up when above, no direction class needed. */
|
|
57
|
-
--animate-select-in: select-in
|
|
58
|
-
--animate-select-out: select-out
|
|
61
|
+
--animate-select-in: select-in var(--duration-expand) var(--ease-expand) both;
|
|
62
|
+
--animate-select-out: select-out var(--duration-micro) var(--ease-contract) both;
|
|
63
|
+
|
|
64
|
+
/* Trigger morph: the panel is anchored over the trigger's top edge and starts
|
|
65
|
+
* clipped to the trigger's own box and radius (--morph-w/h/radius, written by
|
|
66
|
+
* the content from its trigger), then unrolls into its own box. The pill
|
|
67
|
+
* becomes the panel; nothing scales, so no row or radius distorts. */
|
|
68
|
+
--animate-morph-in: morph-in var(--duration-morph) var(--ease-morph) both;
|
|
69
|
+
--animate-morph-out: morph-out calc(var(--duration-morph) / 2) var(--ease-contract) both;
|
|
59
70
|
}
|
|
60
71
|
|
|
61
72
|
@keyframes collapsible-down {
|
|
@@ -100,6 +111,40 @@
|
|
|
100
111
|
pointer-events: auto;
|
|
101
112
|
}
|
|
102
113
|
}
|
|
114
|
+
@keyframes morph-in {
|
|
115
|
+
from {
|
|
116
|
+
opacity: 0;
|
|
117
|
+
clip-path: inset(
|
|
118
|
+
0 calc(100% - var(--morph-w, 100%)) calc(100% - var(--morph-h, 2.5rem)) 0 round
|
|
119
|
+
var(--morph-radius, 9999px)
|
|
120
|
+
);
|
|
121
|
+
pointer-events: none;
|
|
122
|
+
}
|
|
123
|
+
35% {
|
|
124
|
+
opacity: 1;
|
|
125
|
+
}
|
|
126
|
+
90% {
|
|
127
|
+
pointer-events: none;
|
|
128
|
+
}
|
|
129
|
+
to {
|
|
130
|
+
opacity: 1;
|
|
131
|
+
clip-path: inset(0 0 0 0 round var(--radius-md));
|
|
132
|
+
pointer-events: auto;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
@keyframes morph-out {
|
|
136
|
+
from {
|
|
137
|
+
opacity: 1;
|
|
138
|
+
clip-path: inset(0 0 0 0 round var(--radius-md));
|
|
139
|
+
}
|
|
140
|
+
to {
|
|
141
|
+
opacity: 0;
|
|
142
|
+
clip-path: inset(
|
|
143
|
+
0 calc(100% - var(--morph-w, 100%)) calc(100% - var(--morph-h, 2.5rem)) 0 round
|
|
144
|
+
var(--morph-radius, 9999px)
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
103
148
|
@keyframes select-out {
|
|
104
149
|
from {
|
|
105
150
|
opacity: 1;
|
|
@@ -181,6 +226,13 @@
|
|
|
181
226
|
* border change, state a tone or chip swap, expand an open/close. Theme
|
|
182
227
|
* independent, so declared once; zeroed under prefers-reduced-motion. */
|
|
183
228
|
--ease-emphasis: cubic-bezier(0.22, 1, 0.36, 1);
|
|
229
|
+
/* Arrivals overshoot-free and quick to settle; departures fall away. */
|
|
230
|
+
--ease-expand: cubic-bezier(0.16, 1, 0.3, 1);
|
|
231
|
+
--ease-contract: cubic-bezier(0.4, 0, 1, 1);
|
|
232
|
+
/* A morph is a shape becoming another shape: slower than an arrival, and it
|
|
233
|
+
* leaves the start shape gently instead of snapping out of it. */
|
|
234
|
+
--duration-morph: 400ms;
|
|
235
|
+
--ease-morph: cubic-bezier(0.32, 0.72, 0, 1);
|
|
184
236
|
--duration-micro: 120ms;
|
|
185
237
|
--duration-state: 160ms;
|
|
186
238
|
--duration-expand: 200ms;
|
|
@@ -191,7 +243,7 @@
|
|
|
191
243
|
--foreground: oklch(0.9551 0 0);
|
|
192
244
|
--card: oklch(0.17 0.01 250);
|
|
193
245
|
--card-foreground: oklch(0.9551 0 0);
|
|
194
|
-
--popover: oklch(0.
|
|
246
|
+
--popover: oklch(0.11 0.005 250);
|
|
195
247
|
--popover-foreground: oklch(0.9551 0 0);
|
|
196
248
|
--primary: oklch(0.48 0.2 215.221);
|
|
197
249
|
--primary-foreground: oklch(1 0 0);
|
|
@@ -453,6 +505,12 @@
|
|
|
453
505
|
--duration-micro: 0ms;
|
|
454
506
|
--duration-state: 0ms;
|
|
455
507
|
--duration-expand: 0ms;
|
|
508
|
+
--duration-morph: 0ms;
|
|
509
|
+
}
|
|
510
|
+
/* tw-animate enter/exit classes carry their own fallback duration. */
|
|
511
|
+
.animate-in,
|
|
512
|
+
.animate-out {
|
|
513
|
+
--tw-animation-duration: 1ms;
|
|
456
514
|
}
|
|
457
515
|
}
|
|
458
516
|
|
|
@@ -496,15 +554,18 @@
|
|
|
496
554
|
transform: translate3d(0, 100%, 0);
|
|
497
555
|
}
|
|
498
556
|
}
|
|
557
|
+
/* --bs-duration and --bs-ease are published inline by BottomSheetContent from
|
|
558
|
+
bottom-sheet/constants.ts; --modal-max-h comes from MODAL_MAX_H, the height
|
|
559
|
+
cap every modal panel shares. */
|
|
499
560
|
.bs-content {
|
|
500
561
|
transform: translate3d(0, 100%, 0);
|
|
501
562
|
bottom: var(--bs-keyboard-offset, 0);
|
|
502
563
|
}
|
|
503
564
|
.bs-content[data-keyboard-open] {
|
|
504
|
-
max-height: calc(
|
|
565
|
+
max-height: calc(var(--modal-max-h) - var(--bs-keyboard-offset, 0px));
|
|
505
566
|
}
|
|
506
567
|
.bs-content[data-state="opening"] {
|
|
507
|
-
animation: bs-slide-up
|
|
568
|
+
animation: bs-slide-up var(--bs-duration) var(--bs-ease) forwards;
|
|
508
569
|
}
|
|
509
570
|
.bs-content[data-state="open"],
|
|
510
571
|
.bs-content[data-state="pressing"],
|
|
@@ -513,7 +574,7 @@
|
|
|
513
574
|
transform: translate3d(0, 0, 0);
|
|
514
575
|
}
|
|
515
576
|
.bs-content[data-state="closing"] {
|
|
516
|
-
animation: bs-slide-down
|
|
577
|
+
animation: bs-slide-down var(--bs-duration) var(--bs-ease) forwards;
|
|
517
578
|
}
|
|
518
579
|
.bs-content[data-reduced-motion] {
|
|
519
580
|
animation-duration: 0ms !important;
|