@gnome-ui/react 1.9.0 → 1.9.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.
Files changed (147) hide show
  1. package/dist/components/ActionRow/ActionRow.d.ts +37 -0
  2. package/dist/components/ActionRow/index.d.ts +2 -0
  3. package/dist/components/Avatar/Avatar.d.ts +34 -0
  4. package/dist/components/Avatar/index.d.ts +2 -0
  5. package/dist/components/Badge/Badge.d.ts +31 -0
  6. package/dist/components/Badge/index.d.ts +2 -0
  7. package/dist/components/Banner/Banner.d.ts +38 -0
  8. package/dist/components/Banner/index.d.ts +2 -0
  9. package/dist/components/Bin/Bin.d.ts +18 -0
  10. package/dist/components/Bin/index.d.ts +2 -0
  11. package/dist/components/BottomSheet/BottomSheet.d.ts +27 -0
  12. package/dist/components/BottomSheet/index.d.ts +2 -0
  13. package/dist/components/BoxedList/BoxedList.d.ts +25 -0
  14. package/dist/components/BoxedList/index.d.ts +2 -0
  15. package/dist/components/BreakpointBin/BreakpointBin.d.ts +66 -0
  16. package/dist/components/BreakpointBin/index.d.ts +2 -0
  17. package/dist/components/Button/Button.d.ts +34 -0
  18. package/dist/components/Button/index.d.ts +2 -0
  19. package/dist/components/ButtonContent/ButtonContent.d.ts +30 -0
  20. package/dist/components/ButtonContent/index.d.ts +2 -0
  21. package/dist/components/ButtonRow/ButtonRow.d.ts +22 -0
  22. package/dist/components/ButtonRow/index.d.ts +2 -0
  23. package/dist/components/Card/Card.d.ts +24 -0
  24. package/dist/components/Card/index.d.ts +2 -0
  25. package/dist/components/Carousel/Carousel.d.ts +64 -0
  26. package/dist/components/Carousel/index.d.ts +2 -0
  27. package/dist/components/CheckRow/CheckRow.d.ts +28 -0
  28. package/dist/components/CheckRow/index.d.ts +2 -0
  29. package/dist/components/Checkbox/Checkbox.d.ts +22 -0
  30. package/dist/components/Checkbox/index.d.ts +2 -0
  31. package/dist/components/Chip/Chip.d.ts +38 -0
  32. package/dist/components/Chip/index.d.ts +2 -0
  33. package/dist/components/Clamp/Clamp.d.ts +32 -0
  34. package/dist/components/Clamp/index.d.ts +2 -0
  35. package/dist/components/ComboRow/ComboRow.d.ts +34 -0
  36. package/dist/components/ComboRow/index.d.ts +2 -0
  37. package/dist/components/Dialog/Dialog.d.ts +119 -0
  38. package/dist/components/Dialog/index.d.ts +2 -0
  39. package/dist/components/Dropdown/Dropdown.d.ts +36 -0
  40. package/dist/components/Dropdown/index.d.ts +2 -0
  41. package/dist/components/EntryRow/EntryRow.d.ts +24 -0
  42. package/dist/components/EntryRow/index.d.ts +2 -0
  43. package/dist/components/ExpanderRow/ExpanderRow.d.ts +35 -0
  44. package/dist/components/ExpanderRow/index.d.ts +2 -0
  45. package/dist/components/Frame/Frame.d.ts +14 -0
  46. package/dist/components/Frame/index.d.ts +2 -0
  47. package/dist/components/HeaderBar/HeaderBar.d.ts +25 -0
  48. package/dist/components/HeaderBar/index.d.ts +2 -0
  49. package/dist/components/Icon/Icon.d.ts +30 -0
  50. package/dist/components/Icon/index.d.ts +2 -0
  51. package/dist/components/InlineViewSwitcher/InlineViewSwitcher.d.ts +36 -0
  52. package/dist/components/InlineViewSwitcher/InlineViewSwitcherItem.d.ts +17 -0
  53. package/dist/components/InlineViewSwitcher/index.d.ts +4 -0
  54. package/dist/components/Link/Link.d.ts +18 -0
  55. package/dist/components/Link/index.d.ts +2 -0
  56. package/dist/components/LinkedGroup/LinkedGroup.d.ts +31 -0
  57. package/dist/components/LinkedGroup/index.d.ts +2 -0
  58. package/dist/components/NavigationSplitView/NavigationSplitView.d.ts +55 -0
  59. package/dist/components/NavigationSplitView/index.d.ts +2 -0
  60. package/dist/components/NavigationView/NavigationView.d.ts +55 -0
  61. package/dist/components/NavigationView/index.d.ts +2 -0
  62. package/dist/components/OverlaySplitView/OverlaySplitView.d.ts +59 -0
  63. package/dist/components/OverlaySplitView/index.d.ts +2 -0
  64. package/dist/components/PasswordEntryRow/PasswordEntryRow.d.ts +16 -0
  65. package/dist/components/PasswordEntryRow/index.d.ts +2 -0
  66. package/dist/components/Popover/Popover.d.ts +50 -0
  67. package/dist/components/Popover/index.d.ts +2 -0
  68. package/dist/components/PreferencesDialog/PreferencesDialog.d.ts +43 -0
  69. package/dist/components/PreferencesDialog/index.d.ts +2 -0
  70. package/dist/components/PreferencesGroup/PreferencesGroup.d.ts +23 -0
  71. package/dist/components/PreferencesGroup/index.d.ts +2 -0
  72. package/dist/components/PreferencesPage/PreferencesPage.d.ts +26 -0
  73. package/dist/components/PreferencesPage/index.d.ts +2 -0
  74. package/dist/components/ProgressBar/ProgressBar.d.ts +24 -0
  75. package/dist/components/ProgressBar/index.d.ts +2 -0
  76. package/dist/components/RadioButton/RadioButton.d.ts +15 -0
  77. package/dist/components/RadioButton/index.d.ts +2 -0
  78. package/dist/components/SearchBar/SearchBar.d.ts +34 -0
  79. package/dist/components/SearchBar/index.d.ts +2 -0
  80. package/dist/components/Separator/Separator.d.ts +15 -0
  81. package/dist/components/Separator/index.d.ts +2 -0
  82. package/dist/components/ShortcutLabel/ShortcutLabel.d.ts +38 -0
  83. package/dist/components/ShortcutLabel/index.d.ts +2 -0
  84. package/dist/components/ShortcutsDialog/ShortcutsDialog.d.ts +37 -0
  85. package/dist/components/ShortcutsDialog/index.d.ts +2 -0
  86. package/dist/components/Sidebar/Sidebar.d.ts +50 -0
  87. package/dist/components/Sidebar/SidebarItem.d.ts +58 -0
  88. package/dist/components/Sidebar/SidebarSection.d.ts +32 -0
  89. package/dist/components/Sidebar/index.d.ts +6 -0
  90. package/dist/components/Slider/Slider.d.ts +45 -0
  91. package/dist/components/Slider/index.d.ts +2 -0
  92. package/dist/components/SpinButton/SpinButton.d.ts +30 -0
  93. package/dist/components/SpinButton/index.d.ts +2 -0
  94. package/dist/components/SpinRow/SpinRow.d.ts +37 -0
  95. package/dist/components/SpinRow/index.d.ts +2 -0
  96. package/dist/components/Spinner/Spinner.d.ts +20 -0
  97. package/dist/components/Spinner/index.d.ts +2 -0
  98. package/dist/components/SplitButton/SplitButton.d.ts +25 -0
  99. package/dist/components/SplitButton/index.d.ts +2 -0
  100. package/dist/components/StatusPage/StatusPage.d.ts +40 -0
  101. package/dist/components/StatusPage/index.d.ts +2 -0
  102. package/dist/components/Switch/Switch.d.ts +14 -0
  103. package/dist/components/Switch/index.d.ts +2 -0
  104. package/dist/components/SwitchRow/SwitchRow.d.ts +29 -0
  105. package/dist/components/SwitchRow/index.d.ts +2 -0
  106. package/dist/components/Tabs/TabBar.d.ts +20 -0
  107. package/dist/components/Tabs/TabItem.d.ts +27 -0
  108. package/dist/components/Tabs/TabPanel.d.ts +13 -0
  109. package/dist/components/Tabs/index.d.ts +6 -0
  110. package/dist/components/Text/Text.d.ts +23 -0
  111. package/dist/components/Text/index.d.ts +2 -0
  112. package/dist/components/TextField/TextField.d.ts +22 -0
  113. package/dist/components/TextField/index.d.ts +2 -0
  114. package/dist/components/Toast/Toast.d.ts +29 -0
  115. package/dist/components/Toast/Toaster.d.ts +30 -0
  116. package/dist/components/Toast/index.d.ts +4 -0
  117. package/dist/components/ToggleGroup/ToggleGroup.d.ts +29 -0
  118. package/dist/components/ToggleGroup/ToggleGroupItem.d.ts +17 -0
  119. package/dist/components/ToggleGroup/index.d.ts +4 -0
  120. package/dist/components/Toolbar/Spacer.d.ts +19 -0
  121. package/dist/components/Toolbar/Toolbar.d.ts +18 -0
  122. package/dist/components/Toolbar/index.d.ts +4 -0
  123. package/dist/components/ToolbarView/ToolbarView.d.ts +27 -0
  124. package/dist/components/ToolbarView/index.d.ts +2 -0
  125. package/dist/components/Tooltip/Tooltip.d.ts +44 -0
  126. package/dist/components/Tooltip/index.d.ts +2 -0
  127. package/dist/components/ViewSwitcher/ViewSwitcher.d.ts +19 -0
  128. package/dist/components/ViewSwitcher/ViewSwitcherItem.d.ts +16 -0
  129. package/dist/components/ViewSwitcher/index.d.ts +4 -0
  130. package/dist/components/ViewSwitcherBar/ViewSwitcherBar.d.ts +38 -0
  131. package/dist/components/ViewSwitcherBar/index.d.ts +2 -0
  132. package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebar.d.ts +37 -0
  133. package/dist/components/ViewSwitcherSidebar/ViewSwitcherSidebarItem.d.ts +27 -0
  134. package/dist/components/ViewSwitcherSidebar/index.d.ts +4 -0
  135. package/dist/components/WindowTitle/WindowTitle.d.ts +23 -0
  136. package/dist/components/WindowTitle/index.d.ts +2 -0
  137. package/dist/components/WrapBox/WrapBox.d.ts +29 -0
  138. package/dist/components/WrapBox/index.d.ts +2 -0
  139. package/dist/hooks/index.d.ts +2 -0
  140. package/dist/hooks/useBreakpoint.d.ts +42 -0
  141. package/dist/index.cjs +2 -0
  142. package/dist/index.cjs.map +1 -0
  143. package/dist/index.d.ts +130 -0
  144. package/dist/index.js +4076 -0
  145. package/dist/index.js.map +1 -0
  146. package/dist/style.css +2 -0
  147. package/package.json +1 -1
