tguikit 0.3.0 → 0.5.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/MIGRATION.md ADDED
@@ -0,0 +1,67 @@
1
+ # Migrating from 0.4 to 0.5
2
+
3
+ 0.5 rebuilds the token system on Apple's HIG and standardises the component API. It is a hard break — no compatibility layer. This guide lists every change that can affect your code.
4
+
5
+ ## Tokens
6
+
7
+ Every `--tgui--*_color` / `--tgui--*_*` custom property was renamed to a hyphenated, HIG-semantic name. If you read `--tgui--*` variables in your own CSS or inline styles, remap them:
8
+
9
+ | 0.4 | 0.5 |
10
+ | --- | --- |
11
+ | `--tgui--bg_color` | `--tgui--bg` |
12
+ | `--tgui--secondary_bg_color` | `--tgui--bg-secondary` |
13
+ | `--tgui--tertiary_bg_color` | `--tgui--fill` (no direct equivalent) |
14
+ | `--tgui--section_bg_color` / `--tgui--card_bg_color` / `--tgui--header_bg_color` | `--tgui--bg-elevated` |
15
+ | `--tgui--text_color` | `--tgui--label` |
16
+ | `--tgui--hint_color` | `--tgui--label-secondary` |
17
+ | `--tgui--secondary_hint_color` / `--tgui--subtitle_text_color` | `--tgui--label-tertiary` |
18
+ | `--tgui--section_header_text_color` | `--tgui--label-secondary` |
19
+ | `--tgui--link_color` | `--tgui--link` |
20
+ | `--tgui--button_color` | `--tgui--accent` |
21
+ | `--tgui--button_text_color` / `--tgui--accent_text_color` | `--tgui--accent-label` |
22
+ | `--tgui--destructive_text_color` | `--tgui--destructive` |
23
+ | `--tgui--destructive_background` | `--tgui--destructive` |
24
+ | `--tgui--outline` / `--tgui--divider` | `--tgui--separator` |
25
+ | `--tgui--border--width` | `--tgui--hairline` |
26
+ | `--tgui--green` | `--tgui--success` |
27
+ | `--tgui--secondary_fill` | `--tgui--fill-secondary` |
28
+ | `--tgui--field_radius` / `--tgui--field_gap` / `--tgui--field_padding_x` … | `--tgui--field-radius` / `--tgui--field-gap` / `--tgui--field-padding-x` … |
29
+ | `--tgui--z-index--overlay` / `--z-index--simple` / `--z-index--skeleton` | `--tgui--z-overlay` / `--tgui--z-raised` / `--tgui--z-base` |
30
+ | `--tgui--headline--font_size`, `--tgui--text--line_height`, `--tgui--title`, `--tgui--caption`, … (the per-style type tokens) | removed — the type scale now lives inside the typography components; use `<Headline>`, `<Text>`, `<Caption>` etc. rather than the raw values |
31
+ | `--tgui--segmented_control_active_bg` | removed — `SegmentedControl` owns its pill |
32
+ | `--tgui--skeleton`, `--tgui--*_code_highlight`, `--tgui--surface_*`, `--tgui--tooltip_background_dark`, `--tgui--toast_accent_color`, `--tgui--plain_*` | removed |
33
+
34
+ New in 0.5: `--tgui--accent-strong` / `--tgui--link-strong` / `--tgui--destructive-strong` (WCAG-AA-safe variants of the accent hues), `--tgui--focus-ring` / `--tgui--focus-ring-offset` / `--tgui--focus-ring-shadow`, `--tgui--bg-elevated`, the `--tgui--fill-*` ladder, `--tgui--material-*`, `--tgui--surface-bg` (one background for every raised surface — cards, sections, tab bar, and every floating overlay) + `--tgui--overlay-shadow` (the floating elevation, worn only by overlays), `--tgui--radius` + derivatives, motion duration/easing tokens.
35
+
36
+ ### `--tgui--focus-ring` changed shape
37
+
38
+ It was a `box-shadow` value; it is now an `outline` value (`2px solid var(--tgui--accent)`). If you applied it as `box-shadow: var(--tgui--focus-ring)`, switch to `outline: var(--tgui--focus-ring); outline-offset: var(--tgui--focus-ring-offset)`.
39
+
40
+ ## Component API
41
+
42
+ | Component | 0.4 | 0.5 |
43
+ | --- | --- | --- |
44
+ | `Accordion`, `Slider`, `PinInput`, `Rating`, `Stepper` | `onChange` | `onValueChange` |
45
+ | `Stepper` | `value` + `onChange` required | `value` / `defaultValue` / `onValueChange` all optional (works uncontrolled) |
46
+ | `SegmentedControl` | manual `<SegmentedControlItem selected onClick>` per item | `<SegmentedControl value onValueChange>` + `<SegmentedControlItem value="…">` (the old per-item props still work) |
47
+ | `Sheet` | `onClose: () => void` | `onOpenChange: (open: boolean) => void` |
48
+ | `Spoiler` | `revealed` / `defaultRevealed` / `onRevealedChange` | `open` / `defaultOpen` / `onOpenChange` |
49
+ | `Tooltip` | `open` / `onOpenChange` | unchanged, gains `defaultOpen` |
50
+
51
+ Every stateful component now follows one of two prop triads: `value` / `defaultValue` / `onValueChange`, or `open` / `defaultOpen` / `onOpenChange`.
52
+
53
+ ## Styling hooks
54
+
55
+ Every component now emits `data-slot="<component>"` on its root and `data-slot="<component>-<part>"` on sub-parts. Visual state is exposed via `data-state`, `data-disabled`, `data-loading`, `data-selected`, `aria-*` — not internal class names. Prefer these over targeting hashed CSS-module classes.
56
+
57
+ ## Semantics
58
+
59
+ - `Button`, `Cell`, `SectionFooter` labels render as `<span>`, not `<h6>`.
60
+ - `FormField` / `Select` headers now sit inside the `<label>` (visually hidden on iOS) so they always name the control.
61
+ - `Progress`, `CircularProgress`, `Steps` carry a default `aria-label` on the `progressbar` role — pass `aria-label` to override.
62
+ - `HorizontalScroll` scroll region is keyboard-focusable; name it with the `scrollLabel` prop.
63
+
64
+ ## New
65
+
66
+ - `Popover` (`Popover` / `Popover.Trigger` / `Popover.Content`).
67
+ - `Footnote`, `Callout` typography components.
package/dist/index.d.ts CHANGED
@@ -1,14 +1,14 @@
1
1
  import * as react from 'react';
