@gryt/ui 0.22.0 → 0.24.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/components/ThemeEditor/ColorField.d.ts +20 -0
- package/dist/components/ThemeEditor/ColorField.d.ts.map +1 -0
- package/dist/components/ThemeEditor/ContrastReport.d.ts +16 -0
- package/dist/components/ThemeEditor/ContrastReport.d.ts.map +1 -0
- package/dist/components/ThemeEditor/CurveEditor.d.ts +20 -0
- package/dist/components/ThemeEditor/CurveEditor.d.ts.map +1 -0
- package/dist/components/ThemeEditor/FontField.d.ts +11 -0
- package/dist/components/ThemeEditor/FontField.d.ts.map +1 -0
- package/dist/components/ThemeEditor/MotionField.d.ts +8 -0
- package/dist/components/ThemeEditor/MotionField.d.ts.map +1 -0
- package/dist/components/ThemeEditor/ScaleStrip.d.ts +15 -0
- package/dist/components/ThemeEditor/ScaleStrip.d.ts.map +1 -0
- package/dist/components/ThemeEditor/ThemeEditor.d.ts +32 -0
- package/dist/components/ThemeEditor/ThemeEditor.d.ts.map +1 -0
- package/dist/components/ThemeEditor/contrast.d.ts +21 -0
- package/dist/components/ThemeEditor/contrast.d.ts.map +1 -0
- package/dist/components/ThemeEditor/draft.d.ts +35 -0
- package/dist/components/ThemeEditor/draft.d.ts.map +1 -0
- package/dist/components/ThemeEditor/fonts.d.ts +25 -0
- package/dist/components/ThemeEditor/fonts.d.ts.map +1 -0
- package/dist/components/ThemeEditor/generate.d.ts +43 -0
- package/dist/components/ThemeEditor/generate.d.ts.map +1 -0
- package/dist/components/ThemeEditor/share.d.ts +17 -0
- package/dist/components/ThemeEditor/share.d.ts.map +1 -0
- package/dist/index.cjs +18 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2099 -910
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/theme.css +40 -6
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,101 +1,101 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
2
|
-
import { Tooltip as
|
|
3
|
-
import { createContext as
|
|
4
|
-
import { createGrytTheme as
|
|
5
|
-
import { GRYT_HUE_KEYS as
|
|
6
|
-
import { Button as
|
|
7
|
-
import { clsx as
|
|
8
|
-
import { twMerge as
|
|
9
|
-
import { Field as
|
|
10
|
-
import { PaperPlaneTilt as
|
|
11
|
-
import { Avatar as
|
|
12
|
-
import { owlAvatarDataUri as
|
|
13
|
-
import { avatarSeed as
|
|
14
|
-
import { Checkbox as
|
|
15
|
-
import { Radio as
|
|
16
|
-
import { RadioGroup as
|
|
1
|
+
import { jsx as o, jsxs as u, Fragment as jt } from "react/jsx-runtime";
|
|
2
|
+
import { Tooltip as K } from "@base-ui/react/tooltip";
|
|
3
|
+
import { createContext as bt, useContext as $e, useRef as ke, forwardRef as l, useCallback as pe, useLayoutEffect as Ot, useMemo as me, useState as G, useEffect as Vt, useSyncExternalStore as Yt, useId as Ut } from "react";
|
|
4
|
+
import { createGrytTheme as xt, grytTheme as Xt, GRYT_RADIUS_KEYS as Wt, grytThemeToOptions as Kt, grytThemeHues as Jt, normalizeHexColor as ye, isHexColor as Qt, grytFonts as vt, isFontStack as Zt, isBezier as qt, grytMotion as er, grytDurations as qe, GRYT_MOTION_SCALE_MAX as tr, springSamples as et, springTightSamples as rr, contrast as ae, oklchToHex as L, hexToOklch as Ne, decodeGrytTheme as nr, grytTokens as Oe, grytLightTokens as or, grytPresets as tt, grytPresetsById as ar, GRYT_THEME_NAME_MAX as sr, GRYT_FONT_KEYS as ir } from "@gryt/theme";
|
|
5
|
+
import { GRYT_FONT_KEYS as Ns, GRYT_FONT_STACK_MAX as Ts, GRYT_HUE_KEYS as Ss, GRYT_MOTION_CURVES as $s, GRYT_MOTION_SCALE_MAX as ks, GRYT_NEUTRAL_KEYS as Ps, GRYT_RADIUS_KEYS as Cs, GRYT_THEME_NAME_MAX as As, alphaScale as Ms, cloneGrytTheme as Rs, contrast as Is, createGrytTheme as Ls, decodeGrytTheme as Ds, encodeGrytTheme as Gs, encodeGrytTheme as Fs, grytAlphaScales as zs, grytAlphaScalesLight as Bs, grytFonts as Es, grytLightTokens as _s, grytMotion as Hs, grytPresets as js, grytPresetsById as Os, grytScales as Vs, grytScalesLight as Ys, grytTheme as Us, grytThemeHues as Xs, grytThemeToOptions as Ws, grytTokens as Ks, hexToOklch as Js, hexToRgb as Qs, hueScale as Zs, hueScaleLight as qs, isBezier as ei, isFontStack as ti, isHexColor as ri, isValidBezier as ni, neutralScale as oi, neutralScaleLight as ai, normalizeHexColor as si, normalizeThemeName as ii, oklchToHex as li, rgbToHex as ci } from "@gryt/theme";
|
|
6
|
+
import { Button as wt } from "@base-ui/react/button";
|
|
7
|
+
import { clsx as lr } from "clsx";
|
|
8
|
+
import { twMerge as cr } from "tailwind-merge";
|
|
9
|
+
import { Field as xe } from "@base-ui/react/field";
|
|
10
|
+
import { PaperPlaneTilt as dr, X as Ue, Check as Xe, CaretUpDown as ur, CircleNotch as gr, CaretDown as mr, Warning as Nt, ArrowsClockwise as pr, Minus as yr, Plus as fr } from "@phosphor-icons/react";
|
|
11
|
+
import { Avatar as Le } from "@base-ui/react/avatar";
|
|
12
|
+
import { owlAvatarDataUri as hr, eggAvatarDataUri as br } from "@gryt/owl";
|
|
13
|
+
import { avatarSeed as ui } from "@gryt/owl";
|
|
14
|
+
import { Checkbox as rt } from "@base-ui/react/checkbox";
|
|
15
|
+
import { Radio as nt } from "@base-ui/react/radio";
|
|
16
|
+
import { RadioGroup as xr } from "@base-ui/react/radio-group";
|
|
17
17
|
import { Switch as ot } from "@base-ui/react/switch";
|
|
18
|
-
import { Slider as
|
|
19
|
-
import { Select as
|
|
20
|
-
import { Separator as
|
|
21
|
-
import { Progress as
|
|
22
|
-
import { Dialog as
|
|
23
|
-
import { Drawer as
|
|
24
|
-
import { Menu as
|
|
25
|
-
import { Tabs as
|
|
26
|
-
import { Accordion as
|
|
27
|
-
import { ContextMenu as
|
|
28
|
-
import { Popover as
|
|
29
|
-
import { Toast as
|
|
30
|
-
import { ScrollArea as
|
|
31
|
-
import { Toggle as
|
|
32
|
-
import { ToggleGroup as
|
|
33
|
-
import { Meter as
|
|
34
|
-
import { AlertDialog as
|
|
35
|
-
import { Autocomplete as
|
|
36
|
-
import { Combobox as
|
|
37
|
-
import { CheckboxGroup as
|
|
38
|
-
import { Collapsible as
|
|
39
|
-
import { Form as
|
|
40
|
-
import { Fieldset as
|
|
41
|
-
import { Menubar as
|
|
42
|
-
import { NavigationMenu as
|
|
43
|
-
import { NumberField as
|
|
18
|
+
import { Slider as le } from "@base-ui/react/slider";
|
|
19
|
+
import { Select as R } from "@base-ui/react/select";
|
|
20
|
+
import { Separator as vr } from "@base-ui/react/separator";
|
|
21
|
+
import { Progress as De } from "@base-ui/react/progress";
|
|
22
|
+
import { Dialog as O } from "@base-ui/react/dialog";
|
|
23
|
+
import { Drawer as D } from "@base-ui/react/drawer";
|
|
24
|
+
import { Menu as J } from "@base-ui/react/menu";
|
|
25
|
+
import { Tabs as he } from "@base-ui/react/tabs";
|
|
26
|
+
import { Accordion as fe } from "@base-ui/react/accordion";
|
|
27
|
+
import { ContextMenu as j } from "@base-ui/react/context-menu";
|
|
28
|
+
import { Popover as B } from "@base-ui/react/popover";
|
|
29
|
+
import { Toast as E } from "@base-ui/react/toast";
|
|
30
|
+
import { ScrollArea as se } from "@base-ui/react/scroll-area";
|
|
31
|
+
import { Toggle as wr } from "@base-ui/react/toggle";
|
|
32
|
+
import { ToggleGroup as Nr } from "@base-ui/react/toggle-group";
|
|
33
|
+
import { Meter as ce } from "@base-ui/react/meter";
|
|
34
|
+
import { AlertDialog as V } from "@base-ui/react/alert-dialog";
|
|
35
|
+
import { Autocomplete as C } from "@base-ui/react/autocomplete";
|
|
36
|
+
import { Combobox as S } from "@base-ui/react/combobox";
|
|
37
|
+
import { CheckboxGroup as Tr } from "@base-ui/react/checkbox-group";
|
|
38
|
+
import { Collapsible as We } from "@base-ui/react/collapsible";
|
|
39
|
+
import { Form as Sr } from "@base-ui/react/form";
|
|
40
|
+
import { Fieldset as Tt } from "@base-ui/react/fieldset";
|
|
41
|
+
import { Menubar as $r } from "@base-ui/react/menubar";
|
|
42
|
+
import { NavigationMenu as I } from "@base-ui/react/navigation-menu";
|
|
43
|
+
import { NumberField as X } from "@base-ui/react/number-field";
|
|
44
44
|
import { OTPField as at } from "@base-ui/react/otp-field";
|
|
45
|
-
import { PreviewCard as
|
|
46
|
-
import { Toolbar as
|
|
47
|
-
const
|
|
48
|
-
function
|
|
49
|
-
return
|
|
45
|
+
import { PreviewCard as ne } from "@base-ui/react/preview-card";
|
|
46
|
+
import { Toolbar as oe } from "@base-ui/react/toolbar";
|
|
47
|
+
const St = bt(void 0);
|
|
48
|
+
function $t() {
|
|
49
|
+
return $e(St);
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
return Object.keys(
|
|
51
|
+
function kr(n) {
|
|
52
|
+
return Object.keys(n).some((t) => t.startsWith("--"));
|
|
53
53
|
}
|
|
54
|
-
function
|
|
55
|
-
children:
|
|
54
|
+
function $a({
|
|
55
|
+
children: n,
|
|
56
56
|
className: t,
|
|
57
57
|
theme: e,
|
|
58
58
|
tooltipDelay: r = 400,
|
|
59
|
-
containOverlays:
|
|
59
|
+
containOverlays: a = !1
|
|
60
60
|
}) {
|
|
61
|
-
const c =
|
|
62
|
-
return /* @__PURE__ */ o("div", { className: t, style:
|
|
63
|
-
|
|
61
|
+
const c = ke(null), d = e === void 0 ? void 0 : kr(e) ? e : xt(e);
|
|
62
|
+
return /* @__PURE__ */ o("div", { className: t, style: d, ref: c, children: /* @__PURE__ */ o(
|
|
63
|
+
St.Provider,
|
|
64
64
|
{
|
|
65
|
-
value:
|
|
66
|
-
children: /* @__PURE__ */ o(
|
|
65
|
+
value: a ? c : void 0,
|
|
66
|
+
children: /* @__PURE__ */ o(K.Provider, { delay: r, children: n })
|
|
67
67
|
}
|
|
68
68
|
) });
|
|
69
69
|
}
|
|
70
|
-
function
|
|
71
|
-
return
|
|
70
|
+
function s(...n) {
|
|
71
|
+
return cr(lr(n));
|
|
72
72
|
}
|
|
73
|
-
const
|
|
73
|
+
const Pr = {
|
|
74
74
|
primary: "bg-gryt-accent text-gryt-on-accent hover:not-data-disabled:bg-gryt-accent-light data-disabled:bg-gryt-surface-raised data-disabled:text-gryt-muted",
|
|
75
75
|
secondary: "bg-gryt-secondary text-gryt-on-secondary hover:not-data-disabled:bg-gryt-secondary-light data-disabled:bg-gryt-surface-raised data-disabled:text-gryt-muted",
|
|
76
76
|
neutral: "bg-gryt-surface-raised text-gryt-text hover:not-data-disabled:bg-gryt-surface-hover data-disabled:text-gryt-muted",
|
|
77
77
|
danger: "bg-gryt-danger text-gryt-on-danger hover:not-data-disabled:bg-gryt-danger-light data-disabled:bg-gryt-surface-raised data-disabled:text-gryt-muted",
|
|
78
78
|
ghost: "bg-transparent text-gryt-muted hover:not-data-disabled:bg-white/8 hover:not-data-disabled:text-gryt-text"
|
|
79
|
-
},
|
|
79
|
+
}, Cr = {
|
|
80
80
|
xsmall: "min-h-8 px-3 text-xs",
|
|
81
81
|
small: "min-h-9 px-4 text-sm",
|
|
82
82
|
medium: "min-h-10 px-5 text-sm",
|
|
83
83
|
large: "min-h-12 px-6 text-base"
|
|
84
|
-
},
|
|
84
|
+
}, Te = l(
|
|
85
85
|
function({
|
|
86
86
|
children: t,
|
|
87
87
|
className: e,
|
|
88
88
|
endIcon: r,
|
|
89
|
-
size:
|
|
89
|
+
size: a = "medium",
|
|
90
90
|
startIcon: c,
|
|
91
|
-
tone:
|
|
92
|
-
...
|
|
91
|
+
tone: d = "primary",
|
|
92
|
+
...p
|
|
93
93
|
}, m) {
|
|
94
|
-
return /* @__PURE__ */
|
|
95
|
-
|
|
94
|
+
return /* @__PURE__ */ u(
|
|
95
|
+
wt,
|
|
96
96
|
{
|
|
97
97
|
ref: m,
|
|
98
|
-
className:
|
|
98
|
+
className: s(
|
|
99
99
|
"gryt-button",
|
|
100
100
|
"inline-flex cursor-pointer items-center justify-center gap-2 border-0 shadow-none",
|
|
101
101
|
"rounded-(--gryt-radius-full) font-semibold whitespace-nowrap select-none",
|
|
@@ -121,11 +121,11 @@ const Ht = {
|
|
|
121
121
|
// and an icon at full strength on a dead button is the same lie in
|
|
122
122
|
// miniature.
|
|
123
123
|
"data-disabled:cursor-not-allowed data-disabled:opacity-60",
|
|
124
|
-
|
|
125
|
-
|
|
124
|
+
Cr[a],
|
|
125
|
+
Pr[d],
|
|
126
126
|
e
|
|
127
127
|
),
|
|
128
|
-
...
|
|
128
|
+
...p,
|
|
129
129
|
children: [
|
|
130
130
|
c,
|
|
131
131
|
t,
|
|
@@ -134,68 +134,68 @@ const Ht = {
|
|
|
134
134
|
}
|
|
135
135
|
);
|
|
136
136
|
}
|
|
137
|
-
),
|
|
137
|
+
), A = "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gryt-accent-light", Ar = "has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-offset-2 has-[:focus-visible]:outline-gryt-accent-light", kt = [
|
|
138
138
|
"w-full rounded-(--gryt-radius-xl) border bg-gryt-surface-raised",
|
|
139
139
|
"text-gryt-text outline-none placeholder:text-gryt-muted",
|
|
140
140
|
"transition-colors duration-150 motion-reduce:transition-none",
|
|
141
141
|
"hover:border-gryt-accent-light focus:border-gryt-accent",
|
|
142
142
|
"disabled:cursor-not-allowed disabled:opacity-60"
|
|
143
|
-
].join(" "),
|
|
143
|
+
].join(" "), Pt = {
|
|
144
144
|
small: "min-h-9 px-3 py-1.5 text-sm",
|
|
145
145
|
medium: "min-h-11 px-4 py-2.5 text-sm"
|
|
146
|
-
},
|
|
146
|
+
}, Z = "rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface text-gryt-text", Y = [
|
|
147
147
|
// scale and translate are named explicitly because Tailwind v4 sets them as
|
|
148
148
|
// standalone CSS properties rather than folding them into `transform`, so
|
|
149
149
|
// transitioning `transform` would leave the popup snapping into place.
|
|
150
150
|
"transition-[opacity,scale,translate] duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none",
|
|
151
151
|
"data-starting-style:scale-[0.98] data-starting-style:opacity-0",
|
|
152
152
|
"data-ending-style:scale-[0.98] data-ending-style:opacity-0"
|
|
153
|
-
].join(" "),
|
|
153
|
+
].join(" "), ie = "cursor-pointer data-disabled:cursor-not-allowed data-disabled:opacity-50", Mr = {
|
|
154
154
|
primary: "data-checked:bg-gryt-accent data-checked:text-gryt-on-accent",
|
|
155
155
|
secondary: "data-checked:bg-gryt-secondary data-checked:text-gryt-on-secondary",
|
|
156
156
|
neutral: "data-checked:bg-gryt-surface-hover data-checked:text-gryt-text",
|
|
157
157
|
danger: "data-checked:bg-gryt-danger data-checked:text-gryt-on-danger",
|
|
158
158
|
success: "data-checked:bg-gryt-success data-checked:text-gryt-on-accent",
|
|
159
159
|
warning: "data-checked:bg-gryt-warning data-checked:text-gryt-on-accent"
|
|
160
|
-
},
|
|
160
|
+
}, Ct = {
|
|
161
161
|
primary: "bg-gryt-accent",
|
|
162
162
|
secondary: "bg-gryt-secondary",
|
|
163
163
|
neutral: "bg-gryt-surface-hover",
|
|
164
164
|
danger: "bg-gryt-danger",
|
|
165
165
|
success: "bg-gryt-success",
|
|
166
166
|
warning: "bg-gryt-warning"
|
|
167
|
-
},
|
|
167
|
+
}, Rr = {
|
|
168
168
|
primary: "data-checked:border-gryt-accent",
|
|
169
169
|
secondary: "data-checked:border-gryt-secondary",
|
|
170
170
|
neutral: "data-checked:border-gryt-muted",
|
|
171
171
|
danger: "data-checked:border-gryt-danger",
|
|
172
172
|
success: "data-checked:border-gryt-success",
|
|
173
173
|
warning: "data-checked:border-gryt-warning"
|
|
174
|
-
},
|
|
174
|
+
}, Ir = {
|
|
175
175
|
primary: "data-checked:bg-gryt-accent",
|
|
176
176
|
secondary: "data-checked:bg-gryt-secondary",
|
|
177
177
|
neutral: "data-checked:bg-gryt-surface-hover",
|
|
178
178
|
danger: "data-checked:bg-gryt-danger",
|
|
179
179
|
success: "data-checked:bg-gryt-success",
|
|
180
180
|
warning: "data-checked:bg-gryt-warning"
|
|
181
|
-
},
|
|
181
|
+
}, Lr = {
|
|
182
182
|
primary: "text-gryt-accent-11 hover:not-data-disabled:bg-gryt-accent-3",
|
|
183
183
|
secondary: "text-gryt-secondary-11 hover:not-data-disabled:bg-gryt-secondary-3",
|
|
184
184
|
neutral: "text-gryt-muted hover:not-data-disabled:bg-white/8 hover:not-data-disabled:text-gryt-text",
|
|
185
185
|
danger: "text-gryt-danger-11 hover:not-data-disabled:bg-gryt-danger-3",
|
|
186
186
|
ghost: "text-gryt-muted hover:not-data-disabled:bg-white/8 hover:not-data-disabled:text-gryt-text"
|
|
187
|
-
},
|
|
187
|
+
}, Dr = {
|
|
188
188
|
xsmall: "h-8 w-8",
|
|
189
189
|
small: "h-9 w-9",
|
|
190
190
|
medium: "h-10 w-10",
|
|
191
191
|
large: "h-12 w-12"
|
|
192
|
-
},
|
|
193
|
-
function({ className: t, size: e = "medium", tone: r = "neutral", ...
|
|
192
|
+
}, ka = l(
|
|
193
|
+
function({ className: t, size: e = "medium", tone: r = "neutral", ...a }, c) {
|
|
194
194
|
return /* @__PURE__ */ o(
|
|
195
|
-
|
|
195
|
+
wt,
|
|
196
196
|
{
|
|
197
197
|
ref: c,
|
|
198
|
-
className:
|
|
198
|
+
className: s(
|
|
199
199
|
"gryt-icon-button",
|
|
200
200
|
"inline-flex shrink-0 items-center justify-center border-0 bg-transparent p-0",
|
|
201
201
|
"rounded-(--gryt-radius-full) select-none",
|
|
@@ -209,23 +209,23 @@ const Ht = {
|
|
|
209
209
|
// that is what it is; Base UI puts it there, nothing to pass.
|
|
210
210
|
"motion-safe:not-[[aria-haspopup]]:hover:not-data-disabled:scale-[1.06]",
|
|
211
211
|
"motion-safe:not-[[aria-haspopup]]:active:not-data-disabled:scale-[0.94]",
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
212
|
+
A,
|
|
213
|
+
ie,
|
|
214
|
+
Dr[e],
|
|
215
|
+
Lr[r],
|
|
216
216
|
t
|
|
217
217
|
),
|
|
218
|
-
...
|
|
218
|
+
...a
|
|
219
219
|
}
|
|
220
220
|
);
|
|
221
221
|
}
|
|
222
|
-
),
|
|
223
|
-
function({ className: t, elevated: e = !1, ...r },
|
|
222
|
+
), Pa = l(
|
|
223
|
+
function({ className: t, elevated: e = !1, ...r }, a) {
|
|
224
224
|
return /* @__PURE__ */ o(
|
|
225
225
|
"div",
|
|
226
226
|
{
|
|
227
|
-
ref:
|
|
228
|
-
className:
|
|
227
|
+
ref: a,
|
|
228
|
+
className: s(
|
|
229
229
|
"gryt-surface rounded-(--gryt-radius-lg) border border-gryt-border p-4 text-gryt-text",
|
|
230
230
|
e ? "bg-gryt-surface-raised" : "bg-gryt-surface",
|
|
231
231
|
t
|
|
@@ -234,294 +234,294 @@ const Ht = {
|
|
|
234
234
|
}
|
|
235
235
|
);
|
|
236
236
|
}
|
|
237
|
-
),
|
|
238
|
-
function({ children: t, className: e, from: r = "assistant", ...
|
|
237
|
+
), Ca = l(
|
|
238
|
+
function({ children: t, className: e, from: r = "assistant", ...a }, c) {
|
|
239
239
|
return /* @__PURE__ */ o(
|
|
240
240
|
"div",
|
|
241
241
|
{
|
|
242
242
|
ref: c,
|
|
243
|
-
className:
|
|
243
|
+
className: s(
|
|
244
244
|
"gryt-message-bubble",
|
|
245
245
|
r === "user" && "ml-auto bg-gryt-accent text-gryt-on-accent",
|
|
246
246
|
r === "assistant" && "mr-auto border border-gryt-border bg-gryt-surface text-gryt-text",
|
|
247
247
|
r === "system" && "mx-auto border border-dashed border-gryt-border bg-transparent text-gryt-muted",
|
|
248
248
|
e
|
|
249
249
|
),
|
|
250
|
-
...
|
|
250
|
+
...a,
|
|
251
251
|
children: t
|
|
252
252
|
}
|
|
253
253
|
);
|
|
254
254
|
}
|
|
255
|
-
),
|
|
255
|
+
), Ke = l(
|
|
256
256
|
function({
|
|
257
257
|
className: t,
|
|
258
258
|
error: e = !1,
|
|
259
259
|
fieldClassName: r,
|
|
260
|
-
helperText:
|
|
260
|
+
helperText: a,
|
|
261
261
|
label: c,
|
|
262
|
-
minRows:
|
|
263
|
-
multiline:
|
|
262
|
+
minRows: d = 3,
|
|
263
|
+
multiline: p = !1,
|
|
264
264
|
size: m = "medium",
|
|
265
|
-
...
|
|
266
|
-
},
|
|
267
|
-
const
|
|
268
|
-
|
|
265
|
+
...y
|
|
266
|
+
}, f) {
|
|
267
|
+
const h = /* @__PURE__ */ o(
|
|
268
|
+
xe.Control,
|
|
269
269
|
{
|
|
270
|
-
ref:
|
|
271
|
-
render:
|
|
272
|
-
className:
|
|
270
|
+
ref: f,
|
|
271
|
+
render: p ? /* @__PURE__ */ o("textarea", { rows: d }) : void 0,
|
|
272
|
+
className: s(
|
|
273
273
|
"gryt-text-field-control",
|
|
274
|
-
|
|
275
|
-
|
|
274
|
+
kt,
|
|
275
|
+
p && "resize-y leading-6",
|
|
276
276
|
e ? "border-gryt-danger" : "border-gryt-border",
|
|
277
|
-
|
|
277
|
+
Pt[m],
|
|
278
278
|
t
|
|
279
279
|
),
|
|
280
|
-
...
|
|
280
|
+
...y
|
|
281
281
|
}
|
|
282
282
|
);
|
|
283
|
-
return /* @__PURE__ */
|
|
284
|
-
|
|
283
|
+
return /* @__PURE__ */ u(
|
|
284
|
+
xe.Root,
|
|
285
285
|
{
|
|
286
|
-
className:
|
|
286
|
+
className: s(
|
|
287
287
|
"gryt-text-field flex w-full flex-col gap-1.5",
|
|
288
288
|
r
|
|
289
289
|
),
|
|
290
290
|
children: [
|
|
291
|
-
c ? /* @__PURE__ */ o(
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
291
|
+
c ? /* @__PURE__ */ o(xe.Label, { className: "text-xs font-medium text-gryt-muted", children: c }) : null,
|
|
292
|
+
h,
|
|
293
|
+
a ? /* @__PURE__ */ o(
|
|
294
|
+
xe.Description,
|
|
295
295
|
{
|
|
296
|
-
className:
|
|
296
|
+
className: s(
|
|
297
297
|
"text-xs",
|
|
298
298
|
e ? "text-gryt-danger-11" : "text-gryt-muted"
|
|
299
299
|
),
|
|
300
|
-
children:
|
|
300
|
+
children: a
|
|
301
301
|
}
|
|
302
302
|
) : null
|
|
303
303
|
]
|
|
304
304
|
}
|
|
305
305
|
);
|
|
306
306
|
}
|
|
307
|
-
),
|
|
307
|
+
), Aa = l(
|
|
308
308
|
function({
|
|
309
309
|
className: t,
|
|
310
310
|
disabled: e = !1,
|
|
311
311
|
maxRows: r = 8,
|
|
312
|
-
minRows:
|
|
312
|
+
minRows: a = 1,
|
|
313
313
|
onSubmit: c,
|
|
314
|
-
placeholder:
|
|
315
|
-
submitLabel:
|
|
314
|
+
placeholder: d = "Message Gryt",
|
|
315
|
+
submitLabel: p = "Send",
|
|
316
316
|
...m
|
|
317
|
-
},
|
|
318
|
-
const
|
|
319
|
-
const
|
|
320
|
-
if (!
|
|
317
|
+
}, y) {
|
|
318
|
+
const f = ke(null), h = pe(() => {
|
|
319
|
+
const x = f.current;
|
|
320
|
+
if (!x)
|
|
321
321
|
return;
|
|
322
|
-
const
|
|
323
|
-
|
|
324
|
-
Math.max(
|
|
325
|
-
|
|
322
|
+
const v = window.getComputedStyle(x), N = parseFloat(v.lineHeight) || 24, k = parseFloat(v.paddingTop) + parseFloat(v.paddingBottom);
|
|
323
|
+
x.style.height = "auto", x.style.height = `${Math.min(
|
|
324
|
+
Math.max(x.scrollHeight, N * a + k),
|
|
325
|
+
N * r + k
|
|
326
326
|
)}px`;
|
|
327
|
-
}, [r,
|
|
328
|
-
|
|
329
|
-
function
|
|
327
|
+
}, [r, a]);
|
|
328
|
+
Ot(h, [h, m.value]);
|
|
329
|
+
function b(x) {
|
|
330
330
|
if (!c) {
|
|
331
|
-
|
|
331
|
+
x.preventDefault();
|
|
332
332
|
return;
|
|
333
333
|
}
|
|
334
|
-
c(
|
|
334
|
+
c(x);
|
|
335
335
|
}
|
|
336
|
-
return /* @__PURE__ */
|
|
336
|
+
return /* @__PURE__ */ u("form", { className: s("gryt-composer", t), onSubmit: b, children: [
|
|
337
337
|
/* @__PURE__ */ o(
|
|
338
338
|
"textarea",
|
|
339
339
|
{
|
|
340
|
-
ref: (
|
|
341
|
-
|
|
340
|
+
ref: (x) => {
|
|
341
|
+
f.current = x, typeof y == "function" ? y(x) : y && (y.current = x);
|
|
342
342
|
},
|
|
343
|
-
rows:
|
|
343
|
+
rows: a,
|
|
344
344
|
disabled: e,
|
|
345
|
-
placeholder:
|
|
346
|
-
onInput:
|
|
345
|
+
placeholder: d,
|
|
346
|
+
onInput: h,
|
|
347
347
|
className: "gryt-composer-textarea disabled:cursor-not-allowed disabled:opacity-60",
|
|
348
348
|
...m
|
|
349
349
|
}
|
|
350
350
|
),
|
|
351
351
|
/* @__PURE__ */ o(
|
|
352
|
-
|
|
352
|
+
Te,
|
|
353
353
|
{
|
|
354
354
|
type: "submit",
|
|
355
355
|
disabled: e,
|
|
356
356
|
size: "small",
|
|
357
|
-
endIcon: /* @__PURE__ */ o(
|
|
358
|
-
children:
|
|
357
|
+
endIcon: /* @__PURE__ */ o(dr, { size: 14, weight: "fill" }),
|
|
358
|
+
children: p
|
|
359
359
|
}
|
|
360
360
|
)
|
|
361
361
|
] });
|
|
362
362
|
}
|
|
363
|
-
),
|
|
363
|
+
), Gr = {
|
|
364
364
|
small: "h-8 w-8 text-xs",
|
|
365
365
|
medium: "h-10 w-10 text-sm",
|
|
366
366
|
large: "h-12 w-12 text-base"
|
|
367
|
-
},
|
|
367
|
+
}, st = 256, Fr = l(function({
|
|
368
368
|
alt: t,
|
|
369
369
|
children: e,
|
|
370
370
|
className: r,
|
|
371
|
-
fallback:
|
|
371
|
+
fallback: a,
|
|
372
372
|
seed: c,
|
|
373
|
-
eggSeed:
|
|
374
|
-
size:
|
|
373
|
+
eggSeed: d,
|
|
374
|
+
size: p = "medium",
|
|
375
375
|
src: m,
|
|
376
|
-
...
|
|
377
|
-
},
|
|
378
|
-
const
|
|
379
|
-
() => c ?
|
|
376
|
+
...y
|
|
377
|
+
}, f) {
|
|
378
|
+
const h = me(
|
|
379
|
+
() => c ? hr(c, { size: st }) : void 0,
|
|
380
380
|
[c]
|
|
381
|
-
),
|
|
382
|
-
() =>
|
|
383
|
-
[
|
|
384
|
-
),
|
|
385
|
-
return /* @__PURE__ */
|
|
386
|
-
|
|
381
|
+
), b = me(
|
|
382
|
+
() => d ? br(d, { size: st }) : void 0,
|
|
383
|
+
[d]
|
|
384
|
+
), x = h ?? b;
|
|
385
|
+
return /* @__PURE__ */ u(
|
|
386
|
+
Le.Root,
|
|
387
387
|
{
|
|
388
|
-
ref:
|
|
389
|
-
className:
|
|
388
|
+
ref: f,
|
|
389
|
+
className: s(
|
|
390
390
|
"gryt-avatar inline-flex shrink-0 items-center justify-center overflow-hidden align-middle select-none",
|
|
391
391
|
"rounded-(--gryt-radius-full) bg-gryt-surface-raised font-medium text-gryt-text ring-1 ring-gryt-border",
|
|
392
|
-
|
|
392
|
+
Gr[p],
|
|
393
393
|
r
|
|
394
394
|
),
|
|
395
|
-
...
|
|
395
|
+
...y,
|
|
396
396
|
children: [
|
|
397
397
|
m ? /* @__PURE__ */ o(
|
|
398
|
-
|
|
398
|
+
Le.Image,
|
|
399
399
|
{
|
|
400
400
|
src: m,
|
|
401
401
|
alt: t,
|
|
402
402
|
className: "h-full w-full object-cover"
|
|
403
403
|
}
|
|
404
404
|
) : null,
|
|
405
|
-
/* @__PURE__ */ o(
|
|
405
|
+
/* @__PURE__ */ o(Le.Fallback, { className: "flex h-full w-full items-center justify-center", children: x ? /* @__PURE__ */ o(
|
|
406
406
|
"img",
|
|
407
407
|
{
|
|
408
|
-
src:
|
|
408
|
+
src: x,
|
|
409
409
|
alt: t,
|
|
410
410
|
className: "h-full w-full object-cover"
|
|
411
411
|
}
|
|
412
|
-
) :
|
|
412
|
+
) : a ?? e })
|
|
413
413
|
]
|
|
414
414
|
}
|
|
415
415
|
);
|
|
416
|
-
}),
|
|
417
|
-
return /* @__PURE__ */
|
|
416
|
+
}), Ma = l(function({ active: t = !1, avatar: e, className: r, subtitle: a, title: c, ...d }, p) {
|
|
417
|
+
return /* @__PURE__ */ u(
|
|
418
418
|
"button",
|
|
419
419
|
{
|
|
420
|
-
ref:
|
|
420
|
+
ref: p,
|
|
421
421
|
type: "button",
|
|
422
|
-
className:
|
|
422
|
+
className: s(
|
|
423
423
|
"gryt-conversation-item enabled:cursor-pointer disabled:cursor-not-allowed disabled:opacity-50",
|
|
424
424
|
t ? "bg-gryt-accent text-gryt-on-accent" : "text-gryt-text hover:bg-white/5",
|
|
425
425
|
r
|
|
426
426
|
),
|
|
427
|
-
...
|
|
427
|
+
...d,
|
|
428
428
|
children: [
|
|
429
429
|
e ?? /* @__PURE__ */ o(
|
|
430
|
-
|
|
430
|
+
Fr,
|
|
431
431
|
{
|
|
432
432
|
size: "small",
|
|
433
|
-
className:
|
|
433
|
+
className: s(
|
|
434
434
|
t ? "bg-gryt-on-accent text-gryt-accent-9 ring-transparent" : "bg-gryt-surface-raised text-gryt-text"
|
|
435
435
|
),
|
|
436
436
|
children: c.slice(0, 1).toUpperCase()
|
|
437
437
|
}
|
|
438
438
|
),
|
|
439
|
-
/* @__PURE__ */
|
|
439
|
+
/* @__PURE__ */ u("span", { className: "min-w-0 flex-1", children: [
|
|
440
440
|
/* @__PURE__ */ o("span", { className: "block truncate text-sm font-semibold", children: c }),
|
|
441
|
-
|
|
441
|
+
a ? /* @__PURE__ */ o(
|
|
442
442
|
"span",
|
|
443
443
|
{
|
|
444
|
-
className:
|
|
444
|
+
className: s(
|
|
445
445
|
"block truncate text-xs",
|
|
446
446
|
t ? "text-gryt-on-accent/85" : "text-gryt-muted"
|
|
447
447
|
),
|
|
448
|
-
children:
|
|
448
|
+
children: a
|
|
449
449
|
}
|
|
450
450
|
) : null
|
|
451
451
|
] })
|
|
452
452
|
]
|
|
453
453
|
}
|
|
454
454
|
);
|
|
455
|
-
}),
|
|
456
|
-
const m = typeof t == "number" ? t : null,
|
|
457
|
-
return /* @__PURE__ */
|
|
455
|
+
}), Ra = l(function({ badgeContent: t, children: e, className: r, max: a = 99, showZero: c = !1, ...d }, p) {
|
|
456
|
+
const m = typeof t == "number" ? t : null, y = m !== null && m === 0 && !c, f = m !== null && m > a ? `${a}+` : t;
|
|
457
|
+
return /* @__PURE__ */ u(
|
|
458
458
|
"span",
|
|
459
459
|
{
|
|
460
|
-
ref:
|
|
461
|
-
className:
|
|
462
|
-
...
|
|
460
|
+
ref: p,
|
|
461
|
+
className: s("gryt-badge relative inline-flex", r),
|
|
462
|
+
...d,
|
|
463
463
|
children: [
|
|
464
464
|
e,
|
|
465
|
-
t !== void 0 && !
|
|
465
|
+
t !== void 0 && !y ? /* @__PURE__ */ o(
|
|
466
466
|
"span",
|
|
467
467
|
{
|
|
468
|
-
className:
|
|
468
|
+
className: s(
|
|
469
469
|
"gryt-badge-dot absolute -top-1 -right-1 z-10 inline-flex items-center justify-center",
|
|
470
470
|
"min-w-5 rounded-(--gryt-radius-full) px-1.5 py-0.5",
|
|
471
471
|
"bg-gryt-accent text-[0.65rem] leading-none font-semibold text-gryt-on-accent",
|
|
472
472
|
"ring-2 ring-gryt-bg"
|
|
473
473
|
),
|
|
474
|
-
children:
|
|
474
|
+
children: f
|
|
475
475
|
}
|
|
476
476
|
) : null
|
|
477
477
|
]
|
|
478
478
|
}
|
|
479
479
|
);
|
|
480
|
-
}),
|
|
480
|
+
}), zr = {
|
|
481
481
|
neutral: "border-gryt-border bg-gryt-surface-raised text-gryt-text",
|
|
482
482
|
primary: "border-gryt-accent-6 bg-gryt-accent-3 text-gryt-accent-11",
|
|
483
483
|
secondary: "border-gryt-secondary-6 bg-gryt-secondary-3 text-gryt-secondary-11",
|
|
484
484
|
success: "border-gryt-success-6 bg-gryt-success-3 text-gryt-success-11",
|
|
485
485
|
warning: "border-gryt-warning-6 bg-gryt-warning-3 text-gryt-warning-11",
|
|
486
486
|
danger: "border-gryt-danger-6 bg-gryt-danger-3 text-gryt-danger-11"
|
|
487
|
-
},
|
|
488
|
-
return /* @__PURE__ */
|
|
487
|
+
}, Ia = l(function({ children: t, className: e, icon: r, label: a, onDelete: c, tone: d = "neutral", ...p }, m) {
|
|
488
|
+
return /* @__PURE__ */ u(
|
|
489
489
|
"span",
|
|
490
490
|
{
|
|
491
491
|
ref: m,
|
|
492
|
-
className:
|
|
492
|
+
className: s(
|
|
493
493
|
"gryt-chip inline-flex items-center gap-1.5 rounded-(--gryt-radius-full) border px-3 py-1 text-xs font-medium",
|
|
494
|
-
|
|
494
|
+
zr[d],
|
|
495
495
|
e
|
|
496
496
|
),
|
|
497
|
-
...
|
|
497
|
+
...p,
|
|
498
498
|
children: [
|
|
499
499
|
r,
|
|
500
|
-
|
|
500
|
+
a ?? t,
|
|
501
501
|
c ? /* @__PURE__ */ o(
|
|
502
502
|
"button",
|
|
503
503
|
{
|
|
504
504
|
type: "button",
|
|
505
505
|
"aria-label": "Remove",
|
|
506
506
|
onClick: c,
|
|
507
|
-
className:
|
|
507
|
+
className: s(
|
|
508
508
|
"-mr-1 inline-flex h-4 w-4 cursor-pointer items-center justify-center rounded-(--gryt-radius-full)",
|
|
509
509
|
"opacity-70 transition-opacity hover:opacity-100",
|
|
510
|
-
|
|
510
|
+
A
|
|
511
511
|
),
|
|
512
|
-
children: /* @__PURE__ */ o(
|
|
512
|
+
children: /* @__PURE__ */ o(Ue, { size: 10, weight: "bold", "aria-hidden": "true" })
|
|
513
513
|
}
|
|
514
514
|
) : null
|
|
515
515
|
]
|
|
516
516
|
}
|
|
517
517
|
);
|
|
518
|
-
}),
|
|
519
|
-
function({ className: t, tone: e = "primary", ...r },
|
|
518
|
+
}), it = l(
|
|
519
|
+
function({ className: t, tone: e = "primary", ...r }, a) {
|
|
520
520
|
return /* @__PURE__ */ o(
|
|
521
|
-
|
|
521
|
+
rt.Root,
|
|
522
522
|
{
|
|
523
|
-
ref:
|
|
524
|
-
className:
|
|
523
|
+
ref: a,
|
|
524
|
+
className: s(
|
|
525
525
|
"gryt-checkbox flex h-5 w-5 shrink-0 items-center justify-center",
|
|
526
526
|
"rounded-(--gryt-radius-sm) border border-gryt-border bg-gryt-surface-raised",
|
|
527
527
|
"transition-[scale,background-color,border-color] duration-(--gryt-dur-spring) ease-spring",
|
|
@@ -531,18 +531,18 @@ const Ht = {
|
|
|
531
531
|
"hover:not-data-disabled:border-gryt-accent-light",
|
|
532
532
|
"motion-safe:hover:not-data-disabled:scale-[1.08]",
|
|
533
533
|
"motion-safe:active:not-data-disabled:scale-[0.92]",
|
|
534
|
-
|
|
535
|
-
|
|
534
|
+
A,
|
|
535
|
+
ie,
|
|
536
536
|
// Unchecked stays a neutral outline; the tone only paints once checked.
|
|
537
|
-
|
|
537
|
+
Mr[e],
|
|
538
538
|
t
|
|
539
539
|
),
|
|
540
540
|
...r,
|
|
541
541
|
children: /* @__PURE__ */ o(
|
|
542
|
-
|
|
542
|
+
rt.Indicator,
|
|
543
543
|
{
|
|
544
544
|
keepMounted: !0,
|
|
545
|
-
className:
|
|
545
|
+
className: s(
|
|
546
546
|
"flex origin-center",
|
|
547
547
|
"transition-[scale,opacity] duration-(--gryt-dur-spring) ease-spring",
|
|
548
548
|
// Scaling from 0 rather than from something near 1 is deliberate.
|
|
@@ -552,65 +552,65 @@ const Ht = {
|
|
|
552
552
|
"data-unchecked:scale-0 data-unchecked:opacity-0",
|
|
553
553
|
"motion-reduce:transition-none"
|
|
554
554
|
),
|
|
555
|
-
children: /* @__PURE__ */ o(
|
|
555
|
+
children: /* @__PURE__ */ o(Xe, { size: 12, weight: "bold" })
|
|
556
556
|
}
|
|
557
557
|
)
|
|
558
558
|
}
|
|
559
559
|
);
|
|
560
560
|
}
|
|
561
|
-
),
|
|
561
|
+
), La = l(function({ className: t, tone: e = "primary", ...r }, a) {
|
|
562
562
|
return /* @__PURE__ */ o(
|
|
563
|
-
|
|
563
|
+
nt.Root,
|
|
564
564
|
{
|
|
565
|
-
ref:
|
|
566
|
-
className:
|
|
565
|
+
ref: a,
|
|
566
|
+
className: s(
|
|
567
567
|
"gryt-radio flex h-5 w-5 shrink-0 items-center justify-center",
|
|
568
568
|
"rounded-(--gryt-radius-full) border border-gryt-border bg-gryt-surface-raised",
|
|
569
569
|
"transition-[scale,background-color,border-color] duration-(--gryt-dur-spring) ease-spring",
|
|
570
570
|
"hover:not-data-disabled:border-gryt-accent-light",
|
|
571
571
|
"motion-safe:hover:not-data-disabled:scale-[1.08]",
|
|
572
572
|
"motion-safe:active:not-data-disabled:scale-[0.92]",
|
|
573
|
-
|
|
574
|
-
|
|
573
|
+
A,
|
|
574
|
+
ie,
|
|
575
575
|
// Border takes the tone when selected; the dot inside carries the fill.
|
|
576
|
-
|
|
576
|
+
Rr[e],
|
|
577
577
|
t
|
|
578
578
|
),
|
|
579
579
|
...r,
|
|
580
580
|
children: /* @__PURE__ */ o(
|
|
581
|
-
|
|
581
|
+
nt.Indicator,
|
|
582
582
|
{
|
|
583
583
|
keepMounted: !0,
|
|
584
|
-
className:
|
|
584
|
+
className: s(
|
|
585
585
|
"h-2.5 w-2.5 origin-center rounded-(--gryt-radius-full)",
|
|
586
586
|
"transition-[scale,opacity] duration-(--gryt-dur-spring) ease-spring",
|
|
587
587
|
// From 0, for the same reason as the Checkbox tick — see the note there.
|
|
588
588
|
"data-unchecked:scale-0 data-unchecked:opacity-0",
|
|
589
589
|
"motion-reduce:transition-none",
|
|
590
|
-
|
|
590
|
+
Ct[e]
|
|
591
591
|
)
|
|
592
592
|
}
|
|
593
593
|
)
|
|
594
594
|
}
|
|
595
595
|
);
|
|
596
|
-
}),
|
|
596
|
+
}), Da = l(
|
|
597
597
|
function({ className: t, ...e }, r) {
|
|
598
598
|
return /* @__PURE__ */ o(
|
|
599
|
-
|
|
599
|
+
xr,
|
|
600
600
|
{
|
|
601
601
|
ref: r,
|
|
602
|
-
className:
|
|
602
|
+
className: s("gryt-radio-group flex flex-col gap-2", t),
|
|
603
603
|
...e
|
|
604
604
|
}
|
|
605
605
|
);
|
|
606
606
|
}
|
|
607
|
-
),
|
|
608
|
-
function({ className: t, tone: e = "primary", ...r },
|
|
607
|
+
), Ga = l(
|
|
608
|
+
function({ className: t, tone: e = "primary", ...r }, a) {
|
|
609
609
|
return /* @__PURE__ */ o(
|
|
610
610
|
ot.Root,
|
|
611
611
|
{
|
|
612
|
-
ref:
|
|
613
|
-
className:
|
|
612
|
+
ref: a,
|
|
613
|
+
className: s(
|
|
614
614
|
"gryt-switch relative inline-flex h-6 w-10 shrink-0 items-center",
|
|
615
615
|
"rounded-(--gryt-radius-full) border border-gryt-border bg-gryt-surface-raised p-0.5",
|
|
616
616
|
"transition-[scale,background-color,border-color] duration-(--gryt-dur-spring) ease-spring",
|
|
@@ -618,16 +618,16 @@ const Ht = {
|
|
|
618
618
|
"hover:not-data-disabled:border-gryt-accent-light",
|
|
619
619
|
"motion-safe:hover:not-data-disabled:scale-[1.05]",
|
|
620
620
|
"motion-safe:active:not-data-disabled:scale-[0.95]",
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
621
|
+
A,
|
|
622
|
+
ie,
|
|
623
|
+
Ir[e],
|
|
624
624
|
t
|
|
625
625
|
),
|
|
626
626
|
...r,
|
|
627
627
|
children: /* @__PURE__ */ o(
|
|
628
628
|
ot.Thumb,
|
|
629
629
|
{
|
|
630
|
-
className:
|
|
630
|
+
className: s(
|
|
631
631
|
"h-4.5 w-4.5 rounded-(--gryt-radius-full) bg-gryt-text",
|
|
632
632
|
"transition-transform duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none",
|
|
633
633
|
"data-checked:translate-x-4 data-checked:bg-gryt-bg"
|
|
@@ -637,70 +637,70 @@ const Ht = {
|
|
|
637
637
|
}
|
|
638
638
|
);
|
|
639
639
|
}
|
|
640
|
-
),
|
|
641
|
-
function
|
|
642
|
-
className:
|
|
640
|
+
), lt = 3;
|
|
641
|
+
function At({
|
|
642
|
+
className: n,
|
|
643
643
|
tone: t = "primary",
|
|
644
644
|
"aria-label": e,
|
|
645
645
|
...r
|
|
646
646
|
}) {
|
|
647
|
-
const [
|
|
648
|
-
|
|
649
|
-
if (!
|
|
647
|
+
const [a, c] = G(!1), d = ke(null);
|
|
648
|
+
Vt(() => {
|
|
649
|
+
if (!a && d.current === null)
|
|
650
650
|
return;
|
|
651
|
-
const
|
|
652
|
-
|
|
651
|
+
const f = () => {
|
|
652
|
+
d.current = null, c(!1);
|
|
653
653
|
};
|
|
654
|
-
return window.addEventListener("pointerup",
|
|
655
|
-
window.removeEventListener("pointerup",
|
|
654
|
+
return window.addEventListener("pointerup", f), window.addEventListener("pointercancel", f), () => {
|
|
655
|
+
window.removeEventListener("pointerup", f), window.removeEventListener("pointercancel", f);
|
|
656
656
|
};
|
|
657
|
-
}, [
|
|
658
|
-
function
|
|
659
|
-
|
|
657
|
+
}, [a]);
|
|
658
|
+
function p(f) {
|
|
659
|
+
d.current = { x: f.clientX, y: f.clientY };
|
|
660
660
|
}
|
|
661
|
-
function m(
|
|
662
|
-
const
|
|
663
|
-
if (
|
|
661
|
+
function m(f) {
|
|
662
|
+
const h = d.current;
|
|
663
|
+
if (h === null || a)
|
|
664
664
|
return;
|
|
665
|
-
(Math.abs(
|
|
665
|
+
(Math.abs(f.clientX - h.x) > lt || Math.abs(f.clientY - h.y) > lt) && c(!0);
|
|
666
666
|
}
|
|
667
|
-
const
|
|
668
|
-
return /* @__PURE__ */ o(
|
|
669
|
-
|
|
667
|
+
const y = a ? "transition-none" : "duration-(--gryt-dur-spring) ease-spring-tight motion-reduce:transition-none";
|
|
668
|
+
return /* @__PURE__ */ o(le.Root, { className: s("gryt-slider w-full", n), ...r, children: /* @__PURE__ */ o(
|
|
669
|
+
le.Control,
|
|
670
670
|
{
|
|
671
671
|
className: "flex w-full cursor-pointer touch-none items-center py-2 select-none",
|
|
672
|
-
onPointerDown:
|
|
672
|
+
onPointerDown: p,
|
|
673
673
|
onPointerMove: m,
|
|
674
|
-
children: /* @__PURE__ */
|
|
674
|
+
children: /* @__PURE__ */ u(le.Track, { className: "h-1.5 w-full rounded-(--gryt-radius-full) bg-gryt-surface-raised select-none", children: [
|
|
675
675
|
/* @__PURE__ */ o(
|
|
676
|
-
|
|
676
|
+
le.Indicator,
|
|
677
677
|
{
|
|
678
|
-
className:
|
|
678
|
+
className: s(
|
|
679
679
|
"h-full rounded-(--gryt-radius-full) select-none",
|
|
680
680
|
"transition-[width]",
|
|
681
|
-
|
|
682
|
-
|
|
681
|
+
y,
|
|
682
|
+
Ct[t]
|
|
683
683
|
)
|
|
684
684
|
}
|
|
685
685
|
),
|
|
686
686
|
/* @__PURE__ */ o(
|
|
687
|
-
|
|
687
|
+
le.Thumb,
|
|
688
688
|
{
|
|
689
689
|
"aria-label": e,
|
|
690
|
-
className:
|
|
690
|
+
className: s(
|
|
691
691
|
"group h-4 w-4 rounded-(--gryt-radius-full) select-none",
|
|
692
692
|
"transition-[inset-inline-start]",
|
|
693
|
-
|
|
693
|
+
y,
|
|
694
694
|
// The ring goes on the thumb but the focus lands on the visually
|
|
695
695
|
// hidden input inside it, so this has to match a descendant.
|
|
696
696
|
// Without it the slider is the one control here you cannot see
|
|
697
697
|
// yourself tab to.
|
|
698
|
-
|
|
698
|
+
Ar
|
|
699
699
|
),
|
|
700
700
|
children: /* @__PURE__ */ o(
|
|
701
701
|
"span",
|
|
702
702
|
{
|
|
703
|
-
className:
|
|
703
|
+
className: s(
|
|
704
704
|
"block h-full w-full rounded-(--gryt-radius-full) bg-gryt-text",
|
|
705
705
|
"transition-[scale] duration-(--gryt-dur-spring) ease-spring",
|
|
706
706
|
"motion-safe:group-hover:scale-[1.12] motion-safe:group-active:scale-[0.94]",
|
|
@@ -714,67 +714,67 @@ function Ro({
|
|
|
714
714
|
}
|
|
715
715
|
) });
|
|
716
716
|
}
|
|
717
|
-
const
|
|
717
|
+
const Br = {
|
|
718
718
|
small: "min-h-9 px-3 text-sm",
|
|
719
719
|
medium: "min-h-11 px-4 text-sm"
|
|
720
720
|
};
|
|
721
|
-
function
|
|
722
|
-
className:
|
|
721
|
+
function Je({
|
|
722
|
+
className: n,
|
|
723
723
|
label: t,
|
|
724
724
|
options: e = [],
|
|
725
725
|
placeholder: r = "Select",
|
|
726
|
-
size:
|
|
726
|
+
size: a = "medium",
|
|
727
727
|
...c
|
|
728
728
|
}) {
|
|
729
|
-
const
|
|
730
|
-
return /* @__PURE__ */
|
|
731
|
-
/* @__PURE__ */
|
|
732
|
-
t ? /* @__PURE__ */ o(
|
|
733
|
-
/* @__PURE__ */
|
|
734
|
-
|
|
729
|
+
const d = $t();
|
|
730
|
+
return /* @__PURE__ */ u(R.Root, { items: e, ...c, children: [
|
|
731
|
+
/* @__PURE__ */ u("div", { className: s("gryt-select flex w-full flex-col gap-1.5", n), children: [
|
|
732
|
+
t ? /* @__PURE__ */ o(R.Label, { className: "text-xs font-medium text-gryt-muted", children: t }) : null,
|
|
733
|
+
/* @__PURE__ */ u(
|
|
734
|
+
R.Trigger,
|
|
735
735
|
{
|
|
736
|
-
className:
|
|
736
|
+
className: s(
|
|
737
737
|
"flex w-full cursor-pointer items-center justify-between gap-2",
|
|
738
738
|
"rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface-raised",
|
|
739
739
|
"text-gryt-text select-none",
|
|
740
740
|
"transition-colors duration-150 hover:border-gryt-accent-light",
|
|
741
741
|
"data-disabled:cursor-not-allowed data-disabled:opacity-60",
|
|
742
|
-
|
|
743
|
-
|
|
742
|
+
A,
|
|
743
|
+
Br[a]
|
|
744
744
|
),
|
|
745
745
|
children: [
|
|
746
|
-
/* @__PURE__ */ o(
|
|
747
|
-
/* @__PURE__ */ o(
|
|
746
|
+
/* @__PURE__ */ o(R.Value, { placeholder: r }),
|
|
747
|
+
/* @__PURE__ */ o(R.Icon, { className: "shrink-0 text-gryt-muted", children: /* @__PURE__ */ o(ur, { size: 16 }) })
|
|
748
748
|
]
|
|
749
749
|
}
|
|
750
750
|
)
|
|
751
751
|
] }),
|
|
752
|
-
/* @__PURE__ */ o(
|
|
753
|
-
|
|
752
|
+
/* @__PURE__ */ o(R.Portal, { container: d, children: /* @__PURE__ */ o(
|
|
753
|
+
R.Positioner,
|
|
754
754
|
{
|
|
755
755
|
sideOffset: 6,
|
|
756
756
|
className: "gryt-select-positioner outline-none",
|
|
757
757
|
children: /* @__PURE__ */ o(
|
|
758
|
-
|
|
758
|
+
R.Popup,
|
|
759
759
|
{
|
|
760
|
-
className:
|
|
761
|
-
children: /* @__PURE__ */ o(
|
|
762
|
-
|
|
760
|
+
className: s("min-w-(--anchor-width) p-1", Z, Y),
|
|
761
|
+
children: /* @__PURE__ */ o(R.List, { children: e.map((p) => /* @__PURE__ */ u(
|
|
762
|
+
R.Item,
|
|
763
763
|
{
|
|
764
|
-
value:
|
|
765
|
-
disabled:
|
|
766
|
-
className:
|
|
764
|
+
value: p.value,
|
|
765
|
+
disabled: p.disabled,
|
|
766
|
+
className: s(
|
|
767
767
|
"flex cursor-pointer items-center justify-between gap-2",
|
|
768
768
|
"rounded-(--gryt-radius-md) px-3 py-2 text-sm text-gryt-text",
|
|
769
769
|
"outline-none select-none data-highlighted:bg-gryt-surface-raised",
|
|
770
770
|
"data-disabled:cursor-not-allowed data-disabled:opacity-50"
|
|
771
771
|
),
|
|
772
772
|
children: [
|
|
773
|
-
/* @__PURE__ */ o(
|
|
774
|
-
/* @__PURE__ */ o(
|
|
773
|
+
/* @__PURE__ */ o(R.ItemText, { children: p.label }),
|
|
774
|
+
/* @__PURE__ */ o(R.ItemIndicator, { className: "text-gryt-accent-11", children: /* @__PURE__ */ o(Xe, { size: 14, weight: "bold" }) })
|
|
775
775
|
]
|
|
776
776
|
},
|
|
777
|
-
String(
|
|
777
|
+
String(p.value)
|
|
778
778
|
)) })
|
|
779
779
|
}
|
|
780
780
|
)
|
|
@@ -782,46 +782,46 @@ function Io({
|
|
|
782
782
|
) })
|
|
783
783
|
] });
|
|
784
784
|
}
|
|
785
|
-
function
|
|
786
|
-
children:
|
|
785
|
+
function Fa({
|
|
786
|
+
children: n,
|
|
787
787
|
className: t,
|
|
788
788
|
side: e = "top",
|
|
789
789
|
sideOffset: r = 8,
|
|
790
|
-
title:
|
|
790
|
+
title: a
|
|
791
791
|
}) {
|
|
792
|
-
const c =
|
|
793
|
-
return /* @__PURE__ */
|
|
794
|
-
/* @__PURE__ */ o(
|
|
795
|
-
/* @__PURE__ */ o(
|
|
796
|
-
|
|
792
|
+
const c = $t();
|
|
793
|
+
return /* @__PURE__ */ u(K.Root, { children: [
|
|
794
|
+
/* @__PURE__ */ o(K.Trigger, { render: n }),
|
|
795
|
+
/* @__PURE__ */ o(K.Portal, { container: c, children: /* @__PURE__ */ o(
|
|
796
|
+
K.Positioner,
|
|
797
797
|
{
|
|
798
798
|
side: e,
|
|
799
799
|
sideOffset: r,
|
|
800
800
|
className: "gryt-tooltip-positioner",
|
|
801
801
|
children: /* @__PURE__ */ o(
|
|
802
|
-
|
|
802
|
+
K.Popup,
|
|
803
803
|
{
|
|
804
|
-
className:
|
|
804
|
+
className: s(
|
|
805
805
|
"gryt-tooltip rounded-(--gryt-radius-md) border border-gryt-border bg-gryt-surface-raised",
|
|
806
806
|
"px-2.5 py-1.5 text-xs text-gryt-text",
|
|
807
|
-
|
|
807
|
+
Y,
|
|
808
808
|
t
|
|
809
809
|
),
|
|
810
|
-
children:
|
|
810
|
+
children: a
|
|
811
811
|
}
|
|
812
812
|
)
|
|
813
813
|
}
|
|
814
814
|
) })
|
|
815
815
|
] });
|
|
816
816
|
}
|
|
817
|
-
const
|
|
818
|
-
function({ className: t, orientation: e = "horizontal", ...r },
|
|
817
|
+
const za = K.Provider, Ba = l(
|
|
818
|
+
function({ className: t, orientation: e = "horizontal", ...r }, a) {
|
|
819
819
|
return /* @__PURE__ */ o(
|
|
820
|
-
|
|
820
|
+
vr,
|
|
821
821
|
{
|
|
822
|
-
ref:
|
|
822
|
+
ref: a,
|
|
823
823
|
orientation: e,
|
|
824
|
-
className:
|
|
824
|
+
className: s(
|
|
825
825
|
"gryt-divider bg-gryt-border",
|
|
826
826
|
e === "vertical" ? "h-full w-px" : "h-px w-full",
|
|
827
827
|
t
|
|
@@ -830,12 +830,12 @@ const Do = I.Provider, Mo = s(
|
|
|
830
830
|
}
|
|
831
831
|
);
|
|
832
832
|
}
|
|
833
|
-
),
|
|
833
|
+
), Ea = l(function({ className: t, ...e }, r) {
|
|
834
834
|
return /* @__PURE__ */ o(
|
|
835
835
|
"div",
|
|
836
836
|
{
|
|
837
837
|
ref: r,
|
|
838
|
-
className:
|
|
838
|
+
className: s(
|
|
839
839
|
"gryt-card rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface text-gryt-text",
|
|
840
840
|
t
|
|
841
841
|
),
|
|
@@ -843,87 +843,87 @@ const Do = I.Provider, Mo = s(
|
|
|
843
843
|
}
|
|
844
844
|
);
|
|
845
845
|
});
|
|
846
|
-
function
|
|
847
|
-
children:
|
|
846
|
+
function _a({
|
|
847
|
+
children: n,
|
|
848
848
|
className: t,
|
|
849
849
|
subheader: e,
|
|
850
850
|
title: r,
|
|
851
|
-
...
|
|
851
|
+
...a
|
|
852
852
|
}) {
|
|
853
|
-
return /* @__PURE__ */
|
|
853
|
+
return /* @__PURE__ */ u(
|
|
854
854
|
"div",
|
|
855
855
|
{
|
|
856
|
-
className:
|
|
857
|
-
...
|
|
856
|
+
className: s("gryt-card-header flex flex-col gap-1 p-4", t),
|
|
857
|
+
...a,
|
|
858
858
|
children: [
|
|
859
859
|
r ? /* @__PURE__ */ o("span", { className: "text-base font-semibold text-gryt-text", children: r }) : null,
|
|
860
860
|
e ? /* @__PURE__ */ o("span", { className: "text-sm text-gryt-muted", children: e }) : null,
|
|
861
|
-
|
|
861
|
+
n
|
|
862
862
|
]
|
|
863
863
|
}
|
|
864
864
|
);
|
|
865
865
|
}
|
|
866
|
-
function
|
|
867
|
-
className:
|
|
866
|
+
function Ha({
|
|
867
|
+
className: n,
|
|
868
868
|
...t
|
|
869
869
|
}) {
|
|
870
870
|
return /* @__PURE__ */ o(
|
|
871
871
|
"div",
|
|
872
872
|
{
|
|
873
|
-
className:
|
|
873
|
+
className: s(
|
|
874
874
|
"gryt-card-content px-4 pb-4 text-sm text-gryt-muted",
|
|
875
|
-
|
|
875
|
+
n
|
|
876
876
|
),
|
|
877
877
|
...t
|
|
878
878
|
}
|
|
879
879
|
);
|
|
880
880
|
}
|
|
881
|
-
function
|
|
882
|
-
className:
|
|
881
|
+
function ja({
|
|
882
|
+
className: n,
|
|
883
883
|
...t
|
|
884
884
|
}) {
|
|
885
885
|
return /* @__PURE__ */ o(
|
|
886
886
|
"div",
|
|
887
887
|
{
|
|
888
|
-
className:
|
|
888
|
+
className: s(
|
|
889
889
|
"gryt-card-actions flex items-center gap-2 px-4 pb-4",
|
|
890
|
-
|
|
890
|
+
n
|
|
891
891
|
),
|
|
892
892
|
...t
|
|
893
893
|
}
|
|
894
894
|
);
|
|
895
895
|
}
|
|
896
|
-
const
|
|
896
|
+
const Er = {
|
|
897
897
|
info: "border-gryt-secondary-6 bg-gryt-secondary-3 text-gryt-secondary-11",
|
|
898
898
|
success: "border-gryt-success-6 bg-gryt-success-3 text-gryt-success-11",
|
|
899
899
|
warning: "border-gryt-warning-6 bg-gryt-warning-3 text-gryt-warning-11",
|
|
900
900
|
error: "border-gryt-danger-6 bg-gryt-danger-3 text-gryt-danger-11"
|
|
901
|
-
},
|
|
901
|
+
}, Oa = l(function({ className: t, severity: e = "info", ...r }, a) {
|
|
902
902
|
return /* @__PURE__ */ o(
|
|
903
903
|
"div",
|
|
904
904
|
{
|
|
905
|
-
ref:
|
|
905
|
+
ref: a,
|
|
906
906
|
role: "alert",
|
|
907
|
-
className:
|
|
907
|
+
className: s(
|
|
908
908
|
"gryt-alert rounded-(--gryt-radius-lg) border px-4 py-3 text-sm",
|
|
909
|
-
|
|
909
|
+
Er[e],
|
|
910
910
|
t
|
|
911
911
|
),
|
|
912
912
|
...r
|
|
913
913
|
}
|
|
914
914
|
);
|
|
915
915
|
});
|
|
916
|
-
function
|
|
916
|
+
function Va({ className: n, value: t = null, ...e }) {
|
|
917
917
|
return /* @__PURE__ */ o(
|
|
918
|
-
|
|
918
|
+
De.Root,
|
|
919
919
|
{
|
|
920
920
|
value: t,
|
|
921
|
-
className:
|
|
921
|
+
className: s("gryt-progress w-full", n),
|
|
922
922
|
...e,
|
|
923
|
-
children: /* @__PURE__ */ o(
|
|
924
|
-
|
|
923
|
+
children: /* @__PURE__ */ o(De.Track, { className: "h-1.5 w-full overflow-hidden rounded-(--gryt-radius-full) bg-gryt-surface-raised", children: /* @__PURE__ */ o(
|
|
924
|
+
De.Indicator,
|
|
925
925
|
{
|
|
926
|
-
className:
|
|
926
|
+
className: s(
|
|
927
927
|
"h-full rounded-(--gryt-radius-full) bg-gryt-accent",
|
|
928
928
|
"transition-[width] duration-300 ease-out motion-reduce:transition-none",
|
|
929
929
|
// Base UI marks the indicator indeterminate and leaves its width
|
|
@@ -938,41 +938,41 @@ function Fo({ className: a, value: t = null, ...e }) {
|
|
|
938
938
|
}
|
|
939
939
|
);
|
|
940
940
|
}
|
|
941
|
-
function
|
|
942
|
-
className:
|
|
941
|
+
function Ya({
|
|
942
|
+
className: n,
|
|
943
943
|
size: t = 24,
|
|
944
944
|
"aria-label": e = "Loading"
|
|
945
945
|
}) {
|
|
946
946
|
return /* @__PURE__ */ o(
|
|
947
|
-
|
|
947
|
+
gr,
|
|
948
948
|
{
|
|
949
949
|
role: "status",
|
|
950
950
|
"aria-label": e,
|
|
951
951
|
size: t,
|
|
952
952
|
weight: "bold",
|
|
953
|
-
className:
|
|
953
|
+
className: s(
|
|
954
954
|
"gryt-spinner text-gryt-accent-11 motion-safe:animate-spin",
|
|
955
|
-
|
|
955
|
+
n
|
|
956
956
|
)
|
|
957
957
|
}
|
|
958
958
|
);
|
|
959
959
|
}
|
|
960
|
-
const
|
|
960
|
+
const _r = {
|
|
961
961
|
text: "h-4 rounded-(--gryt-radius-sm)",
|
|
962
962
|
rounded: "rounded-(--gryt-radius-lg)",
|
|
963
963
|
circular: "rounded-(--gryt-radius-full)",
|
|
964
964
|
rectangular: "rounded-none"
|
|
965
965
|
};
|
|
966
|
-
function
|
|
967
|
-
className:
|
|
966
|
+
function Ua({
|
|
967
|
+
className: n,
|
|
968
968
|
height: t,
|
|
969
969
|
style: e,
|
|
970
970
|
variant: r = "text",
|
|
971
|
-
width:
|
|
971
|
+
width: a,
|
|
972
972
|
...c
|
|
973
973
|
}) {
|
|
974
|
-
const
|
|
975
|
-
width:
|
|
974
|
+
const d = {
|
|
975
|
+
width: a,
|
|
976
976
|
height: t,
|
|
977
977
|
...e
|
|
978
978
|
};
|
|
@@ -980,7 +980,7 @@ function Vo({
|
|
|
980
980
|
"div",
|
|
981
981
|
{
|
|
982
982
|
"aria-hidden": "true",
|
|
983
|
-
className:
|
|
983
|
+
className: s(
|
|
984
984
|
// Not bg-gryt-surface-raised. #1e2028 against #1a1d24 is four points of
|
|
985
985
|
// luminance, which is invisible on a laptop screen at an angle — the
|
|
986
986
|
// placeholder that is meant to say "something is coming" said nothing.
|
|
@@ -988,24 +988,24 @@ function Vo({
|
|
|
988
988
|
// the surfaces it can land on rather than only the one it was picked
|
|
989
989
|
// against, and it dims rather than brightens as it pulses.
|
|
990
990
|
"gryt-skeleton bg-white/9 motion-safe:animate-pulse",
|
|
991
|
-
|
|
992
|
-
|
|
991
|
+
_r[r],
|
|
992
|
+
n
|
|
993
993
|
),
|
|
994
|
-
style:
|
|
994
|
+
style: d,
|
|
995
995
|
...c
|
|
996
996
|
}
|
|
997
997
|
);
|
|
998
998
|
}
|
|
999
|
-
const
|
|
999
|
+
const Mt = "transition-[opacity,scale,translate] duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none", Hr = l(
|
|
1000
1000
|
function({ className: t, ...e }, r) {
|
|
1001
1001
|
return /* @__PURE__ */ o(
|
|
1002
|
-
|
|
1002
|
+
O.Backdrop,
|
|
1003
1003
|
{
|
|
1004
1004
|
ref: r,
|
|
1005
|
-
className:
|
|
1005
|
+
className: s(
|
|
1006
1006
|
"gryt-dialog-backdrop fixed inset-0 min-h-dvh bg-black/60",
|
|
1007
1007
|
"backdrop-blur-(--gryt-backdrop-blur)",
|
|
1008
|
-
|
|
1008
|
+
Mt,
|
|
1009
1009
|
"data-starting-style:opacity-0 data-ending-style:opacity-0",
|
|
1010
1010
|
t
|
|
1011
1011
|
),
|
|
@@ -1013,17 +1013,17 @@ const xt = "transition-[opacity,scale,translate] duration-(--gryt-dur-spring) ea
|
|
|
1013
1013
|
}
|
|
1014
1014
|
);
|
|
1015
1015
|
}
|
|
1016
|
-
),
|
|
1016
|
+
), jr = l(
|
|
1017
1017
|
function({ className: t, ...e }, r) {
|
|
1018
1018
|
return /* @__PURE__ */ o(
|
|
1019
|
-
|
|
1019
|
+
O.Popup,
|
|
1020
1020
|
{
|
|
1021
1021
|
ref: r,
|
|
1022
|
-
className:
|
|
1022
|
+
className: s(
|
|
1023
1023
|
"gryt-dialog fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2",
|
|
1024
1024
|
"flex w-[32rem] max-w-[calc(100vw-3rem)] flex-col gap-4",
|
|
1025
1025
|
"rounded-(--gryt-radius-lg) border border-gryt-border bg-gryt-surface p-5 text-gryt-text",
|
|
1026
|
-
|
|
1026
|
+
Mt,
|
|
1027
1027
|
"data-starting-style:scale-[0.98] data-starting-style:opacity-0",
|
|
1028
1028
|
"data-ending-style:scale-[0.98] data-ending-style:opacity-0",
|
|
1029
1029
|
t
|
|
@@ -1032,13 +1032,13 @@ const xt = "transition-[opacity,scale,translate] duration-(--gryt-dur-spring) ea
|
|
|
1032
1032
|
}
|
|
1033
1033
|
);
|
|
1034
1034
|
}
|
|
1035
|
-
),
|
|
1035
|
+
), Or = l(
|
|
1036
1036
|
function({ className: t, ...e }, r) {
|
|
1037
1037
|
return /* @__PURE__ */ o(
|
|
1038
|
-
|
|
1038
|
+
O.Title,
|
|
1039
1039
|
{
|
|
1040
1040
|
ref: r,
|
|
1041
|
-
className:
|
|
1041
|
+
className: s(
|
|
1042
1042
|
"gryt-dialog-title text-base font-semibold text-gryt-text",
|
|
1043
1043
|
t
|
|
1044
1044
|
),
|
|
@@ -1046,13 +1046,13 @@ const xt = "transition-[opacity,scale,translate] duration-(--gryt-dur-spring) ea
|
|
|
1046
1046
|
}
|
|
1047
1047
|
);
|
|
1048
1048
|
}
|
|
1049
|
-
),
|
|
1049
|
+
), Vr = l(
|
|
1050
1050
|
function({ className: t, ...e }, r) {
|
|
1051
1051
|
return /* @__PURE__ */ o(
|
|
1052
|
-
|
|
1052
|
+
O.Description,
|
|
1053
1053
|
{
|
|
1054
1054
|
ref: r,
|
|
1055
|
-
className:
|
|
1055
|
+
className: s(
|
|
1056
1056
|
"gryt-dialog-description text-sm text-gryt-muted",
|
|
1057
1057
|
t
|
|
1058
1058
|
),
|
|
@@ -1060,13 +1060,13 @@ const xt = "transition-[opacity,scale,translate] duration-(--gryt-dur-spring) ea
|
|
|
1060
1060
|
}
|
|
1061
1061
|
);
|
|
1062
1062
|
}
|
|
1063
|
-
),
|
|
1063
|
+
), Yr = l(
|
|
1064
1064
|
function({ className: t, ...e }, r) {
|
|
1065
1065
|
return /* @__PURE__ */ o(
|
|
1066
1066
|
"div",
|
|
1067
1067
|
{
|
|
1068
1068
|
ref: r,
|
|
1069
|
-
className:
|
|
1069
|
+
className: s(
|
|
1070
1070
|
"gryt-dialog-footer flex justify-end gap-3",
|
|
1071
1071
|
t
|
|
1072
1072
|
),
|
|
@@ -1074,45 +1074,45 @@ const xt = "transition-[opacity,scale,translate] duration-(--gryt-dur-spring) ea
|
|
|
1074
1074
|
}
|
|
1075
1075
|
);
|
|
1076
1076
|
}
|
|
1077
|
-
),
|
|
1078
|
-
Root:
|
|
1079
|
-
Trigger:
|
|
1080
|
-
Portal:
|
|
1081
|
-
Close:
|
|
1082
|
-
Backdrop:
|
|
1083
|
-
Popup:
|
|
1084
|
-
Title:
|
|
1085
|
-
Description:
|
|
1086
|
-
Footer:
|
|
1087
|
-
},
|
|
1077
|
+
), Xa = {
|
|
1078
|
+
Root: O.Root,
|
|
1079
|
+
Trigger: O.Trigger,
|
|
1080
|
+
Portal: O.Portal,
|
|
1081
|
+
Close: O.Close,
|
|
1082
|
+
Backdrop: Hr,
|
|
1083
|
+
Popup: jr,
|
|
1084
|
+
Title: Or,
|
|
1085
|
+
Description: Vr,
|
|
1086
|
+
Footer: Yr
|
|
1087
|
+
}, Ur = () => () => {
|
|
1088
1088
|
};
|
|
1089
|
-
function
|
|
1090
|
-
const t =
|
|
1089
|
+
function Xr(n) {
|
|
1090
|
+
const t = pe(
|
|
1091
1091
|
(r) => {
|
|
1092
|
-
if (typeof window > "u" || !window.matchMedia) return
|
|
1093
|
-
const
|
|
1094
|
-
return
|
|
1092
|
+
if (typeof window > "u" || !window.matchMedia) return Ur();
|
|
1093
|
+
const a = window.matchMedia(n);
|
|
1094
|
+
return a.addEventListener("change", r), () => a.removeEventListener("change", r);
|
|
1095
1095
|
},
|
|
1096
|
-
[
|
|
1097
|
-
), e =
|
|
1098
|
-
return
|
|
1096
|
+
[n]
|
|
1097
|
+
), e = pe(() => typeof window > "u" || !window.matchMedia ? !1 : window.matchMedia(n).matches, [n]);
|
|
1098
|
+
return Yt(t, e, () => !1);
|
|
1099
1099
|
}
|
|
1100
|
-
const
|
|
1100
|
+
const Wr = {
|
|
1101
1101
|
left: "left",
|
|
1102
1102
|
right: "right",
|
|
1103
1103
|
top: "up",
|
|
1104
1104
|
bottom: "down"
|
|
1105
|
-
},
|
|
1105
|
+
}, Pe = bt("right"), Kr = {
|
|
1106
1106
|
left: "items-stretch justify-start",
|
|
1107
1107
|
right: "items-stretch justify-end",
|
|
1108
1108
|
top: "items-start justify-center",
|
|
1109
1109
|
bottom: "items-end justify-center"
|
|
1110
|
-
},
|
|
1110
|
+
}, Jr = {
|
|
1111
1111
|
left: "rounded-r-(--gryt-radius-xl)",
|
|
1112
1112
|
right: "rounded-l-(--gryt-radius-xl)",
|
|
1113
1113
|
top: "rounded-b-(--gryt-radius-xl)",
|
|
1114
1114
|
bottom: "rounded-t-(--gryt-radius-xl)"
|
|
1115
|
-
},
|
|
1115
|
+
}, Qr = {
|
|
1116
1116
|
left: [
|
|
1117
1117
|
"h-full w-[calc(20rem+var(--gryt-drawer-bleed))] max-w-[calc(85vw+var(--gryt-drawer-bleed))]",
|
|
1118
1118
|
"-ml-(--gryt-drawer-bleed) border-r py-5 pr-5 pl-[calc(1.25rem+var(--gryt-drawer-bleed))]",
|
|
@@ -1142,41 +1142,41 @@ const ue = {
|
|
|
1142
1142
|
"data-ending-style:[transform:translateY(calc(100%-var(--gryt-drawer-bleed)))]"
|
|
1143
1143
|
].join(" ")
|
|
1144
1144
|
};
|
|
1145
|
-
function
|
|
1146
|
-
side:
|
|
1145
|
+
function Zr({
|
|
1146
|
+
side: n = "right",
|
|
1147
1147
|
sheetOnMobile: t = !0,
|
|
1148
1148
|
children: e,
|
|
1149
1149
|
...r
|
|
1150
1150
|
}) {
|
|
1151
|
-
const
|
|
1152
|
-
return /* @__PURE__ */ o(
|
|
1151
|
+
const a = Xr("(max-width: 767px)"), c = t && a ? "bottom" : n;
|
|
1152
|
+
return /* @__PURE__ */ o(Pe.Provider, { value: c, children: /* @__PURE__ */ o(D.Root, { swipeDirection: Wr[c], ...r, children: e }) });
|
|
1153
1153
|
}
|
|
1154
|
-
const
|
|
1154
|
+
const qr = l(
|
|
1155
1155
|
function({ className: t, ...e }, r) {
|
|
1156
|
-
const
|
|
1156
|
+
const a = $e(Pe);
|
|
1157
1157
|
return /* @__PURE__ */ o(
|
|
1158
|
-
|
|
1158
|
+
D.Viewport,
|
|
1159
1159
|
{
|
|
1160
1160
|
ref: r,
|
|
1161
|
-
className:
|
|
1161
|
+
className: s(
|
|
1162
1162
|
// z-50 matters: the popup is no longer positioned itself, so the
|
|
1163
1163
|
// viewport is what has to sit above the page. Without it a sticky
|
|
1164
1164
|
// site header renders over the panel.
|
|
1165
1165
|
"gryt-drawer-viewport fixed inset-0 z-50 flex",
|
|
1166
|
-
|
|
1166
|
+
Kr[a],
|
|
1167
1167
|
t
|
|
1168
1168
|
),
|
|
1169
1169
|
...e
|
|
1170
1170
|
}
|
|
1171
1171
|
);
|
|
1172
1172
|
}
|
|
1173
|
-
),
|
|
1174
|
-
const
|
|
1173
|
+
), en = l(function({ className: t, ...e }, r) {
|
|
1174
|
+
const a = $e(Pe);
|
|
1175
1175
|
return /* @__PURE__ */ o(
|
|
1176
|
-
|
|
1176
|
+
D.Popup,
|
|
1177
1177
|
{
|
|
1178
1178
|
ref: r,
|
|
1179
|
-
className:
|
|
1179
|
+
className: s(
|
|
1180
1180
|
"gryt-drawer flex flex-col gap-4 border-gryt-border bg-gryt-surface text-gryt-text",
|
|
1181
1181
|
"overflow-y-auto overscroll-contain outline-none",
|
|
1182
1182
|
"transition-transform duration-(--gryt-dur-spring-soft) ease-spring-tight",
|
|
@@ -1184,19 +1184,19 @@ const fe = s(
|
|
|
1184
1184
|
// duration here turns a drag into a drag plus lag.
|
|
1185
1185
|
"data-swiping:duration-0 data-swiping:select-none",
|
|
1186
1186
|
"motion-reduce:transition-none",
|
|
1187
|
-
|
|
1188
|
-
|
|
1187
|
+
Qr[a],
|
|
1188
|
+
Jr[a],
|
|
1189
1189
|
t
|
|
1190
1190
|
),
|
|
1191
1191
|
...e
|
|
1192
1192
|
}
|
|
1193
1193
|
);
|
|
1194
|
-
}),
|
|
1194
|
+
}), tn = l(function({ className: t, ...e }, r) {
|
|
1195
1195
|
return /* @__PURE__ */ o(
|
|
1196
|
-
|
|
1196
|
+
D.Backdrop,
|
|
1197
1197
|
{
|
|
1198
1198
|
ref: r,
|
|
1199
|
-
className:
|
|
1199
|
+
className: s(
|
|
1200
1200
|
"gryt-drawer-backdrop fixed inset-0 z-50 min-h-dvh bg-black/60",
|
|
1201
1201
|
"backdrop-blur-(--gryt-backdrop-blur)",
|
|
1202
1202
|
// Lightens as the panel is dragged away, so letting go halfway does not
|
|
@@ -1212,64 +1212,64 @@ const fe = s(
|
|
|
1212
1212
|
}
|
|
1213
1213
|
);
|
|
1214
1214
|
});
|
|
1215
|
-
function
|
|
1216
|
-
const t =
|
|
1215
|
+
function rn({ className: n }) {
|
|
1216
|
+
const t = $e(Pe);
|
|
1217
1217
|
return t !== "bottom" && t !== "top" ? null : /* @__PURE__ */ o(
|
|
1218
1218
|
"div",
|
|
1219
1219
|
{
|
|
1220
1220
|
"aria-hidden": !0,
|
|
1221
|
-
className:
|
|
1221
|
+
className: s(
|
|
1222
1222
|
"gryt-drawer-grabber mx-auto h-1.5 w-10 shrink-0 rounded-(--gryt-radius-full) bg-gryt-border",
|
|
1223
1223
|
t === "top" && "order-last",
|
|
1224
|
-
|
|
1224
|
+
n
|
|
1225
1225
|
)
|
|
1226
1226
|
}
|
|
1227
1227
|
);
|
|
1228
1228
|
}
|
|
1229
|
-
const
|
|
1230
|
-
Root:
|
|
1231
|
-
Trigger:
|
|
1232
|
-
Portal:
|
|
1233
|
-
Backdrop:
|
|
1234
|
-
Viewport:
|
|
1235
|
-
Popup:
|
|
1236
|
-
Content:
|
|
1237
|
-
Grabber:
|
|
1238
|
-
Close:
|
|
1239
|
-
Title:
|
|
1240
|
-
Description:
|
|
1241
|
-
},
|
|
1242
|
-
function({ className: t, sideOffset: e = 8, ...r },
|
|
1229
|
+
const Wa = {
|
|
1230
|
+
Root: Zr,
|
|
1231
|
+
Trigger: D.Trigger,
|
|
1232
|
+
Portal: D.Portal,
|
|
1233
|
+
Backdrop: tn,
|
|
1234
|
+
Viewport: qr,
|
|
1235
|
+
Popup: en,
|
|
1236
|
+
Content: D.Content,
|
|
1237
|
+
Grabber: rn,
|
|
1238
|
+
Close: D.Close,
|
|
1239
|
+
Title: D.Title,
|
|
1240
|
+
Description: D.Description
|
|
1241
|
+
}, nn = l(
|
|
1242
|
+
function({ className: t, sideOffset: e = 8, ...r }, a) {
|
|
1243
1243
|
return /* @__PURE__ */ o(
|
|
1244
|
-
|
|
1244
|
+
J.Positioner,
|
|
1245
1245
|
{
|
|
1246
|
-
ref:
|
|
1246
|
+
ref: a,
|
|
1247
1247
|
sideOffset: e,
|
|
1248
|
-
className:
|
|
1248
|
+
className: s("gryt-menu-positioner outline-none", t),
|
|
1249
1249
|
...r
|
|
1250
1250
|
}
|
|
1251
1251
|
);
|
|
1252
1252
|
}
|
|
1253
|
-
),
|
|
1253
|
+
), on = l(function({ className: t, ...e }, r) {
|
|
1254
1254
|
return /* @__PURE__ */ o(
|
|
1255
|
-
|
|
1255
|
+
J.Popup,
|
|
1256
1256
|
{
|
|
1257
1257
|
ref: r,
|
|
1258
|
-
className:
|
|
1258
|
+
className: s(
|
|
1259
1259
|
"gryt-menu min-w-44 p-1 outline-none",
|
|
1260
|
-
|
|
1261
|
-
|
|
1260
|
+
Z,
|
|
1261
|
+
Y,
|
|
1262
1262
|
t
|
|
1263
1263
|
),
|
|
1264
1264
|
...e
|
|
1265
1265
|
}
|
|
1266
1266
|
);
|
|
1267
|
-
}),
|
|
1267
|
+
}), an = l(function({ className: t, ...e }, r) {
|
|
1268
1268
|
return /* @__PURE__ */ o(
|
|
1269
|
-
|
|
1269
|
+
J.Item,
|
|
1270
1270
|
{
|
|
1271
1271
|
ref: r,
|
|
1272
|
-
className:
|
|
1272
|
+
className: s(
|
|
1273
1273
|
"gryt-menu-item flex cursor-pointer items-center gap-2 rounded-(--gryt-radius-md)",
|
|
1274
1274
|
"px-3 py-2 text-sm text-gryt-text outline-none select-none",
|
|
1275
1275
|
// Base UI drives keyboard and pointer highlight through the same
|
|
@@ -1281,29 +1281,29 @@ const Yo = {
|
|
|
1281
1281
|
...e
|
|
1282
1282
|
}
|
|
1283
1283
|
);
|
|
1284
|
-
}),
|
|
1284
|
+
}), sn = l(function({ className: t, ...e }, r) {
|
|
1285
1285
|
return /* @__PURE__ */ o(
|
|
1286
|
-
|
|
1286
|
+
J.Separator,
|
|
1287
1287
|
{
|
|
1288
1288
|
ref: r,
|
|
1289
|
-
className:
|
|
1289
|
+
className: s("gryt-menu-separator my-1 h-px bg-gryt-border", t),
|
|
1290
1290
|
...e
|
|
1291
1291
|
}
|
|
1292
1292
|
);
|
|
1293
|
-
}),
|
|
1294
|
-
Root:
|
|
1295
|
-
Trigger:
|
|
1296
|
-
Portal:
|
|
1297
|
-
Positioner:
|
|
1298
|
-
Popup:
|
|
1299
|
-
Item:
|
|
1300
|
-
Separator:
|
|
1301
|
-
},
|
|
1293
|
+
}), Ge = {
|
|
1294
|
+
Root: J.Root,
|
|
1295
|
+
Trigger: J.Trigger,
|
|
1296
|
+
Portal: J.Portal,
|
|
1297
|
+
Positioner: nn,
|
|
1298
|
+
Popup: on,
|
|
1299
|
+
Item: an,
|
|
1300
|
+
Separator: sn
|
|
1301
|
+
}, ln = l(function({ className: t, ...e }, r) {
|
|
1302
1302
|
return /* @__PURE__ */ o(
|
|
1303
|
-
|
|
1303
|
+
he.Root,
|
|
1304
1304
|
{
|
|
1305
1305
|
ref: r,
|
|
1306
|
-
className:
|
|
1306
|
+
className: s(
|
|
1307
1307
|
"gryt-tabs",
|
|
1308
1308
|
// Vertical puts the rail and the panel side by side. min-w-0 on the
|
|
1309
1309
|
// panel does the rest; without the flex here the panel lands under the
|
|
@@ -1314,12 +1314,12 @@ const Yo = {
|
|
|
1314
1314
|
...e
|
|
1315
1315
|
}
|
|
1316
1316
|
);
|
|
1317
|
-
}),
|
|
1317
|
+
}), cn = l(function({ className: t, ...e }, r) {
|
|
1318
1318
|
return /* @__PURE__ */ o(
|
|
1319
|
-
|
|
1319
|
+
he.List,
|
|
1320
1320
|
{
|
|
1321
1321
|
ref: r,
|
|
1322
|
-
className:
|
|
1322
|
+
className: s(
|
|
1323
1323
|
"gryt-tabs-list relative inline-flex items-center gap-1 rounded-(--gryt-radius-full) bg-gryt-surface-raised p-1",
|
|
1324
1324
|
// A rail, not a pill: rows are full width and the corner radius drops
|
|
1325
1325
|
// to lg, because a 999px radius on a tall box bows its short edges.
|
|
@@ -1331,12 +1331,12 @@ const Yo = {
|
|
|
1331
1331
|
...e
|
|
1332
1332
|
}
|
|
1333
1333
|
);
|
|
1334
|
-
}),
|
|
1334
|
+
}), dn = l(function({ className: t, ...e }, r) {
|
|
1335
1335
|
return /* @__PURE__ */ o(
|
|
1336
|
-
|
|
1336
|
+
he.Tab,
|
|
1337
1337
|
{
|
|
1338
1338
|
ref: r,
|
|
1339
|
-
className:
|
|
1339
|
+
className: s(
|
|
1340
1340
|
"gryt-tab inline-flex min-h-8 cursor-pointer items-center justify-center whitespace-nowrap",
|
|
1341
1341
|
"rounded-(--gryt-radius-full) border-0 bg-transparent px-4 py-1.5",
|
|
1342
1342
|
"text-sm font-medium text-gryt-muted select-none",
|
|
@@ -1362,20 +1362,20 @@ const Yo = {
|
|
|
1362
1362
|
"data-[orientation=vertical]:gap-2.5 data-[orientation=vertical]:px-3",
|
|
1363
1363
|
"data-[orientation=vertical]:rounded-(--gryt-radius-md)",
|
|
1364
1364
|
"data-disabled:cursor-not-allowed data-disabled:opacity-50",
|
|
1365
|
-
|
|
1365
|
+
A,
|
|
1366
1366
|
t
|
|
1367
1367
|
),
|
|
1368
1368
|
...e
|
|
1369
1369
|
}
|
|
1370
1370
|
);
|
|
1371
|
-
}),
|
|
1371
|
+
}), un = l(
|
|
1372
1372
|
function({ className: t, ...e }, r) {
|
|
1373
1373
|
return /* @__PURE__ */ o(
|
|
1374
|
-
|
|
1374
|
+
he.Indicator,
|
|
1375
1375
|
{
|
|
1376
1376
|
ref: r,
|
|
1377
1377
|
renderBeforeHydration: !0,
|
|
1378
|
-
className:
|
|
1378
|
+
className: s(
|
|
1379
1379
|
"gryt-tabs-indicator absolute top-1 left-0 z-0 h-[calc(100%-0.5rem)]",
|
|
1380
1380
|
"w-(--active-tab-width) translate-x-(--active-tab-left)",
|
|
1381
1381
|
"rounded-(--gryt-radius-full) bg-gryt-accent",
|
|
@@ -1395,12 +1395,12 @@ const Yo = {
|
|
|
1395
1395
|
}
|
|
1396
1396
|
);
|
|
1397
1397
|
}
|
|
1398
|
-
),
|
|
1398
|
+
), gn = l(function({ className: t, ...e }, r) {
|
|
1399
1399
|
return /* @__PURE__ */ o(
|
|
1400
|
-
|
|
1400
|
+
he.Panel,
|
|
1401
1401
|
{
|
|
1402
1402
|
ref: r,
|
|
1403
|
-
className:
|
|
1403
|
+
className: s(
|
|
1404
1404
|
"gryt-tabs-panel pt-3 text-sm text-gryt-text",
|
|
1405
1405
|
// Beside the rail rather than under it, and allowed to shrink so long
|
|
1406
1406
|
// content wraps instead of pushing the rail off screen.
|
|
@@ -1411,49 +1411,49 @@ const Yo = {
|
|
|
1411
1411
|
...e
|
|
1412
1412
|
}
|
|
1413
1413
|
);
|
|
1414
|
-
}),
|
|
1414
|
+
}), Ka = Object.assign(ln, { List: cn, Tab: dn, Panel: gn, Indicator: un }), mn = l(function({ className: t, ...e }, r) {
|
|
1415
1415
|
return /* @__PURE__ */ o(
|
|
1416
|
-
|
|
1416
|
+
fe.Root,
|
|
1417
1417
|
{
|
|
1418
1418
|
ref: r,
|
|
1419
|
-
className:
|
|
1419
|
+
className: s(
|
|
1420
1420
|
"gryt-accordion flex w-full flex-col gap-2 rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface p-2",
|
|
1421
1421
|
t
|
|
1422
1422
|
),
|
|
1423
1423
|
...e
|
|
1424
1424
|
}
|
|
1425
1425
|
);
|
|
1426
|
-
}),
|
|
1426
|
+
}), pn = l(
|
|
1427
1427
|
function({ className: t, ...e }, r) {
|
|
1428
1428
|
return /* @__PURE__ */ o(
|
|
1429
|
-
|
|
1429
|
+
fe.Item,
|
|
1430
1430
|
{
|
|
1431
1431
|
ref: r,
|
|
1432
|
-
className:
|
|
1432
|
+
className: s("gryt-accordion-item", t),
|
|
1433
1433
|
...e
|
|
1434
1434
|
}
|
|
1435
1435
|
);
|
|
1436
1436
|
}
|
|
1437
|
-
),
|
|
1438
|
-
function({ children: t, className: e, expandIcon: r, ...
|
|
1439
|
-
return /* @__PURE__ */ o(
|
|
1440
|
-
|
|
1437
|
+
), yn = l(
|
|
1438
|
+
function({ children: t, className: e, expandIcon: r, ...a }, c) {
|
|
1439
|
+
return /* @__PURE__ */ o(fe.Header, { className: "gryt-accordion-header m-0", children: /* @__PURE__ */ u(
|
|
1440
|
+
fe.Trigger,
|
|
1441
1441
|
{
|
|
1442
1442
|
ref: c,
|
|
1443
|
-
className:
|
|
1443
|
+
className: s(
|
|
1444
1444
|
"gryt-accordion-trigger flex w-full cursor-pointer items-center justify-between gap-3",
|
|
1445
1445
|
"rounded-(--gryt-radius-lg) border-0 bg-transparent px-3 py-2.5",
|
|
1446
1446
|
"text-left text-sm font-medium text-gryt-text select-none",
|
|
1447
1447
|
"transition-colors duration-150 hover:bg-gryt-surface-raised",
|
|
1448
1448
|
"data-disabled:cursor-not-allowed data-disabled:opacity-50",
|
|
1449
|
-
|
|
1449
|
+
A,
|
|
1450
1450
|
e
|
|
1451
1451
|
),
|
|
1452
|
-
...
|
|
1452
|
+
...a,
|
|
1453
1453
|
children: [
|
|
1454
1454
|
t,
|
|
1455
1455
|
r === void 0 ? /* @__PURE__ */ o(
|
|
1456
|
-
|
|
1456
|
+
mr,
|
|
1457
1457
|
{
|
|
1458
1458
|
size: 16,
|
|
1459
1459
|
className: "shrink-0 transition-transform duration-(--gryt-dur-spring) ease-spring data-panel-open:rotate-180 motion-reduce:transition-none"
|
|
@@ -1463,13 +1463,13 @@ const Yo = {
|
|
|
1463
1463
|
}
|
|
1464
1464
|
) });
|
|
1465
1465
|
}
|
|
1466
|
-
),
|
|
1467
|
-
function({ children: t, className: e, ...r },
|
|
1466
|
+
), fn = l(
|
|
1467
|
+
function({ children: t, className: e, ...r }, a) {
|
|
1468
1468
|
return /* @__PURE__ */ o(
|
|
1469
|
-
|
|
1469
|
+
fe.Panel,
|
|
1470
1470
|
{
|
|
1471
|
-
ref:
|
|
1472
|
-
className:
|
|
1471
|
+
ref: a,
|
|
1472
|
+
className: s(
|
|
1473
1473
|
"gryt-accordion-panel overflow-hidden text-sm text-gryt-muted",
|
|
1474
1474
|
// Base UI measures the panel and exposes the height as a variable,
|
|
1475
1475
|
// which is what makes a real open and close transition possible.
|
|
@@ -1483,105 +1483,105 @@ const Yo = {
|
|
|
1483
1483
|
}
|
|
1484
1484
|
);
|
|
1485
1485
|
}
|
|
1486
|
-
),
|
|
1487
|
-
function({ className: t, sideOffset: e = 2, ...r },
|
|
1486
|
+
), Ja = Object.assign(mn, { Item: pn, Trigger: yn, Panel: fn }), hn = l(
|
|
1487
|
+
function({ className: t, sideOffset: e = 2, ...r }, a) {
|
|
1488
1488
|
return /* @__PURE__ */ o(
|
|
1489
|
-
|
|
1489
|
+
j.Positioner,
|
|
1490
1490
|
{
|
|
1491
|
-
ref:
|
|
1491
|
+
ref: a,
|
|
1492
1492
|
sideOffset: e,
|
|
1493
|
-
className:
|
|
1493
|
+
className: s("gryt-context-menu-positioner outline-none", t),
|
|
1494
1494
|
...r
|
|
1495
1495
|
}
|
|
1496
1496
|
);
|
|
1497
1497
|
}
|
|
1498
|
-
),
|
|
1499
|
-
Root:
|
|
1500
|
-
Trigger:
|
|
1501
|
-
Portal:
|
|
1502
|
-
Positioner:
|
|
1503
|
-
Popup:
|
|
1504
|
-
Item:
|
|
1505
|
-
Separator:
|
|
1506
|
-
Group:
|
|
1507
|
-
GroupLabel:
|
|
1508
|
-
SubmenuRoot:
|
|
1509
|
-
SubmenuTrigger:
|
|
1510
|
-
},
|
|
1511
|
-
function({ className: t, sideOffset: e = 8, ...r },
|
|
1498
|
+
), Qa = {
|
|
1499
|
+
Root: j.Root,
|
|
1500
|
+
Trigger: j.Trigger,
|
|
1501
|
+
Portal: j.Portal,
|
|
1502
|
+
Positioner: hn,
|
|
1503
|
+
Popup: Ge.Popup,
|
|
1504
|
+
Item: Ge.Item,
|
|
1505
|
+
Separator: Ge.Separator,
|
|
1506
|
+
Group: j.Group,
|
|
1507
|
+
GroupLabel: j.GroupLabel,
|
|
1508
|
+
SubmenuRoot: j.SubmenuRoot,
|
|
1509
|
+
SubmenuTrigger: j.SubmenuTrigger
|
|
1510
|
+
}, bn = l(
|
|
1511
|
+
function({ className: t, sideOffset: e = 8, ...r }, a) {
|
|
1512
1512
|
return /* @__PURE__ */ o(
|
|
1513
|
-
|
|
1513
|
+
B.Positioner,
|
|
1514
1514
|
{
|
|
1515
|
-
ref:
|
|
1515
|
+
ref: a,
|
|
1516
1516
|
sideOffset: e,
|
|
1517
|
-
className:
|
|
1517
|
+
className: s("gryt-popover-positioner outline-none", t),
|
|
1518
1518
|
...r
|
|
1519
1519
|
}
|
|
1520
1520
|
);
|
|
1521
1521
|
}
|
|
1522
|
-
),
|
|
1522
|
+
), xn = l(
|
|
1523
1523
|
function({ className: t, ...e }, r) {
|
|
1524
1524
|
return /* @__PURE__ */ o(
|
|
1525
|
-
|
|
1525
|
+
B.Popup,
|
|
1526
1526
|
{
|
|
1527
1527
|
ref: r,
|
|
1528
|
-
className:
|
|
1528
|
+
className: s(
|
|
1529
1529
|
"gryt-popover max-w-[min(20rem,calc(100vw-2rem))] p-4 outline-none",
|
|
1530
|
-
|
|
1531
|
-
|
|
1530
|
+
Z,
|
|
1531
|
+
Y,
|
|
1532
1532
|
t
|
|
1533
1533
|
),
|
|
1534
1534
|
...e
|
|
1535
1535
|
}
|
|
1536
1536
|
);
|
|
1537
1537
|
}
|
|
1538
|
-
),
|
|
1538
|
+
), vn = l(function({ className: t, ...e }, r) {
|
|
1539
1539
|
return /* @__PURE__ */ o(
|
|
1540
|
-
|
|
1540
|
+
B.Title,
|
|
1541
1541
|
{
|
|
1542
1542
|
ref: r,
|
|
1543
|
-
className:
|
|
1543
|
+
className: s(
|
|
1544
1544
|
"gryt-popover-title text-sm font-semibold text-gryt-text",
|
|
1545
1545
|
t
|
|
1546
1546
|
),
|
|
1547
1547
|
...e
|
|
1548
1548
|
}
|
|
1549
1549
|
);
|
|
1550
|
-
}),
|
|
1550
|
+
}), wn = l(function({ className: t, ...e }, r) {
|
|
1551
1551
|
return /* @__PURE__ */ o(
|
|
1552
|
-
|
|
1552
|
+
B.Description,
|
|
1553
1553
|
{
|
|
1554
1554
|
ref: r,
|
|
1555
|
-
className:
|
|
1555
|
+
className: s(
|
|
1556
1556
|
"gryt-popover-description mt-1 text-sm leading-6 text-gryt-muted",
|
|
1557
1557
|
t
|
|
1558
1558
|
),
|
|
1559
1559
|
...e
|
|
1560
1560
|
}
|
|
1561
1561
|
);
|
|
1562
|
-
}),
|
|
1563
|
-
Root:
|
|
1564
|
-
Trigger:
|
|
1565
|
-
Portal:
|
|
1566
|
-
Positioner:
|
|
1567
|
-
Popup:
|
|
1568
|
-
Title:
|
|
1569
|
-
Description:
|
|
1570
|
-
Close:
|
|
1571
|
-
Arrow:
|
|
1572
|
-
},
|
|
1562
|
+
}), Za = {
|
|
1563
|
+
Root: B.Root,
|
|
1564
|
+
Trigger: B.Trigger,
|
|
1565
|
+
Portal: B.Portal,
|
|
1566
|
+
Positioner: bn,
|
|
1567
|
+
Popup: xn,
|
|
1568
|
+
Title: vn,
|
|
1569
|
+
Description: wn,
|
|
1570
|
+
Close: B.Close,
|
|
1571
|
+
Arrow: B.Arrow
|
|
1572
|
+
}, Nn = {
|
|
1573
1573
|
neutral: "border-white/8 bg-gryt-surface",
|
|
1574
1574
|
info: "border-gryt-secondary-6 bg-gryt-secondary-2",
|
|
1575
1575
|
success: "border-gryt-success-6 bg-gryt-success-2",
|
|
1576
1576
|
warning: "border-gryt-warning-6 bg-gryt-warning-2",
|
|
1577
1577
|
danger: "border-gryt-danger-6 bg-gryt-danger-2"
|
|
1578
|
-
},
|
|
1578
|
+
}, Tn = l(
|
|
1579
1579
|
function({ className: t, ...e }, r) {
|
|
1580
1580
|
return /* @__PURE__ */ o(
|
|
1581
|
-
|
|
1581
|
+
E.Viewport,
|
|
1582
1582
|
{
|
|
1583
1583
|
ref: r,
|
|
1584
|
-
className:
|
|
1584
|
+
className: s(
|
|
1585
1585
|
"gryt-toast-viewport fixed right-4 bottom-4 z-50 flex w-[min(22rem,calc(100vw-2rem))]",
|
|
1586
1586
|
"flex-col gap-2 outline-none",
|
|
1587
1587
|
t
|
|
@@ -1590,12 +1590,12 @@ const Yo = {
|
|
|
1590
1590
|
}
|
|
1591
1591
|
);
|
|
1592
1592
|
}
|
|
1593
|
-
),
|
|
1593
|
+
), Sn = l(function({ className: t, severity: e = "neutral", ...r }, a) {
|
|
1594
1594
|
return /* @__PURE__ */ o(
|
|
1595
|
-
|
|
1595
|
+
E.Root,
|
|
1596
1596
|
{
|
|
1597
|
-
ref:
|
|
1598
|
-
className:
|
|
1597
|
+
ref: a,
|
|
1598
|
+
className: s(
|
|
1599
1599
|
"gryt-toast relative flex flex-col p-3 pr-9",
|
|
1600
1600
|
// Not popupSurface. That border is --gryt-border, a solid slate line
|
|
1601
1601
|
// that is right for a menu anchored to the thing that opened it and too
|
|
@@ -1603,7 +1603,7 @@ const Yo = {
|
|
|
1603
1603
|
// white hairline separates it from the page without drawing a box
|
|
1604
1604
|
// around it.
|
|
1605
1605
|
"rounded-(--gryt-radius-xl) border text-gryt-text",
|
|
1606
|
-
|
|
1606
|
+
Nn[e],
|
|
1607
1607
|
// Swiping is a pointer gesture, so the toast follows the finger
|
|
1608
1608
|
// through Base UI's swipe variables before it animates out.
|
|
1609
1609
|
"transition-[opacity,transform] duration-(--gryt-dur-spring) ease-spring",
|
|
@@ -1615,37 +1615,37 @@ const Yo = {
|
|
|
1615
1615
|
...r
|
|
1616
1616
|
}
|
|
1617
1617
|
);
|
|
1618
|
-
}),
|
|
1618
|
+
}), $n = l(function({ className: t, ...e }, r) {
|
|
1619
1619
|
return /* @__PURE__ */ o(
|
|
1620
|
-
|
|
1620
|
+
E.Title,
|
|
1621
1621
|
{
|
|
1622
1622
|
ref: r,
|
|
1623
|
-
className:
|
|
1623
|
+
className: s(
|
|
1624
1624
|
"gryt-toast-title text-sm font-semibold text-gryt-text",
|
|
1625
1625
|
t
|
|
1626
1626
|
),
|
|
1627
1627
|
...e
|
|
1628
1628
|
}
|
|
1629
1629
|
);
|
|
1630
|
-
}),
|
|
1630
|
+
}), kn = l(function({ className: t, ...e }, r) {
|
|
1631
1631
|
return /* @__PURE__ */ o(
|
|
1632
|
-
|
|
1632
|
+
E.Description,
|
|
1633
1633
|
{
|
|
1634
1634
|
ref: r,
|
|
1635
|
-
className:
|
|
1635
|
+
className: s(
|
|
1636
1636
|
"gryt-toast-description mt-0.5 text-sm leading-6 text-gryt-muted",
|
|
1637
1637
|
t
|
|
1638
1638
|
),
|
|
1639
1639
|
...e
|
|
1640
1640
|
}
|
|
1641
1641
|
);
|
|
1642
|
-
}),
|
|
1642
|
+
}), Pn = l(function({ className: t, children: e, ...r }, a) {
|
|
1643
1643
|
return /* @__PURE__ */ o(
|
|
1644
|
-
|
|
1644
|
+
E.Close,
|
|
1645
1645
|
{
|
|
1646
|
-
ref:
|
|
1646
|
+
ref: a,
|
|
1647
1647
|
"aria-label": "Close",
|
|
1648
|
-
className:
|
|
1648
|
+
className: s(
|
|
1649
1649
|
"gryt-toast-close absolute top-2.5 right-2.5 inline-flex h-6 w-6 items-center justify-center",
|
|
1650
1650
|
"rounded-(--gryt-radius-full) border-0 bg-transparent text-gryt-muted",
|
|
1651
1651
|
"transition-colors hover:bg-white/8 hover:text-gryt-text motion-reduce:transition-none",
|
|
@@ -1653,15 +1653,15 @@ const Yo = {
|
|
|
1653
1653
|
t
|
|
1654
1654
|
),
|
|
1655
1655
|
...r,
|
|
1656
|
-
children: e ?? /* @__PURE__ */ o(
|
|
1656
|
+
children: e ?? /* @__PURE__ */ o(Ue, { size: 14, weight: "bold" })
|
|
1657
1657
|
}
|
|
1658
1658
|
);
|
|
1659
|
-
}),
|
|
1659
|
+
}), Cn = l(function({ className: t, ...e }, r) {
|
|
1660
1660
|
return /* @__PURE__ */ o(
|
|
1661
|
-
|
|
1661
|
+
E.Action,
|
|
1662
1662
|
{
|
|
1663
1663
|
ref: r,
|
|
1664
|
-
className:
|
|
1664
|
+
className: s(
|
|
1665
1665
|
"gryt-toast-action mt-2 self-start rounded-(--gryt-radius-full) border-0",
|
|
1666
1666
|
"bg-gryt-accent px-3 py-1.5 text-sm font-medium text-gryt-on-accent",
|
|
1667
1667
|
"transition-[scale] duration-(--gryt-dur-spring) ease-spring",
|
|
@@ -1672,33 +1672,33 @@ const Yo = {
|
|
|
1672
1672
|
...e
|
|
1673
1673
|
}
|
|
1674
1674
|
);
|
|
1675
|
-
}),
|
|
1676
|
-
Provider:
|
|
1677
|
-
Portal:
|
|
1678
|
-
Viewport:
|
|
1679
|
-
Root:
|
|
1680
|
-
Title:
|
|
1681
|
-
Description:
|
|
1682
|
-
Close:
|
|
1683
|
-
Action:
|
|
1684
|
-
},
|
|
1675
|
+
}), qa = {
|
|
1676
|
+
Provider: E.Provider,
|
|
1677
|
+
Portal: E.Portal,
|
|
1678
|
+
Viewport: Tn,
|
|
1679
|
+
Root: Sn,
|
|
1680
|
+
Title: $n,
|
|
1681
|
+
Description: kn,
|
|
1682
|
+
Close: Pn,
|
|
1683
|
+
Action: Cn
|
|
1684
|
+
}, es = E.useToastManager, An = l(
|
|
1685
1685
|
function({ className: t, ...e }, r) {
|
|
1686
1686
|
return /* @__PURE__ */ o(
|
|
1687
|
-
|
|
1687
|
+
se.Root,
|
|
1688
1688
|
{
|
|
1689
1689
|
ref: r,
|
|
1690
|
-
className:
|
|
1690
|
+
className: s("gryt-scroll-area relative", t),
|
|
1691
1691
|
...e
|
|
1692
1692
|
}
|
|
1693
1693
|
);
|
|
1694
1694
|
}
|
|
1695
|
-
),
|
|
1695
|
+
), Mn = l(
|
|
1696
1696
|
function({ className: t, ...e }, r) {
|
|
1697
1697
|
return /* @__PURE__ */ o(
|
|
1698
|
-
|
|
1698
|
+
se.Viewport,
|
|
1699
1699
|
{
|
|
1700
1700
|
ref: r,
|
|
1701
|
-
className:
|
|
1701
|
+
className: s(
|
|
1702
1702
|
"gryt-scroll-area-viewport h-full w-full overscroll-contain",
|
|
1703
1703
|
"focus-visible:outline-2 focus-visible:-outline-offset-1 focus-visible:outline-gryt-accent-light",
|
|
1704
1704
|
t
|
|
@@ -1707,14 +1707,14 @@ const Yo = {
|
|
|
1707
1707
|
}
|
|
1708
1708
|
);
|
|
1709
1709
|
}
|
|
1710
|
-
),
|
|
1711
|
-
function({ className: t, orientation: e, ...r },
|
|
1710
|
+
), Rn = l(
|
|
1711
|
+
function({ className: t, orientation: e, ...r }, a) {
|
|
1712
1712
|
return /* @__PURE__ */ o(
|
|
1713
|
-
|
|
1713
|
+
se.Scrollbar,
|
|
1714
1714
|
{
|
|
1715
|
-
ref:
|
|
1715
|
+
ref: a,
|
|
1716
1716
|
orientation: e,
|
|
1717
|
-
className:
|
|
1717
|
+
className: s(
|
|
1718
1718
|
"gryt-scroll-area-scrollbar flex touch-none p-0.5 select-none",
|
|
1719
1719
|
// Fades in on hover or while scrolling rather than sitting there
|
|
1720
1720
|
// permanently — a chat sidebar is mostly not being scrolled.
|
|
@@ -1725,17 +1725,17 @@ const Yo = {
|
|
|
1725
1725
|
t
|
|
1726
1726
|
),
|
|
1727
1727
|
...r,
|
|
1728
|
-
children: /* @__PURE__ */ o(
|
|
1728
|
+
children: /* @__PURE__ */ o(se.Thumb, { className: "flex-1 rounded-(--gryt-radius-full) bg-gryt-border transition-colors hover:bg-gryt-muted motion-reduce:transition-none" })
|
|
1729
1729
|
}
|
|
1730
1730
|
);
|
|
1731
1731
|
}
|
|
1732
|
-
),
|
|
1733
|
-
Root:
|
|
1734
|
-
Viewport:
|
|
1735
|
-
Scrollbar:
|
|
1736
|
-
Content:
|
|
1737
|
-
Corner:
|
|
1738
|
-
},
|
|
1732
|
+
), ts = {
|
|
1733
|
+
Root: An,
|
|
1734
|
+
Viewport: Mn,
|
|
1735
|
+
Scrollbar: Rn,
|
|
1736
|
+
Content: se.Content,
|
|
1737
|
+
Corner: se.Corner
|
|
1738
|
+
}, In = {
|
|
1739
1739
|
primary: [
|
|
1740
1740
|
"text-gryt-muted hover:not-data-disabled:bg-white/8",
|
|
1741
1741
|
"data-pressed:bg-gryt-accent data-pressed:text-gryt-on-accent",
|
|
@@ -1756,18 +1756,18 @@ const Yo = {
|
|
|
1756
1756
|
"data-pressed:bg-gryt-danger data-pressed:text-gryt-on-danger",
|
|
1757
1757
|
"data-pressed:hover:not-data-disabled:bg-gryt-danger"
|
|
1758
1758
|
].join(" ")
|
|
1759
|
-
},
|
|
1759
|
+
}, Ln = {
|
|
1760
1760
|
xsmall: "h-8 min-w-8 px-2 text-xs",
|
|
1761
1761
|
small: "h-9 min-w-9 px-2.5 text-sm",
|
|
1762
1762
|
medium: "h-10 min-w-10 px-3 text-sm",
|
|
1763
1763
|
large: "h-12 min-w-12 px-4 text-base"
|
|
1764
|
-
},
|
|
1765
|
-
function({ className: t, size: e = "medium", tone: r = "primary", ...
|
|
1764
|
+
}, ct = l(
|
|
1765
|
+
function({ className: t, size: e = "medium", tone: r = "primary", ...a }, c) {
|
|
1766
1766
|
return /* @__PURE__ */ o(
|
|
1767
|
-
|
|
1767
|
+
wr,
|
|
1768
1768
|
{
|
|
1769
1769
|
ref: c,
|
|
1770
|
-
className:
|
|
1770
|
+
className: s(
|
|
1771
1771
|
"gryt-toggle",
|
|
1772
1772
|
"inline-flex shrink-0 items-center justify-center gap-2 border-0 bg-transparent",
|
|
1773
1773
|
"rounded-(--gryt-radius-full) font-medium select-none",
|
|
@@ -1775,23 +1775,23 @@ const Yo = {
|
|
|
1775
1775
|
"transition-[scale,background-color,color] duration-(--gryt-dur-spring) ease-spring",
|
|
1776
1776
|
"motion-safe:hover:not-data-disabled:scale-[1.06]",
|
|
1777
1777
|
"motion-safe:active:not-data-disabled:scale-[0.94]",
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1778
|
+
A,
|
|
1779
|
+
ie,
|
|
1780
|
+
Ln[e],
|
|
1781
|
+
In[r],
|
|
1782
1782
|
t
|
|
1783
1783
|
),
|
|
1784
|
-
...
|
|
1784
|
+
...a
|
|
1785
1785
|
}
|
|
1786
1786
|
);
|
|
1787
1787
|
}
|
|
1788
|
-
),
|
|
1788
|
+
), Dn = l(
|
|
1789
1789
|
function({ className: t, ...e }, r) {
|
|
1790
1790
|
return /* @__PURE__ */ o(
|
|
1791
|
-
|
|
1791
|
+
Nr,
|
|
1792
1792
|
{
|
|
1793
1793
|
ref: r,
|
|
1794
|
-
className:
|
|
1794
|
+
className: s(
|
|
1795
1795
|
"gryt-toggle-group inline-flex items-center gap-1",
|
|
1796
1796
|
"rounded-(--gryt-radius-full) border border-gryt-border bg-gryt-surface p-1",
|
|
1797
1797
|
t
|
|
@@ -1800,38 +1800,1210 @@ const Yo = {
|
|
|
1800
1800
|
}
|
|
1801
1801
|
);
|
|
1802
1802
|
}
|
|
1803
|
-
),
|
|
1803
|
+
), Rt = Wt, rs = Xt;
|
|
1804
|
+
function Ve(n, t) {
|
|
1805
|
+
return t === "light" && n.lightHue !== null ? "lightHue" : "hue";
|
|
1806
|
+
}
|
|
1807
|
+
const Se = Jt;
|
|
1808
|
+
function Gn(n) {
|
|
1809
|
+
return {
|
|
1810
|
+
hue: { ...n.hue },
|
|
1811
|
+
lightHue: n.lightHue === null ? null : { ...n.lightHue },
|
|
1812
|
+
dark: { ...n.dark },
|
|
1813
|
+
light: { ...n.light },
|
|
1814
|
+
radius: { ...n.radius }
|
|
1815
|
+
};
|
|
1816
|
+
}
|
|
1817
|
+
function Fn(n, t) {
|
|
1818
|
+
return { ...Se(n, t), ...n[t] };
|
|
1819
|
+
}
|
|
1820
|
+
function zn(n, t) {
|
|
1821
|
+
return xt(Kt(n, t));
|
|
1822
|
+
}
|
|
1823
|
+
function z(n, t) {
|
|
1824
|
+
const e = n;
|
|
1825
|
+
return Array.from(
|
|
1826
|
+
{ length: 12 },
|
|
1827
|
+
(r, a) => e[`--gryt-${t}-${a + 1}`]
|
|
1828
|
+
);
|
|
1829
|
+
}
|
|
1830
|
+
function dt(n) {
|
|
1831
|
+
return JSON.stringify(n);
|
|
1832
|
+
}
|
|
1833
|
+
const Fe = {
|
|
1834
|
+
accent: "Accent",
|
|
1835
|
+
accentLight: "Accent, light",
|
|
1836
|
+
secondary: "Secondary",
|
|
1837
|
+
secondaryLight: "Secondary, light",
|
|
1838
|
+
success: "Success",
|
|
1839
|
+
danger: "Danger",
|
|
1840
|
+
dangerLight: "Danger, light",
|
|
1841
|
+
warning: "Warning",
|
|
1842
|
+
onAccent: "Text on accent",
|
|
1843
|
+
onSecondary: "Text on secondary",
|
|
1844
|
+
onDanger: "Text on danger"
|
|
1845
|
+
}, ut = {
|
|
1846
|
+
bg: "Page",
|
|
1847
|
+
surface: "Surface",
|
|
1848
|
+
surfaceRaised: "Raised surface",
|
|
1849
|
+
surfaceHover: "Surface, hovered",
|
|
1850
|
+
border: "Border",
|
|
1851
|
+
muted: "Muted text",
|
|
1852
|
+
text: "Text"
|
|
1853
|
+
}, gt = {
|
|
1854
|
+
sm: "Small",
|
|
1855
|
+
md: "Medium",
|
|
1856
|
+
lg: "Large",
|
|
1857
|
+
xl: "Extra large",
|
|
1858
|
+
full: "Full"
|
|
1859
|
+
}, Bn = {
|
|
1860
|
+
sm: "Chips, swatches, small insets",
|
|
1861
|
+
md: "Menu rows, list items",
|
|
1862
|
+
lg: "Cards and panels",
|
|
1863
|
+
xl: "Dialogs, composers, bubbles",
|
|
1864
|
+
full: "Buttons, fields, avatars"
|
|
1865
|
+
};
|
|
1866
|
+
function de({
|
|
1867
|
+
label: n,
|
|
1868
|
+
value: t,
|
|
1869
|
+
onChange: e,
|
|
1870
|
+
warning: r,
|
|
1871
|
+
disabled: a = !1
|
|
1872
|
+
}) {
|
|
1873
|
+
const c = Ut(), [d, p] = G(t), [m, y] = G(t);
|
|
1874
|
+
t !== m && (y(t), p(t));
|
|
1875
|
+
function f(h) {
|
|
1876
|
+
p(h), Qt(h) && e(ye(h));
|
|
1877
|
+
}
|
|
1878
|
+
return /* @__PURE__ */ u("div", { className: "min-w-0", children: [
|
|
1879
|
+
/* @__PURE__ */ u(
|
|
1880
|
+
"span",
|
|
1881
|
+
{
|
|
1882
|
+
className: "mb-1 flex items-center gap-1.5 text-xs font-medium text-gryt-muted",
|
|
1883
|
+
id: `${c}-label`,
|
|
1884
|
+
children: [
|
|
1885
|
+
/* @__PURE__ */ o("span", { className: "truncate", children: n }),
|
|
1886
|
+
r ? /* @__PURE__ */ o("span", { className: "inline-flex shrink-0 text-gryt-warning-11", title: r, children: /* @__PURE__ */ o(Nt, { "aria-label": r, size: 13 }) }) : null
|
|
1887
|
+
]
|
|
1888
|
+
}
|
|
1889
|
+
),
|
|
1890
|
+
/* @__PURE__ */ u("span", { className: "flex items-center gap-2", children: [
|
|
1891
|
+
/* @__PURE__ */ o(
|
|
1892
|
+
"input",
|
|
1893
|
+
{
|
|
1894
|
+
"aria-label": `${n}, colour picker`,
|
|
1895
|
+
className: "docs-swatch disabled:cursor-not-allowed disabled:opacity-60",
|
|
1896
|
+
disabled: a,
|
|
1897
|
+
onChange: (h) => f(h.target.value),
|
|
1898
|
+
type: "color",
|
|
1899
|
+
value: ye(t)
|
|
1900
|
+
}
|
|
1901
|
+
),
|
|
1902
|
+
/* @__PURE__ */ o(
|
|
1903
|
+
Ke,
|
|
1904
|
+
{
|
|
1905
|
+
"aria-label": `${n}, hex value`,
|
|
1906
|
+
className: "font-mono",
|
|
1907
|
+
disabled: a,
|
|
1908
|
+
onBlur: () => p(t),
|
|
1909
|
+
onChange: (h) => f(h.target.value),
|
|
1910
|
+
size: "small",
|
|
1911
|
+
spellCheck: !1,
|
|
1912
|
+
value: d
|
|
1913
|
+
}
|
|
1914
|
+
)
|
|
1915
|
+
] })
|
|
1916
|
+
] });
|
|
1917
|
+
}
|
|
1918
|
+
const ee = "ui-sans-serif, system-ui, sans-serif", ze = "ui-serif, Georgia, serif", ve = "ui-monospace, Menlo, Consolas, monospace", Ye = [
|
|
1919
|
+
{
|
|
1920
|
+
label: "Atkinson Hyperlegible",
|
|
1921
|
+
stack: `"Atkinson Hyperlegible Next", ${ee}`,
|
|
1922
|
+
remote: !1,
|
|
1923
|
+
note: "What Gryt ships. Drawn so letterforms cannot be confused."
|
|
1924
|
+
},
|
|
1925
|
+
{
|
|
1926
|
+
label: "System",
|
|
1927
|
+
stack: ee,
|
|
1928
|
+
remote: !1,
|
|
1929
|
+
note: "Whatever this machine uses. Nothing to load."
|
|
1930
|
+
},
|
|
1931
|
+
{
|
|
1932
|
+
label: "System serif",
|
|
1933
|
+
stack: ze,
|
|
1934
|
+
remote: !1,
|
|
1935
|
+
note: "The machine's serif. Nothing to load."
|
|
1936
|
+
},
|
|
1937
|
+
{
|
|
1938
|
+
label: "Atkinson Hyperlegible Mono",
|
|
1939
|
+
stack: `"Atkinson Hyperlegible Mono", ${ve}`,
|
|
1940
|
+
remote: !1,
|
|
1941
|
+
note: "The monospace Gryt ships."
|
|
1942
|
+
},
|
|
1943
|
+
{
|
|
1944
|
+
label: "System mono",
|
|
1945
|
+
stack: ve,
|
|
1946
|
+
remote: !1,
|
|
1947
|
+
note: "The machine's monospace. Nothing to load."
|
|
1948
|
+
},
|
|
1949
|
+
{
|
|
1950
|
+
label: "Inter",
|
|
1951
|
+
stack: `"Inter", ${ee}`,
|
|
1952
|
+
remote: !0,
|
|
1953
|
+
note: "The default interface grotesque. Neutral to a fault."
|
|
1954
|
+
},
|
|
1955
|
+
{
|
|
1956
|
+
label: "Geist",
|
|
1957
|
+
stack: `"Geist", ${ee}`,
|
|
1958
|
+
remote: !0,
|
|
1959
|
+
note: "Vercel's. What shadcn/ui is set in."
|
|
1960
|
+
},
|
|
1961
|
+
{
|
|
1962
|
+
label: "IBM Plex Sans",
|
|
1963
|
+
stack: `"IBM Plex Sans", ${ee}`,
|
|
1964
|
+
remote: !0,
|
|
1965
|
+
note: "Technical and a little cold, with a real mono to match."
|
|
1966
|
+
},
|
|
1967
|
+
{
|
|
1968
|
+
label: "Archivo",
|
|
1969
|
+
stack: `"Archivo", ${ee}`,
|
|
1970
|
+
remote: !0,
|
|
1971
|
+
note: "Grotesque with weight. Good for headings that carry."
|
|
1972
|
+
},
|
|
1973
|
+
{
|
|
1974
|
+
label: "Fraunces",
|
|
1975
|
+
stack: `"Fraunces", ${ze}`,
|
|
1976
|
+
remote: !0,
|
|
1977
|
+
note: "A serif with opinions. Headings rather than body."
|
|
1978
|
+
},
|
|
1979
|
+
{
|
|
1980
|
+
label: "Source Serif 4",
|
|
1981
|
+
stack: `"Source Serif 4", ${ze}`,
|
|
1982
|
+
remote: !0,
|
|
1983
|
+
note: "A serif you can read a paragraph in."
|
|
1984
|
+
},
|
|
1985
|
+
{
|
|
1986
|
+
label: "JetBrains Mono",
|
|
1987
|
+
stack: `"JetBrains Mono", ${ve}`,
|
|
1988
|
+
remote: !0,
|
|
1989
|
+
note: "Monospace with a tall x-height. Made for code."
|
|
1990
|
+
},
|
|
1991
|
+
{
|
|
1992
|
+
label: "IBM Plex Mono",
|
|
1993
|
+
stack: `"IBM Plex Mono", ${ve}`,
|
|
1994
|
+
remote: !0,
|
|
1995
|
+
note: "The mono beside IBM Plex Sans."
|
|
1996
|
+
}
|
|
1997
|
+
], En = {
|
|
1998
|
+
body: "Body",
|
|
1999
|
+
display: "Headings",
|
|
2000
|
+
mono: "Code and numbers"
|
|
2001
|
+
}, _n = {
|
|
2002
|
+
body: "Messages, labels, everything you read.",
|
|
2003
|
+
display: "Headings and titles. Defaults to the body face.",
|
|
2004
|
+
mono: "Code, hex values, timestamps, fingerprints."
|
|
2005
|
+
};
|
|
2006
|
+
function Hn(n) {
|
|
2007
|
+
return Ye.find((t) => t.stack === n);
|
|
2008
|
+
}
|
|
2009
|
+
function jn(n) {
|
|
2010
|
+
return (n.split(",")[0]?.trim() ?? "").replace(/^["']|["']$/g, "");
|
|
2011
|
+
}
|
|
2012
|
+
const Be = "custom";
|
|
2013
|
+
function On({
|
|
2014
|
+
role: n,
|
|
2015
|
+
fonts: t,
|
|
2016
|
+
onChange: e,
|
|
2017
|
+
remoteAllowed: r = !0
|
|
2018
|
+
}) {
|
|
2019
|
+
const a = t?.[n] ?? vt[n], c = Hn(a), [d, p] = G(
|
|
2020
|
+
() => c === void 0 ? jn(a) : ""
|
|
2021
|
+
), m = n === "mono" ? "ui-monospace, Menlo, Consolas, monospace" : "ui-sans-serif, system-ui, sans-serif";
|
|
2022
|
+
function y(b) {
|
|
2023
|
+
if (b === Be) {
|
|
2024
|
+
const v = d.trim();
|
|
2025
|
+
v !== "" && f(v);
|
|
2026
|
+
return;
|
|
2027
|
+
}
|
|
2028
|
+
const x = Ye.find((v) => v.label === b);
|
|
2029
|
+
x !== void 0 && e(x.stack);
|
|
2030
|
+
}
|
|
2031
|
+
function f(b) {
|
|
2032
|
+
const x = `"${b}", ${m}`;
|
|
2033
|
+
Zt(x) && e(x);
|
|
2034
|
+
}
|
|
2035
|
+
const h = c?.remote === !0 && !r;
|
|
2036
|
+
return /* @__PURE__ */ u("div", { className: "min-w-0 flex flex-col gap-1.5", children: [
|
|
2037
|
+
/* @__PURE__ */ o(
|
|
2038
|
+
Je,
|
|
2039
|
+
{
|
|
2040
|
+
label: En[n],
|
|
2041
|
+
onValueChange: (b) => y(String(b)),
|
|
2042
|
+
options: [
|
|
2043
|
+
...Ye.map((b) => ({
|
|
2044
|
+
label: b.remote ? `${b.label} · fetched` : b.label,
|
|
2045
|
+
value: b.label
|
|
2046
|
+
})),
|
|
2047
|
+
{ label: "Something else…", value: Be }
|
|
2048
|
+
],
|
|
2049
|
+
size: "small",
|
|
2050
|
+
value: c?.label ?? Be
|
|
2051
|
+
}
|
|
2052
|
+
),
|
|
2053
|
+
c === void 0 ? /* @__PURE__ */ o(
|
|
2054
|
+
Ke,
|
|
2055
|
+
{
|
|
2056
|
+
label: "Family name",
|
|
2057
|
+
onChange: (b) => {
|
|
2058
|
+
p(b.target.value);
|
|
2059
|
+
const x = b.target.value.trim();
|
|
2060
|
+
x !== "" && f(x);
|
|
2061
|
+
},
|
|
2062
|
+
placeholder: "Bodoni Moda",
|
|
2063
|
+
size: "small",
|
|
2064
|
+
value: d
|
|
2065
|
+
}
|
|
2066
|
+
) : null,
|
|
2067
|
+
/* @__PURE__ */ o("p", { className: "m-0 text-[11px] leading-4 text-gryt-muted", children: c?.note ?? _n[n] }),
|
|
2068
|
+
h ? /* @__PURE__ */ o("p", { className: "m-0 text-[11px] leading-4 text-gryt-warning-11", children: "This one is fetched from Google, which is off on this machine. It will fall back until you turn it on." }) : null,
|
|
2069
|
+
/* @__PURE__ */ o(
|
|
2070
|
+
"p",
|
|
2071
|
+
{
|
|
2072
|
+
className: "m-0 truncate text-sm text-gryt-text",
|
|
2073
|
+
style: { fontFamily: a },
|
|
2074
|
+
children: "The quick brown fox — 0123456789"
|
|
2075
|
+
}
|
|
2076
|
+
)
|
|
2077
|
+
] });
|
|
2078
|
+
}
|
|
2079
|
+
const mt = 0.45, _ = { min: -mt, size: 1 + mt * 2 };
|
|
2080
|
+
function pt({
|
|
2081
|
+
value: n,
|
|
2082
|
+
onChange: t,
|
|
2083
|
+
reference: e,
|
|
2084
|
+
samples: r
|
|
2085
|
+
}) {
|
|
2086
|
+
const a = r !== void 0, c = ke(null), [d, p] = G(null), [m, y, f, h] = n, b = pe((w, $) => {
|
|
2087
|
+
const M = c.current?.getBoundingClientRect();
|
|
2088
|
+
if (M === void 0 || M.width === 0) return null;
|
|
2089
|
+
const F = _.min + (w - M.left) / M.width * _.size, q = _.min + (M.bottom - $) / M.height * _.size;
|
|
2090
|
+
return { x: F, y: q };
|
|
2091
|
+
}, []), x = pe(
|
|
2092
|
+
(w) => {
|
|
2093
|
+
if (d === null) return;
|
|
2094
|
+
const $ = b(w.clientX, w.clientY);
|
|
2095
|
+
if ($ === null) return;
|
|
2096
|
+
const M = Math.min(1, Math.max(0, Number($.x.toFixed(3)))), F = Number($.y.toFixed(3));
|
|
2097
|
+
t(
|
|
2098
|
+
d === 0 ? [M, F, f, h] : [m, y, M, F]
|
|
2099
|
+
);
|
|
2100
|
+
},
|
|
2101
|
+
[d, t, b, m, y, f, h]
|
|
2102
|
+
), v = (w) => w, N = (w) => 1 - w, k = `M 0 ${N(0)} C ${v(m)} ${N(y)}, ${v(f)} ${N(h)}, 1 ${N(1)}`;
|
|
2103
|
+
return /* @__PURE__ */ u(
|
|
2104
|
+
"svg",
|
|
2105
|
+
{
|
|
2106
|
+
className: "w-full touch-none rounded-(--gryt-radius-sm) border border-gryt-border bg-gryt-surface-raised",
|
|
2107
|
+
onPointerDown: (w) => {
|
|
2108
|
+
if (a) return;
|
|
2109
|
+
const $ = b(w.clientX, w.clientY);
|
|
2110
|
+
if ($ === null) return;
|
|
2111
|
+
const M = (F, q) => ($.x - F) ** 2 + ($.y - q) ** 2;
|
|
2112
|
+
p(M(m, y) <= M(f, h) ? 0 : 1), w.currentTarget.setPointerCapture(w.pointerId);
|
|
2113
|
+
},
|
|
2114
|
+
onPointerMove: x,
|
|
2115
|
+
onPointerUp: (w) => {
|
|
2116
|
+
p(null), w.currentTarget.releasePointerCapture(w.pointerId);
|
|
2117
|
+
},
|
|
2118
|
+
preserveAspectRatio: "none",
|
|
2119
|
+
ref: c,
|
|
2120
|
+
role: a ? "img" : "application",
|
|
2121
|
+
"aria-label": "Timing curve",
|
|
2122
|
+
style: { height: 132 },
|
|
2123
|
+
viewBox: `${_.min} ${_.min} ${_.size} ${_.size}`,
|
|
2124
|
+
children: [
|
|
2125
|
+
/* @__PURE__ */ o(
|
|
2126
|
+
"rect",
|
|
2127
|
+
{
|
|
2128
|
+
fill: "none",
|
|
2129
|
+
height: 1,
|
|
2130
|
+
stroke: "var(--gryt-border)",
|
|
2131
|
+
strokeWidth: 4e-3,
|
|
2132
|
+
width: 1,
|
|
2133
|
+
x: 0,
|
|
2134
|
+
y: 0
|
|
2135
|
+
}
|
|
2136
|
+
),
|
|
2137
|
+
e !== void 0 ? /* @__PURE__ */ o(
|
|
2138
|
+
"polyline",
|
|
2139
|
+
{
|
|
2140
|
+
fill: "none",
|
|
2141
|
+
opacity: 0.35,
|
|
2142
|
+
points: e.map((w, $) => `${$ / (e.length - 1)},${N(w)}`).join(" "),
|
|
2143
|
+
stroke: "var(--gryt-muted)",
|
|
2144
|
+
strokeWidth: 8e-3
|
|
2145
|
+
}
|
|
2146
|
+
) : null,
|
|
2147
|
+
a ? /* @__PURE__ */ o(
|
|
2148
|
+
"polyline",
|
|
2149
|
+
{
|
|
2150
|
+
fill: "none",
|
|
2151
|
+
points: r.map((w, $) => `${$ / (r.length - 1)},${N(w)}`).join(" "),
|
|
2152
|
+
stroke: "var(--gryt-accent)",
|
|
2153
|
+
strokeWidth: 0.014
|
|
2154
|
+
}
|
|
2155
|
+
) : /* @__PURE__ */ u(jt, { children: [
|
|
2156
|
+
/* @__PURE__ */ o(
|
|
2157
|
+
"line",
|
|
2158
|
+
{
|
|
2159
|
+
stroke: "var(--gryt-muted)",
|
|
2160
|
+
strokeWidth: 5e-3,
|
|
2161
|
+
x1: 0,
|
|
2162
|
+
x2: v(m),
|
|
2163
|
+
y1: N(0),
|
|
2164
|
+
y2: N(y)
|
|
2165
|
+
}
|
|
2166
|
+
),
|
|
2167
|
+
/* @__PURE__ */ o(
|
|
2168
|
+
"line",
|
|
2169
|
+
{
|
|
2170
|
+
stroke: "var(--gryt-muted)",
|
|
2171
|
+
strokeWidth: 5e-3,
|
|
2172
|
+
x1: 1,
|
|
2173
|
+
x2: v(f),
|
|
2174
|
+
y1: N(1),
|
|
2175
|
+
y2: N(h)
|
|
2176
|
+
}
|
|
2177
|
+
),
|
|
2178
|
+
/* @__PURE__ */ o(
|
|
2179
|
+
"path",
|
|
2180
|
+
{
|
|
2181
|
+
d: k,
|
|
2182
|
+
fill: "none",
|
|
2183
|
+
stroke: "var(--gryt-accent)",
|
|
2184
|
+
strokeWidth: 0.014
|
|
2185
|
+
}
|
|
2186
|
+
),
|
|
2187
|
+
/* @__PURE__ */ o(
|
|
2188
|
+
"circle",
|
|
2189
|
+
{
|
|
2190
|
+
cx: v(m),
|
|
2191
|
+
cy: N(y),
|
|
2192
|
+
fill: "var(--gryt-accent)",
|
|
2193
|
+
r: d === 0 ? 0.035 : 0.026
|
|
2194
|
+
}
|
|
2195
|
+
),
|
|
2196
|
+
/* @__PURE__ */ o(
|
|
2197
|
+
"circle",
|
|
2198
|
+
{
|
|
2199
|
+
cx: v(f),
|
|
2200
|
+
cy: N(h),
|
|
2201
|
+
fill: "var(--gryt-accent)",
|
|
2202
|
+
r: d === 1 ? 0.035 : 0.026
|
|
2203
|
+
}
|
|
2204
|
+
)
|
|
2205
|
+
] })
|
|
2206
|
+
]
|
|
2207
|
+
}
|
|
2208
|
+
);
|
|
2209
|
+
}
|
|
2210
|
+
const Ee = "custom", Vn = [0.22, 1, 0.36, 1];
|
|
2211
|
+
function Yn({ motion: n, onChange: t }) {
|
|
2212
|
+
const e = n ?? er, r = qt(e.curve) ? e.curve : null, [a, c] = G(
|
|
2213
|
+
r ?? Vn
|
|
2214
|
+
);
|
|
2215
|
+
function d(m) {
|
|
2216
|
+
t({ ...e, curve: m });
|
|
2217
|
+
}
|
|
2218
|
+
const p = e.scale === 0;
|
|
2219
|
+
return /* @__PURE__ */ u("div", { className: "flex min-w-0 flex-col gap-3", children: [
|
|
2220
|
+
/* @__PURE__ */ u("div", { className: "min-w-0", children: [
|
|
2221
|
+
/* @__PURE__ */ u("div", { className: "mb-1 flex items-baseline justify-between gap-2", children: [
|
|
2222
|
+
/* @__PURE__ */ o("span", { className: "text-xs font-medium text-gryt-muted", children: "Speed" }),
|
|
2223
|
+
/* @__PURE__ */ o("span", { className: "font-mono text-[11px] text-gryt-muted", children: p ? "off" : `${e.scale.toFixed(2)}× · ${Math.round(
|
|
2224
|
+
qe.spring * e.scale
|
|
2225
|
+
)}ms` })
|
|
2226
|
+
] }),
|
|
2227
|
+
/* @__PURE__ */ o(
|
|
2228
|
+
At,
|
|
2229
|
+
{
|
|
2230
|
+
"aria-label": "Animation speed",
|
|
2231
|
+
max: tr,
|
|
2232
|
+
min: 0,
|
|
2233
|
+
onValueChange: (m) => t({ ...e, scale: Number(Number(m).toFixed(2)) }),
|
|
2234
|
+
step: 0.05,
|
|
2235
|
+
value: e.scale
|
|
2236
|
+
}
|
|
2237
|
+
),
|
|
2238
|
+
/* @__PURE__ */ o("p", { className: "m-0 pt-1 text-[11px] leading-4 text-gryt-muted", children: p ? "Nothing animates. A real choice, not a broken one — some people find movement unpleasant." : "One multiplier over every tier, so a drawer stays slower than a button." })
|
|
2239
|
+
] }),
|
|
2240
|
+
/* @__PURE__ */ o("div", { className: "min-w-0", children: /* @__PURE__ */ o(
|
|
2241
|
+
Je,
|
|
2242
|
+
{
|
|
2243
|
+
label: "Curve",
|
|
2244
|
+
onValueChange: (m) => {
|
|
2245
|
+
const y = String(m);
|
|
2246
|
+
d(y === Ee ? a : y);
|
|
2247
|
+
},
|
|
2248
|
+
options: [
|
|
2249
|
+
{ label: "Spring — overshoots and settles", value: "spring" },
|
|
2250
|
+
{ label: "Smooth — settles without passing", value: "smooth" },
|
|
2251
|
+
{ label: "Linear — no easing at all", value: "linear" },
|
|
2252
|
+
{ label: "Draw one…", value: Ee }
|
|
2253
|
+
],
|
|
2254
|
+
size: "small",
|
|
2255
|
+
value: r === null ? e.curve : Ee
|
|
2256
|
+
}
|
|
2257
|
+
) }),
|
|
2258
|
+
r !== null ? /* @__PURE__ */ u("div", { className: "flex min-w-0 flex-col gap-1.5", children: [
|
|
2259
|
+
/* @__PURE__ */ o(
|
|
2260
|
+
pt,
|
|
2261
|
+
{
|
|
2262
|
+
onChange: (m) => {
|
|
2263
|
+
c(m), d(m);
|
|
2264
|
+
},
|
|
2265
|
+
reference: et,
|
|
2266
|
+
value: r
|
|
2267
|
+
}
|
|
2268
|
+
),
|
|
2269
|
+
/* @__PURE__ */ u("p", { className: "m-0 font-mono text-[11px] text-gryt-muted", children: [
|
|
2270
|
+
"cubic-bezier(",
|
|
2271
|
+
r.join(", "),
|
|
2272
|
+
")"
|
|
2273
|
+
] }),
|
|
2274
|
+
/* @__PURE__ */ o("p", { className: "m-0 text-[11px] leading-4 text-gryt-muted", children: "The faint line is the shipped spring, to compare against. Anything drawn above the box overshoots — fine on a button, and it throws a drawer outside its own edge, because one curve now does both jobs." })
|
|
2275
|
+
] }) : /* @__PURE__ */ o(
|
|
2276
|
+
pt,
|
|
2277
|
+
{
|
|
2278
|
+
onChange: d,
|
|
2279
|
+
samples: e.curve === "smooth" ? rr : e.curve === "linear" ? [0, 1] : et,
|
|
2280
|
+
value: a
|
|
2281
|
+
}
|
|
2282
|
+
),
|
|
2283
|
+
/* @__PURE__ */ u("div", { className: "min-w-0", children: [
|
|
2284
|
+
/* @__PURE__ */ o("span", { className: "text-xs font-medium text-gryt-muted", children: "Preview" }),
|
|
2285
|
+
/* @__PURE__ */ o("div", { className: "mt-1 overflow-hidden rounded-(--gryt-radius-sm) border border-gryt-border bg-gryt-surface-raised p-2", children: /* @__PURE__ */ o(
|
|
2286
|
+
"div",
|
|
2287
|
+
{
|
|
2288
|
+
className: "h-4 w-4 rounded-(--gryt-radius-sm) bg-gryt-accent",
|
|
2289
|
+
style: {
|
|
2290
|
+
animation: p ? "none" : `gryt-motion-preview ${Math.round(
|
|
2291
|
+
qe.springSoft * e.scale
|
|
2292
|
+
)}ms var(--ease-spring) infinite alternate`
|
|
2293
|
+
}
|
|
2294
|
+
},
|
|
2295
|
+
`${e.scale}-${String(e.curve)}`
|
|
2296
|
+
) })
|
|
2297
|
+
] })
|
|
2298
|
+
] });
|
|
2299
|
+
}
|
|
2300
|
+
const Un = {
|
|
2301
|
+
pass: Xe,
|
|
2302
|
+
tight: Nt,
|
|
2303
|
+
fail: Ue
|
|
2304
|
+
}, yt = {
|
|
2305
|
+
pass: "text-gryt-success-11",
|
|
2306
|
+
tight: "text-gryt-warning-11",
|
|
2307
|
+
fail: "text-gryt-danger-11"
|
|
2308
|
+
};
|
|
2309
|
+
function Xn({ checks: n, onRepair: t }) {
|
|
2310
|
+
const e = n.filter(
|
|
2311
|
+
(r) => !r.advisory && r.level === "fail"
|
|
2312
|
+
).length;
|
|
2313
|
+
return /* @__PURE__ */ u("section", { className: "min-w-0", children: [
|
|
2314
|
+
/* @__PURE__ */ u("header", { className: "flex items-center justify-between gap-2 pb-2", children: [
|
|
2315
|
+
/* @__PURE__ */ o("h2", { className: "m-0 text-[11px] font-semibold uppercase tracking-wider text-gryt-muted", children: "Contrast" }),
|
|
2316
|
+
e > 0 ? /* @__PURE__ */ u("span", { className: "text-xs text-gryt-danger-11", children: [
|
|
2317
|
+
e,
|
|
2318
|
+
" of ",
|
|
2319
|
+
n.length
|
|
2320
|
+
] }) : /* @__PURE__ */ u("span", { className: "text-xs text-gryt-muted", children: [
|
|
2321
|
+
n.length,
|
|
2322
|
+
" checks pass"
|
|
2323
|
+
] })
|
|
2324
|
+
] }),
|
|
2325
|
+
/* @__PURE__ */ o("ul", { className: "m-0 list-none space-y-1 p-0", children: n.map((r) => {
|
|
2326
|
+
const a = r.advisory && r.level === "fail" ? "tight" : r.level, c = Un[a];
|
|
2327
|
+
return /* @__PURE__ */ u(
|
|
2328
|
+
"li",
|
|
2329
|
+
{
|
|
2330
|
+
className: "flex items-center justify-between gap-2 text-xs",
|
|
2331
|
+
children: [
|
|
2332
|
+
/* @__PURE__ */ u("span", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
2333
|
+
/* @__PURE__ */ o(c, { "aria-hidden": "true", className: yt[a], size: 12 }),
|
|
2334
|
+
/* @__PURE__ */ o("span", { className: "truncate text-gryt-muted", children: r.label })
|
|
2335
|
+
] }),
|
|
2336
|
+
/* @__PURE__ */ u("span", { className: "shrink-0 font-mono text-[11px] text-gryt-muted", children: [
|
|
2337
|
+
/* @__PURE__ */ o("span", { className: a === "pass" ? "text-gryt-text" : yt[a], children: r.ratio.toFixed(1) }),
|
|
2338
|
+
/* @__PURE__ */ u("span", { "aria-hidden": "true", children: [
|
|
2339
|
+
" / ",
|
|
2340
|
+
r.min
|
|
2341
|
+
] }),
|
|
2342
|
+
/* @__PURE__ */ u("span", { className: "sr-only", children: [
|
|
2343
|
+
" against a minimum of ",
|
|
2344
|
+
r.min
|
|
2345
|
+
] }),
|
|
2346
|
+
!r.advisory && r.ratio >= 7 ? /* @__PURE__ */ o("span", { className: "pl-1.5 text-[10px] text-gryt-success-11", children: "AAA" }) : null
|
|
2347
|
+
] })
|
|
2348
|
+
]
|
|
2349
|
+
},
|
|
2350
|
+
r.id
|
|
2351
|
+
);
|
|
2352
|
+
}) }),
|
|
2353
|
+
t ? /* @__PURE__ */ o("div", { className: "pt-3", children: /* @__PURE__ */ o(Te, { onClick: t, size: "small", tone: "neutral", children: "Fix the text colours" }) }) : null
|
|
2354
|
+
] });
|
|
2355
|
+
}
|
|
2356
|
+
function te({ label: n, steps: t }) {
|
|
2357
|
+
return /* @__PURE__ */ u("div", { className: "min-w-0", children: [
|
|
2358
|
+
/* @__PURE__ */ o("span", { className: "mb-1 block text-[11px] font-medium tracking-wide text-gryt-muted", children: n }),
|
|
2359
|
+
/* @__PURE__ */ o("ol", { className: "m-0 flex list-none gap-px overflow-hidden rounded-(--gryt-radius-sm) border border-gryt-border p-0", children: t.map((e, r) => /* @__PURE__ */ o(
|
|
2360
|
+
"li",
|
|
2361
|
+
{
|
|
2362
|
+
className: "h-6 min-w-0 flex-1",
|
|
2363
|
+
style: { backgroundColor: e },
|
|
2364
|
+
title: `${n} ${r + 1} · ${e}`
|
|
2365
|
+
},
|
|
2366
|
+
`${n}-${r}`
|
|
2367
|
+
)) })
|
|
2368
|
+
] });
|
|
2369
|
+
}
|
|
2370
|
+
const Wn = [
|
|
2371
|
+
{ family: "accent", label: "Accent" },
|
|
2372
|
+
{ family: "secondary", label: "Secondary" },
|
|
2373
|
+
{ family: "success", label: "Success" },
|
|
2374
|
+
{ family: "danger", label: "Danger" },
|
|
2375
|
+
{ family: "warning", label: "Warning" }
|
|
2376
|
+
];
|
|
2377
|
+
function Kn(n, t) {
|
|
2378
|
+
return n < t ? "fail" : n < t * 1.1 ? "tight" : "pass";
|
|
2379
|
+
}
|
|
2380
|
+
function W(n, t, e, r, a, c, d = !1) {
|
|
2381
|
+
const p = ae(e, r);
|
|
2382
|
+
return {
|
|
2383
|
+
id: n,
|
|
2384
|
+
label: t,
|
|
2385
|
+
foreground: e,
|
|
2386
|
+
background: r,
|
|
2387
|
+
ratio: p,
|
|
2388
|
+
min: a,
|
|
2389
|
+
level: Kn(p, a),
|
|
2390
|
+
advisory: d,
|
|
2391
|
+
paths: c
|
|
2392
|
+
};
|
|
2393
|
+
}
|
|
2394
|
+
function Jn(n, t, e) {
|
|
2395
|
+
const r = z(t, "neutral"), a = r[0], c = r[1], d = r[11], p = r[10], m = r[5], y = e, f = Ve(n, e), h = Se(n, e), b = [
|
|
2396
|
+
W("text-page", "Text on the page", d, a, 4.5, [
|
|
2397
|
+
`${y}.text`,
|
|
2398
|
+
`${y}.bg`
|
|
2399
|
+
]),
|
|
2400
|
+
W("text-surface", "Text on a surface", d, c, 4.5, [
|
|
2401
|
+
`${y}.text`,
|
|
2402
|
+
`${y}.surface`
|
|
2403
|
+
]),
|
|
2404
|
+
W("muted-page", "Muted text on the page", p, a, 4.5, [
|
|
2405
|
+
`${y}.muted`,
|
|
2406
|
+
`${y}.bg`
|
|
2407
|
+
]),
|
|
2408
|
+
W("muted-surface", "Muted text on a surface", p, c, 4.5, [
|
|
2409
|
+
`${y}.muted`,
|
|
2410
|
+
`${y}.surface`
|
|
2411
|
+
])
|
|
2412
|
+
];
|
|
2413
|
+
for (const { family: v, label: N } of Wn) {
|
|
2414
|
+
const k = z(t, v);
|
|
2415
|
+
b.push(
|
|
2416
|
+
W(
|
|
2417
|
+
`${v}-text`,
|
|
2418
|
+
`${N} text on the page`,
|
|
2419
|
+
k[10],
|
|
2420
|
+
a,
|
|
2421
|
+
4.5,
|
|
2422
|
+
[`${f}.${v}`, `${y}.bg`]
|
|
2423
|
+
)
|
|
2424
|
+
);
|
|
2425
|
+
}
|
|
2426
|
+
const x = [
|
|
2427
|
+
{ family: "accent", on: "onAccent", label: "Label on a filled button" },
|
|
2428
|
+
{ family: "secondary", on: "onSecondary", label: "Label on a secondary button" },
|
|
2429
|
+
{ family: "danger", on: "onDanger", label: "Label on a danger button" }
|
|
2430
|
+
];
|
|
2431
|
+
for (const { family: v, on: N, label: k } of x)
|
|
2432
|
+
b.push(
|
|
2433
|
+
W(`${N}-fill`, k, h[N], z(t, v)[8], 4.5, [
|
|
2434
|
+
`${f}.${N}`,
|
|
2435
|
+
`${f}.${v}`
|
|
2436
|
+
])
|
|
2437
|
+
);
|
|
2438
|
+
return b.push(
|
|
2439
|
+
W(
|
|
2440
|
+
"border-page",
|
|
2441
|
+
"Border against the page",
|
|
2442
|
+
m,
|
|
2443
|
+
a,
|
|
2444
|
+
1.15,
|
|
2445
|
+
[`${y}.border`, `${y}.bg`],
|
|
2446
|
+
!0
|
|
2447
|
+
)
|
|
2448
|
+
), b;
|
|
2449
|
+
}
|
|
2450
|
+
function T(n, t) {
|
|
2451
|
+
return n + Math.random() * (t - n);
|
|
2452
|
+
}
|
|
2453
|
+
function _e(n) {
|
|
2454
|
+
return n[Math.floor(Math.random() * n.length)];
|
|
2455
|
+
}
|
|
2456
|
+
const Qn = [
|
|
2457
|
+
{ sm: 8, md: 12, lg: 20, xl: 28, full: 999 },
|
|
2458
|
+
{ sm: 6, md: 8, lg: 14, xl: 18, full: 999 },
|
|
2459
|
+
{ sm: 4, md: 6, lg: 10, xl: 14, full: 8 },
|
|
2460
|
+
{ sm: 2, md: 4, lg: 6, xl: 8, full: 4 },
|
|
2461
|
+
{ sm: 10, md: 16, lg: 24, xl: 32, full: 999 }
|
|
2462
|
+
];
|
|
2463
|
+
function Zn() {
|
|
2464
|
+
const n = T(0, 360), t = _e([0.4, 0.8, 1.4, 2.2]), e = n + _e([-1, 1]) * T(110, 200), r = (b, x, v = n) => L({ l: b, c: x * t, h: v }), a = T(0.15, 0.21), c = {
|
|
2465
|
+
bg: r(a, 0.011),
|
|
2466
|
+
surface: r(a + 0.045, 0.014),
|
|
2467
|
+
surfaceRaised: r(a + 0.062, 0.016),
|
|
2468
|
+
surfaceHover: r(a + 0.125, 0.022),
|
|
2469
|
+
border: r(a + 0.125, 0.024),
|
|
2470
|
+
muted: r(T(0.62, 0.665), 8e-3),
|
|
2471
|
+
text: r(T(0.9, 0.925), 8e-3)
|
|
2472
|
+
}, d = T(0.95, 0.968), p = {
|
|
2473
|
+
bg: r(d, 6e-3),
|
|
2474
|
+
surface: r(T(0.995, 1), 1e-3),
|
|
2475
|
+
surfaceRaised: r(d + 0.016, 4e-3),
|
|
2476
|
+
surfaceHover: r(d - 0.035, 0.01),
|
|
2477
|
+
border: r(T(0.878, 0.9), 0.014),
|
|
2478
|
+
muted: r(T(0.46, 0.5), 0.014),
|
|
2479
|
+
text: r(T(0.23, 0.27), 0.014)
|
|
2480
|
+
}, m = L({ l: T(0.67, 0.74), c: T(0.13, 0.17), h: n }), y = L({
|
|
2481
|
+
l: T(0.79, 0.85),
|
|
2482
|
+
c: T(0.09, 0.13),
|
|
2483
|
+
h: e
|
|
2484
|
+
}), f = L({ l: T(0.67, 0.72), c: T(0.15, 0.19), h: T(18, 30) }), h = {
|
|
2485
|
+
accent: m,
|
|
2486
|
+
accentLight: He(m, 0.085),
|
|
2487
|
+
secondary: y,
|
|
2488
|
+
secondaryLight: He(y, 0.07),
|
|
2489
|
+
success: L({ l: T(0.8, 0.85), c: T(0.15, 0.19), h: T(140, 156) }),
|
|
2490
|
+
danger: f,
|
|
2491
|
+
dangerLight: He(f, 0.08),
|
|
2492
|
+
warning: L({ l: T(0.82, 0.86), c: T(0.14, 0.17), h: T(72, 90) }),
|
|
2493
|
+
onAccent: "",
|
|
2494
|
+
onSecondary: "",
|
|
2495
|
+
onDanger: ""
|
|
2496
|
+
};
|
|
2497
|
+
return h.onAccent = Q(m), h.onSecondary = Q(y), h.onDanger = Q(f), {
|
|
2498
|
+
hue: h,
|
|
2499
|
+
// Generated themes keep one hue set. Splitting light off is a decision
|
|
2500
|
+
// somebody makes about their own palette, not something to roll for them.
|
|
2501
|
+
lightHue: null,
|
|
2502
|
+
dark: c,
|
|
2503
|
+
light: p,
|
|
2504
|
+
radius: { ..._e(Qn) }
|
|
2505
|
+
};
|
|
2506
|
+
}
|
|
2507
|
+
function He(n, t) {
|
|
2508
|
+
const { l: e, c: r, h: a } = Ne(n);
|
|
2509
|
+
return L({ l: Math.min(0.97, e + t), c: r * 0.85, h: a });
|
|
2510
|
+
}
|
|
2511
|
+
function Q(n) {
|
|
2512
|
+
const { c: t, h: e } = Ne(n), r = L({ l: 0.17, c: Math.min(0.05, t * 0.3), h: e }), a = L({ l: 0.97, c: Math.min(0.03, t * 0.2), h: e }), c = ae(r, n) >= ae(a, n) ? r : a;
|
|
2513
|
+
return ge(c, n, 7);
|
|
2514
|
+
}
|
|
2515
|
+
function ue(n) {
|
|
2516
|
+
return {
|
|
2517
|
+
...n,
|
|
2518
|
+
onAccent: Q(n.accent),
|
|
2519
|
+
onSecondary: Q(n.secondary),
|
|
2520
|
+
onDanger: Q(n.danger)
|
|
2521
|
+
};
|
|
2522
|
+
}
|
|
2523
|
+
function re(n) {
|
|
2524
|
+
const t = ue(n);
|
|
2525
|
+
return t.onAccent === n.onAccent && t.onSecondary === n.onSecondary && t.onDanger === n.onDanger;
|
|
2526
|
+
}
|
|
2527
|
+
function ge(n, t, e) {
|
|
2528
|
+
if (ae(n, t) >= e) return n;
|
|
2529
|
+
const { l: r, c: a, h: c } = Ne(n), d = r >= Ne(t).l ? 1 : -1;
|
|
2530
|
+
let p = r;
|
|
2531
|
+
for (let m = 0; m < 120; m++) {
|
|
2532
|
+
p = Math.min(1, Math.max(0, p + d * 8e-3));
|
|
2533
|
+
const y = L({ l: p, c: a, h: c });
|
|
2534
|
+
if (ae(y, t) >= e) return y;
|
|
2535
|
+
if (p === 0 || p === 1) break;
|
|
2536
|
+
}
|
|
2537
|
+
return d === 1 ? "#ffffff" : "#000000";
|
|
2538
|
+
}
|
|
2539
|
+
function qn(n) {
|
|
2540
|
+
const t = Gn(n);
|
|
2541
|
+
for (const e of ["dark", "light"])
|
|
2542
|
+
t[e].text = ge(
|
|
2543
|
+
t[e].text,
|
|
2544
|
+
t[e].bg,
|
|
2545
|
+
7
|
|
2546
|
+
), t[e].text = ge(
|
|
2547
|
+
t[e].text,
|
|
2548
|
+
t[e].surface,
|
|
2549
|
+
7
|
|
2550
|
+
), t[e].muted = ge(
|
|
2551
|
+
t[e].muted,
|
|
2552
|
+
t[e].bg,
|
|
2553
|
+
4.5
|
|
2554
|
+
), t[e].muted = ge(
|
|
2555
|
+
t[e].muted,
|
|
2556
|
+
t[e].surface,
|
|
2557
|
+
4.5
|
|
2558
|
+
);
|
|
2559
|
+
for (const e of [t.hue, t.lightHue])
|
|
2560
|
+
if (e !== null)
|
|
2561
|
+
for (const [r, a] of [
|
|
2562
|
+
["onAccent", "accent"],
|
|
2563
|
+
["onSecondary", "secondary"],
|
|
2564
|
+
["onDanger", "danger"]
|
|
2565
|
+
]) {
|
|
2566
|
+
const c = e[a];
|
|
2567
|
+
ae(e[r], c) < 7 && (e[r] = Q(c));
|
|
2568
|
+
}
|
|
2569
|
+
return t;
|
|
2570
|
+
}
|
|
2571
|
+
function eo(n) {
|
|
2572
|
+
return n === "light" ? { ...Oe.color, ...or } : { ...Oe.color };
|
|
2573
|
+
}
|
|
2574
|
+
function to(n, t) {
|
|
2575
|
+
const e = eo(t);
|
|
2576
|
+
return Object.entries(Fn(n, t)).filter(
|
|
2577
|
+
([r, a]) => ye(a) !== ye(e[r] ?? "")
|
|
2578
|
+
);
|
|
2579
|
+
}
|
|
2580
|
+
function ro(n) {
|
|
2581
|
+
return Rt.filter(
|
|
2582
|
+
(t) => n.radius[t] !== Oe.radius[t]
|
|
2583
|
+
).map((t) => [t, n.radius[t]]);
|
|
2584
|
+
}
|
|
2585
|
+
function ft(n, t) {
|
|
2586
|
+
const e = [];
|
|
2587
|
+
t === "light" && e.push(' appearance: "light",');
|
|
2588
|
+
const r = to(n, t);
|
|
2589
|
+
r.length > 0 && (e.push(" color: {"), r.forEach(([d, p], m) => {
|
|
2590
|
+
const y = m === r.length - 1 ? "" : ",";
|
|
2591
|
+
e.push(` ${d}: "${ye(p)}"${y}`);
|
|
2592
|
+
}), e.push(" },"));
|
|
2593
|
+
const a = ro(n);
|
|
2594
|
+
a.length > 0 && e.push(
|
|
2595
|
+
` radius: { ${a.map(([d, p]) => `${d}: ${p}`).join(", ")} }`
|
|
2596
|
+
);
|
|
2597
|
+
const c = e.length - 1;
|
|
2598
|
+
return c >= 0 && (e[c] = e[c].replace(/,$/, "")), e.length === 0 ? "" : `{
|
|
2599
|
+
${e.join(`
|
|
2600
|
+
`)}
|
|
2601
|
+
}`;
|
|
2602
|
+
}
|
|
2603
|
+
function ns(n) {
|
|
2604
|
+
const t = ft(n, "dark"), e = ft(n, "light");
|
|
2605
|
+
return `import { createGrytTheme, GrytProvider } from "@gryt/ui";
|
|
2606
|
+
|
|
2607
|
+
// One call per appearance. The scales are regenerated from these anchors, so
|
|
2608
|
+
// every component moves with them — not just the tokens named here.
|
|
2609
|
+
const dark = createGrytTheme(${t});
|
|
2610
|
+
|
|
2611
|
+
const light = createGrytTheme(${e});
|
|
2612
|
+
|
|
2613
|
+
export function App({ appearance }: { appearance: "dark" | "light" }) {
|
|
2614
|
+
return (
|
|
2615
|
+
<GrytProvider theme={appearance === "light" ? light : dark}>
|
|
2616
|
+
{/* your app */}
|
|
2617
|
+
</GrytProvider>
|
|
2618
|
+
);
|
|
2619
|
+
}`;
|
|
2620
|
+
}
|
|
2621
|
+
function os(n) {
|
|
2622
|
+
return JSON.stringify(n, null, 2);
|
|
2623
|
+
}
|
|
2624
|
+
function no(n) {
|
|
2625
|
+
const t = n.trim();
|
|
2626
|
+
if (t === "") return { error: "Nothing to import." };
|
|
2627
|
+
const e = nr(t);
|
|
2628
|
+
return e === null ? {
|
|
2629
|
+
error: t.startsWith("{") ? "No theme in that JSON." : "No theme in that link."
|
|
2630
|
+
} : { draft: e.theme, appearance: e.appearance };
|
|
2631
|
+
}
|
|
2632
|
+
const we = {
|
|
2633
|
+
sm: 24,
|
|
2634
|
+
md: 32,
|
|
2635
|
+
lg: 48,
|
|
2636
|
+
xl: 64,
|
|
2637
|
+
full: 40
|
|
2638
|
+
}, je = 999, oo = [
|
|
2639
|
+
"bg",
|
|
2640
|
+
"surface",
|
|
2641
|
+
"surfaceRaised",
|
|
2642
|
+
"surfaceHover",
|
|
2643
|
+
"border"
|
|
2644
|
+
], ao = ["text", "muted"];
|
|
2645
|
+
function as({
|
|
2646
|
+
value: n,
|
|
2647
|
+
onChange: t,
|
|
2648
|
+
appearance: e,
|
|
2649
|
+
onAppearanceChange: r,
|
|
2650
|
+
remoteFontsAllowed: a = !0,
|
|
2651
|
+
actions: c,
|
|
2652
|
+
footer: d,
|
|
2653
|
+
className: p
|
|
2654
|
+
}) {
|
|
2655
|
+
const [m, y] = G(
|
|
2656
|
+
() => re(n.hue) && (n.lightHue === null || re(n.lightHue))
|
|
2657
|
+
), [f, h] = G(null);
|
|
2658
|
+
if (f !== null && f !== n) {
|
|
2659
|
+
h(null);
|
|
2660
|
+
const i = re(n.hue) && (n.lightHue === null || re(n.lightHue));
|
|
2661
|
+
i !== m && y(i);
|
|
2662
|
+
}
|
|
2663
|
+
const [b, x] = G(""), [v, N] = G(null), k = me(() => zn(n, e), [n, e]), w = me(
|
|
2664
|
+
() => Jn(n, k, e),
|
|
2665
|
+
[n, k, e]
|
|
2666
|
+
), $ = me(() => {
|
|
2667
|
+
const i = /* @__PURE__ */ new Map();
|
|
2668
|
+
for (const g of w)
|
|
2669
|
+
if (!(g.advisory || g.level !== "fail"))
|
|
2670
|
+
for (const P of g.paths)
|
|
2671
|
+
i.has(P) || i.set(P, `${g.label}: ${g.ratio.toFixed(1)}, needs ${g.min}`);
|
|
2672
|
+
return i;
|
|
2673
|
+
}, [w]), M = dt(n), F = tt.find((i) => dt(i.theme) === M)?.id ?? "custom", q = n[e], Ce = Ve(n, e), Ae = Se(n, e), Dt = w.filter(
|
|
2674
|
+
(i) => !i.advisory && i.level === "fail"
|
|
2675
|
+
).length;
|
|
2676
|
+
function be(i) {
|
|
2677
|
+
h(i), t(i);
|
|
2678
|
+
}
|
|
2679
|
+
function U(i) {
|
|
2680
|
+
const g = i(n);
|
|
2681
|
+
be(
|
|
2682
|
+
m ? {
|
|
2683
|
+
...g,
|
|
2684
|
+
hue: ue(g.hue),
|
|
2685
|
+
lightHue: g.lightHue === null ? null : ue(g.lightHue)
|
|
2686
|
+
} : g
|
|
2687
|
+
);
|
|
2688
|
+
}
|
|
2689
|
+
function Me(i) {
|
|
2690
|
+
y(
|
|
2691
|
+
re(i.hue) && (i.lightHue === null || re(i.lightHue))
|
|
2692
|
+
), be(i);
|
|
2693
|
+
}
|
|
2694
|
+
function Re(i, g) {
|
|
2695
|
+
U((P) => {
|
|
2696
|
+
const Ie = Ve(P, e);
|
|
2697
|
+
return {
|
|
2698
|
+
...P,
|
|
2699
|
+
[Ie]: { ...Se(P, e), [i]: g }
|
|
2700
|
+
};
|
|
2701
|
+
});
|
|
2702
|
+
}
|
|
2703
|
+
function Gt(i) {
|
|
2704
|
+
U((g) => ({
|
|
2705
|
+
...g,
|
|
2706
|
+
lightHue: i ? { ...g.hue } : null
|
|
2707
|
+
}));
|
|
2708
|
+
}
|
|
2709
|
+
function Ft(i) {
|
|
2710
|
+
y(i), i && be({
|
|
2711
|
+
...n,
|
|
2712
|
+
hue: ue(n.hue),
|
|
2713
|
+
lightHue: n.lightHue === null ? null : ue(n.lightHue)
|
|
2714
|
+
});
|
|
2715
|
+
}
|
|
2716
|
+
function Qe(i, g) {
|
|
2717
|
+
U((P) => ({
|
|
2718
|
+
...P,
|
|
2719
|
+
[e]: { ...P[e], [i]: g }
|
|
2720
|
+
}));
|
|
2721
|
+
}
|
|
2722
|
+
function zt(i) {
|
|
2723
|
+
U((g) => ({ ...g, name: i === "" ? void 0 : i }));
|
|
2724
|
+
}
|
|
2725
|
+
function Bt(i, g) {
|
|
2726
|
+
U((P) => ({
|
|
2727
|
+
...P,
|
|
2728
|
+
fonts: { ...P.fonts ?? vt, [i]: g }
|
|
2729
|
+
}));
|
|
2730
|
+
}
|
|
2731
|
+
function Et(i) {
|
|
2732
|
+
U((g) => ({ ...g, motion: i }));
|
|
2733
|
+
}
|
|
2734
|
+
function _t(i, g) {
|
|
2735
|
+
U((P) => ({
|
|
2736
|
+
...P,
|
|
2737
|
+
radius: { ...P.radius, [i]: g }
|
|
2738
|
+
}));
|
|
2739
|
+
}
|
|
2740
|
+
function Ht(i) {
|
|
2741
|
+
const g = no(i);
|
|
2742
|
+
if (g.error !== void 0 || g.draft === void 0) {
|
|
2743
|
+
N(g.error ?? "That did not look like a theme.");
|
|
2744
|
+
return;
|
|
2745
|
+
}
|
|
2746
|
+
Me(g.draft), g.appearance !== void 0 && r(g.appearance), N(null), x("");
|
|
2747
|
+
}
|
|
2748
|
+
return /* @__PURE__ */ u("div", { className: s("flex min-w-0 flex-col gap-(--space-md)", p), children: [
|
|
2749
|
+
/* @__PURE__ */ u("div", { className: "flex flex-wrap items-end gap-3 border-y border-gryt-border py-3", children: [
|
|
2750
|
+
/* @__PURE__ */ o("div", { className: "w-52", children: /* @__PURE__ */ o(
|
|
2751
|
+
Je,
|
|
2752
|
+
{
|
|
2753
|
+
label: "Preset",
|
|
2754
|
+
onValueChange: (i) => {
|
|
2755
|
+
const g = ar.get(String(i));
|
|
2756
|
+
g && Me(g.theme);
|
|
2757
|
+
},
|
|
2758
|
+
options: [
|
|
2759
|
+
...tt.map((i) => ({
|
|
2760
|
+
label: i.name,
|
|
2761
|
+
value: i.id
|
|
2762
|
+
})),
|
|
2763
|
+
...F === "custom" ? [{ label: "Custom", value: "custom" }] : []
|
|
2764
|
+
],
|
|
2765
|
+
size: "small",
|
|
2766
|
+
value: F
|
|
2767
|
+
}
|
|
2768
|
+
) }),
|
|
2769
|
+
/* @__PURE__ */ o("div", { className: "w-48", children: /* @__PURE__ */ o(
|
|
2770
|
+
Ke,
|
|
2771
|
+
{
|
|
2772
|
+
label: "Name",
|
|
2773
|
+
maxLength: sr,
|
|
2774
|
+
onChange: (i) => zt(i.target.value),
|
|
2775
|
+
placeholder: "Untitled theme",
|
|
2776
|
+
size: "small",
|
|
2777
|
+
value: n.name ?? ""
|
|
2778
|
+
}
|
|
2779
|
+
) }),
|
|
2780
|
+
/* @__PURE__ */ u(Te, { onClick: () => Me(Zn()), size: "small", tone: "neutral", children: [
|
|
2781
|
+
/* @__PURE__ */ o(pr, { "aria-hidden": "true", size: 15 }),
|
|
2782
|
+
"Generate"
|
|
2783
|
+
] }),
|
|
2784
|
+
/* @__PURE__ */ u("div", { className: "ml-auto flex items-end gap-3", children: [
|
|
2785
|
+
/* @__PURE__ */ u(
|
|
2786
|
+
Dn,
|
|
2787
|
+
{
|
|
2788
|
+
"aria-label": "Appearance",
|
|
2789
|
+
onValueChange: (i) => {
|
|
2790
|
+
const g = i[i.length - 1];
|
|
2791
|
+
(g === "dark" || g === "light") && r(g);
|
|
2792
|
+
},
|
|
2793
|
+
value: [e],
|
|
2794
|
+
children: [
|
|
2795
|
+
/* @__PURE__ */ o(ct, { size: "small", value: "dark", children: "Dark" }),
|
|
2796
|
+
/* @__PURE__ */ o(ct, { size: "small", value: "light", children: "Light" })
|
|
2797
|
+
]
|
|
2798
|
+
}
|
|
2799
|
+
),
|
|
2800
|
+
c
|
|
2801
|
+
] })
|
|
2802
|
+
] }),
|
|
2803
|
+
/* @__PURE__ */ u("p", { className: "m-0 text-xs text-gryt-muted", children: [
|
|
2804
|
+
"Editing the ",
|
|
2805
|
+
e,
|
|
2806
|
+
" half. The neutrals below belong to it",
|
|
2807
|
+
n.lightHue === null ? "; the hues are shared, because step 9 is the same colour in both." : " and so do the hues."
|
|
2808
|
+
] }),
|
|
2809
|
+
/* @__PURE__ */ u("div", { className: "flex flex-col gap-2", children: [
|
|
2810
|
+
e === "light" ? /* @__PURE__ */ u("label", { className: "flex cursor-pointer items-center gap-2 text-xs text-gryt-muted", children: [
|
|
2811
|
+
/* @__PURE__ */ o(
|
|
2812
|
+
it,
|
|
2813
|
+
{
|
|
2814
|
+
checked: n.lightHue !== null,
|
|
2815
|
+
onCheckedChange: Gt
|
|
2816
|
+
}
|
|
2817
|
+
),
|
|
2818
|
+
"Light has its own hues"
|
|
2819
|
+
] }) : null,
|
|
2820
|
+
/* @__PURE__ */ u("label", { className: "flex cursor-pointer items-center gap-2 text-xs text-gryt-muted", children: [
|
|
2821
|
+
/* @__PURE__ */ o(it, { checked: m, onCheckedChange: Ft }),
|
|
2822
|
+
"Pick label colours automatically"
|
|
2823
|
+
] })
|
|
2824
|
+
] }),
|
|
2825
|
+
/* @__PURE__ */ u("div", { className: "flex flex-col gap-(--space-md)", children: [
|
|
2826
|
+
/* @__PURE__ */ u(H, { title: "Surfaces", children: [
|
|
2827
|
+
oo.map((i) => /* @__PURE__ */ o(
|
|
2828
|
+
de,
|
|
2829
|
+
{
|
|
2830
|
+
label: ut[i],
|
|
2831
|
+
onChange: (g) => Qe(i, g),
|
|
2832
|
+
value: q[i],
|
|
2833
|
+
warning: $.get(`${e}.${i}`)
|
|
2834
|
+
},
|
|
2835
|
+
i
|
|
2836
|
+
)),
|
|
2837
|
+
/* @__PURE__ */ o(te, { label: "neutral", steps: z(k, "neutral") })
|
|
2838
|
+
] }),
|
|
2839
|
+
/* @__PURE__ */ o(H, { title: "Text", children: ao.map((i) => /* @__PURE__ */ o(
|
|
2840
|
+
de,
|
|
2841
|
+
{
|
|
2842
|
+
label: ut[i],
|
|
2843
|
+
onChange: (g) => Qe(i, g),
|
|
2844
|
+
value: q[i],
|
|
2845
|
+
warning: $.get(`${e}.${i}`)
|
|
2846
|
+
},
|
|
2847
|
+
i
|
|
2848
|
+
)) }),
|
|
2849
|
+
/* @__PURE__ */ u(H, { title: "Accent", children: [
|
|
2850
|
+
["accent", "accentLight", "onAccent"].map((i) => /* @__PURE__ */ o(
|
|
2851
|
+
de,
|
|
2852
|
+
{
|
|
2853
|
+
disabled: m && i === "onAccent",
|
|
2854
|
+
label: Fe[i],
|
|
2855
|
+
onChange: (g) => Re(i, g),
|
|
2856
|
+
value: Ae[i],
|
|
2857
|
+
warning: $.get(`${Ce}.${i}`)
|
|
2858
|
+
},
|
|
2859
|
+
i
|
|
2860
|
+
)),
|
|
2861
|
+
/* @__PURE__ */ o(te, { label: "accent", steps: z(k, "accent") })
|
|
2862
|
+
] }),
|
|
2863
|
+
/* @__PURE__ */ u(H, { title: "Secondary", children: [
|
|
2864
|
+
["secondary", "secondaryLight", "onSecondary"].map(
|
|
2865
|
+
(i) => /* @__PURE__ */ o(
|
|
2866
|
+
de,
|
|
2867
|
+
{
|
|
2868
|
+
disabled: m && i === "onSecondary",
|
|
2869
|
+
label: Fe[i],
|
|
2870
|
+
onChange: (g) => Re(i, g),
|
|
2871
|
+
value: Ae[i],
|
|
2872
|
+
warning: $.get(`${Ce}.${i}`)
|
|
2873
|
+
},
|
|
2874
|
+
i
|
|
2875
|
+
)
|
|
2876
|
+
),
|
|
2877
|
+
/* @__PURE__ */ o(te, { label: "secondary", steps: z(k, "secondary") })
|
|
2878
|
+
] }),
|
|
2879
|
+
/* @__PURE__ */ u(H, { title: "Status", children: [
|
|
2880
|
+
[
|
|
2881
|
+
"success",
|
|
2882
|
+
"danger",
|
|
2883
|
+
"dangerLight",
|
|
2884
|
+
"onDanger",
|
|
2885
|
+
"warning"
|
|
2886
|
+
].map((i) => /* @__PURE__ */ o(
|
|
2887
|
+
de,
|
|
2888
|
+
{
|
|
2889
|
+
disabled: m && i === "onDanger",
|
|
2890
|
+
label: Fe[i],
|
|
2891
|
+
onChange: (g) => Re(i, g),
|
|
2892
|
+
value: Ae[i],
|
|
2893
|
+
warning: $.get(`${Ce}.${i}`)
|
|
2894
|
+
},
|
|
2895
|
+
i
|
|
2896
|
+
)),
|
|
2897
|
+
/* @__PURE__ */ o(te, { label: "success", steps: z(k, "success") }),
|
|
2898
|
+
/* @__PURE__ */ o(te, { label: "danger", steps: z(k, "danger") }),
|
|
2899
|
+
/* @__PURE__ */ o(te, { label: "warning", steps: z(k, "warning") })
|
|
2900
|
+
] }),
|
|
2901
|
+
/* @__PURE__ */ o(H, { title: "Type", children: ir.map((i) => /* @__PURE__ */ o(
|
|
2902
|
+
On,
|
|
2903
|
+
{
|
|
2904
|
+
fonts: n.fonts,
|
|
2905
|
+
onChange: (g) => Bt(i, g),
|
|
2906
|
+
remoteAllowed: a,
|
|
2907
|
+
role: i
|
|
2908
|
+
},
|
|
2909
|
+
i
|
|
2910
|
+
)) }),
|
|
2911
|
+
/* @__PURE__ */ o(H, { title: "Motion", children: /* @__PURE__ */ o(Yn, { motion: n.motion, onChange: Et }) }),
|
|
2912
|
+
/* @__PURE__ */ o(H, { title: "Radius", children: Rt.map((i) => {
|
|
2913
|
+
const g = n.radius[i], P = i === "full" && g >= je ? we.full : g;
|
|
2914
|
+
return /* @__PURE__ */ u("div", { className: "min-w-0", children: [
|
|
2915
|
+
/* @__PURE__ */ u("div", { className: "mb-1 flex items-baseline justify-between gap-2", children: [
|
|
2916
|
+
/* @__PURE__ */ o("span", { className: "text-xs font-medium text-gryt-muted", children: gt[i] }),
|
|
2917
|
+
/* @__PURE__ */ o("span", { className: "font-mono text-[11px] text-gryt-muted", children: g >= je ? "pill" : `${g}px` })
|
|
2918
|
+
] }),
|
|
2919
|
+
/* @__PURE__ */ o(
|
|
2920
|
+
At,
|
|
2921
|
+
{
|
|
2922
|
+
"aria-label": `${gt[i]} radius`,
|
|
2923
|
+
max: we[i],
|
|
2924
|
+
min: 0,
|
|
2925
|
+
onValueChange: (Ie) => {
|
|
2926
|
+
const Ze = Number(Ie);
|
|
2927
|
+
_t(
|
|
2928
|
+
i,
|
|
2929
|
+
i === "full" && Ze >= we.full ? je : Ze
|
|
2930
|
+
);
|
|
2931
|
+
},
|
|
2932
|
+
value: Math.min(P, we[i])
|
|
2933
|
+
}
|
|
2934
|
+
),
|
|
2935
|
+
/* @__PURE__ */ o("p", { className: "m-0 pt-1 text-[11px] text-gryt-muted", children: Bn[i] })
|
|
2936
|
+
] }, i);
|
|
2937
|
+
}) }),
|
|
2938
|
+
/* @__PURE__ */ o(
|
|
2939
|
+
Xn,
|
|
2940
|
+
{
|
|
2941
|
+
checks: w,
|
|
2942
|
+
onRepair: Dt > 0 ? () => be(qn(n)) : void 0
|
|
2943
|
+
}
|
|
2944
|
+
),
|
|
2945
|
+
/* @__PURE__ */ u("section", { className: "min-w-0", children: [
|
|
2946
|
+
/* @__PURE__ */ o("h2", { className: "m-0 pb-2 text-[11px] font-semibold uppercase tracking-wider text-gryt-muted", children: "Load one back" }),
|
|
2947
|
+
/* @__PURE__ */ o("p", { className: "m-0 pb-2 text-sm text-gryt-muted", children: "Paste a theme’s JSON, or a link somebody sent you." }),
|
|
2948
|
+
/* @__PURE__ */ u("div", { className: "flex flex-col gap-2 sm:flex-row", children: [
|
|
2949
|
+
/* @__PURE__ */ o(
|
|
2950
|
+
"textarea",
|
|
2951
|
+
{
|
|
2952
|
+
"aria-label": "Theme JSON or a shared link",
|
|
2953
|
+
className: "min-h-11 flex-1 rounded-(--gryt-radius-xl) border border-gryt-border bg-gryt-surface-raised px-4 py-2.5 font-mono text-sm text-gryt-text outline-none placeholder:text-gryt-muted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gryt-accent-light",
|
|
2954
|
+
onChange: (i) => x(i.target.value),
|
|
2955
|
+
placeholder: "{ …",
|
|
2956
|
+
rows: 2,
|
|
2957
|
+
spellCheck: !1,
|
|
2958
|
+
value: b
|
|
2959
|
+
}
|
|
2960
|
+
),
|
|
2961
|
+
/* @__PURE__ */ o(Te, { onClick: () => Ht(b), tone: "neutral", children: "Load" })
|
|
2962
|
+
] }),
|
|
2963
|
+
v ? /* @__PURE__ */ o("p", { className: "m-0 pt-2 text-sm text-gryt-danger-11", children: v }) : null
|
|
2964
|
+
] }),
|
|
2965
|
+
d
|
|
2966
|
+
] })
|
|
2967
|
+
] });
|
|
2968
|
+
}
|
|
2969
|
+
function H({ title: n, children: t }) {
|
|
2970
|
+
return /* @__PURE__ */ u("section", { className: "min-w-0", children: [
|
|
2971
|
+
/* @__PURE__ */ o("h2", { className: "m-0 pb-2 text-[11px] font-semibold uppercase tracking-wider text-gryt-muted", children: n }),
|
|
2972
|
+
/* @__PURE__ */ o("div", { className: "flex flex-col gap-3", children: t })
|
|
2973
|
+
] });
|
|
2974
|
+
}
|
|
2975
|
+
const so = {
|
|
1804
2976
|
primary: "bg-gryt-accent",
|
|
1805
2977
|
success: "bg-gryt-success",
|
|
1806
2978
|
warning: "bg-gryt-warning",
|
|
1807
2979
|
danger: "bg-gryt-danger"
|
|
1808
2980
|
};
|
|
1809
|
-
function
|
|
1810
|
-
className:
|
|
2981
|
+
function ss({
|
|
2982
|
+
className: n,
|
|
1811
2983
|
value: t,
|
|
1812
2984
|
label: e,
|
|
1813
2985
|
showValue: r = !1,
|
|
1814
|
-
tone:
|
|
2986
|
+
tone: a = "primary",
|
|
1815
2987
|
...c
|
|
1816
2988
|
}) {
|
|
1817
|
-
return /* @__PURE__ */
|
|
1818
|
-
|
|
2989
|
+
return /* @__PURE__ */ u(
|
|
2990
|
+
ce.Root,
|
|
1819
2991
|
{
|
|
1820
2992
|
value: t,
|
|
1821
|
-
className:
|
|
2993
|
+
className: s("gryt-meter flex w-full flex-col gap-1.5", n),
|
|
1822
2994
|
...c,
|
|
1823
2995
|
children: [
|
|
1824
|
-
(e || r) && /* @__PURE__ */
|
|
1825
|
-
e ? /* @__PURE__ */ o(
|
|
1826
|
-
r && /* @__PURE__ */ o(
|
|
2996
|
+
(e || r) && /* @__PURE__ */ u("div", { className: "flex items-baseline justify-between gap-2", children: [
|
|
2997
|
+
e ? /* @__PURE__ */ o(ce.Label, { className: "text-sm text-gryt-muted", children: e }) : /* @__PURE__ */ o("span", {}),
|
|
2998
|
+
r && /* @__PURE__ */ o(ce.Value, { className: "font-mono text-xs text-gryt-muted tabular-nums" })
|
|
1827
2999
|
] }),
|
|
1828
|
-
/* @__PURE__ */ o(
|
|
1829
|
-
|
|
3000
|
+
/* @__PURE__ */ o(ce.Track, { className: "h-1.5 w-full overflow-hidden rounded-(--gryt-radius-full) bg-gryt-surface-raised", children: /* @__PURE__ */ o(
|
|
3001
|
+
ce.Indicator,
|
|
1830
3002
|
{
|
|
1831
|
-
className:
|
|
3003
|
+
className: s(
|
|
1832
3004
|
"h-full rounded-(--gryt-radius-full)",
|
|
1833
3005
|
"transition-[width] duration-120 ease-out motion-reduce:transition-none",
|
|
1834
|
-
|
|
3006
|
+
so[a]
|
|
1835
3007
|
)
|
|
1836
3008
|
}
|
|
1837
3009
|
) })
|
|
@@ -1839,13 +3011,13 @@ function qo({
|
|
|
1839
3011
|
}
|
|
1840
3012
|
);
|
|
1841
3013
|
}
|
|
1842
|
-
const
|
|
3014
|
+
const io = l(
|
|
1843
3015
|
function({ className: t, ...e }, r) {
|
|
1844
3016
|
return /* @__PURE__ */ o(
|
|
1845
|
-
|
|
3017
|
+
V.Popup,
|
|
1846
3018
|
{
|
|
1847
3019
|
ref: r,
|
|
1848
|
-
className:
|
|
3020
|
+
className: s(
|
|
1849
3021
|
"gryt-alert-dialog fixed top-1/2 left-1/2 z-50 -translate-x-1/2 -translate-y-1/2",
|
|
1850
3022
|
"flex w-[32rem] max-w-[calc(100vw-3rem)] flex-col gap-4",
|
|
1851
3023
|
"rounded-(--gryt-radius-lg) border border-gryt-border bg-gryt-surface p-5 text-gryt-text",
|
|
@@ -1859,12 +3031,12 @@ const Je = s(
|
|
|
1859
3031
|
}
|
|
1860
3032
|
);
|
|
1861
3033
|
}
|
|
1862
|
-
),
|
|
3034
|
+
), lo = l(function({ className: t, ...e }, r) {
|
|
1863
3035
|
return /* @__PURE__ */ o(
|
|
1864
|
-
|
|
3036
|
+
V.Backdrop,
|
|
1865
3037
|
{
|
|
1866
3038
|
ref: r,
|
|
1867
|
-
className:
|
|
3039
|
+
className: s(
|
|
1868
3040
|
"gryt-alert-dialog-backdrop fixed inset-0 z-50 min-h-dvh bg-black/60",
|
|
1869
3041
|
"backdrop-blur-(--gryt-backdrop-blur)",
|
|
1870
3042
|
"transition-opacity duration-(--gryt-dur-spring) ease-spring motion-reduce:transition-none",
|
|
@@ -1874,40 +3046,40 @@ const Je = s(
|
|
|
1874
3046
|
...e
|
|
1875
3047
|
}
|
|
1876
3048
|
);
|
|
1877
|
-
}),
|
|
3049
|
+
}), co = l(function({ className: t, ...e }, r) {
|
|
1878
3050
|
return /* @__PURE__ */ o(
|
|
1879
|
-
|
|
3051
|
+
V.Title,
|
|
1880
3052
|
{
|
|
1881
3053
|
ref: r,
|
|
1882
|
-
className:
|
|
3054
|
+
className: s(
|
|
1883
3055
|
"gryt-alert-dialog-title text-lg font-semibold text-gryt-text",
|
|
1884
3056
|
t
|
|
1885
3057
|
),
|
|
1886
3058
|
...e
|
|
1887
3059
|
}
|
|
1888
3060
|
);
|
|
1889
|
-
}),
|
|
3061
|
+
}), uo = l(function({ className: t, ...e }, r) {
|
|
1890
3062
|
return /* @__PURE__ */ o(
|
|
1891
|
-
|
|
3063
|
+
V.Description,
|
|
1892
3064
|
{
|
|
1893
3065
|
ref: r,
|
|
1894
|
-
className:
|
|
3066
|
+
className: s(
|
|
1895
3067
|
"gryt-alert-dialog-description text-sm leading-6 text-gryt-muted",
|
|
1896
3068
|
t
|
|
1897
3069
|
),
|
|
1898
3070
|
...e
|
|
1899
3071
|
}
|
|
1900
3072
|
);
|
|
1901
|
-
}),
|
|
1902
|
-
Root:
|
|
1903
|
-
Trigger:
|
|
1904
|
-
Portal:
|
|
1905
|
-
Backdrop:
|
|
1906
|
-
Popup:
|
|
1907
|
-
Title:
|
|
1908
|
-
Description:
|
|
1909
|
-
Close:
|
|
1910
|
-
},
|
|
3073
|
+
}), is = {
|
|
3074
|
+
Root: V.Root,
|
|
3075
|
+
Trigger: V.Trigger,
|
|
3076
|
+
Portal: V.Portal,
|
|
3077
|
+
Backdrop: lo,
|
|
3078
|
+
Popup: io,
|
|
3079
|
+
Title: co,
|
|
3080
|
+
Description: uo,
|
|
3081
|
+
Close: V.Close
|
|
3082
|
+
}, It = [
|
|
1911
3083
|
"flex cursor-default items-center gap-2 rounded-(--gryt-radius-md)",
|
|
1912
3084
|
"px-3 py-2 text-sm text-gryt-text outline-none select-none",
|
|
1913
3085
|
// Base UI drives keyboard and pointer highlight through one attribute, so
|
|
@@ -1915,195 +3087,195 @@ const Je = s(
|
|
|
1915
3087
|
"data-highlighted:bg-gryt-surface-raised",
|
|
1916
3088
|
"data-selected:text-gryt-accent-11",
|
|
1917
3089
|
"data-disabled:cursor-not-allowed data-disabled:opacity-50"
|
|
1918
|
-
].join(" "),
|
|
1919
|
-
|
|
1920
|
-
|
|
3090
|
+
].join(" "), Lt = [
|
|
3091
|
+
kt,
|
|
3092
|
+
Pt.medium,
|
|
1921
3093
|
"border-gryt-border",
|
|
1922
|
-
|
|
1923
|
-
].join(" "),
|
|
3094
|
+
A
|
|
3095
|
+
].join(" "), go = l(function({ className: t, ...e }, r) {
|
|
1924
3096
|
return /* @__PURE__ */ o(
|
|
1925
|
-
|
|
3097
|
+
S.Input,
|
|
1926
3098
|
{
|
|
1927
3099
|
ref: r,
|
|
1928
|
-
className:
|
|
3100
|
+
className: s("gryt-combobox-input", Lt, t),
|
|
1929
3101
|
...e
|
|
1930
3102
|
}
|
|
1931
3103
|
);
|
|
1932
|
-
}),
|
|
3104
|
+
}), mo = l(function({ className: t, sideOffset: e = 6, ...r }, a) {
|
|
1933
3105
|
return /* @__PURE__ */ o(
|
|
1934
|
-
|
|
3106
|
+
S.Positioner,
|
|
1935
3107
|
{
|
|
1936
|
-
ref:
|
|
3108
|
+
ref: a,
|
|
1937
3109
|
sideOffset: e,
|
|
1938
|
-
className:
|
|
3110
|
+
className: s("gryt-combobox-positioner outline-none", t),
|
|
1939
3111
|
...r
|
|
1940
3112
|
}
|
|
1941
3113
|
);
|
|
1942
|
-
}),
|
|
3114
|
+
}), po = l(
|
|
1943
3115
|
function({ className: t, ...e }, r) {
|
|
1944
3116
|
return /* @__PURE__ */ o(
|
|
1945
|
-
|
|
3117
|
+
S.Popup,
|
|
1946
3118
|
{
|
|
1947
3119
|
ref: r,
|
|
1948
|
-
className:
|
|
3120
|
+
className: s(
|
|
1949
3121
|
"gryt-combobox max-h-64 w-(--anchor-width) overflow-y-auto overscroll-contain p-1 outline-none",
|
|
1950
|
-
|
|
1951
|
-
|
|
3122
|
+
Z,
|
|
3123
|
+
Y,
|
|
1952
3124
|
t
|
|
1953
3125
|
),
|
|
1954
3126
|
...e
|
|
1955
3127
|
}
|
|
1956
3128
|
);
|
|
1957
3129
|
}
|
|
1958
|
-
),
|
|
3130
|
+
), yo = l(function({ className: t, ...e }, r) {
|
|
1959
3131
|
return /* @__PURE__ */ o(
|
|
1960
|
-
|
|
3132
|
+
S.Item,
|
|
1961
3133
|
{
|
|
1962
3134
|
ref: r,
|
|
1963
|
-
className:
|
|
3135
|
+
className: s("gryt-combobox-item", It, t),
|
|
1964
3136
|
...e
|
|
1965
3137
|
}
|
|
1966
3138
|
);
|
|
1967
|
-
}),
|
|
3139
|
+
}), fo = l(function({ className: t, ...e }, r) {
|
|
1968
3140
|
return /* @__PURE__ */ o(
|
|
1969
|
-
|
|
3141
|
+
S.Empty,
|
|
1970
3142
|
{
|
|
1971
3143
|
ref: r,
|
|
1972
|
-
className:
|
|
3144
|
+
className: s(
|
|
1973
3145
|
"gryt-combobox-empty px-3 py-2 text-sm text-gryt-muted",
|
|
1974
3146
|
t
|
|
1975
3147
|
),
|
|
1976
3148
|
...e
|
|
1977
3149
|
}
|
|
1978
3150
|
);
|
|
1979
|
-
}),
|
|
1980
|
-
Root:
|
|
1981
|
-
Input:
|
|
1982
|
-
InputGroup:
|
|
1983
|
-
Trigger:
|
|
1984
|
-
Icon:
|
|
1985
|
-
Clear:
|
|
1986
|
-
Value:
|
|
1987
|
-
Chips:
|
|
1988
|
-
Chip:
|
|
1989
|
-
ChipRemove:
|
|
1990
|
-
Portal:
|
|
1991
|
-
Positioner:
|
|
1992
|
-
Popup:
|
|
1993
|
-
List:
|
|
1994
|
-
Item:
|
|
1995
|
-
ItemIndicator:
|
|
1996
|
-
Group:
|
|
1997
|
-
GroupLabel:
|
|
1998
|
-
Empty:
|
|
1999
|
-
Separator:
|
|
2000
|
-
},
|
|
3151
|
+
}), ls = {
|
|
3152
|
+
Root: S.Root,
|
|
3153
|
+
Input: go,
|
|
3154
|
+
InputGroup: S.InputGroup,
|
|
3155
|
+
Trigger: S.Trigger,
|
|
3156
|
+
Icon: S.Icon,
|
|
3157
|
+
Clear: S.Clear,
|
|
3158
|
+
Value: S.Value,
|
|
3159
|
+
Chips: S.Chips,
|
|
3160
|
+
Chip: S.Chip,
|
|
3161
|
+
ChipRemove: S.ChipRemove,
|
|
3162
|
+
Portal: S.Portal,
|
|
3163
|
+
Positioner: mo,
|
|
3164
|
+
Popup: po,
|
|
3165
|
+
List: S.List,
|
|
3166
|
+
Item: yo,
|
|
3167
|
+
ItemIndicator: S.ItemIndicator,
|
|
3168
|
+
Group: S.Group,
|
|
3169
|
+
GroupLabel: S.GroupLabel,
|
|
3170
|
+
Empty: fo,
|
|
3171
|
+
Separator: S.Separator
|
|
3172
|
+
}, ho = l(function({ className: t, ...e }, r) {
|
|
2001
3173
|
return /* @__PURE__ */ o(
|
|
2002
|
-
|
|
3174
|
+
C.Input,
|
|
2003
3175
|
{
|
|
2004
3176
|
ref: r,
|
|
2005
|
-
className:
|
|
3177
|
+
className: s("gryt-autocomplete-input", Lt, t),
|
|
2006
3178
|
...e
|
|
2007
3179
|
}
|
|
2008
3180
|
);
|
|
2009
|
-
}),
|
|
3181
|
+
}), bo = l(function({ className: t, sideOffset: e = 6, ...r }, a) {
|
|
2010
3182
|
return /* @__PURE__ */ o(
|
|
2011
|
-
|
|
3183
|
+
C.Positioner,
|
|
2012
3184
|
{
|
|
2013
|
-
ref:
|
|
3185
|
+
ref: a,
|
|
2014
3186
|
sideOffset: e,
|
|
2015
|
-
className:
|
|
3187
|
+
className: s("gryt-autocomplete-positioner outline-none", t),
|
|
2016
3188
|
...r
|
|
2017
3189
|
}
|
|
2018
3190
|
);
|
|
2019
|
-
}),
|
|
3191
|
+
}), xo = l(function({ className: t, ...e }, r) {
|
|
2020
3192
|
return /* @__PURE__ */ o(
|
|
2021
|
-
|
|
3193
|
+
C.Popup,
|
|
2022
3194
|
{
|
|
2023
3195
|
ref: r,
|
|
2024
|
-
className:
|
|
3196
|
+
className: s(
|
|
2025
3197
|
"gryt-autocomplete max-h-64 w-(--anchor-width) overflow-y-auto overscroll-contain p-1 outline-none",
|
|
2026
|
-
|
|
2027
|
-
|
|
3198
|
+
Z,
|
|
3199
|
+
Y,
|
|
2028
3200
|
t
|
|
2029
3201
|
),
|
|
2030
3202
|
...e
|
|
2031
3203
|
}
|
|
2032
3204
|
);
|
|
2033
|
-
}),
|
|
3205
|
+
}), vo = l(function({ className: t, ...e }, r) {
|
|
2034
3206
|
return /* @__PURE__ */ o(
|
|
2035
|
-
|
|
3207
|
+
C.Item,
|
|
2036
3208
|
{
|
|
2037
3209
|
ref: r,
|
|
2038
|
-
className:
|
|
3210
|
+
className: s("gryt-autocomplete-item", It, t),
|
|
2039
3211
|
...e
|
|
2040
3212
|
}
|
|
2041
3213
|
);
|
|
2042
|
-
}),
|
|
3214
|
+
}), wo = l(function({ className: t, ...e }, r) {
|
|
2043
3215
|
return /* @__PURE__ */ o(
|
|
2044
|
-
|
|
3216
|
+
C.Empty,
|
|
2045
3217
|
{
|
|
2046
3218
|
ref: r,
|
|
2047
|
-
className:
|
|
3219
|
+
className: s(
|
|
2048
3220
|
"gryt-autocomplete-empty px-3 py-2 text-sm text-gryt-muted",
|
|
2049
3221
|
t
|
|
2050
3222
|
),
|
|
2051
3223
|
...e
|
|
2052
3224
|
}
|
|
2053
3225
|
);
|
|
2054
|
-
}),
|
|
2055
|
-
Root:
|
|
2056
|
-
Input:
|
|
2057
|
-
InputGroup:
|
|
2058
|
-
Trigger:
|
|
2059
|
-
Icon:
|
|
2060
|
-
Clear:
|
|
2061
|
-
Value:
|
|
2062
|
-
Portal:
|
|
2063
|
-
Positioner:
|
|
2064
|
-
Popup:
|
|
2065
|
-
List:
|
|
2066
|
-
Item:
|
|
2067
|
-
Group:
|
|
2068
|
-
GroupLabel:
|
|
2069
|
-
Empty:
|
|
2070
|
-
Separator:
|
|
2071
|
-
},
|
|
3226
|
+
}), cs = {
|
|
3227
|
+
Root: C.Root,
|
|
3228
|
+
Input: ho,
|
|
3229
|
+
InputGroup: C.InputGroup,
|
|
3230
|
+
Trigger: C.Trigger,
|
|
3231
|
+
Icon: C.Icon,
|
|
3232
|
+
Clear: C.Clear,
|
|
3233
|
+
Value: C.Value,
|
|
3234
|
+
Portal: C.Portal,
|
|
3235
|
+
Positioner: bo,
|
|
3236
|
+
Popup: xo,
|
|
3237
|
+
List: C.List,
|
|
3238
|
+
Item: vo,
|
|
3239
|
+
Group: C.Group,
|
|
3240
|
+
GroupLabel: C.GroupLabel,
|
|
3241
|
+
Empty: wo,
|
|
3242
|
+
Separator: C.Separator
|
|
3243
|
+
}, ds = l(
|
|
2072
3244
|
function({ className: t, ...e }, r) {
|
|
2073
3245
|
return /* @__PURE__ */ o(
|
|
2074
|
-
|
|
3246
|
+
Tr,
|
|
2075
3247
|
{
|
|
2076
3248
|
ref: r,
|
|
2077
|
-
className:
|
|
3249
|
+
className: s("gryt-checkbox-group flex flex-col gap-2", t),
|
|
2078
3250
|
...e
|
|
2079
3251
|
}
|
|
2080
3252
|
);
|
|
2081
3253
|
}
|
|
2082
|
-
),
|
|
3254
|
+
), No = l(
|
|
2083
3255
|
function({ className: t, ...e }, r) {
|
|
2084
3256
|
return /* @__PURE__ */ o(
|
|
2085
|
-
|
|
3257
|
+
We.Trigger,
|
|
2086
3258
|
{
|
|
2087
3259
|
ref: r,
|
|
2088
|
-
className:
|
|
3260
|
+
className: s(
|
|
2089
3261
|
"gryt-collapsible-trigger flex w-full items-center justify-between gap-2",
|
|
2090
3262
|
"rounded-(--gryt-radius-md) border-0 bg-transparent px-2 py-2 text-left",
|
|
2091
3263
|
"text-sm font-medium text-gryt-text select-none",
|
|
2092
3264
|
"transition-colors hover:bg-gryt-surface-raised motion-reduce:transition-none",
|
|
2093
|
-
|
|
3265
|
+
A,
|
|
2094
3266
|
t
|
|
2095
3267
|
),
|
|
2096
3268
|
...e
|
|
2097
3269
|
}
|
|
2098
3270
|
);
|
|
2099
3271
|
}
|
|
2100
|
-
),
|
|
3272
|
+
), To = l(
|
|
2101
3273
|
function({ className: t, ...e }, r) {
|
|
2102
3274
|
return /* @__PURE__ */ o(
|
|
2103
|
-
|
|
3275
|
+
We.Panel,
|
|
2104
3276
|
{
|
|
2105
3277
|
ref: r,
|
|
2106
|
-
className:
|
|
3278
|
+
className: s(
|
|
2107
3279
|
"gryt-collapsible-panel overflow-hidden",
|
|
2108
3280
|
// Base UI measures the panel and exposes the height as a variable, so
|
|
2109
3281
|
// this animates to the content's real height rather than to a guess.
|
|
@@ -2116,26 +3288,26 @@ const Je = s(
|
|
|
2116
3288
|
}
|
|
2117
3289
|
);
|
|
2118
3290
|
}
|
|
2119
|
-
),
|
|
2120
|
-
Root:
|
|
2121
|
-
Trigger:
|
|
2122
|
-
Panel:
|
|
2123
|
-
},
|
|
3291
|
+
), us = {
|
|
3292
|
+
Root: We.Root,
|
|
3293
|
+
Trigger: No,
|
|
3294
|
+
Panel: To
|
|
3295
|
+
}, gs = l(function({ className: t, ...e }, r) {
|
|
2124
3296
|
return /* @__PURE__ */ o(
|
|
2125
|
-
|
|
3297
|
+
Sr,
|
|
2126
3298
|
{
|
|
2127
3299
|
ref: r,
|
|
2128
|
-
className:
|
|
3300
|
+
className: s("gryt-form flex flex-col gap-(--gryt-space-lg)", t),
|
|
2129
3301
|
...e
|
|
2130
3302
|
}
|
|
2131
3303
|
);
|
|
2132
|
-
}),
|
|
3304
|
+
}), So = l(
|
|
2133
3305
|
function({ className: t, ...e }, r) {
|
|
2134
3306
|
return /* @__PURE__ */ o(
|
|
2135
|
-
|
|
3307
|
+
Tt.Root,
|
|
2136
3308
|
{
|
|
2137
3309
|
ref: r,
|
|
2138
|
-
className:
|
|
3310
|
+
className: s(
|
|
2139
3311
|
"gryt-fieldset flex min-w-0 flex-col gap-3 border-0 p-0",
|
|
2140
3312
|
t
|
|
2141
3313
|
),
|
|
@@ -2143,25 +3315,25 @@ const Je = s(
|
|
|
2143
3315
|
}
|
|
2144
3316
|
);
|
|
2145
3317
|
}
|
|
2146
|
-
),
|
|
3318
|
+
), $o = l(function({ className: t, ...e }, r) {
|
|
2147
3319
|
return /* @__PURE__ */ o(
|
|
2148
|
-
|
|
3320
|
+
Tt.Legend,
|
|
2149
3321
|
{
|
|
2150
3322
|
ref: r,
|
|
2151
|
-
className:
|
|
3323
|
+
className: s(
|
|
2152
3324
|
"gryt-fieldset-legend text-sm font-semibold text-gryt-text",
|
|
2153
3325
|
t
|
|
2154
3326
|
),
|
|
2155
3327
|
...e
|
|
2156
3328
|
}
|
|
2157
3329
|
);
|
|
2158
|
-
}),
|
|
3330
|
+
}), ms = { Root: So, Legend: $o }, ps = l(
|
|
2159
3331
|
function({ className: t, ...e }, r) {
|
|
2160
3332
|
return /* @__PURE__ */ o(
|
|
2161
|
-
|
|
3333
|
+
$r,
|
|
2162
3334
|
{
|
|
2163
3335
|
ref: r,
|
|
2164
|
-
className:
|
|
3336
|
+
className: s(
|
|
2165
3337
|
"gryt-menubar flex items-center gap-1",
|
|
2166
3338
|
"rounded-(--gryt-radius-md) border border-gryt-border bg-gryt-surface p-1",
|
|
2167
3339
|
t
|
|
@@ -2170,132 +3342,132 @@ const Je = s(
|
|
|
2170
3342
|
}
|
|
2171
3343
|
);
|
|
2172
3344
|
}
|
|
2173
|
-
),
|
|
3345
|
+
), ko = l(function({ className: t, ...e }, r) {
|
|
2174
3346
|
return /* @__PURE__ */ o(
|
|
2175
|
-
|
|
3347
|
+
I.Trigger,
|
|
2176
3348
|
{
|
|
2177
3349
|
ref: r,
|
|
2178
|
-
className:
|
|
3350
|
+
className: s(
|
|
2179
3351
|
"gryt-navigation-menu-trigger flex items-center gap-1.5 rounded-(--gryt-radius-md)",
|
|
2180
3352
|
"border-0 bg-transparent px-3 py-2 text-sm font-medium text-gryt-text select-none",
|
|
2181
3353
|
"transition-colors hover:bg-gryt-surface-raised motion-reduce:transition-none",
|
|
2182
3354
|
"data-popup-open:bg-gryt-surface-raised",
|
|
2183
|
-
|
|
3355
|
+
A,
|
|
2184
3356
|
t
|
|
2185
3357
|
),
|
|
2186
3358
|
...e
|
|
2187
3359
|
}
|
|
2188
3360
|
);
|
|
2189
|
-
}),
|
|
3361
|
+
}), Po = l(function({ className: t, ...e }, r) {
|
|
2190
3362
|
return /* @__PURE__ */ o(
|
|
2191
|
-
|
|
3363
|
+
I.Popup,
|
|
2192
3364
|
{
|
|
2193
3365
|
ref: r,
|
|
2194
|
-
className:
|
|
3366
|
+
className: s(
|
|
2195
3367
|
"gryt-navigation-menu-popup outline-none",
|
|
2196
|
-
|
|
2197
|
-
|
|
3368
|
+
Z,
|
|
3369
|
+
Y,
|
|
2198
3370
|
t
|
|
2199
3371
|
),
|
|
2200
3372
|
...e
|
|
2201
3373
|
}
|
|
2202
3374
|
);
|
|
2203
|
-
}),
|
|
3375
|
+
}), Co = l(function({ className: t, ...e }, r) {
|
|
2204
3376
|
return /* @__PURE__ */ o(
|
|
2205
|
-
|
|
3377
|
+
I.Positioner,
|
|
2206
3378
|
{
|
|
2207
3379
|
ref: r,
|
|
2208
|
-
className:
|
|
3380
|
+
className: s("gryt-navigation-menu-positioner outline-none", t),
|
|
2209
3381
|
...e
|
|
2210
3382
|
}
|
|
2211
3383
|
);
|
|
2212
|
-
}),
|
|
3384
|
+
}), Ao = l(function({ className: t, ...e }, r) {
|
|
2213
3385
|
return /* @__PURE__ */ o(
|
|
2214
|
-
|
|
3386
|
+
I.Viewport,
|
|
2215
3387
|
{
|
|
2216
3388
|
ref: r,
|
|
2217
|
-
className:
|
|
3389
|
+
className: s(
|
|
2218
3390
|
"gryt-navigation-menu-viewport relative overflow-hidden",
|
|
2219
3391
|
t
|
|
2220
3392
|
),
|
|
2221
3393
|
...e
|
|
2222
3394
|
}
|
|
2223
3395
|
);
|
|
2224
|
-
}),
|
|
3396
|
+
}), Mo = l(function({ className: t, ...e }, r) {
|
|
2225
3397
|
return /* @__PURE__ */ o(
|
|
2226
|
-
|
|
3398
|
+
I.Link,
|
|
2227
3399
|
{
|
|
2228
3400
|
ref: r,
|
|
2229
|
-
className:
|
|
3401
|
+
className: s(
|
|
2230
3402
|
"gryt-navigation-menu-link block rounded-(--gryt-radius-md) px-3 py-2",
|
|
2231
3403
|
"text-sm text-gryt-text no-underline outline-none",
|
|
2232
3404
|
"transition-colors hover:bg-gryt-surface-raised motion-reduce:transition-none",
|
|
2233
|
-
|
|
3405
|
+
A,
|
|
2234
3406
|
t
|
|
2235
3407
|
),
|
|
2236
3408
|
...e
|
|
2237
3409
|
}
|
|
2238
3410
|
);
|
|
2239
|
-
}),
|
|
2240
|
-
Root:
|
|
2241
|
-
List:
|
|
2242
|
-
Item:
|
|
2243
|
-
Trigger:
|
|
2244
|
-
Content:
|
|
2245
|
-
Portal:
|
|
2246
|
-
Positioner:
|
|
2247
|
-
Viewport:
|
|
2248
|
-
Popup:
|
|
2249
|
-
Link:
|
|
2250
|
-
Icon:
|
|
2251
|
-
Arrow:
|
|
2252
|
-
},
|
|
2253
|
-
function({ className: t, label: e, scrubbable: r = !1, ...
|
|
2254
|
-
return /* @__PURE__ */
|
|
2255
|
-
|
|
3411
|
+
}), ys = {
|
|
3412
|
+
Root: I.Root,
|
|
3413
|
+
List: I.List,
|
|
3414
|
+
Item: I.Item,
|
|
3415
|
+
Trigger: ko,
|
|
3416
|
+
Content: I.Content,
|
|
3417
|
+
Portal: I.Portal,
|
|
3418
|
+
Positioner: Co,
|
|
3419
|
+
Viewport: Ao,
|
|
3420
|
+
Popup: Po,
|
|
3421
|
+
Link: Mo,
|
|
3422
|
+
Icon: I.Icon,
|
|
3423
|
+
Arrow: I.Arrow
|
|
3424
|
+
}, ht = "flex h-9 w-9 shrink-0 items-center justify-center border-0 bg-transparent text-gryt-muted transition-colors hover:not-data-disabled:bg-white/8 hover:not-data-disabled:text-gryt-text motion-reduce:transition-none disabled:cursor-not-allowed disabled:opacity-50", fs = l(
|
|
3425
|
+
function({ className: t, label: e, scrubbable: r = !1, ...a }, c) {
|
|
3426
|
+
return /* @__PURE__ */ u(
|
|
3427
|
+
X.Root,
|
|
2256
3428
|
{
|
|
2257
3429
|
ref: c,
|
|
2258
|
-
className:
|
|
2259
|
-
...
|
|
3430
|
+
className: s("gryt-number-field flex flex-col gap-1.5", t),
|
|
3431
|
+
...a,
|
|
2260
3432
|
children: [
|
|
2261
|
-
e && (r ? /* @__PURE__ */
|
|
3433
|
+
e && (r ? /* @__PURE__ */ u(X.ScrubArea, { className: "cursor-ew-resize text-sm text-gryt-muted select-none", children: [
|
|
2262
3434
|
e,
|
|
2263
|
-
/* @__PURE__ */ o(
|
|
3435
|
+
/* @__PURE__ */ o(X.ScrubAreaCursor, {})
|
|
2264
3436
|
] }) : /* @__PURE__ */ o("span", { className: "text-sm text-gryt-muted", children: e })),
|
|
2265
|
-
/* @__PURE__ */
|
|
2266
|
-
|
|
3437
|
+
/* @__PURE__ */ u(
|
|
3438
|
+
X.Group,
|
|
2267
3439
|
{
|
|
2268
|
-
className:
|
|
3440
|
+
className: s(
|
|
2269
3441
|
"flex w-fit items-center overflow-hidden rounded-(--gryt-radius-full)",
|
|
2270
3442
|
"border border-gryt-border bg-gryt-surface-raised",
|
|
2271
3443
|
"focus-within:outline-2 focus-within:outline-offset-2 focus-within:outline-gryt-accent-light",
|
|
2272
|
-
|
|
3444
|
+
ie
|
|
2273
3445
|
),
|
|
2274
3446
|
children: [
|
|
2275
3447
|
/* @__PURE__ */ o(
|
|
2276
|
-
|
|
3448
|
+
X.Decrement,
|
|
2277
3449
|
{
|
|
2278
3450
|
"aria-label": "Decrease",
|
|
2279
|
-
className:
|
|
2280
|
-
children: /* @__PURE__ */ o(
|
|
3451
|
+
className: s(ht, "rounded-l-(--gryt-radius-full)"),
|
|
3452
|
+
children: /* @__PURE__ */ o(yr, { size: 14, weight: "bold" })
|
|
2281
3453
|
}
|
|
2282
3454
|
),
|
|
2283
3455
|
/* @__PURE__ */ o(
|
|
2284
|
-
|
|
3456
|
+
X.Input,
|
|
2285
3457
|
{
|
|
2286
|
-
className:
|
|
3458
|
+
className: s(
|
|
2287
3459
|
"w-16 border-0 bg-transparent px-1 py-2 text-center",
|
|
2288
3460
|
"font-mono text-sm text-gryt-text tabular-nums outline-none",
|
|
2289
|
-
|
|
3461
|
+
A
|
|
2290
3462
|
)
|
|
2291
3463
|
}
|
|
2292
3464
|
),
|
|
2293
3465
|
/* @__PURE__ */ o(
|
|
2294
|
-
|
|
3466
|
+
X.Increment,
|
|
2295
3467
|
{
|
|
2296
3468
|
"aria-label": "Increase",
|
|
2297
|
-
className:
|
|
2298
|
-
children: /* @__PURE__ */ o(
|
|
3469
|
+
className: s(ht, "rounded-r-(--gryt-radius-full)"),
|
|
3470
|
+
children: /* @__PURE__ */ o(fr, { size: 14, weight: "bold" })
|
|
2299
3471
|
}
|
|
2300
3472
|
)
|
|
2301
3473
|
]
|
|
@@ -2305,73 +3477,73 @@ const Je = s(
|
|
|
2305
3477
|
}
|
|
2306
3478
|
);
|
|
2307
3479
|
}
|
|
2308
|
-
),
|
|
2309
|
-
function({ className: t, length: e = 6, ...r },
|
|
3480
|
+
), hs = l(
|
|
3481
|
+
function({ className: t, length: e = 6, ...r }, a) {
|
|
2310
3482
|
return /* @__PURE__ */ o(
|
|
2311
3483
|
at.Root,
|
|
2312
3484
|
{
|
|
2313
|
-
ref:
|
|
3485
|
+
ref: a,
|
|
2314
3486
|
length: e,
|
|
2315
|
-
className:
|
|
3487
|
+
className: s("gryt-otp-field flex gap-2", t),
|
|
2316
3488
|
...r,
|
|
2317
|
-
children: Array.from({ length: e }, (c,
|
|
3489
|
+
children: Array.from({ length: e }, (c, d) => /* @__PURE__ */ o(
|
|
2318
3490
|
at.Input,
|
|
2319
3491
|
{
|
|
2320
|
-
className:
|
|
3492
|
+
className: s(
|
|
2321
3493
|
"gryt-otp-input h-12 w-10 rounded-(--gryt-radius-md) text-center",
|
|
2322
3494
|
"border border-gryt-border bg-gryt-surface-raised",
|
|
2323
3495
|
"font-mono text-lg text-gryt-text tabular-nums outline-none",
|
|
2324
3496
|
"transition-colors duration-(--gryt-dur-fast) motion-reduce:transition-none",
|
|
2325
3497
|
"data-filled:border-gryt-accent",
|
|
2326
|
-
|
|
3498
|
+
A
|
|
2327
3499
|
)
|
|
2328
3500
|
},
|
|
2329
|
-
|
|
3501
|
+
d
|
|
2330
3502
|
))
|
|
2331
3503
|
}
|
|
2332
3504
|
);
|
|
2333
3505
|
}
|
|
2334
|
-
),
|
|
2335
|
-
function({ className: t, sideOffset: e = 8, ...r },
|
|
3506
|
+
), Ro = l(
|
|
3507
|
+
function({ className: t, sideOffset: e = 8, ...r }, a) {
|
|
2336
3508
|
return /* @__PURE__ */ o(
|
|
2337
|
-
|
|
3509
|
+
ne.Positioner,
|
|
2338
3510
|
{
|
|
2339
|
-
ref:
|
|
3511
|
+
ref: a,
|
|
2340
3512
|
sideOffset: e,
|
|
2341
|
-
className:
|
|
3513
|
+
className: s("gryt-preview-card-positioner outline-none", t),
|
|
2342
3514
|
...r
|
|
2343
3515
|
}
|
|
2344
3516
|
);
|
|
2345
3517
|
}
|
|
2346
|
-
),
|
|
3518
|
+
), Io = l(
|
|
2347
3519
|
function({ className: t, ...e }, r) {
|
|
2348
3520
|
return /* @__PURE__ */ o(
|
|
2349
|
-
|
|
3521
|
+
ne.Popup,
|
|
2350
3522
|
{
|
|
2351
3523
|
ref: r,
|
|
2352
|
-
className:
|
|
3524
|
+
className: s(
|
|
2353
3525
|
"gryt-preview-card w-64 max-w-[calc(100vw-2rem)] p-4 outline-none",
|
|
2354
|
-
|
|
2355
|
-
|
|
3526
|
+
Z,
|
|
3527
|
+
Y,
|
|
2356
3528
|
t
|
|
2357
3529
|
),
|
|
2358
3530
|
...e
|
|
2359
3531
|
}
|
|
2360
3532
|
);
|
|
2361
3533
|
}
|
|
2362
|
-
),
|
|
2363
|
-
Root:
|
|
2364
|
-
Trigger:
|
|
2365
|
-
Portal:
|
|
2366
|
-
Positioner:
|
|
2367
|
-
Popup:
|
|
2368
|
-
Arrow:
|
|
2369
|
-
},
|
|
3534
|
+
), bs = {
|
|
3535
|
+
Root: ne.Root,
|
|
3536
|
+
Trigger: ne.Trigger,
|
|
3537
|
+
Portal: ne.Portal,
|
|
3538
|
+
Positioner: Ro,
|
|
3539
|
+
Popup: Io,
|
|
3540
|
+
Arrow: ne.Arrow
|
|
3541
|
+
}, Lo = l(function({ className: t, ...e }, r) {
|
|
2370
3542
|
return /* @__PURE__ */ o(
|
|
2371
|
-
|
|
3543
|
+
oe.Root,
|
|
2372
3544
|
{
|
|
2373
3545
|
ref: r,
|
|
2374
|
-
className:
|
|
3546
|
+
className: s(
|
|
2375
3547
|
"gryt-toolbar flex items-center gap-1",
|
|
2376
3548
|
"rounded-(--gryt-radius-full) border border-gryt-border bg-gryt-surface p-1",
|
|
2377
3549
|
t
|
|
@@ -2379,113 +3551,130 @@ const Je = s(
|
|
|
2379
3551
|
...e
|
|
2380
3552
|
}
|
|
2381
3553
|
);
|
|
2382
|
-
}),
|
|
3554
|
+
}), Do = l(function({ className: t, ...e }, r) {
|
|
2383
3555
|
return /* @__PURE__ */ o(
|
|
2384
|
-
|
|
3556
|
+
oe.Separator,
|
|
2385
3557
|
{
|
|
2386
3558
|
ref: r,
|
|
2387
|
-
className:
|
|
3559
|
+
className: s("gryt-toolbar-separator mx-1 h-6 w-px bg-gryt-border", t),
|
|
2388
3560
|
...e
|
|
2389
3561
|
}
|
|
2390
3562
|
);
|
|
2391
|
-
}),
|
|
2392
|
-
Root:
|
|
2393
|
-
Group:
|
|
2394
|
-
Button:
|
|
2395
|
-
Link:
|
|
2396
|
-
Input:
|
|
2397
|
-
Separator:
|
|
3563
|
+
}), xs = {
|
|
3564
|
+
Root: Lo,
|
|
3565
|
+
Group: oe.Group,
|
|
3566
|
+
Button: oe.Button,
|
|
3567
|
+
Link: oe.Link,
|
|
3568
|
+
Input: oe.Input,
|
|
3569
|
+
Separator: Do
|
|
2398
3570
|
};
|
|
2399
3571
|
export {
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
3572
|
+
Ja as Accordion,
|
|
3573
|
+
Oa as Alert,
|
|
3574
|
+
is as AlertDialog,
|
|
3575
|
+
cs as Autocomplete,
|
|
3576
|
+
Fr as Avatar,
|
|
3577
|
+
Ra as Badge,
|
|
3578
|
+
Te as Button,
|
|
3579
|
+
Ea as Card,
|
|
3580
|
+
ja as CardActions,
|
|
3581
|
+
Ha as CardContent,
|
|
3582
|
+
_a as CardHeader,
|
|
3583
|
+
it as Checkbox,
|
|
3584
|
+
ds as CheckboxGroup,
|
|
3585
|
+
Ia as Chip,
|
|
3586
|
+
us as Collapsible,
|
|
3587
|
+
ls as Combobox,
|
|
3588
|
+
Aa as Composer,
|
|
3589
|
+
Qa as ContextMenu,
|
|
3590
|
+
Ma as ConversationItem,
|
|
3591
|
+
Xa as Dialog,
|
|
3592
|
+
Ba as Divider,
|
|
3593
|
+
Wa as Drawer,
|
|
3594
|
+
ms as Fieldset,
|
|
3595
|
+
gs as Form,
|
|
3596
|
+
Ns as GRYT_FONT_KEYS,
|
|
3597
|
+
Ts as GRYT_FONT_STACK_MAX,
|
|
3598
|
+
Ss as GRYT_HUE_KEYS,
|
|
3599
|
+
$s as GRYT_MOTION_CURVES,
|
|
3600
|
+
ks as GRYT_MOTION_SCALE_MAX,
|
|
3601
|
+
Ps as GRYT_NEUTRAL_KEYS,
|
|
3602
|
+
Cs as GRYT_RADIUS_KEYS,
|
|
3603
|
+
As as GRYT_THEME_NAME_MAX,
|
|
3604
|
+
$a as GrytProvider,
|
|
3605
|
+
ka as IconButton,
|
|
3606
|
+
Ge as Menu,
|
|
3607
|
+
ps as Menubar,
|
|
3608
|
+
Ca as MessageBubble,
|
|
3609
|
+
ss as Meter,
|
|
3610
|
+
ys as NavigationMenu,
|
|
3611
|
+
fs as NumberField,
|
|
3612
|
+
hs as OtpField,
|
|
3613
|
+
Za as Popover,
|
|
3614
|
+
bs as PreviewCard,
|
|
3615
|
+
Va as Progress,
|
|
3616
|
+
La as Radio,
|
|
3617
|
+
Da as RadioGroup,
|
|
3618
|
+
ts as ScrollArea,
|
|
3619
|
+
Je as Select,
|
|
3620
|
+
Ua as Skeleton,
|
|
3621
|
+
At as Slider,
|
|
3622
|
+
Ya as Spinner,
|
|
3623
|
+
Pa as Surface,
|
|
3624
|
+
Ga as Switch,
|
|
3625
|
+
dn as Tab,
|
|
3626
|
+
Ka as Tabs,
|
|
3627
|
+
Ke as TextField,
|
|
3628
|
+
as as ThemeEditor,
|
|
3629
|
+
qa as Toast,
|
|
3630
|
+
ct as Toggle,
|
|
3631
|
+
Dn as ToggleGroup,
|
|
3632
|
+
xs as Toolbar,
|
|
3633
|
+
Fa as Tooltip,
|
|
3634
|
+
za as TooltipProvider,
|
|
3635
|
+
Ms as alphaScale,
|
|
3636
|
+
ui as avatarSeed,
|
|
3637
|
+
Gn as cloneDraft,
|
|
3638
|
+
Rs as cloneGrytTheme,
|
|
3639
|
+
s as cn,
|
|
3640
|
+
Is as contrast,
|
|
3641
|
+
Ls as createGrytTheme,
|
|
3642
|
+
Ds as decodeGrytTheme,
|
|
3643
|
+
Gs as encodeDraft,
|
|
3644
|
+
Fs as encodeGrytTheme,
|
|
3645
|
+
zs as grytAlphaScales,
|
|
3646
|
+
Bs as grytAlphaScalesLight,
|
|
3647
|
+
rs as grytDraft,
|
|
3648
|
+
Es as grytFonts,
|
|
3649
|
+
_s as grytLightTokens,
|
|
3650
|
+
Hs as grytMotion,
|
|
3651
|
+
js as grytPresets,
|
|
3652
|
+
Os as grytPresetsById,
|
|
3653
|
+
Vs as grytScales,
|
|
3654
|
+
Ys as grytScalesLight,
|
|
3655
|
+
Us as grytTheme,
|
|
3656
|
+
Xs as grytThemeHues,
|
|
3657
|
+
Ws as grytThemeToOptions,
|
|
3658
|
+
Ks as grytTokens,
|
|
3659
|
+
Js as hexToOklch,
|
|
3660
|
+
Qs as hexToRgb,
|
|
3661
|
+
Zs as hueScale,
|
|
3662
|
+
qs as hueScaleLight,
|
|
3663
|
+
no as importTheme,
|
|
3664
|
+
ei as isBezier,
|
|
3665
|
+
ti as isFontStack,
|
|
3666
|
+
ri as isHexColor,
|
|
3667
|
+
ni as isValidBezier,
|
|
3668
|
+
oi as neutralScale,
|
|
3669
|
+
ai as neutralScaleLight,
|
|
3670
|
+
si as normalizeHexColor,
|
|
3671
|
+
ii as normalizeThemeName,
|
|
3672
|
+
li as oklchToHex,
|
|
3673
|
+
ci as rgbToHex,
|
|
3674
|
+
ns as themeCode,
|
|
3675
|
+
os as themeJson,
|
|
3676
|
+
zn as themeStyle,
|
|
3677
|
+
Xr as useMediaQuery,
|
|
3678
|
+
es as useToastManager
|
|
2490
3679
|
};
|
|
2491
3680
|
//# sourceMappingURL=index.js.map
|