liquent 0.2.0 → 0.4.1

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.cts CHANGED
@@ -1,5 +1,13 @@
1
1
 
2
- import { ButtonHTMLAttributes, CSSProperties, ElementType, ForwardRefExoticComponent, HTMLAttributes, InputHTMLAttributes, JSX, LiHTMLAttributes, ReactElement, ReactNode, RefAttributes, SelectHTMLAttributes } from "react";
2
+ import { ButtonHTMLAttributes, CSSProperties, ElementType, ForwardRefExoticComponent, HTMLAttributes, InputHTMLAttributes, JSX, LiHTMLAttributes, MouseEventHandler, ReactElement, ReactNode, RefAttributes, SelectHTMLAttributes } from "react";
3
+ interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
4
+ /** `glass` is a frosted capsule; `filled` takes the accent colour, or `tint`, as an iOS badge's red does. */
5
+ variant?: "glass" | "filled";
6
+ /** Any CSS colour: the fill of a filled badge, the text of a glass one. */
7
+ tint?: string;
8
+ }
9
+ /** A small capsule beside something, with a count or a word: new mail, a status, a version. */
10
+ export declare const Badge: ForwardRefExoticComponent<BadgeProps & RefAttributes<HTMLSpanElement>>;
3
11
  interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
4
12
  /** Shown before the label. On its own, the button is a circle; give it an `aria-label`. */
5
13
  icon?: ReactNode;
@@ -15,6 +23,50 @@ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
15
23
  size?: "sm" | "md" | "lg";
16
24
  }
17
25
  export declare const Button: ForwardRefExoticComponent<ButtonProps & RefAttributes<HTMLButtonElement>>;
