@glasshome/ui 1.5.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 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
 
@@ -1,9 +1,21 @@
1
- interface AreaPickerProps {
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 {};
@@ -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;
@@ -31,8 +31,9 @@ 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";
38
39
  export { ImagePicker, type ImagePickerProps } from "./image-picker.js";
@@ -48,9 +49,11 @@ export { mediaIndexErrorCopy, mediaStoreErrorCopy, toMediaStoreError, } from "./
48
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";
49
50
  export { MediaTile, type MediaTileProps } from "./media-tile.js";
50
51
  export { NumberField } from "./number-field.js";
52
+ export { OptionCard, OptionCardGroup } from "./option-card.js";
51
53
  export { Overlay } from "./overlay.js";
52
54
  export { PageHeader } from "./page-header.js";
53
55
  export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, } from "./pagination.js";
56
+ export { PasswordInput } from "./password-input.js";
54
57
  export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger, } from "./popover.js";
55
58
  export { Progress } from "./progress.js";
56
59
  export { RadioGroup, RadioGroupItem } from "./radio-group.js";
@@ -69,6 +72,7 @@ export { Slider } from "./slider.js";
69
72
  export { SlidingIndicator } from "./sliding-indicator.js";
70
73
  export { GlassToast, Toaster, toast } from "./sonner.js";
71
74
  export { Spinner } from "./spinner.js";
75
+ export { StepIndicator } from "./step-indicator.js";
72
76
  export { Switch } from "./switch.js";
73
77
  export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, } from "./table.js";
74
78
  export { Tabs, TabsContent, TabsList, TabsTrigger } from "./tabs.js";