@glasshome/ui 1.8.0 → 1.9.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/SPEC.md +2 -1
- package/dist/solid/index.d.ts +1 -1
- package/dist/solid/index.js +514 -472
- package/dist/solid/section-card.d.ts +17 -1
- package/package.json +1 -1
- package/scripts/check-ui-drift.mjs +5 -0
- package/src/styles/theme.css +12 -0
|
@@ -35,7 +35,9 @@ type ListRowProps = {
|
|
|
35
35
|
actions?: JSX.Element;
|
|
36
36
|
/** Activates the whole row. Renders a chevron when there are no actions. */
|
|
37
37
|
onOpen?: () => void;
|
|
38
|
-
/**
|
|
38
|
+
/** The whole row is a link. Same chevron and press target as onOpen. */
|
|
39
|
+
href?: string;
|
|
40
|
+
/** Accessible name for the whole-row activation; required with href or onOpen. */
|
|
39
41
|
openLabel?: string;
|
|
40
42
|
class?: string;
|
|
41
43
|
};
|
|
@@ -57,10 +59,24 @@ export declare function SectionTitle(props: {
|
|
|
57
59
|
children: JSX.Element;
|
|
58
60
|
class?: string;
|
|
59
61
|
}): JSX.Element;
|
|
62
|
+
/** @deprecated A bare heading has no owner: `SectionGroup` for a labelled group
|
|
63
|
+
* inside a card, `FieldLegend` for a titled group of form rows. */
|
|
60
64
|
export declare function SectionSubtitle(props: {
|
|
61
65
|
children: JSX.Element;
|
|
62
66
|
class?: string;
|
|
63
67
|
}): JSX.Element;
|
|
68
|
+
/** One labelled group inside a `SectionCard`: icon, label, optional count and
|
|
69
|
+
* action, then its rows. Proximity does the grouping, so a label sits close to
|
|
70
|
+
* its own rows and far from the group above; no rule is drawn. A zero count
|
|
71
|
+
* renders no pill: the empty group below already says it. */
|
|
72
|
+
export declare function SectionGroup(props: {
|
|
73
|
+
icon: string;
|
|
74
|
+
label: JSX.Element;
|
|
75
|
+
count?: number | string;
|
|
76
|
+
action?: JSX.Element;
|
|
77
|
+
class?: string;
|
|
78
|
+
children: JSX.Element;
|
|
79
|
+
}): JSX.Element;
|
|
64
80
|
/** @deprecated SectionMeta, or FieldLegend for a titled group of rows. */
|
|
65
81
|
export declare function SectionLabel(props: {
|
|
66
82
|
children: JSX.Element;
|
package/package.json
CHANGED
|
@@ -38,6 +38,11 @@ const RULES = [
|
|
|
38
38
|
/border-input\s[^"'`]*bg-(?:background|transparent)\b/,
|
|
39
39
|
"use INPUT_CLASS / INPUT_SURFACE / FIELD_CHROME from @glasshome/ui",
|
|
40
40
|
],
|
|
41
|
+
[
|
|
42
|
+
"hand-rolled group header",
|
|
43
|
+
/<SectionSubtitle\b/,
|
|
44
|
+
"a labelled group inside a card is <SectionGroup icon label count action>; an empty state is <Empty> + parts; a list row is <ListRow>",
|
|
45
|
+
],
|
|
41
46
|
[
|
|
42
47
|
"solid badge",
|
|
43
48
|
/border-transparent\s+bg-primary\s+text-primary-foreground/,
|
package/src/styles/theme.css
CHANGED
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
--color-warning: var(--warning);
|
|
24
24
|
--color-primary-tint-foreground: var(--primary-tint-foreground);
|
|
25
25
|
--color-accent-tint-foreground: var(--accent-tint-foreground);
|
|
26
|
+
--color-warning-tint-foreground: var(--warning-tint-foreground);
|
|
27
|
+
--color-love: var(--love);
|
|
26
28
|
--color-chart-1: var(--chart-1);
|
|
27
29
|
--color-chart-2: var(--chart-2);
|
|
28
30
|
--color-chart-3: var(--chart-3);
|
|
@@ -31,6 +33,8 @@
|
|
|
31
33
|
--font-sans: var(--font-sans);
|
|
32
34
|
--font-mono: var(--font-mono);
|
|
33
35
|
--font-serif: var(--font-serif);
|
|
36
|
+
--font-caveat: var(--font-caveat);
|
|
37
|
+
--font-bebas: var(--font-bebas);
|
|
34
38
|
|
|
35
39
|
/* Below --radius-sm: a box small enough that the theme's smallest token would
|
|
36
40
|
round it into a circle (checkbox, OTP slot). Clamped, so a tiny --radius
|
|
@@ -187,6 +191,8 @@
|
|
|
187
191
|
--warning: oklch(0.52 0.13 85);
|
|
188
192
|
--primary-tint-foreground: oklch(0.42 0.2 215.221);
|
|
189
193
|
--accent-tint-foreground: oklch(0.46 0.16 195);
|
|
194
|
+
--warning-tint-foreground: oklch(0.52 0.11 70);
|
|
195
|
+
--love: oklch(0.66 0.22 16);
|
|
190
196
|
--destructive: oklch(0.54 0.19 23.0704);
|
|
191
197
|
--destructive-foreground: oklch(1 0 0);
|
|
192
198
|
--border: oklch(0.855 0.014 250);
|
|
@@ -219,6 +225,8 @@
|
|
|
219
225
|
--font-sans: "Geist Variable", ui-sans-serif, system-ui, sans-serif;
|
|
220
226
|
--font-serif: "Geist Variable", ui-sans-serif, system-ui, sans-serif;
|
|
221
227
|
--font-mono: "GeistMono Variable", "JetBrains Mono", "Fira Code", Consolas, monospace;
|
|
228
|
+
--font-caveat: "Caveat Variable", cursive;
|
|
229
|
+
--font-bebas: "Bebas Neue", ui-sans-serif, system-ui, sans-serif;
|
|
222
230
|
--radius: 1.4rem;
|
|
223
231
|
--shadow-x: 0px;
|
|
224
232
|
--shadow-y: 2px;
|
|
@@ -272,6 +280,8 @@
|
|
|
272
280
|
--warning: oklch(0.78 0.14 85);
|
|
273
281
|
--primary-tint-foreground: oklch(0.78 0.16 215.221);
|
|
274
282
|
--accent-tint-foreground: oklch(0.8 0.14 195);
|
|
283
|
+
--warning-tint-foreground: oklch(0.82 0.13 85);
|
|
284
|
+
--love: oklch(0.72 0.19 14);
|
|
275
285
|
--destructive: oklch(0.7106 0.1661 22.2162);
|
|
276
286
|
--destructive-foreground: oklch(1 0 0);
|
|
277
287
|
--border: oklch(0.26 0.012 250);
|
|
@@ -298,6 +308,8 @@
|
|
|
298
308
|
--font-sans: "Geist Variable", ui-sans-serif, system-ui, sans-serif;
|
|
299
309
|
--font-serif: "Geist Variable", ui-sans-serif, system-ui, sans-serif;
|
|
300
310
|
--font-mono: "GeistMono Variable", "JetBrains Mono", "Fira Code", Consolas, monospace;
|
|
311
|
+
--font-caveat: "Caveat Variable", cursive;
|
|
312
|
+
--font-bebas: "Bebas Neue", ui-sans-serif, system-ui, sans-serif;
|
|
301
313
|
--radius: 1.4rem;
|
|
302
314
|
--shadow-x: 0px;
|
|
303
315
|
--shadow-y: 2px;
|