@glasshome/ui 1.17.0 → 1.19.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.
Files changed (66) hide show
  1. package/SPEC.md +83 -2
  2. package/dist/index.js +2 -2
  3. package/dist/lib/button-variants.d.ts +4 -1
  4. package/dist/lib/card-classes.d.ts +4 -4
  5. package/dist/lib/motion-classes.d.ts +1 -0
  6. package/dist/lib/overlay-classes.d.ts +4 -2
  7. package/dist/lib/pill-classes.d.ts +1 -1
  8. package/dist/lib/spotlight-geometry.d.ts +22 -0
  9. package/dist/lib/thumb-classes.d.ts +1 -0
  10. package/dist/lib/tier-badge.d.ts +1 -1
  11. package/dist/solid/button.d.ts +8 -3
  12. package/dist/solid/dock.d.ts +9 -0
  13. package/dist/solid/docked-panel.d.ts +11 -0
  14. package/dist/solid/index.d.ts +6 -2
  15. package/dist/solid/index.js +4399 -4034
  16. package/dist/solid/option-card.d.ts +1 -1
  17. package/dist/solid/preview-tile.d.ts +33 -0
  18. package/dist/solid/spotlight.d.ts +14 -0
  19. package/dist/solid/swatch-picker.d.ts +12 -0
  20. package/dist/solid/tabs.d.ts +4 -1
  21. package/dist/solid/widget-identity.d.ts +2 -0
  22. package/dist/tokens/index.d.ts +3 -0
  23. package/dist/tokens/index.js +481 -67
  24. package/dist/tokens/material.d.ts +40 -0
  25. package/dist/tokens/presets.d.ts +3 -0
  26. package/dist/tokens/readability.d.ts +21 -0
  27. package/dist/tokens/theme-colors.d.ts +13 -3
  28. package/dist/tokens/theme-recipe.d.ts +33 -0
  29. package/dist/{utils-DMaksjvy.js → utils-CV6G6fr8.js} +343 -340
  30. package/package.json +2 -2
  31. package/src/lib/button-variants.ts +10 -7
  32. package/src/lib/card-classes.ts +4 -3
  33. package/src/lib/motion-classes.ts +5 -0
  34. package/src/lib/overlay-classes.ts +10 -2
  35. package/src/lib/pill-classes.ts +4 -3
  36. package/src/lib/spotlight-geometry.ts +90 -0
  37. package/src/lib/thumb-classes.ts +7 -0
  38. package/src/lib/tier-badge.ts +1 -1
  39. package/src/solid/button.tsx +17 -2
  40. package/src/solid/carousel.tsx +2 -2
  41. package/src/solid/data-table.tsx +2 -2
  42. package/src/solid/dock.tsx +67 -9
  43. package/src/solid/docked-panel.tsx +56 -0
  44. package/src/solid/hero-action.tsx +2 -2
  45. package/src/solid/icon-picker.tsx +1 -1
  46. package/src/solid/index.ts +11 -2
  47. package/src/solid/media-tile.tsx +1 -1
  48. package/src/solid/option-card.tsx +25 -31
  49. package/src/solid/preview-tile.tsx +79 -0
  50. package/src/solid/radio-group.tsx +7 -2
  51. package/src/solid/section-card.tsx +4 -2
  52. package/src/solid/sliding-indicator.tsx +13 -12
  53. package/src/solid/spotlight.tsx +179 -0
  54. package/src/solid/swatch-picker.tsx +47 -0
  55. package/src/solid/switch.tsx +5 -2
  56. package/src/solid/tabs.tsx +20 -4
  57. package/src/solid/toggle-group.tsx +1 -4
  58. package/src/solid/widget-identity.tsx +3 -1
  59. package/src/styles/globals.css +166 -14
  60. package/src/styles/theme.css +22 -3
  61. package/src/tokens/index.ts +3 -0
  62. package/src/tokens/material.ts +116 -0
  63. package/src/tokens/presets.ts +201 -62
  64. package/src/tokens/readability.ts +67 -0
  65. package/src/tokens/theme-colors.ts +15 -3
  66. package/src/tokens/theme-recipe.ts +161 -0
