alepha 0.11.3 → 0.11.5

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/ui.d.ts ADDED
@@ -0,0 +1,683 @@
1
+ import * as _alepha_core0 from "alepha";
2
+ import { Async, TObject } from "alepha";
3
+ import { FormModel, InputField } from "alepha/react/form";
4
+ import * as _alepha_react0 from "alepha/react";
5
+ import { RouterGoOptions, UseActionReturn, UseActiveOptions } from "alepha/react";
6
+ import { ModalsProviderProps } from "@mantine/modals";
7
+ import { AppShellFooterProps, AppShellHeaderProps, AppShellMainProps, AppShellNavbarProps, AppShellProps, AutocompleteProps, ButtonProps, ColorInputProps, ColorSchemeScriptProps, FileInputProps, Flex, FlexProps, MantineBreakpoint, MantineProviderProps, MenuProps, MenuTargetProps, ModalProps, MultiSelectProps, NumberInputProps, PasswordInputProps, SegmentedControlProps, SelectProps, SwitchProps, TableProps, TableTrProps, TagsInputProps, Text, TextInputProps, TextareaProps, ThemeIconProps, TooltipProps } from "@mantine/core";
8
+ import * as react_jsx_runtime9 from "react/jsx-runtime";
9
+ import { ComponentType, ReactNode } from "react";
10
+ import * as _mantine_notifications0 from "@mantine/notifications";
11
+ import { NotificationData, NotificationsProps } from "@mantine/notifications";
12
+ import { DateInputProps, DateTimePickerProps, TimeInputProps } from "@mantine/dates";
13
+ import { NavigationProgressProps } from "@mantine/nprogress";
14
+
15
+ //#region src/utils/parseInput.d.ts
16
+ interface GenericControlProps {
17
+ input: InputField;
18
+ title?: string;
19
+ description?: string;
20
+ icon?: ReactNode;
21
+ }
22
+ //#endregion
23
+ //#region src/components/form/ControlSelect.d.ts
24
+ type SelectValueLabel = string | {
25
+ value: string;
26
+ label: string;
27
+ icon?: string;
28
+ };
29
+ interface ControlSelectProps extends GenericControlProps {
30
+ select?: boolean | SelectProps;
31
+ multi?: boolean | MultiSelectProps;
32
+ tags?: boolean | TagsInputProps;
33
+ autocomplete?: boolean | AutocompleteProps;
34
+ segmented?: boolean | Partial<SegmentedControlProps>;
35
+ loader?: () => Promise<SelectValueLabel[]>;
36
+ }
37
+ /**
38
+ * ControlSelect component for handling Select, MultiSelect, and TagsInput.
39
+ *
40
+ * Features:
41
+ * - Basic Select with enum support
42
+ * - MultiSelect for array of enums
43
+ * - TagsInput for array of strings (no enum)
44
+ * - Future: Lazy loading
45
+ * - Future: Searchable/filterable options
46
+ * - Future: Custom option rendering
47
+ *
48
+ * Automatically detects enum values and array types from schema.
49
+ */
50
+ declare const ControlSelect: (props: ControlSelectProps) => react_jsx_runtime9.JSX.Element | null;
51
+ //#endregion
52
+ //#region src/components/form/Control.d.ts
53
+ interface ControlProps extends GenericControlProps {
54
+ text?: TextInputProps;
55
+ area?: boolean | TextareaProps;
56
+ select?: boolean | Partial<ControlSelectProps>;
57
+ password?: boolean | PasswordInputProps;
58
+ switch?: boolean | SwitchProps;
59
+ number?: boolean | NumberInputProps;
60
+ file?: boolean | FileInputProps;
61
+ color?: boolean | ColorInputProps;
62
+ date?: boolean | DateInputProps;
63
+ datetime?: boolean | DateTimePickerProps;
64
+ time?: boolean | TimeInputProps;
65
+ custom?: ComponentType<CustomControlProps>;
66
+ }
67
+ /**
68
+ * Generic form control that renders the appropriate input based on the schema and props.
69
+ *
70
+ * Supports:
71
+ * - TextInput (with format detection: email, url, tel)
72
+ * - Textarea
73
+ * - NumberInput (for number/integer types)
74
+ * - FileInput
75
+ * - ColorInput (for color format)
76
+ * - Select (for enum types)
77
+ * - Autocomplete
78
+ * - PasswordInput
79
+ * - Switch (for boolean types)
80
+ * - SegmentedControl (for enum types)
81
+ * - DateInput (for date format)
82
+ * - DateTimePicker (for date-time format)
83
+ * - TimeInput (for time format)
84
+ * - Custom component
85
+ *
86
+ * Automatically handles labels, descriptions, error messages, required state, and default icons.
87
+ */
88
+ declare const Control: (_props: ControlProps) => react_jsx_runtime9.JSX.Element | null;
89
+ type CustomControlProps = {
90
+ defaultValue: any;
91
+ onChange: (value: any) => void;
92
+ };
93
+ //#endregion
94
+ //#region src/components/buttons/ActionButton.d.ts
95
+ interface ActionMenuItem {
96
+ /**
97
+ * Menu item type
98
+ */
99
+ type?: "item" | "divider" | "label";
100
+ /**
101
+ * Label text for the menu item
102
+ */
103
+ label?: string | ReactNode;
104
+ /**
105
+ * Icon element to display before the label
106
+ */
107
+ icon?: ReactNode;
108
+ /**
109
+ * Click handler for menu items
110
+ */
111
+ onClick?: () => void;
112
+ /**
113
+ * Href for navigation menu items
114
+ */
115
+ href?: string;
116
+ /**
117
+ * Color for the menu item (e.g., "red" for danger actions)
118
+ */
119
+ color?: string;
120
+ /**
121
+ * Nested submenu items
122
+ */
123
+ children?: ActionMenuItem[];
124
+ /**
125
+ * Whether the menu item is active
126
+ */
127
+ active?: boolean;
128
+ }
129
+ interface ActionMenuConfig {
130
+ /**
131
+ * Array of menu items to display
132
+ */
133
+ items: ActionMenuItem[];
134
+ /**
135
+ * Menu position relative to the button
136
+ */
137
+ position?: "bottom" | "bottom-start" | "bottom-end" | "top" | "top-start" | "top-end" | "left" | "right";
138
+ /**
139
+ * Menu width
140
+ */
141
+ width?: number | string;
142
+ /**
143
+ * Menu shadow
144
+ */
145
+ shadow?: "xs" | "sm" | "md" | "lg" | "xl";
146
+ on?: "hover" | "click";
147
+ targetProps?: MenuTargetProps;
148
+ menuProps?: MenuProps;
149
+ }
150
+ interface ActionCommonProps extends ButtonProps {
151
+ children?: ReactNode;
152
+ textVisibleFrom?: "xs" | "sm" | "md" | "lg" | "xl";
153
+ /**
154
+ * Tooltip to display on hover. Can be a string for simple tooltips
155
+ * or a TooltipProps object for advanced configuration.
156
+ */
157
+ tooltip?: string | TooltipProps;
158
+ /**
159
+ * Menu configuration. When provided, the action will display a dropdown menu.
160
+ */
161
+ menu?: ActionMenuConfig;
162
+ /**
163
+ * If set, a confirmation dialog will be shown before performing the action.
164
+ * If `true`, a default title and message will be used.
165
+ * If a string, it will be used as the message with a default title.
166
+ * If an object, it can contain `title` and `message` properties to customize the dialog.
167
+ */
168
+ confirm?: boolean | string | {
169
+ title?: string;
170
+ message: string;
171
+ };
172
+ /**
173
+ * Icon to display on the left side of the button.
174
+ * If no children are provided, the button will be styled as an icon-only button.
175
+ */
176
+ icon?: ReactNode;
177
+ /**
178
+ * Additional props to pass to the ThemeIcon wrapping the icon.
179
+ */
180
+ themeIconProps?: ThemeIconProps;
181
+ }
182
+ type ActionProps = ActionCommonProps & (ActionNavigationButtonProps | ActionClickButtonProps | ActionSubmitButtonProps | ActionHookButtonProps | {});
183
+ declare const ActionButton: (_props: ActionProps) => react_jsx_runtime9.JSX.Element;
184
+ interface ActionSubmitButtonProps extends ButtonProps {
185
+ form: FormModel<any>;
186
+ }
187
+ interface ActionHookButtonProps extends ButtonProps {
188
+ action: UseActionReturn<any[], any>;
189
+ }
190
+ interface ActionClickButtonProps extends ButtonProps {
191
+ onClick: (e: any) => any;
192
+ }
193
+ interface ActionNavigationButtonProps extends ButtonProps {
194
+ href: string;
195
+ active?: Partial<UseActiveOptions> | false;
196
+ routerGoOptions?: RouterGoOptions;
197
+ classNameActive?: string;
198
+ variantActive?: ButtonProps["variant"];
199
+ target?: string;
200
+ }
201
+ //#endregion
202
+ //#region src/components/buttons/DarkModeButton.d.ts
203
+ interface DarkModeButtonProps {
204
+ mode?: "minimal" | "segmented";
205
+ size?: MantineBreakpoint;
206
+ variant?: "filled" | "light" | "outline" | "default" | "subtle" | "transparent";
207
+ fullWidth?: boolean;
208
+ segmentedProps?: Partial<SegmentedControlProps>;
209
+ actionProps?: Partial<ActionProps>;
210
+ }
211
+ declare const DarkModeButton: (props: DarkModeButtonProps) => react_jsx_runtime9.JSX.Element;
212
+ //#endregion
213
+ //#region src/components/buttons/OmnibarButton.d.ts
214
+ interface OmnibarButtonProps {
215
+ actionProps?: ActionProps;
216
+ collapsed?: boolean;
217
+ }
218
+ declare const OmnibarButton: (props: OmnibarButtonProps) => react_jsx_runtime9.JSX.Element;
219
+ //#endregion
220
+ //#region src/services/DialogService.d.ts
221
+ interface BaseDialogOptions extends Partial<ModalProps> {
222
+ title?: ReactNode;
223
+ message?: ReactNode;
224
+ content?: any;
225
+ }
226
+ interface AlertDialogOptions extends BaseDialogOptions {
227
+ okLabel?: string;
228
+ }
229
+ interface ConfirmDialogOptions extends BaseDialogOptions {
230
+ confirmLabel?: string;
231
+ cancelLabel?: string;
232
+ confirmColor?: string;
233
+ }
234
+ interface PromptDialogOptions extends BaseDialogOptions {
235
+ placeholder?: string;
236
+ defaultValue?: string;
237
+ label?: string;
238
+ required?: boolean;
239
+ submitLabel?: string;
240
+ cancelLabel?: string;
241
+ }
242
+ interface AlertDialogProps {
243
+ options?: AlertDialogOptions;
244
+ onClose: () => void;
245
+ }
246
+ interface ConfirmDialogProps {
247
+ options?: ConfirmDialogOptions;
248
+ onConfirm: (confirmed: boolean) => void;
249
+ }
250
+ interface PromptDialogProps {
251
+ options?: PromptDialogOptions;
252
+ onSubmit: (value: string | null) => void;
253
+ }
254
+ interface DialogServiceOptions {
255
+ default?: Partial<BaseDialogOptions>;
256
+ }
257
+ declare class DialogService {
258
+ readonly options: DialogServiceOptions;
259
+ /**
260
+ * Show an alert dialog with a message
261
+ */
262
+ alert(options?: AlertDialogOptions): Promise<void>;
263
+ /**
264
+ * Show a confirmation dialog that returns a promise
265
+ */
266
+ confirm(options?: ConfirmDialogOptions): Promise<boolean>;
267
+ /**
268
+ * Show a prompt dialog to get user input
269
+ */
270
+ prompt(options?: PromptDialogOptions): Promise<string | null>;
271
+ /**
272
+ * Open a custom dialog with provided content
273
+ */
274
+ open(options?: BaseDialogOptions): string;
275
+ /**
276
+ * Close the currently open dialog or a specific dialog by ID
277
+ */
278
+ close(modalId?: string): void;
279
+ /**
280
+ * Show a JSON editor/viewer dialog
281
+ */
282
+ json(data?: any, options?: BaseDialogOptions): void;
283
+ /**
284
+ * Show a form dialog for structured input
285
+ */
286
+ form(options?: BaseDialogOptions): Promise<any>;
287
+ /**
288
+ * Show a loading/progress dialog with optional progress percentage
289
+ */
290
+ loading(options?: BaseDialogOptions & {
291
+ progress?: number;
292
+ }): void;
293
+ /**
294
+ * Show an image viewer/gallery dialog
295
+ */
296
+ image(src: string | string[], options?: BaseDialogOptions): void;
297
+ }
298
+ //#endregion
299
+ //#region src/components/dialogs/AlertDialog.d.ts
300
+ declare const AlertDialog: ({
301
+ options,
302
+ onClose
303
+ }: AlertDialogProps) => react_jsx_runtime9.JSX.Element;
304
+ //#endregion
305
+ //#region src/components/dialogs/ConfirmDialog.d.ts
306
+ declare const ConfirmDialog: ({
307
+ options,
308
+ onConfirm
309
+ }: ConfirmDialogProps) => react_jsx_runtime9.JSX.Element;
310
+ //#endregion
311
+ //#region src/components/dialogs/PromptDialog.d.ts
312
+ declare const PromptDialog: ({
313
+ options,
314
+ onSubmit
315
+ }: PromptDialogProps) => react_jsx_runtime9.JSX.Element;
316
+ //#endregion
317
+ //#region src/components/form/ControlDate.d.ts
318
+ interface ControlDateProps extends GenericControlProps {
319
+ date?: boolean | DateInputProps;
320
+ datetime?: boolean | DateTimePickerProps;
321
+ time?: boolean | TimeInputProps;
322
+ }
323
+ /**
324
+ * ControlDate component for handling date, datetime, and time inputs.
325
+ *
326
+ * Features:
327
+ * - DateInput for date format
328
+ * - DateTimePicker for date-time format
329
+ * - TimeInput for time format
330
+ *
331
+ * Automatically detects date formats from schema and renders appropriate picker.
332
+ */
333
+ declare const ControlDate: (props: ControlDateProps) => react_jsx_runtime9.JSX.Element | null;
334
+ //#endregion
335
+ //#region src/components/form/TypeForm.d.ts
336
+ interface TypeFormProps<T extends TObject> {
337
+ form: FormModel<T>;
338
+ columns?: number | {
339
+ base?: number;
340
+ xs?: number;
341
+ sm?: number;
342
+ md?: number;
343
+ lg?: number;
344
+ xl?: number;
345
+ };
346
+ children?: (input: FormModel<T>["input"]) => ReactNode;
347
+ controlProps?: Partial<Omit<ControlProps, "input">>;
348
+ skipFormElement?: boolean;
349
+ skipSubmitButton?: boolean;
350
+ submitButtonProps?: Partial<Omit<ActionSubmitButtonProps, "form">>;
351
+ resetButtonProps?: Partial<Omit<ActionSubmitButtonProps, "form">>;
352
+ }
353
+ /**
354
+ * TypeForm component that automatically renders all form inputs based on schema.
355
+ * Uses the Control component to render individual fields and Mantine Grid for responsive layout.
356
+ *
357
+ * @example
358
+ * ```tsx
359
+ * import { t } from "alepha";
360
+ * import { useForm } from "alepha/react/form";
361
+ * import { TypeForm } from "alepha/ui";
362
+ *
363
+ * const form = useForm({
364
+ * schema: t.object({
365
+ * username: t.text(),
366
+ * email: t.text(),
367
+ * age: t.integer(),
368
+ * subscribe: t.boolean(),
369
+ * }),
370
+ * handler: (values) => {
371
+ * console.log(values);
372
+ * },
373
+ * });
374
+ *
375
+ * return <TypeForm form={form} columns={2} />;
376
+ * ```
377
+ */
378
+ declare const TypeForm: <T extends TObject>(props: TypeFormProps<T>) => react_jsx_runtime9.JSX.Element | null;
379
+ //#endregion
380
+ //#region src/components/buttons/LanguageButton.d.ts
381
+ interface LanguageButtonProps {
382
+ languages?: string[];
383
+ actionProps?: ActionProps;
384
+ }
385
+ //#endregion
386
+ //#region src/components/layout/AppBar.d.ts
387
+ type AppBarItem = AppBarElement | AppBarBurger | AppBarDark | AppBarSearch | AppBarLang | AppBarSpacer | AppBarDivider;
388
+ interface AppBarElement {
389
+ position: "left" | "center" | "right";
390
+ element: ReactNode;
391
+ }
392
+ interface AppBarBurger {
393
+ position: "left" | "center" | "right";
394
+ type: "burger";
395
+ }
396
+ interface AppBarDark {
397
+ position: "left" | "center" | "right";
398
+ type: "dark";
399
+ props?: DarkModeButtonProps;
400
+ }
401
+ interface AppBarSearch {
402
+ position: "left" | "center" | "right";
403
+ type: "search";
404
+ props?: OmnibarButtonProps;
405
+ }
406
+ interface AppBarLang {
407
+ position: "left" | "center" | "right";
408
+ type: "lang";
409
+ props?: LanguageButtonProps;
410
+ }
411
+ interface AppBarSpacer {
412
+ position: "left" | "center" | "right";
413
+ type: "spacer";
414
+ }
415
+ interface AppBarDivider {
416
+ position: "left" | "center" | "right";
417
+ type: "divider";
418
+ }
419
+ interface AppBarProps {
420
+ flexProps?: FlexProps;
421
+ items?: AppBarItem[];
422
+ }
423
+ declare const AppBar: (props: AppBarProps) => react_jsx_runtime9.JSX.Element;
424
+ //#endregion
425
+ //#region src/components/layout/Sidebar.d.ts
426
+ interface SidebarProps {
427
+ menu?: SidebarNode[];
428
+ top?: SidebarNode[];
429
+ bottom?: SidebarNode[];
430
+ onItemClick?: (item: SidebarMenuItem) => void;
431
+ onSearchClick?: () => void;
432
+ theme?: SidebarTheme;
433
+ flexProps?: Partial<FlexProps>;
434
+ collapsed?: boolean;
435
+ gap?: MantineBreakpoint;
436
+ }
437
+ declare const Sidebar: (props: SidebarProps) => react_jsx_runtime9.JSX.Element;
438
+ interface SidebarItemProps {
439
+ item: SidebarMenuItem;
440
+ level: number;
441
+ onItemClick?: (item: SidebarMenuItem) => void;
442
+ theme: SidebarTheme;
443
+ }
444
+ interface SidebarItemProps {
445
+ item: SidebarMenuItem;
446
+ level: number;
447
+ onItemClick?: (item: SidebarMenuItem) => void;
448
+ theme: SidebarTheme;
449
+ }
450
+ type SidebarNode = SidebarMenuItem | SidebarSpacer | SidebarDivider | SidebarSearch | SidebarElement | SidebarSection;
451
+ interface SidebarAbstractItem {
452
+ position?: "top" | "bottom";
453
+ }
454
+ interface SidebarElement extends SidebarAbstractItem {
455
+ element: ReactNode;
456
+ }
457
+ interface SidebarSpacer extends SidebarAbstractItem {
458
+ type: "spacer";
459
+ }
460
+ interface SidebarDivider extends SidebarAbstractItem {
461
+ type: "divider";
462
+ }
463
+ interface SidebarSearch extends SidebarAbstractItem {
464
+ type: "search";
465
+ }
466
+ interface SidebarSection extends SidebarAbstractItem {
467
+ type: "section";
468
+ label: string;
469
+ }
470
+ interface SidebarMenuItem extends SidebarAbstractItem {
471
+ label: string | ReactNode;
472
+ description?: string;
473
+ icon?: ReactNode;
474
+ href?: string;
475
+ activeStartsWith?: boolean;
476
+ onClick?: () => void;
477
+ children?: SidebarMenuItem[];
478
+ rightSection?: ReactNode;
479
+ theme?: SidebarButtonTheme;
480
+ actionProps?: ActionProps;
481
+ }
482
+ interface SidebarButtonTheme {
483
+ radius?: MantineBreakpoint;
484
+ size?: MantineBreakpoint;
485
+ }
486
+ interface SidebarTheme {
487
+ button?: SidebarButtonTheme;
488
+ search?: SidebarButtonTheme;
489
+ }
490
+ //#endregion
491
+ //#region src/components/layout/AdminShell.d.ts
492
+ interface AdminShellProps {
493
+ appShellProps?: Partial<AppShellProps>;
494
+ appShellMainProps?: Partial<AppShellMainProps>;
495
+ appShellHeaderProps?: Partial<AppShellHeaderProps>;
496
+ appShellNavbarProps?: Partial<AppShellNavbarProps>;
497
+ appShellFooterProps?: Partial<AppShellFooterProps>;
498
+ sidebarProps?: Partial<SidebarProps>;
499
+ appBarProps?: Partial<AppBarProps>;
500
+ header?: ReactNode;
501
+ footer?: ReactNode;
502
+ children?: ReactNode;
503
+ }
504
+ declare module "alepha" {
505
+ interface State {
506
+ "alepha.ui.sidebar.opened"?: boolean;
507
+ "alepha.ui.sidebar.collapsed"?: boolean;
508
+ }
509
+ }
510
+ declare const AdminShell: (props: AdminShellProps) => react_jsx_runtime9.JSX.Element;
511
+ //#endregion
512
+ //#region src/components/layout/Omnibar.d.ts
513
+ interface OmnibarProps {
514
+ shortcut?: string | string[];
515
+ searchPlaceholder?: string;
516
+ nothingFound?: ReactNode;
517
+ }
518
+ declare const Omnibar: (props: OmnibarProps) => react_jsx_runtime9.JSX.Element;
519
+ //#endregion
520
+ //#region src/components/layout/AlephaMantineProvider.d.ts
521
+ interface AlephaMantineProviderProps {
522
+ children?: ReactNode;
523
+ mantine?: MantineProviderProps;
524
+ colorSchemeScript?: ColorSchemeScriptProps;
525
+ navigationProgress?: NavigationProgressProps;
526
+ notifications?: NotificationsProps;
527
+ modals?: ModalsProviderProps;
528
+ omnibar?: OmnibarProps;
529
+ }
530
+ declare const AlephaMantineProvider: (props: AlephaMantineProviderProps) => react_jsx_runtime9.JSX.Element;
531
+ //#endregion
532
+ //#region src/components/table/DataTable.d.ts
533
+ interface DataTableColumn<T extends object> {
534
+ label: string;
535
+ value: (item: T) => ReactNode;
536
+ }
537
+ interface DataTableProps<T extends object> {
538
+ items: T[] | (() => Async<T[]>);
539
+ columns: {
540
+ [key: string]: DataTableColumn<T>;
541
+ };
542
+ tableProps?: TableProps;
543
+ tableTrProps?: (item: T) => TableTrProps;
544
+ }
545
+ declare const DataTable: <T extends object>(props: DataTableProps<T>) => react_jsx_runtime9.JSX.Element;
546
+ //#endregion
547
+ //#region src/constants/ui.d.ts
548
+ declare const ui: {
549
+ colors: {
550
+ transparent: string;
551
+ background: string;
552
+ surface: string;
553
+ elevated: string;
554
+ };
555
+ };
556
+ //#endregion
557
+ //#region src/hooks/useDialog.d.ts
558
+ /**
559
+ * Use this hook to access the Dialog Service for showing various dialog types.
560
+ *
561
+ * @example
562
+ * const dialog = useDialog();
563
+ * await dialog.alert({ title: "Alert", message: "This is an alert message" });
564
+ * const confirmed = await dialog.confirm({ title: "Confirm", message: "Are you sure?" });
565
+ * const input = await dialog.prompt({ title: "Input", message: "Enter your name:" });
566
+ */
567
+ declare const useDialog: () => DialogService;
568
+ //#endregion
569
+ //#region src/services/ToastService.d.ts
570
+ interface ToastServiceOptions {
571
+ default?: Partial<NotificationData>;
572
+ }
573
+ declare class ToastService {
574
+ protected readonly raw: {
575
+ readonly show: typeof _mantine_notifications0.showNotification;
576
+ readonly hide: typeof _mantine_notifications0.hideNotification;
577
+ readonly update: typeof _mantine_notifications0.updateNotification;
578
+ readonly clean: typeof _mantine_notifications0.cleanNotifications;
579
+ readonly cleanQueue: typeof _mantine_notifications0.cleanNotificationsQueue;
580
+ readonly updateState: typeof _mantine_notifications0.updateNotificationsState;
581
+ };
582
+ readonly options: ToastServiceOptions;
583
+ show(options: NotificationData): void;
584
+ info(options: Partial<NotificationData> | string): void;
585
+ success(options: Partial<NotificationData> | string): void;
586
+ warning(options: Partial<NotificationData> | string): void;
587
+ danger(options: Partial<NotificationData> | string): void;
588
+ }
589
+ //#endregion
590
+ //#region src/hooks/useToast.d.ts
591
+ /**
592
+ * Use this hook to access the Toast Service for showing notifications.
593
+ *
594
+ * @example
595
+ * const toast = useToast();
596
+ * toast.success({ message: "Operation completed successfully!" });
597
+ * toast.error({ title: "Error", message: "Something went wrong" });
598
+ */
599
+ declare const useToast: () => ToastService;
600
+ //#endregion
601
+ //#region src/RootRouter.d.ts
602
+ declare class RootRouter {
603
+ readonly root: _alepha_react0.PageDescriptor<_alepha_react0.PageConfigSchema, any, _alepha_react0.TPropsParentDefault>;
604
+ }
605
+ //#endregion
606
+ //#region src/utils/icons.d.ts
607
+ /**
608
+ * Icon size presets following Mantine's size conventions
609
+ */
610
+ declare const ICON_SIZES: {
611
+ readonly xs: 12;
612
+ readonly sm: 16;
613
+ readonly md: 20;
614
+ readonly lg: 24;
615
+ readonly xl: 28;
616
+ };
617
+ type IconSize = keyof typeof ICON_SIZES;
618
+ /**
619
+ * Get the default icon for an input based on its type, format, or name.
620
+ */
621
+ declare const getDefaultIcon: (params: {
622
+ type?: string;
623
+ format?: string;
624
+ name?: string;
625
+ isEnum?: boolean;
626
+ isArray?: boolean;
627
+ size?: IconSize;
628
+ }) => ReactNode;
629
+ //#endregion
630
+ //#region src/utils/string.d.ts
631
+ /**
632
+ * Capitalizes the first letter of a string.
633
+ *
634
+ * @example
635
+ * capitalize("hello") // "Hello"
636
+ */
637
+ declare const capitalize: (str: string) => string;
638
+ /**
639
+ * Converts a path or identifier string into a pretty display name.
640
+ * Removes slashes and capitalizes the first letter.
641
+ *
642
+ * @example
643
+ * prettyName("/userName") // "UserName"
644
+ * prettyName("email") // "Email"
645
+ */
646
+ declare const prettyName: (name: string) => string;
647
+ //#endregion
648
+ //#region src/index.d.ts
649
+ declare module "typebox" {
650
+ interface TSchemaOptions {
651
+ $control?: Omit<ControlProps, "input">;
652
+ }
653
+ }
654
+ declare module "alepha/react" {
655
+ interface PageDescriptorOptions {
656
+ /**
657
+ * Human-readable title for the page.
658
+ * - for Sidebar navigation
659
+ * - for Omnibar navigation
660
+ * (soon)
661
+ * - for Breadcrumbs
662
+ * - for document title (with AlephaReactHead)
663
+ */
664
+ label?: string;
665
+ /**
666
+ * Optional description of the page.
667
+ */
668
+ description?: string;
669
+ /**
670
+ * Optional icon for the page.
671
+ */
672
+ icon?: ReactNode;
673
+ }
674
+ }
675
+ /**
676
+ * Mantine
677
+ *
678
+ * @module alepha.ui
679
+ */
680
+ declare const AlephaUI: _alepha_core0.Service<_alepha_core0.Module<{}>>;
681
+ //#endregion
682
+ export { ActionButton, type ActionClickButtonProps, type ActionCommonProps, type ActionMenuConfig, type ActionMenuItem, type ActionNavigationButtonProps, type ActionProps, type ActionSubmitButtonProps, AdminShell, AlephaMantineProvider, AlephaUI, AlertDialog, type AlertDialogOptions, type AlertDialogProps, AppBar, type AppBarBurger, type AppBarDark, type AppBarDivider, type AppBarElement, type AppBarItem, type AppBarLang, type AppBarProps, type AppBarSearch, type AppBarSpacer, type BaseDialogOptions, ConfirmDialog, type ConfirmDialogOptions, type ConfirmDialogProps, Control, ControlDate, ControlSelect, DarkModeButton, DataTable, type DataTableColumn, type DataTableProps, DialogService, Flex, ICON_SIZES, IconSize, Omnibar, OmnibarButton, PromptDialog, type PromptDialogOptions, type PromptDialogProps, RootRouter, Sidebar, type SidebarAbstractItem, type SidebarButtonTheme, type SidebarDivider, type SidebarElement, type SidebarItemProps, type SidebarMenuItem, type SidebarNode, type SidebarProps, type SidebarSearch, type SidebarSection, type SidebarSpacer, type SidebarTheme, Text, ToastService, TypeForm, capitalize, getDefaultIcon, prettyName, ui, useDialog, useToast };
683
+ //# sourceMappingURL=index.d.ts.map
package/ui.js ADDED
@@ -0,0 +1 @@
1
+ export * from '@alepha/ui'