2
- import { HTMLAttributes, Ref, ReactNode, BlockquoteHTMLAttributes, AllHTMLAttributes, ElementType, InputHTMLAttributes, ImgHTMLAttributes, AnchorHTMLAttributes, ButtonHTMLAttributes, SelectHTMLAttributes, TextareaHTMLAttributes } from 'react';
2
+ import { HTMLAttributes, Ref, ReactNode, BlockquoteHTMLAttributes, AllHTMLAttributes, ElementType, InputHTMLAttributes, ButtonHTMLAttributes, ReactElement, ImgHTMLAttributes, AnchorHTMLAttributes, SelectHTMLAttributes, TextareaHTMLAttributes } from 'react';
3
3
 
4
4
  interface AccordionProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
5
5
  ref?: Ref<HTMLDivElement>;
6
6
  multiple?: boolean;
7
7
  value?: string | string[];
8
8
  defaultValue?: string | string[];
9
- onChange?: (value: string[]) => void;
9
+ onValueChange?: (value: string[]) => void;
10
10
  }
11
- declare function Accordion({ ref, multiple, value: valueProp, defaultValue, onChange, className, children, ...rest }: AccordionProps): react.JSX.Element;
11
+ declare function Accordion({ ref, multiple, value: valueProp, defaultValue, onValueChange, className, children, ...rest }: AccordionProps): react.JSX.Element;
12
12
  declare namespace Accordion {
13
13
  var displayName: string;
14
14
  }
@@ -91,12 +91,28 @@ declare namespace Blockquote {
91
91
  var displayName: string;
92
92
  }
93
93
 
94
+ interface BreadcrumbItem {
95
+ label: ReactNode;
96
+ href?: string;
97
+ onClick?: () => void;
98
+ }
99
+ interface BreadcrumbsProps extends Omit<HTMLAttributes<HTMLElement>, 'children'> {
100
+ ref?: Ref<HTMLElement>;
101
+ items: BreadcrumbItem[];
102
+ maxItems?: number;
103
+ }
104
+ declare function Breadcrumbs({ ref, items, maxItems, className, ...rest }: BreadcrumbsProps): react.JSX.Element;
105
+ declare namespace Breadcrumbs {
106
+ var displayName: string;
107
+ }
108
+
94
109
  type TguiPlatform = 'ios' | 'base';
95
110
  type Appearance = 'light' | 'dark';
96
111
  interface TguiContextValue {
97
112
  platform: TguiPlatform;
98
113
  appearance: Appearance;
99
114
  portalContainer: HTMLElement | null;
115
+ haptics: boolean;
100
116
  }
101
117
 
102
118
  type ButtonMode = 'filled' | 'bezeled' | 'plain' | 'gray' | 'outline' | 'white';
@@ -128,6 +144,14 @@ declare namespace Typography {
128
144
  var displayName: string;
129
145
  }
130
146
 
147
+ interface CalloutProps extends TypographyProps {
148
+ ref?: Ref<HTMLElement>;
149
+ }
150
+ declare function Callout({ ref, className, Component, ...rest }: CalloutProps): react.JSX.Element;
151
+ declare namespace Callout {
152
+ var displayName: string;
153
+ }
154
+
131
155
  type CaptionLevel = '1' | '2';
132
156
 
