@gentiq/ui 1.0.0-alpha.4 → 1.0.0-alpha.6

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.
@@ -31,7 +31,7 @@ export declare function Badge({ className, variant, asChild, ...props }: React_2
31
31
  }): JSX.Element;
32
32
 
33
33
  declare const badgeVariants: (props?: ({
34
- variant?: "default" | "destructive" | "secondary" | "outline" | null | undefined;
34
+ variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
35
35
  } & ClassProp) | undefined) => string;
36
36
 
37
37
  /** Meters gentiq counts itself. Anything else is app-defined and shown by its key. */
@@ -42,7 +42,7 @@ export declare function Button({ className, variant, size, asChild, ...props }:
42
42
  }): JSX.Element;
43
43
 
44
44
  declare const buttonVariants: (props?: ({
45
- variant?: "default" | "destructive" | "link" | "secondary" | "outline" | "ghost" | null | undefined;
45
+ variant?: "default" | "destructive" | "link" | "outline" | "secondary" | "ghost" | null | undefined;
46
46
  size?: "default" | "icon" | "sm" | "lg" | null | undefined;
47
47
  } & ClassProp) | undefined) => string;
48
48
 
@@ -195,9 +195,9 @@ export declare function describeWindow(t: TFunction, window: {
195
195
  anchor?: QuotaAnchor;
196
196
  }): string;
197
197
 
198
- export declare function Dialog({ ...props }: React_2.ComponentProps<typeof DialogPrimitive.Root>): JSX.Element;
198
+ export declare function Dialog(props: React_2.ComponentProps<typeof DialogPrimitive.Root>): JSX.Element;
199
199
 
200
- export declare function DialogClose({ ...props }: React_2.ComponentProps<typeof DialogPrimitive.Close>): JSX.Element;
200
+ export declare function DialogClose(props: React_2.ComponentProps<typeof DialogPrimitive.Close>): JSX.Element;
201
201
 
