@glasshome/ui 1.4.0 → 1.6.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 +5 -0
- package/dist/index.js +1 -1
- package/dist/lib/carousel-classes.d.ts +10 -1
- package/dist/lib/tier-badge.d.ts +1 -1
- package/dist/solid/area-picker.d.ts +15 -3
- package/dist/solid/field.d.ts +3 -1
- package/dist/solid/hero-action.d.ts +39 -0
- package/dist/solid/image-picker.d.ts +8 -0
- package/dist/solid/index.d.ts +9 -1
- package/dist/solid/index.js +5511 -4513
- package/dist/solid/media-copy.d.ts +4 -0
- package/dist/solid/media-store.d.ts +55 -0
- package/dist/solid/media-tile.d.ts +15 -0
- package/dist/solid/option-card.d.ts +17 -0
- package/dist/solid/password-input.d.ts +9 -0
- package/dist/solid/popover.d.ts +5 -1
- package/dist/solid/radio-group.d.ts +3 -1
- package/dist/solid/responsive-dialog.d.ts +5 -1
- package/dist/solid/schema-form.d.ts +1 -1
- package/dist/solid/settings-row.d.ts +4 -0
- package/dist/solid/step-indicator.d.ts +10 -0
- package/dist/solid/switch.d.ts +3 -6
- package/dist/{utils-B020EZLJ.js → utils-8e8QCynI.js} +6 -2
- package/package.json +1 -1
- package/src/lib/carousel-classes.ts +18 -7
- package/src/lib/tier-badge.ts +1 -1
- package/src/styles/globals.css +10 -9
- package/src/styles/theme.css +0 -4
package/SPEC.md
CHANGED
|
@@ -106,6 +106,11 @@ role clears 4.5:1 against `--background`/`--card`/`--popover`/`--muted` (3:1 for
|
|
|
106
106
|
| a modal | `<ResponsiveDialog>` (desktop dialog + mobile bottom sheet), `<Dialog>` for desktop-only | `<Sheet side="bottom">` as a modal |
|
|
107
107
|
| a status chip | `<Badge tone="var(--success)">` | `rounded-full bg-green-500/10` |
|
|
108
108
|
| a callout | `<Alert tone="warning">` | `border-amber-500/30 bg-amber-500/10` |
|
|
109
|
+
| a titled group of form rows | `<FieldSet>` + `<FieldLegend>` (+ `<FieldDescription>`) | a tracked uppercase `SectionLabel` eyebrow |
|
|
110
|
+
| rows that belong to the row above them | `<FieldSubGroup>` | a bare `<Separator>` and a left pad |
|
|
111
|
+
| picking one of a few described choices | `<OptionCardGroup>` + `<OptionCard>` | a hand-rolled `role="radio"` card list |
|
|
112
|
+
| picking one area, or several | `<AreaPicker>` (`values` + `onValuesChange` for multi) | a hand-rolled checkbox list of areas |
|
|
113
|
+
| position inside a multi-step flow | `<StepIndicator count index>` | a hand-rolled row of dots |
|
|
109
114
|
| tinted text alone | `glassToneText(tone)` | ad-hoc color-mix |
|
|
110
115
|
| a metallic tier chip | `<TierBadge>` | gradients by hand |
|
|
111
116
|
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as e, A as t, B as n, C as r, D as i, E as a, G as o, K as s, M as c, O as l, Q as u, S as d, T as f, U as p, V as m, W as h, X as g, Y as _, Z as v, _ as y, a as b, at as x, b as S, c as C, d as w, et as T, f as E, g as D, h as O, i as ee, it as k, k as A, l as j, m as M, n as N, nt as P, o as F, ot as I, p as L, q as R, r as z, rt as B, s as V, t as H, tt as U, u as W, v as G, w as K, x as q, y as J, z as Y } from "./utils-
|
|
1
|
+
import { $ as e, A as t, B as n, C as r, D as i, E as a, G as o, K as s, M as c, O as l, Q as u, S as d, T as f, U as p, V as m, W as h, X as g, Y as _, Z as v, _ as y, a as b, at as x, b as S, c as C, d as w, et as T, f as E, g as D, h as O, i as ee, it as k, k as A, l as j, m as M, n as N, nt as P, o as F, ot as I, p as L, q as R, r as z, rt as B, s as V, t as H, tt as U, u as W, v as G, w as K, x as q, y as J, z as Y } from "./utils-8e8QCynI.js";
|
|
2
2
|
import { createSignal as X, onCleanup as Z, onMount as Q } from "solid-js";
|
|
3
3
|
//#region src/lib/use-is-mobile.ts
|
|
4
4
|
var $ = 768;
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
export type CarouselTransition = "slide" | "fade" | "wipe";
|
|
2
2
|
export declare const CAROUSEL_VIEWPORT = "h-full overflow-hidden";
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* Only wipe stacks in CSS. Fade keeps embla's standard flex track, which is the
|
|
5
|
+
* structure its plugin is built for: embla reads each snap from the slide's
|
|
6
|
+
* offset along the axis, and the plugin then translates every slide back onto
|
|
7
|
+
* the viewport to cross-fade them. Slides sharing one grid cell share offset 0,
|
|
8
|
+
* so every snap collapses onto the same point and a pointer drag has no
|
|
9
|
+
* distance to resolve: it never changes slide. Index-driven navigation
|
|
10
|
+
* (autoplay, arrows, dots) survives the collapse, which is why wipe still
|
|
11
|
+
* advances.
|
|
12
|
+
*/
|
|
4
13
|
export declare function carouselTrack(transition: CarouselTransition, orientation?: "horizontal" | "vertical"): string;
|
|
5
14
|
export declare function carouselItem(transition: CarouselTransition, orientation?: "horizontal" | "vertical"): string;
|
|
6
15
|
export declare const CAROUSEL_DOTS = "flex items-center justify-center gap-2";
|
package/dist/lib/tier-badge.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const TIER_BADGE_CLASS = "inline-flex cursor-default select-none items-center rounded-full px-2 py-0.5 font-black text-[10px]
|
|
1
|
+
export declare const TIER_BADGE_CLASS = "inline-flex cursor-default select-none items-center rounded-full px-2 py-0.5 font-black text-[10px] tracking-wide";
|
|
2
2
|
/** Optional sweep shaping. Default is the symmetric brushed look (both ends
|
|
3
3
|
* `hi`, dipping to `lo` at the midpoint). The collectible/license golds are a
|
|
4
4
|
* lit bevel instead: they dip early and land on a darker `end`. */
|
|
@@ -1,9 +1,21 @@
|
|
|
1
|
-
interface
|
|
2
|
-
value: string;
|
|
3
|
-
onChange: (value: string) => void;
|
|
1
|
+
interface AreaPickerBaseProps {
|
|
4
2
|
placeholder?: string;
|
|
5
3
|
class?: string;
|
|
6
4
|
allowClear?: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
interface AreaPickerSingleProps extends AreaPickerBaseProps {
|
|
8
|
+
value: string;
|
|
9
|
+
onChange: (value: string) => void;
|
|
10
|
+
values?: undefined;
|
|
11
|
+
onValuesChange?: undefined;
|
|
12
|
+
}
|
|
13
|
+
interface AreaPickerMultiProps extends AreaPickerBaseProps {
|
|
14
|
+
values: string[];
|
|
15
|
+
onValuesChange: (values: string[]) => void;
|
|
16
|
+
value?: undefined;
|
|
17
|
+
onChange?: undefined;
|
|
7
18
|
}
|
|
19
|
+
type AreaPickerProps = AreaPickerSingleProps | AreaPickerMultiProps;
|
|
8
20
|
export declare function AreaPicker(props: AreaPickerProps): import("solid-js").JSX.Element;
|
|
9
21
|
export {};
|
package/dist/solid/field.d.ts
CHANGED
|
@@ -41,10 +41,12 @@ declare const FieldContent: Component<ComponentProps<"div">>;
|
|
|
41
41
|
declare const FieldLabel: Component<ComponentProps<typeof Label>>;
|
|
42
42
|
declare const FieldTitle: Component<ComponentProps<"div">>;
|
|
43
43
|
declare const FieldDescription: Component<ComponentProps<"p">>;
|
|
44
|
+
/** Rows that belong to the control above them: stacked flush, grouped by proximity alone. */
|
|
45
|
+
declare const FieldSubGroup: Component<ComponentProps<"div">>;
|
|
44
46
|
declare const FieldSeparator: ParentComponent<ComponentProps<"div">>;
|
|
45
47
|
declare const FieldError: Component<ComponentProps<"div"> & {
|
|
46
48
|
errors?: Array<{
|
|
47
49
|
message?: string;
|
|
48
50
|
} | undefined>;
|
|
49
51
|
}>;
|
|
50
|
-
export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, };
|
|
52
|
+
export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldSubGroup, FieldTitle, };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type JSX } from "solid-js";
|
|
2
|
+
/** Navigates away immediately on click — the setup wizard's connect/sign-in
|
|
3
|
+
* steps. Not part of a group, no persisted selection. */
|
|
4
|
+
export declare function HeroAction(props: {
|
|
5
|
+
icon: string;
|
|
6
|
+
iconImage?: string;
|
|
7
|
+
title: string;
|
|
8
|
+
description: string;
|
|
9
|
+
onClick: () => void;
|
|
10
|
+
accentVar: string;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
recommended?: boolean;
|
|
13
|
+
recommendedHint?: string;
|
|
14
|
+
class?: string;
|
|
15
|
+
}): JSX.Element;
|
|
16
|
+
/** A `HeroAction` used inside `OptionCardGroup` as a persisted, revisable
|
|
17
|
+
* choice instead of a one-shot navigation button — People's pick-one
|
|
18
|
+
* dialogs. Radio semantics (role, aria-checked, keyboard nav) come from
|
|
19
|
+
* `RadioGroupItem`, same accessible door as `OptionCard`. */
|
|
20
|
+
export declare function HeroOption(props: {
|
|
21
|
+
value: string;
|
|
22
|
+
icon: string;
|
|
23
|
+
iconImage?: string;
|
|
24
|
+
title: string;
|
|
25
|
+
description: string;
|
|
26
|
+
/** Neutral by default — People's pickers don't carry setup's per-option
|
|
27
|
+
* brand colors. */
|
|
28
|
+
accentVar?: string;
|
|
29
|
+
/** Drop the tick when picking the card is itself the next step. */
|
|
30
|
+
ornament?: "check" | "none";
|
|
31
|
+
/** Fires on every click, including a re-pick of the already-checked card,
|
|
32
|
+
* which `onChange` alone never reports. */
|
|
33
|
+
onPick?: () => void;
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
/** Content revealed under the card when it's the picked option (e.g. a
|
|
36
|
+
* nested field), same slot `OptionCard` offers. */
|
|
37
|
+
children?: JSX.Element;
|
|
38
|
+
class?: string;
|
|
39
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface ImagePickerProps {
|
|
2
|
+
/** Sits on the trigger so a LabeledField's <Label for> points at a real control. */
|
|
3
|
+
id?: string;
|
|
4
|
+
value: string;
|
|
5
|
+
onChange: (id: string) => void;
|
|
6
|
+
class?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function ImagePicker(props: ImagePickerProps): import("solid-js").JSX.Element;
|
package/dist/solid/index.d.ts
CHANGED
|
@@ -31,10 +31,12 @@ export { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem,
|
|
|
31
31
|
export { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, } from "./empty.js";
|
|
32
32
|
export { type AreaViewLike, type EntityDataAdapter, EntityDataContext, type EntityViewLike, provideEntityData, useEntityData, } from "./entity-data.js";
|
|
33
33
|
export { EntitySelector } from "./entity-selector.js";
|
|
34
|
-
export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, } from "./field.js";
|
|
34
|
+
export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldSubGroup, FieldTitle, } from "./field.js";
|
|
35
35
|
export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField, } from "./form.js";
|
|
36
|
+
export { HeroAction, HeroOption } from "./hero-action.js";
|
|
36
37
|
export { HoverCard, HoverCardContent, HoverCardTrigger, } from "./hover-card.js";
|
|
37
38
|
export { IconPicker, type IconPickerProps } from "./icon-picker.js";
|
|
39
|
+
export { ImagePicker, type ImagePickerProps } from "./image-picker.js";
|
|
38
40
|
export { Input } from "./input.js";
|
|
39
41
|
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, } from "./input-group.js";
|
|
40
42
|
export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, } from "./input-otp.js";
|
|
@@ -43,10 +45,15 @@ export { Kbd, KbdGroup } from "./kbd.js";
|
|
|
43
45
|
export { Label } from "./label.js";
|
|
44
46
|
export { createListReorder, dragTargetIndex, type ListReorder, type ListReorderOptions, } from "./list-reorder.js";
|
|
45
47
|
export { Logo } from "./logo.js";
|
|
48
|
+
export { mediaIndexErrorCopy, mediaStoreErrorCopy, toMediaStoreError, } from "./media-copy.js";
|
|
49
|
+
export { type BrokenMedia, createBrokenMedia, imageUrl, isMediaImage, MEDIA_PAGE_SIZE, type MediaIndex, type MediaQuotaUsage, type MediaStore, MediaStoreContext, MediaStoreError, type MediaStoreErrorKind, type MediaVariant, mediaUrl, provideMediaStore, type StoredMedia, sortMediaForClearing, useMediaStore, } from "./media-store.js";
|
|
50
|
+
export { MediaTile, type MediaTileProps } from "./media-tile.js";
|
|
46
51
|
export { NumberField } from "./number-field.js";
|
|
52
|
+
export { OptionCard, OptionCardGroup } from "./option-card.js";
|
|
47
53
|
export { Overlay } from "./overlay.js";
|
|
48
54
|
export { PageHeader } from "./page-header.js";
|
|
49
55
|
export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, } from "./pagination.js";
|
|
56
|
+
export { PasswordInput } from "./password-input.js";
|
|
50
57
|
export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger, } from "./popover.js";
|
|
51
58
|
export { Progress } from "./progress.js";
|
|
52
59
|
export { RadioGroup, RadioGroupItem } from "./radio-group.js";
|
|
@@ -65,6 +72,7 @@ export { Slider } from "./slider.js";
|
|
|
65
72
|
export { SlidingIndicator } from "./sliding-indicator.js";
|
|
66
73
|
export { GlassToast, Toaster, toast } from "./sonner.js";
|
|
67
74
|
export { Spinner } from "./spinner.js";
|
|
75
|
+
export { StepIndicator } from "./step-indicator.js";
|
|
68
76
|
export { Switch } from "./switch.js";
|
|
69
77
|
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, } from "./table.js";
|
|
70
78
|
export { Tabs, TabsContent, TabsList, TabsTrigger } from "./tabs.js";
|