@glasshome/ui 1.0.1 → 1.1.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/dist/index.d.ts +1 -0
- package/dist/index.js +9 -9
- package/dist/lib/carousel-classes.d.ts +7 -0
- package/dist/lib/carousel-init.d.ts +9 -0
- package/dist/solid/carousel.d.ts +7 -1
- package/dist/solid/icon-picker.d.ts +14 -0
- package/dist/solid/index.d.ts +4 -3
- package/dist/solid/index.js +4011 -3533
- package/dist/solid/schema-form.d.ts +3 -0
- package/dist/solid/section-card.d.ts +1 -0
- package/dist/solid/settings-row.d.ts +9 -2
- package/dist/{utils-gbdcvo14.js → utils-BLMzDBJk.js} +343 -330
- package/package.json +3 -1
- package/src/astro/Carousel.astro +79 -0
- package/src/lib/carousel-classes.ts +35 -0
- package/src/lib/carousel-init.ts +87 -0
- package/src/styles/globals.css +59 -0
- package/src/styles/theme.css +15 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { ALERT_CLASS, ALERT_CONTENT_CLASS, ALERT_DESCRIPTION_CLASS, ALERT_ICON_BG_CLASS, ALERT_ICON_CLASS, ALERT_ICON_PATHS, ALERT_TITLE_CLASS, ALERT_TONES, type AlertTone, type AlertToneStyle, alertBorder, alertFill, alertIconBgStyle, alertIconFill, } from "./lib/alert-tones.js";
|
|
2
2
|
export { BUTTON_DEFAULT_CLASS, BUTTON_OUTLINE_CLASS, buttonVariants, ICON_BUTTON_CLASS, } from "./lib/button-variants.js";
|
|
3
3
|
export { CARD_BLUR, CARD_SURFACE, CARD_SURFACE_BASE, CARD_SURFACE_OPAQUE, TRACK_SURFACE, } from "./lib/card-classes.js";
|
|
4
|
+
export { CAROUSEL_DOTS, CAROUSEL_VIEWPORT, type CarouselTransition, carouselDot, carouselItem, carouselTrack, } from "./lib/carousel-classes.js";
|
|
4
5
|
export { glassToneText, toneTextMix } from "./lib/glass-tone.js";
|
|
5
6
|
export { INPUT_CLASS, INPUT_SURFACE } from "./lib/input-classes.js";
|
|
6
7
|
export { LOGO_DEFAULT_SIZE, LOGO_DEFAULT_SRC, LOGO_DEFAULT_SUB, LOGO_MARK_CLASS, LOGO_MARK_PX, LOGO_NAME_CLASS, LOGO_ROOT_CLASS, LOGO_SIZES, LOGO_STACK_CLASS, LOGO_SUB_CLASS, type LogoSize, } from "./lib/logo-lockup.js";
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { createSignal as
|
|
1
|
+
import { $ as e, B as t, C as n, E as r, F as i, G as a, H as o, I as s, J as c, K as l, L as u, O as d, Q as f, S as p, T as m, U as h, V as g, X as _, Y as v, Z as y, _ as b, a 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 k, l as A, m as j, n as M, nt as N, o as P, p as F, q as I, r as L, s as R, t as z, tt as B, u as V, v as H, w as U, x as W, y as G, z as K } from "./utils-BLMzDBJk.js";
|
|
2
|
+
import { createSignal as q, onCleanup as J, onMount as Y } from "solid-js";
|
|
3
3
|
//#region src/lib/use-is-mobile.ts
|
|
4
|
-
var
|
|
5
|
-
function
|
|
6
|
-
let [e, t] =
|
|
7
|
-
return
|
|
8
|
-
let e = window.matchMedia(`(max-width: ${
|
|
9
|
-
e.addEventListener("change", n), t(window.innerWidth <
|
|
4
|
+
var X = 768;
|
|
5
|
+
function Z() {
|
|
6
|
+
let [e, t] = q(void 0);
|
|
7
|
+
return Y(() => {
|
|
8
|
+
let e = window.matchMedia(`(max-width: ${X - 1}px)`), n = () => t(window.innerWidth < X);
|
|
9
|
+
e.addEventListener("change", n), t(window.innerWidth < X), J(() => e.removeEventListener("change", n));
|
|
10
10
|
}), e;
|
|
11
11
|
}
|
|
12
12
|
//#endregion
|
|
13
|
-
export {
|
|
13
|
+
export { a as ALERT_CLASS, l as ALERT_CONTENT_CLASS, I as ALERT_DESCRIPTION_CLASS, c as ALERT_ICON_BG_CLASS, v as ALERT_ICON_CLASS, _ as ALERT_ICON_PATHS, y as ALERT_TITLE_CLASS, f as ALERT_TONES, t as BUTTON_DEFAULT_CLASS, g as BUTTON_OUTLINE_CLASS, d as CARD_BLUR, i as CARD_SURFACE, s as CARD_SURFACE_BASE, u as CARD_SURFACE_OPAQUE, p as CAROUSEL_DOTS, n as CAROUSEL_VIEWPORT, o as ICON_BUTTON_CLASS, H as INPUT_CLASS, G as INPUT_SURFACE, C as LOGO_DEFAULT_SIZE, A as LOGO_DEFAULT_SRC, V as LOGO_DEFAULT_SUB, w as LOGO_MARK_CLASS, E as LOGO_MARK_PX, F as LOGO_NAME_CLASS, j as LOGO_ROOT_CLASS, O as LOGO_SIZES, D as LOGO_STACK_CLASS, b as LOGO_SUB_CLASS, P as OVERLAY_SURFACE, R as SCRIM_CLASS, M as SECTION_INNER_RADIUS, L as SECTION_OUTER_RADIUS, k as SECTION_PADDING, x as SECTION_ROW_CLASS, K as TRACK_SURFACE, e as alertBorder, T as alertFill, B as alertIconBgStyle, N as alertIconFill, h as buttonVariants, U as carouselDot, m as carouselItem, r as carouselTrack, z as cn, Z as createIsMobile, S as glassToneText, W as toneTextMix };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type CarouselTransition = "slide" | "fade" | "wipe";
|
|
2
|
+
export declare const CAROUSEL_VIEWPORT = "h-full overflow-hidden";
|
|
3
|
+
/** Stacked modes put every slide in one grid cell; slide lays out a flex track. */
|
|
4
|
+
export declare function carouselTrack(transition: CarouselTransition, orientation?: "horizontal" | "vertical"): string;
|
|
5
|
+
export declare function carouselItem(transition: CarouselTransition, orientation?: "horizontal" | "vertical"): string;
|
|
6
|
+
export declare const CAROUSEL_DOTS = "flex items-center justify-center gap-2";
|
|
7
|
+
export declare function carouselDot(active: boolean): string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Client enhancement for astro/Carousel.astro. The markup is already in the
|
|
3
|
+
* server HTML; this only adds behaviour, so the slides stay visible (and
|
|
4
|
+
* indexable) if the script never runs.
|
|
5
|
+
*
|
|
6
|
+
* Emits `carousel:select` with `{ index }` so a host page can sync its own
|
|
7
|
+
* chrome (labels, lightboxes) without owning the carousel.
|
|
8
|
+
*/
|
|
9
|
+
export declare function initCarousels(root?: ParentNode): void;
|
package/dist/solid/carousel.d.ts
CHANGED
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
import { type EmblaCarouselType, type EmblaOptionsType, type EmblaPluginType } from "embla-carousel";
|
|
2
2
|
import { type Component, type ComponentProps, type ParentComponent } from "solid-js";
|
|
3
|
+
import { type CarouselTransition } from "../lib/carousel-classes.js";
|
|
3
4
|
import { Button } from "./button.js";
|
|
4
5
|
type CarouselApi = EmblaCarouselType;
|
|
5
6
|
declare const Carousel: ParentComponent<ComponentProps<"div"> & {
|
|
6
7
|
opts?: EmblaOptionsType;
|
|
7
8
|
plugins?: EmblaPluginType[];
|
|
8
9
|
orientation?: "horizontal" | "vertical";
|
|
10
|
+
transition?: CarouselTransition;
|
|
11
|
+
/** Advance every N ms. Ignored under prefers-reduced-motion. */
|
|
12
|
+
autoplay?: number;
|
|
9
13
|
setApi?: (api: CarouselApi) => void;
|
|
10
14
|
}>;
|
|
11
15
|
declare const CarouselContent: Component<ComponentProps<"div">>;
|
|
12
16
|
declare const CarouselItem: Component<ComponentProps<"div">>;
|
|
17
|
+
/** Slide indicators. Stays in sync with drag, autoplay, and prev/next alike. */
|
|
18
|
+
declare const CarouselDots: Component<ComponentProps<"div">>;
|
|
13
19
|
declare const CarouselPrevious: Component<ComponentProps<typeof Button>>;
|
|
14
20
|
declare const CarouselNext: Component<ComponentProps<typeof Button>>;
|
|
15
|
-
export { Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, };
|
|
21
|
+
export { Carousel, type CarouselApi, CarouselContent, CarouselDots, CarouselItem, CarouselNext, CarouselPrevious, type CarouselTransition, };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface IconPickerProps {
|
|
2
|
+
value: string;
|
|
3
|
+
onChange: (value: string) => void;
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
class?: string;
|
|
6
|
+
/**
|
|
7
|
+
* Host-provided icon search. The design system carries no network or CSP
|
|
8
|
+
* policy of its own: dash proxies the Iconify API same-origin so its
|
|
9
|
+
* connect-src allowlist stays free of third-party origins. Without this the
|
|
10
|
+
* picker still works, showing the curated set only.
|
|
11
|
+
*/
|
|
12
|
+
searchIcons?: (query: string, prefix: string) => Promise<string[]>;
|
|
13
|
+
}
|
|
14
|
+
export declare function IconPicker(props: IconPickerProps): import("solid-js").JSX.Element;
|
package/dist/solid/index.d.ts
CHANGED
|
@@ -13,8 +13,8 @@ export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, Breadcr
|
|
|
13
13
|
export { Button, buttonVariants } from "./button.js";
|
|
14
14
|
export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants, } from "./button-group.js";
|
|
15
15
|
export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, } from "./card.js";
|
|
16
|
-
export type { CarouselApi } from "./carousel.js";
|
|
17
|
-
export { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, } from "./carousel.js";
|
|
16
|
+
export type { CarouselApi, CarouselTransition } from "./carousel.js";
|
|
17
|
+
export { Carousel, CarouselContent, CarouselDots, CarouselItem, CarouselNext, CarouselPrevious, } from "./carousel.js";
|
|
18
18
|
export { AreaChart, BarList, formatBytes, formatCompact, RangeToggle, StackedBar, } from "./charts.js";
|
|
19
19
|
export { Checkbox } from "./checkbox.js";
|
|
20
20
|
export { Collapsible, CollapsibleContent, CollapsibleTrigger, } from "./collapsible.js";
|
|
@@ -34,6 +34,7 @@ export { EntitySelector } from "./entity-selector.js";
|
|
|
34
34
|
export { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, } from "./field.js";
|
|
35
35
|
export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField, } from "./form.js";
|
|
36
36
|
export { HoverCard, HoverCardContent, HoverCardTrigger, } from "./hover-card.js";
|
|
37
|
+
export { IconPicker, type IconPickerProps } from "./icon-picker.js";
|
|
37
38
|
export { Input } from "./input.js";
|
|
38
39
|
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, } from "./input-group.js";
|
|
39
40
|
export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, } from "./input-otp.js";
|
|
@@ -56,7 +57,7 @@ export { ScrollArea, ScrollBar } from "./scroll-area.js";
|
|
|
56
57
|
export { type GlassSurface, SectionCard, SectionIcon, SectionLabel, SectionMeta, SectionRow, SectionRowSkeleton, SectionRowSkeletons, SectionSubtitle, SectionTitle, } from "./section-card.js";
|
|
57
58
|
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, } from "./select.js";
|
|
58
59
|
export { Separator } from "./separator.js";
|
|
59
|
-
export { LabeledField, LabeledInput, RowActions, SectionAddButton, SectionEmpty, SwitchRow, } from "./settings-row.js";
|
|
60
|
+
export { LabeledField, LabeledIconPicker, LabeledInput, RowActions, SectionAddButton, SectionEmpty, SwitchRow, } from "./settings-row.js";
|
|
60
61
|
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, } from "./sheet.js";
|
|
61
62
|
export { Skeleton } from "./skeleton.js";
|
|
62
63
|
export { Slider } from "./slider.js";
|