@stealthscale/component-navigation 0.1.0 → 0.3.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/README.md +414 -48
- package/dist/cyclonedx/bom.json +1 -1
- package/dist/index.d.ts +900 -38
- package/dist/index.js +2250 -32
- package/dist/recipe-wIXGUbM7.js +1541 -0
- package/dist/theme.js +8 -2
- package/package.json +41 -23
- package/dist/recipe-TfPpeGkM.js +0 -150
package/dist/index.d.ts
CHANGED
|
@@ -1,101 +1,963 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Look, Palette } from "@stealthscale/theme/authoring";
|
|
2
|
+
import { ComponentProps, ReactElement, ReactNode } from "react";
|
|
3
|
+
import * as collapsible from "@zag-js/collapsible";
|
|
4
|
+
import * as navigationMenu from "@zag-js/navigation-menu";
|
|
5
|
+
import * as pagination from "@zag-js/pagination";
|
|
6
|
+
import { ButtonProps } from "@stealthscale/component-actions";
|
|
7
|
+
import * as toc from "@zag-js/toc";
|
|
2
8
|
//#region src/breadcrumb/current-link.d.ts
|
|
3
9
|
/**
|
|
4
|
-
*
|
|
10
|
+
* Renders a span with `aria-current="page"` in the default ink.
|
|
5
11
|
*/
|
|
6
12
|
declare const CurrentLink: import("@stealthscale/theme").StyledComponent<"span", {}>;
|
|
7
13
|
/**
|
|
8
|
-
* Describes
|
|
14
|
+
* Describes the props of Breadcrumb.CurrentLink: the props of a span element.
|
|
9
15
|
*/
|
|
10
16
|
type CurrentLinkProps = ComponentProps<typeof CurrentLink>;
|
|
11
17
|
//#endregion
|
|
18
|
+
//#region src/breadcrumb/ellipsis.d.ts
|
|
19
|
+
/**
|
|
20
|
+
* Renders a list item in the muted ink.
|
|
21
|
+
*/
|
|
22
|
+
declare const Ellipsis$1: import("@stealthscale/theme").StyledComponent<"li", {}>;
|
|
23
|
+
/**
|
|
24
|
+
* Describes the props of Breadcrumb.Ellipsis: the props of a list item element.
|
|
25
|
+
*/
|
|
26
|
+
type EllipsisProps$1 = ComponentProps<typeof Ellipsis$1>;
|
|
27
|
+
//#endregion
|
|
12
28
|
//#region src/breadcrumb/item.d.ts
|
|
13
29
|
/**
|
|
14
|
-
*
|
|
15
|
-
* itself.
|
|
30
|
+
* Renders a list item that holds a `Breadcrumb.Link` or the `Breadcrumb.CurrentLink`.
|
|
16
31
|
*/
|
|
17
|
-
declare const Item: import("@stealthscale/theme").StyledComponent<"li", {}>;
|
|
32
|
+
declare const Item$4: import("@stealthscale/theme").StyledComponent<"li", {}>;
|
|
18
33
|
/**
|
|
19
|
-
* Describes
|
|
34
|
+
* Describes the props of Breadcrumb.Item: the props of a list item element.
|
|
20
35
|
*/
|
|
21
|
-
type ItemProps = ComponentProps<typeof Item>;
|
|
36
|
+
type ItemProps$4 = ComponentProps<typeof Item$4>;
|
|
22
37
|
//#endregion
|
|
23
38
|
//#region src/breadcrumb/link.d.ts
|
|
24
39
|
/**
|
|
25
|
-
*
|
|
40
|
+
* Renders an anchor in the muted ink that darkens on hover.
|
|
26
41
|
*/
|
|
27
|
-
declare const Link$
|
|
42
|
+
declare const Link$4: import("@stealthscale/theme").StyledComponent<"a", {}>;
|
|
28
43
|
/**
|
|
29
|
-
* Describes
|
|
44
|
+
* Describes the props of Breadcrumb.Link: the props of an anchor element.
|
|
30
45
|
*/
|
|
31
|
-
type LinkProps$
|
|
46
|
+
type LinkProps$4 = ComponentProps<typeof Link$4>;
|
|
32
47
|
//#endregion
|
|
33
48
|
//#region src/breadcrumb/list.d.ts
|
|
34
49
|
/**
|
|
35
|
-
*
|
|
50
|
+
* Renders an ordered list with `role="list"` and the gap of the size axis.
|
|
36
51
|
*/
|
|
37
|
-
declare const List: import("@stealthscale/theme").StyledComponent<"ol", {}>;
|
|
52
|
+
declare const List$2: import("@stealthscale/theme").StyledComponent<"ol", {}>;
|
|
38
53
|
/**
|
|
39
|
-
* Describes
|
|
54
|
+
* Describes the props of Breadcrumb.List: the props of an ordered list element.
|
|
40
55
|
*/
|
|
41
|
-
type ListProps = ComponentProps<typeof List>;
|
|
56
|
+
type ListProps$2 = ComponentProps<typeof List$2>;
|
|
42
57
|
//#endregion
|
|
43
58
|
//#region src/breadcrumb/root.d.ts
|
|
44
59
|
/**
|
|
45
|
-
*
|
|
60
|
+
* Renders a `nav` and provides the size and variant to every part inside it.
|
|
46
61
|
*/
|
|
47
|
-
declare const Root: import("@stealthscale/theme").StyledComponent<"nav", {
|
|
48
|
-
readonly size?: "lg" | "md" | "sm" | "xl" | "xs";
|
|
49
|
-
readonly variant?: "plain" | "underline";
|
|
62
|
+
declare const Root$4: import("@stealthscale/theme").StyledComponent<"nav", {
|
|
63
|
+
readonly size?: "lg" | "md" | "sm" | "xl" | "xs" | undefined;
|
|
64
|
+
readonly variant?: "plain" | "underline" | undefined;
|
|
50
65
|
}>;
|
|
51
66
|
/**
|
|
52
|
-
* Describes
|
|
67
|
+
* Describes the props of Breadcrumb.Root: the recipe's variants and the props of a nav element.
|
|
53
68
|
*/
|
|
54
|
-
type RootProps = ComponentProps<typeof Root>;
|
|
69
|
+
type RootProps$4 = ComponentProps<typeof Root$4>;
|
|
55
70
|
//#endregion
|
|
56
71
|
//#region src/breadcrumb/separator.d.ts
|
|
57
72
|
/**
|
|
58
|
-
*
|
|
73
|
+
* Renders a list item hidden from the accessibility tree.
|
|
59
74
|
*/
|
|
60
75
|
declare const Separator: import("@stealthscale/theme").StyledComponent<"li", {}>;
|
|
61
76
|
/**
|
|
62
|
-
* Describes
|
|
77
|
+
* Describes the props of Breadcrumb.Separator: the props of a list item element.
|
|
63
78
|
*/
|
|
64
79
|
type SeparatorProps = ComponentProps<typeof Separator>;
|
|
65
80
|
declare namespace index_d_exports {
|
|
66
|
-
export { CurrentLink, CurrentLinkProps, Item, ItemProps, Link$
|
|
81
|
+
export { CurrentLink, CurrentLinkProps, Ellipsis$1 as Ellipsis, EllipsisProps$1 as EllipsisProps, Item$4 as Item, ItemProps$4 as ItemProps, Link$4 as Link, LinkProps$4 as LinkProps, List$2 as List, ListProps$2 as ListProps, Root$4 as Root, RootProps$4 as RootProps, Separator, SeparatorProps };
|
|
67
82
|
}
|
|
68
83
|
//#endregion
|
|
69
84
|
//#region src/link/context.d.ts
|
|
70
85
|
/**
|
|
71
|
-
* Binds the link
|
|
86
|
+
* Binds the link recipe to React.
|
|
72
87
|
*
|
|
73
88
|
* @remarks
|
|
74
|
-
*
|
|
75
|
-
* the binding needs the runtime.
|
|
89
|
+
* The binding is a separate module from the recipe, because an application's compiler imports the
|
|
90
|
+
* recipe at build time and the binding needs the React runtime.
|
|
76
91
|
*/
|
|
77
92
|
/**
|
|
78
|
-
*
|
|
93
|
+
* Factory for the link element and the provider that sets its variants for descendants.
|
|
79
94
|
*/
|
|
80
95
|
declare const PropsProvider: import("react").Provider<import("@stealthscale/theme").DataAttrs & Partial<{
|
|
81
|
-
readonly
|
|
96
|
+
readonly inherit?: boolean | undefined;
|
|
97
|
+
readonly palette?: "accent" | "error" | "info" | "neutral" | "primary" | "secondary" | "success" | "warning" | undefined;
|
|
98
|
+
readonly variant?: "plain" | "underline" | undefined;
|
|
82
99
|
}>>, withContext: <Tag extends import("react").ElementType>(Component: Tag, options?: import("@stealthscale/theme").JsxFactoryOptions<import("@stealthscale/theme").ComponentProps<Tag> & Partial<{
|
|
83
|
-
readonly
|
|
84
|
-
|
|
85
|
-
readonly variant?: "plain" | "underline";
|
|
100
|
+
readonly inherit?: boolean | undefined;
|
|
101
|
+
readonly palette?: "accent" | "error" | "info" | "neutral" | "primary" | "secondary" | "success" | "warning" | undefined;
|
|
102
|
+
readonly variant?: "plain" | "underline" | undefined;
|
|
103
|
+
}>, string> | undefined) => import("@stealthscale/theme").StyledComponent<Tag, {
|
|
104
|
+
readonly inherit?: boolean | undefined;
|
|
105
|
+
readonly palette?: "accent" | "error" | "info" | "neutral" | "primary" | "secondary" | "success" | "warning" | undefined;
|
|
106
|
+
readonly variant?: "plain" | "underline" | undefined;
|
|
86
107
|
}>;
|
|
87
108
|
//#endregion
|
|
88
109
|
//#region src/link/link.d.ts
|
|
89
110
|
/**
|
|
90
|
-
*
|
|
111
|
+
* Renders an anchor with the link recipe's classes.
|
|
91
112
|
*/
|
|
92
113
|
export declare const Link: import("@stealthscale/theme").StyledComponent<"a", {
|
|
93
|
-
readonly
|
|
114
|
+
readonly inherit?: boolean | undefined;
|
|
115
|
+
readonly palette?: "accent" | "error" | "info" | "neutral" | "primary" | "secondary" | "success" | "warning" | undefined;
|
|
116
|
+
readonly variant?: "plain" | "underline" | undefined;
|
|
94
117
|
}>;
|
|
95
118
|
/**
|
|
96
|
-
* Describes
|
|
97
|
-
* takes.
|
|
119
|
+
* Describes the props of Link: the recipe's variants and the props of an anchor element.
|
|
98
120
|
*/
|
|
99
121
|
type LinkProps = ComponentProps<typeof Link>;
|
|
100
122
|
//#endregion
|
|
101
|
-
|
|
123
|
+
//#region src/nav-list/action.d.ts
|
|
124
|
+
/**
|
|
125
|
+
* Renders the action `button` with the list's variants and `type` defaulting to `button`.
|
|
126
|
+
*/
|
|
127
|
+
declare const Action: import("@stealthscale/theme").StyledComponent<"button", {}>;
|
|
128
|
+
/**
|
|
129
|
+
* Describes the props of `Action`.
|
|
130
|
+
*/
|
|
131
|
+
type ActionProps = ComponentProps<typeof Action>;
|
|
132
|
+
//#endregion
|
|
133
|
+
//#region src/nav-list/badge.d.ts
|
|
134
|
+
/**
|
|
135
|
+
* Renders the count `span` with the list's variants.
|
|
136
|
+
*/
|
|
137
|
+
declare const Badge: import("@stealthscale/theme").StyledComponent<"span", {}>;
|
|
138
|
+
/**
|
|
139
|
+
* Describes the props of `Badge`.
|
|
140
|
+
*/
|
|
141
|
+
type BadgeProps = ComponentProps<typeof Badge>;
|
|
142
|
+
//#endregion
|
|
143
|
+
//#region src/nav-list/machine.d.ts
|
|
144
|
+
/**
|
|
145
|
+
* Describes the machine settings a caller can pass to a branch, all optional.
|
|
146
|
+
*/
|
|
147
|
+
type BranchOptions = Partial<collapsible.Props>;
|
|
148
|
+
//#endregion
|
|
149
|
+
//#region src/nav-list/branch.d.ts
|
|
150
|
+
/**
|
|
151
|
+
* Renders the branch `li` with the list's variants.
|
|
152
|
+
*/
|
|
153
|
+
declare const Held$1: import("@stealthscale/theme").StyledComponent<"li", {}>;
|
|
154
|
+
/**
|
|
155
|
+
* Describes the props of `Branch`: the machine settings and the styled `li` props.
|
|
156
|
+
*/
|
|
157
|
+
interface BranchProps extends BranchOptions, Omit<ComponentProps<typeof Held$1>, "dir" | "id"> {}
|
|
158
|
+
/**
|
|
159
|
+
* Renders the branch and provides the running machine to its trigger, indicator and content.
|
|
160
|
+
*
|
|
161
|
+
* @remarks
|
|
162
|
+
* Inside a search's scope, the branch registers the words it renders, its nested rows' words
|
|
163
|
+
* among them, and is hidden while the scope's query is not in them. While the scope has a query
|
|
164
|
+
* the branch is open, so a nested row that matches is visible, and a press on its trigger
|
|
165
|
+
* changes nothing. The branch keeps its own open state and passes the machine a boolean `open`
|
|
166
|
+
* at all times, so a cleared query returns the branch to the state it had before the query.
|
|
167
|
+
*/
|
|
168
|
+
declare function Branch(props: BranchProps): ReactElement;
|
|
169
|
+
//#endregion
|
|
170
|
+
//#region src/nav-list/content.d.ts
|
|
171
|
+
/**
|
|
172
|
+
* Renders the nested `ul` with the list's variants.
|
|
173
|
+
*/
|
|
174
|
+
declare const Shown$1: import("@stealthscale/theme").StyledComponent<"ul", {}>;
|
|
175
|
+
/**
|
|
176
|
+
* Describes the props of `Content`, less the `hidden` and `id` attributes the machine sets.
|
|
177
|
+
*/
|
|
178
|
+
type ContentProps$1 = Omit<ComponentProps<typeof Shown$1>, "hidden" | "id">;
|
|
179
|
+
/**
|
|
180
|
+
* Renders the nested list with the machine's content props merged under the caller's.
|
|
181
|
+
*/
|
|
182
|
+
declare function Content$1(props: ContentProps$1): ReactElement;
|
|
183
|
+
//#endregion
|
|
184
|
+
//#region src/nav-list/indicator.d.ts
|
|
185
|
+
/**
|
|
186
|
+
* Renders the indicator `span`, hidden from assistive technology.
|
|
187
|
+
*/
|
|
188
|
+
declare const Turned: import("@stealthscale/theme").StyledComponent<"span", {}>;
|
|
189
|
+
/**
|
|
190
|
+
* Describes the props of `Indicator`.
|
|
191
|
+
*/
|
|
192
|
+
type IndicatorProps$2 = ComponentProps<typeof Turned>;
|
|
193
|
+
/**
|
|
194
|
+
* Renders the indicator with the machine's indicator props merged under the caller's.
|
|
195
|
+
*/
|
|
196
|
+
declare function Indicator$2(props: IndicatorProps$2): ReactElement;
|
|
197
|
+
//#endregion
|
|
198
|
+
//#region src/nav-list/item.d.ts
|
|
199
|
+
/**
|
|
200
|
+
* Renders the row `li` with the list's variants.
|
|
201
|
+
*/
|
|
202
|
+
declare const Row: import("@stealthscale/theme").StyledComponent<"li", {}>;
|
|
203
|
+
/**
|
|
204
|
+
* Describes the props of `Item`.
|
|
205
|
+
*/
|
|
206
|
+
type ItemProps$3 = ComponentProps<typeof Row>;
|
|
207
|
+
/**
|
|
208
|
+
* Renders the row, hidden while a search's query leaves it out.
|
|
209
|
+
*
|
|
210
|
+
* @param props - The `li` element's props.
|
|
211
|
+
* @returns The `li` element.
|
|
212
|
+
*/
|
|
213
|
+
declare function Item$3(props: ItemProps$3): ReactElement;
|
|
214
|
+
//#endregion
|
|
215
|
+
//#region src/nav-list/link.d.ts
|
|
216
|
+
/**
|
|
217
|
+
* Renders the link `a` with the list's variants.
|
|
218
|
+
*/
|
|
219
|
+
declare const Anchored: import("@stealthscale/theme").StyledComponent<"a", {}>;
|
|
220
|
+
/**
|
|
221
|
+
* Describes the props of `Link`: its tooltip and the props of an anchor.
|
|
222
|
+
*/
|
|
223
|
+
interface LinkProps$3 extends ComponentProps<typeof Anchored> {
|
|
224
|
+
/**
|
|
225
|
+
* Words the link shows in a tooltip while its list is iconic, usually the link's own words.
|
|
226
|
+
*/
|
|
227
|
+
readonly tooltip?: ReactNode | undefined;
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Renders the link, as the trigger of its tooltip while the list is iconic.
|
|
231
|
+
*
|
|
232
|
+
* @param props - The tooltip and the props of an anchor.
|
|
233
|
+
* @returns The `a` element, inside the tooltip's root on an iconic list.
|
|
234
|
+
*/
|
|
235
|
+
declare function Link$3({ tooltip, ...rest }: LinkProps$3): ReactElement;
|
|
236
|
+
//#endregion
|
|
237
|
+
//#region src/nav-list/mark.d.ts
|
|
238
|
+
/**
|
|
239
|
+
* Renders the mark `span` with the list's variants, hidden from assistive technology.
|
|
240
|
+
*/
|
|
241
|
+
declare const Mark: import("@stealthscale/theme").StyledComponent<"span", {}>;
|
|
242
|
+
/**
|
|
243
|
+
* Describes the props of `Mark`.
|
|
244
|
+
*/
|
|
245
|
+
type MarkProps = ComponentProps<typeof Mark>;
|
|
246
|
+
//#endregion
|
|
247
|
+
//#region src/nav-list/state.d.ts
|
|
248
|
+
/**
|
|
249
|
+
* Provides the defaults a list below a provider starts from, and the state a list gives its rows.
|
|
250
|
+
*
|
|
251
|
+
* @remarks
|
|
252
|
+
* A sidebar collapsed to a rail sets `iconic` once through the provider, and every list in it
|
|
253
|
+
* renders its rows as icons. A list's own prop overrides the provider. A row reads whether its
|
|
254
|
+
* list is iconic to decide whether it shows its tooltip.
|
|
255
|
+
*/
|
|
256
|
+
/**
|
|
257
|
+
* Describes the defaults a provider sets for every list below it.
|
|
258
|
+
*/
|
|
259
|
+
interface Defaults {
|
|
260
|
+
/**
|
|
261
|
+
* Whether the lists render their rows as icons.
|
|
262
|
+
*/
|
|
263
|
+
readonly iconic?: boolean | undefined;
|
|
264
|
+
/**
|
|
265
|
+
* Size of the lists' rows.
|
|
266
|
+
*/
|
|
267
|
+
readonly size?: "lg" | "md" | "sm" | undefined;
|
|
268
|
+
}
|
|
269
|
+
//#endregion
|
|
270
|
+
//#region src/nav-list/props-provider.d.ts
|
|
271
|
+
/**
|
|
272
|
+
* Describes the props of the provider: the defaults and the tree they apply to.
|
|
273
|
+
*/
|
|
274
|
+
interface PropsProviderProps {
|
|
275
|
+
/**
|
|
276
|
+
* The tree whose lists read the defaults.
|
|
277
|
+
*/
|
|
278
|
+
readonly children?: ReactNode | undefined;
|
|
279
|
+
/**
|
|
280
|
+
* The defaults: whether the lists are iconic and the size of their rows.
|
|
281
|
+
*/
|
|
282
|
+
readonly value: Defaults;
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Renders the tree with the defaults in context.
|
|
286
|
+
*
|
|
287
|
+
* @param props - The defaults and the tree.
|
|
288
|
+
* @returns The tree inside the context.
|
|
289
|
+
*/
|
|
290
|
+
declare function PropsProvider$1({ children, value }: PropsProviderProps): ReactElement;
|
|
291
|
+
//#endregion
|
|
292
|
+
//#region src/nav-list/root.d.ts
|
|
293
|
+
/**
|
|
294
|
+
* Renders the list `ul` and provides the variants to every part below it.
|
|
295
|
+
*/
|
|
296
|
+
declare const Listed$1: import("@stealthscale/theme").StyledComponent<"ul", {
|
|
297
|
+
readonly effect?: "glow" | undefined;
|
|
298
|
+
readonly guide?: "dashed" | "dotted" | "none" | "solid" | undefined;
|
|
299
|
+
readonly highlight?: import("@stealthscale/theme/authoring").Highlight | undefined;
|
|
300
|
+
readonly iconic?: boolean | undefined;
|
|
301
|
+
readonly palette?: "accent" | "error" | "info" | "neutral" | "primary" | "secondary" | "success" | "warning" | undefined;
|
|
302
|
+
readonly radius?: "full" | "l1" | "l2" | "l3" | undefined;
|
|
303
|
+
readonly reveal?: "always" | "hover" | undefined;
|
|
304
|
+
readonly size?: "lg" | "md" | "sm" | undefined;
|
|
305
|
+
readonly variant?: "dock" | "list" | undefined;
|
|
306
|
+
}>;
|
|
307
|
+
/**
|
|
308
|
+
* Describes the props of `Root`.
|
|
309
|
+
*/
|
|
310
|
+
type RootProps$3 = ComponentProps<typeof Listed$1>;
|
|
311
|
+
/**
|
|
312
|
+
* Renders the list and handles the arrow keys that move focus between rows.
|
|
313
|
+
*
|
|
314
|
+
* @param props - The recipe's variants and the `ul` element's props.
|
|
315
|
+
* @returns The list.
|
|
316
|
+
*/
|
|
317
|
+
declare function Root$3({ iconic, size, ...rest }: RootProps$3): ReactElement;
|
|
318
|
+
//#endregion
|
|
319
|
+
//#region src/nav-list/skeleton.d.ts
|
|
320
|
+
/**
|
|
321
|
+
* Renders the placeholder row `li` with the list's variants.
|
|
322
|
+
*/
|
|
323
|
+
declare const Skeleton: import("@stealthscale/theme").StyledComponent<"li", {}>;
|
|
324
|
+
/**
|
|
325
|
+
* Describes the props of `Skeleton`.
|
|
326
|
+
*/
|
|
327
|
+
type SkeletonProps = ComponentProps<typeof Skeleton>;
|
|
328
|
+
//#endregion
|
|
329
|
+
//#region src/nav-list/trigger.d.ts
|
|
330
|
+
/**
|
|
331
|
+
* Renders the trigger `button` with the list's variants.
|
|
332
|
+
*/
|
|
333
|
+
declare const Opened: import("@stealthscale/theme").StyledComponent<"button", {}>;
|
|
334
|
+
/**
|
|
335
|
+
* Describes the props of `Trigger`, less the attributes the machine sets.
|
|
336
|
+
*/
|
|
337
|
+
type TriggerProps$1 = Omit<ComponentProps<typeof Opened>, "aria-controls" | "aria-expanded" | "type">;
|
|
338
|
+
/**
|
|
339
|
+
* Renders the trigger with the machine's trigger props merged under the caller's.
|
|
340
|
+
*/
|
|
341
|
+
declare function Trigger$1(props: TriggerProps$1): ReactElement;
|
|
342
|
+
declare namespace index_d_exports$1 {
|
|
343
|
+
export { Action, ActionProps, Badge, BadgeProps, Branch, BranchProps, Content$1 as Content, ContentProps$1 as ContentProps, Indicator$2 as Indicator, IndicatorProps$2 as IndicatorProps, Item$3 as Item, ItemProps$3 as ItemProps, Link$3 as Link, LinkProps$3 as LinkProps, Mark, MarkProps, PropsProvider$1 as PropsProvider, PropsProviderProps, Root$3 as Root, RootProps$3 as RootProps, Skeleton, SkeletonProps, Trigger$1 as Trigger, TriggerProps$1 as TriggerProps };
|
|
344
|
+
}
|
|
345
|
+
//#endregion
|
|
346
|
+
//#region src/navigation-menu/content.d.ts
|
|
347
|
+
/**
|
|
348
|
+
* Renders the `div` with the navigation menu's content class.
|
|
349
|
+
*/
|
|
350
|
+
declare const Drawn: import("@stealthscale/theme").StyledComponent<"div", {}>;
|
|
351
|
+
/**
|
|
352
|
+
* Describes the props of the content: the props of a `div`, without `ref`, which the presence
|
|
353
|
+
* takes.
|
|
354
|
+
*/
|
|
355
|
+
type ContentProps = Omit<ComponentProps<typeof Drawn>, "ref">;
|
|
356
|
+
/**
|
|
357
|
+
* Renders the panel with the machine's content props and the presence props merged over the
|
|
358
|
+
* caller's, inside the viewport while the menu renders one.
|
|
359
|
+
*
|
|
360
|
+
* @param props - The links and the props of a `div`.
|
|
361
|
+
* @returns The `div` element, or the two elements of the machine's beside a portal to the viewport.
|
|
362
|
+
*/
|
|
363
|
+
declare function Content(props: ContentProps): ReactElement;
|
|
364
|
+
//#endregion
|
|
365
|
+
//#region src/navigation-menu/indicator.d.ts
|
|
366
|
+
/**
|
|
367
|
+
* Renders the `li` with the navigation menu's indicator class.
|
|
368
|
+
*/
|
|
369
|
+
declare const Marked: import("@stealthscale/theme").StyledComponent<"li", {}>;
|
|
370
|
+
/**
|
|
371
|
+
* Describes the props of the indicator: the props of an `li`, without `ref`, which the presence
|
|
372
|
+
* takes.
|
|
373
|
+
*/
|
|
374
|
+
type IndicatorProps$1 = Omit<ComponentProps<typeof Marked>, "ref">;
|
|
375
|
+
/**
|
|
376
|
+
* Renders the indicator with the machine's indicator props and the presence props merged over the
|
|
377
|
+
* caller's.
|
|
378
|
+
*
|
|
379
|
+
* @param props - The props of an `li`.
|
|
380
|
+
* @returns The `li` element.
|
|
381
|
+
*/
|
|
382
|
+
declare function Indicator$1(props: IndicatorProps$1): ReactElement;
|
|
383
|
+
//#endregion
|
|
384
|
+
//#region src/navigation-menu/scopes.d.ts
|
|
385
|
+
/**
|
|
386
|
+
* Provides the item a part renders in, the viewport's alignment, and whether a panel closes once
|
|
387
|
+
* the pointer leaves it, to the parts that read them.
|
|
388
|
+
*
|
|
389
|
+
* @remarks
|
|
390
|
+
* A trigger, a panel and a link read the value of the item they belong to, and the viewport reads
|
|
391
|
+
* the alignment its positioner states. `useItem` throws for a part rendered outside an item.
|
|
392
|
+
*/
|
|
393
|
+
/**
|
|
394
|
+
* Describes the item a part belongs to.
|
|
395
|
+
*/
|
|
396
|
+
interface ItemScope {
|
|
397
|
+
/**
|
|
398
|
+
* Whether the item takes no pointer or key input.
|
|
399
|
+
*/
|
|
400
|
+
readonly disabled?: boolean | undefined;
|
|
401
|
+
/**
|
|
402
|
+
* Value of the item, which the machine reports while the item is open.
|
|
403
|
+
*/
|
|
404
|
+
readonly value: string;
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* Describes where the viewport is placed against the open trigger.
|
|
408
|
+
*/
|
|
409
|
+
type Align = "center" | "end" | "start";
|
|
410
|
+
//#endregion
|
|
411
|
+
//#region src/navigation-menu/item.d.ts
|
|
412
|
+
/**
|
|
413
|
+
* Renders the `li` with the navigation menu's item class.
|
|
414
|
+
*/
|
|
415
|
+
declare const Held: import("@stealthscale/theme").StyledComponent<"li", {}>;
|
|
416
|
+
/**
|
|
417
|
+
* Describes the props of an item: its value, whether it is disabled, and the props of an `li`.
|
|
418
|
+
*/
|
|
419
|
+
interface ItemProps$2 extends ItemScope, Omit<ComponentProps<typeof Held>, keyof ItemScope> {}
|
|
420
|
+
/**
|
|
421
|
+
* Renders the item with the machine's item props, and provides the item to its parts.
|
|
422
|
+
*
|
|
423
|
+
* @param props - The value, the disabled state, the trigger and panel or the link, and the props of
|
|
424
|
+
* an `li`.
|
|
425
|
+
* @returns The `li` element.
|
|
426
|
+
*/
|
|
427
|
+
declare function Item$2({ disabled, value, ...props }: ItemProps$2): ReactElement;
|
|
428
|
+
//#endregion
|
|
429
|
+
//#region src/navigation-menu/link.d.ts
|
|
430
|
+
/**
|
|
431
|
+
* Renders the `a` with the navigation menu's link class.
|
|
432
|
+
*/
|
|
433
|
+
declare const Linked: import("@stealthscale/theme").StyledComponent<"a", {}>;
|
|
434
|
+
/**
|
|
435
|
+
* Describes the props of a link: whether it leads to the current page, whether a press closes the
|
|
436
|
+
* menu, what runs on a press, and the props of an `a`.
|
|
437
|
+
*/
|
|
438
|
+
interface LinkProps$2 extends Omit<ComponentProps<typeof Linked>, "onSelect"> {
|
|
439
|
+
/**
|
|
440
|
+
* Whether a press closes the menu. Defaults to true.
|
|
441
|
+
*/
|
|
442
|
+
readonly closeOnClick?: boolean | undefined;
|
|
443
|
+
/**
|
|
444
|
+
* Whether the link leads to the page on screen.
|
|
445
|
+
*/
|
|
446
|
+
readonly current?: boolean | undefined;
|
|
447
|
+
/**
|
|
448
|
+
* Runs on a press before the menu closes. Calling `preventDefault` on the event keeps it open.
|
|
449
|
+
*/
|
|
450
|
+
readonly onSelect?: ((event: CustomEvent) => void) | undefined;
|
|
451
|
+
}
|
|
452
|
+
/**
|
|
453
|
+
* Renders the link with the machine's link props for its item.
|
|
454
|
+
*
|
|
455
|
+
* @param props - Whether it is current, whether a press closes the menu, the press handler, the
|
|
456
|
+
* words and the props of an `a`.
|
|
457
|
+
* @returns The `a` element.
|
|
458
|
+
*/
|
|
459
|
+
declare function Link$2({ closeOnClick, current, onSelect, ...props }: LinkProps$2): ReactElement;
|
|
460
|
+
//#endregion
|
|
461
|
+
//#region src/navigation-menu/list.d.ts
|
|
462
|
+
/**
|
|
463
|
+
* Renders the `ul` with the navigation menu's list class.
|
|
464
|
+
*/
|
|
465
|
+
declare const Listed: import("@stealthscale/theme").StyledComponent<"ul", {}>;
|
|
466
|
+
/**
|
|
467
|
+
* Describes the props of the list: the props of a `ul`.
|
|
468
|
+
*/
|
|
469
|
+
type ListProps$1 = ComponentProps<typeof Listed>;
|
|
470
|
+
/**
|
|
471
|
+
* Renders the list with the machine's list props merged under the caller's.
|
|
472
|
+
*
|
|
473
|
+
* @param props - The items and the props of a `ul`.
|
|
474
|
+
* @returns The `ul` element.
|
|
475
|
+
*/
|
|
476
|
+
declare function List$1(props: ListProps$1): ReactElement;
|
|
477
|
+
//#endregion
|
|
478
|
+
//#region src/navigation-menu/machine.d.ts
|
|
479
|
+
/**
|
|
480
|
+
* Describes the machine options, every one optional.
|
|
481
|
+
*
|
|
482
|
+
* @remarks
|
|
483
|
+
* `translations` is left out, because the root takes its name as `aria-label`.
|
|
484
|
+
*/
|
|
485
|
+
type NavigationMenuOptions = Omit<Partial<navigationMenu.Props>, "translations">;
|
|
486
|
+
/**
|
|
487
|
+
* Describes what `onValueChange` receives: the value of the open item, or an empty string once
|
|
488
|
+
* every item is closed.
|
|
489
|
+
*/
|
|
490
|
+
type ValueChangeDetails = navigationMenu.ValueChangeDetails;
|
|
491
|
+
//#endregion
|
|
492
|
+
//#region src/navigation-menu/metrics.d.ts
|
|
493
|
+
/**
|
|
494
|
+
* Selects one of the three sizes the menu offers.
|
|
495
|
+
*/
|
|
496
|
+
type Step = "lg" | "md" | "sm";
|
|
497
|
+
//#endregion
|
|
498
|
+
//#region src/navigation-menu/root.d.ts
|
|
499
|
+
/**
|
|
500
|
+
* Renders the `nav` that provides the recipe's variants.
|
|
501
|
+
*/
|
|
502
|
+
declare const Framed$1: import("@stealthscale/theme").StyledComponent<"nav", {
|
|
503
|
+
readonly palette?: "accent" | "error" | "info" | "neutral" | "primary" | "secondary" | "success" | "warning" | undefined;
|
|
504
|
+
readonly size?: Step | undefined;
|
|
505
|
+
}>;
|
|
506
|
+
/**
|
|
507
|
+
* Describes the props of the root: the machine's options, the recipe's variants and the props of a
|
|
508
|
+
* `nav`.
|
|
509
|
+
*
|
|
510
|
+
* @remarks
|
|
511
|
+
* The element's own props of the same names as the machine's options are left out, so no prop has
|
|
512
|
+
* two types.
|
|
513
|
+
*/
|
|
514
|
+
interface RootProps$2 extends NavigationMenuOptions, Omit<ComponentProps<typeof Framed$1>, "defaultValue" | "dir" | "id" | keyof NavigationMenuOptions> {}
|
|
515
|
+
/**
|
|
516
|
+
* Renders the root and provides the machine's api to the parts.
|
|
517
|
+
*
|
|
518
|
+
* @param props - The machine's options, the recipe's variants and the props of a `nav`.
|
|
519
|
+
* @returns The `nav` element inside the providers.
|
|
520
|
+
*/
|
|
521
|
+
declare function Root$2({ palette, size, ...props }: RootProps$2): ReactElement;
|
|
522
|
+
//#endregion
|
|
523
|
+
//#region src/navigation-menu/trigger.d.ts
|
|
524
|
+
/**
|
|
525
|
+
* Renders the `button` with the navigation menu's trigger class.
|
|
526
|
+
*/
|
|
527
|
+
declare const Pressed: import("@stealthscale/theme").StyledComponent<"button", {}>;
|
|
528
|
+
/**
|
|
529
|
+
* Describes the props of the trigger: its words, its glyph and the props of a `button`.
|
|
530
|
+
*/
|
|
531
|
+
type TriggerProps = ComponentProps<typeof Pressed>;
|
|
532
|
+
/**
|
|
533
|
+
* Renders the trigger with the machine's props for its item.
|
|
534
|
+
*
|
|
535
|
+
* @param props - The words, the glyph and the props of a `button`.
|
|
536
|
+
* @returns The `button` element.
|
|
537
|
+
*/
|
|
538
|
+
declare function Trigger(props: TriggerProps): ReactElement;
|
|
539
|
+
//#endregion
|
|
540
|
+
//#region src/navigation-menu/viewport-positioner.d.ts
|
|
541
|
+
/**
|
|
542
|
+
* Renders the `div` with the navigation menu's viewport positioner class.
|
|
543
|
+
*/
|
|
544
|
+
declare const Placed: import("@stealthscale/theme").StyledComponent<"div", {}>;
|
|
545
|
+
/**
|
|
546
|
+
* Describes the props of the viewport positioner: the viewport's alignment and the props of a
|
|
547
|
+
* `div`.
|
|
548
|
+
*/
|
|
549
|
+
interface ViewportPositionerProps extends ComponentProps<typeof Placed> {
|
|
550
|
+
/**
|
|
551
|
+
* Where the viewport sits against the open trigger. Defaults to `center`.
|
|
552
|
+
*/
|
|
553
|
+
readonly align?: Align | undefined;
|
|
554
|
+
}
|
|
555
|
+
/**
|
|
556
|
+
* Renders the positioner with the machine's props, and provides the alignment to the viewport.
|
|
557
|
+
*
|
|
558
|
+
* @param props - The alignment, the viewport and the props of a `div`.
|
|
559
|
+
* @returns The `div` element.
|
|
560
|
+
*/
|
|
561
|
+
declare function ViewportPositioner({ align, ...props }: ViewportPositionerProps): ReactElement;
|
|
562
|
+
//#endregion
|
|
563
|
+
//#region src/navigation-menu/viewport.d.ts
|
|
564
|
+
/**
|
|
565
|
+
* Renders the `div` with the navigation menu's viewport class.
|
|
566
|
+
*/
|
|
567
|
+
declare const Shown: import("@stealthscale/theme").StyledComponent<"div", {}>;
|
|
568
|
+
/**
|
|
569
|
+
* Describes the props of the viewport: the props of a `div`, without `ref`, which the presence
|
|
570
|
+
* takes.
|
|
571
|
+
*/
|
|
572
|
+
type ViewportProps = Omit<ComponentProps<typeof Shown>, "ref">;
|
|
573
|
+
/**
|
|
574
|
+
* Renders the viewport with the machine's viewport props and the presence props merged over the
|
|
575
|
+
* caller's.
|
|
576
|
+
*
|
|
577
|
+
* @param props - The props of a `div`.
|
|
578
|
+
* @returns The `div` element.
|
|
579
|
+
*/
|
|
580
|
+
declare function Viewport(props: ViewportProps): ReactElement;
|
|
581
|
+
declare namespace index_d_exports$2 {
|
|
582
|
+
export { Content, ContentProps, Indicator$1 as Indicator, IndicatorProps$1 as IndicatorProps, Item$2 as Item, ItemProps$2 as ItemProps, Link$2 as Link, LinkProps$2 as LinkProps, List$1 as List, ListProps$1 as ListProps, Root$2 as Root, RootProps$2 as RootProps, Trigger, TriggerProps, ValueChangeDetails, Viewport, ViewportPositioner, ViewportPositionerProps, ViewportProps };
|
|
583
|
+
}
|
|
584
|
+
//#endregion
|
|
585
|
+
//#region src/pagination/ellipsis.d.ts
|
|
586
|
+
/**
|
|
587
|
+
* Renders the `span` with the pagination's ellipsis class.
|
|
588
|
+
*/
|
|
589
|
+
declare const Gap: import("@stealthscale/theme").StyledComponent<"span", {}>;
|
|
590
|
+
/**
|
|
591
|
+
* Describes the props of the ellipsis: its place among the pages and the props of a `span`.
|
|
592
|
+
*/
|
|
593
|
+
interface EllipsisProps extends ComponentProps<typeof Gap> {
|
|
594
|
+
/**
|
|
595
|
+
* Index of the mark in the machine's list of pages.
|
|
596
|
+
*/
|
|
597
|
+
readonly index: number;
|
|
598
|
+
}
|
|
599
|
+
/**
|
|
600
|
+
* Renders the ellipsis with the machine's props merged over the caller's.
|
|
601
|
+
*
|
|
602
|
+
* @param props - The mark's index and the props of a `span`.
|
|
603
|
+
* @returns The `span` element.
|
|
604
|
+
*/
|
|
605
|
+
declare function Ellipsis({ children, index, ...rest }: EllipsisProps): ReactElement;
|
|
606
|
+
//#endregion
|
|
607
|
+
//#region src/pagination/first-trigger.d.ts
|
|
608
|
+
/**
|
|
609
|
+
* Describes the props of the first trigger: its accessible name and the props of a `Button`.
|
|
610
|
+
*/
|
|
611
|
+
interface FirstTriggerProps extends ButtonProps {
|
|
612
|
+
/**
|
|
613
|
+
* Accessible name of the trigger, "First page" unless the caller passes another.
|
|
614
|
+
*/
|
|
615
|
+
readonly label?: string | undefined;
|
|
616
|
+
}
|
|
617
|
+
/**
|
|
618
|
+
* Renders the first trigger with the machine's props merged over the caller's.
|
|
619
|
+
*
|
|
620
|
+
* @param props - The trigger's name and the props of a `Button`.
|
|
621
|
+
* @returns The `button` element, or an `a` for links.
|
|
622
|
+
*/
|
|
623
|
+
declare function FirstTrigger({ label, ...rest }: FirstTriggerProps): ReactElement;
|
|
624
|
+
//#endregion
|
|
625
|
+
//#region src/pagination/item.d.ts
|
|
626
|
+
/**
|
|
627
|
+
* Describes the props of a page: its number, its accessible name and the props of a `Button`.
|
|
628
|
+
*/
|
|
629
|
+
interface ItemProps$1 extends Omit<ButtonProps, "value"> {
|
|
630
|
+
/**
|
|
631
|
+
* Accessible name of the page, "Page N" unless the caller passes another.
|
|
632
|
+
*/
|
|
633
|
+
readonly label?: string | undefined;
|
|
634
|
+
/**
|
|
635
|
+
* Number of the page, from one.
|
|
636
|
+
*/
|
|
637
|
+
readonly value: number;
|
|
638
|
+
}
|
|
639
|
+
/**
|
|
640
|
+
* Renders a page with the machine's item props merged over the caller's.
|
|
641
|
+
*
|
|
642
|
+
* @param props - The page's number and name and the props of a `Button`.
|
|
643
|
+
* @returns The `button` element, or an `a` for links.
|
|
644
|
+
*/
|
|
645
|
+
declare function Item$1({ children, label, value, ...rest }: ItemProps$1): ReactElement;
|
|
646
|
+
//#endregion
|
|
647
|
+
//#region src/pagination/wording.d.ts
|
|
648
|
+
/**
|
|
649
|
+
* Words the current page as text: "Page 12 of 24", "12 / 24" or "111–120 of 240".
|
|
650
|
+
*/
|
|
651
|
+
/**
|
|
652
|
+
* Describes the items of the current page by index, from zero.
|
|
653
|
+
*/
|
|
654
|
+
interface PageRange {
|
|
655
|
+
/**
|
|
656
|
+
* Index of the item after the page's last.
|
|
657
|
+
*/
|
|
658
|
+
readonly end: number;
|
|
659
|
+
/**
|
|
660
|
+
* Index of the page's first item.
|
|
661
|
+
*/
|
|
662
|
+
readonly start: number;
|
|
663
|
+
}
|
|
664
|
+
/**
|
|
665
|
+
* Describes where the reader is among the pages, as the machine counts it.
|
|
666
|
+
*/
|
|
667
|
+
interface PageDetails {
|
|
668
|
+
/**
|
|
669
|
+
* Number of items across every page.
|
|
670
|
+
*/
|
|
671
|
+
readonly count: number;
|
|
672
|
+
/**
|
|
673
|
+
* Number of the current page, from one.
|
|
674
|
+
*/
|
|
675
|
+
readonly page: number;
|
|
676
|
+
/**
|
|
677
|
+
* Indexes of the current page's first item and of the item after its last, from zero.
|
|
678
|
+
*/
|
|
679
|
+
readonly pageRange: PageRange;
|
|
680
|
+
/**
|
|
681
|
+
* Number of pages.
|
|
682
|
+
*/
|
|
683
|
+
readonly totalPages: number;
|
|
684
|
+
}
|
|
685
|
+
/**
|
|
686
|
+
* Selects how the page text words the current page, or a function that words it.
|
|
687
|
+
*/
|
|
688
|
+
type PageFormat = "compact" | "long" | "short" | ((details: PageDetails) => string);
|
|
689
|
+
//#endregion
|
|
690
|
+
//#region src/pagination/items.d.ts
|
|
691
|
+
/**
|
|
692
|
+
* Describes the props of the items: the words that name a page and the words of the summary.
|
|
693
|
+
*/
|
|
694
|
+
interface ItemsProps {
|
|
695
|
+
/**
|
|
696
|
+
* Returns the accessible name of a page, "Page N" unless the caller passes another function.
|
|
697
|
+
*/
|
|
698
|
+
readonly label?: ((page: number) => string) | undefined;
|
|
699
|
+
/**
|
|
700
|
+
* Format of the summary that replaces the pages while they do not fit the row, `compact`
|
|
701
|
+
* ("Page 12 of 24") unless the caller passes another.
|
|
702
|
+
*/
|
|
703
|
+
readonly summary?: PageFormat | undefined;
|
|
704
|
+
}
|
|
705
|
+
/**
|
|
706
|
+
* Renders the pages, the marks between them and the summary.
|
|
707
|
+
*
|
|
708
|
+
* @param props - The function that names a page and the summary's format.
|
|
709
|
+
* @returns The items in the machine's order, then the summary.
|
|
710
|
+
*/
|
|
711
|
+
declare function Items({ label, summary }: ItemsProps): ReactElement;
|
|
712
|
+
//#endregion
|
|
713
|
+
//#region src/pagination/last-trigger.d.ts
|
|
714
|
+
/**
|
|
715
|
+
* Describes the props of the last trigger: its accessible name and the props of a `Button`.
|
|
716
|
+
*/
|
|
717
|
+
interface LastTriggerProps extends ButtonProps {
|
|
718
|
+
/**
|
|
719
|
+
* Accessible name of the trigger, "Last page" unless the caller passes another.
|
|
720
|
+
*/
|
|
721
|
+
readonly label?: string | undefined;
|
|
722
|
+
}
|
|
723
|
+
/**
|
|
724
|
+
* Renders the last trigger with the machine's props merged over the caller's.
|
|
725
|
+
*
|
|
726
|
+
* @param props - The trigger's name and the props of a `Button`.
|
|
727
|
+
* @returns The `button` element, or an `a` for links.
|
|
728
|
+
*/
|
|
729
|
+
declare function LastTrigger({ label, ...rest }: LastTriggerProps): ReactElement;
|
|
730
|
+
//#endregion
|
|
731
|
+
//#region src/pagination/next-trigger.d.ts
|
|
732
|
+
/**
|
|
733
|
+
* Describes the props of the next trigger: its accessible name and the props of a `Button`.
|
|
734
|
+
*/
|
|
735
|
+
interface NextTriggerProps extends ButtonProps {
|
|
736
|
+
/**
|
|
737
|
+
* Accessible name of the trigger, "Next page" unless the caller passes another.
|
|
738
|
+
*/
|
|
739
|
+
readonly label?: string | undefined;
|
|
740
|
+
}
|
|
741
|
+
/**
|
|
742
|
+
* Renders the next trigger with the machine's props merged over the caller's.
|
|
743
|
+
*
|
|
744
|
+
* @param props - The trigger's name and the props of a `Button`.
|
|
745
|
+
* @returns The `button` element, or an `a` for links.
|
|
746
|
+
*/
|
|
747
|
+
declare function NextTrigger({ label, ...rest }: NextTriggerProps): ReactElement;
|
|
748
|
+
//#endregion
|
|
749
|
+
//#region src/pagination/page-text.d.ts
|
|
750
|
+
/**
|
|
751
|
+
* Renders the `output` with the pagination's page text class.
|
|
752
|
+
*/
|
|
753
|
+
declare const Stated: import("@stealthscale/theme").StyledComponent<"output", {}>;
|
|
754
|
+
/**
|
|
755
|
+
* Describes the props of the page text: its format and the props of an `output` without children.
|
|
756
|
+
*/
|
|
757
|
+
interface PageTextProps extends Omit<ComponentProps<typeof Stated>, "children"> {
|
|
758
|
+
/**
|
|
759
|
+
* How the text words the current page, `compact` unless the caller passes another.
|
|
760
|
+
*/
|
|
761
|
+
readonly format?: PageFormat | undefined;
|
|
762
|
+
}
|
|
763
|
+
/**
|
|
764
|
+
* Renders the text for the current page.
|
|
765
|
+
*
|
|
766
|
+
* @param props - The format and the props of an `output`.
|
|
767
|
+
* @returns The `output` element.
|
|
768
|
+
*/
|
|
769
|
+
declare function PageText({ format, ...rest }: PageTextProps): ReactElement;
|
|
770
|
+
//#endregion
|
|
771
|
+
//#region src/pagination/prev-trigger.d.ts
|
|
772
|
+
/**
|
|
773
|
+
* Describes the props of the previous trigger: its accessible name and the props of a `Button`.
|
|
774
|
+
*/
|
|
775
|
+
interface PrevTriggerProps extends ButtonProps {
|
|
776
|
+
/**
|
|
777
|
+
* Accessible name of the trigger, "Previous page" unless the caller passes another.
|
|
778
|
+
*/
|
|
779
|
+
readonly label?: string | undefined;
|
|
780
|
+
}
|
|
781
|
+
/**
|
|
782
|
+
* Renders the previous trigger with the machine's props merged over the caller's.
|
|
783
|
+
*
|
|
784
|
+
* @param props - The trigger's name and the props of a `Button`.
|
|
785
|
+
* @returns The `button` element, or an `a` for links.
|
|
786
|
+
*/
|
|
787
|
+
declare function PrevTrigger({ label, ...rest }: PrevTriggerProps): ReactElement;
|
|
788
|
+
//#endregion
|
|
789
|
+
//#region src/pagination/machine.d.ts
|
|
790
|
+
/**
|
|
791
|
+
* Describes the machine settings a caller can pass to the root, all optional.
|
|
792
|
+
*
|
|
793
|
+
* @remarks
|
|
794
|
+
* `translations` is left out, because a component's words are props: the root takes its name as
|
|
795
|
+
* `aria-label`, and each trigger and page takes its own `label`.
|
|
796
|
+
*/
|
|
797
|
+
type PaginationOptions = Omit<Partial<pagination.Props>, "translations">;
|
|
798
|
+
//#endregion
|
|
799
|
+
//#region src/pagination/root.d.ts
|
|
800
|
+
/**
|
|
801
|
+
* Renders the `nav` that provides the recipe's variants.
|
|
802
|
+
*/
|
|
803
|
+
declare const Framed: import("@stealthscale/theme").StyledComponent<"nav", {
|
|
804
|
+
readonly size?: "lg" | "md" | "sm" | undefined;
|
|
805
|
+
}>;
|
|
806
|
+
/**
|
|
807
|
+
* Describes the props of the root: the machine's options, the buttons' look and palette, the
|
|
808
|
+
* recipe's variants and the props of a `nav` without `ref`.
|
|
809
|
+
*
|
|
810
|
+
* @remarks
|
|
811
|
+
* The element's `dir`, `id` and `page` are left out, because the machine takes all three. `page`
|
|
812
|
+
* is otherwise the CSS property of that name.
|
|
813
|
+
*/
|
|
814
|
+
interface RootProps$1 extends Omit<ComponentProps<typeof Framed>, "dir" | "id" | "page" | "ref">, PaginationOptions {
|
|
815
|
+
/**
|
|
816
|
+
* Palette of the buttons, the button's own `primary` unless the caller sets another.
|
|
817
|
+
*/
|
|
818
|
+
readonly palette?: Palette | undefined;
|
|
819
|
+
/**
|
|
820
|
+
* Look of the buttons, `ghost` unless the caller sets another. The current page is marked in
|
|
821
|
+
* every look.
|
|
822
|
+
*/
|
|
823
|
+
readonly variant?: Look | undefined;
|
|
824
|
+
}
|
|
825
|
+
/**
|
|
826
|
+
* Renders the root, passes the buttons' variants down, and provides the running machine to the
|
|
827
|
+
* parts.
|
|
828
|
+
*
|
|
829
|
+
* @param props - The machine's options, the buttons' look and palette, the recipe's variants and
|
|
830
|
+
* the props of a `nav`.
|
|
831
|
+
* @returns The `nav` element inside the providers.
|
|
832
|
+
*/
|
|
833
|
+
declare function Root$1({ "aria-label": label, palette, size, variant, ...props }: RootProps$1): ReactElement;
|
|
834
|
+
declare namespace index_d_exports$3 {
|
|
835
|
+
export { Ellipsis, EllipsisProps, FirstTrigger, FirstTriggerProps, Item$1 as Item, ItemProps$1 as ItemProps, Items, ItemsProps, LastTrigger, LastTriggerProps, NextTrigger, NextTriggerProps, PageDetails, PageFormat, PageText, PageTextProps, PrevTrigger, PrevTriggerProps, Root$1 as Root, RootProps$1 as RootProps };
|
|
836
|
+
}
|
|
837
|
+
//#endregion
|
|
838
|
+
//#region src/toc/indicator.d.ts
|
|
839
|
+
/**
|
|
840
|
+
* List item with the indicator slot classes.
|
|
841
|
+
*/
|
|
842
|
+
declare const Styled$4: import("@stealthscale/theme").StyledComponent<"li", {}>;
|
|
843
|
+
/**
|
|
844
|
+
* Describes the props of Toc.Indicator: the props of a list item element.
|
|
845
|
+
*/
|
|
846
|
+
type IndicatorProps = ComponentProps<typeof Styled$4>;
|
|
847
|
+
/**
|
|
848
|
+
* Renders a list item positioned over the active rows, hidden from the accessibility tree.
|
|
849
|
+
*/
|
|
850
|
+
declare function Indicator(props: IndicatorProps): ReactElement;
|
|
851
|
+
//#endregion
|
|
852
|
+
//#region src/toc/machine.d.ts
|
|
853
|
+
/**
|
|
854
|
+
* Describes the machine settings a caller can pass to the root, all optional.
|
|
855
|
+
*/
|
|
856
|
+
type TocOptions = Partial<toc.Props>;
|
|
857
|
+
/**
|
|
858
|
+
* Describes one listed heading: its element id and its depth.
|
|
859
|
+
*/
|
|
860
|
+
type TocItem = toc.TocItem;
|
|
861
|
+
//#endregion
|
|
862
|
+
//#region src/toc/item.d.ts
|
|
863
|
+
/**
|
|
864
|
+
* List item with the item slot classes.
|
|
865
|
+
*/
|
|
866
|
+
declare const Styled$3: import("@stealthscale/theme").StyledComponent<"li", {}>;
|
|
867
|
+
/**
|
|
868
|
+
* Describes the props of Toc.Item: the heading and the props of a list item element.
|
|
869
|
+
*/
|
|
870
|
+
interface ItemProps extends ComponentProps<typeof Styled$3> {
|
|
871
|
+
/**
|
|
872
|
+
* Heading of the row: its element ID as `value` and its level as `depth`.
|
|
873
|
+
*/
|
|
874
|
+
readonly item: TocItem;
|
|
875
|
+
}
|
|
876
|
+
/**
|
|
877
|
+
* Renders a list item with the depth and active state of its heading.
|
|
878
|
+
*/
|
|
879
|
+
declare function Item({ item, ...rest }: ItemProps): ReactElement;
|
|
880
|
+
//#endregion
|
|
881
|
+
//#region src/toc/link.d.ts
|
|
882
|
+
/**
|
|
883
|
+
* Anchor with the link slot classes.
|
|
884
|
+
*/
|
|
885
|
+
declare const Styled$2: import("@stealthscale/theme").StyledComponent<"a", {}>;
|
|
886
|
+
/**
|
|
887
|
+
* Describes the props of Toc.Link: the heading and the props of an anchor element.
|
|
888
|
+
*/
|
|
889
|
+
interface LinkProps$1 extends ComponentProps<typeof Styled$2> {
|
|
890
|
+
/**
|
|
891
|
+
* Heading the link points to: its element ID as `value` and its level as `depth`.
|
|
892
|
+
*/
|
|
893
|
+
readonly item: TocItem;
|
|
894
|
+
}
|
|
895
|
+
/**
|
|
896
|
+
* Renders an anchor that sets `aria-current` while its heading is visible.
|
|
897
|
+
*/
|
|
898
|
+
declare function Link$1({ item, ...rest }: LinkProps$1): ReactElement;
|
|
899
|
+
//#endregion
|
|
900
|
+
//#region src/toc/list.d.ts
|
|
901
|
+
/**
|
|
902
|
+
* Unordered list with the list slot classes.
|
|
903
|
+
*/
|
|
904
|
+
declare const Styled$1: import("@stealthscale/theme").StyledComponent<"ul", {}>;
|
|
905
|
+
/**
|
|
906
|
+
* Describes the props of Toc.List: the props of an unordered list element.
|
|
907
|
+
*/
|
|
908
|
+
type ListProps = ComponentProps<typeof Styled$1>;
|
|
909
|
+
/**
|
|
910
|
+
* Renders an unordered list with the ID the machine measures the rows against.
|
|
911
|
+
*/
|
|
912
|
+
declare function List(props: ListProps): ReactElement;
|
|
913
|
+
//#endregion
|
|
914
|
+
//#region src/toc/root.d.ts
|
|
915
|
+
/**
|
|
916
|
+
* Nav element that provides the recipe's variants to the parts.
|
|
917
|
+
*/
|
|
918
|
+
declare const Landmark: import("@stealthscale/theme").StyledComponent<"nav", {
|
|
919
|
+
readonly palette?: "accent" | "error" | "info" | "neutral" | "primary" | "secondary" | "success" | "warning" | undefined;
|
|
920
|
+
readonly placement?: "aside" | "inline" | undefined;
|
|
921
|
+
readonly size?: "lg" | "md" | "sm" | undefined;
|
|
922
|
+
}>;
|
|
923
|
+
/**
|
|
924
|
+
* Describes the props of Toc.Root: the machine options, the recipe's variants and the props of a
|
|
925
|
+
* nav element.
|
|
926
|
+
*
|
|
927
|
+
* @remarks
|
|
928
|
+
* The element's `id` and `dir` are omitted, because the machine sets both. It derives the
|
|
929
|
+
* landmark's `aria-labelledby` from the ID and writes the direction to every part. The CSS
|
|
930
|
+
* `scrollBehavior` style prop is omitted, so the name reaches the machine option that scrolls
|
|
931
|
+
* the page to a heading.
|
|
932
|
+
*/
|
|
933
|
+
interface RootProps extends Omit<ComponentProps<typeof Landmark>, "dir" | "id" | "scrollBehavior">, TocOptions {
|
|
934
|
+
/**
|
|
935
|
+
* Headings of the page in document order, each with its element ID as `value` and its level as
|
|
936
|
+
* `depth`.
|
|
937
|
+
*/
|
|
938
|
+
readonly items: TocItem[];
|
|
939
|
+
}
|
|
940
|
+
/**
|
|
941
|
+
* Renders a `nav` that runs the machine and provides its api to the parts, around a scroll area
|
|
942
|
+
* in the aside placement.
|
|
943
|
+
*/
|
|
944
|
+
declare function Root(props: RootProps): ReactElement;
|
|
945
|
+
//#endregion
|
|
946
|
+
//#region src/toc/title.d.ts
|
|
947
|
+
/**
|
|
948
|
+
* Div with the title slot classes.
|
|
949
|
+
*/
|
|
950
|
+
declare const Styled: import("@stealthscale/theme").StyledComponent<"div", {}>;
|
|
951
|
+
/**
|
|
952
|
+
* Describes the props of Toc.Title: the props of a div element.
|
|
953
|
+
*/
|
|
954
|
+
type TitleProps = ComponentProps<typeof Styled>;
|
|
955
|
+
/**
|
|
956
|
+
* Renders a div with the ID the root's `aria-labelledby` references.
|
|
957
|
+
*/
|
|
958
|
+
declare function Title(props: TitleProps): ReactElement;
|
|
959
|
+
declare namespace index_d_exports$4 {
|
|
960
|
+
export { Indicator, IndicatorProps, Item, ItemProps, Link$1 as Link, LinkProps$1 as LinkProps, List, ListProps, Root, RootProps, Title, TitleProps, TocItem };
|
|
961
|
+
}
|
|
962
|
+
//#endregion
|
|
963
|
+
export { index_d_exports as Breadcrumb, type LinkProps, PropsProvider as LinkPropsProvider, index_d_exports$1 as NavList, index_d_exports$2 as NavigationMenu, index_d_exports$3 as Pagination, index_d_exports$4 as Toc };
|