@glasshome/ui 1.34.0 → 1.34.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/solid/index.js +3 -3
- package/dist/{utils-C0qKxkyh.js → utils-GYi7-pG_.js} +3 -3
- package/package.json +1 -1
- package/src/lib/button-variants.ts +3 -3
- package/src/solid/option-card.tsx +1 -1
- package/src/solid/radio-group.tsx +1 -1
- package/src/styles/globals.css +11 -12
- package/src/styles/theme.css +7 -0
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as e, $t as t, A as n, At as r, B as i, Bt as a, C as ee, D as te, E as ne, Et as o, F as s, Ft as c, G as l, Gt as u, H as d, I as f, It as p, K as m, Kt as h, L as g, Lt as _, M as v, Mt as y, N as b, O as x, P as S, Pt as C, Q as w, Qt as T, R as E, S as D, Tt as O, U as k, Ut as A, V as j, Vt as M, W as N, Wt as P, Xt as F, Y as I, Yt as L, Z as R, Zt as z, _ as B, _t as V, an as H, at as U, b as W, c as G, ct as K, d as q, dt as J, en as Y, et as X, f as Z, ft as re, g as ie, h as ae, ht as oe, i as se, in as ce, it as le, j as ue, k as de, kt as fe, l as pe, lt as me, m as he, mt as ge, n as _e, nn as ve, nt as ye, o as be, on as xe, ot as Se, p as Ce, pt as we, q as Te, qt as Ee, r as De, rn as Oe, rt as ke, s as Ae, sn as je, st as Me, t as Ne, tt as Pe, u as Fe, ut as Q, v as Ie, w as Le, wt as Re, x as ze, y as Be, z as Ve, zt as He } from "./utils-
|
|
1
|
+
import { $ as e, $t as t, A as n, At as r, B as i, Bt as a, C as ee, D as te, E as ne, Et as o, F as s, Ft as c, G as l, Gt as u, H as d, I as f, It as p, K as m, Kt as h, L as g, Lt as _, M as v, Mt as y, N as b, O as x, P as S, Pt as C, Q as w, Qt as T, R as E, S as D, Tt as O, U as k, Ut as A, V as j, Vt as M, W as N, Wt as P, Xt as F, Y as I, Yt as L, Z as R, Zt as z, _ as B, _t as V, an as H, at as U, b as W, c as G, ct as K, d as q, dt as J, en as Y, et as X, f as Z, ft as re, g as ie, h as ae, ht as oe, i as se, in as ce, it as le, j as ue, k as de, kt as fe, l as pe, lt as me, m as he, mt as ge, n as _e, nn as ve, nt as ye, o as be, on as xe, ot as Se, p as Ce, pt as we, q as Te, qt as Ee, r as De, rn as Oe, rt as ke, s as Ae, sn as je, st as Me, t as Ne, tt as Pe, u as Fe, ut as Q, v as Ie, w as Le, wt as Re, x as ze, y as Be, z as Ve, zt as He } from "./utils-GYi7-pG_.js";
|
|
2
2
|
//#region src/lib/motion-window.ts
|
|
3
3
|
var $ = 3e4;
|
|
4
4
|
function Ue(e = $) {
|
package/dist/solid/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as e, $t as t, A as n, At as r, B as i, Bt as a, Ct as o, D as s, Dt as c, E as l, Et as u, F as d, Ft as f, Gt as p, H as m, Ht as h, It as g, J as _, Jt as v, K as y, Kt as b, Lt as x, M as S, Mt as C, Nt as w, O as T, Ot as E, P as ee, Pt as D, Q as te, Qt as ne, Rt as re, S as ie, T as ae, Tt as oe, U as se, V as ce, Vt as le, W as ue, X as de, Xt as fe, Y as pe, Yt as me, Zt as he, _ as ge, _t as _e, a as ve, at as ye, b as be, bt as xe, cn as Se, ct as Ce, d as we, dt as Te, en as Ee, et as De, f as Oe, ft as ke, g as Ae, gt as je, h as Me, ht as Ne, i as Pe, j as Fe, jt as Ie, k as Le, kt as Re, l as ze, lt as Be, m as Ve, mt as He, nn as Ue, nt as We, o as Ge, on as Ke, ot as qe, p as Je, q as Ye, qt as Xe, r as Ze, rn as Qe, rt as $e, s as et, st as tt, t as O, tt as nt, u as rt, ut as it, v as at, vt as ot, w as st, wt as ct, xt as lt, y as ut, yt as dt, z as ft, zt as pt } from "../utils-
|
|
1
|
+
import { $ as e, $t as t, A as n, At as r, B as i, Bt as a, Ct as o, D as s, Dt as c, E as l, Et as u, F as d, Ft as f, Gt as p, H as m, Ht as h, It as g, J as _, Jt as v, K as y, Kt as b, Lt as x, M as S, Mt as C, Nt as w, O as T, Ot as E, P as ee, Pt as D, Q as te, Qt as ne, Rt as re, S as ie, T as ae, Tt as oe, U as se, V as ce, Vt as le, W as ue, X as de, Xt as fe, Y as pe, Yt as me, Zt as he, _ as ge, _t as _e, a as ve, at as ye, b as be, bt as xe, cn as Se, ct as Ce, d as we, dt as Te, en as Ee, et as De, f as Oe, ft as ke, g as Ae, gt as je, h as Me, ht as Ne, i as Pe, j as Fe, jt as Ie, k as Le, kt as Re, l as ze, lt as Be, m as Ve, mt as He, nn as Ue, nt as We, o as Ge, on as Ke, ot as qe, p as Je, q as Ye, qt as Xe, r as Ze, rn as Qe, rt as $e, s as et, st as tt, t as O, tt as nt, u as rt, ut as it, v as at, vt as ot, w as st, wt as ct, xt as lt, y as ut, yt as dt, z as ft, zt as pt } from "../utils-GYi7-pG_.js";
|
|
2
2
|
import { $TRACK as mt, DEV as ht, For as gt, Index as _t, Match as vt, Show as k, Switch as yt, batch as bt, children as xt, createComponent as St, createComputed as Ct, createContext as A, createEffect as j, createMemo as M, createRenderEffect as wt, createResource as Tt, createRoot as Et, createSignal as N, createUniqueId as P, getOwner as Dt, mergeProps as Ot, on as kt, onCleanup as F, onMount as At, splitProps as I, untrack as jt, useContext as L } from "solid-js";
|
|
3
3
|
import { Dynamic as Mt, Portal as Nt, classList as Pt, className as R, createComponent as z, delegateEvents as Ft, effect as B, insert as V, isServer as It, isServer as Lt, memo as H, mergeProps as U, setAttribute as W, setStyleProperty as Rt, spread as G, style as zt, template as K, use as Bt } from "solid-js/web";
|
|
4
4
|
import { createStore as Vt, produce as Ht, reconcile as Ut } from "solid-js/store";
|
|
@@ -18343,7 +18343,7 @@ var fO = Object.assign(dO, {
|
|
|
18343
18343
|
ItemInput: cO,
|
|
18344
18344
|
ItemLabel: lO,
|
|
18345
18345
|
Label: uO
|
|
18346
|
-
}), pO = /*#__PURE__*/ K("<span data-slot=radio-group-item-dot class=\"
|
|
18346
|
+
}), pO = /*#__PURE__*/ K("<span data-slot=radio-group-item-dot class=\"color-calc:[background:oklch(from_var(--primary)_calc((0.42_-_l)*100)_0_0)] dark:color-calc:[background:oklch(from_var(--primary)_calc((0.6_-_l)*100)_0_0)] bg-primary-foreground size-[36%] rounded-full\">"), mO = /*#__PURE__*/ K("<div data-slot=radio-group-item-content class=\"min-w-0 flex-1 text-sm\">"), hO = (e) => {
|
|
18347
18347
|
let [t, n] = I(e, ["class"]);
|
|
18348
18348
|
return z(fO, U({
|
|
18349
18349
|
"data-slot": "radio-group",
|
|
@@ -18395,7 +18395,7 @@ var fO = Object.assign(dO, {
|
|
|
18395
18395
|
}
|
|
18396
18396
|
})];
|
|
18397
18397
|
} }));
|
|
18398
|
-
}, _O = /*#__PURE__*/ K("<div data-slot=option-card-row class=\"flex w-full items-center gap-3.5 p-3.5\"><div class=\"flex min-w-0 flex-1 flex-col gap-0.5\"><span data-slot=option-card-title class=\"text-[15px] leading-snug font-semibold\">"), vO = /*#__PURE__*/ K("<div data-slot=option-card-drawer class=\"grid grid-rows-[0fr] transition-[grid-template-rows] duration-(--duration-morph) ease-(--ease-morph) group-data-[checked]/option-card:grid-rows-[1fr]\"><div class=\"min-h-0 overflow-hidden\"><div class=\"-translate-y-2 flex flex-col gap-0.5 pr-1 pb-2 pl-[calc(var(--spacing)*3.5+54px)] opacity-0 transition-[opacity,translate] duration-(--duration-expand) ease-(--ease-morph) group-data-[checked]/option-card:translate-y-0 group-data-[checked]/option-card:opacity-100 group-data-[checked]/option-card:delay-[80ms]\">"), yO = /*#__PURE__*/ K("<div data-slot=option-card>"), bO = /*#__PURE__*/ K("<span data-slot=option-card-description class=\"text-muted-foreground text-sm leading-normal\">"), xO = /*#__PURE__*/ K("<span data-slot=option-card-icon aria-hidden=true class=\"grid size-10 shrink-0 place-items-center rounded-[14px] bg-[color-mix(in_oklab,var(--surface-tone)_80%,black)]
|
|
18398
|
+
}, _O = /*#__PURE__*/ K("<div data-slot=option-card-row class=\"flex w-full items-center gap-3.5 p-3.5\"><div class=\"flex min-w-0 flex-1 flex-col gap-0.5\"><span data-slot=option-card-title class=\"text-[15px] leading-snug font-semibold\">"), vO = /*#__PURE__*/ K("<div data-slot=option-card-drawer class=\"grid grid-rows-[0fr] transition-[grid-template-rows] duration-(--duration-morph) ease-(--ease-morph) group-data-[checked]/option-card:grid-rows-[1fr]\"><div class=\"min-h-0 overflow-hidden\"><div class=\"-translate-y-2 flex flex-col gap-0.5 pr-1 pb-2 pl-[calc(var(--spacing)*3.5+54px)] opacity-0 transition-[opacity,translate] duration-(--duration-expand) ease-(--ease-morph) group-data-[checked]/option-card:translate-y-0 group-data-[checked]/option-card:opacity-100 group-data-[checked]/option-card:delay-[80ms]\">"), yO = /*#__PURE__*/ K("<div data-slot=option-card>"), bO = /*#__PURE__*/ K("<span data-slot=option-card-description class=\"text-muted-foreground text-sm leading-normal\">"), xO = /*#__PURE__*/ K("<span data-slot=option-card-icon aria-hidden=true class=\"color-calc:[color:oklch(from_var(--surface-tone)_calc((0.75_-_l)*100)_0_0)] text-primary-foreground grid size-10 shrink-0 place-items-center rounded-[14px] bg-[color-mix(in_oklab,var(--surface-tone)_80%,black)]\">"), SO = /*#__PURE__*/ K("<img alt class=\"size-5 object-contain\">"), CO = `${ct} group/option-card relative cursor-pointer overflow-hidden rounded-xl transition-glass duration-200 [&:not([style*=--glass-tone])]:[--glass-tone:var(--primary)] [--glass-wash:9%] hover:[--glass-wash:16%] has-[:focus-visible]:[--glass-edge:var(--ring)] has-[:focus-visible]:ring-[3px] has-[:focus-visible]:ring-ring/50 data-[checked]:[--glass-wash:30%] data-[checked]:[--glass-edge:oklch(from_var(--glass-tone)_l_c_h/0.75)] data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`, wO = "rounded-sm text-foreground/75 transition-colors hover:bg-foreground/5 aria-checked:text-foreground", TO = A();
|
|
18399
18399
|
function EO(e) {
|
|
18400
18400
|
let t = L(TO);
|
|
18401
18401
|
if (!t) throw Error("OptionChoice renders inside an OptionCard");
|
|
@@ -126,9 +126,9 @@ var g = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, _ = [], { com
|
|
|
126
126
|
base: "transition-glass focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 rounded-lg text-sm font-medium whitespace-nowrap outline-none focus-visible:ring-[3px] active:scale-[0.97] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
127
127
|
variants: {
|
|
128
128
|
variant: {
|
|
129
|
-
default: `glass glass-tint ${b}
|
|
130
|
-
destructive: `glass glass-tint ${b} focus-visible:ring-destructive/30
|
|
131
|
-
secondary: `glass glass-tint ${b}
|
|
129
|
+
default: `glass glass-tint ${b} dark:text-primary-foreground dark:color-calc:[color:oklch(from_var(--glass-tone)_calc((0.74_-_l)*100)_0_0)] dark:color-calc:[--glass-tone:oklch(from_var(--material-accent)_calc(l_+_clamp(0,(l_-_0.74)*10,0.1))_c_h)] [--glass-text:0%] [--glass-tone:var(--material-accent)] [--glass-wash:55%] hover:[--glass-edge:color-mix(in_srgb,var(--material-accent)_60%,transparent)] hover:[--glass-wash:65%] dark:[--glass-wash:62%] dark:hover:[--glass-wash:70%]`,
|
|
130
|
+
destructive: `glass glass-tint ${b} focus-visible:ring-destructive/30 dark:text-destructive-foreground dark:color-calc:[color:oklch(from_var(--glass-tone)_calc((0.74_-_l)*100)_0_0)] dark:color-calc:[--glass-tone:oklch(from_var(--destructive)_calc(l_+_clamp(0,(l_-_0.74)*10,0.1))_c_h)] [--glass-text:0%] [--glass-tone:var(--destructive)] [--glass-wash:55%] hover:[--glass-edge:color-mix(in_srgb,var(--destructive)_60%,transparent)] hover:[--glass-wash:65%] dark:[--glass-wash:62%] dark:hover:[--glass-wash:70%]`,
|
|
131
|
+
secondary: `glass glass-tint ${b} dark:text-accent-foreground dark:color-calc:[color:oklch(from_var(--glass-tone)_calc((0.74_-_l)*100)_0_0)] dark:color-calc:[--glass-tone:oklch(from_var(--accent)_calc(l_+_clamp(0,(l_-_0.74)*10,0.1))_c_h)] [--glass-text:0%] [--glass-tone:var(--accent)] [--glass-wash:55%] hover:[--glass-edge:color-mix(in_srgb,var(--accent)_60%,transparent)] hover:[--glass-wash:65%] dark:[--glass-wash:62%] dark:hover:[--glass-wash:70%]`,
|
|
132
132
|
outline: x,
|
|
133
133
|
ghost: "hover:bg-muted hover:text-foreground dark:hover:bg-muted/50",
|
|
134
134
|
link: "text-primary-tint-foreground underline-offset-4 hover:underline"
|
package/package.json
CHANGED
|
@@ -20,9 +20,9 @@ export const buttonVariants = cva({
|
|
|
20
20
|
base: "transition-glass focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 rounded-lg text-sm font-medium whitespace-nowrap outline-none focus-visible:ring-[3px] active:scale-[0.97] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
21
21
|
variants: {
|
|
22
22
|
variant: {
|
|
23
|
-
default: `glass glass-tint ${CONTROL_GLASS}
|
|
24
|
-
destructive: `glass glass-tint ${CONTROL_GLASS} focus-visible:ring-destructive/30
|
|
25
|
-
secondary: `glass glass-tint ${CONTROL_GLASS}
|
|
23
|
+
default: `glass glass-tint ${CONTROL_GLASS} dark:text-primary-foreground dark:color-calc:[color:oklch(from_var(--glass-tone)_calc((0.74_-_l)*100)_0_0)] dark:color-calc:[--glass-tone:oklch(from_var(--material-accent)_calc(l_+_clamp(0,(l_-_0.74)*10,0.1))_c_h)] [--glass-text:0%] [--glass-tone:var(--material-accent)] [--glass-wash:55%] hover:[--glass-edge:color-mix(in_srgb,var(--material-accent)_60%,transparent)] hover:[--glass-wash:65%] dark:[--glass-wash:62%] dark:hover:[--glass-wash:70%]`,
|
|
24
|
+
destructive: `glass glass-tint ${CONTROL_GLASS} focus-visible:ring-destructive/30 dark:text-destructive-foreground dark:color-calc:[color:oklch(from_var(--glass-tone)_calc((0.74_-_l)*100)_0_0)] dark:color-calc:[--glass-tone:oklch(from_var(--destructive)_calc(l_+_clamp(0,(l_-_0.74)*10,0.1))_c_h)] [--glass-text:0%] [--glass-tone:var(--destructive)] [--glass-wash:55%] hover:[--glass-edge:color-mix(in_srgb,var(--destructive)_60%,transparent)] hover:[--glass-wash:65%] dark:[--glass-wash:62%] dark:hover:[--glass-wash:70%]`,
|
|
25
|
+
secondary: `glass glass-tint ${CONTROL_GLASS} dark:text-accent-foreground dark:color-calc:[color:oklch(from_var(--glass-tone)_calc((0.74_-_l)*100)_0_0)] dark:color-calc:[--glass-tone:oklch(from_var(--accent)_calc(l_+_clamp(0,(l_-_0.74)*10,0.1))_c_h)] [--glass-text:0%] [--glass-tone:var(--accent)] [--glass-wash:55%] hover:[--glass-edge:color-mix(in_srgb,var(--accent)_60%,transparent)] hover:[--glass-wash:65%] dark:[--glass-wash:62%] dark:hover:[--glass-wash:70%]`,
|
|
26
26
|
outline: OUTLINE_SURFACE,
|
|
27
27
|
ghost: "hover:bg-muted hover:text-foreground dark:hover:bg-muted/50",
|
|
28
28
|
link: "text-primary-tint-foreground underline-offset-4 hover:underline",
|
|
@@ -195,7 +195,7 @@ function OptionIconWell(props: { icon?: string; image?: string }) {
|
|
|
195
195
|
<span
|
|
196
196
|
data-slot="option-card-icon"
|
|
197
197
|
aria-hidden="true"
|
|
198
|
-
class="grid size-10 shrink-0 place-items-center rounded-[14px] bg-[color-mix(in_oklab,var(--surface-tone)_80%,black)]
|
|
198
|
+
class="color-calc:[color:oklch(from_var(--surface-tone)_calc((0.75_-_l)*100)_0_0)] text-primary-foreground grid size-10 shrink-0 place-items-center rounded-[14px] bg-[color-mix(in_oklab,var(--surface-tone)_80%,black)]"
|
|
199
199
|
>
|
|
200
200
|
<Show
|
|
201
201
|
when={props.image}
|
|
@@ -47,7 +47,7 @@ const RadioGroupItem: Component<
|
|
|
47
47
|
>
|
|
48
48
|
<span
|
|
49
49
|
data-slot="radio-group-item-dot"
|
|
50
|
-
class="
|
|
50
|
+
class="color-calc:[background:oklch(from_var(--primary)_calc((0.42_-_l)*100)_0_0)] dark:color-calc:[background:oklch(from_var(--primary)_calc((0.6_-_l)*100)_0_0)] bg-primary-foreground size-[36%] rounded-full"
|
|
51
51
|
/>
|
|
52
52
|
</RadioGroupPrimitive.ItemIndicator>
|
|
53
53
|
</RadioGroupPrimitive.ItemControl>
|
package/src/styles/globals.css
CHANGED
|
@@ -428,16 +428,13 @@
|
|
|
428
428
|
0 0 calc(var(--_glass-bloom) * (1 - var(--glass-halo)))
|
|
429
429
|
oklch(from var(--material-hue) l c h / 0.65),
|
|
430
430
|
inset 0 0 calc(var(--material-glow) * 0.9 * var(--_material-glow-in))
|
|
431
|
-
|
|
431
|
+
color-mix(in oklab, var(--material-hue) calc(65% * var(--_material-glow-in)), transparent),
|
|
432
432
|
inset 0 28px 36px -16px
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
white
|
|
439
|
-
)
|
|
440
|
-
l c h / calc(var(--_material-inner-glow) * 0.6)
|
|
433
|
+
color-mix(
|
|
434
|
+
in oklab,
|
|
435
|
+
color-mix(in srgb, var(--material-hue) calc(var(--_material-inner-glow-hue) * 100%), white)
|
|
436
|
+
calc(var(--_material-inner-glow) * 60%),
|
|
437
|
+
transparent
|
|
441
438
|
),
|
|
442
439
|
inset 0 0 calc(var(--_material-inset) * 28px) oklch(0 0 0 / calc(var(--_material-inset) * 0.55)),
|
|
443
440
|
inset
|
|
@@ -508,9 +505,11 @@
|
|
|
508
505
|
}
|
|
509
506
|
|
|
510
507
|
/* Two-tone wash: the second colour is the surface's own tone turned, so a toneless surface stays clear. */
|
|
511
|
-
@
|
|
512
|
-
:
|
|
513
|
-
|
|
508
|
+
@supports (color: light-dark(red, red)) {
|
|
509
|
+
@container style(--_material-two-tone: 1) {
|
|
510
|
+
:where(.glass) {
|
|
511
|
+
--glass-tone-2: oklch(from var(--glass-tone) l c calc(h + 60));
|
|
512
|
+
}
|
|
514
513
|
}
|
|
515
514
|
}
|
|
516
515
|
|
package/src/styles/theme.css
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/* Relative colors that calc() on a channel hang WebKit before 17.4; light-dark() arrived after, so it gates them. */
|
|
2
|
+
@custom-variant color-calc {
|
|
3
|
+
@supports (color: light-dark(red, red)) {
|
|
4
|
+
@slot;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
|
|
1
8
|
@theme inline {
|
|
2
9
|
--color-background: var(--background);
|
|
3
10
|
--color-foreground: var(--foreground);
|