202
202
  export declare function DialogContent({ className, children, showCloseButton, ...props }: React_2.ComponentProps<typeof DialogPrimitive.Content> & {
203
203
  showCloseButton?: boolean;
@@ -211,9 +211,9 @@ export declare function DialogHeader({ className, ...props }: React_2.ComponentP
211
211
 
212
212
  export declare function DialogTitle({ className, ...props }: React_2.ComponentProps<typeof DialogPrimitive.Title>): JSX.Element;
213
213
 
214
- export declare function DialogTrigger({ ...props }: React_2.ComponentProps<typeof DialogPrimitive.Trigger>): JSX.Element;
214
+ export declare function DialogTrigger(props: React_2.ComponentProps<typeof DialogPrimitive.Trigger>): JSX.Element;
215
215
 
216
- export declare function DropdownMenu({ ...props }: React_2.ComponentProps<typeof DropdownMenuPrimitive.Root>): JSX.Element;
216
+ export declare function DropdownMenu(props: React_2.ComponentProps<typeof DropdownMenuPrimitive.Root>): JSX.Element;
217
217
 
218
218
  export declare function DropdownMenuContent({ className, sideOffset, ...props }: React_2.ComponentProps<typeof DropdownMenuPrimitive.Content>): JSX.Element;
219
219
 
@@ -222,7 +222,7 @@ export declare function DropdownMenuItem({ className, inset, variant, ...props }
222
222
  variant?: 'default' | 'destructive';
223
223
  }): JSX.Element;
224
224
 
225
- export declare function DropdownMenuTrigger({ ...props }: React_2.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): JSX.Element;
225
+ export declare function DropdownMenuTrigger(props: React_2.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): JSX.Element;
226
226
 
227
227
  /** The slots that always have a component: Gentiq's own unless the host replaced it. */
228
228
  declare type FilledSlots = 'MessageList' | 'MessageActions' | 'PromptInput' | 'WelcomeScreen' | 'parts' | 'ChoiceQuestionPart' | 'ChoiceQuestionDock' | 'FollowUpSuggestions' | 'ChatError' | 'UsageMeter' | 'MaintenanceBanner' | 'MaintenanceScreen';
@@ -455,8 +455,7 @@ declare interface HeaderActionConfig {
455
455
  */
456
456
  declare interface HeaderActionsProps {
457
457
  /**
458
- * Whether the viewport is phone-sized. The logo sits in the middle of the bar, so on a
459
- * phone there is room for about one icon-sized button before it is covered.
458
+ * Whether the viewport is phone-sized.
460
459
  */
461
460
  isMobile: boolean;
462
461
  }
@@ -471,7 +470,7 @@ declare type LoaderProps = HTMLAttributes<HTMLDivElement> & {
471
470
  size?: number;
472
471
  /**
473
472
  * Indicator variant. Retained for compatibility with custom renderers;
474
- * Gentiq's built-in loader renders the clean 3-dot pulse.
473
+ * Gentiq's built-in loader renders a three-dot acrobatic loop.
475
474
  */
476
475
  variant?: string;
477
476
  };
@@ -543,7 +542,7 @@ export declare const QUOTA_PERIODS: QuotaPeriod[];
543
542
  /** The slot map in force: every filled slot has a component (or `null` for a notice). */
544
543
  declare type ResolvedSlots = Required<Pick<GentiqComponents, FilledSlots>> & Omit<GentiqComponents, FilledSlots>;
545
544
 
546
- export declare function Select({ ...props }: React_2.ComponentProps<typeof SelectPrimitive.Root>): JSX.Element;
545
+ export declare function Select(props: React_2.ComponentProps<typeof SelectPrimitive.Root>): JSX.Element;
547
546
 
548
547
  export declare function SelectContent({ className, children, position, ...props }: React_2.ComponentProps<typeof SelectPrimitive.Content>): JSX.Element;
549
548
 
@@ -553,9 +552,9 @@ export declare function SelectTrigger({ className, size, children, ...props }: R
553
552
  size?: 'sm' | 'default';
554
553
  }): JSX.Element;
555
554
 
556
- export declare function SelectValue({ ...props }: React_2.ComponentProps<typeof SelectPrimitive.Value>): JSX.Element;
555
+ export declare function SelectValue(props: React_2.ComponentProps<typeof SelectPrimitive.Value>): JSX.Element;
557
556
 
558
- export declare function Sheet({ ...props }: React_2.ComponentProps<typeof DialogPrimitive.Root>): JSX.Element;
557
+ export declare function Sheet(props: React_2.ComponentProps<typeof DialogPrimitive.Root>): JSX.Element;
559
558
 
560
559
  export declare function SheetContent({ className, children, side, ...props }: React_2.ComponentProps<typeof DialogPrimitive.Content> & {
561
560
  side?: 'top' | 'end' | 'bottom' | 'start';
@@ -1,61 +1,68 @@
1
1
  "use client";
2
- import { t as g, v as m, B as h, w as p, c as o } from "./shared-MFlvTavE.js";
3
- import { ak as L, al as q, k as B, am as Q, an as j, ao as z, G as A, ap as E, J as H, Q as O, V as R, N as _, O as G, H as P, W as U, Y as V, Z as W, X as F, I as J, L as K, M as X, aq as Y, f as Z, i as $, j as ee, g as ae, h as te, n as re, o as se, s as oe, p as ie, q as ne, ar as le, D as de, y as ce, A as ue, K as ge, x as me, u as he } from "./shared-MFlvTavE.js";
4
- import { jsxs as i, jsx as e } from "react/jsx-runtime";
5
- import { Monitor as n, Moon as b, Sun as f } from "lucide-react";
6
- import { useGentiqTranslation as k, useTheme as w } from "@gentiq/react";
2
+ import { T as g, i as b, B as h, j as m, c as r } from "./shared-BtZa4J_w.js";
3
+ import { a1 as H, h as B, C as R, b as j, a as O, D as P, a2 as Q, e as q, _ as A, $ as F, f as G, g as U, d as V, l as W, n as X, o as J, m as K, N as Y, G as Z, L as $, a3 as ee, H as ae, K as te, M as re, I as ie, J as oe, V as se, W as ne, Z as de, X as le, Y as ce, a4 as ue, x as ge, F as be, w as he, a0 as me, y as pe, u as fe } from "./shared-BtZa4J_w.js";
4
+ import { jsxs as s, jsx as e } from "react/jsx-runtime";
5
+ import { Monitor as l, Moon as p, Sun as f, CheckIcon as k } from "lucide-react";
6
+ import { useGentiqTranslation as x, useTheme as v } from "@gentiq/react";
7
7
  import "react";
8
- import * as l from "@radix-ui/react-switch";
9
- const C = ({ className: t }) => {
10
- const { t: a } = k(["theme"]), { theme: r, setTheme: s } = w(), d = () => {
11
- s(r === "system" ? "light" : r === "light" ? "dark" : "system");
12
- }, c = () => {
13
- switch (r) {
14
- case "light":
15
- return /* @__PURE__ */ e(f, { className: "h-[1.2rem] w-[1.2rem]" });
16
- case "dark":
17
- return /* @__PURE__ */ e(b, { className: "h-[1.2rem] w-[1.2rem]" });
18
- case "system":
19
- return /* @__PURE__ */ e(n, { className: "h-[1.2rem] w-[1.2rem]" });
20
- default:
21
- return /* @__PURE__ */ e(n, { className: "h-[1.2rem] w-[1.2rem]" });
22
- }
23
- }, u = () => {
24
- switch (r) {
25
- case "light":
26
- return a("dark");
27
- case "dark":
28
- return a("system");
29
- case "system":
30
- return a("light");
31
- default:
32
- return a("toggle");
33
- }
34
- };
35
- return /* @__PURE__ */ i(g, { children: [
36
- /* @__PURE__ */ e(m, { asChild: !0, children: /* @__PURE__ */ i(h, { variant: "ghost", size: "icon", onClick: d, className: t, children: [
37
- c(),
38
- /* @__PURE__ */ e("span", { className: "sr-only", children: a("toggle") })
39
- ] }) }),
40
- /* @__PURE__ */ e(p, { children: u() })
8
+ import * as n from "@radix-ui/react-checkbox";
9
+ import * as d from "@radix-ui/react-switch";
10
+ const T = { system: "light", light: "dark", dark: "system" }, w = { light: f, dark: p, system: l }, I = ({ className: t }) => {
11
+ const { t: a } = x(["theme"]), { theme: i, setTheme: c } = v(), u = w[i] ?? l, o = T[i];
12
+ return /* @__PURE__ */ s(g, { children: [
13
+ /* @__PURE__ */ e(b, { asChild: !0, children: /* @__PURE__ */ s(
14
+ h,
15
+ {
16
+ variant: "ghost",
17
+ size: "icon",
18
+ onClick: () => c(o ?? "system"),
19
+ className: t,
20
+ children: [
21
+ /* @__PURE__ */ e(u, { className: "h-[1.2rem] w-[1.2rem]" }),
22
+ /* @__PURE__ */ e("span", { className: "sr-only", children: a("toggle") })
23
+ ]
24
+ }
25
+ ) }),
26
+ /* @__PURE__ */ e(m, { children: a(o ?? "toggle") })
41
27
  ] });
42
28
  };
43
- function y({ className: t, ...a }) {
29
+ function M({ className: t, ...a }) {
30
+ return /* @__PURE__ */ e(
31
+ n.Root,
32
+ {
33
+ "data-slot": "checkbox",
34
+ className: r(
35
+ "peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
36
+ t
37
+ ),
38
+ ...a,
39
+ children: /* @__PURE__ */ e(
40
+ n.Indicator,
41
+ {
42
+ "data-slot": "checkbox-indicator",
43
+ className: "grid place-content-center text-current transition-none",
44
+ children: /* @__PURE__ */ e(k, { className: "size-3.5" })
45
+ }
46
+ )
47
+ }
48
+ );
49
+ }
50
+ function E({ className: t, ...a }) {
44
51
  return /* @__PURE__ */ e(
45
- l.Root,
52
+ d.Root,
46
53
  {
47
54
  "data-slot": "switch",
48
55
  dir: "ltr",
49
- className: o(
56
+ className: r(
50
57
  "peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-5 w-9 shrink-0 items-center rounded-full border-2 border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
51
58
  t
52
59
  ),
53
60
  ...a,
54
61
  children: /* @__PURE__ */ e(
55
- l.Thumb,
62
+ d.Thumb,
56
63
  {
57
64
  "data-slot": "switch-thumb",
58
- className: o(
65
+ className: r(
59
66
  "bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
60
67
  )
61
68
  }
@@ -63,12 +70,12 @@ function y({ className: t, ...a }) {
63
70
  }
64
71
  );
65
72
  }
66
- function N({ className: t, ...a }) {
73
+ function L({ className: t, ...a }) {
67
74
  return /* @__PURE__ */ e(
68
75
  "textarea",
69
76
  {
70
77
  "data-slot": "textarea",
71
- className: o(
78
+ className: r(
72
79
  "border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
73
80
  t
74
81
  ),
@@ -77,48 +84,48 @@ function N({ className: t, ...a }) {
77
84
  );
78
85
  }
79
86
  export {
80
- L as BUILT_IN_METERS,
81
- q as Badge,
87
+ H as BUILT_IN_METERS,
88
+ B as Badge,
82
89
  h as Button,
83
- B as Checkbox,
84
- Q as Collapsible,
90
+ M as Checkbox,
91
+ R as Collapsible,
85
92
  j as CollapsibleContent,
86
- z as CollapsibleTrigger,
87
- A as Dialog,
88
- E as DialogClose,
89
- H as DialogContent,
90
- O as DialogDescription,
91
- R as DialogFooter,
92
- _ as DialogHeader,
93
- G as DialogTitle,
94
- P as DialogTrigger,
95
- U as DropdownMenu,
96
- V as DropdownMenuContent,
97
- W as DropdownMenuItem,
98
- F as DropdownMenuTrigger,
99
- J as Input,
100
- K as Label,
101
- X as Loader,
102
- C as ModeToggle,
103
- Y as QUOTA_PERIODS,
104
- Z as Select,
105
- $ as SelectContent,
106
- ee as SelectItem,
107
- ae as SelectTrigger,
108
- te as SelectValue,
109
- re as Sheet,
110
- se as SheetContent,
111
- oe as SheetDescription,
112
- ie as SheetHeader,
113
- ne as SheetTitle,
114
- y as Switch,
115
- N as Textarea,
116
- o as cn,
117
- le as describeDuration,
118
- de as describeWindow,
119
- ce as formatQuotaAmount,
120
- ue as formatQuotaDate,
121
- ge as gentiqLogo,
122
- me as meterLabel,
123
- he as useSlots
93
+ O as CollapsibleTrigger,
94
+ P as Dialog,
95
+ Q as DialogClose,
96
+ q as DialogContent,
97
+ A as DialogDescription,
98
+ F as DialogFooter,
99
+ G as DialogHeader,
100
+ U as DialogTitle,
101
+ V as DialogTrigger,
102
+ W as DropdownMenu,
103
+ X as DropdownMenuContent,
104
+ J as DropdownMenuItem,
105
+ K as DropdownMenuTrigger,
106
+ Y as Input,
107
+ Z as Label,
108
+ $ as Loader,
109
+ I as ModeToggle,
110
+ ee as QUOTA_PERIODS,
111
+ ae as Select,
112
+ te as SelectContent,
113
+ re as SelectItem,
114
+ ie as SelectTrigger,
115
+ oe as SelectValue,
116
+ se as Sheet,
117
+ ne as SheetContent,
118
+ de as SheetDescription,
119
+ le as SheetHeader,
120
+ ce as SheetTitle,
121
+ E as Switch,
122
+ L as Textarea,
123
+ r as cn,
124
+ ue as describeDuration,
125
+ ge as describeWindow,
126
+ be as formatQuotaAmount,
127
+ he as formatQuotaDate,
128
+ me as gentiqLogo,
129
+ pe as meterLabel,
130
+ fe as useSlots
124
131
  };