@@ -19,7 +19,7 @@ export declare function OptionCard(props: {
19
19
  description?: string;
20
20
  icon?: string;
21
21
  iconImage?: string;
22
- /** Per-option tone at rest (setup's brand colours); neutral by default. */
22
+ /** Per-option tone (setup's brand colours); the theme primary when absent. */
23
23
  accentVar?: string;
24
24
  /** Drop the check when picking the card is itself the next step. */
25
25
  ornament?: "check" | "none";
@@ -0,0 +1,33 @@
1
+ import type { JSX } from "solid-js";
2
+ declare const COLUMNS: {
3
+ readonly 2: "grid-cols-2";
4
+ readonly 3: "grid-cols-3";
5
+ readonly 4: "grid-cols-4";
6
+ };
7
+ declare const SHAPE: {
8
+ readonly wide: "aspect-[16/10]";
9
+ readonly tile: "aspect-[5/4]";
10
+ };
11
+ export declare function PreviewTileGroup(props: {
12
+ value: string | null;
13
+ onChange: (value: string) => void;
14
+ "aria-label": string;
15
+ columns?: keyof typeof COLUMNS;
16
+ class?: string;
17
+ children: JSX.Element;
18
+ }): JSX.Element;
19
+ /** A choice shown as what it produces: a picture, a preview card, a shape. */
20
+ export declare function PreviewTile(props: {
21
+ value: string;
22
+ label: string;
23
+ /** Off for pictures that name themselves; the label still reaches assistive tech. */
24
+ caption?: boolean;
25
+ icon?: string;
26
+ shape?: keyof typeof SHAPE;
27
+ disabled?: boolean;
28
+ class?: string;
29
+ /** Fires on every click, including a re-pick of the checked tile. */
30
+ onPick?: () => void;
31
+ children: JSX.Element;
32
+ }): JSX.Element;
33
+ export {};
@@ -0,0 +1,14 @@
1
+ import { type Component, type JSX } from "solid-js";
2
+ interface SpotlightProps {
3
+ target: Element | undefined;
4
+ /** What the bubble is placed against and the tail points at. Defaults to `target`. */
5
+ anchor?: Element;
6
+ scrim: boolean;
7
+ blocking?: boolean;
8
+ pad?: number;
9
+ onSkip?: () => void;
10
+ class?: string;
11
+ children: JSX.Element;
12
+ }
13
+ declare const Spotlight: Component<SpotlightProps>;
14
+ export { Spotlight };
@@ -0,0 +1,12 @@
1
+ import type { JSX } from "solid-js";
2
+ /** One colour out of a few, as swatches sharing one row; `children` is the custom slot at the end (a picker). */
3
+ export declare function SwatchPicker(props: {
4
+ value: string | null;
5
+ colors: readonly string[];
6
+ onChange: (color: string) => void;
7
+ "aria-label": string;
8
+ /** Names each swatch for assistive tech. */
9
+ labelOf?: (color: string, index: number) => string;
10
+ class?: string;
11
+ children?: JSX.Element;
12
+ }): JSX.Element;
@@ -9,6 +9,9 @@ type TabsProps = ComponentProps<typeof TabsPrimitive> & {
9
9
  };
10
10
  declare const Tabs: Component<TabsProps>;
11
11
  declare const TabsList: Component<ComponentProps<typeof TabsPrimitive.List>>;
12
- declare const TabsTrigger: Component<ComponentProps<typeof TabsPrimitive.Trigger>>;
12
+ /** `icon` stacks a glyph over the word, so a tab row reads apart from the toggle groups under it. */
13
+ declare const TabsTrigger: Component<ComponentProps<typeof TabsPrimitive.Trigger> & {
14
+ icon?: string;
15
+ }>;
13
16
  declare const TabsContent: Component<ComponentProps<typeof TabsPrimitive.Content>>;
14
17
  export { Tabs, TabsContent, TabsList, TabsTrigger };
@@ -36,6 +36,8 @@ type WidgetIdentityProps = {
36
36
  widget: WidgetSummary;
37
37
  /** Icon pill size. Rows use sm, tiles use md. */
38
38
  iconSize?: "sm" | "md";
39
+ /** CSS color for the icon pill; neutral when unset. */
40
+ iconTone?: string;
39
41
  /** Append `v{latestVersion}` next to the name. Default true. */
40
42
  showVersionInline?: boolean;
41
43
  /** Show the (personal/org) scope pill after the @scope/name line. */
@@ -3,6 +3,9 @@
3
3
  * styles/theme.css (presets.ts is the machine-readable form of that palette).
4
4
  */
5
5
  export * from "./hex.js";
6
+ export * from "./material.js";
6
7
  export * from "./presets.js";
8
+ export * from "./readability.js";
7
9
  export * from "./theme-colors.js";
8
10
  export { contrastRatio, parseThemeBlock } from "./theme-css.js";
11
+ export * from "./theme-recipe.js";