133
157
  interface CaptionProps extends TypographyProps {
@@ -144,7 +168,7 @@ type CardType = 'plain' | 'ambient';
144
168
  interface TappableProps extends AllHTMLAttributes<HTMLElement> {
145
169
  ref?: Ref<HTMLElement>;
146
170
  Component?: ElementType;
147
- interactiveAnimation?: 'background' | 'opacity';
171
+ interactiveAnimation?: 'background' | 'opacity' | 'none';
148
172
  }
149
173
  declare function Tappable({ ref, Component, interactiveAnimation, className, children, onPointerDown, onPointerCancel, ...rest }: TappableProps): react.JSX.Element;
150
174
  declare namespace Tappable {
@@ -191,7 +215,7 @@ interface CheckboxProps extends InputHTMLAttributes<HTMLInputElement> {
191
215
  ref?: Ref<HTMLInputElement>;
192
216
  indeterminate?: boolean;
193
217
  }
194
- declare function Checkbox({ ref, indeterminate, disabled, className, style, ...rest }: CheckboxProps): react.JSX.Element;
218
+ declare function Checkbox({ ref, indeterminate, disabled, className, style, onChange, ...rest }: CheckboxProps): react.JSX.Element;
195
219
  declare namespace Checkbox {
196
220
  var displayName: string;
197
221
  }
@@ -220,11 +244,31 @@ interface CircularProgressProps extends Omit<HTMLAttributes<HTMLSpanElement>, 's
220
244
  value?: number;
221
245
  size?: CircularProgressSize;
222
246
  }
223
- declare function CircularProgress({ ref, value, size, className, ...rest }: CircularProgressProps): react.JSX.Element;
247
+ declare function CircularProgress({ ref, value, size, className, 'aria-label': ariaLabel, ...rest }: CircularProgressProps): react.JSX.Element;
224
248
  declare namespace CircularProgress {
225
249
  var displayName: string;
226
250
  }
227
251
 
252
+ type DialogActionRole = 'default' | 'cancel' | 'destructive';
253
+ interface DialogAction {
254
+ label: ReactNode;
255
+ onClick?: () => void;
256
+ role?: DialogActionRole;
257
+ }
258
+ interface DialogProps {
259
+ open: boolean;
260
+ onOpenChange: (open: boolean) => void;
261
+ title: ReactNode;
262
+ description?: ReactNode;
263
+ actions: DialogAction[];
264
+ cancelLabel?: string;
265
+ container?: Element | DocumentFragment | null;
266
+ }
267
+ declare function Dialog({ open, onOpenChange, title, description, actions, cancelLabel, container, }: DialogProps): react.JSX.Element | null;
268
+ declare namespace Dialog {
269
+ var displayName: string;
270
+ }
271
+
228
272
  interface DividerProps extends HTMLAttributes<HTMLHRElement> {
229
273
  ref?: Ref<HTMLHRElement>;
230
274
  }
@@ -233,6 +277,107 @@ declare namespace Divider {
233
277
  var displayName: string;
234
278
  }
235
279
 
280
+ interface DropdownMenuCheckboxItemProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onChange'> {
281
+ ref?: Ref<HTMLButtonElement>;
282
+ checked?: boolean;
283
+ onCheckedChange?: (checked: boolean) => void;
284
+ }
285
+ declare function DropdownMenuCheckboxItem({ ref, checked, onCheckedChange, disabled, className, children, onClick, ...rest }: DropdownMenuCheckboxItemProps): react.JSX.Element;
286
+ declare namespace DropdownMenuCheckboxItem {
287
+ var displayName: string;
288
+ }
289
+
290
+ type FloatingSide = 'top' | 'bottom' | 'left' | 'right';
291
+ type FloatingPlacement = FloatingSide | `${FloatingSide}-start` | `${FloatingSide}-end`;
292
+
293
+ interface DropdownMenuContentProps extends Omit<HTMLAttributes<HTMLDivElement>, 'className'> {
294
+ ref?: Ref<HTMLDivElement>;
295
+ placement?: FloatingPlacement;
296
+ gap?: number;
297
+ container?: Element | DocumentFragment | null;
298
+ className?: string;
299
+ }
300
+ declare function DropdownMenuContent({ ref, placement, gap, container, className, children, onKeyDown, ...rest }: DropdownMenuContentProps): react.JSX.Element | null;
301
+ declare namespace DropdownMenuContent {
302
+ var displayName: string;
303
+ }
304
+
305
+ interface DropdownMenuItemProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onSelect'> {
306
+ ref?: Ref<HTMLButtonElement>;
307
+ icon?: ReactNode;
308
+ destructive?: boolean;
309
+ onSelect?: (event: {
310
+ preventDefault: () => void;
311
+ }) => void;
312
+ }
313
+ declare function DropdownMenuItem({ ref, icon, destructive, disabled, className, children, onSelect, onClick, ...rest }: DropdownMenuItemProps): react.JSX.Element;
314
+ declare namespace DropdownMenuItem {
315
+ var displayName: string;
316
+ }
317
+
318
+ interface DropdownMenuLabelProps extends HTMLAttributes<HTMLDivElement> {
319
+ ref?: Ref<HTMLDivElement>;
320
+ }
321
+ declare function DropdownMenuLabel({ ref, className, ...rest }: DropdownMenuLabelProps): react.JSX.Element;
322
+ declare namespace DropdownMenuLabel {
323
+ var displayName: string;
324
+ }
325
+
326
+ interface DropdownMenuRadioGroupProps {
327
+ value?: string;
328
+ defaultValue?: string;
329
+ onValueChange?: (value: string) => void;
330
+ children: ReactNode;
331
+ }
332
+ declare function DropdownMenuRadioGroup({ value: valueProp, defaultValue, onValueChange, children, }: DropdownMenuRadioGroupProps): react.JSX.Element;
333
+ declare namespace DropdownMenuRadioGroup {
334
+ var displayName: string;
335
+ }
336
+
337
+ interface DropdownMenuRadioItemProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'value'> {
338
+ ref?: Ref<HTMLButtonElement>;
339
+ value: string;
340
+ }
341
+ declare function DropdownMenuRadioItem({ ref, value, disabled, className, children, onClick, ...rest }: DropdownMenuRadioItemProps): react.JSX.Element;
342
+ declare namespace DropdownMenuRadioItem {
343
+ var displayName: string;
344
+ }
345
+
346
+ interface DropdownMenuSeparatorProps extends HTMLAttributes<HTMLHRElement> {
347
+ ref?: Ref<HTMLHRElement>;
348
+ }
349
+ declare function DropdownMenuSeparator({ ref, className, ...rest }: DropdownMenuSeparatorProps): react.JSX.Element;
350
+ declare namespace DropdownMenuSeparator {
351
+ var displayName: string;
352
+ }
353
+
354
+ interface DropdownMenuTriggerProps {
355
+ children: ReactElement;
356
+ }
357
+ declare function DropdownMenuTrigger({ children }: DropdownMenuTriggerProps): ReactElement<unknown, string | react.JSXElementConstructor<any>>;
358
+ declare namespace DropdownMenuTrigger {
359
+ var displayName: string;
360
+ }
361
+
362
+ interface DropdownMenuProps {
363
+ open?: boolean;
364
+ defaultOpen?: boolean;
365
+ onOpenChange?: (open: boolean) => void;
366
+ children: ReactNode;
367
+ }
368
+ declare function DropdownMenu({ open: openProp, defaultOpen, onOpenChange, children, }: DropdownMenuProps): react.JSX.Element;
369
+ declare namespace DropdownMenu {
370
+ var displayName: string;
371
+ var Trigger: typeof DropdownMenuTrigger;
372
+ var Content: typeof DropdownMenuContent;
373
+ var Item: typeof DropdownMenuItem;
374
+ var CheckboxItem: typeof DropdownMenuCheckboxItem;
375
+ var RadioGroup: typeof DropdownMenuRadioGroup;
376
+ var RadioItem: typeof DropdownMenuRadioItem;
377
+ var Separator: typeof DropdownMenuSeparator;
378
+ var Label: typeof DropdownMenuLabel;
379
+ }
380
+
236
381
  interface FixedLayoutProps extends HTMLAttributes<HTMLDivElement> {
237
382
  ref?: Ref<HTMLDivElement>;
238
383
  vertical?: 'top' | 'bottom';
@@ -242,6 +387,14 @@ declare namespace FixedLayout {
242
387
  var displayName: string;
243
388
  }
244
389
 
390
+ interface FootnoteProps extends TypographyProps {
391
+ ref?: Ref<HTMLElement>;
392
+ }
393
+ declare function Footnote({ ref, className, Component, ...rest }: FootnoteProps): react.JSX.Element;
394
+ declare namespace Footnote {
395
+ var displayName: string;
396
+ }
397
+
245
398
  interface HeadlineProps extends TypographyProps {
246
399
  ref?: Ref<HTMLElement>;
247
400
  }
@@ -254,8 +407,9 @@ interface HorizontalScrollProps extends HTMLAttributes<HTMLDivElement> {
254
407
  ref?: Ref<HTMLDivElement>;
255
408
  snap?: boolean;
256
409
  fade?: boolean;
410
+ scrollLabel?: string;
257
411
  }
258
- declare function HorizontalScroll({ ref, snap, fade, className, children, ...rest }: HorizontalScrollProps): react.JSX.Element;
412
+ declare function HorizontalScroll({ ref, snap, fade, scrollLabel, className, children, ...rest }: HorizontalScrollProps): react.JSX.Element;
259
413
  declare namespace HorizontalScroll {
260
414
  var displayName: string;
261
415
  }
@@ -292,6 +446,28 @@ declare namespace Image {
292
446
  var displayName: string;
293
447
  }
294
448
 
449
+ type InlineButtonsMode = 'bezeled' | 'plain' | 'gray';
450
+
451
+ interface InlineButtonsItemProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {
452
+ ref?: Ref<HTMLButtonElement>;
453
+ icon: ReactNode;
454
+ children: ReactNode;
455
+ }
456
+ declare function InlineButtonsItem({ ref, icon, children, className, ...rest }: InlineButtonsItemProps): react.JSX.Element;
457
+ declare namespace InlineButtonsItem {
458
+ var displayName: string;
459
+ }
460
+
461
+ interface InlineButtonsProps extends HTMLAttributes<HTMLDivElement> {
462
+ ref?: Ref<HTMLDivElement>;
463
+ mode?: InlineButtonsMode;
464
+ }
465
+ declare function InlineButtons({ ref, mode, className, children, ...rest }: InlineButtonsProps): react.JSX.Element;
466
+ declare namespace InlineButtons {
467
+ var displayName: string;
468
+ var Item: typeof InlineButtonsItem;
469
+ }
470
+
295
471
  type InputStatus = 'default' | 'error' | 'focused';
296
472
  interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
297
473
  ref?: Ref<HTMLInputElement>;
@@ -330,12 +506,36 @@ declare namespace List {
330
506
  var displayName: string;
331
507
  }
332
508
 
509
+ interface CompactPaginationProps extends Omit<HTMLAttributes<HTMLElement>, 'onChange'> {
510
+ ref?: Ref<HTMLElement>;
511
+ page: number;
512
+ count: number;
513
+ onChange: (page: number) => void;
514
+ siblingCount?: number;
515
+ }
516
+ declare function CompactPagination({ ref, page, count, onChange, siblingCount, className, ...rest }: CompactPaginationProps): react.JSX.Element;
517
+ declare namespace CompactPagination {
518
+ var displayName: string;
519
+ }
520
+
521
+ interface PaginationProps extends Omit<HTMLAttributes<HTMLElement>, 'onChange'> {
522
+ ref?: Ref<HTMLElement>;
523
+ page: number;
524
+ count: number;
525
+ onChange: (page: number) => void;
526
+ siblingCount?: number;
527
+ }
528
+ declare function Pagination({ ref, page, count, onChange, siblingCount, className, ...rest }: PaginationProps): react.JSX.Element;
529
+ declare namespace Pagination {
530
+ var displayName: string;
531
+ }
532
+
333
533
  interface PinInputProps {
334
534
  ref?: Ref<HTMLDivElement>;
335
535
  length?: number;
336
536
  value?: string;
337
537
  defaultValue?: string;
338
- onChange?: (value: string) => void;
538
+ onValueChange?: (value: string) => void;
339
539
  onComplete?: (value: string) => void;
340
540
  type?: 'numeric' | 'alphanumeric';
341
541
  mask?: boolean;
@@ -345,7 +545,7 @@ interface PinInputProps {
345
545
  'aria-label'?: string;
346
546
  className?: string;
347
547
  }
348
- declare function PinInput({ ref, length, value: valueProp, defaultValue, onChange, onComplete, type, mask, disabled, invalid, name, 'aria-label': ariaLabel, className, }: PinInputProps): react.JSX.Element;
548
+ declare function PinInput({ ref, length, value: valueProp, defaultValue, onValueChange, onComplete, type, mask, disabled, invalid, name, 'aria-label': ariaLabel, className, }: PinInputProps): react.JSX.Element;
349
549
  declare namespace PinInput {
350
550
  var displayName: string;
351
551
  }
@@ -362,6 +562,39 @@ declare namespace Placeholder {
362
562
  var displayName: string;
363
563
  }
364
564
 
565
+ interface PopoverContentProps extends Omit<HTMLAttributes<HTMLDivElement>, 'className'> {
566
+ ref?: Ref<HTMLDivElement>;
567
+ placement?: FloatingPlacement;
568
+ gap?: number;
569
+ container?: Element | DocumentFragment | null;
570
+ className?: string;
571
+ }
572
+ declare function PopoverContent({ ref, placement, gap, container, className, children, ...rest }: PopoverContentProps): react.JSX.Element;
573
+ declare namespace PopoverContent {
574
+ var displayName: string;
575
+ }
576
+
577
+ interface PopoverTriggerProps {
578
+ children: ReactElement;
579
+ }
580
+ declare function PopoverTrigger({ children }: PopoverTriggerProps): ReactElement<Record<string, unknown>, string | react.JSXElementConstructor<any>>;
581
+ declare namespace PopoverTrigger {
582
+ var displayName: string;
583
+ }
584
+
585
+ interface PopoverProps {
586
+ open?: boolean;
587
+ defaultOpen?: boolean;
588
+ onOpenChange?: (open: boolean) => void;
589
+ children: ReactNode;
590
+ }
591
+ declare function Popover({ open: openProp, defaultOpen, onOpenChange, children, }: PopoverProps): react.JSX.Element;
592
+ declare namespace Popover {
593
+ var displayName: string;
594
+ var Trigger: typeof PopoverTrigger;
595
+ var Content: typeof PopoverContent;
596
+ }
597
+
365
598
  interface PortalProps {
366
599
  children?: ReactNode;
367
600
  container?: Element | DocumentFragment | null;
@@ -375,7 +608,7 @@ interface ProgressProps extends HTMLAttributes<HTMLDivElement> {
375
608
  ref?: Ref<HTMLDivElement>;
376
609
  value?: number;
377
610
  }
378
- declare function Progress({ ref, value, className, ...rest }: ProgressProps): react.JSX.Element;
611
+ declare function Progress({ ref, value, className, 'aria-label': ariaLabel, ...rest }: ProgressProps): react.JSX.Element;
379
612
  declare namespace Progress {
380
613
  var displayName: string;
381
614
  }
@@ -383,7 +616,7 @@ declare namespace Progress {
383
616
  interface RadioProps extends InputHTMLAttributes<HTMLInputElement> {
384
617
  ref?: Ref<HTMLInputElement>;
385
618
  }
386
- declare function Radio({ ref, disabled, className, style, ...rest }: RadioProps): react.JSX.Element;
619
+ declare function Radio({ ref, disabled, className, style, onChange, ...rest }: RadioProps): react.JSX.Element;
387
620
  declare namespace Radio {
388
621
  var displayName: string;
389
622
  }
@@ -392,7 +625,7 @@ interface RatingProps {
392
625
  ref?: Ref<HTMLDivElement>;
393
626
  value?: number;
394
627
  defaultValue?: number;
395
- onChange?: (value: number) => void;
628
+ onValueChange?: (value: number) => void;
396
629
  count?: number;
397
630
  readOnly?: boolean;
398
631
  disabled?: boolean;
@@ -401,11 +634,24 @@ interface RatingProps {
401
634
  'aria-label'?: string;
402
635
  className?: string;
403
636
  }
404
- declare function Rating({ ref, value: valueProp, defaultValue, onChange, count, readOnly, disabled, icon, name, 'aria-label': ariaLabel, className, }: RatingProps): react.JSX.Element;
637
+ declare function Rating({ ref, value: valueProp, defaultValue, onValueChange, count, readOnly, disabled, icon, name, 'aria-label': ariaLabel, className, }: RatingProps): react.JSX.Element;
405
638
  declare namespace Rating {
406
639
  var displayName: string;
407
640
  }
408
641
 
642
+ interface SearchBarProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
643
+ ref?: Ref<HTMLDivElement>;
644
+ value: string;
645
+ onChange: (value: string) => void;
646
+ placeholder?: string;
647
+ onCancel?: () => void;
648
+ label?: string;
649
+ }
650
+ declare function SearchBar({ ref, value, onChange, placeholder, onCancel, label, className, ...rest }: SearchBarProps): react.JSX.Element;
651
+ declare namespace SearchBar {
652
+ var displayName: string;
653
+ }
654
+
409
655
  interface SectionFooterProps extends HTMLAttributes<HTMLElement> {
410
656
  ref?: Ref<HTMLElement>;
411
657
  centered?: boolean;
@@ -436,19 +682,23 @@ declare namespace Section {
436
682
  var Footer: typeof SectionFooter;
437
683
  }
438
684
 
439
- interface SegmentedControlProps extends HTMLAttributes<HTMLDivElement> {
685
+ interface SegmentedControlProps extends Omit<HTMLAttributes<HTMLDivElement>, 'defaultValue'> {
440
686
  ref?: Ref<HTMLDivElement>;
687
+ value?: string;
688
+ defaultValue?: string;
689
+ onValueChange?: (value: string) => void;
441
690
  }
442
- declare function SegmentedControl({ ref, className, children, onKeyDown, ...rest }: SegmentedControlProps): react.JSX.Element;
691
+ declare function SegmentedControl({ ref, value: valueProp, defaultValue, onValueChange, className, children, onKeyDown, ...rest }: SegmentedControlProps): react.JSX.Element;
443
692
  declare namespace SegmentedControl {
444
693
  var displayName: string;
445
694
  }
446
695
 
447
- interface SegmentedControlItemProps extends ButtonHTMLAttributes<HTMLButtonElement> {
696
+ interface SegmentedControlItemProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'value'> {
448
697
  ref?: Ref<HTMLButtonElement>;
698
+ value?: string;
449
699
  selected?: boolean;
450
700
  }
451
- declare function SegmentedControlItem({ ref, selected, className, ...rest }: SegmentedControlItemProps): react.JSX.Element;
701
+ declare function SegmentedControlItem({ ref, value, selected: selectedProp, className, onClick, ...rest }: SegmentedControlItemProps): react.JSX.Element;
452
702
  declare namespace SegmentedControlItem {
453
703
  var displayName: string;
454
704
  }
@@ -466,7 +716,7 @@ declare namespace Select {
466
716
  interface SheetProps {
467
717
  ref?: Ref<HTMLDivElement>;
468
718
  open: boolean;
469
- onClose: () => void;
719
+ onOpenChange: (open: boolean) => void;
470
720
  header?: ReactNode;
471
721
  children?: ReactNode;
472
722
  dismissable?: boolean;
@@ -474,7 +724,7 @@ interface SheetProps {
474
724
  className?: string;
475
725
  container?: Element | DocumentFragment | null;
476
726
  }
477
- declare function Sheet({ ref, open, onClose, header, children, dismissable, closeLabel, className, container, }: SheetProps): react.JSX.Element | null;
727
+ declare function Sheet({ ref, open, onOpenChange, header, children, dismissable, closeLabel, className, container, }: SheetProps): react.JSX.Element | null;
478
728
  declare namespace Sheet {
479
729
  var displayName: string;
480
730
  }
@@ -493,14 +743,14 @@ interface SliderProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'value
493
743
  ref?: Ref<HTMLInputElement>;
494
744
  value?: number;
495
745
  defaultValue?: number;
496
- onChange?: (value: number) => void;
746
+ onValueChange?: (value: number) => void;
497
747
  min?: number;
498
748
  max?: number;
499
749
  step?: number;
500
750
  before?: ReactNode;
501
751
  after?: ReactNode;
502
752
  }
503
- declare function Slider({ ref, value: valueProp, defaultValue, onChange, min, max, step, before, after, disabled, className, ...rest }: SliderProps): react.JSX.Element;
753
+ declare function Slider({ ref, value: valueProp, defaultValue, onValueChange, min, max, step, before, after, disabled, className, ...rest }: SliderProps): react.JSX.Element;
504
754
  declare namespace Slider {
505
755
  var displayName: string;
506
756
  }
@@ -545,20 +795,45 @@ declare namespace Spinner {
545
795
 
546
796
  interface SpoilerProps extends HTMLAttributes<HTMLSpanElement> {
547
797
  ref?: Ref<HTMLSpanElement>;
548
- revealed?: boolean;
549
- defaultRevealed?: boolean;
550
- onRevealedChange?: (revealed: boolean) => void;
798
+ open?: boolean;
799
+ defaultOpen?: boolean;
800
+ onOpenChange?: (open: boolean) => void;
551
801
  revealOn?: 'click' | 'hover';
552
802
  accentColor?: string;
553
803
  density?: number;
554
804
  fps?: number;
555
805
  revealLabel?: string;
556
806
  }
557
- declare function Spoiler({ ref, revealed: revealedProp, defaultRevealed, onRevealedChange, revealOn, accentColor, density, fps, revealLabel, className, style, children, onClick, onKeyDown, onMouseEnter, onMouseLeave, ...rest }: SpoilerProps): react.JSX.Element;
807
+ declare function Spoiler({ ref, open: openProp, defaultOpen, onOpenChange, revealOn, accentColor, density, fps, revealLabel, className, style, children, onClick, onKeyDown, onMouseEnter, onMouseLeave, ...rest }: SpoilerProps): react.JSX.Element;
558
808
  declare namespace Spoiler {
559
809
  var displayName: string;
560
810
  }
561
811
 
812
+ interface StepperProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'> {
813
+ ref?: Ref<HTMLDivElement>;
814
+ value?: number;
815
+ defaultValue?: number;
816
+ onValueChange?: (value: number) => void;
817
+ min?: number;
818
+ max?: number;
819
+ step?: number;
820
+ disabled?: boolean;
821
+ }
822
+ declare function Stepper({ ref, value: valueProp, defaultValue, onValueChange, min, max, step, disabled, className, ...rest }: StepperProps): react.JSX.Element;
823
+ declare namespace Stepper {
824
+ var displayName: string;
825
+ }
826
+
827
+ interface StepsProps extends HTMLAttributes<HTMLDivElement> {
828
+ ref?: Ref<HTMLDivElement>;
829
+ count: number;
830
+ progress: number;
831
+ }
832
+ declare function Steps({ ref, count, progress, className, 'aria-label': ariaLabel, ...rest }: StepsProps): react.JSX.Element;
833
+ declare namespace Steps {
834
+ var displayName: string;
835
+ }
836
+
562
837
  type SubheadlineLevel = '1' | '2';
563
838
 
564
839
  interface SubheadlineProps extends TypographyProps {
@@ -573,7 +848,7 @@ declare namespace Subheadline {
573
848
  interface SwitchProps extends InputHTMLAttributes<HTMLInputElement> {
574
849
  ref?: Ref<HTMLInputElement>;
575
850
  }
576
- declare function Switch({ ref, disabled, className, style, ...rest }: SwitchProps): react.JSX.Element;
851
+ declare function Switch({ ref, disabled, className, style, onChange, ...rest }: SwitchProps): react.JSX.Element;
577
852
  declare namespace Switch {
578
853
  var displayName: string;
579
854
  }
@@ -624,21 +899,46 @@ interface TguiProviderProps extends HTMLAttributes<HTMLDivElement> {
624
899
  platform?: TguiPlatform;
625
900
  appearance?: Appearance;
626
901
  portalContainer?: HTMLElement | null;
902
+ haptics?: boolean;
627
903
  }
628
- declare function TguiProvider({ ref, platform: platformProp, appearance: appearanceProp, portalContainer: portalContainerProp, className, children, ...rest }: TguiProviderProps): react.JSX.Element;
904
+ declare function TguiProvider({ ref, platform: platformProp, appearance: appearanceProp, portalContainer: portalContainerProp, haptics, className, children, ...rest }: TguiProviderProps): react.JSX.Element;
629
905
  declare namespace TguiProvider {
630
906
  var displayName: string;
631
907
  }
632
908
 
909
+ type HapticIntent = 'tap' | 'press' | 'select' | 'success' | 'warning' | 'error';
910
+
911
+ declare function useHaptic(): (intent: HapticIntent) => void;
912
+
633
913
  declare function useTgui(): TguiContextValue;
634
914
 
915
+ interface TimelineProps extends HTMLAttributes<HTMLOListElement> {
916
+ ref?: Ref<HTMLOListElement>;
917
+ }
918
+ declare function Timeline({ ref, className, children, ...rest }: TimelineProps): react.JSX.Element;
919
+ declare namespace Timeline {
920
+ var displayName: string;
921
+ }
922
+
923
+ interface TimelineItemProps extends Omit<HTMLAttributes<HTMLLIElement>, 'title'> {
924
+ ref?: Ref<HTMLLIElement>;
925
+ title: ReactNode;
926
+ description?: ReactNode;
927
+ time?: ReactNode;
928
+ active?: boolean;
929
+ }
930
+ declare function TimelineItem({ ref, title, description, time, active, className, ...rest }: TimelineItemProps): react.JSX.Element;
931
+ declare namespace TimelineItem {
932
+ var displayName: string;
933
+ }
934
+
635
935
  type TitleLevel = '1' | '2' | '3';
636
936
 
637
937
  interface TitleProps extends TypographyProps {
638
938
  ref?: Ref<HTMLElement>;
639
939
  level?: TitleLevel;
640
940
  }
641
- declare function Title({ ref, level, Component, className, ...rest }: TitleProps): react.JSX.Element;
941
+ declare function Title({ ref, level, weight, Component, className, ...rest }: TitleProps): react.JSX.Element;
642
942
  declare namespace Title {
643
943
  var displayName: string;
644
944
  }
@@ -650,13 +950,14 @@ interface TooltipProps {
650
950
  content: ReactNode;
651
951
  placement?: TooltipPlacement;
652
952
  open?: boolean;
953
+ defaultOpen?: boolean;
653
954
  onOpenChange?: (open: boolean) => void;
654
955
  className?: string;
655
956
  }
656
- declare function Tooltip({ ref, children, content, placement, open: openProp, onOpenChange, className, }: TooltipProps): react.JSX.Element;
957
+ declare function Tooltip({ ref, children, content, placement, open: openProp, defaultOpen, onOpenChange, className, }: TooltipProps): react.JSX.Element;
657
958
  declare namespace Tooltip {
658
959
  var displayName: string;
659
960
  }
660
961
 
661
- export { Accordion, AccordionItem, Avatar, AvatarStack, Badge, Banner, Blockquote, Button, Caption, Card, CardCell, Cell, Checkbox, Chip, CircularProgress, Divider, FixedLayout, Headline, HorizontalScroll, IconButton, Image, Input, LargeTitle, Link, List, PinInput, Placeholder, Portal, Progress, Radio, Rating, Section, SectionFooter, SectionHeader, SegmentedControl, SegmentedControlItem, Select, Sheet, Skeleton, Slider, SnackbarProvider, Spinner, Spoiler, Subheadline, Switch, TabBar, TabBarItem, Tappable, Text, Textarea, TguiProvider, Title, Tooltip, Typography, useSnackbar, useTgui };
662
- export type { AccordionItemProps, AccordionProps, AvatarProps, AvatarSize, AvatarStackProps, BadgeMode, BadgeProps, BadgeType, BannerProps, BannerType, BlockquoteProps, ButtonMode, ButtonProps, ButtonSize, CaptionProps, CardCellProps, CardProps, CardType, CellProps, CheckboxProps, ChipMode, ChipProps, CircularProgressProps, CircularProgressSize, DividerProps, FixedLayoutProps, HeadlineProps, HorizontalScrollProps, IconButtonMode, IconButtonProps, IconButtonSize, ImageProps, InputProps, InputStatus, LargeTitleProps, LinkProps, ListProps, PinInputProps, PlaceholderProps, PortalProps, ProgressProps, RadioProps, RatingProps, SectionFooterProps, SectionHeaderProps, SectionProps, SegmentedControlItemProps, SegmentedControlProps, SelectProps, SheetProps, SkeletonProps, SliderProps, SnackbarApi, SnackbarOptions, SnackbarProviderProps, SpinnerProps, SpinnerSize, SpoilerProps, SubheadlineProps, SwitchProps, TabBarItemProps, TabBarProps, TappableProps, TextProps, TextareaProps, TextareaStatus, TguiProviderProps, TitleProps, TooltipPlacement, TooltipProps, TypographyProps };
962
+ export { Accordion, AccordionItem, Avatar, AvatarStack, Badge, Banner, Blockquote, Breadcrumbs, Button, Callout, Caption, Card, CardCell, Cell, Checkbox, Chip, CircularProgress, CompactPagination, Dialog, Divider, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuTrigger, FixedLayout, Footnote, Headline, HorizontalScroll, IconButton, Image, InlineButtons, InlineButtonsItem, Input, LargeTitle, Link, List, Pagination, PinInput, Placeholder, Popover, PopoverContent, PopoverTrigger, Portal, Progress, Radio, Rating, SearchBar, Section, SectionFooter, SectionHeader, SegmentedControl, SegmentedControlItem, Select, Sheet, Skeleton, Slider, SnackbarProvider, Spinner, Spoiler, Stepper, Steps, Subheadline, Switch, TabBar, TabBarItem, Tappable, Text, Textarea, TguiProvider, Timeline, TimelineItem, Title, Tooltip, Typography, useHaptic, useSnackbar, useTgui };
963
+ export type { AccordionItemProps, AccordionProps, AvatarProps, AvatarSize, AvatarStackProps, BadgeMode, BadgeProps, BadgeType, BannerProps, BannerType, BlockquoteProps, BreadcrumbItem, BreadcrumbsProps, ButtonMode, ButtonProps, ButtonSize, CalloutProps, CaptionProps, CardCellProps, CardProps, CardType, CellProps, CheckboxProps, ChipMode, ChipProps, CircularProgressProps, CircularProgressSize, CompactPaginationProps, DialogAction, DialogActionRole, DialogProps, DividerProps, DropdownMenuCheckboxItemProps, DropdownMenuContentProps, DropdownMenuItemProps, DropdownMenuLabelProps, DropdownMenuProps, DropdownMenuRadioGroupProps, DropdownMenuRadioItemProps, DropdownMenuSeparatorProps, DropdownMenuTriggerProps, FixedLayoutProps, FootnoteProps, HeadlineProps, HorizontalScrollProps, IconButtonMode, IconButtonProps, IconButtonSize, ImageProps, InlineButtonsItemProps, InlineButtonsMode, InlineButtonsProps, InputProps, InputStatus, LargeTitleProps, LinkProps, ListProps, PaginationProps, PinInputProps, PlaceholderProps, PopoverContentProps, PopoverProps, PopoverTriggerProps, PortalProps, ProgressProps, RadioProps, RatingProps, SearchBarProps, SectionFooterProps, SectionHeaderProps, SectionProps, SegmentedControlItemProps, SegmentedControlProps, SelectProps, SheetProps, SkeletonProps, SliderProps, SnackbarApi, SnackbarOptions, SnackbarProviderProps, SpinnerProps, SpinnerSize, SpoilerProps, StepperProps, StepsProps, SubheadlineProps, SwitchProps, TabBarItemProps, TabBarProps, TappableProps, TextProps, TextareaProps, TextareaStatus, TguiProviderProps, TimelineItemProps, TimelineProps, TitleProps, TooltipPlacement, TooltipProps, TypographyProps };