@alextheman/components 6.9.1 → 6.10.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/LICENSE +21 -0
- package/README.md +47 -0
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +201 -106
- package/dist/index.d.ts +202 -107
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +6 -5
package/dist/index.d.cts
CHANGED
|
@@ -3,14 +3,14 @@ import { CollapseProps } from "@mui/material/Collapse";
|
|
|
3
3
|
import { PaletteMode, SxProps, Theme } from "@mui/material/styles";
|
|
4
4
|
import * as _$react from "react";
|
|
5
5
|
import { CSSProperties, ComponentProps, ComponentPropsWithRef, ComponentPropsWithoutRef, ComponentType, Dispatch, ElementType, JSX, MouseEvent, MouseEventHandler, ReactNode, Ref, SetStateAction } from "react";
|
|
6
|
-
import Button$1, { ButtonOwnProps, ButtonProps } from "@mui/material/Button";
|
|
7
6
|
import { LinkProps } from "@mui/material/Link";
|
|
8
7
|
import { CreateEnumType, OptionalOnCondition } from "@alextheman/utility";
|
|
9
|
-
import {
|
|
8
|
+
import Button$1, { ButtonOwnProps, ButtonProps } from "@mui/material/Button";
|
|
10
9
|
import { AlertColor } from "@mui/material/Alert";
|
|
11
10
|
import { LiveProvider } from "react-live";
|
|
12
11
|
import { CommonProps, OverridableComponent } from "@mui/material/OverridableComponent";
|
|
13
12
|
import { SwitchProps } from "@mui/material/Switch";
|
|
13
|
+
import { MenuItemOwnProps } from "@mui/material/MenuItem";
|
|
14
14
|
import { SvgIconTypeMap } from "@mui/material/SvgIcon";
|
|
15
15
|
import { ListItemButtonProps } from "@mui/material/ListItemButton";
|
|
16
16
|
import { TypographyProps } from "@mui/material/Typography";
|
|
@@ -66,31 +66,6 @@ declare function CollapsableItem({
|
|
|
66
66
|
useDefaultStyling
|
|
67
67
|
}: CollapsableItemProps): _$react_jsx_runtime0.JSX.Element;
|
|
68
68
|
//#endregion
|
|
69
|
-
//#region src/components/DropdownMenu.d.ts
|
|
70
|
-
interface DropdownMenuProps {
|
|
71
|
-
children: ReactNode | ((closeMenu: () => void) => ReactNode);
|
|
72
|
-
buttonChildren?: ReactNode;
|
|
73
|
-
button?: ElementType;
|
|
74
|
-
buttonProps?: Omit<ButtonOwnProps, "onClick" | "endIcon">;
|
|
75
|
-
isOpenIcon?: ReactNode;
|
|
76
|
-
isClosedIcon?: ReactNode;
|
|
77
|
-
onOpen?: () => void;
|
|
78
|
-
onClose?: () => void;
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* @deprecated This component does not support the new context-based pattern and individual DropdownMenuItem components. Please use DropdownMenu2 instead.
|
|
82
|
-
*/
|
|
83
|
-
declare function DropdownMenu({
|
|
84
|
-
children,
|
|
85
|
-
button: Button,
|
|
86
|
-
buttonChildren,
|
|
87
|
-
buttonProps: incomingButtonProps,
|
|
88
|
-
isOpenIcon,
|
|
89
|
-
isClosedIcon,
|
|
90
|
-
onOpen,
|
|
91
|
-
onClose
|
|
92
|
-
}: DropdownMenuProps): _$react_jsx_runtime0.JSX.Element;
|
|
93
|
-
//#endregion
|
|
94
69
|
//#region src/components/ExternalLink.d.ts
|
|
95
70
|
interface ExternalLinkProps extends Omit<LinkProps, "to" | "target" | "rel"> {
|
|
96
71
|
/** The URL of the place you want to navigate to. */
|
|
@@ -198,79 +173,10 @@ declare function InternalLink({
|
|
|
198
173
|
}: InternalLinkProps): _$react_jsx_runtime0.JSX.Element;
|
|
199
174
|
//#endregion
|
|
200
175
|
//#region src/types/ContextHookOptions.d.ts
|
|
201
|
-
interface ContextHookOptions<
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
//#endregion
|
|
205
|
-
//#region src/providers/DropdownMenu2/DropdownMenu2.d.ts
|
|
206
|
-
interface DropdownMenuContextValue {
|
|
207
|
-
closeMenu: () => void;
|
|
208
|
-
isDropdownOpen: boolean;
|
|
209
|
-
}
|
|
210
|
-
declare function useDropdownMenu<Strict extends boolean = true>({
|
|
211
|
-
strict
|
|
212
|
-
}?: ContextHookOptions<Strict>): OptionalOnCondition<Strict, DropdownMenuContextValue>;
|
|
213
|
-
interface DropdownMenu2Props {
|
|
214
|
-
children: ReactNode;
|
|
215
|
-
button?: ElementType;
|
|
216
|
-
buttonProps?: Omit<ButtonOwnProps, "endIcon"> & {
|
|
217
|
-
onClick?: (event: MouseEvent<HTMLElement>) => void;
|
|
218
|
-
};
|
|
219
|
-
openIcon?: ReactNode;
|
|
220
|
-
closedIcon?: ReactNode;
|
|
221
|
-
}
|
|
222
|
-
declare function DropdownMenu2({
|
|
223
|
-
children,
|
|
224
|
-
button: Button,
|
|
225
|
-
buttonProps,
|
|
226
|
-
openIcon,
|
|
227
|
-
closedIcon
|
|
228
|
-
}: DropdownMenu2Props): _$react_jsx_runtime0.JSX.Element;
|
|
229
|
-
//#endregion
|
|
230
|
-
//#region src/providers/DropdownMenu2/DropdownMenuExternalLink.d.ts
|
|
231
|
-
interface DropdownMenuExternalLinkProps extends MenuItemOwnProps {
|
|
232
|
-
ref?: Ref<HTMLAnchorElement>;
|
|
233
|
-
href: ComponentProps<typeof ExternalLink>["href"];
|
|
234
|
-
onClick?: MouseEventHandler<HTMLAnchorElement>;
|
|
235
|
-
children: ReactNode;
|
|
236
|
-
}
|
|
237
|
-
declare function DropdownMenuExternalLink({
|
|
238
|
-
ref,
|
|
239
|
-
href,
|
|
240
|
-
children,
|
|
241
|
-
onClick,
|
|
242
|
-
...menuItemProps
|
|
243
|
-
}: DropdownMenuExternalLinkProps): _$react_jsx_runtime0.JSX.Element;
|
|
244
|
-
//#endregion
|
|
245
|
-
//#region src/providers/DropdownMenu2/DropdownMenuInternalLink.d.ts
|
|
246
|
-
interface DropdownMenuInternalLinkProps extends MenuItemOwnProps {
|
|
247
|
-
ref?: Ref<HTMLAnchorElement>;
|
|
248
|
-
to: ComponentProps<typeof InternalLink>["to"];
|
|
249
|
-
onClick?: MouseEventHandler<HTMLAnchorElement>;
|
|
250
|
-
children: ReactNode;
|
|
176
|
+
interface ContextHookOptions<Strict extends boolean = true> {
|
|
177
|
+
/** Error if the context is missing if this is set to true. */
|
|
178
|
+
strict?: Strict;
|
|
251
179
|
}
|
|
252
|
-
declare function DropdownMenuInternalLink({
|
|
253
|
-
to,
|
|
254
|
-
ref,
|
|
255
|
-
children,
|
|
256
|
-
onClick,
|
|
257
|
-
...menuItemProps
|
|
258
|
-
}: DropdownMenuInternalLinkProps): _$react_jsx_runtime0.JSX.Element;
|
|
259
|
-
//#endregion
|
|
260
|
-
//#region src/providers/DropdownMenu2/DropdownMenuItem.d.ts
|
|
261
|
-
type DropdownMenuItemProps<RootComponent extends ElementType = typeof Button$1> = {
|
|
262
|
-
component?: RootComponent;
|
|
263
|
-
children?: ReactNode;
|
|
264
|
-
ref?: ComponentPropsWithRef<RootComponent>["ref"];
|
|
265
|
-
onClick?: ComponentProps<RootComponent>["onClick"];
|
|
266
|
-
} & Omit<ComponentPropsWithoutRef<RootComponent>, "children" | "ref"> & MenuItemOwnProps;
|
|
267
|
-
declare function DropdownMenuItem<RootComponent extends ElementType>({
|
|
268
|
-
component,
|
|
269
|
-
children,
|
|
270
|
-
ref,
|
|
271
|
-
onClick,
|
|
272
|
-
...menuItemProps
|
|
273
|
-
}: DropdownMenuItemProps<RootComponent>): _$react_jsx_runtime0.JSX.Element;
|
|
274
180
|
//#endregion
|
|
275
181
|
//#region src/providers/LoaderProvider/LoaderProvider.d.ts
|
|
276
182
|
interface LoaderProviderBaseProps<DataType> {
|
|
@@ -372,13 +278,17 @@ interface ModeContextValue {
|
|
|
372
278
|
toggleMode: () => void;
|
|
373
279
|
mode: PaletteMode;
|
|
374
280
|
}
|
|
281
|
+
/** Access the mode context directly. */
|
|
375
282
|
declare function useMode<Strict extends boolean = true>({
|
|
376
283
|
strict
|
|
377
284
|
}?: ContextHookOptions<Strict>): OptionalOnCondition<Strict, ModeContextValue>;
|
|
378
285
|
interface ModeProviderProps {
|
|
286
|
+
/** The children that will have access to the current mode. */
|
|
379
287
|
children: ReactNode;
|
|
288
|
+
/** The initial mode. */
|
|
380
289
|
mode?: PaletteMode;
|
|
381
290
|
}
|
|
291
|
+
/** Provides information about the current theme mode to its children components. */
|
|
382
292
|
declare function ModeProvider({
|
|
383
293
|
children,
|
|
384
294
|
mode: modeProp
|
|
@@ -401,6 +311,7 @@ interface ScreenSizeContextValue {
|
|
|
401
311
|
/** The current window height. */
|
|
402
312
|
windowHeight: number;
|
|
403
313
|
}
|
|
314
|
+
/** Access the screen size context directly. */
|
|
404
315
|
declare function useScreenSize<Strict extends boolean = true>({
|
|
405
316
|
strict
|
|
406
317
|
}?: ContextHookOptions<Strict>): OptionalOnCondition<Strict, ScreenSizeContextValue>;
|
|
@@ -413,15 +324,20 @@ declare function ScreenSizeProvider({
|
|
|
413
324
|
//#endregion
|
|
414
325
|
//#region src/providers/SnackbarProvider.d.ts
|
|
415
326
|
interface SnackbarProviderProps {
|
|
327
|
+
/** The children that will have access to the snackbar context. */
|
|
416
328
|
children: ReactNode;
|
|
329
|
+
/** The amount of seconds to wait before hiding the snackbar. */
|
|
417
330
|
autoHideDuration?: number;
|
|
418
331
|
}
|
|
419
332
|
interface SnackbarContextValue {
|
|
333
|
+
/** A function that adds the snackbar to the page. */
|
|
420
334
|
addSnackbar: (message: string, severity?: AlertColor, duration?: number) => void;
|
|
421
335
|
}
|
|
336
|
+
/** Access the snackbar context directly. */
|
|
422
337
|
declare function useSnackbar<Strict extends boolean = true>({
|
|
423
338
|
strict
|
|
424
339
|
}?: ContextHookOptions<Strict>): OptionalOnCondition<Strict, SnackbarContextValue>;
|
|
340
|
+
/** Controls the display of the snackbars on the page. */
|
|
425
341
|
declare function SnackbarProvider({
|
|
426
342
|
children,
|
|
427
343
|
autoHideDuration
|
|
@@ -452,35 +368,53 @@ declare function ModeToggle(): _$react_jsx_runtime0.JSX.Element;
|
|
|
452
368
|
//#endregion
|
|
453
369
|
//#region src/components/NavigationBottom.d.ts
|
|
454
370
|
interface NavItemBottom {
|
|
371
|
+
/** The value associated with the nav item. */
|
|
455
372
|
value: string;
|
|
373
|
+
/** The label to display on the nav item. */
|
|
456
374
|
label: string;
|
|
375
|
+
/** An icon to display alongside the nav item. */
|
|
457
376
|
icon?: JSX.Element;
|
|
377
|
+
/** Where in your app the nav item should navigate to. */
|
|
458
378
|
to: string;
|
|
459
379
|
}
|
|
460
380
|
interface NavigationBottomProps {
|
|
381
|
+
/** Children to display above the nav bar. */
|
|
461
382
|
children: ReactNode;
|
|
383
|
+
/** An array of nav items to show. */
|
|
462
384
|
navItems: Array<NavItemBottom>;
|
|
463
385
|
}
|
|
386
|
+
/** Renders a navigation bar at the bottom of the screen. Especially helpful for common navigation options in a mobile app. */
|
|
464
387
|
declare function NavigationBottom({
|
|
465
388
|
children,
|
|
466
389
|
navItems
|
|
467
390
|
}: NavigationBottomProps): _$react_jsx_runtime0.JSX.Element;
|
|
468
391
|
//#endregion
|
|
469
392
|
//#region src/components/NavigationDrawer.d.ts
|
|
393
|
+
interface NavMenuItemOptions {
|
|
394
|
+
/** The label to display on the nav item option. */
|
|
395
|
+
label: string;
|
|
396
|
+
/** Where in your app the nav item option should navigate to. */
|
|
397
|
+
to: string;
|
|
398
|
+
/** An icon to display alongside the nav item option. */
|
|
399
|
+
icon?: ReactNode;
|
|
400
|
+
}
|
|
470
401
|
interface NavMenuItem {
|
|
402
|
+
/** The category to display all the nav item options under. */
|
|
471
403
|
category: string;
|
|
472
|
-
options
|
|
473
|
-
|
|
474
|
-
to: string;
|
|
475
|
-
icon?: ReactNode;
|
|
476
|
-
}>;
|
|
404
|
+
/** An array of nav options to display under the chosen category. */
|
|
405
|
+
options: Array<NavMenuItemOptions>;
|
|
477
406
|
}
|
|
478
407
|
interface NavigationDrawerProps {
|
|
408
|
+
/** The title to display at the top of the wrapper. */
|
|
479
409
|
title: string;
|
|
410
|
+
/** An array of nav items to show. */
|
|
480
411
|
navItems: Array<NavMenuItem>;
|
|
412
|
+
/** Any extra elements to add to the header. */
|
|
481
413
|
headerElements?: ReactNode;
|
|
414
|
+
/** Children to display within the wrapper. */
|
|
482
415
|
children: ReactNode;
|
|
483
416
|
}
|
|
417
|
+
/** Renders a collapsable drawer to help with navigation. Best used as the main means of navigation on desktop apps. */
|
|
484
418
|
declare function NavigationDrawer({
|
|
485
419
|
title,
|
|
486
420
|
navItems,
|
|
@@ -509,8 +443,10 @@ declare function Page({
|
|
|
509
443
|
//#endregion
|
|
510
444
|
//#region src/components/ReactPlayground.d.ts
|
|
511
445
|
interface ReactPlaygroundProps extends ComponentProps<typeof LiveProvider> {
|
|
446
|
+
/** Extra styling to apply to the preview. Must be compatible with the Material UI `sx` prop. */
|
|
512
447
|
previewStyles?: SxProps<Theme>;
|
|
513
448
|
}
|
|
449
|
+
/** Renders a playground to help demonstrate your React code in an interactive setting. */
|
|
514
450
|
declare function ReactPlayground({
|
|
515
451
|
code,
|
|
516
452
|
previewStyles,
|
|
@@ -519,17 +455,26 @@ declare function ReactPlayground({
|
|
|
519
455
|
//#endregion
|
|
520
456
|
//#region src/components/SkeletonRow.d.ts
|
|
521
457
|
interface SkeletonRowProps {
|
|
458
|
+
/** The number of columns the SkeletonRow should display. */
|
|
522
459
|
columns: number;
|
|
523
460
|
}
|
|
461
|
+
/** Renders the skeleton of a table row. Often helpful to represent the loading state of the data in your table. */
|
|
524
462
|
declare function SkeletonRow({
|
|
525
463
|
columns
|
|
526
464
|
}: SkeletonRowProps): _$react_jsx_runtime0.JSX.Element;
|
|
527
465
|
//#endregion
|
|
528
466
|
//#region src/components/SubmitButton.d.ts
|
|
529
467
|
interface SubmitButtonProps extends Omit<ButtonProps, "type"> {
|
|
468
|
+
/** An option to disable the button on submit if the form is not dirty. */
|
|
530
469
|
disableClean?: boolean;
|
|
470
|
+
/** The label for the button. */
|
|
531
471
|
label: string;
|
|
532
472
|
}
|
|
473
|
+
/**
|
|
474
|
+
* A Submit Button for use with `react-hook-form`.
|
|
475
|
+
*
|
|
476
|
+
* Note that this is planned to eventually be deprecated and replaced with a newer version of `SubmitButton` that is instead compatible with `@tanstack/react-form`.
|
|
477
|
+
*/
|
|
533
478
|
declare function SubmitButton({
|
|
534
479
|
disableClean,
|
|
535
480
|
label,
|
|
@@ -538,15 +483,20 @@ declare function SubmitButton({
|
|
|
538
483
|
//#endregion
|
|
539
484
|
//#region src/components/SwitchWithIcons.d.ts
|
|
540
485
|
interface SwitchWithIconsProps extends Omit<SwitchProps, "icon" | "checkedIcon"> {
|
|
486
|
+
/** The icon to show when the switch is in a checked state. */
|
|
541
487
|
checkedIcon: ComponentType<{
|
|
542
488
|
style?: CSSProperties;
|
|
543
489
|
}>;
|
|
490
|
+
/** Additional styling to apply to the icon that shows when checked. */
|
|
544
491
|
checkedIconStyles?: CommonProps["style"];
|
|
492
|
+
/** The icon to show when the switch is in an unchecked state. */
|
|
545
493
|
uncheckedIcon: ComponentType<{
|
|
546
494
|
style?: CSSProperties;
|
|
547
495
|
}>;
|
|
496
|
+
/** Additional styling to apply to the icon that shows when unchecked. */
|
|
548
497
|
uncheckedIconStyles?: CommonProps["style"];
|
|
549
498
|
}
|
|
499
|
+
/** Renders a switch with your provided icons. */
|
|
550
500
|
declare function SwitchWithIcons({
|
|
551
501
|
checkedIcon: CheckedIcon,
|
|
552
502
|
checkedIconStyles,
|
|
@@ -555,10 +505,146 @@ declare function SwitchWithIcons({
|
|
|
555
505
|
...switchProps
|
|
556
506
|
}: SwitchWithIconsProps): _$react_jsx_runtime0.JSX.Element;
|
|
557
507
|
//#endregion
|
|
508
|
+
//#region src/deprecated/DropdownMenu.d.ts
|
|
509
|
+
interface DropdownMenuProps {
|
|
510
|
+
children: ReactNode | ((closeMenu: () => void) => ReactNode);
|
|
511
|
+
buttonChildren?: ReactNode;
|
|
512
|
+
button?: ElementType;
|
|
513
|
+
buttonProps?: Omit<ButtonOwnProps, "onClick" | "endIcon">;
|
|
514
|
+
isOpenIcon?: ReactNode;
|
|
515
|
+
isClosedIcon?: ReactNode;
|
|
516
|
+
onOpen?: () => void;
|
|
517
|
+
onClose?: () => void;
|
|
518
|
+
}
|
|
519
|
+
/**
|
|
520
|
+
* @deprecated This component does not support the new context-based pattern and individual DropdownMenuItem components. Please use DropdownMenu2 instead.
|
|
521
|
+
*/
|
|
522
|
+
declare function DropdownMenu({
|
|
523
|
+
children,
|
|
524
|
+
button: Button,
|
|
525
|
+
buttonChildren,
|
|
526
|
+
buttonProps: incomingButtonProps,
|
|
527
|
+
isOpenIcon,
|
|
528
|
+
isClosedIcon,
|
|
529
|
+
onOpen,
|
|
530
|
+
onClose
|
|
531
|
+
}: DropdownMenuProps): _$react_jsx_runtime0.JSX.Element;
|
|
532
|
+
//#endregion
|
|
558
533
|
//#region src/deprecated/DarkModeToggle.d.ts
|
|
559
534
|
/** @deprecated This component has been renamed to `ModeToggle`. */
|
|
560
535
|
declare const DarkModeToggle: typeof ModeToggle;
|
|
561
536
|
//#endregion
|
|
537
|
+
//#region src/v7/components/DropdownMenu/DropdownMenu.d.ts
|
|
538
|
+
interface DropdownMenuContextValue {
|
|
539
|
+
/** A function responsible for closing the dropdown menu. */
|
|
540
|
+
closeMenu: () => void;
|
|
541
|
+
/** Represents whether or not the dropdown is open. */
|
|
542
|
+
isDropdownOpen: boolean;
|
|
543
|
+
}
|
|
544
|
+
/**
|
|
545
|
+
Access the DropdownMenu context directly.
|
|
546
|
+
*/
|
|
547
|
+
declare function useDropdownMenu$1<Strict extends boolean = true>({
|
|
548
|
+
strict
|
|
549
|
+
}?: ContextHookOptions<Strict>): OptionalOnCondition<Strict, DropdownMenuContextValue>;
|
|
550
|
+
interface DropdownMenuProps$1 {
|
|
551
|
+
/** The children to render inside of the dropdown. */
|
|
552
|
+
children: ReactNode;
|
|
553
|
+
/** The button component to be used as the dropdown toggle (defaults to a Material UI Button) */
|
|
554
|
+
button?: ElementType;
|
|
555
|
+
/** Props to pass to the Button. */
|
|
556
|
+
buttonProps?: Omit<ButtonOwnProps, "endIcon"> & {
|
|
557
|
+
onClick?: (event: MouseEvent<HTMLElement>) => void;
|
|
558
|
+
};
|
|
559
|
+
/** The icon to display on the button when it is open. */
|
|
560
|
+
openIcon?: ReactNode;
|
|
561
|
+
/** The icon to display on the button when it is closed. */
|
|
562
|
+
closedIcon?: ReactNode;
|
|
563
|
+
}
|
|
564
|
+
/** Renders a dropdown menu consisting of `DropdownMenuItem` components imported from this package. */
|
|
565
|
+
declare function DropdownMenu$1({
|
|
566
|
+
children,
|
|
567
|
+
button: Button,
|
|
568
|
+
buttonProps,
|
|
569
|
+
openIcon,
|
|
570
|
+
closedIcon
|
|
571
|
+
}: DropdownMenuProps$1): _$react_jsx_runtime0.JSX.Element;
|
|
572
|
+
//#endregion
|
|
573
|
+
//#region src/v7/components/DropdownMenu/DropdownMenuItem.d.ts
|
|
574
|
+
type DropdownMenuItemProps$1<RootComponent extends ElementType = typeof Button$1> = {
|
|
575
|
+
/**
|
|
576
|
+
* An optional component to provide to override the current component.
|
|
577
|
+
*
|
|
578
|
+
* Note that the provided component must:
|
|
579
|
+
* - accept a `to` prop.
|
|
580
|
+
* - correctly handle the forwarded `ref`.
|
|
581
|
+
* - render a valid anchor element (or equivalent) for proper accessibility.
|
|
582
|
+
*/
|
|
583
|
+
component?: RootComponent; /** The children to be rendered within the menu item. */
|
|
584
|
+
children?: ReactNode; /** The ref to forward to allow it to be used with polymorphic components */
|
|
585
|
+
ref?: ComponentPropsWithRef<RootComponent>["ref"]; /** A function to execute after clicking the item. */
|
|
586
|
+
onClick?: ComponentProps<RootComponent>["onClick"];
|
|
587
|
+
} & Omit<ComponentPropsWithoutRef<RootComponent>, "children" | "ref"> & MenuItemOwnProps;
|
|
588
|
+
/** Represents a menu item to be used inside the `DropdownMenu`. It must be used as children of the `DropdownMenu` component. */
|
|
589
|
+
declare function DropdownMenuItem$1<RootComponent extends ElementType>({
|
|
590
|
+
component,
|
|
591
|
+
children,
|
|
592
|
+
ref,
|
|
593
|
+
onClick,
|
|
594
|
+
...menuItemProps
|
|
595
|
+
}: DropdownMenuItemProps$1<RootComponent>): _$react_jsx_runtime0.JSX.Element;
|
|
596
|
+
//#endregion
|
|
597
|
+
//#region src/deprecated/DropdownMenu2/DropdownMenu2.d.ts
|
|
598
|
+
declare const useDropdownMenu: typeof useDropdownMenu$1;
|
|
599
|
+
/**
|
|
600
|
+
* @deprecated Please use `DropdownMenuProps` from `@alextheman/components/v7` instead.
|
|
601
|
+
*
|
|
602
|
+
* This will be replaced in the root entrypoint in a future release.
|
|
603
|
+
*/
|
|
604
|
+
type DropdownMenu2Props = DropdownMenuProps$1;
|
|
605
|
+
/**
|
|
606
|
+
* @deprecated Please use `DropdownMenu` from `@alextheman/components/v7` instead.
|
|
607
|
+
*
|
|
608
|
+
* This will be replaced in the root entrypoint in a future release.
|
|
609
|
+
*/
|
|
610
|
+
declare const DropdownMenu2: typeof DropdownMenu$1;
|
|
611
|
+
//#endregion
|
|
612
|
+
//#region src/deprecated/DropdownMenu2/DropdownMenuItem.d.ts
|
|
613
|
+
type DropdownMenuItemProps<RootComponent extends ElementType> = DropdownMenuItemProps$1<RootComponent>;
|
|
614
|
+
declare const DropdownMenuItem: typeof DropdownMenuItem$1;
|
|
615
|
+
//#endregion
|
|
616
|
+
//#region src/deprecated/DropdownMenuExternalLink.d.ts
|
|
617
|
+
interface DropdownMenuExternalLinkProps extends MenuItemOwnProps {
|
|
618
|
+
ref?: Ref<HTMLAnchorElement>;
|
|
619
|
+
href: ComponentProps<typeof ExternalLink>["href"];
|
|
620
|
+
onClick?: MouseEventHandler<HTMLAnchorElement>;
|
|
621
|
+
children: ReactNode;
|
|
622
|
+
}
|
|
623
|
+
/** @deprecated Please use `<DropdownMenuItem component={ExternalLink} />` instead. */
|
|
624
|
+
declare function DropdownMenuExternalLink({
|
|
625
|
+
ref,
|
|
626
|
+
href,
|
|
627
|
+
children,
|
|
628
|
+
onClick,
|
|
629
|
+
...menuItemProps
|
|
630
|
+
}: DropdownMenuExternalLinkProps): _$react_jsx_runtime0.JSX.Element;
|
|
631
|
+
//#endregion
|
|
632
|
+
//#region src/deprecated/DropdownMenuInternalLink.d.ts
|
|
633
|
+
interface DropdownMenuInternalLinkProps extends MenuItemOwnProps {
|
|
634
|
+
ref?: Ref<HTMLAnchorElement>;
|
|
635
|
+
to: ComponentProps<typeof InternalLink>["to"];
|
|
636
|
+
onClick?: MouseEventHandler<HTMLAnchorElement>;
|
|
637
|
+
children: ReactNode;
|
|
638
|
+
}
|
|
639
|
+
/** @deprecated Please use `<DropdownMenuItem component={InternalLink} />` instead. */
|
|
640
|
+
declare function DropdownMenuInternalLink({
|
|
641
|
+
to,
|
|
642
|
+
ref,
|
|
643
|
+
children,
|
|
644
|
+
onClick,
|
|
645
|
+
...menuItemProps
|
|
646
|
+
}: DropdownMenuInternalLinkProps): _$react_jsx_runtime0.JSX.Element;
|
|
647
|
+
//#endregion
|
|
562
648
|
//#region src/deprecated/IconWithPopover.d.ts
|
|
563
649
|
interface IconWithPopoverProps {
|
|
564
650
|
icon?: (OverridableComponent<SvgIconTypeMap<unknown, "svg">> & {
|
|
@@ -612,7 +698,16 @@ declare function PopoverText({
|
|
|
612
698
|
}: PopoverTextProps): _$react_jsx_runtime0.JSX.Element;
|
|
613
699
|
//#endregion
|
|
614
700
|
//#region src/hooks/useHash.d.ts
|
|
615
|
-
|
|
701
|
+
/**
|
|
702
|
+
* Stores changes to the window hash as React state.
|
|
703
|
+
*
|
|
704
|
+
* @template StateType - The type of the hash state.
|
|
705
|
+
*
|
|
706
|
+
* @param initialHash - The initial value of the hash.
|
|
707
|
+
*
|
|
708
|
+
* @returns A tuple containing the hash state, and a updater function to set the hash state.
|
|
709
|
+
*/
|
|
710
|
+
declare function useHash<StateType extends string>(initialHash: StateType | undefined): [StateType, Dispatch<SetStateAction<StateType>>];
|
|
616
711
|
//#endregion
|
|
617
|
-
export { Artwork, CollapsableItem, type CollapsableItemProps, ContextHookOptions, DarkModeToggle, DropdownMenu, DropdownMenu2, type DropdownMenu2Props, DropdownMenuExternalLink,
|
|
712
|
+
export { Artwork, CollapsableItem, type CollapsableItemProps, ContextHookOptions, DarkModeToggle, DropdownMenu, DropdownMenu2, type DropdownMenu2Props, DropdownMenuExternalLink, DropdownMenuInternalLink, DropdownMenuItem, type DropdownMenuItemProps, type DropdownMenuProps, ExternalLink, type ExternalLinkProps, FileInput, FileInputList, type FileInputListProps, type FileInputProps, FileType, IconWithPopover, type IconWithPopoverProps, InternalLink, type InternalLinkProps, ListItemInternalLink, Loader, LoaderData, type LoaderDataProps, LoaderError, type LoaderErrorBaseProps, type LoaderErrorProps, type LoaderErrorPropsWithNullable, type LoaderErrorPropsWithUndefinedOrNull, type LoaderProps, LoaderProvider, type LoaderProviderBaseProps, type LoaderProviderProps, type LoaderProviderPropsWithError, type LoaderProviderPropsWithNoError, ModeProvider, type ModeProviderProps, ModeToggle, type NavItemBottom, type NavMenuItem, NavigationBottom, type NavigationBottomProps, NavigationDrawer, type NavigationDrawerProps, Page, PopoverText, type PopoverTextProps, ReactPlayground, type ReactPlaygroundProps, type ScreenSizeContextValue, type ScreenSizeProps, ScreenSizeProvider, SkeletonRow, type SkeletonRowProps, SnackbarProvider, type SnackbarProviderProps, SubmitButton, type SubmitButtonProps, SwitchWithIcons, type SwitchWithIconsProps, useDropdownMenu, useHash, useMode, useScreenSize, useSnackbar };
|
|
618
713
|
//# sourceMappingURL=index.d.cts.map
|