26
+ interface GlassProps extends HTMLAttributes<HTMLDivElement> {
27
+ /**
28
+ * Which of Apple's two glasses it is. `regular` frosts what's behind it, so
29
+ * what's on it reads over anything. `clear` lets what's behind it through,
30
+ * bent at its rim but hardly softened: for over pictures and video, with
31
+ * bold content on it. Left out, it's the glass every Liquent control is made of.
32
+ */
33
+ variant?: "regular" | "clear";
34
+ /** Whether it answers a press as a control's glass does: it lights up under the pointer, grows, and flexes after a drag. */
35
+ interactive?: boolean;
36
+ /** A colour that tints the glass. */
37
+ tint?: string;
38
+ }
39
+ /**
40
+ * The material itself, as SwiftUI's `glassEffect`: a surface that bends,
41
+ * frosts and lights what's behind it, in the shape its border radius gives it.
42
+ */
43
+ export declare const Glass: ForwardRefExoticComponent<GlassProps & RefAttributes<HTMLDivElement>>;
44
+ interface CardProps extends GlassProps {
45
+ /**
46
+ * One of iOS's widget sizes, in points: `small` 170 square, `medium` 364 by
47
+ * 170, `large` 364 by 382. Left out, it's as large as what it holds.
48
+ */
49
+ size?: "small" | "medium" | "large";
50
+ }
51
+ /**
52
+ * A card of glass with a widget's corners and padding, for a small piece of
53
+ * content over a picture: a forecast, an appointment, a summary. Built from
54
+ * CardHeader, CardTitle, CardDescription and CardFooter, or anything else.
55
+ * `interactive` has it answer a press, as a widget does.
56
+ */
57
+ export declare const Card: ForwardRefExoticComponent<CardProps & RefAttributes<HTMLDivElement>>;
58
+ interface CardHeaderProps extends HTMLAttributes<HTMLDivElement> {
59
+ /** Drawn ahead of the title, as a widget's app icon or symbol. */
60
+ icon?: ReactNode;
61
+ }
62
+ /** The card's top line: an icon, and its title and description beside it. */
63
+ export declare const CardHeader: ForwardRefExoticComponent<CardHeaderProps & RefAttributes<HTMLDivElement>>;
64
+ /** The card's title, in a widget's semibold. */
65
+ export declare const CardTitle: ForwardRefExoticComponent<HTMLAttributes<HTMLHeadingElement> & RefAttributes<HTMLHeadingElement>>;
66
+ /** A line under the title, a little smaller and fainter. */
67
+ export declare const CardDescription: ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & RefAttributes<HTMLParagraphElement>>;
68
+ /** The card's last line, at its bottom however tall it is: a time, a total, a button. */
69
+ export declare const CardFooter: ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement>>;
18
70
  interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "checked" | "defaultChecked" | "onChange"> {
19
71
  checked?: boolean;
20
72
  defaultChecked?: boolean;
@@ -41,7 +93,7 @@ interface ComboboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "val
41
93
  inputValue?: string;
42
94
  /** Called as what's typed changes, as to fetch the items that match it. */
43
95
  onInputValueChange?: (text: string) => void;
44
- /** Whether an item is listed for what's typed. Defaults to its label holding it, compared with `foldText`: any case, and Persian and Arabic letters, digits and half-spaces however they were typed. */
96
+ /** Whether an item is listed for what's typed. Defaults to its label holding it, compared with `foldText`: any case, Persian and Arabic letters, digits and half-spaces however they were typed, Latin accents, ß and Russian ё. */
45
97
  filter?: (item: ComboboxItem, text: string) => boolean;
46
98
  /** Its field's height: `sm` 28, `md` 32 or `lg` 40 px. With none, its own, or the `size` of the Modal it's in. */
47
99
  size?: "sm" | "md" | "lg";
@@ -102,24 +154,45 @@ interface DialogProps extends Omit<HTMLAttributes<HTMLDialogElement>, "title"> {
102
154
  * as a macOS alert does, and holds the page until it's answered.
103
155
  */
104
156
  export declare const Dialog: ForwardRefExoticComponent<DialogProps & RefAttributes<HTMLDialogElement>>;
105
- interface GlassProps extends HTMLAttributes<HTMLDivElement> {
157
+ interface DisclosureProps extends Omit<HTMLAttributes<HTMLDivElement>, "title" | "onToggle"> {
158
+ /** The row that opens and closes it. */
159
+ label: ReactNode;
160
+ /** Whether it's open, when controlled. */
161
+ open?: boolean;
162
+ /** Whether it's open at first, when uncontrolled. */
163
+ defaultOpen?: boolean;
164
+ onOpenChange?: (open: boolean) => void;
165
+ }
166
+ /**
167
+ * A row with a chevron that opens to show more under it, and closes again:
168
+ * SwiftUI's DisclosureGroup. The chevron turns down as it opens, and what's
169
+ * under it grows into place.
170
+ */
171
+ export declare const Disclosure: ForwardRefExoticComponent<DisclosureProps & RefAttributes<HTMLDivElement>>;
172
+ interface GaugeProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
173
+ /** Where it stands, between `min` and `max`. */
174
+ value: number;
175
+ min?: number;
176
+ max?: number;
106
177
  /**
107
- * Which of Apple's two glasses it is. `regular` frosts what's behind it, so
108
- * what's on it reads over anything. `clear` lets what's behind it through,
109
- * bent at its rim but hardly softened: for over pictures and video, with
110
- * bold content on it. Left out, it's the glass every Liquent control is made of.
178
+ * `circular` is an open ring with the value in it, as a Lock Screen
179
+ * widget's; `linear` a bar with a dot on it, as a battery's or a
180
+ * forecast's.
111
181
  */
112
- variant?: "regular" | "clear";
113
- /** Whether it answers a press as a control's glass does: it lights up under the pointer, grows, and flexes after a drag. */
114
- interactive?: boolean;
115
- /** A colour that tints the glass. */
182
+ variant?: "circular" | "linear";
183
+ /** What's shown in the ring, or beside the bar: the value by default. */
184
+ label?: ReactNode;
185
+ /** The ends' labels, as "0" and "100" or "L" and "H". */
186
+ minLabel?: ReactNode;
187
+ maxLabel?: ReactNode;
188
+ /** Any CSS colour for the filled part; for a linear gauge, a gradient for the whole bar too, as a forecast's is. */
116
189
  tint?: string;
117
190
  }
118
191
  /**
119
- * The material itself, as SwiftUI's `glassEffect`: a surface that bends,
120
- * frosts and lights what's behind it, in the shape its border radius gives it.
192
+ * A value within a range, shown, not set: SwiftUI's Gauge. A ring with the
193
+ * value in it, or a bar with a dot. A screen reader reads it as a meter.
121
194
  */
122
- export declare const Glass: ForwardRefExoticComponent<GlassProps & RefAttributes<HTMLDivElement>>;
195
+ export declare const Gauge: ForwardRefExoticComponent<GaugeProps & RefAttributes<HTMLDivElement>>;
123
196
  interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "value" | "defaultValue" | "onChange" | "size"> {
124
197
  value?: string;
125
198
  defaultValue?: string;
@@ -134,6 +207,51 @@ interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "value"
134
207
  size?: "sm" | "md" | "lg";
135
208
  }
136
209
  export declare const Input: ForwardRefExoticComponent<InputProps & RefAttributes<HTMLInputElement>>;
210
+ interface ListProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
211
+ /** Small capitals over the group, as a Settings section's heading. */
212
+ header?: ReactNode;
213
+ /** A line or two of help under the group. */
214
+ footer?: ReactNode;
215
+ }
216
+ /**
217
+ * A group of rows on a card of glass, as iOS's inset grouped lists are in
218
+ * Settings: a heading over it, rows split by hairlines that start where the
219
+ * text does, and a note under it.
220
+ */
221
+ export declare const List: ForwardRefExoticComponent<ListProps & RefAttributes<HTMLDivElement>>;
222
+ interface ListItemProps extends Omit<HTMLAttributes<HTMLElement>, "title"> {
223
+ /** What the row is. */
224
+ label: ReactNode;
225
+ /** A smaller line under the label. */
226
+ description?: ReactNode;
227
+ /** Drawn ahead of the label: an icon, alone or on a tinted square (`iconTint`), as Settings' are. */
228
+ icon?: ReactNode;
229
+ /** Any CSS colour: the icon is drawn white on a rounded square of it. */
230
+ iconTint?: string;
231
+ /** The row's value, in grey at its end, as "Wi-Fi … Home". */
232
+ detail?: ReactNode;
233
+ /**
234
+ * What ends the row: a chevron for a row that opens something, a check for
235
+ * the chosen one of a list of choices, or a control of its own (a Switch).
236
+ * A row with `href` or `onClick` has a chevron unless told otherwise.
237
+ */
238
+ accessory?: "chevron" | "check" | "none" | ReactNode;
239
+ /** Makes the row a link. */
240
+ href?: string;
241
+ /** A link component to draw it with, such as a router's. */
242
+ link?: ElementType;
243
+ /** Makes the row a button. */
244
+ onClick?: MouseEventHandler<HTMLElement>;
245
+ /** Red, for a row that deletes or signs out. */
246
+ destructive?: boolean;
247
+ disabled?: boolean;
248
+ }
249
+ /**
250
+ * One row of a List: an optional icon, a label with a line under it, a value
251
+ * at its end, and a chevron, a check or a control. With `href` it's a link,
252
+ * with `onClick` a button, and it lights while pressed, as a table cell does.
253
+ */
254
+ export declare const ListItem: ForwardRefExoticComponent<ListItemProps & RefAttributes<HTMLElement>>;
137
255
  /** The words Liquent's components say on their own: names for icon-only buttons and default texts. */
138
256
  interface Labels {
139
257
  /** The button that empties an `Input`. */
@@ -156,8 +274,10 @@ interface Labels {
156
274
  search: string;
157
275
  /** What a `Combobox` shows when nothing matches. */
158
276
  noResults: string;
277
+ /** A `PageControl`'s dot: `{page}` and `{count}` stand for its number and how many there are. */
278
+ page: string;
159
279
  }
160
- type Locale = "en" | "fa";
280
+ type Locale = "en" | "fa" | "de" | "ru";
161
281
  interface LiquentProviderProps {
162
282
  /** The language of the words the components say on their own. Defaults to `"en"`. */
163
283
  locale?: Locale;
@@ -240,6 +360,68 @@ interface ModalParts {
240
360
  * what it holds scrolls when it's taller than the window.
241
361
  */
242
362
  export declare const Modal: ForwardRefExoticComponent<ModalProps & RefAttributes<HTMLDialogElement>> & ModalParts;
363
+ interface NavigationBarProps extends Omit<HTMLAttributes<HTMLElement>, "title"> {
364
+ /** The page's title: large under the bar, and in the bar once that's scrolled under it. */
365
+ title: ReactNode;
366
+ /** Whether the title starts large, as iOS's large titles do. Without, it's always in the bar. */
367
+ large?: boolean;
368
+ /** At the bar's start: a back button, usually a Button with an icon. */
369
+ leading?: ReactNode;
370
+ /** At the bar's end: a few Buttons, which iOS 26 groups in one capsule of glass. */
371
+ trailing?: ReactNode;
372
+ /** A line under the large title, as Mail's "Updated just now". */
373
+ subtitle?: ReactNode;
374
+ }
375
+ /**
376
+ * iOS's navigation bar: buttons at either end, and a large title under it
377
+ * that, scrolled up under the bar, becomes the bar's own small title. The bar
378
+ * is clear over the top of the page and turns to glass once something is
379
+ * under it. It stays at the top of what scrolls; the large title scrolls with
380
+ * the page.
381
+ */
382
+ export declare const NavigationBar: ForwardRefExoticComponent<NavigationBarProps & RefAttributes<HTMLElement>>;
383
+ interface PageControlProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue" | "onChange"> {
384
+ /** How many pages there are. */
385
+ count: number;
386
+ /** The page shown, from 0, when controlled. */
387
+ value?: number;
388
+ /** The page shown at first, when uncontrolled. */
389
+ defaultValue?: number;
390
+ onValueChange?: (page: number) => void;
391
+ }
392
+ /**
393
+ * A row of dots, one a page, the current one lit, on a capsule of glass: iOS's
394
+ * page control. A dot pressed, or the arrow keys, turn to that page.
395
+ */
396
+ export declare const PageControl: ForwardRefExoticComponent<PageControlProps & RefAttributes<HTMLDivElement>>;
397
+ /** Which side of what it's anchored to a card opens on. */
398
+ type Side = "top" | "bottom";
399
+ /** Which of the anchor's edges a card lines up with: its start, its middle, or its end, as the text runs. */
400
+ type Align = "start" | "center" | "end";
401
+ interface PopoverProps extends Omit<HTMLAttributes<HTMLDivElement>, "content"> {
402
+ /** What opens it: a Button, usually. It's told whether the popover is open, for assistive technology. */
403
+ trigger: ReactElement;
404
+ /** What the popover holds. */
405
+ children?: ReactNode;
406
+ /** Whether it's open, when controlled. */
407
+ open?: boolean;
408
+ /** Whether it starts open, when uncontrolled. */
409
+ defaultOpen?: boolean;
410
+ onOpenChange?: (open: boolean) => void;
411
+ /** Which side of the trigger it opens on, where there's room. */
412
+ side?: Side;
413
+ /** Which of the trigger's edges it lines up with. */
414
+ align?: Align;
415
+ /** Names it for assistive technology. */
416
+ "aria-label"?: string;
417
+ }
418
+ /**
419
+ * A card of glass that opens from a button and holds anything: settings, a
420
+ * picker, a few lines. It grows out of the button and shrinks back into it, as
421
+ * an iOS popover does; Escape or a press outside closes it, and focus goes
422
+ * back to the button.
423
+ */
424
+ export declare const Popover: ForwardRefExoticComponent<PopoverProps & RefAttributes<HTMLDivElement>>;
243
425
  interface ProgressProps extends HTMLAttributes<HTMLDivElement> {
244
426
  /** How far along it is, from 0 to `max`. Left out, it isn't known, and the bar keeps moving. */
245
427
  value?: number;
@@ -560,6 +742,49 @@ interface TabBarProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue
560
742
  * are links, and the bar is then navigation.
561
743
  */
562
744
  export declare const TabBar: ForwardRefExoticComponent<TabBarProps & RefAttributes<HTMLDivElement>>;
745
+ interface ToastOptions {
746
+ /** More about it, under the title. */
747
+ description?: ReactNode;
748
+ /** Drawn ahead of the title. */
749
+ icon?: ReactNode;
750
+ /** A button on it, such as Undo. Pressing it closes the toast. */
751
+ action?: {
752
+ label: ReactNode;
753
+ onSelect: () => void;
754
+ };
755
+ /** How long it stays, in ms. `Infinity` keeps it until it's closed. */
756
+ duration?: number;
757
+ }
758
+ /** Takes a toast away: it slides back up and is gone. */
759
+ export declare function dismissToast(id: number): void;
760
+ /**
761
+ * Shows a toast: a banner of glass that drops in from the top, as an iOS
762
+ * notification does, says one thing, and goes by itself. Returns its id, to
763
+ * take it away sooner with `dismissToast`. A `Toaster` must be on the page.
764
+ */
765
+ export declare function toast(title: ReactNode, options?: ToastOptions): number;
766
+ interface ToasterProps {
767
+ className?: string;
768
+ }
769
+ /** Where toasts show: across the top of the window. Put one on the page, once. */
770
+ export declare function Toaster({ className }: ToasterProps): JSX.Element;
771
+ interface TooltipProps {
772
+ /** What it says: a few words. */
773
+ content: ReactNode;
774
+ /** What it's about: one element, which it's attached to. */
775
+ children: ReactElement;
776
+ /** Which side it shows on, where there's room. */
777
+ side?: Side;
778
+ align?: Align;
779
+ /** How long the pointer rests before it shows, in ms. With the keyboard it shows at once. */
780
+ delay?: number;
781
+ }
782
+ /**
783
+ * A few words in a capsule of glass, shown when the pointer rests on
784
+ * something or the keyboard reaches it, as macOS's help tags. A touch doesn't
785
+ * show it: what it says must be found another way there too.
786
+ */
787
+ export declare function Tooltip({ content, children, side, align, delay }: TooltipProps): JSX.Element;
563
788
  interface ToolbarItem {
564
789
  /** Names the button: shown beside its icon, or read out in its place. */
565
790
  label: string;
@@ -599,4 +824,4 @@ export declare const ToolbarTitle: ForwardRefExoticComponent<ToolbarTitleProps &
599
824
  * groups that each float on their own piece of glass.
600
825
  */
601
826
  export declare const Toolbar: ForwardRefExoticComponent<ToolbarProps & RefAttributes<HTMLDivElement>>;
602
- export type { ButtonProps, CheckboxProps, ComboboxItem, ComboboxProps, ContextMenuProps, DialogProps, GlassProps, GlassTint, InputProps, Labels, LiquentProviderProps, Locale, MenuEntry, MenuItem, MenuProps, ModalProps, ProgressProps, RadioGroupItem, RadioGroupProps, ScrollAreaProps, SearchFieldProps, SegmentedControlItem, SegmentedControlProps, SelectItem, SelectProps, SheetProps, SheetSnapPoint, SidebarCollapsible, SidebarContextValue, SidebarGroupProps, SidebarMenuActionProps, SidebarMenuButtonProps, SidebarMenuItemProps, SidebarMenuSubButtonProps, SidebarProps, SidebarProviderProps, SliderProps, SpinnerProps, StepperProps, SwitchProps, TabBarItem, TabBarProps, ToolbarEntry, ToolbarItem, ToolbarProps, ToolbarTitleProps };
827
+ export type { BadgeProps, ButtonProps, CardHeaderProps, CardProps, CheckboxProps, ComboboxItem, ComboboxProps, ContextMenuProps, DialogProps, DisclosureProps, GaugeProps, GlassProps, GlassTint, InputProps, Labels, LiquentProviderProps, ListItemProps, ListProps, Locale, MenuEntry, MenuItem, MenuProps, ModalProps, NavigationBarProps, PageControlProps, PopoverProps, ProgressProps, RadioGroupItem, RadioGroupProps, ScrollAreaProps, SearchFieldProps, SegmentedControlItem, SegmentedControlProps, SelectItem, SelectProps, SheetProps, SheetSnapPoint, SidebarCollapsible, SidebarContextValue, SidebarGroupProps, SidebarMenuActionProps, SidebarMenuButtonProps, SidebarMenuItemProps, SidebarMenuSubButtonProps, SidebarProps, SidebarProviderProps, SliderProps, SpinnerProps, StepperProps, SwitchProps, TabBarItem, TabBarProps, ToastOptions, ToasterProps, ToolbarEntry, ToolbarItem, ToolbarProps, ToolbarTitleProps, TooltipProps };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,13 @@
1
1
 
2
- import { ButtonHTMLAttributes, CSSProperties, ElementType, ForwardRefExoticComponent, HTMLAttributes, InputHTMLAttributes, JSX, LiHTMLAttributes, ReactElement, ReactNode, RefAttributes, SelectHTMLAttributes } from "react";
2
+ import { ButtonHTMLAttributes, CSSProperties, ElementType, ForwardRefExoticComponent, HTMLAttributes, InputHTMLAttributes, JSX, LiHTMLAttributes, MouseEventHandler, ReactElement, ReactNode, RefAttributes, SelectHTMLAttributes } from "react";
3
+ interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
4
+ /** `glass` is a frosted capsule; `filled` takes the accent colour, or `tint`, as an iOS badge's red does. */
5
+ variant?: "glass" | "filled";
6
+ /** Any CSS colour: the fill of a filled badge, the text of a glass one. */
7
+ tint?: string;
8
+ }
9
+ /** A small capsule beside something, with a count or a word: new mail, a status, a version. */
10
+ export declare const Badge: ForwardRefExoticComponent<BadgeProps & RefAttributes<HTMLSpanElement>>;
3
11
  interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
4
12
  /** Shown before the label. On its own, the button is a circle; give it an `aria-label`. */
5
13
  icon?: ReactNode;
@@ -15,6 +23,50 @@ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
15
23
  size?: "sm" | "md" | "lg";
16
24
  }
17
25
  export declare const Button: ForwardRefExoticComponent<ButtonProps & RefAttributes<HTMLButtonElement>>;
26
+ interface GlassProps extends HTMLAttributes<HTMLDivElement> {
27
+ /**
28
+ * Which of Apple's two glasses it is. `regular` frosts what's behind it, so
29
+ * what's on it reads over anything. `clear` lets what's behind it through,
30
+ * bent at its rim but hardly softened: for over pictures and video, with
31
+ * bold content on it. Left out, it's the glass every Liquent control is made of.
32
+ */
33
+ variant?: "regular" | "clear";
34
+ /** Whether it answers a press as a control's glass does: it lights up under the pointer, grows, and flexes after a drag. */
35
+ interactive?: boolean;
36
+ /** A colour that tints the glass. */
37
+ tint?: string;
38
+ }
39
+ /**
40
+ * The material itself, as SwiftUI's `glassEffect`: a surface that bends,
41
+ * frosts and lights what's behind it, in the shape its border radius gives it.
42
+ */
43
+ export declare const Glass: ForwardRefExoticComponent<GlassProps & RefAttributes<HTMLDivElement>>;
44
+ interface CardProps extends GlassProps {
45
+ /**
46
+ * One of iOS's widget sizes, in points: `small` 170 square, `medium` 364 by
47
+ * 170, `large` 364 by 382. Left out, it's as large as what it holds.
48
+ */
49
+ size?: "small" | "medium" | "large";
50
+ }
51
+ /**
52
+ * A card of glass with a widget's corners and padding, for a small piece of
53
+ * content over a picture: a forecast, an appointment, a summary. Built from
54
+ * CardHeader, CardTitle, CardDescription and CardFooter, or anything else.
55
+ * `interactive` has it answer a press, as a widget does.
56
+ */
57
+ export declare const Card: ForwardRefExoticComponent<CardProps & RefAttributes<HTMLDivElement>>;
58
+ interface CardHeaderProps extends HTMLAttributes<HTMLDivElement> {
59
+ /** Drawn ahead of the title, as a widget's app icon or symbol. */
60
+ icon?: ReactNode;
61
+ }
62
+ /** The card's top line: an icon, and its title and description beside it. */
63
+ export declare const CardHeader: ForwardRefExoticComponent<CardHeaderProps & RefAttributes<HTMLDivElement>>;
64
+ /** The card's title, in a widget's semibold. */
65
+ export declare const CardTitle: ForwardRefExoticComponent<HTMLAttributes<HTMLHeadingElement> & RefAttributes<HTMLHeadingElement>>;
66
+ /** A line under the title, a little smaller and fainter. */
67
+ export declare const CardDescription: ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & RefAttributes<HTMLParagraphElement>>;
68
+ /** The card's last line, at its bottom however tall it is: a time, a total, a button. */
69
+ export declare const CardFooter: ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement>>;
18
70
  interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "checked" | "defaultChecked" | "onChange"> {
19
71
  checked?: boolean;
20
72
  defaultChecked?: boolean;
@@ -41,7 +93,7 @@ interface ComboboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "val
41
93
  inputValue?: string;
42
94
  /** Called as what's typed changes, as to fetch the items that match it. */
43
95
  onInputValueChange?: (text: string) => void;
44
- /** Whether an item is listed for what's typed. Defaults to its label holding it, compared with `foldText`: any case, and Persian and Arabic letters, digits and half-spaces however they were typed. */
96
+ /** Whether an item is listed for what's typed. Defaults to its label holding it, compared with `foldText`: any case, Persian and Arabic letters, digits and half-spaces however they were typed, Latin accents, ß and Russian ё. */
45
97
  filter?: (item: ComboboxItem, text: string) => boolean;
46
98
  /** Its field's height: `sm` 28, `md` 32 or `lg` 40 px. With none, its own, or the `size` of the Modal it's in. */
47
99
  size?: "sm" | "md" | "lg";
@@ -102,24 +154,45 @@ interface DialogProps extends Omit<HTMLAttributes<HTMLDialogElement>, "title"> {
102
154
  * as a macOS alert does, and holds the page until it's answered.
103
155
  */
104
156
  export declare const Dialog: ForwardRefExoticComponent<DialogProps & RefAttributes<HTMLDialogElement>>;
105
- interface GlassProps extends HTMLAttributes<HTMLDivElement> {
157
+ interface DisclosureProps extends Omit<HTMLAttributes<HTMLDivElement>, "title" | "onToggle"> {
158
+ /** The row that opens and closes it. */
159
+ label: ReactNode;
160
+ /** Whether it's open, when controlled. */
161
+ open?: boolean;
162
+ /** Whether it's open at first, when uncontrolled. */
163
+ defaultOpen?: boolean;
164
+ onOpenChange?: (open: boolean) => void;
165
+ }
166
+ /**
167
+ * A row with a chevron that opens to show more under it, and closes again:
168
+ * SwiftUI's DisclosureGroup. The chevron turns down as it opens, and what's
169
+ * under it grows into place.
170
+ */
171
+ export declare const Disclosure: ForwardRefExoticComponent<DisclosureProps & RefAttributes<HTMLDivElement>>;
172
+ interface GaugeProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
173
+ /** Where it stands, between `min` and `max`. */
174
+ value: number;
175
+ min?: number;
176
+ max?: number;
106
177
  /**
107
- * Which of Apple's two glasses it is. `regular` frosts what's behind it, so
108
- * what's on it reads over anything. `clear` lets what's behind it through,
109
- * bent at its rim but hardly softened: for over pictures and video, with
110
- * bold content on it. Left out, it's the glass every Liquent control is made of.
178
+ * `circular` is an open ring with the value in it, as a Lock Screen
179
+ * widget's; `linear` a bar with a dot on it, as a battery's or a
180
+ * forecast's.
111
181
  */
112
- variant?: "regular" | "clear";
113
- /** Whether it answers a press as a control's glass does: it lights up under the pointer, grows, and flexes after a drag. */
114
- interactive?: boolean;
115
- /** A colour that tints the glass. */
182
+ variant?: "circular" | "linear";
183
+ /** What's shown in the ring, or beside the bar: the value by default. */
184
+ label?: ReactNode;
185
+ /** The ends' labels, as "0" and "100" or "L" and "H". */
186
+ minLabel?: ReactNode;
187
+ maxLabel?: ReactNode;
188
+ /** Any CSS colour for the filled part; for a linear gauge, a gradient for the whole bar too, as a forecast's is. */
116
189
  tint?: string;
117
190
  }
118
191
  /**
119
- * The material itself, as SwiftUI's `glassEffect`: a surface that bends,
120
- * frosts and lights what's behind it, in the shape its border radius gives it.
192
+ * A value within a range, shown, not set: SwiftUI's Gauge. A ring with the
193
+ * value in it, or a bar with a dot. A screen reader reads it as a meter.
121
194
  */
122
- export declare const Glass: ForwardRefExoticComponent<GlassProps & RefAttributes<HTMLDivElement>>;
195
+ export declare const Gauge: ForwardRefExoticComponent<GaugeProps & RefAttributes<HTMLDivElement>>;
123
196
  interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "value" | "defaultValue" | "onChange" | "size"> {
124
197
  value?: string;
125
198
  defaultValue?: string;
@@ -134,6 +207,51 @@ interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "value"
134
207
  size?: "sm" | "md" | "lg";
135
208
  }
136
209
  export declare const Input: ForwardRefExoticComponent<InputProps & RefAttributes<HTMLInputElement>>;
210
+ interface ListProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
211
+ /** Small capitals over the group, as a Settings section's heading. */
212
+ header?: ReactNode;
213
+ /** A line or two of help under the group. */
214
+ footer?: ReactNode;
215
+ }
216
+ /**
217
+ * A group of rows on a card of glass, as iOS's inset grouped lists are in
218
+ * Settings: a heading over it, rows split by hairlines that start where the
219
+ * text does, and a note under it.
220
+ */
221
+ export declare const List: ForwardRefExoticComponent<ListProps & RefAttributes<HTMLDivElement>>;
222
+ interface ListItemProps extends Omit<HTMLAttributes<HTMLElement>, "title"> {
223
+ /** What the row is. */
224
+ label: ReactNode;
225
+ /** A smaller line under the label. */
226
+ description?: ReactNode;
227
+ /** Drawn ahead of the label: an icon, alone or on a tinted square (`iconTint`), as Settings' are. */
228
+ icon?: ReactNode;
229
+ /** Any CSS colour: the icon is drawn white on a rounded square of it. */
230
+ iconTint?: string;
231
+ /** The row's value, in grey at its end, as "Wi-Fi … Home". */
232
+ detail?: ReactNode;
233
+ /**
234
+ * What ends the row: a chevron for a row that opens something, a check for
235
+ * the chosen one of a list of choices, or a control of its own (a Switch).
236
+ * A row with `href` or `onClick` has a chevron unless told otherwise.
237
+ */
238
+ accessory?: "chevron" | "check" | "none" | ReactNode;
239
+ /** Makes the row a link. */
240
+ href?: string;
241
+ /** A link component to draw it with, such as a router's. */
242
+ link?: ElementType;
243
+ /** Makes the row a button. */
244
+ onClick?: MouseEventHandler<HTMLElement>;
245
+ /** Red, for a row that deletes or signs out. */
246
+ destructive?: boolean;
247
+ disabled?: boolean;
248
+ }
249
+ /**
250
+ * One row of a List: an optional icon, a label with a line under it, a value
251
+ * at its end, and a chevron, a check or a control. With `href` it's a link,
252
+ * with `onClick` a button, and it lights while pressed, as a table cell does.
253
+ */
254
+ export declare const ListItem: ForwardRefExoticComponent<ListItemProps & RefAttributes<HTMLElement>>;
137
255
  /** The words Liquent's components say on their own: names for icon-only buttons and default texts. */
138
256
  interface Labels {
139
257
  /** The button that empties an `Input`. */
@@ -156,8 +274,10 @@ interface Labels {
156
274
  search: string;
157
275
  /** What a `Combobox` shows when nothing matches. */
158
276
  noResults: string;
277
+ /** A `PageControl`'s dot: `{page}` and `{count}` stand for its number and how many there are. */
278
+ page: string;
159
279
  }
160
- type Locale = "en" | "fa";
280
+ type Locale = "en" | "fa" | "de" | "ru";
161
281
  interface LiquentProviderProps {
162
282
  /** The language of the words the components say on their own. Defaults to `"en"`. */
163
283
  locale?: Locale;
@@ -240,6 +360,68 @@ interface ModalParts {
240
360
  * what it holds scrolls when it's taller than the window.
241
361
  */
242
362
  export declare const Modal: ForwardRefExoticComponent<ModalProps & RefAttributes<HTMLDialogElement>> & ModalParts;
363
+ interface NavigationBarProps extends Omit<HTMLAttributes<HTMLElement>, "title"> {
364
+ /** The page's title: large under the bar, and in the bar once that's scrolled under it. */
365
+ title: ReactNode;
366
+ /** Whether the title starts large, as iOS's large titles do. Without, it's always in the bar. */
367
+ large?: boolean;
368
+ /** At the bar's start: a back button, usually a Button with an icon. */
369
+ leading?: ReactNode;
370
+ /** At the bar's end: a few Buttons, which iOS 26 groups in one capsule of glass. */
371
+ trailing?: ReactNode;
372
+ /** A line under the large title, as Mail's "Updated just now". */
373
+ subtitle?: ReactNode;
374
+ }
375
+ /**
376
+ * iOS's navigation bar: buttons at either end, and a large title under it
377
+ * that, scrolled up under the bar, becomes the bar's own small title. The bar
378
+ * is clear over the top of the page and turns to glass once something is
379
+ * under it. It stays at the top of what scrolls; the large title scrolls with
380
+ * the page.
381
+ */
382
+ export declare const NavigationBar: ForwardRefExoticComponent<NavigationBarProps & RefAttributes<HTMLElement>>;
383
+ interface PageControlProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue" | "onChange"> {
384
+ /** How many pages there are. */
385
+ count: number;
386
+ /** The page shown, from 0, when controlled. */
387
+ value?: number;
388
+ /** The page shown at first, when uncontrolled. */
389
+ defaultValue?: number;
390
+ onValueChange?: (page: number) => void;
391
+ }
392
+ /**
393
+ * A row of dots, one a page, the current one lit, on a capsule of glass: iOS's
394
+ * page control. A dot pressed, or the arrow keys, turn to that page.
395
+ */
396
+ export declare const PageControl: ForwardRefExoticComponent<PageControlProps & RefAttributes<HTMLDivElement>>;
397
+ /** Which side of what it's anchored to a card opens on. */
398
+ type Side = "top" | "bottom";
399
+ /** Which of the anchor's edges a card lines up with: its start, its middle, or its end, as the text runs. */
400
+ type Align = "start" | "center" | "end";
401
+ interface PopoverProps extends Omit<HTMLAttributes<HTMLDivElement>, "content"> {
402
+ /** What opens it: a Button, usually. It's told whether the popover is open, for assistive technology. */
403
+ trigger: ReactElement;
404
+ /** What the popover holds. */
405
+ children?: ReactNode;
406
+ /** Whether it's open, when controlled. */
407
+ open?: boolean;
408
+ /** Whether it starts open, when uncontrolled. */
409
+ defaultOpen?: boolean;
410
+ onOpenChange?: (open: boolean) => void;
411
+ /** Which side of the trigger it opens on, where there's room. */
412
+ side?: Side;
413
+ /** Which of the trigger's edges it lines up with. */
414
+ align?: Align;
415
+ /** Names it for assistive technology. */
416
+ "aria-label"?: string;
417
+ }
418
+ /**
419
+ * A card of glass that opens from a button and holds anything: settings, a
420
+ * picker, a few lines. It grows out of the button and shrinks back into it, as
421
+ * an iOS popover does; Escape or a press outside closes it, and focus goes
422
+ * back to the button.
423
+ */
424
+ export declare const Popover: ForwardRefExoticComponent<PopoverProps & RefAttributes<HTMLDivElement>>;
243
425
  interface ProgressProps extends HTMLAttributes<HTMLDivElement> {
244
426
  /** How far along it is, from 0 to `max`. Left out, it isn't known, and the bar keeps moving. */
245
427
  value?: number;
@@ -560,6 +742,49 @@ interface TabBarProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue
560
742
  * are links, and the bar is then navigation.
561
743
  */
562
744
  export declare const TabBar: ForwardRefExoticComponent<TabBarProps & RefAttributes<HTMLDivElement>>;
745
+ interface ToastOptions {
746
+ /** More about it, under the title. */
747
+ description?: ReactNode;
748
+ /** Drawn ahead of the title. */
749
+ icon?: ReactNode;
750
+ /** A button on it, such as Undo. Pressing it closes the toast. */
751
+ action?: {
752
+ label: ReactNode;
753
+ onSelect: () => void;
754
+ };
755
+ /** How long it stays, in ms. `Infinity` keeps it until it's closed. */
756
+ duration?: number;
757
+ }
758
+ /** Takes a toast away: it slides back up and is gone. */
759
+ export declare function dismissToast(id: number): void;
760
+ /**
761
+ * Shows a toast: a banner of glass that drops in from the top, as an iOS
762
+ * notification does, says one thing, and goes by itself. Returns its id, to
763
+ * take it away sooner with `dismissToast`. A `Toaster` must be on the page.
764
+ */
765
+ export declare function toast(title: ReactNode, options?: ToastOptions): number;
766
+ interface ToasterProps {
767
+ className?: string;
768
+ }
769
+ /** Where toasts show: across the top of the window. Put one on the page, once. */
770
+ export declare function Toaster({ className }: ToasterProps): JSX.Element;
771
+ interface TooltipProps {
772
+ /** What it says: a few words. */
773
+ content: ReactNode;
774
+ /** What it's about: one element, which it's attached to. */
775
+ children: ReactElement;
776
+ /** Which side it shows on, where there's room. */
777
+ side?: Side;
778
+ align?: Align;
779
+ /** How long the pointer rests before it shows, in ms. With the keyboard it shows at once. */
780
+ delay?: number;
781
+ }
782
+ /**
783
+ * A few words in a capsule of glass, shown when the pointer rests on
784
+ * something or the keyboard reaches it, as macOS's help tags. A touch doesn't
785
+ * show it: what it says must be found another way there too.
786
+ */
787
+ export declare function Tooltip({ content, children, side, align, delay }: TooltipProps): JSX.Element;
563
788
  interface ToolbarItem {
564
789
  /** Names the button: shown beside its icon, or read out in its place. */
565
790
  label: string;
@@ -599,4 +824,4 @@ export declare const ToolbarTitle: ForwardRefExoticComponent<ToolbarTitleProps &
599
824
  * groups that each float on their own piece of glass.
600
825
  */
601
826
  export declare const Toolbar: ForwardRefExoticComponent<ToolbarProps & RefAttributes<HTMLDivElement>>;
602
- export type { ButtonProps, CheckboxProps, ComboboxItem, ComboboxProps, ContextMenuProps, DialogProps, GlassProps, GlassTint, InputProps, Labels, LiquentProviderProps, Locale, MenuEntry, MenuItem, MenuProps, ModalProps, ProgressProps, RadioGroupItem, RadioGroupProps, ScrollAreaProps, SearchFieldProps, SegmentedControlItem, SegmentedControlProps, SelectItem, SelectProps, SheetProps, SheetSnapPoint, SidebarCollapsible, SidebarContextValue, SidebarGroupProps, SidebarMenuActionProps, SidebarMenuButtonProps, SidebarMenuItemProps, SidebarMenuSubButtonProps, SidebarProps, SidebarProviderProps, SliderProps, SpinnerProps, StepperProps, SwitchProps, TabBarItem, TabBarProps, ToolbarEntry, ToolbarItem, ToolbarProps, ToolbarTitleProps };
827
+ export type { BadgeProps, ButtonProps, CardHeaderProps, CardProps, CheckboxProps, ComboboxItem, ComboboxProps, ContextMenuProps, DialogProps, DisclosureProps, GaugeProps, GlassProps, GlassTint, InputProps, Labels, LiquentProviderProps, ListItemProps, ListProps, Locale, MenuEntry, MenuItem, MenuProps, ModalProps, NavigationBarProps, PageControlProps, PopoverProps, ProgressProps, RadioGroupItem, RadioGroupProps, ScrollAreaProps, SearchFieldProps, SegmentedControlItem, SegmentedControlProps, SelectItem, SelectProps, SheetProps, SheetSnapPoint, SidebarCollapsible, SidebarContextValue, SidebarGroupProps, SidebarMenuActionProps, SidebarMenuButtonProps, SidebarMenuItemProps, SidebarMenuSubButtonProps, SidebarProps, SidebarProviderProps, SliderProps, SpinnerProps, StepperProps, SwitchProps, TabBarItem, TabBarProps, ToastOptions, ToasterProps, ToolbarEntry, ToolbarItem, ToolbarProps, ToolbarTitleProps, TooltipProps };