@glasshome/ui 0.3.3 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/solid/alert.d.ts +20 -13
- package/dist/solid/badge.d.ts +23 -1
- package/dist/solid/button.d.ts +2 -1
- package/dist/solid/index.d.ts +2 -2
- package/dist/solid/index.js +2739 -2509
- package/dist/tokens/hex.d.ts +6 -0
- package/dist/tokens/index.d.ts +7 -0
- package/dist/tokens/index.js +223 -0
- package/dist/tokens/presets.d.ts +17 -0
- package/dist/tokens/theme-colors.d.ts +51 -0
- package/package.json +7 -1
- package/src/styles/theme.css +16 -2
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
SolidJS component library for GlassHome, built on [Kobalte](https://kobalte.dev).
|
|
4
4
|
|
|
5
|
-
56 accessible, theme-aware components plus utility functions and a Tailwind v4 CSS preset — everything you need to build smart-home dashboards.
|
|
5
|
+
56 accessible, theme-aware components plus utility functions and a Tailwind v4 CSS preset — everything you need to build smart-home dashboards. Powers [GlassHome](https://glasshome.app), the local-first dashboard for Home Assistant.
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
package/dist/solid/alert.d.ts
CHANGED
|
@@ -1,15 +1,22 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { type Component, type ComponentProps, type JSX } from "solid-js";
|
|
2
|
+
/**
|
|
3
|
+
* Tone-driven alert (the design formerly known as hub's SectionAlert). One
|
|
4
|
+
* component, four tones, both themes, all color from theme vars via color-mix.
|
|
5
|
+
* Text mixes in oklab (not oklch) so a hued tone desaturates toward neutral
|
|
6
|
+
* with its hue intact instead of swinging toward yellow.
|
|
7
|
+
*/
|
|
8
|
+
export type AlertTone = "info" | "warning" | "success" | "destructive";
|
|
9
|
+
type AlertProps = ComponentProps<"div"> & {
|
|
10
|
+
tone?: AlertTone;
|
|
11
|
+
/** Override the default per-tone icon with any JSX (e.g. a lucide-solid icon). */
|
|
12
|
+
icon?: JSX.Element;
|
|
13
|
+
/** Bold heading line. */
|
|
14
|
+
title?: JSX.Element;
|
|
15
|
+
/** Trailing element pinned right (e.g. a Button). */
|
|
16
|
+
action?: JSX.Element;
|
|
17
|
+
};
|
|
18
|
+
declare const Alert: Component<AlertProps>;
|
|
19
|
+
/** Back-compat sub-parts for the older compound usage (Alert > AlertTitle/Description). */
|
|
13
20
|
declare const AlertTitle: Component<ComponentProps<"div">>;
|
|
14
21
|
declare const AlertDescription: Component<ComponentProps<"div">>;
|
|
15
|
-
export { Alert, AlertDescription, AlertTitle
|
|
22
|
+
export { Alert, AlertDescription, AlertTitle };
|
package/dist/solid/badge.d.ts
CHANGED
|
@@ -11,6 +11,28 @@ declare const badgeVariants: (props?: ({
|
|
|
11
11
|
})) | undefined) => string;
|
|
12
12
|
type BadgeProps = ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
|
|
13
13
|
component?: ValidComponent;
|
|
14
|
+
/**
|
|
15
|
+
* Glass tone chip: pass any CSS color (a semantic token like var(--success)
|
|
16
|
+
* or an arbitrary categorical hue) and the badge renders as a frosted tinted
|
|
17
|
+
* pill, both themes, no dark: overrides. Overrides `variant` when set.
|
|
18
|
+
*/
|
|
19
|
+
tone?: string;
|
|
20
|
+
/** With `tone`: render a lit status dot before the label. */
|
|
21
|
+
dot?: boolean;
|
|
14
22
|
};
|
|
15
23
|
declare const Badge: Component<BadgeProps>;
|
|
16
|
-
|
|
24
|
+
type TierBadgeProps = ComponentProps<"span"> & {
|
|
25
|
+
/** Gradient high stop (both ends of the diagonal sweep). */
|
|
26
|
+
hi: string;
|
|
27
|
+
/** Gradient low stop (the mid dip). */
|
|
28
|
+
lo: string;
|
|
29
|
+
/** Dark label color. */
|
|
30
|
+
text: string;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Metallic tier chip (PRO / EARLY BIRD / CREATOR): a brushed-metal pill with a
|
|
34
|
+
* 135deg corner-to-corner sweep (bright ends, dip in the middle) and dark text.
|
|
35
|
+
* One family; only the hi/lo/text triplet changes per tier.
|
|
36
|
+
*/
|
|
37
|
+
declare const TierBadge: Component<TierBadgeProps>;
|
|
38
|
+
export { Badge, badgeVariants, TierBadge };
|
package/dist/solid/button.d.ts
CHANGED
|
@@ -2,8 +2,9 @@ import { Button as KobalteButton } from "@kobalte/core/button";
|
|
|
2
2
|
import { type VariantProps } from "cva";
|
|
3
3
|
import { type ComponentProps } from "solid-js";
|
|
4
4
|
declare const buttonVariants: (props?: ({
|
|
5
|
-
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | undefined;
|
|
5
|
+
variant?: "link" | "default" | "gradient" | "destructive" | "outline" | "secondary" | "ghost" | undefined;
|
|
6
6
|
size?: "default" | "sm" | "lg" | "icon" | undefined;
|
|
7
|
+
shape?: "rounded" | "pill" | undefined;
|
|
7
8
|
} & ({
|
|
8
9
|
class?: import("cva").ClassValue;
|
|
9
10
|
className?: never;
|
package/dist/solid/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export { type Color, parseColor } from "@kobalte/core/colors";
|
|
2
2
|
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, } from "./accordion";
|
|
3
|
-
export { Alert, AlertDescription, AlertTitle
|
|
3
|
+
export { Alert, type AlertTone, AlertDescription, AlertTitle } from "./alert";
|
|
4
4
|
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, } from "./alert-dialog";
|
|
5
5
|
export { AreaPicker } from "./area-picker";
|
|
6
6
|
export { AspectRatio } from "./aspect-ratio";
|
|
7
7
|
export { Avatar, AvatarFallback, AvatarImage } from "./avatar";
|
|
8
|
-
export { Badge, badgeVariants } from "./badge";
|
|
8
|
+
export { Badge, badgeVariants, TierBadge } from "./badge";
|
|
9
9
|
export { BottomSheet, BottomSheetBody, BottomSheetClose, BottomSheetContent, BottomSheetDescription, BottomSheetFooter, BottomSheetHandle, BottomSheetHeader, BottomSheetOverlay, BottomSheetPortal, BottomSheetTitle, BottomSheetTrigger, } from "./bottom-sheet";
|
|
10
10
|
export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, } from "./breadcrumb";
|
|
11
11
|
export { Button, buttonVariants } from "./button";
|