@@ -0,0 +1,32 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ export interface ClampProps extends HTMLAttributes<HTMLDivElement> {
3
+ /**
4
+ * Maximum content width in pixels.
5
+ * The element shrinks freely below this value.
6
+ * Defaults to `600` — the Adwaita recommended narrow-content width.
7
+ */
8
+ maximumSize?: number;
9
+ /**
10
+ * Fractional width (0–1) of the viewport to use when the viewport is
11
+ * narrower than `maximumSize`. Useful for keeping a comfortable margin
12
+ * on medium-width screens. Set to `1` (default) to always fill the width.
13
+ */
14
+ tighteningThreshold?: number;
15
+ children?: ReactNode;
16
+ }
17
+ /**
18
+ * Constrains its child to a maximum width while allowing it to shrink freely,
19
+ * mirroring the Adwaita `AdwClamp` widget.
20
+ *
21
+ * Use this to keep readable line lengths and comfortable reading widths on
22
+ * large screens while still filling the available space on narrow screens.
23
+ *
24
+ * @example
25
+ * // Settings page — content never wider than 600 px
26
+ * <Clamp maximumSize={600}>
27
+ * <BoxedList>…</BoxedList>
28
+ * </Clamp>
29
+ *
30
+ * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Clamp.html
31
+ */
32
+ export declare function Clamp({ maximumSize, children, className, style, ...props }: ClampProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Clamp } from './Clamp';
2
+ export type { ClampProps } from './Clamp';
@@ -0,0 +1,34 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ export interface ComboRowOption<V extends string = string> {
3
+ value: V;
4
+ label: string;
5
+ disabled?: boolean;
6
+ }
7
+ export interface ComboRowProps<V extends string = string> extends Omit<HTMLAttributes<HTMLDivElement>, "onChange"> {
8
+ /** Primary label. */
9
+ title: string;
10
+ /** Secondary line below the title. */
11
+ subtitle?: string;
12
+ /** Icon or image placed at the leading edge. */
13
+ leading?: ReactNode;
14
+ /** The list of selectable options. */
15
+ options: ComboRowOption<V>[];
16
+ /** The currently selected value (controlled). */
17
+ value?: V;
18
+ /** Initial value when uncontrolled. */
19
+ defaultValue?: V;
20
+ /** Called when the user selects an option. */
21
+ onValueChange?: (value: V) => void;
22
+ /** Disables the row. */
23
+ disabled?: boolean;
24
+ }
25
+ /**
26
+ * Settings row with an inline combo selector at the trailing edge.
27
+ *
28
+ * Mirrors `AdwComboRow` — a standard `ActionRow` layout with a dropdown
29
+ * for choosing among a set of options. The dropdown opens inline in the row
30
+ * and follows the same keyboard patterns as the standalone `Dropdown`.
31
+ *
32
+ * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.ComboRow.html
33
+ */
34
+ export declare function ComboRow<V extends string = string>({ title, subtitle, leading, options, value: controlledValue, defaultValue, onValueChange, disabled, className, ...props }: ComboRowProps<V>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { ComboRow } from './ComboRow';
2
+ export type { ComboRowProps, ComboRowOption } from './ComboRow';
@@ -0,0 +1,119 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ export type AlertDialogResponseVariant = "default" | "suggested" | "destructive";
3
+ export interface AlertDialogResponse {
4
+ /**
5
+ * Unique identifier returned via `onResponse`.
6
+ * Use `"cancel"` by convention for the dismissive action.
7
+ */
8
+ id: string;
9
+ /** Button label. */
10
+ label: string;
11
+ /** Visual emphasis. Defaults to `"default"`. */
12
+ variant?: AlertDialogResponseVariant;
13
+ /** Disables the button. */
14
+ disabled?: boolean;
15
+ }
16
+ export interface AboutDialogLink {
17
+ label: string;
18
+ url: string;
19
+ }
20
+ export interface DialogButton {
21
+ /** Button label. */
22
+ label: string;
23
+ /** Visual variant. Defaults to `"default"`. */
24
+ variant?: "default" | "suggested" | "destructive";
25
+ /** Called when the button is clicked. */
26
+ onClick: () => void;
27
+ /** Whether the button is disabled. */
28
+ disabled?: boolean;
29
+ }
30
+ export interface DialogProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
31
+ /** Whether the dialog is visible. */
32
+ open: boolean;
33
+ /** Dialog heading. */
34
+ title?: ReactNode;
35
+ /** Body content. */
36
+ children?: ReactNode;
37
+ /** Action buttons (standard dialog API). */
38
+ buttons?: DialogButton[];
39
+ /** Called on Escape or backdrop click. */
40
+ onClose?: () => void;
41
+ /** Whether clicking the backdrop closes the dialog. Defaults to `true`. */
42
+ closeOnBackdrop?: boolean;
43
+ /**
44
+ * ARIA role. Use `"alertdialog"` for confirmations and destructive warnings —
45
+ * screen readers announce it immediately. Defaults to `"dialog"`.
46
+ *
47
+ * When using `role="alertdialog"`, prefer the `responses`/`onResponse` API
48
+ * over `buttons`/`onClick` for semantic clarity.
49
+ */
50
+ role?: "dialog" | "alertdialog";
51
+ /**
52
+ * Response buttons (AlertDialog API). Alternative to `buttons` — each
53
+ * response has a semantic `id` returned via `onResponse`.
54
+ * Escape and backdrop click fire the first non-destructive response.
55
+ */
56
+ responses?: AlertDialogResponse[];
57
+ /**
58
+ * Called with the `id` of the response button clicked.
59
+ * Required when `responses` is provided.
60
+ */
61
+ onResponse?: (id: string) => void;
62
+ /**
63
+ * Set to `"about"` to render as an application info dialog.
64
+ * When `variant="about"`, `title`/`buttons`/`children` are ignored in favour
65
+ * of the about-specific props below.
66
+ */
67
+ variant?: "about";
68
+ /** Application name (required when `variant="about"`). */
69
+ applicationName?: string;
70
+ /** Icon rendered above the app name. */
71
+ applicationIcon?: ReactNode;
72
+ /** Version string (e.g. `"1.0.0"`). */
73
+ version?: string;
74
+ /** One-sentence description. */
75
+ comments?: string;
76
+ /** Developer or organisation name. */
77
+ developerName?: string;
78
+ /** Application website URL. */
79
+ website?: string;
80
+ /** Label for the website link. Defaults to the URL. */
81
+ websiteLabel?: string;
82
+ /** Developer names shown in the Credits tab. */
83
+ developers?: string[];
84
+ /** Designer names shown in the Credits tab. */
85
+ designers?: string[];
86
+ /** Artist names shown in the Credits tab. */
87
+ artists?: string[];
88
+ /** Copyright notice (e.g. `"© 2024 Jane Smith"`). */
89
+ copyright?: string;
90
+ /** SPDX identifier or short name (e.g. `"GPL-3.0"`). */
91
+ licenseType?: string;
92
+ /** Full license text shown in the Legal tab. */
93
+ licenseText?: string;
94
+ /** Extra links shown in the Details section. */
95
+ links?: AboutDialogLink[];
96
+ }
97
+ /**
98
+ * Blocking modal dialog following the Adwaita pattern.
99
+ *
100
+ * Three modes in one component:
101
+ *
102
+ * **Standard** — `title` + `children` + `buttons[]`.
103
+ *
104
+ * **Alert** — add `role="alertdialog"` + `responses[]` + `onResponse`.
105
+ * Uses a semantic response id instead of per-button `onClick`.
106
+ * Escape / backdrop fire the first non-destructive response.
107
+ * Mirrors `AdwAlertDialog`.
108
+ *
109
+ * **About** — add `variant="about"` + `applicationName` + info props.
110
+ * Renders app icon, version, details/credits/legal tabs.
111
+ * Mirrors `AdwAboutDialog`.
112
+ *
113
+ * All modes share the same portal, focus-trap, and card/backdrop styles.
114
+ *
115
+ * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.Dialog.html
116
+ * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.AlertDialog.html
117
+ * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.AboutDialog.html
118
+ */
119
+ export declare function Dialog({ open, title, children, buttons, onClose, closeOnBackdrop, role, responses, onResponse, variant, applicationName, applicationIcon, version, comments, developerName, website, websiteLabel, developers, designers, artists, copyright, licenseType, licenseText, links, className, ...props }: DialogProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,2 @@
1
+ export { Dialog } from './Dialog';
2
+ export type { DialogProps, DialogButton, AlertDialogResponse, AlertDialogResponseVariant, AboutDialogLink, } from './Dialog';
@@ -0,0 +1,36 @@
1
+ import { HTMLAttributes } from 'react';
2
+ export interface DropdownOption<V extends string = string> {
3
+ /** The value submitted / returned on selection. */
4
+ value: V;
5
+ /** Display label shown in the list and trigger. */
6
+ label: string;
7
+ /** Optional descriptive text shown below the label. */
8
+ description?: string;
9
+ /** Whether the option is selectable. */
10
+ disabled?: boolean;
11
+ }
12
+ export interface DropdownProps<V extends string = string> extends Omit<HTMLAttributes<HTMLDivElement>, "onChange"> {
13
+ /** The list of selectable options. */
14
+ options: DropdownOption<V>[];
15
+ /** The currently selected value. */
16
+ value?: V;
17
+ /** Called when the user selects an option. */
18
+ onChange?: (value: V) => void;
19
+ /** Placeholder shown when no option is selected. */
20
+ placeholder?: string;
21
+ /** Accessible label for the control (used as `aria-label`). */
22
+ "aria-label"?: string;
23
+ /** Disables the entire control. */
24
+ disabled?: boolean;
25
+ }
26
+ /**
27
+ * Expandable option list following the Adwaita combo-row / drop-down pattern.
28
+ *
29
+ * - Fully keyboard-navigable: Space/Enter opens; ↑/↓ navigate; Enter selects; Escape closes.
30
+ * - Uses `role="combobox"` + `role="listbox"` + `role="option"` ARIA pattern.
31
+ * - Closes when clicking outside or pressing Escape.
32
+ * - The list flips above the trigger when there is not enough space below.
33
+ *
34
+ * @see https://developer.gnome.org/hig/patterns/controls/drop-down-lists.html
35
+ */
36
+ export declare function Dropdown<V extends string = string>({ options, value, onChange, placeholder, disabled, className, ...props }: DropdownProps<V>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Dropdown } from './Dropdown';
2
+ export type { DropdownProps, DropdownOption } from './Dropdown';
@@ -0,0 +1,24 @@
1
+ import { InputHTMLAttributes, ReactNode } from 'react';
2
+ export interface EntryRowProps extends InputHTMLAttributes<HTMLInputElement> {
3
+ /**
4
+ * Acts as a floating label: shown small above the input when the field has
5
+ * content or focus, shown as a placeholder when empty and unfocused.
6
+ */
7
+ title: string;
8
+ /** Called when the input value changes. */
9
+ onValueChange?: (value: string) => void;
10
+ /** Icon or widget placed at the leading edge. */
11
+ leading?: ReactNode;
12
+ /** Icon or widget placed at the trailing edge (e.g. a clear button, copy button). */
13
+ trailing?: ReactNode;
14
+ }
15
+ /**
16
+ * Row with an inline text entry field.
17
+ *
18
+ * Mirrors `AdwEntryRow` — the `title` floats up as a small label when the
19
+ * field is focused or has content, acting as a placeholder when empty and
20
+ * unfocused. Use inside a `BoxedList` for inline settings that require text input.
21
+ *
22
+ * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.EntryRow.html
23
+ */
24
+ export declare function EntryRow({ title, value: controlledValue, defaultValue, onValueChange, leading, trailing, disabled, className, id: externalId, onChange, ...props }: EntryRowProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { EntryRow } from './EntryRow';
2
+ export type { EntryRowProps } from './EntryRow';
@@ -0,0 +1,35 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ export interface ExpanderRowProps extends HTMLAttributes<HTMLDivElement> {
3
+ /** Primary label. */
4
+ title: string;
5
+ /** Secondary line below the title. */
6
+ subtitle?: string;
7
+ /** Icon or image placed at the leading edge of the header row. */
8
+ leading?: ReactNode;
9
+ /**
10
+ * Widget placed at the trailing edge of the header row, before the chevron
11
+ * (e.g. a value label or a Switch). Stop event propagation inside it so the
12
+ * row's toggle isn't triggered.
13
+ */
14
+ trailing?: ReactNode;
15
+ /**
16
+ * Nested rows revealed when expanded. Use `ActionRow`, `ButtonRow`, or any
17
+ * row-shaped element — separators are inserted automatically.
18
+ */
19
+ children?: ReactNode;
20
+ /** Controlled expanded state. */
21
+ expanded?: boolean;
22
+ /** Initial expanded state when uncontrolled. Defaults to `false`. */
23
+ defaultExpanded?: boolean;
24
+ /** Called when the expanded state changes. */
25
+ onExpandedChange?: (expanded: boolean) => void;
26
+ }
27
+ /**
28
+ * Collapsible `ActionRow` that reveals nested rows on activation.
29
+ *
30
+ * Mirrors `AdwExpanderRow` — the header row toggles a reveal animation exposing
31
+ * child rows. Supports both controlled and uncontrolled expand state.
32
+ *
33
+ * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.ExpanderRow.html
34
+ */
35
+ export declare function ExpanderRow({ title, subtitle, leading, trailing, children, expanded: controlledExpanded, defaultExpanded, onExpandedChange, className, ...props }: ExpanderRowProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { ExpanderRow } from './ExpanderRow';
2
+ export type { ExpanderRowProps } from './ExpanderRow';
@@ -0,0 +1,14 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ export interface FrameProps extends HTMLAttributes<HTMLDivElement> {
3
+ children?: ReactNode;
4
+ }
5
+ /**
6
+ * Simple bordered surface with border-radius but no background fill.
7
+ *
8
+ * Use to visually delimit a region without adding the elevated appearance
9
+ * of a `Card`. Mirrors `GtkFrame` default styling and the libadwaita
10
+ * `.frame` style class.
11
+ *
12
+ * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/1-latest/style-classes.html#frame-style-class
13
+ */
14
+ export declare function Frame({ children, className, ...props }: FrameProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Frame } from './Frame';
2
+ export type { FrameProps } from './Frame';
@@ -0,0 +1,25 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ export interface HeaderBarProps extends Omit<HTMLAttributes<HTMLElement>, "title"> {
3
+ /** Centered title. Pass a string or a custom element. */
4
+ title?: ReactNode;
5
+ /** Controls placed at the leading (left) edge — back button, menu, etc. */
6
+ start?: ReactNode;
7
+ /** Controls placed at the trailing (right) edge — actions, overflow menu, etc. */
8
+ end?: ReactNode;
9
+ /**
10
+ * When true the header bar blends into the window chrome
11
+ * (no bottom border, slightly transparent background).
12
+ * Use for the topmost bar of a full-window layout.
13
+ */
14
+ flat?: boolean;
15
+ }
16
+ /**
17
+ * Title bar with centered title and leading/trailing action slots.
18
+ *
19
+ * Mirrors the Adwaita `AdwHeaderBar` pattern. Use `flat` buttons
20
+ * (`<Button variant="flat">`) inside the header bar per GNOME HIG.
21
+ *
22
+ * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.HeaderBar.html
23
+ * @see https://developer.gnome.org/hig/patterns/containers/header-bars.html
24
+ */
25
+ export declare function HeaderBar({ title, start, end, flat, className, ...props }: HeaderBarProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { HeaderBar } from './HeaderBar';
2
+ export type { HeaderBarProps } from './HeaderBar';
@@ -0,0 +1,30 @@
1
+ import { SVGAttributes } from 'react';
2
+ import { IconDefinition } from '@gnome-ui/icons';
3
+ export type IconSize = "sm" | "md" | "lg";
4
+ export interface IconProps extends SVGAttributes<SVGSVGElement> {
5
+ /** Icon definition imported from `@gnome-ui/icons`. */
6
+ icon: IconDefinition;
7
+ /**
8
+ * Rendered size.
9
+ * - `sm` — 12 px
10
+ * - `md` — 16 px (default)
11
+ * - `lg` — 20 px
12
+ *
13
+ * Override with `width`/`height` for non-standard sizes.
14
+ */
15
+ size?: IconSize;
16
+ /** Accessible label. Omit for decorative icons — they are hidden from screen readers. */
17
+ label?: string;
18
+ }
19
+ /**
20
+ * Renders an `@gnome-ui/icons` definition as an inline SVG.
21
+ *
22
+ * Uses `currentColor` so the icon inherits the text color of its parent.
23
+ * Pass `label` only when the icon conveys meaning on its own;
24
+ * omit it when a sibling text label already describes the action.
25
+ *
26
+ * @example
27
+ * import { Search } from "@gnome-ui/icons";
28
+ * <Icon icon={Search} label="Search" />
29
+ */
30
+ export declare function Icon({ icon, size, label, width, height, ...props }: IconProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Icon } from './Icon';
2
+ export type { IconProps, IconSize } from './Icon';
@@ -0,0 +1,36 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ export type InlineViewSwitcherVariant = "default" | "flat" | "round";
3
+ interface InlineViewSwitcherContextValue {
4
+ value: string;
5
+ onValueChange: (value: string) => void;
6
+ }
7
+ export declare function useInlineViewSwitcher(): InlineViewSwitcherContextValue;
8
+ export interface InlineViewSwitcherProps extends HTMLAttributes<HTMLDivElement> {
9
+ /** Currently active view name. */
10
+ value: string;
11
+ /** Called with the new value when a view is selected. */
12
+ onValueChange: (value: string) => void;
13
+ /**
14
+ * Visual style of the switcher.
15
+ * - `default` — card background with border and shadow (same as `ToggleGroup`).
16
+ * - `flat` — no background or border; active indicator only.
17
+ * - `round` — pill-shaped container and items.
18
+ */
19
+ variant?: InlineViewSwitcherVariant;
20
+ /** Accessible label for the group. */
21
+ "aria-label"?: string;
22
+ children?: ReactNode;
23
+ }
24
+ /**
25
+ * Compact inline view switcher for placing inside content areas, cards, or
26
+ * toolbars — wherever `ViewSwitcher` (header-bar sized) would be too heavy.
27
+ *
28
+ * Built on `ToggleGroup` internals with `flat` and `round` style variants.
29
+ * Mirrors `AdwInlineViewSwitcher` (libadwaita 1.7 / GNOME 48).
30
+ *
31
+ * Compose with `InlineViewSwitcherItem`. Keyboard: ← / → cycle, Home / End jump.
32
+ *
33
+ * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.InlineViewSwitcher.html
34
+ */
35
+ export declare function InlineViewSwitcher({ value, onValueChange, variant, "aria-label": ariaLabel, children, className, ...props }: InlineViewSwitcherProps): import("react/jsx-runtime").JSX.Element;
36
+ export {};
@@ -0,0 +1,17 @@
1
+ import { ButtonHTMLAttributes } from 'react';
2
+ import { IconDefinition } from '@gnome-ui/icons';
3
+ export interface InlineViewSwitcherItemProps extends ButtonHTMLAttributes<HTMLButtonElement> {
4
+ /** String identifier — used as the switcher's `value` when this item is active. */
5
+ name: string;
6
+ /** Visible label. */
7
+ label?: string;
8
+ /** Icon from `@gnome-ui/icons`. */
9
+ icon?: IconDefinition;
10
+ }
11
+ /**
12
+ * Individual view option inside an `InlineViewSwitcher`.
13
+ *
14
+ * Can be icon-only, label-only, or icon + label. For icon-only items always
15
+ * provide an `aria-label` so screen readers can identify the view.
16
+ */
17
+ export declare function InlineViewSwitcherItem({ name, label, icon, disabled, className, ...props }: InlineViewSwitcherItemProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export { InlineViewSwitcher } from './InlineViewSwitcher';
2
+ export type { InlineViewSwitcherProps, InlineViewSwitcherVariant, } from './InlineViewSwitcher';
3
+ export { InlineViewSwitcherItem } from './InlineViewSwitcherItem';
4
+ export type { InlineViewSwitcherItemProps } from './InlineViewSwitcherItem';
@@ -0,0 +1,18 @@
1
+ import { AnchorHTMLAttributes, ReactNode } from 'react';
2
+ export interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
3
+ /**
4
+ * When true the link is treated as external: opens in a new tab,
5
+ * adds `rel="noopener noreferrer"`, and shows a trailing ↗ icon.
6
+ */
7
+ external?: boolean;
8
+ children?: ReactNode;
9
+ }
10
+ /**
11
+ * Inline hyperlink following GNOME HIG.
12
+ *
13
+ * - Uses the accent colour and shows an underline on hover.
14
+ * - `external` opens a new tab safely and appends a visual ↗ indicator.
15
+ *
16
+ * @see https://developer.gnome.org/hig/patterns/controls/links.html
17
+ */
18
+ export declare function Link({ external, children, className, target, rel, ...props }: LinkProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Link } from './Link';
2
+ export type { LinkProps } from './Link';
@@ -0,0 +1,31 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ export interface LinkedGroupProps extends HTMLAttributes<HTMLDivElement> {
3
+ children: ReactNode;
4
+ /**
5
+ * Stack children vertically instead of horizontally.
6
+ * Useful for stacked input or button groups.
7
+ */
8
+ vertical?: boolean;
9
+ }
10
+ /**
11
+ * Renders children as a single visually-connected unit with no gap and
12
+ * merged borders — the canonical GNOME pattern for button groups and
13
+ * segmented inputs.
14
+ *
15
+ * Mirrors the libadwaita `.linked` style class.
16
+ *
17
+ * - First child gets left (or top) border radius.
18
+ * - Last child gets right (or bottom) border radius.
19
+ * - Adjacent borders are collapsed to a single pixel.
20
+ * - Hover and focus bring the active child to the front via `z-index`.
21
+ *
22
+ * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/1-latest/style-classes.html#linked-style-class
23
+ *
24
+ * @example
25
+ * <LinkedGroup>
26
+ * <Button>Cut</Button>
27
+ * <Button>Copy</Button>
28
+ * <Button>Paste</Button>
29
+ * </LinkedGroup>
30
+ */
31
+ export declare function LinkedGroup({ children, vertical, className, ...props }: LinkedGroupProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { LinkedGroup } from './LinkedGroup';
2
+ export type { LinkedGroupProps } from './LinkedGroup';
@@ -0,0 +1,55 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ export interface NavigationSplitViewProps extends Omit<HTMLAttributes<HTMLDivElement>, "content"> {
3
+ /**
4
+ * The sidebar / list pane (left side on wide screens).
5
+ * On narrow screens this is the "list" view shown when `showContent` is false.
6
+ */
7
+ sidebar: ReactNode;
8
+ /**
9
+ * The detail / content pane (right side on wide screens).
10
+ * On narrow screens this is the "detail" view shown when `showContent` is true.
11
+ */
12
+ content: ReactNode;
13
+ /**
14
+ * Controls which pane is visible on narrow screens (≤ 400 px).
15
+ * - `false` (default) — show the sidebar list.
16
+ * - `true` — show the content detail.
17
+ *
18
+ * Has no effect on wide screens where both panes are visible simultaneously.
19
+ */
20
+ showContent?: boolean;
21
+ /**
22
+ * Minimum sidebar width in px. Defaults to `180`.
23
+ */
24
+ minSidebarWidth?: number;
25
+ /**
26
+ * Maximum sidebar width in px. Defaults to `280`.
27
+ */
28
+ maxSidebarWidth?: number;
29
+ /**
30
+ * Fraction of total width given to the sidebar (0–1). Defaults to `0.25`.
31
+ */
32
+ sidebarWidthFraction?: number;
33
+ }
34
+ /**
35
+ * Two-pane sidebar + content layout following the Adwaita
36
+ * `AdwNavigationSplitView` pattern.
37
+ *
38
+ * On **wide** screens (> 400 px) both panes are visible side-by-side.
39
+ * On **narrow** screens (≤ 400 px) only one pane is shown at a time;
40
+ * use `showContent` to switch between the sidebar list and the detail view.
41
+ *
42
+ * The sidebar width is constrained between `minSidebarWidth` and
43
+ * `maxSidebarWidth`, gravitating toward `sidebarWidthFraction` of the total.
44
+ *
45
+ * @example
46
+ * const [showContent, setShowContent] = useState(false);
47
+ * <NavigationSplitView
48
+ * showContent={showContent}
49
+ * sidebar={<MailList onSelect={() => setShowContent(true)} />}
50
+ * content={<MailDetail onBack={() => setShowContent(false)} />}
51
+ * />
52
+ *
53
+ * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.NavigationSplitView.html
54
+ */
55
+ export declare function NavigationSplitView({ sidebar, content, showContent, minSidebarWidth, maxSidebarWidth, sidebarWidthFraction, className, style, ...props }: NavigationSplitViewProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { NavigationSplitView } from './NavigationSplitView';
2
+ export type { NavigationSplitViewProps } from './NavigationSplitView';
@@ -0,0 +1,55 @@
1
+ import { ReactNode, HTMLAttributes } from 'react';
2
+ interface NavigationContextValue {
3
+ /** Navigate to a page by its `tag`. Pushes onto the stack. */
4
+ navigate: (tag: string) => void;
5
+ /** Go back one page. No-op if already at the root. */
6
+ pop: () => void;
7
+ /** `true` when there is at least one page to go back to. */
8
+ canGoBack: boolean;
9
+ /** Tag of the currently visible page. */
10
+ currentTag: string;
11
+ /** Direction of the last transition (`"forward"` or `"back"`). */
12
+ direction: "forward" | "back";
13
+ }
14
+ /** Access the nearest `NavigationView`'s navigation functions. */
15
+ export declare function useNavigation(): NavigationContextValue;
16
+ export interface NavigationPageProps extends HTMLAttributes<HTMLDivElement> {
17
+ /** Unique identifier used with `navigate()`. */
18
+ tag: string;
19
+ /** Page heading shown in a `HeaderBar`-style title bar. */
20
+ title: string;
21
+ children?: ReactNode;
22
+ }
23
+ /**
24
+ * A single page inside a `NavigationView`.
25
+ * Only visible when its `tag` matches the current page in the stack.
26
+ */
27
+ export declare function NavigationPage({ tag, title, children, className, ...props }: NavigationPageProps): import("react/jsx-runtime").JSX.Element | null;
28
+ export interface NavigationViewProps extends HTMLAttributes<HTMLDivElement> {
29
+ /** Tag of the first page to show. */
30
+ initialPage: string;
31
+ children?: ReactNode;
32
+ }
33
+ /**
34
+ * Single-pane push/pop navigation stack.
35
+ *
36
+ * Mirrors `AdwNavigationView` — the mobile-first counterpart to
37
+ * `NavigationSplitView`. Each "screen" is a `NavigationPage` with a unique
38
+ * `tag`. Use `useNavigation()` inside pages to call `navigate(tag)` and `pop()`.
39
+ *
40
+ * @example
41
+ * ```tsx
42
+ * <NavigationView initialPage="home">
43
+ * <NavigationPage tag="home" title="Home">
44
+ * <Button onClick={() => navigate("details")}>Open</Button>
45
+ * </NavigationPage>
46
+ * <NavigationPage tag="details" title="Details">
47
+ * <Button onClick={pop}>Back</Button>
48
+ * </NavigationPage>
49
+ * </NavigationView>
50
+ * ```
51
+ *
52
+ * @see https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.NavigationView.html
53
+ */
54
+ export declare function NavigationView({ initialPage, children, className, ...props }: NavigationViewProps): import("react/jsx-runtime").JSX.Element;
55
+ export {};
@@ -0,0 +1,2 @@
1
+ export { NavigationView, NavigationPage, useNavigation } from './NavigationView';
2
+ export type { NavigationViewProps, NavigationPageProps } from './NavigationView';