@alepha/ui 0.11.4 → 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.
@@ -0,0 +1,3 @@
1
+ import { t as AlephaMantineProvider_default } from "./AlephaMantineProvider-Be0DAazb.js";
2
+
3
+ export { AlephaMantineProvider_default as default };
@@ -147,4 +147,4 @@ var AlephaMantineProvider_default = AlephaMantineProvider;
147
147
 
148
148
  //#endregion
149
149
  export { ToastService as i, Omnibar_default as n, useToast as r, AlephaMantineProvider_default as t };
150
- //# sourceMappingURL=AlephaMantineProvider-CtIV-8MV.mjs.map
150
+ //# sourceMappingURL=AlephaMantineProvider-Be0DAazb.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AlephaMantineProvider-Be0DAazb.js","names":["Omnibar"],"sources":["../src/services/ToastService.tsx","../src/hooks/useToast.ts","../src/components/layout/Omnibar.tsx","../src/components/layout/AlephaMantineProvider.tsx"],"sourcesContent":["import type { NotificationData } from \"@mantine/notifications\";\nimport { notifications } from \"@mantine/notifications\";\nimport {\n IconAlertTriangle,\n IconCheck,\n IconInfoCircle,\n IconX,\n} from \"@tabler/icons-react\";\n\nexport interface ToastServiceOptions {\n default?: Partial<NotificationData>;\n}\n\nexport class ToastService {\n protected readonly raw = notifications;\n\n public readonly options: ToastServiceOptions = {\n default: {\n autoClose: 5000,\n withCloseButton: true,\n position: \"top-center\",\n },\n };\n\n public show(options: NotificationData) {\n notifications.show({\n ...this.options.default,\n ...options,\n });\n }\n\n public info(options: Partial<NotificationData> | string) {\n if (typeof options === \"string\") {\n options = { message: options };\n }\n this.show({\n color: \"blue\",\n icon: <IconInfoCircle size={20} />,\n title: \"Info\",\n message: \"Information notification\",\n ...options,\n });\n }\n\n public success(options: Partial<NotificationData> | string) {\n if (typeof options === \"string\") {\n options = { message: options };\n }\n this.show({\n color: \"green\",\n icon: <IconCheck size={16} />,\n title: \"Success\",\n message: \"Operation completed successfully\",\n ...options,\n });\n }\n\n public warning(options: Partial<NotificationData> | string) {\n if (typeof options === \"string\") {\n options = { message: options };\n }\n this.show({\n color: \"yellow\",\n icon: <IconAlertTriangle size={20} />,\n title: \"Warning\",\n message: \"Please review this warning\",\n ...options,\n });\n }\n\n public danger(options: Partial<NotificationData> | string) {\n if (typeof options === \"string\") {\n options = { message: options };\n }\n this.show({\n color: \"red\",\n icon: <IconX size={20} />,\n title: \"Error\",\n message: \"An error occurred\",\n ...options,\n });\n }\n}\n","import { useInject } from \"@alepha/react\";\nimport { ToastService } from \"../services/ToastService.tsx\";\n\n/**\n * Use this hook to access the Toast Service for showing notifications.\n *\n * @example\n * const toast = useToast();\n * toast.success({ message: \"Operation completed successfully!\" });\n * toast.error({ title: \"Error\", message: \"Something went wrong\" });\n */\nexport const useToast = (): ToastService => {\n return useInject(ToastService);\n};\n","import { useRouter } from \"@alepha/react\";\nimport { Spotlight, type SpotlightActionData } from \"@mantine/spotlight\";\nimport { IconSearch } from \"@tabler/icons-react\";\nimport { type ReactNode, useMemo } from \"react\";\n\nexport interface OmnibarProps {\n shortcut?: string | string[];\n searchPlaceholder?: string;\n nothingFound?: ReactNode;\n}\n\nconst Omnibar = (props: OmnibarProps) => {\n const shortcut = props.shortcut ?? \"mod+K\";\n const searchPlaceholder = props.searchPlaceholder ?? \"Search...\";\n const nothingFound = props.nothingFound ?? \"Nothing found...\";\n const router = useRouter();\n const actions: SpotlightActionData[] = useMemo(\n () =>\n router.concretePages.map((page) => ({\n id: page.name,\n label: page.label ?? page.name,\n description: page.description,\n onClick: () => router.go(page.path ?? page.name),\n leftSection: page.icon,\n })),\n [],\n );\n\n return (\n <Spotlight\n actions={actions}\n shortcut={shortcut}\n limit={10}\n searchProps={{\n leftSection: <IconSearch size={20} />,\n placeholder: searchPlaceholder,\n }}\n nothingFound={nothingFound}\n />\n );\n};\n\nexport default Omnibar;\n","import { NestedView, useEvents } from \"@alepha/react\";\nimport type {\n ColorSchemeScriptProps,\n MantineProviderProps,\n} from \"@mantine/core\";\nimport { ColorSchemeScript, MantineProvider } from \"@mantine/core\";\nimport { ModalsProvider, type ModalsProviderProps } from \"@mantine/modals\";\nimport { Notifications, type NotificationsProps } from \"@mantine/notifications\";\nimport type { NavigationProgressProps } from \"@mantine/nprogress\";\nimport { NavigationProgress, nprogress } from \"@mantine/nprogress\";\nimport type { ReactNode } from \"react\";\nimport { useToast } from \"../../hooks/useToast.ts\";\nimport Omnibar, { type OmnibarProps } from \"./Omnibar.tsx\";\n\nexport interface AlephaMantineProviderProps {\n children?: ReactNode;\n mantine?: MantineProviderProps;\n colorSchemeScript?: ColorSchemeScriptProps;\n navigationProgress?: NavigationProgressProps;\n notifications?: NotificationsProps;\n modals?: ModalsProviderProps;\n omnibar?: OmnibarProps;\n}\n\nconst AlephaMantineProvider = (props: AlephaMantineProviderProps) => {\n const toast = useToast();\n\n useEvents(\n {\n \"react:transition:begin\": () => {\n nprogress.start();\n },\n \"react:transition:end\": () => {\n nprogress.complete();\n },\n \"react:action:error\": () => {\n toast.danger(\"An error occurred while processing your action.\");\n },\n },\n [],\n );\n\n return (\n <>\n <ColorSchemeScript\n defaultColorScheme={props.mantine?.defaultColorScheme}\n {...props.colorSchemeScript}\n />\n <MantineProvider\n {...props.mantine}\n theme={{\n primaryColor: \"gray\",\n primaryShade: {\n light: 9,\n dark: 8,\n },\n cursorType: \"pointer\",\n ...props.mantine?.theme,\n }}\n >\n <Notifications {...props.notifications} />\n <NavigationProgress {...props.navigationProgress} />\n <ModalsProvider {...props.modals}>\n <Omnibar {...props.omnibar} />\n {props.children ?? <NestedView />}\n </ModalsProvider>\n </MantineProvider>\n </>\n );\n};\n\nexport default AlephaMantineProvider;\n"],"mappings":";;;;;;;;;;;AAaA,IAAa,eAAb,MAA0B;CACxB,AAAmB,MAAM;CAEzB,AAAgB,UAA+B,EAC7C,SAAS;EACP,WAAW;EACX,iBAAiB;EACjB,UAAU;EACX,EACF;CAED,AAAO,KAAK,SAA2B;AACrC,gBAAc,KAAK;GACjB,G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,KAAK;GACnB,EAAE,EACL,EAAE,CACH;EAKa;EACV,OAAO;EACP,aAAa;GACX,aAAa,oBAAC,cAAW,MAAM,KAAM;GACrC,aAAa;GACd;EACa;GACd;;AAIN,sBAAe;;;;AClBf,MAAM,yBAAyB,UAAsC;CACnE,MAAM,QAAQ,UAAU;AAExB,WACE;EACE,gCAAgC;AAC9B,aAAU,OAAO;;EAEnB,8BAA8B;AAC5B,aAAU,UAAU;;EAEtB,4BAA4B;AAC1B,SAAM,OAAO,kDAAkD;;EAElE,EACD,EAAE,CACH;AAED,QACE,4CACE,oBAAC;EACC,oBAAoB,MAAM,SAAS;EACnC,GAAI,MAAM;GACV,EACF,qBAAC;EACC,GAAI,MAAM;EACV,OAAO;GACL,cAAc;GACd,cAAc;IACZ,OAAO;IACP,MAAM;IACP;GACD,YAAY;GACZ,GAAG,MAAM,SAAS;GACnB;;GAED,oBAAC,iBAAc,GAAI,MAAM,gBAAiB;GAC1C,oBAAC,sBAAmB,GAAI,MAAM,qBAAsB;GACpD,qBAAC;IAAe,GAAI,MAAM;eACxB,oBAACA,mBAAQ,GAAI,MAAM,UAAW,EAC7B,MAAM,YAAY,oBAAC,eAAa;KAClB;;GACD,IACjB;;AAIP,oCAAe"}
@@ -5,7 +5,7 @@ import * as _alepha_react0 from "@alepha/react";
5
5
  import { RouterGoOptions, UseActionReturn, UseActiveOptions } from "@alepha/react";
6
6
  import { ModalsProviderProps } from "@mantine/modals";
7
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_runtime5 from "react/jsx-runtime";
8
+ import * as react_jsx_runtime9 from "react/jsx-runtime";
9
9
  import { ComponentType, ReactNode } from "react";
10
10
  import * as _mantine_notifications0 from "@mantine/notifications";
11
11
  import { NotificationData, NotificationsProps } from "@mantine/notifications";
@@ -47,7 +47,7 @@ interface ControlSelectProps extends GenericControlProps {
47
47
  *
48
48
  * Automatically detects enum values and array types from schema.
49
49
  */
50
- declare const ControlSelect: (props: ControlSelectProps) => react_jsx_runtime5.JSX.Element | null;
50
+ declare const ControlSelect: (props: ControlSelectProps) => react_jsx_runtime9.JSX.Element | null;
51
51
  //#endregion
52
52
  //#region src/components/form/Control.d.ts
53
53
  interface ControlProps extends GenericControlProps {
@@ -85,7 +85,7 @@ interface ControlProps extends GenericControlProps {
85
85
  *
86
86
  * Automatically handles labels, descriptions, error messages, required state, and default icons.
87
87
  */
88
- declare const Control: (_props: ControlProps) => react_jsx_runtime5.JSX.Element | null;
88
+ declare const Control: (_props: ControlProps) => react_jsx_runtime9.JSX.Element | null;
89
89
  type CustomControlProps = {
90
90
  defaultValue: any;
91
91
  onChange: (value: any) => void;
@@ -180,7 +180,7 @@ interface ActionCommonProps extends ButtonProps {
180
180
  themeIconProps?: ThemeIconProps;
181
181
  }
182
182
  type ActionProps = ActionCommonProps & (ActionNavigationButtonProps | ActionClickButtonProps | ActionSubmitButtonProps | ActionHookButtonProps | {});
183
- declare const ActionButton: (_props: ActionProps) => react_jsx_runtime5.JSX.Element;
183
+ declare const ActionButton: (_props: ActionProps) => react_jsx_runtime9.JSX.Element;
184
184
  interface ActionSubmitButtonProps extends ButtonProps {
185
185
  form: FormModel<any>;
186
186
  }
@@ -208,14 +208,14 @@ interface DarkModeButtonProps {
208
208
  segmentedProps?: Partial<SegmentedControlProps>;
209
209
  actionProps?: Partial<ActionProps>;
210
210
  }
211
- declare const DarkModeButton: (props: DarkModeButtonProps) => react_jsx_runtime5.JSX.Element;
211
+ declare const DarkModeButton: (props: DarkModeButtonProps) => react_jsx_runtime9.JSX.Element;
212
212
  //#endregion
213
213
  //#region src/components/buttons/OmnibarButton.d.ts
214
214
  interface OmnibarButtonProps {
215
215
  actionProps?: ActionProps;
216
216
  collapsed?: boolean;
217
217
  }
218
- declare const OmnibarButton: (props: OmnibarButtonProps) => react_jsx_runtime5.JSX.Element;
218
+ declare const OmnibarButton: (props: OmnibarButtonProps) => react_jsx_runtime9.JSX.Element;
219
219
  //#endregion
220
220
  //#region src/services/DialogService.d.ts
221
221
  interface BaseDialogOptions extends Partial<ModalProps> {
@@ -300,19 +300,19 @@ declare class DialogService {
300
300
  declare const AlertDialog: ({
301
301
  options,
302
302
  onClose
303
- }: AlertDialogProps) => react_jsx_runtime5.JSX.Element;
303
+ }: AlertDialogProps) => react_jsx_runtime9.JSX.Element;
304
304
  //#endregion
305
305
  //#region src/components/dialogs/ConfirmDialog.d.ts
306
306
  declare const ConfirmDialog: ({
307
307
  options,
308
308
  onConfirm
309
- }: ConfirmDialogProps) => react_jsx_runtime5.JSX.Element;
309
+ }: ConfirmDialogProps) => react_jsx_runtime9.JSX.Element;
310
310
  //#endregion
311
311
  //#region src/components/dialogs/PromptDialog.d.ts
312
312
  declare const PromptDialog: ({
313
313
  options,
314
314
  onSubmit
315
- }: PromptDialogProps) => react_jsx_runtime5.JSX.Element;
315
+ }: PromptDialogProps) => react_jsx_runtime9.JSX.Element;
316
316
  //#endregion
317
317
  //#region src/components/form/ControlDate.d.ts
318
318
  interface ControlDateProps extends GenericControlProps {
@@ -330,7 +330,7 @@ interface ControlDateProps extends GenericControlProps {
330
330
  *
331
331
  * Automatically detects date formats from schema and renders appropriate picker.
332
332
  */
333
- declare const ControlDate: (props: ControlDateProps) => react_jsx_runtime5.JSX.Element | null;
333
+ declare const ControlDate: (props: ControlDateProps) => react_jsx_runtime9.JSX.Element | null;
334
334
  //#endregion
335
335
  //#region src/components/form/TypeForm.d.ts
336
336
  interface TypeFormProps<T extends TObject> {
@@ -375,7 +375,7 @@ interface TypeFormProps<T extends TObject> {
375
375
  * return <TypeForm form={form} columns={2} />;
376
376
  * ```
377
377
  */
378
- declare const TypeForm: <T extends TObject>(props: TypeFormProps<T>) => react_jsx_runtime5.JSX.Element | null;
378
+ declare const TypeForm: <T extends TObject>(props: TypeFormProps<T>) => react_jsx_runtime9.JSX.Element | null;
379
379
  //#endregion
380
380
  //#region src/components/buttons/LanguageButton.d.ts
381
381
  interface LanguageButtonProps {
@@ -420,7 +420,7 @@ interface AppBarProps {
420
420
  flexProps?: FlexProps;
421
421
  items?: AppBarItem[];
422
422
  }
423
- declare const AppBar: (props: AppBarProps) => react_jsx_runtime5.JSX.Element;
423
+ declare const AppBar: (props: AppBarProps) => react_jsx_runtime9.JSX.Element;
424
424
  //#endregion
425
425
  //#region src/components/layout/Sidebar.d.ts
426
426
  interface SidebarProps {
@@ -434,7 +434,7 @@ interface SidebarProps {
434
434
  collapsed?: boolean;
435
435
  gap?: MantineBreakpoint;
436
436
  }
437
- declare const Sidebar: (props: SidebarProps) => react_jsx_runtime5.JSX.Element;
437
+ declare const Sidebar: (props: SidebarProps) => react_jsx_runtime9.JSX.Element;
438
438
  interface SidebarItemProps {
439
439
  item: SidebarMenuItem;
440
440
  level: number;
@@ -507,7 +507,7 @@ declare module "@alepha/core" {
507
507
  "alepha.ui.sidebar.collapsed"?: boolean;
508
508
  }
509
509
  }
510
- declare const AdminShell: (props: AdminShellProps) => react_jsx_runtime5.JSX.Element;
510
+ declare const AdminShell: (props: AdminShellProps) => react_jsx_runtime9.JSX.Element;
511
511
  //#endregion
512
512
  //#region src/components/layout/Omnibar.d.ts
513
513
  interface OmnibarProps {
@@ -515,7 +515,7 @@ interface OmnibarProps {
515
515
  searchPlaceholder?: string;
516
516
  nothingFound?: ReactNode;
517
517
  }
518
- declare const Omnibar: (props: OmnibarProps) => react_jsx_runtime5.JSX.Element;
518
+ declare const Omnibar: (props: OmnibarProps) => react_jsx_runtime9.JSX.Element;
519
519
  //#endregion
520
520
  //#region src/components/layout/AlephaMantineProvider.d.ts
521
521
  interface AlephaMantineProviderProps {
@@ -527,7 +527,7 @@ interface AlephaMantineProviderProps {
527
527
  modals?: ModalsProviderProps;
528
528
  omnibar?: OmnibarProps;
529
529
  }
530
- declare const AlephaMantineProvider: (props: AlephaMantineProviderProps) => react_jsx_runtime5.JSX.Element;
530
+ declare const AlephaMantineProvider: (props: AlephaMantineProviderProps) => react_jsx_runtime9.JSX.Element;
531
531
  //#endregion
532
532
  //#region src/components/table/DataTable.d.ts
533
533
  interface DataTableColumn<T extends object> {
@@ -542,7 +542,7 @@ interface DataTableProps<T extends object> {
542
542
  tableProps?: TableProps;
543
543
  tableTrProps?: (item: T) => TableTrProps;
544
544
  }
545
- declare const DataTable: <T extends object>(props: DataTableProps<T>) => react_jsx_runtime5.JSX.Element;
545
+ declare const DataTable: <T extends object>(props: DataTableProps<T>) => react_jsx_runtime9.JSX.Element;
546
546
  //#endregion
547
547
  //#region src/constants/ui.d.ts
548
548
  declare const ui: {
@@ -680,4 +680,4 @@ declare module "@alepha/react" {
680
680
  declare const AlephaUI: _alepha_core0.Service<_alepha_core0.Module<{}>>;
681
681
  //#endregion
682
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.mts.map
683
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/utils/parseInput.ts","../src/components/form/ControlSelect.tsx","../src/components/form/Control.tsx","../src/components/buttons/ActionButton.tsx","../src/components/buttons/DarkModeButton.tsx","../src/components/buttons/OmnibarButton.tsx","../src/services/DialogService.tsx","../src/components/dialogs/AlertDialog.tsx","../src/components/dialogs/ConfirmDialog.tsx","../src/components/dialogs/PromptDialog.tsx","../src/components/form/ControlDate.tsx","../src/components/form/TypeForm.tsx","../src/components/buttons/LanguageButton.tsx","../src/components/layout/AppBar.tsx","../src/components/layout/Sidebar.tsx","../src/components/layout/AdminShell.tsx","../src/components/layout/Omnibar.tsx","../src/components/layout/AlephaMantineProvider.tsx","../src/components/table/DataTable.tsx","../src/constants/ui.ts","../src/hooks/useDialog.ts","../src/services/ToastService.tsx","../src/hooks/useToast.ts","../src/RootRouter.ts","../src/utils/icons.tsx","../src/utils/string.ts","../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;UAkGiB,mBAAA;SACR;;;SAGA;;;;KCjFG,gBAAA;;;;;UAIK,kBAAA,SAA2B;qBACvB;oBACD;mBACD;2BACQ;wBACH,QAAQ;iBAEf,QAAQ;;ADkEzB;;;;AC7EA;AAIA;;;;;;;;cAuBM,aAhBW,EAAA,CAAA,KAAA,EAgBa,kBAhBb,EAAA,GAgB+B,kBAAA,CAAA,GAAA,CAAA,OAAA,GAhB/B,IAAA;;;UCAA,YAAA,SAAqB;SAC7B;mBACU;qBACE,QAAQ;uBACN;qBACF;qBACA;mBACF;oBACC;mBACD;EFyDF,QAAA,CAAA,EAAA,OAAA,GExDM,mBFyDd;mBExDU;WACR,cAAc;;AD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,OrBmEN,CqBnEc,gBrBoEtB,CAAA,GAAA,MAGA,CAAA,EAAA,IAAA;mBqB1DiB,QAAQ;mBAaR,QAAQ;kBAaT,QAAQ;ApBjDjC;;;;;;;;;;;cqBVa,gBAAe;;;cCTf,UAAA;iBACS,cAAA,CAAA,eADC,cAAA,CACD,gBAAA,OAAA,cAAA,CAAA,mBAAA;;;;;;;cCmBT;;;;;;;KAQD,QAAA,gBAAwB;;;;AxBoEnB,cwB/DJ,cxB+DuB,EAAA,CAC3B,MAAA,EAAA;;;;EC9EG,MAAA,CAAA,EAAA,OAAA;EAIK,OAAA,CAAA,EAAA,OAAA;EACI,IAAA,CAAA,EuBeZ,QvBfY;CACD,EAAA,GuBehB,SvBfgB;;;;;;;;;cwBrBP;;;;;;;;;AzB4FI,cyBhFJ,UzBgFuB,EAAA,CAAA,IAC3B,EAAA,MAAA,EAAA,GAGA,MAAA;;;;;e0BbM,KAAK;ExBzDH;;eAEE,eAAA,CAAA;EACU,UAAA,qBAAA,CAAA;IAAR;;;;;;;;IAQF,KAAA,CAAA,EAAA,MAAA;IACM;;;IAZgC,WAAA,CAAA,EAAA,MAAA;IAoCnD;AA6NN;;WwBhLW;;AvBxFX;;;;;AA0CA;AAIS,cuBqDI,QvBrDJ,EuBqDY,aAAA,CAAA,OvBrDZ,CuB+DP,aAAA,CAVmB,MvBrDZ,CAAA,CAAA,CAAA,CAAA,CAAA"}
@@ -1,4 +1,4 @@
1
- import { i as ToastService, n as Omnibar_default, r as useToast, t as AlephaMantineProvider_default } from "./AlephaMantineProvider-CtIV-8MV.mjs";
1
+ import { i as ToastService, n as Omnibar_default, r as useToast, t as AlephaMantineProvider_default } from "./AlephaMantineProvider-Be0DAazb.js";
2
2
  import { $module, TypeBoxError } from "@alepha/core";
3
3
  import { AlephaReactForm, useFormState } from "@alepha/react-form";
4
4
  import { AlephaReactHead } from "@alepha/react-head";
@@ -16,7 +16,7 @@ import { DateInput, DateTimePicker, TimeInput } from "@mantine/dates";
16
16
  var RootRouter = class {
17
17
  root = $page({
18
18
  path: "/",
19
- lazy: () => import("./AlephaMantineProvider-D-vu9aCD.mjs")
19
+ lazy: () => import("./AlephaMantineProvider-Ba88lMeq.js")
20
20
  });
21
21
  };
22
22
 
@@ -1466,4 +1466,4 @@ const AlephaUI = $module({
1466
1466
 
1467
1467
  //#endregion
1468
1468
  export { ActionButton_default as ActionButton, AdminShell_default as AdminShell, AlephaMantineProvider_default as AlephaMantineProvider, AlephaUI, AlertDialog_default as AlertDialog, AppBar_default as AppBar, ConfirmDialog_default as ConfirmDialog, Control_default as Control, ControlDate_default as ControlDate, ControlSelect_default as ControlSelect, DarkModeButton_default as DarkModeButton, DataTable_default as DataTable, DialogService, Flex, ICON_SIZES, Omnibar_default as Omnibar, OmnibarButton_default as OmnibarButton, PromptDialog_default as PromptDialog, RootRouter, Sidebar, Text, ToastService, TypeForm_default as TypeForm, capitalize, getDefaultIcon, prettyName, ui, useDialog, useToast };
1469
- //# sourceMappingURL=index.mjs.map
1469
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["Text","Text","Text","AlertDialog","ConfirmDialog","PromptDialog","menuItemProps: MenuItemProps & ButtonHTMLAttributes<unknown>","icon","Flex","Flex","ActionButton","ActionButton","Flex","Text","inputProps: InputProps","itemsEnum: string[] | undefined","items: any","segmentedControlProps: Partial<SegmentedControlProps>","Flex","data","Flex","ControlSelect","ControlDate","schema: any","Control","Flex","ActionButton","ActionButton","BurgerButton","DarkModeButton","OmnibarButton","LanguageButton","Flex","Flex","OmnibarButton","Text","item","ActionButton","AppBar","ActionButton"],"sources":["../src/RootRouter.ts","../src/components/dialogs/AlertDialog.tsx","../src/components/dialogs/ConfirmDialog.tsx","../src/components/dialogs/PromptDialog.tsx","../src/services/DialogService.tsx","../src/components/buttons/ActionButton.tsx","../src/components/buttons/DarkModeButton.tsx","../src/components/buttons/OmnibarButton.tsx","../src/utils/icons.tsx","../src/utils/string.ts","../src/utils/parseInput.ts","../src/components/form/ControlDate.tsx","../src/components/form/ControlSelect.tsx","../src/components/form/Control.tsx","../src/components/form/TypeForm.tsx","../src/constants/ui.ts","../src/components/buttons/BurgerButton.tsx","../src/components/buttons/LanguageButton.tsx","../src/components/layout/AppBar.tsx","../src/components/layout/Sidebar.tsx","../src/components/layout/AdminShell.tsx","../src/components/table/DataTable.tsx","../src/hooks/useDialog.ts","../src/index.ts"],"sourcesContent":["import { $page } from \"@alepha/react\";\n\nexport class RootRouter {\n public readonly root = $page({\n path: \"/\",\n lazy: () => import(\"./components/layout/AlephaMantineProvider.tsx\"),\n });\n}\n","import { Button, Group, Text } from \"@mantine/core\";\nimport type { AlertDialogProps } from \"../../services/DialogService\";\n\nconst AlertDialog = ({ options, onClose }: AlertDialogProps) => (\n <>\n {options?.message && <Text mb=\"md\">{options.message}</Text>}\n <Group justify=\"flex-end\">\n <Button onClick={onClose}>{options?.okLabel || \"OK\"}</Button>\n </Group>\n </>\n);\n\nexport default AlertDialog;\n","import { Button, Group, Text } from \"@mantine/core\";\nimport type { ConfirmDialogProps } from \"../../services/DialogService\";\n\nconst ConfirmDialog = ({ options, onConfirm }: ConfirmDialogProps) => (\n <>\n {options?.message && <Text mb=\"md\">{options.message}</Text>}\n <Group justify=\"flex-end\">\n <Button variant=\"subtle\" onClick={() => onConfirm(false)}>\n {options?.cancelLabel || \"Cancel\"}\n </Button>\n <Button\n color={options?.confirmColor || \"blue\"}\n onClick={() => onConfirm(true)}\n >\n {options?.confirmLabel || \"Confirm\"}\n </Button>\n </Group>\n </>\n);\n\nexport default ConfirmDialog;\n","import { Button, Group, Text, TextInput } from \"@mantine/core\";\nimport { useEffect, useRef, useState } from \"react\";\nimport type { PromptDialogProps } from \"../../services/DialogService\";\n\nconst PromptDialog = ({ options, onSubmit }: PromptDialogProps) => {\n const [value, setValue] = useState(options?.defaultValue || \"\");\n const inputRef = useRef<HTMLInputElement>(null);\n\n useEffect(() => {\n // autofocus the input when the dialog opens\n inputRef.current?.focus();\n }, []);\n\n const handleSubmit = () => {\n if (!options?.required || value.trim()) {\n onSubmit(value);\n }\n };\n\n const handleKeyDown = (event: React.KeyboardEvent) => {\n if (event.key === \"Enter\") {\n handleSubmit();\n }\n };\n\n return (\n <>\n {options?.message && <Text mb=\"md\">{options.message}</Text>}\n <TextInput\n ref={inputRef}\n label={options?.label}\n placeholder={options?.placeholder}\n value={value}\n onChange={(event) => setValue(event.currentTarget.value)}\n onKeyDown={handleKeyDown}\n required={options?.required}\n mb=\"md\"\n />\n <Group justify=\"flex-end\">\n <Button variant=\"subtle\" onClick={() => onSubmit(null)}>\n {options?.cancelLabel || \"Cancel\"}\n </Button>\n <Button\n onClick={handleSubmit}\n disabled={options?.required && !value.trim()}\n >\n {options?.submitLabel || \"OK\"}\n </Button>\n </Group>\n </>\n );\n};\n\nexport default PromptDialog;\n","import type { ModalProps } from \"@mantine/core\";\nimport { modals } from \"@mantine/modals\";\nimport type { ReactNode } from \"react\";\nimport AlertDialog from \"../components/dialogs/AlertDialog\";\nimport ConfirmDialog from \"../components/dialogs/ConfirmDialog\";\nimport PromptDialog from \"../components/dialogs/PromptDialog\";\n\n// Base interfaces\nexport interface BaseDialogOptions extends Partial<ModalProps> {\n title?: ReactNode;\n message?: ReactNode;\n content?: any; // weird typing for mantine modals content\n}\n\nexport interface AlertDialogOptions extends BaseDialogOptions {\n okLabel?: string;\n}\n\nexport interface ConfirmDialogOptions extends BaseDialogOptions {\n confirmLabel?: string;\n cancelLabel?: string;\n confirmColor?: string;\n}\n\nexport interface PromptDialogOptions extends BaseDialogOptions {\n placeholder?: string;\n defaultValue?: string;\n label?: string;\n required?: boolean;\n submitLabel?: string;\n cancelLabel?: string;\n}\n\n// Component prop interfaces\nexport interface AlertDialogProps {\n options?: AlertDialogOptions;\n onClose: () => void;\n}\n\nexport interface ConfirmDialogProps {\n options?: ConfirmDialogOptions;\n onConfirm: (confirmed: boolean) => void;\n}\n\nexport interface PromptDialogProps {\n options?: PromptDialogOptions;\n onSubmit: (value: string | null) => void;\n}\n\nexport interface DialogServiceOptions {\n default?: Partial<BaseDialogOptions>;\n}\n\nexport class DialogService {\n public readonly options: DialogServiceOptions = {\n default: {\n centered: true,\n withCloseButton: true,\n size: \"md\",\n overlayProps: {\n backgroundOpacity: 0.55,\n blur: 3,\n },\n transitionProps: {\n transition: \"pop\",\n duration: 200,\n },\n },\n };\n\n /**\n * Show an alert dialog with a message\n */\n public alert(options?: AlertDialogOptions): Promise<void> {\n return new Promise((resolve) => {\n const modalId = this.open({\n ...options,\n title: options?.title || \"Alert\",\n content: (\n <AlertDialog\n options={options}\n onClose={() => {\n this.close(modalId);\n resolve();\n }}\n />\n ),\n });\n });\n }\n\n /**\n * Show a confirmation dialog that returns a promise\n */\n public confirm(options?: ConfirmDialogOptions): Promise<boolean> {\n return new Promise((resolve) => {\n const modalId = this.open({\n ...options,\n title: options?.title || \"Confirm\",\n closeOnClickOutside: false,\n closeOnEscape: false,\n content: (\n <ConfirmDialog\n options={options}\n onConfirm={(confirmed) => {\n this.close(modalId);\n resolve(confirmed);\n }}\n />\n ),\n });\n });\n }\n\n /**\n * Show a prompt dialog to get user input\n */\n public prompt(options?: PromptDialogOptions): Promise<string | null> {\n return new Promise((resolve) => {\n const modalId = this.open({\n ...options,\n title: options?.title || \"Input\",\n closeOnClickOutside: false,\n closeOnEscape: false,\n content: (\n <PromptDialog\n options={options}\n onSubmit={(value) => {\n this.close(modalId);\n resolve(value);\n }}\n />\n ),\n });\n });\n }\n\n /**\n * Open a custom dialog with provided content\n */\n public open(options?: BaseDialogOptions): string {\n return modals.open({\n ...this.options.default,\n ...options,\n children: options?.content || options?.message,\n });\n }\n\n /**\n * Close the currently open dialog or a specific dialog by ID\n */\n public close(modalId?: string): void {\n if (modalId) {\n modals.close(modalId);\n } else {\n modals.closeAll();\n }\n }\n\n /**\n * Show a JSON editor/viewer dialog\n */\n public json(data?: any, options?: BaseDialogOptions): void {\n // Implementation to be added\n }\n\n /**\n * Show a form dialog for structured input\n */\n public form(options?: BaseDialogOptions): Promise<any> {\n // Implementation to be added\n return Promise.resolve(null);\n }\n\n /**\n * Show a loading/progress dialog with optional progress percentage\n */\n public loading(options?: BaseDialogOptions & { progress?: number }): void {\n // Implementation to be added\n }\n\n /**\n * Show an image viewer/gallery dialog\n */\n public image(src: string | string[], options?: BaseDialogOptions): void {\n // Implementation to be added\n }\n}\n","import {\n type RouterGoOptions,\n type UseActionReturn,\n type UseActiveOptions,\n useAction,\n useActive,\n useRouter,\n} from \"@alepha/react\";\nimport { type FormModel, useFormState } from \"@alepha/react-form\";\nimport {\n Button,\n type ButtonProps,\n Flex,\n Menu,\n type MenuItemProps,\n type MenuProps,\n type MenuTargetProps,\n ThemeIcon,\n type ThemeIconProps,\n Tooltip,\n type TooltipProps,\n} from \"@mantine/core\";\nimport { IconCheck, IconChevronRight } from \"@tabler/icons-react\";\nimport type { ButtonHTMLAttributes, ReactNode } from \"react\";\n\nexport interface ActionMenuItem {\n /**\n * Menu item type\n */\n type?: \"item\" | \"divider\" | \"label\";\n\n /**\n * Label text for the menu item\n */\n label?: string | ReactNode;\n\n /**\n * Icon element to display before the label\n */\n icon?: ReactNode;\n\n /**\n * Click handler for menu items\n */\n onClick?: () => void;\n\n /**\n * Href for navigation menu items\n */\n href?: string;\n\n /**\n * Color for the menu item (e.g., \"red\" for danger actions)\n */\n color?: string;\n\n /**\n * Nested submenu items\n */\n children?: ActionMenuItem[];\n\n /**\n * Whether the menu item is active\n */\n active?: boolean;\n}\n\nexport interface ActionMenuConfig {\n /**\n * Array of menu items to display\n */\n items: ActionMenuItem[];\n\n /**\n * Menu position relative to the button\n */\n position?:\n | \"bottom\"\n | \"bottom-start\"\n | \"bottom-end\"\n | \"top\"\n | \"top-start\"\n | \"top-end\"\n | \"left\"\n | \"right\";\n\n /**\n * Menu width\n */\n width?: number | string;\n\n /**\n * Menu shadow\n */\n shadow?: \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n\n on?: \"hover\" | \"click\";\n\n targetProps?: MenuTargetProps;\n menuProps?: MenuProps;\n}\n\nexport interface ActionCommonProps extends ButtonProps {\n children?: ReactNode;\n textVisibleFrom?: \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n\n /**\n * Tooltip to display on hover. Can be a string for simple tooltips\n * or a TooltipProps object for advanced configuration.\n */\n tooltip?: string | TooltipProps;\n\n /**\n * Menu configuration. When provided, the action will display a dropdown menu.\n */\n menu?: ActionMenuConfig;\n\n /**\n * If set, a confirmation dialog will be shown before performing the action.\n * If `true`, a default title and message will be used.\n * If a string, it will be used as the message with a default title.\n * If an object, it can contain `title` and `message` properties to customize the dialog.\n */\n confirm?: boolean | string | { title?: string; message: string };\n\n /**\n * Icon to display on the left side of the button.\n * If no children are provided, the button will be styled as an icon-only button.\n */\n icon?: ReactNode;\n\n /**\n * Additional props to pass to the ThemeIcon wrapping the icon.\n */\n themeIconProps?: ThemeIconProps;\n}\n\nexport type ActionProps = ActionCommonProps &\n (\n | ActionNavigationButtonProps\n | ActionClickButtonProps\n | ActionSubmitButtonProps\n | ActionHookButtonProps\n | {}\n );\n\n// ---------------------------------------------------------------------------------------------------------------------\n\n// Helper function to render menu items recursively\nconst ActionMenuItem = (props: {\n item: ActionMenuItem;\n index: number;\n}): ReactNode => {\n const { item, index } = props;\n\n const router = useRouter();\n const action = useAction(\n {\n handler: async (e: any) => {\n await item.onClick?.();\n },\n },\n [item.onClick],\n );\n\n // Render divider\n if (item.type === \"divider\") {\n return <Menu.Divider key={index} />;\n }\n\n // Render label\n if (item.type === \"label\") {\n return <Menu.Label key={index}>{item.label}</Menu.Label>;\n }\n\n // Render submenu if it has children\n if (item.children && item.children.length > 0) {\n return (\n <Menu key={index} trigger=\"hover\" position=\"right-start\" offset={2}>\n <Menu.Target>\n <Menu.Item\n leftSection={item.icon}\n rightSection={<IconChevronRight size={14} />}\n >\n {item.label}\n </Menu.Item>\n </Menu.Target>\n <Menu.Dropdown>\n {item.children.map((child, childIndex) => (\n <ActionMenuItem item={child} index={childIndex} key={childIndex} />\n ))}\n </Menu.Dropdown>\n </Menu>\n );\n }\n\n const menuItemProps: MenuItemProps & ButtonHTMLAttributes<unknown> = {};\n if (props.item.onClick) {\n menuItemProps.onClick = action.run;\n } else if (props.item.href) {\n Object.assign(menuItemProps, router.anchor(props.item.href));\n }\n\n // render regular menu item\n return (\n <Menu.Item\n key={index}\n leftSection={item.icon}\n onClick={item.onClick}\n color={item.color}\n rightSection={\n item.active ? (\n <ThemeIcon size={\"xs\"} variant={\"transparent\"}>\n <IconCheck />\n </ThemeIcon>\n ) : undefined\n }\n {...menuItemProps}\n >\n {item.label}\n </Menu.Item>\n );\n};\n\nconst ActionButton = (_props: ActionProps) => {\n const props = { variant: \"subtle\", ..._props };\n const { tooltip, menu, icon, ...restProps } = props;\n\n if (props.icon) {\n const icon = (\n <ThemeIcon\n w={24} // TODO: make size configurable\n variant={\"transparent\"}\n size={\"sm\"}\n c={\"var(--mantine-color-text)\"}\n {...props.themeIconProps}\n >\n {props.icon}\n </ThemeIcon>\n );\n if (!props.children) {\n restProps.children = icon;\n restProps.p ??= \"xs\";\n } else {\n restProps.leftSection = icon;\n }\n }\n\n if (props.leftSection && !props.children) {\n restProps.className ??= \"mantine-Action-iconOnly\";\n restProps.p ??= \"xs\";\n }\n\n if (props.textVisibleFrom) {\n const { children, textVisibleFrom, leftSection, ...rest } = restProps;\n return (\n <>\n <Flex w={\"100%\"} visibleFrom={textVisibleFrom}>\n <ActionButton\n flex={1}\n {...rest}\n leftSection={leftSection}\n tooltip={tooltip}\n menu={menu}\n >\n {children}\n </ActionButton>\n </Flex>\n <Flex w={\"100%\"} hiddenFrom={textVisibleFrom}>\n <ActionButton px={\"xs\"} {...rest} tooltip={tooltip} menu={menu}>\n {leftSection}\n </ActionButton>\n </Flex>\n </>\n );\n }\n\n const renderAction = () => {\n if (\"href\" in restProps && restProps.href) {\n if (restProps.href.startsWith(\"http\")) {\n return (\n <ActionHrefButton {...restProps} href={restProps.href}>\n {restProps.children}\n </ActionHrefButton>\n );\n }\n return (\n <ActionNavigationButton {...restProps} href={restProps.href}>\n {restProps.children}\n </ActionNavigationButton>\n );\n }\n\n delete (restProps as any).classNameActive;\n delete (restProps as any).variantActive;\n\n if (\"action\" in restProps && restProps.action) {\n return (\n <ActionHookButton {...restProps} action={restProps.action}>\n {restProps.children}\n </ActionHookButton>\n );\n }\n\n if (\"onClick\" in restProps && restProps.onClick) {\n return (\n <ActionClickButton {...restProps} onClick={restProps.onClick}>\n {restProps.children}\n </ActionClickButton>\n );\n }\n\n if (\"form\" in restProps && restProps.form) {\n return (\n <ActionSubmitButton {...restProps} form={restProps.form}>\n {restProps.children}\n </ActionSubmitButton>\n );\n }\n\n return <Button {...(restProps as any)}>{restProps.children}</Button>;\n };\n\n let actionElement = renderAction();\n\n // wrap with Menu if provided\n if (menu) {\n actionElement = (\n <Menu\n position={menu.position || \"bottom-start\"}\n width={menu.width || 200}\n shadow={menu.shadow || \"md\"}\n trigger={menu.on === \"hover\" ? \"hover\" : \"click\"}\n {...menu.menuProps}\n >\n <Menu.Target {...menu.targetProps}>{actionElement}</Menu.Target>\n <Menu.Dropdown>\n {menu.items.map((item, index) => (\n <ActionMenuItem item={item} index={index} key={index} />\n ))}\n </Menu.Dropdown>\n </Menu>\n );\n }\n\n // Wrap with Tooltip if provided\n if (tooltip) {\n const tooltipProps: TooltipProps =\n typeof tooltip === \"string\"\n ? { label: tooltip, children: actionElement }\n : { ...tooltip, children: actionElement };\n\n return <Tooltip {...tooltipProps} />;\n }\n\n return actionElement;\n};\n\nexport default ActionButton;\n\n// ---------------------------------------------------------------------------------------------------------------------\n\n// Action Submit\n\n// ---------------------------------------------------------------------------------------------------------------------\n\nexport interface ActionSubmitButtonProps extends ButtonProps {\n form: FormModel<any>;\n}\n\n/**\n * Action button that submits a form with loading and disabled state handling.\n */\nconst ActionSubmitButton = (props: ActionSubmitButtonProps) => {\n const { form, ...buttonProps } = props;\n const state = useFormState(form);\n return (\n <Button\n {...buttonProps}\n loading={state.loading}\n disabled={state.loading}\n type={\"submit\"}\n >\n {props.children}\n </Button>\n );\n};\n\n// ---------------------------------------------------------------------------------------------------------------------\n\n// Action with useAction Hook\n\n// ---------------------------------------------------------------------------------------------------------------------\n\nexport interface ActionHookButtonProps extends ButtonProps {\n action: UseActionReturn<any[], any>;\n}\n\n/**\n * Action button that integrates with useAction hook return value.\n * Automatically handles loading state and executes the action on click.\n *\n * @example\n * ```tsx\n * const saveAction = useAction({\n * handler: async (data) => {\n * await api.save(data);\n * }\n * }, []);\n *\n * <ActionButton action={saveAction}>\n * Save\n * </ActionButton>\n * ```\n */\nconst ActionHookButton = (props: ActionHookButtonProps) => {\n const { action, ...buttonProps } = props;\n\n return (\n <Button\n {...buttonProps}\n disabled={action.loading || props.disabled}\n loading={action.loading}\n onClick={() => action.run()}\n >\n {props.children}\n </Button>\n );\n};\n\n// ---------------------------------------------------------------------------------------------------------------------\n\n// Action Click\n\n// ---------------------------------------------------------------------------------------------------------------------\n\nexport interface ActionClickButtonProps extends ButtonProps {\n onClick: (e: any) => any;\n}\n\n/**\n * Basic action button that handles click events with loading and error handling.\n *\n * @example\n * ```tsx\n * <ActionButton onClick={() => api.doSomething()}>\n * Do Something\n * </ActionButton>\n * ```\n */\nconst ActionClickButton = (props: ActionClickButtonProps) => {\n const action = useAction(\n {\n handler: async (e: any) => {\n await props.onClick(e);\n },\n },\n [props.onClick],\n );\n\n return (\n <Button\n {...props}\n disabled={action.loading || props.disabled}\n loading={action.loading}\n onClick={action.run}\n >\n {props.children}\n </Button>\n );\n};\n\n// ---------------------------------------------------------------------------------------------------------------------\n\n// Action Navigation\n\n// ---------------------------------------------------------------------------------------------------------------------\n\nexport interface ActionNavigationButtonProps extends ButtonProps {\n href: string;\n active?: Partial<UseActiveOptions> | false;\n routerGoOptions?: RouterGoOptions;\n classNameActive?: string;\n variantActive?: ButtonProps[\"variant\"];\n target?: string;\n}\n\n/**\n * Action for navigation with active state support.\n */\nconst ActionNavigationButton = (props: ActionNavigationButtonProps) => {\n const {\n active: options,\n classNameActive,\n variantActive,\n routerGoOptions,\n ...buttonProps\n } = props;\n const router = useRouter();\n const { isPending, isActive } = useActive(\n options ? { href: props.href, ...options } : { href: props.href },\n );\n const anchorProps = router.anchor(props.href, routerGoOptions);\n\n const className = buttonProps.className || \"\";\n if (isActive && options !== false && classNameActive) {\n buttonProps.className = `${className} ${classNameActive}`.trim();\n }\n\n return (\n <Button\n component={\"a\"}\n loading={isPending}\n {...buttonProps}\n {...anchorProps}\n variant={\n isActive && options !== false\n ? (variantActive ?? \"filled\")\n : (buttonProps.variant ?? \"subtle\")\n }\n >\n {props.children}\n </Button>\n );\n};\n\nconst ActionHrefButton = (props: ActionNavigationButtonProps) => {\n const {\n active: options,\n classNameActive,\n variantActive,\n routerGoOptions,\n target,\n ...buttonProps\n } = props;\n\n return (\n <Button component={\"a\"} target={target} {...buttonProps}>\n {props.children}\n </Button>\n );\n};\n","import {\n Flex,\n type MantineBreakpoint,\n SegmentedControl,\n type SegmentedControlProps,\n useComputedColorScheme,\n useMantineColorScheme,\n} from \"@mantine/core\";\nimport { IconMoon, IconSun } from \"@tabler/icons-react\";\nimport { useEffect, useState } from \"react\";\nimport ActionButton, { type ActionProps } from \"./ActionButton.tsx\";\n\nexport interface DarkModeButtonProps {\n mode?: \"minimal\" | \"segmented\";\n size?: MantineBreakpoint;\n variant?:\n | \"filled\"\n | \"light\"\n | \"outline\"\n | \"default\"\n | \"subtle\"\n | \"transparent\";\n\n fullWidth?: boolean;\n\n segmentedProps?: Partial<SegmentedControlProps>;\n actionProps?: Partial<ActionProps>;\n}\n\nconst DarkModeButton = (props: DarkModeButtonProps) => {\n const { setColorScheme } = useMantineColorScheme();\n const computedColorScheme = useComputedColorScheme(\"light\");\n const [colorScheme, setColorScheme2] = useState(\"default\");\n const mode = props.mode ?? \"minimal\";\n\n useEffect(() => {\n setColorScheme2(computedColorScheme);\n }, [computedColorScheme]);\n\n const toggleColorScheme = () => {\n setColorScheme(computedColorScheme === \"dark\" ? \"light\" : \"dark\");\n };\n\n if (mode === \"segmented\") {\n return (\n <SegmentedControl\n value={colorScheme}\n onChange={(value) => setColorScheme(value as \"light\" | \"dark\")}\n data={[\n {\n value: \"light\",\n label: (\n <Flex h={20} align=\"center\" justify=\"center\">\n <IconSun size={16} />\n </Flex>\n ),\n },\n {\n value: \"dark\",\n label: (\n <Flex h={20} align=\"center\" justify=\"center\">\n <IconMoon size={16} />\n </Flex>\n ),\n },\n ]}\n w={props.fullWidth ? \"100%\" : undefined}\n {...props.segmentedProps}\n />\n );\n }\n\n return (\n <ActionButton\n onClick={toggleColorScheme}\n variant={props.variant ?? \"outline\"}\n size={props.size ?? \"sm\"}\n aria-label=\"Toggle color scheme\"\n px={\"xs\"}\n fullWidth={props.fullWidth ?? false}\n icon={\n colorScheme === \"dark\" ? (\n <IconSun size={20} />\n ) : colorScheme === \"light\" ? (\n <IconMoon size={20} />\n ) : (\n <Flex h={20} w={20} />\n )\n }\n {...props.actionProps}\n />\n );\n};\n\nexport default DarkModeButton;\n","import { Flex, Kbd, Text } from \"@mantine/core\";\nimport { spotlight } from \"@mantine/spotlight\";\nimport { IconSearch } from \"@tabler/icons-react\";\nimport ActionButton, { type ActionProps } from \"./ActionButton.tsx\";\n\nexport interface OmnibarButtonProps {\n actionProps?: ActionProps;\n collapsed?: boolean;\n}\n\nconst OmnibarButton = (props: OmnibarButtonProps) => {\n return (\n <ActionButton\n variant={\"outline\"}\n miw={256}\n onClick={spotlight.open}\n justify={\"space-between\"}\n rightSection={<Kbd size={\"sm\"}>⌘+K</Kbd>}\n radius={\"md\"}\n {...props.actionProps}\n >\n <Flex align={\"center\"} gap={\"xs\"}>\n <IconSearch size={16} color={\"gray\"} />\n <Text size={\"xs\"} c={\"dimmed\"}>\n Search...\n </Text>\n </Flex>\n </ActionButton>\n );\n};\n\nexport default OmnibarButton;\n","import {\n IconAt,\n IconCalendar,\n IconClock,\n IconColorPicker,\n IconFile,\n IconHash,\n IconKey,\n IconLetterCase,\n IconLink,\n IconList,\n IconMail,\n IconPalette,\n IconPhone,\n IconSelector,\n IconToggleLeft,\n} from \"@tabler/icons-react\";\nimport type { ReactNode } from \"react\";\n\n/**\n * Icon size presets following Mantine's size conventions\n */\nexport const ICON_SIZES = {\n xs: 12,\n sm: 16,\n md: 20,\n lg: 24,\n xl: 28,\n} as const;\n\nexport type IconSize = keyof typeof ICON_SIZES;\n\n/**\n * Get the default icon for an input based on its type, format, or name.\n */\nexport const getDefaultIcon = (params: {\n type?: string;\n format?: string;\n name?: string;\n isEnum?: boolean;\n isArray?: boolean;\n size?: IconSize;\n}): ReactNode => {\n const { type, format, name, isEnum, isArray, size = \"sm\" } = params;\n const iconSize = ICON_SIZES[size];\n\n // Format-based icons (highest priority)\n if (format) {\n switch (format) {\n case \"email\":\n return <IconMail size={iconSize} />;\n case \"url\":\n case \"uri\":\n return <IconLink size={iconSize} />;\n case \"tel\":\n case \"phone\":\n return <IconPhone size={iconSize} />;\n case \"date\":\n return <IconCalendar size={iconSize} />;\n case \"date-time\":\n return <IconCalendar size={iconSize} />;\n case \"time\":\n return <IconClock size={iconSize} />;\n case \"color\":\n return <IconColorPicker size={iconSize} />;\n case \"uuid\":\n return <IconKey size={iconSize} />;\n }\n }\n\n // Name-based icons (medium priority)\n if (name) {\n const nameLower = name.toLowerCase();\n if (nameLower.includes(\"password\") || nameLower.includes(\"secret\")) {\n return <IconKey size={iconSize} />;\n }\n if (nameLower.includes(\"email\") || nameLower.includes(\"mail\")) {\n return <IconMail size={iconSize} />;\n }\n if (nameLower.includes(\"url\") || nameLower.includes(\"link\")) {\n return <IconLink size={iconSize} />;\n }\n if (nameLower.includes(\"phone\") || nameLower.includes(\"tel\")) {\n return <IconPhone size={iconSize} />;\n }\n if (nameLower.includes(\"color\")) {\n return <IconPalette size={iconSize} />;\n }\n if (nameLower.includes(\"file\") || nameLower.includes(\"upload\")) {\n return <IconFile size={iconSize} />;\n }\n if (nameLower.includes(\"date\")) {\n return <IconCalendar size={iconSize} />;\n }\n if (nameLower.includes(\"time\")) {\n return <IconClock size={iconSize} />;\n }\n }\n\n // Type-based icons (lowest priority)\n if (isEnum || isArray) {\n return <IconSelector size={iconSize} />;\n }\n\n if (type) {\n switch (type) {\n case \"boolean\":\n return <IconToggleLeft size={iconSize} />;\n case \"number\":\n case \"integer\":\n return <IconHash size={iconSize} />;\n case \"array\":\n return <IconList size={iconSize} />;\n case \"string\":\n return <IconLetterCase size={iconSize} />;\n }\n }\n\n // Default icon\n return <IconAt size={iconSize} />;\n};\n","/**\n * Capitalizes the first letter of a string.\n *\n * @example\n * capitalize(\"hello\") // \"Hello\"\n */\nexport const capitalize = (str: string): string => {\n return str.charAt(0).toUpperCase() + str.slice(1);\n};\n\n/**\n * Converts a path or identifier string into a pretty display name.\n * Removes slashes and capitalizes the first letter.\n *\n * @example\n * prettyName(\"/userName\") // \"UserName\"\n * prettyName(\"email\") // \"Email\"\n */\nexport const prettyName = (name: string): string => {\n return capitalize(name.replaceAll(\"/\", \"\"));\n};\n","import { type TObject, TypeBoxError } from \"@alepha/core\";\nimport type { InputField } from \"@alepha/react-form\";\nimport type { ReactNode } from \"react\";\nimport type { ControlProps } from \"../components/form/Control.tsx\";\nimport { getDefaultIcon } from \"./icons.tsx\";\nimport { prettyName } from \"./string.ts\";\n\nexport const parseInput = (\n props: GenericControlProps,\n form: {\n error?: Error;\n },\n): ControlInput => {\n const disabled = false; // form.loading;\n const id = props.input.props.id;\n const label =\n props.title ??\n (\"title\" in props.input.schema &&\n typeof props.input.schema.title === \"string\"\n ? props.input.schema.title\n : undefined) ??\n prettyName(props.input.path);\n const description =\n props.description ??\n (\"description\" in props.input.schema &&\n typeof props.input.schema.description === \"string\"\n ? props.input.schema.description\n : undefined);\n const error =\n form.error && form.error instanceof TypeBoxError\n ? form.error.value.message\n : undefined;\n\n // Auto-generate icon if not provided\n const icon =\n props.icon ??\n getDefaultIcon({\n type:\n props.input.schema && \"type\" in props.input.schema\n ? String(props.input.schema.type)\n : undefined,\n format:\n props.input.schema &&\n \"format\" in props.input.schema &&\n typeof props.input.schema.format === \"string\"\n ? props.input.schema.format\n : undefined,\n name: props.input.props.name,\n isEnum:\n props.input.schema &&\n \"enum\" in props.input.schema &&\n Boolean(props.input.schema.enum),\n isArray:\n props.input.schema &&\n \"type\" in props.input.schema &&\n props.input.schema.type === \"array\",\n });\n\n const format =\n props.input.schema &&\n \"format\" in props.input.schema &&\n typeof props.input.schema.format === \"string\"\n ? props.input.schema.format\n : undefined;\n\n const required = props.input.required;\n const schema = props.input.schema as TObject & { $control?: ControlProps };\n\n const inputProps: InputProps = {\n label,\n description,\n error,\n required,\n disabled,\n };\n\n if (\"minLength\" in schema && typeof schema.minLength === \"number\") {\n inputProps.minLength = schema.minLength;\n }\n if (\"maxLength\" in schema && typeof schema.maxLength === \"number\") {\n inputProps.maxLength = schema.maxLength;\n }\n if (\"minimum\" in schema && typeof schema.minimum === \"number\") {\n inputProps.minimum = schema.minimum;\n }\n if (\"maximum\" in schema && typeof schema.maximum === \"number\") {\n inputProps.maximum = schema.maximum;\n }\n\n return {\n id,\n icon,\n format,\n schema: props.input.schema as TObject & { $control?: ControlProps },\n inputProps,\n };\n};\n\nexport interface GenericControlProps {\n input: InputField;\n title?: string;\n description?: string;\n icon?: ReactNode;\n}\n\nexport interface ControlInput {\n id?: string;\n icon: ReactNode;\n format?: string;\n schema: TObject & { $control?: ControlProps };\n inputProps: InputProps;\n}\n\nexport interface InputProps {\n label: string;\n description?: string;\n error?: string;\n required: boolean;\n disabled: boolean;\n\n minLength?: number;\n maxLength?: number;\n minimum?: number;\n maximum?: number;\n}\n","import { useFormState } from \"@alepha/react-form\";\nimport {\n DateInput,\n type DateInputProps,\n DateTimePicker,\n type DateTimePickerProps,\n TimeInput,\n type TimeInputProps,\n} from \"@mantine/dates\";\nimport {\n type GenericControlProps,\n parseInput,\n} from \"../../utils/parseInput.ts\";\n\nexport interface ControlDateProps extends GenericControlProps {\n date?: boolean | DateInputProps;\n datetime?: boolean | DateTimePickerProps;\n time?: boolean | TimeInputProps;\n}\n\n/**\n * ControlDate component for handling date, datetime, and time inputs.\n *\n * Features:\n * - DateInput for date format\n * - DateTimePicker for date-time format\n * - TimeInput for time format\n *\n * Automatically detects date formats from schema and renders appropriate picker.\n */\nconst ControlDate = (props: ControlDateProps) => {\n const form = useFormState(props.input);\n const { inputProps, id, icon, format } = parseInput(props, form);\n if (!props.input?.props) {\n return null;\n }\n\n // region <DateTimePicker/>\n if (props.datetime || format === \"date-time\") {\n const dateTimePickerProps =\n typeof props.datetime === \"object\" ? props.datetime : {};\n return (\n <DateTimePicker\n {...inputProps}\n id={id}\n leftSection={icon}\n defaultValue={\n props.input.props.defaultValue\n ? new Date(props.input.props.defaultValue)\n : undefined\n }\n onChange={(value) => {\n props.input.set(value ? new Date(value).toISOString() : undefined);\n }}\n {...dateTimePickerProps}\n />\n );\n }\n //endregion\n\n // region <DateInput/>\n if (props.date || format === \"date\") {\n const dateInputProps = typeof props.date === \"object\" ? props.date : {};\n return (\n <DateInput\n {...inputProps}\n id={id}\n leftSection={icon}\n defaultValue={\n props.input.props.defaultValue\n ? new Date(props.input.props.defaultValue)\n : undefined\n }\n onChange={(value) => {\n props.input.set(\n value ? new Date(value).toISOString().slice(0, 10) : undefined,\n );\n }}\n {...dateInputProps}\n />\n );\n }\n //endregion\n\n // region <TimeInput/>\n if (props.time || format === \"time\") {\n const timeInputProps = typeof props.time === \"object\" ? props.time : {};\n return (\n <TimeInput\n {...inputProps}\n id={id}\n leftSection={icon}\n defaultValue={props.input.props.defaultValue}\n onChange={(event) => {\n props.input.set(event.currentTarget.value);\n }}\n {...timeInputProps}\n />\n );\n }\n //endregion\n\n // Fallback - shouldn't happen\n return null;\n};\n\nexport default ControlDate;\n","import { useFormState } from \"@alepha/react-form\";\nimport {\n Autocomplete,\n type AutocompleteProps,\n Flex,\n Input,\n MultiSelect,\n type MultiSelectProps,\n SegmentedControl,\n type SegmentedControlProps,\n Select,\n type SelectProps,\n TagsInput,\n type TagsInputProps,\n} from \"@mantine/core\";\nimport { useEffect, useState } from \"react\";\nimport {\n type GenericControlProps,\n parseInput,\n} from \"../../utils/parseInput.ts\";\n\nexport type SelectValueLabel =\n | string\n | { value: string; label: string; icon?: string };\n\nexport interface ControlSelectProps extends GenericControlProps {\n select?: boolean | SelectProps;\n multi?: boolean | MultiSelectProps;\n tags?: boolean | TagsInputProps;\n autocomplete?: boolean | AutocompleteProps;\n segmented?: boolean | Partial<SegmentedControlProps>;\n\n loader?: () => Promise<SelectValueLabel[]>;\n}\n\n/**\n * ControlSelect component for handling Select, MultiSelect, and TagsInput.\n *\n * Features:\n * - Basic Select with enum support\n * - MultiSelect for array of enums\n * - TagsInput for array of strings (no enum)\n * - Future: Lazy loading\n * - Future: Searchable/filterable options\n * - Future: Custom option rendering\n *\n * Automatically detects enum values and array types from schema.\n */\nconst ControlSelect = (props: ControlSelectProps) => {\n const form = useFormState(props.input);\n const { inputProps, id, icon } = parseInput(props, form);\n\n // Detect if schema is an array type\n const isArray =\n props.input.schema &&\n \"type\" in props.input.schema &&\n props.input.schema.type === \"array\";\n\n // For arrays, check if items have enum (MultiSelect) or not (TagsInput)\n let itemsEnum: string[] | undefined;\n if (isArray && \"items\" in props.input.schema && props.input.schema.items) {\n const items: any = props.input.schema.items;\n if (\"enum\" in items && Array.isArray(items.enum)) {\n itemsEnum = items.enum;\n }\n }\n\n // Extract enum values from schema (for non-array select)\n const enumValues =\n props.input.schema &&\n \"enum\" in props.input.schema &&\n Array.isArray(props.input.schema.enum)\n ? props.input.schema.enum\n : [];\n\n const [data, setData] = useState<SelectValueLabel[]>([]);\n\n useEffect(() => {\n if (!props.input?.props) {\n return;\n }\n\n if (props.loader) {\n props.loader().then(setData);\n } else {\n setData(enumValues);\n }\n }, [props.input, props.loader]);\n\n if (!props.input?.props) {\n return null;\n }\n\n if (props.segmented) {\n const segmentedControlProps: Partial<SegmentedControlProps> =\n typeof props.segmented === \"object\" ? props.segmented : {};\n\n return (\n <Input.Wrapper {...inputProps}>\n <Flex mt={\"calc(var(--mantine-spacing-xs) / 2)\"}>\n <SegmentedControl\n disabled={inputProps.disabled}\n defaultValue={String(props.input.props.defaultValue)}\n {...segmentedControlProps}\n onChange={(value) => {\n props.input.set(value);\n }}\n data={data.slice(0, 10)}\n />\n </Flex>\n </Input.Wrapper>\n );\n }\n\n if (props.autocomplete) {\n const autocompleteProps =\n typeof props.autocomplete === \"object\" ? props.autocomplete : {};\n\n return (\n <Autocomplete\n {...inputProps}\n id={id}\n leftSection={icon}\n data={data}\n {...props.input.props}\n {...autocompleteProps}\n />\n );\n }\n\n // region <TagsInput/> - for array of strings without enum\n if ((isArray && !itemsEnum) || props.tags) {\n const tagsInputProps = typeof props.tags === \"object\" ? props.tags : {};\n return (\n <TagsInput\n {...inputProps}\n id={id}\n leftSection={icon}\n defaultValue={\n Array.isArray(props.input.props.defaultValue)\n ? props.input.props.defaultValue\n : []\n }\n onChange={(value) => {\n props.input.set(value);\n }}\n {...tagsInputProps}\n />\n );\n }\n // endregion\n\n // region <MultiSelect/> - for array of enums\n if ((isArray && itemsEnum) || props.multi) {\n const data =\n itemsEnum?.map((value: string) => ({\n value,\n label: value,\n })) || [];\n\n const multiSelectProps = typeof props.multi === \"object\" ? props.multi : {};\n\n return (\n <MultiSelect\n {...inputProps}\n id={id}\n leftSection={icon}\n data={data}\n defaultValue={\n Array.isArray(props.input.props.defaultValue)\n ? props.input.props.defaultValue\n : []\n }\n onChange={(value) => {\n props.input.set(value);\n }}\n {...multiSelectProps}\n />\n );\n }\n // endregion\n\n // region <Select/> - for single enum value\n const selectProps = typeof props.select === \"object\" ? props.select : {};\n\n return (\n <Select\n {...inputProps}\n id={id}\n leftSection={icon}\n data={data}\n {...props.input.props}\n {...selectProps}\n />\n );\n // endregion\n};\n\nexport default ControlSelect;\n","import { useFormState } from \"@alepha/react-form\";\nimport {\n ColorInput,\n type ColorInputProps,\n FileInput,\n type FileInputProps,\n Flex,\n Input,\n NumberInput,\n type NumberInputProps,\n PasswordInput,\n type PasswordInputProps,\n Switch,\n type SwitchProps,\n Textarea,\n type TextareaProps,\n TextInput,\n type TextInputProps,\n} from \"@mantine/core\";\nimport type {\n DateInputProps,\n DateTimePickerProps,\n TimeInputProps,\n} from \"@mantine/dates\";\nimport type { ComponentType } from \"react\";\nimport {\n type GenericControlProps,\n parseInput,\n} from \"../../utils/parseInput.ts\";\nimport ControlDate from \"./ControlDate.tsx\";\nimport ControlSelect, { type ControlSelectProps } from \"./ControlSelect.tsx\";\n\nexport interface ControlProps extends GenericControlProps {\n text?: TextInputProps;\n area?: boolean | TextareaProps;\n select?: boolean | Partial<ControlSelectProps>;\n password?: boolean | PasswordInputProps;\n switch?: boolean | SwitchProps;\n number?: boolean | NumberInputProps;\n file?: boolean | FileInputProps;\n color?: boolean | ColorInputProps;\n date?: boolean | DateInputProps;\n datetime?: boolean | DateTimePickerProps;\n time?: boolean | TimeInputProps;\n custom?: ComponentType<CustomControlProps>;\n}\n\n/**\n * Generic form control that renders the appropriate input based on the schema and props.\n *\n * Supports:\n * - TextInput (with format detection: email, url, tel)\n * - Textarea\n * - NumberInput (for number/integer types)\n * - FileInput\n * - ColorInput (for color format)\n * - Select (for enum types)\n * - Autocomplete\n * - PasswordInput\n * - Switch (for boolean types)\n * - SegmentedControl (for enum types)\n * - DateInput (for date format)\n * - DateTimePicker (for date-time format)\n * - TimeInput (for time format)\n * - Custom component\n *\n * Automatically handles labels, descriptions, error messages, required state, and default icons.\n */\nconst Control = (_props: ControlProps) => {\n const form = useFormState(_props.input, [\"error\"]);\n const { inputProps, id, icon, format, schema } = parseInput(_props, form);\n if (!_props.input?.props) {\n return null;\n }\n\n const props = {\n ..._props,\n ...schema.$control,\n };\n\n //region <Custom/>\n if (props.custom) {\n const Custom = props.custom;\n return (\n <Input.Wrapper {...inputProps}>\n <Flex flex={1} mt={\"calc(var(--mantine-spacing-xs) / 2)\"}>\n <Custom\n defaultValue={props.input.props.defaultValue}\n onChange={(value) => {\n props.input.set(value);\n }}\n />\n </Flex>\n </Input.Wrapper>\n );\n }\n //endregion\n\n //region <NumberInput/>\n if (\n props.number ||\n (props.input.schema &&\n \"type\" in props.input.schema &&\n (props.input.schema.type === \"number\" ||\n props.input.schema.type === \"integer\"))\n ) {\n const numberInputProps =\n typeof props.number === \"object\" ? props.number : {};\n const { type, ...inputPropsWithoutType } = props.input.props;\n return (\n <NumberInput\n {...inputProps}\n id={id}\n leftSection={icon}\n {...inputPropsWithoutType}\n {...numberInputProps}\n />\n );\n }\n //endregion\n\n //region <FileInput/>\n if (props.file) {\n const fileInputProps = typeof props.file === \"object\" ? props.file : {};\n return (\n <FileInput\n {...inputProps}\n id={id}\n leftSection={icon}\n onChange={(file) => {\n props.input.set(file);\n }}\n {...fileInputProps}\n />\n );\n }\n //endregion\n\n //region <ColorInput/>\n if (props.color || format === \"color\") {\n const colorInputProps = typeof props.color === \"object\" ? props.color : {};\n return (\n <ColorInput\n {...inputProps}\n id={id}\n leftSection={icon}\n {...props.input.props}\n {...colorInputProps}\n />\n );\n }\n //endregion\n\n //region <ControlSelect/>\n // Handle: single enum, array of enum, array of strings, or explicit select/multi/tags props\n const isEnum =\n props.input.schema &&\n \"enum\" in props.input.schema &&\n props.input.schema.enum;\n const isArray =\n props.input.schema &&\n \"type\" in props.input.schema &&\n props.input.schema.type === \"array\";\n\n if (isEnum || isArray || props.select) {\n const opts = typeof props.select === \"object\" ? props.select : {};\n return (\n <ControlSelect\n input={props.input}\n title={props.title}\n description={props.description}\n icon={icon}\n {...opts}\n />\n );\n }\n //endregion\n\n //region <Switch/>\n if (\n (props.input.schema &&\n \"type\" in props.input.schema &&\n props.input.schema.type === \"boolean\") ||\n props.switch\n ) {\n const switchProps = typeof props.switch === \"object\" ? props.switch : {};\n\n return (\n <Switch\n {...inputProps}\n id={id}\n color={\"blue\"}\n defaultChecked={props.input.props.defaultValue}\n {...props.input.props}\n {...switchProps}\n />\n );\n }\n //endregion\n\n //region <PasswordInput/>\n if (props.password || props.input.props.name?.includes(\"password\")) {\n const passwordInputProps =\n typeof props.password === \"object\" ? props.password : {};\n return (\n <PasswordInput\n {...inputProps}\n id={id}\n leftSection={icon}\n {...props.input.props}\n {...passwordInputProps}\n />\n );\n }\n //endregion\n\n //region <Textarea/>\n if (props.area) {\n const textAreaProps = typeof props.area === \"object\" ? props.area : {};\n return (\n <Textarea\n {...inputProps}\n id={id}\n leftSection={icon}\n {...props.input.props}\n {...textAreaProps}\n />\n );\n }\n //endregion\n\n //region <ControlDate/>\n // Handle: date, date-time, and time formats\n if (\n props.date ||\n props.datetime ||\n props.time ||\n format === \"date\" ||\n format === \"date-time\" ||\n format === \"time\"\n ) {\n return (\n <ControlDate\n input={props.input}\n title={props.title}\n description={props.description}\n icon={icon}\n date={props.date}\n datetime={props.datetime}\n time={props.time}\n />\n );\n }\n //endregion\n\n //region <TextInput/> with format detection\n const textInputProps = typeof props.text === \"object\" ? props.text : {};\n\n // Detect HTML5 input type from format\n const getInputType = (): string | undefined => {\n switch (format) {\n case \"email\":\n return \"email\";\n case \"url\":\n case \"uri\":\n return \"url\";\n case \"tel\":\n case \"phone\":\n return \"tel\";\n default:\n return undefined;\n }\n };\n\n return (\n <TextInput\n {...inputProps}\n id={id}\n leftSection={icon}\n type={getInputType()}\n {...props.input.props}\n {...textInputProps}\n />\n );\n //endregion\n};\n\nexport default Control;\n\nexport type CustomControlProps = {\n defaultValue: any;\n onChange: (value: any) => void;\n};\n","import type { TObject } from \"@alepha/core\";\nimport type { FormModel } from \"@alepha/react-form\";\nimport { Flex, Grid } from \"@mantine/core\";\nimport type { ReactNode } from \"react\";\nimport ActionButton, {\n type ActionSubmitButtonProps,\n} from \"../buttons/ActionButton.tsx\";\nimport Control, { type ControlProps } from \"./Control.tsx\";\n\nexport interface TypeFormProps<T extends TObject> {\n form: FormModel<T>;\n columns?:\n | number\n | {\n base?: number;\n xs?: number;\n sm?: number;\n md?: number;\n lg?: number;\n xl?: number;\n };\n children?: (input: FormModel<T>[\"input\"]) => ReactNode;\n controlProps?: Partial<Omit<ControlProps, \"input\">>;\n skipFormElement?: boolean;\n skipSubmitButton?: boolean;\n submitButtonProps?: Partial<Omit<ActionSubmitButtonProps, \"form\">>;\n resetButtonProps?: Partial<Omit<ActionSubmitButtonProps, \"form\">>;\n}\n\n/**\n * TypeForm component that automatically renders all form inputs based on schema.\n * Uses the Control component to render individual fields and Mantine Grid for responsive layout.\n *\n * @example\n * ```tsx\n * import { t } from \"alepha\";\n * import { useForm } from \"@alepha/react-form\";\n * import { TypeForm } from \"@alepha/ui\";\n *\n * const form = useForm({\n * schema: t.object({\n * username: t.text(),\n * email: t.text(),\n * age: t.integer(),\n * subscribe: t.boolean(),\n * }),\n * handler: (values) => {\n * console.log(values);\n * },\n * });\n *\n * return <TypeForm form={form} columns={2} />;\n * ```\n */\nconst TypeForm = <T extends TObject>(props: TypeFormProps<T>) => {\n const {\n form,\n columns = 3,\n children,\n controlProps,\n skipFormElement = false,\n skipSubmitButton = false,\n submitButtonProps,\n } = props;\n\n if (!form.options?.schema?.properties) {\n return null;\n }\n\n const fieldNames = Object.keys(form.options.schema.properties);\n\n // Filter out unsupported field types (objects only, arrays are now supported)\n const supportedFields = fieldNames.filter((fieldName) => {\n const field = form.input[fieldName as keyof typeof form.input];\n if (!field || typeof field !== \"object\" || !(\"schema\" in field)) {\n return false;\n }\n\n const schema: any = field.schema;\n\n // Skip if it's an object (not supported by Control)\n // Arrays are now supported via ControlSelect (MultiSelect/TagsInput)\n if (\"type\" in schema) {\n if (schema.type === \"object\") {\n return false;\n }\n }\n\n // Check if it has properties (nested object)\n if (\"properties\" in schema && schema.properties) {\n return false;\n }\n\n return true;\n });\n\n // Handle column configuration with defaults: xs=1, sm=2, lg=3\n const colSpan =\n typeof columns === \"number\"\n ? {\n xs: 12,\n sm: 6,\n lg: 12 / columns,\n }\n : {\n base: columns.base ? 12 / columns.base : undefined,\n xs: columns.xs ? 12 / columns.xs : 12,\n sm: columns.sm ? 12 / columns.sm : 6,\n md: columns.md ? 12 / columns.md : undefined,\n lg: columns.lg ? 12 / columns.lg : 4,\n xl: columns.xl ? 12 / columns.xl : undefined,\n };\n\n const renderFields = () => {\n if (children) {\n return <>{children(form.input)}</>;\n }\n\n return (\n <Grid>\n {supportedFields.map((fieldName) => {\n const field = form.input[fieldName as keyof typeof form.input];\n\n // Type guard to ensure field has the expected structure\n if (!field || typeof field !== \"object\" || !(\"schema\" in field)) {\n return null;\n }\n\n return (\n <Grid.Col key={fieldName} span={colSpan}>\n <Control input={field as any} {...controlProps} />\n </Grid.Col>\n );\n })}\n </Grid>\n );\n };\n\n const content = (\n <Flex direction={\"column\"} gap={\"sm\"}>\n {renderFields()}\n {!skipSubmitButton && (\n <Flex>\n <ActionButton form={form} {...submitButtonProps}>\n {submitButtonProps?.children ?? \"Submit\"}\n </ActionButton>\n <button type={\"reset\"}>Reset</button>\n </Flex>\n )}\n </Flex>\n );\n\n if (skipFormElement) {\n return content;\n }\n\n return <form {...form.props}>{content}</form>;\n};\n\nexport default TypeForm;\n","export const ui = {\n colors: {\n transparent: \"transparent\",\n background: \"var(--alepha-background)\",\n surface: \"var(--alepha-surface)\",\n elevated: \"var(--alepha-elevated)\",\n },\n};\n","import { useStore } from \"@alepha/react\";\nimport { Burger, type BurgerProps } from \"@mantine/core\";\n\nexport interface BurgerButtonProps extends BurgerProps {}\n\nconst BurgerButton = (props: BurgerButtonProps) => {\n const [opened, setOpened] = useStore(\"alepha.ui.sidebar.opened\");\n\n return (\n <Burger\n opened={opened}\n onClick={() => setOpened(!opened)}\n hiddenFrom=\"sm\"\n size=\"sm\"\n {...props}\n />\n );\n};\n\nexport default BurgerButton;\n","import { useI18n } from \"@alepha/react-i18n\";\nimport { IconLanguage } from \"@tabler/icons-react\";\nimport ActionButton, { type ActionProps } from \"./ActionButton.tsx\";\n\nexport interface LanguageButtonProps {\n languages?: string[];\n actionProps?: ActionProps;\n}\n\nconst LanguageButton = (props: LanguageButtonProps) => {\n const i18n = useI18n();\n return (\n <ActionButton\n icon={<IconLanguage />}\n variant={\"outline\"}\n menu={{\n items: i18n.languages.map((lang) => ({\n label: i18n.tr(lang),\n onClick: () => i18n.setLang(lang),\n active: i18n.lang === lang,\n })),\n }}\n {...props.actionProps}\n />\n );\n};\n\nexport default LanguageButton;\n","import { Divider, Flex, type FlexProps } from \"@mantine/core\";\nimport type { ReactNode } from \"react\";\nimport BurgerButton from \"../buttons/BurgerButton.tsx\";\nimport DarkModeButton, {\n type DarkModeButtonProps,\n} from \"../buttons/DarkModeButton.tsx\";\nimport LanguageButton, {\n type LanguageButtonProps,\n} from \"../buttons/LanguageButton.tsx\";\nimport OmnibarButton, {\n type OmnibarButtonProps,\n} from \"../buttons/OmnibarButton.tsx\";\n\nexport type AppBarItem =\n | AppBarElement\n | AppBarBurger\n | AppBarDark\n | AppBarSearch\n | AppBarLang\n | AppBarSpacer\n | AppBarDivider;\n\nexport interface AppBarElement {\n position: \"left\" | \"center\" | \"right\";\n element: ReactNode;\n}\n\nexport interface AppBarBurger {\n position: \"left\" | \"center\" | \"right\";\n type: \"burger\";\n}\n\nexport interface AppBarDark {\n position: \"left\" | \"center\" | \"right\";\n type: \"dark\";\n props?: DarkModeButtonProps;\n}\n\nexport interface AppBarSearch {\n position: \"left\" | \"center\" | \"right\";\n type: \"search\";\n props?: OmnibarButtonProps;\n}\n\nexport interface AppBarLang {\n position: \"left\" | \"center\" | \"right\";\n type: \"lang\";\n props?: LanguageButtonProps;\n}\n\nexport interface AppBarSpacer {\n position: \"left\" | \"center\" | \"right\";\n type: \"spacer\";\n}\n\nexport interface AppBarDivider {\n position: \"left\" | \"center\" | \"right\";\n type: \"divider\";\n}\n\nexport interface AppBarProps {\n flexProps?: FlexProps;\n items?: AppBarItem[];\n}\n\nconst AppBar = (props: AppBarProps) => {\n const { items = [] } = props;\n\n const renderItem = (item: AppBarItem, index: number) => {\n if (\"type\" in item) {\n if (item.type === \"burger\") {\n return <BurgerButton key={index} />;\n }\n if (item.type === \"dark\") {\n return <DarkModeButton key={index} {...item.props} />;\n }\n if (item.type === \"search\") {\n return <OmnibarButton key={index} {...item.props} />;\n }\n if (item.type === \"lang\") {\n return <LanguageButton key={index} {...item.props} />;\n }\n if (item.type === \"spacer\") {\n return <Flex key={index} w={16} />;\n }\n if (item.type === \"divider\") {\n return <Divider key={index} orientation=\"vertical\" />;\n }\n }\n if (\"element\" in item) {\n return item.element;\n }\n return null;\n };\n\n const leftItems = items.filter((item) => item.position === \"left\");\n const centerItems = items.filter((item) => item.position === \"center\");\n const rightItems = items.filter((item) => item.position === \"right\");\n\n return (\n <Flex\n h=\"100%\"\n align=\"center\"\n px=\"md\"\n justify=\"space-between\"\n {...props.flexProps}\n >\n <Flex flex={1}>\n {leftItems.map((item, index) => (\n <Flex key={index} ml={index === 0 ? 0 : \"md\"} align=\"center\">\n {renderItem(item, index)}\n </Flex>\n ))}\n </Flex>\n <Flex>\n {centerItems.map((item, index) => (\n <Flex key={index} mx=\"md\" align=\"center\">\n {renderItem(item, index)}\n </Flex>\n ))}\n </Flex>\n <Flex flex={1} gap=\"md\" align={\"center\"} justify={\"end\"}>\n {rightItems.map((item, index) => (\n <Flex key={index} ml={index === 0 ? 0 : \"md\"} align=\"center\">\n {renderItem(item, index)}\n </Flex>\n ))}\n </Flex>\n </Flex>\n );\n};\n\nexport default AppBar;\n","import { useEvents, useRouter } from \"@alepha/react\";\nimport {\n Flex,\n type FlexProps,\n type MantineBreakpoint,\n Text,\n ThemeIcon,\n} from \"@mantine/core\";\nimport {\n IconChevronDown,\n IconChevronRight,\n IconSquareRounded,\n} from \"@tabler/icons-react\";\nimport { type ReactNode, useCallback, useState } from \"react\";\nimport ActionButton, { type ActionProps } from \"../buttons/ActionButton.tsx\";\nimport OmnibarButton from \"../buttons/OmnibarButton.tsx\";\n\nexport interface SidebarProps {\n menu?: SidebarNode[];\n top?: SidebarNode[];\n bottom?: SidebarNode[];\n onItemClick?: (item: SidebarMenuItem) => void;\n onSearchClick?: () => void;\n theme?: SidebarTheme;\n flexProps?: Partial<FlexProps>;\n collapsed?: boolean;\n gap?: MantineBreakpoint;\n}\n\nexport const Sidebar = (props: SidebarProps) => {\n const router = useRouter();\n const { top = [], bottom = [], onItemClick } = props;\n\n const renderNode = (item: SidebarNode, key: number) => {\n if (\"type\" in item) {\n if (item.type === \"spacer\") {\n return <Flex key={key} h={16} />;\n }\n\n if (item.type === \"divider\") {\n return (\n <Flex\n key={key}\n h={1}\n bg={\"var(--alepha-border)\"}\n my={\"md\"}\n mx={\"sm\"}\n />\n );\n }\n\n if (item.type === \"search\") {\n return <OmnibarButton collapsed={props.collapsed} key={key} />;\n }\n\n if (item.type === \"section\") {\n if (props.collapsed) return;\n return (\n <Text\n key={key}\n size={\"xs\"}\n c={\"dimmed\"}\n mt={\"md\"}\n mb={\"xs\"}\n mx={\"sm\"}\n tt={\"uppercase\"}\n fw={\"bold\"}\n >\n {item.label}\n </Text>\n );\n }\n }\n\n if (\"element\" in item) {\n return <Flex key={key}>{item.element}</Flex>;\n }\n\n if (props.collapsed) {\n return (\n <SidebarCollapsedItem\n key={key}\n item={item}\n level={0}\n onItemClick={onItemClick}\n theme={props.theme ?? {}}\n />\n );\n }\n\n return (\n <SidebarItem\n key={key}\n item={item}\n level={0}\n onItemClick={onItemClick}\n theme={props.theme ?? {}}\n />\n );\n };\n\n const padding = \"md\";\n const gap = props.gap;\n const menu =\n props.menu ??\n (router.concretePages.map((page) => ({\n label: page.label ?? page.name,\n description: page.description,\n icon: page.icon,\n href: page.path,\n })) as SidebarMenuItem[]);\n\n return (\n <Flex\n flex={1}\n py={padding}\n direction={\"column\"}\n className={\"overflow-auto\"}\n {...props.flexProps}\n >\n <Flex gap={gap} px={padding} direction={\"column\"}>\n {top.map((item, index) => renderNode(item, index))}\n {menu\n .filter((it) => it.position === \"top\")\n .map((item, index) => renderNode(item, index + top.length))}\n </Flex>\n <Flex\n gap={gap}\n px={padding}\n direction={\"column\"}\n flex={1}\n className={\"overflow-auto\"}\n >\n {menu\n .filter((it) => !it.position)\n .map((item, index) => renderNode(item, index))}\n </Flex>\n <Flex gap={gap} px={padding} direction={\"column\"}>\n {bottom.map((item, index) => renderNode(item, index))}\n {menu\n .filter((it) => it.position === \"bottom\")\n .map((item, index) => renderNode(item, index + bottom.length))}\n </Flex>\n </Flex>\n );\n};\n\n// ---------------------------------------------------------------------------------------------------------------------\n\nexport interface SidebarItemProps {\n item: SidebarMenuItem;\n level: number;\n onItemClick?: (item: SidebarMenuItem) => void;\n theme: SidebarTheme;\n}\n\nexport const SidebarItem = (props: SidebarItemProps) => {\n const { item, level } = props;\n const maxLevel = 2; // 0, 1, 2 = 3 levels total\n\n const router = useRouter();\n const isActive = useCallback((item: SidebarMenuItem): boolean => {\n if (!item.children) return false;\n for (const child of item.children) {\n if (child.href) {\n if (router.isActive(child.href)) {\n return true;\n }\n }\n if (isActive(child)) {\n return true;\n }\n }\n return false;\n }, []);\n\n const [isOpen, setIsOpen] = useState<boolean>(isActive(item));\n\n useEvents(\n {\n \"react:transition:end\": () => {\n // recalculate open state on transition end to ensure correct state after navigation\n if (isActive(item)) {\n setIsOpen(true);\n }\n },\n },\n [],\n );\n\n if (level > maxLevel) return null;\n\n const handleItemClick = (e: MouseEvent) => {\n e.preventDefault();\n if (item.children && item.children.length > 0) {\n setIsOpen(!isOpen);\n } else {\n props.onItemClick?.(item);\n item.onClick?.();\n }\n };\n\n return (\n <Flex direction={\"column\"} ps={level === 0 ? 0 : 32} pos={\"relative\"}>\n <ActionButton\n w={\"100%\"}\n justify=\"space-between\"\n href={props.item.href}\n variant={\"subtle\"}\n size={\n props.item.theme?.size ??\n props.theme.button?.size ??\n (level === 0 ? \"sm\" : \"xs\")\n }\n variantActive={\"default\"}\n radius={props.item.theme?.radius ?? props.theme.button?.radius ?? \"md\"}\n onClick={handleItemClick}\n leftSection={\n <Flex w={\"100%\"} align=\"center\" gap={\"sm\"}>\n {item.icon && (\n <ThemeIcon\n size={level === 0 ? \"sm\" : \"xs\"}\n variant={\"transparent\"}\n >\n {item.icon}\n </ThemeIcon>\n )}\n <Flex direction={\"column\"}>\n <Flex>{item.label}</Flex>\n {item.description && (\n <Text size={\"xs\"} c={\"dimmed\"}>\n {item.description}\n </Text>\n )}\n </Flex>\n </Flex>\n }\n rightSection={\n item.children ? (\n <Flex>\n {isOpen ? (\n <IconChevronDown size={14} />\n ) : (\n <IconChevronRight size={14} />\n )}\n </Flex>\n ) : (\n props.item.rightSection\n )\n }\n {...props.item.actionProps}\n />\n\n {item.children && isOpen && (\n <Flex direction={\"column\"} data-parent-level={level}>\n <Flex\n style={{\n position: \"absolute\",\n width: 1,\n background:\n \"linear-gradient(to bottom, transparent, var(--alepha-border), transparent)\",\n top: 48,\n left: 20 + 32 * level,\n bottom: 16,\n }}\n />\n {item.children.map((child, index) => (\n <SidebarItem\n key={index}\n item={child}\n level={level + 1}\n onItemClick={props.onItemClick}\n theme={props.theme}\n />\n ))}\n </Flex>\n )}\n </Flex>\n );\n};\n\n// ---------------------------------------------------------------------------------------------------------------------\n\nexport interface SidebarItemProps {\n item: SidebarMenuItem;\n level: number;\n onItemClick?: (item: SidebarMenuItem) => void;\n theme: SidebarTheme;\n}\n\nconst SidebarCollapsedItem = (props: SidebarItemProps) => {\n const { item, level } = props;\n\n const router = useRouter();\n const isActive = useCallback((item: SidebarMenuItem): boolean => {\n if (!item.children) return false;\n for (const child of item.children) {\n if (child.href) {\n if (router.isActive(child.href)) {\n return true;\n }\n }\n if (isActive(child)) {\n return true;\n }\n }\n return false;\n }, []);\n\n const [isOpen, setIsOpen] = useState<boolean>(isActive(item));\n\n const handleItemClick = (e: MouseEvent) => {\n e.preventDefault();\n if (item.children && item.children.length > 0) {\n setIsOpen(!isOpen);\n } else {\n props.onItemClick?.(item);\n item.onClick?.();\n }\n };\n\n return (\n <ActionButton\n variant={\"subtle\"}\n size={\n props.item.theme?.size ??\n props.theme.button?.size ??\n (level === 0 ? \"sm\" : \"xs\")\n }\n variantActive={\"default\"}\n radius={props.item.theme?.radius ?? props.theme.button?.radius ?? \"md\"}\n onClick={handleItemClick}\n icon={item.icon ?? <IconSquareRounded />}\n href={props.item.href}\n menu={\n item.children\n ? {\n position: \"right\",\n on: \"hover\",\n items: item.children.map((child) => ({\n label: child.label,\n href: child.href,\n icon: child.icon,\n children: child.children,\n })),\n }\n : undefined\n }\n {...props.item.actionProps}\n />\n );\n};\n\n// ---------------------------------------------------------------------------------------------------------------------\n\nexport type SidebarNode =\n | SidebarMenuItem\n | SidebarSpacer\n | SidebarDivider\n | SidebarSearch\n | SidebarElement\n | SidebarSection;\n\nexport interface SidebarAbstractItem {\n position?: \"top\" | \"bottom\";\n}\n\nexport interface SidebarElement extends SidebarAbstractItem {\n element: ReactNode;\n}\n\nexport interface SidebarSpacer extends SidebarAbstractItem {\n type: \"spacer\";\n}\n\nexport interface SidebarDivider extends SidebarAbstractItem {\n type: \"divider\";\n}\n\nexport interface SidebarSearch extends SidebarAbstractItem {\n type: \"search\";\n}\n\nexport interface SidebarSection extends SidebarAbstractItem {\n type: \"section\";\n label: string;\n}\n\nexport interface SidebarMenuItem extends SidebarAbstractItem {\n label: string | ReactNode;\n description?: string;\n icon?: ReactNode;\n href?: string;\n activeStartsWith?: boolean; // Use startWith matching for active state\n onClick?: () => void;\n children?: SidebarMenuItem[];\n rightSection?: ReactNode;\n theme?: SidebarButtonTheme;\n actionProps?: ActionProps;\n}\n\nexport interface SidebarButtonTheme {\n radius?: MantineBreakpoint;\n size?: MantineBreakpoint;\n}\n\nexport interface SidebarTheme {\n button?: SidebarButtonTheme;\n search?: SidebarButtonTheme;\n}\n","import { NestedView, useEvents, useStore } from \"@alepha/react\";\nimport {\n AppShell,\n type AppShellFooterProps,\n type AppShellHeaderProps,\n type AppShellMainProps,\n type AppShellNavbarProps,\n type AppShellProps,\n} from \"@mantine/core\";\nimport type { ReactNode } from \"react\";\nimport { ui } from \"../../constants/ui.ts\";\nimport AppBar, { type AppBarProps } from \"./AppBar.tsx\";\nimport { Sidebar, type SidebarProps } from \"./Sidebar.tsx\";\n\nexport interface AdminShellProps {\n appShellProps?: Partial<AppShellProps>;\n appShellMainProps?: Partial<AppShellMainProps>;\n appShellHeaderProps?: Partial<AppShellHeaderProps>;\n appShellNavbarProps?: Partial<AppShellNavbarProps>;\n appShellFooterProps?: Partial<AppShellFooterProps>;\n sidebarProps?: Partial<SidebarProps>;\n appBarProps?: Partial<AppBarProps>;\n header?: ReactNode;\n footer?: ReactNode;\n children?: ReactNode;\n}\n\ndeclare module \"@alepha/core\" {\n interface State {\n \"alepha.ui.sidebar.opened\"?: boolean;\n \"alepha.ui.sidebar.collapsed\"?: boolean;\n }\n}\n\nconst AdminShell = (props: AdminShellProps) => {\n const [opened, setOpened] = useStore(\"alepha.ui.sidebar.opened\");\n const [collapsed] = useStore(\n \"alepha.ui.sidebar.collapsed\",\n props.sidebarProps?.collapsed,\n );\n\n useEvents(\n {\n \"react:transition:begin\": () => {\n setOpened(false);\n },\n },\n [],\n );\n\n // Default AppBar items with burger button on the left\n const defaultAppBarItems = [\n { position: \"left\" as const, type: \"burger\" as const },\n ];\n\n return (\n <AppShell\n padding=\"md\"\n header={{ height: 60 }}\n navbar={\n props.sidebarProps !== undefined\n ? {\n width: collapsed ? { base: 72 } : { base: 300 },\n breakpoint: \"sm\",\n collapsed: { mobile: !opened },\n }\n : undefined\n }\n footer={props.footer ? { height: 60 } : undefined}\n {...props.appShellProps}\n >\n <AppShell.Header bg={ui.colors.surface} {...props.appShellHeaderProps}>\n {props.header ?? (\n <AppBar items={defaultAppBarItems} {...props.appBarProps} />\n )}\n </AppShell.Header>\n\n {props.sidebarProps !== undefined && (\n <AppShell.Navbar bg={ui.colors.surface} {...props.appShellNavbarProps}>\n <Sidebar collapsed={collapsed} {...props.sidebarProps} />\n </AppShell.Navbar>\n )}\n\n <AppShell.Main {...props.appShellMainProps}>\n {props.children ?? <NestedView />}\n </AppShell.Main>\n\n {props.footer && (\n <AppShell.Footer bg={ui.colors.surface} {...props.appShellFooterProps}>\n {props.footer}\n </AppShell.Footer>\n )}\n </AppShell>\n );\n};\n\nexport default AdminShell;\n","import type { Async } from \"@alepha/core\";\nimport type { TableTrProps } from \"@mantine/core\";\nimport { Table, type TableProps } from \"@mantine/core\";\nimport { type ReactNode, useEffect, useState } from \"react\";\nimport ActionButton from \"../buttons/ActionButton.tsx\";\n\nexport interface DataTableColumn<T extends object> {\n label: string;\n value: (item: T) => ReactNode;\n}\n\nexport interface DataTableProps<T extends object> {\n items: T[] | (() => Async<T[]>);\n columns: {\n [key: string]: DataTableColumn<T>;\n };\n tableProps?: TableProps;\n tableTrProps?: (item: T) => TableTrProps;\n}\n\nconst DataTable = <T extends object>(props: DataTableProps<T>) => {\n const [items, setItems] = useState<object[]>(\n typeof props.items === \"function\" ? [] : props.items,\n );\n\n useEffect(() => {\n if (typeof props.items !== \"function\") {\n setItems(props.items);\n }\n }, [props.items]);\n\n const head = Object.entries(props.columns).map(([key, col]) => (\n <Table.Th key={key}>\n <ActionButton justify={\"space-between\"} radius={0} fullWidth size={\"xs\"}>\n {col.label}\n </ActionButton>\n </Table.Th>\n ));\n\n const rows = items.map((item, index) => {\n const trProps = props.tableTrProps\n ? props.tableTrProps(item as T)\n : ({} as TableTrProps);\n return (\n <Table.Tr key={JSON.stringify(item)} {...trProps}>\n {Object.entries(props.columns).map(([key, col]) => (\n <Table.Td key={key}>{col.value(item as T)}</Table.Td>\n ))}\n </Table.Tr>\n );\n });\n\n return (\n <Table {...props.tableProps}>\n <Table.Thead>\n <Table.Tr>{head}</Table.Tr>\n </Table.Thead>\n <Table.Tbody>{rows}</Table.Tbody>\n </Table>\n );\n};\n\nexport default DataTable;\n","import { useInject } from \"@alepha/react\";\nimport { DialogService } from \"../services/DialogService.tsx\";\n\n/**\n * Use this hook to access the Dialog Service for showing various dialog types.\n *\n * @example\n * const dialog = useDialog();\n * await dialog.alert({ title: \"Alert\", message: \"This is an alert message\" });\n * const confirmed = await dialog.confirm({ title: \"Confirm\", message: \"Are you sure?\" });\n * const input = await dialog.prompt({ title: \"Input\", message: \"Enter your name:\" });\n */\nexport const useDialog = (): DialogService => {\n return useInject(DialogService);\n};\n","import { $module } from \"@alepha/core\";\nimport { AlephaReactForm } from \"@alepha/react-form\";\nimport { AlephaReactHead } from \"@alepha/react-head\";\nimport { AlephaReactI18n } from \"@alepha/react-i18n\";\nimport type { ReactNode } from \"react\";\nimport type { ControlProps } from \"./components/form/Control.tsx\";\nimport { RootRouter } from \"./RootRouter.ts\";\nimport { DialogService } from \"./services/DialogService.tsx\";\nimport { ToastService } from \"./services/ToastService.tsx\";\n\n// ---------------------------------------------------------------------------------------------------------------------\n\nexport { Flex, Text } from \"@mantine/core\";\nexport type {\n ActionClickButtonProps,\n ActionCommonProps,\n ActionMenuConfig,\n ActionMenuItem,\n ActionNavigationButtonProps,\n ActionProps,\n ActionSubmitButtonProps,\n} from \"./components/buttons/ActionButton.tsx\";\nexport { default as ActionButton } from \"./components/buttons/ActionButton.tsx\";\nexport { default as DarkModeButton } from \"./components/buttons/DarkModeButton.tsx\";\nexport { default as OmnibarButton } from \"./components/buttons/OmnibarButton.tsx\";\nexport { default as AlertDialog } from \"./components/dialogs/AlertDialog.tsx\";\nexport { default as ConfirmDialog } from \"./components/dialogs/ConfirmDialog.tsx\";\nexport { default as PromptDialog } from \"./components/dialogs/PromptDialog.tsx\";\nexport { default as Control } from \"./components/form/Control.tsx\";\nexport { default as ControlDate } from \"./components/form/ControlDate.tsx\";\nexport { default as ControlSelect } from \"./components/form/ControlSelect.tsx\";\nexport { default as TypeForm } from \"./components/form/TypeForm.tsx\";\nexport { default as AdminShell } from \"./components/layout/AdminShell.tsx\";\nexport { default as AlephaMantineProvider } from \"./components/layout/AlephaMantineProvider.tsx\";\nexport type {\n AppBarBurger,\n AppBarDark,\n AppBarDivider,\n AppBarElement,\n AppBarItem,\n AppBarLang,\n AppBarProps,\n AppBarSearch,\n AppBarSpacer,\n} from \"./components/layout/AppBar.tsx\";\nexport { default as AppBar } from \"./components/layout/AppBar.tsx\";\nexport { default as Omnibar } from \"./components/layout/Omnibar.tsx\";\nexport type {\n SidebarAbstractItem,\n SidebarButtonTheme,\n SidebarDivider,\n SidebarElement,\n SidebarItemProps,\n SidebarMenuItem,\n SidebarNode,\n SidebarProps,\n SidebarSearch,\n SidebarSection,\n SidebarSpacer,\n SidebarTheme,\n} from \"./components/layout/Sidebar.tsx\";\nexport { Sidebar } from \"./components/layout/Sidebar.tsx\";\nexport type {\n DataTableColumn,\n DataTableProps,\n} from \"./components/table/DataTable.tsx\";\nexport { default as DataTable } from \"./components/table/DataTable.tsx\";\nexport * from \"./constants/ui.ts\";\nexport { useDialog } from \"./hooks/useDialog.ts\";\nexport { useToast } from \"./hooks/useToast.ts\";\nexport * from \"./RootRouter.ts\";\nexport type {\n AlertDialogOptions,\n AlertDialogProps,\n BaseDialogOptions,\n ConfirmDialogOptions,\n ConfirmDialogProps,\n PromptDialogOptions,\n PromptDialogProps,\n} from \"./services/DialogService.tsx\";\nexport { DialogService } from \"./services/DialogService.tsx\";\nexport { ToastService } from \"./services/ToastService.tsx\";\nexport * from \"./utils/icons.tsx\";\nexport * from \"./utils/string.ts\";\n\n// ---------------------------------------------------------------------------------------------------------------------\n\ndeclare module \"typebox\" {\n interface TSchemaOptions {\n $control?: Omit<ControlProps, \"input\">;\n }\n}\n\ndeclare module \"@alepha/react\" {\n interface PageDescriptorOptions {\n /**\n * Human-readable title for the page.\n * - for Sidebar navigation\n * - for Omnibar navigation\n * (soon)\n * - for Breadcrumbs\n * - for document title (with AlephaReactHead)\n */\n label?: string;\n\n /**\n * Optional description of the page.\n */\n description?: string;\n\n /**\n * Optional icon for the page.\n */\n icon?: ReactNode;\n }\n}\n\n// ---------------------------------------------------------------------------------------------------------------------\n\n/**\n * Mantine\n *\n * @module alepha.ui\n */\nexport const AlephaUI = $module({\n name: \"alepha.ui\",\n services: [DialogService, ToastService, RootRouter],\n register: (alepha) => {\n alepha.with(AlephaReactI18n);\n alepha.with(AlephaReactHead);\n alepha.with(AlephaReactForm);\n alepha.with(DialogService);\n alepha.with(ToastService);\n },\n});\n"],"mappings":";;;;;;;;;;;;;;;AAEA,IAAa,aAAb,MAAwB;CACtB,AAAgB,OAAO,MAAM;EAC3B,MAAM;EACN,YAAY,OAAO;EACpB,CAAC;;;;;ACHJ,MAAM,eAAe,EAAE,SAAS,cAC9B,4CACG,SAAS,WAAW,oBAACA;CAAK,IAAG;WAAM,QAAQ;EAAe,EAC3D,oBAAC;CAAM,SAAQ;WACb,oBAAC;EAAO,SAAS;YAAU,SAAS,WAAW;GAAc;EACvD,IACP;AAGL,0BAAe;;;;ACTf,MAAM,iBAAiB,EAAE,SAAS,gBAChC,4CACG,SAAS,WAAW,oBAACC;CAAK,IAAG;WAAM,QAAQ;EAAe,EAC3D,qBAAC;CAAM,SAAQ;YACb,oBAAC;EAAO,SAAQ;EAAS,eAAe,UAAU,MAAM;YACrD,SAAS,eAAe;GAClB,EACT,oBAAC;EACC,OAAO,SAAS,gBAAgB;EAChC,eAAe,UAAU,KAAK;YAE7B,SAAS,gBAAgB;GACnB;EACH,IACP;AAGL,4BAAe;;;;AChBf,MAAM,gBAAgB,EAAE,SAAS,eAAkC;CACjE,MAAM,CAAC,OAAO,YAAY,SAAS,SAAS,gBAAgB,GAAG;CAC/D,MAAM,WAAW,OAAyB,KAAK;AAE/C,iBAAgB;AAEd,WAAS,SAAS,OAAO;IACxB,EAAE,CAAC;CAEN,MAAM,qBAAqB;AACzB,MAAI,CAAC,SAAS,YAAY,MAAM,MAAM,CACpC,UAAS,MAAM;;CAInB,MAAM,iBAAiB,UAA+B;AACpD,MAAI,MAAM,QAAQ,QAChB,eAAc;;AAIlB,QACE;EACG,SAAS,WAAW,oBAACC;GAAK,IAAG;aAAM,QAAQ;IAAe;EAC3D,oBAAC;GACC,KAAK;GACL,OAAO,SAAS;GAChB,aAAa,SAAS;GACf;GACP,WAAW,UAAU,SAAS,MAAM,cAAc,MAAM;GAC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MAAM;GAA8B,GAAI;aACtC,OAAO,QAAQ,MAAM,QAAQ,CAAC,KAAK,CAAC,KAAK,SACxC,oBAAC,MAAM,gBAAc,IAAI,MAAM,KAAU,IAA1B,IAAsC,CACrD;KAHW,KAAK,UAAU,KAAK,CAIxB;GAEb;AAEF,QACE,qBAAC;EAAM,GAAI,MAAM;aACf,oBAAC,MAAM,mBACL,oBAAC,MAAM,gBAAI,OAAgB,GACf,EACd,oBAAC,MAAM,mBAAO,OAAmB;GAC3B;;AAIZ,wBAAe;;;;;;;;;;;;;AClDf,MAAa,kBAAiC;AAC5C,QAAO,UAAU,cAAc;;;;;;;;;;AC+GjC,MAAa,WAAW,QAAQ;CAC9B,MAAM;CACN,UAAU;EAAC;EAAe;EAAc;EAAW;CACnD,WAAW,WAAW;AACpB,SAAO,KAAK,gBAAgB;AAC5B,SAAO,KAAK,gBAAgB;AAC5B,SAAO,KAAK,gBAAgB;AAC5B,SAAO,KAAK,cAAc;AAC1B,SAAO,KAAK,aAAa;;CAE5B,CAAC"}
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "mantine"
7
7
  ],
8
8
  "author": "Feunard",
9
- "version": "0.11.4",
9
+ "version": "0.11.5",
10
10
  "type": "module",
11
11
  "engines": {
12
12
  "node": ">=22.0.0"
@@ -20,12 +20,12 @@
20
20
  "src"
21
21
  ],
22
22
  "dependencies": {
23
- "@alepha/core": "0.11.4",
24
- "@alepha/react": "0.11.4",
25
- "@alepha/react-form": "0.11.4",
26
- "@alepha/react-head": "0.11.4",
27
- "@alepha/react-i18n": "0.11.4",
28
- "@alepha/server": "0.11.4",
23
+ "@alepha/core": "0.11.5",
24
+ "@alepha/react": "0.11.5",
25
+ "@alepha/react-form": "0.11.5",
26
+ "@alepha/react-head": "0.11.5",
27
+ "@alepha/react-i18n": "0.11.5",
28
+ "@alepha/server": "0.11.5",
29
29
  "@mantine/core": "^8.3.6",
30
30
  "@mantine/dates": "^8.3.6",
31
31
  "@mantine/hooks": "^8.3.6",
@@ -37,8 +37,8 @@
37
37
  "dayjs": "^1.11.19"
38
38
  },
39
39
  "devDependencies": {
40
- "@alepha/cli": "0.11.4",
41
- "@alepha/vite": "0.11.4",
40
+ "@alepha/cli": "0.11.5",
41
+ "@alepha/vite": "0.11.5",
42
42
  "@biomejs/biome": "^2.3.3",
43
43
  "react": "^19.2.0",
44
44
  "react-dom": "^19.2.0",
@@ -1 +0,0 @@
1
- {"version":3,"file":"AlephaMantineProvider-CtIV-8MV.mjs","names":["Omnibar"],"sources":["../src/services/ToastService.tsx","../src/hooks/useToast.ts","../src/components/layout/Omnibar.tsx","../src/components/layout/AlephaMantineProvider.tsx"],"sourcesContent":["import type { NotificationData } from \"@mantine/notifications\";\nimport { notifications } from \"@mantine/notifications\";\nimport {\n IconAlertTriangle,\n IconCheck,\n IconInfoCircle,\n IconX,\n} from \"@tabler/icons-react\";\n\nexport interface ToastServiceOptions {\n default?: Partial<NotificationData>;\n}\n\nexport class ToastService {\n protected readonly raw = notifications;\n\n public readonly options: ToastServiceOptions = {\n default: {\n autoClose: 5000,\n withCloseButton: true,\n position: \"top-center\",\n },\n };\n\n public show(options: NotificationData) {\n notifications.show({\n ...this.options.default,\n ...options,\n });\n }\n\n public info(options: Partial<NotificationData> | string) {\n if (typeof options === \"string\") {\n options = { message: options };\n }\n this.show({\n color: \"blue\",\n icon: <IconInfoCircle size={20} />,\n title: \"Info\",\n message: \"Information notification\",\n ...options,\n });\n }\n\n public success(options: Partial<NotificationData> | string) {\n if (typeof options === \"string\") {\n options = { message: options };\n }\n this.show({\n color: \"green\",\n icon: <IconCheck size={16} />,\n title: \"Success\",\n message: \"Operation completed successfully\",\n ...options,\n });\n }\n\n public warning(options: Partial<NotificationData> | string) {\n if (typeof options === \"string\") {\n options = { message: options };\n }\n this.show({\n color: \"yellow\",\n icon: <IconAlertTriangle size={20} />,\n title: \"Warning\",\n message: \"Please review this warning\",\n ...options,\n });\n }\n\n public danger(options: Partial<NotificationData> | string) {\n if (typeof options === \"string\") {\n options = { message: options };\n }\n this.show({\n color: \"red\",\n icon: <IconX size={20} />,\n title: \"Error\",\n message: \"An error occurred\",\n ...options,\n });\n }\n}\n","import { useInject } from \"@alepha/react\";\nimport { ToastService } from \"../services/ToastService.tsx\";\n\n/**\n * Use this hook to access the Toast Service for showing notifications.\n *\n * @example\n * const toast = useToast();\n * toast.success({ message: \"Operation completed successfully!\" });\n * toast.error({ title: \"Error\", message: \"Something went wrong\" });\n */\nexport const useToast = (): ToastService => {\n return useInject(ToastService);\n};\n","import { useRouter } from \"@alepha/react\";\nimport { Spotlight, type SpotlightActionData } from \"@mantine/spotlight\";\nimport { IconSearch } from \"@tabler/icons-react\";\nimport { type ReactNode, useMemo } from \"react\";\n\nexport interface OmnibarProps {\n shortcut?: string | string[];\n searchPlaceholder?: string;\n nothingFound?: ReactNode;\n}\n\nconst Omnibar = (props: OmnibarProps) => {\n const shortcut = props.shortcut ?? \"mod+K\";\n const searchPlaceholder = props.searchPlaceholder ?? \"Search...\";\n const nothingFound = props.nothingFound ?? \"Nothing found...\";\n const router = useRouter();\n const actions: SpotlightActionData[] = useMemo(\n () =>\n router.concretePages.map((page) => ({\n id: page.name,\n label: page.label ?? page.name,\n description: page.description,\n onClick: () => router.go(page.path ?? page.name),\n leftSection: page.icon,\n })),\n [],\n );\n\n return (\n <Spotlight\n actions={actions}\n shortcut={shortcut}\n limit={10}\n searchProps={{\n leftSection: <IconSearch size={20} />,\n placeholder: searchPlaceholder,\n }}\n nothingFound={nothingFound}\n />\n );\n};\n\nexport default Omnibar;\n","import { NestedView, useEvents } from \"@alepha/react\";\nimport type {\n ColorSchemeScriptProps,\n MantineProviderProps,\n} from \"@mantine/core\";\nimport { ColorSchemeScript, MantineProvider } from \"@mantine/core\";\nimport { ModalsProvider, type ModalsProviderProps } from \"@mantine/modals\";\nimport { Notifications, type NotificationsProps } from \"@mantine/notifications\";\nimport type { NavigationProgressProps } from \"@mantine/nprogress\";\nimport { NavigationProgress, nprogress } from \"@mantine/nprogress\";\nimport type { ReactNode } from \"react\";\nimport { useToast } from \"../../hooks/useToast.ts\";\nimport Omnibar, { type OmnibarProps } from \"./Omnibar.tsx\";\n\nexport interface AlephaMantineProviderProps {\n children?: ReactNode;\n mantine?: MantineProviderProps;\n colorSchemeScript?: ColorSchemeScriptProps;\n navigationProgress?: NavigationProgressProps;\n notifications?: NotificationsProps;\n modals?: ModalsProviderProps;\n omnibar?: OmnibarProps;\n}\n\nconst AlephaMantineProvider = (props: AlephaMantineProviderProps) => {\n const toast = useToast();\n\n useEvents(\n {\n \"react:transition:begin\": () => {\n nprogress.start();\n },\n \"react:transition:end\": () => {\n nprogress.complete();\n },\n \"react:action:error\": () => {\n toast.danger(\"An error occurred while processing your action.\");\n },\n },\n [],\n );\n\n return (\n <>\n <ColorSchemeScript\n defaultColorScheme={props.mantine?.defaultColorScheme}\n {...props.colorSchemeScript}\n />\n <MantineProvider\n {...props.mantine}\n theme={{\n primaryColor: \"gray\",\n primaryShade: {\n light: 9,\n dark: 8,\n },\n cursorType: \"pointer\",\n ...props.mantine?.theme,\n }}\n >\n <Notifications {...props.notifications} />\n <NavigationProgress {...props.navigationProgress} />\n <ModalsProvider {...props.modals}>\n <Omnibar {...props.omnibar} />\n {props.children ?? <NestedView />}\n </ModalsProvider>\n </MantineProvider>\n </>\n );\n};\n\nexport default AlephaMantineProvider;\n"],"mappings":";;;;;;;;;;;AAaA,IAAa,eAAb,MAA0B;CACxB,AAAmB,MAAM;CAEzB,AAAgB,UAA+B,EAC7C,SAAS;EACP,WAAW;EACX,iBAAiB;EACjB,UAAU;EACX,EACF;CAED,AAAO,KAAK,SAA2B;AACrC,gBAAc,KAAK;GACjB,GAAG,KAAK,QAAQ;GAChB,GAAG;GACJ,CAAC;;CAGJ,AAAO,KAAK,SAA6C;AACvD,MAAI,OAAO,YAAY,SACrB,WAAU,EAAE,SAAS,SAAS;AAEhC,OAAK,KAAK;GACR,OAAO;GACP,MAAM,oBAAC,kBAAe,MAAM,KA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,UAAU;AAExB,WACE;EACE,gCAAgC;AAC9B,aAAU,OAAO;;EAEnB,8BAA8B;AAC5B,aAAU,UAAU;;EAEtB,4BAA4B;AAC1B,SAAM,OAAO,kDAAkD;;EAElE,EACD,EAAE,CACH;AAED,QACE,4CACE,oBAAC;EACC,oBAAoB,MAAM,SAAS;EACnC,GAAI,MAAM;GACV,EACF,qBAAC;EACC,GAAI,MAAM;EACV,OAAO;GACL,cAAc;GACd,cAAc;IACZ,OAAO;IACP,MAAM;IACP;GACD,YAAY;GACZ,GAAG,MAAM,SAAS;GACnB;;GAED,oBAAC,iBAAc,GAAI,MAAM,gBAAiB;GAC1C,oBAAC,sBAAmB,GAAI,MAAM,qBAAsB;GACpD,qBAAC;IAAe,GAAI,MAAM;eACxB,oBAACA,mBAAQ,GAAI,MAAM,UAAW,EAC7B,MAAM,YAAY,oBAAC,eAAa;KAClB;;GACD,IACjB;;AAIP,oCAAe"}
@@ -1,3 +0,0 @@
1
- import { t as AlephaMantineProvider_default } from "./AlephaMantineProvider-CtIV-8MV.mjs";
2
-
3
- export { AlephaMantineProvider_default as default };
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/utils/parseInput.ts","../src/components/form/ControlSelect.tsx","../src/components/form/Control.tsx","../src/components/buttons/ActionButton.tsx","../src/components/buttons/DarkModeButton.tsx","../src/components/buttons/OmnibarButton.tsx","../src/services/DialogService.tsx","../src/components/dialogs/AlertDialog.tsx","../src/components/dialogs/ConfirmDialog.tsx","../src/components/dialogs/PromptDialog.tsx","../src/components/form/ControlDate.tsx","../src/components/form/TypeForm.tsx","../src/components/buttons/LanguageButton.tsx","../src/components/layout/AppBar.tsx","../src/components/layout/Sidebar.tsx","../src/components/layout/AdminShell.tsx","../src/components/layout/Omnibar.tsx","../src/components/layout/AlephaMantineProvider.tsx","../src/components/table/DataTable.tsx","../src/constants/ui.ts","../src/hooks/useDialog.ts","../src/services/ToastService.tsx","../src/hooks/useToast.ts","../src/RootR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wBhLW;;AvBxFX;;;;;AA0CA;AAIS,cuBqDI,QvBrDJ,EuBqDY,aAAA,CAAA,OvBrDZ,CuB+DP,aAAA,CAVmB,MvBrDZ,CAAA,CAAA,CAAA,CAAA,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","names":["Text","Text","Text","AlertDialog","ConfirmDialog","PromptDialog","menuItemProps: MenuItemProps & ButtonHTMLAttributes<unknown>","icon","Flex","Flex","ActionButton","ActionButton","Flex","Text","inputProps: InputProps","itemsEnum: string[] | undefined","items: any","segmentedControlProps: Partial<SegmentedControlProps>","Flex","data","Flex","ControlSelect","ControlDate","schema: any","Control","Flex","ActionButton","ActionButton","BurgerButton","DarkModeButton","OmnibarButton","LanguageButton","Flex","Flex","OmnibarButton","Text","item","ActionButton","AppBar","ActionButton"],"sources":["../src/RootRouter.ts","../src/components/dialogs/AlertDialog.tsx","../src/components/dialogs/ConfirmDialog.tsx","../src/components/dialogs/PromptDialog.tsx","../src/services/DialogService.tsx","../src/components/buttons/ActionButton.tsx","../src/components/buttons/DarkModeButton.tsx","../src/components/buttons/OmnibarButton.tsx","../src/utils/icons.tsx","../src/utils/string.ts","../src/utils/parseInput.ts","../src/components/form/ControlDate.tsx","../src/components/form/ControlSelect.tsx","../src/components/form/Control.tsx","../src/components/form/TypeForm.tsx","../src/constants/ui.ts","../src/components/buttons/BurgerButton.tsx","../src/components/buttons/LanguageButton.tsx","../src/components/layout/AppBar.tsx","../src/components/layout/Sidebar.tsx","../src/components/layout/AdminShell.tsx","../src/components/table/DataTable.tsx","../src/hooks/useDialog.ts","../src/index.ts"],"sourcesContent":["import { $page } from \"@alepha/react\";\n\nexport class RootRouter {\n public readonly root = $page({\n path: \"/\",\n lazy: () => import(\"./components/layout/AlephaMantineProvider.tsx\"),\n });\n}\n","import { Button, Group, Text } from \"@mantine/core\";\nimport type { AlertDialogProps } from \"../../services/DialogService\";\n\nconst AlertDialog = ({ options, onClose }: AlertDialogProps) => (\n <>\n {options?.message && <Text mb=\"md\">{options.message}</Text>}\n <Group justify=\"flex-end\">\n <Button onClick={onClose}>{options?.okLabel || \"OK\"}</Button>\n </Group>\n </>\n);\n\nexport default AlertDialog;\n","import { Button, Group, Text } from \"@mantine/core\";\nimport type { ConfirmDialogProps } from \"../../services/DialogService\";\n\nconst ConfirmDialog = ({ options, onConfirm }: ConfirmDialogProps) => (\n <>\n {options?.message && <Text mb=\"md\">{options.message}</Text>}\n <Group justify=\"flex-end\">\n <Button variant=\"subtle\" onClick={() => onConfirm(false)}>\n {options?.cancelLabel || \"Cancel\"}\n </Button>\n <Button\n color={options?.confirmColor || \"blue\"}\n onClick={() => onConfirm(true)}\n >\n {options?.confirmLabel || \"Confirm\"}\n </Button>\n </Group>\n </>\n);\n\nexport default ConfirmDialog;\n","import { Button, Group, Text, TextInput } from \"@mantine/core\";\nimport { useEffect, useRef, useState } from \"react\";\nimport type { PromptDialogProps } from \"../../services/DialogService\";\n\nconst PromptDialog = ({ options, onSubmit }: PromptDialogProps) => {\n const [value, setValue] = useState(options?.defaultValue || \"\");\n const inputRef = useRef<HTMLInputElement>(null);\n\n useEffect(() => {\n // autofocus the input when the dialog opens\n inputRef.current?.focus();\n }, []);\n\n const handleSubmit = () => {\n if (!options?.required || value.trim()) {\n onSubmit(value);\n }\n };\n\n const handleKeyDown = (event: React.KeyboardEvent) => {\n if (event.key === \"Enter\") {\n handleSubmit();\n }\n };\n\n return (\n <>\n {options?.message && <Text mb=\"md\">{options.message}</Text>}\n <TextInput\n ref={inputRef}\n label={options?.label}\n placeholder={options?.placeholder}\n value={value}\n onChange={(event) => setValue(event.currentTarget.value)}\n onKeyDown={handleKeyDown}\n required={options?.required}\n mb=\"md\"\n />\n <Group justify=\"flex-end\">\n <Button variant=\"subtle\" onClick={() => onSubmit(null)}>\n {options?.cancelLabel || \"Cancel\"}\n </Button>\n <Button\n onClick={handleSubmit}\n disabled={options?.required && !value.trim()}\n >\n {options?.submitLabel || \"OK\"}\n </Button>\n </Group>\n </>\n );\n};\n\nexport default PromptDialog;\n","import type { ModalProps } from \"@mantine/core\";\nimport { modals } from \"@mantine/modals\";\nimport type { ReactNode } from \"react\";\nimport AlertDialog from \"../components/dialogs/AlertDialog\";\nimport ConfirmDialog from \"../components/dialogs/ConfirmDialog\";\nimport PromptDialog from \"../components/dialogs/PromptDialog\";\n\n// Base interfaces\nexport interface BaseDialogOptions extends Partial<ModalProps> {\n title?: ReactNode;\n message?: ReactNode;\n content?: any; // weird typing for mantine modals content\n}\n\nexport interface AlertDialogOptions extends BaseDialogOptions {\n okLabel?: string;\n}\n\nexport interface ConfirmDialogOptions extends BaseDialogOptions {\n confirmLabel?: string;\n cancelLabel?: string;\n confirmColor?: string;\n}\n\nexport interface PromptDialogOptions extends BaseDialogOptions {\n placeholder?: string;\n defaultValue?: string;\n label?: string;\n required?: boolean;\n submitLabel?: string;\n cancelLabel?: string;\n}\n\n// Component prop interfaces\nexport interface AlertDialogProps {\n options?: AlertDialogOptions;\n onClose: () => void;\n}\n\nexport interface ConfirmDialogProps {\n options?: ConfirmDialogOptions;\n onConfirm: (confirmed: boolean) => void;\n}\n\nexport interface PromptDialogProps {\n options?: PromptDialogOptions;\n onSubmit: (value: string | null) => void;\n}\n\nexport interface DialogServiceOptions {\n default?: Partial<BaseDialogOptions>;\n}\n\nexport class DialogService {\n public readonly options: DialogServiceOptions = {\n default: {\n centered: true,\n withCloseButton: true,\n size: \"md\",\n overlayProps: {\n backgroundOpacity: 0.55,\n blur: 3,\n },\n transitionProps: {\n transition: \"pop\",\n duration: 200,\n },\n },\n };\n\n /**\n * Show an alert dialog with a message\n */\n public alert(options?: AlertDialogOptions): Promise<void> {\n return new Promise((resolve) => {\n const modalId = this.open({\n ...options,\n title: options?.title || \"Alert\",\n content: (\n <AlertDialog\n options={options}\n onClose={() => {\n this.close(modalId);\n resolve();\n }}\n />\n ),\n });\n });\n }\n\n /**\n * Show a confirmation dialog that returns a promise\n */\n public confirm(options?: ConfirmDialogOptions): Promise<boolean> {\n return new Promise((resolve) => {\n const modalId = this.open({\n ...options,\n title: options?.title || \"Confirm\",\n closeOnClickOutside: false,\n closeOnEscape: false,\n content: (\n <ConfirmDialog\n options={options}\n onConfirm={(confirmed) => {\n this.close(modalId);\n resolve(confirmed);\n }}\n />\n ),\n });\n });\n }\n\n /**\n * Show a prompt dialog to get user input\n */\n public prompt(options?: PromptDialogOptions): Promise<string | null> {\n return new Promise((resolve) => {\n const modalId = this.open({\n ...options,\n title: options?.title || \"Input\",\n closeOnClickOutside: false,\n closeOnEscape: false,\n content: (\n <PromptDialog\n options={options}\n onSubmit={(value) => {\n this.close(modalId);\n resolve(value);\n }}\n />\n ),\n });\n });\n }\n\n /**\n * Open a custom dialog with provided content\n */\n public open(options?: BaseDialogOptions): string {\n return modals.open({\n ...this.options.default,\n ...options,\n children: options?.content || options?.message,\n });\n }\n\n /**\n * Close the currently open dialog or a specific dialog by ID\n */\n public close(modalId?: string): void {\n if (modalId) {\n modals.close(modalId);\n } else {\n modals.closeAll();\n }\n }\n\n /**\n * Show a JSON editor/viewer dialog\n */\n public json(data?: any, options?: BaseDialogOptions): void {\n // Implementation to be added\n }\n\n /**\n * Show a form dialog for structured input\n */\n public form(options?: BaseDialogOptions): Promise<any> {\n // Implementation to be added\n return Promise.resolve(null);\n }\n\n /**\n * Show a loading/progress dialog with optional progress percentage\n */\n public loading(options?: BaseDialogOptions & { progress?: number }): void {\n // Implementation to be added\n }\n\n /**\n * Show an image viewer/gallery dialog\n */\n public image(src: string | string[], options?: BaseDialogOptions): void {\n // Implementation to be added\n }\n}\n","import {\n type RouterGoOptions,\n type UseActionReturn,\n type UseActiveOptions,\n useAction,\n useActive,\n useRouter,\n} from \"@alepha/react\";\nimport { type FormModel, useFormState } from \"@alepha/react-form\";\nimport {\n Button,\n type ButtonProps,\n Flex,\n Menu,\n type MenuItemProps,\n type MenuProps,\n type MenuTargetProps,\n ThemeIcon,\n type ThemeIconProps,\n Tooltip,\n type TooltipProps,\n} from \"@mantine/core\";\nimport { IconCheck, IconChevronRight } from \"@tabler/icons-react\";\nimport type { ButtonHTMLAttributes, ReactNode } from \"react\";\n\nexport interface ActionMenuItem {\n /**\n * Menu item type\n */\n type?: \"item\" | \"divider\" | \"label\";\n\n /**\n * Label text for the menu item\n */\n label?: string | ReactNode;\n\n /**\n * Icon element to display before the label\n */\n icon?: ReactNode;\n\n /**\n * Click handler for menu items\n */\n onClick?: () => void;\n\n /**\n * Href for navigation menu items\n */\n href?: string;\n\n /**\n * Color for the menu item (e.g., \"red\" for danger actions)\n */\n color?: string;\n\n /**\n * Nested submenu items\n */\n children?: ActionMenuItem[];\n\n /**\n * Whether the menu item is active\n */\n active?: boolean;\n}\n\nexport interface ActionMenuConfig {\n /**\n * Array of menu items to display\n */\n items: ActionMenuItem[];\n\n /**\n * Menu position relative to the button\n */\n position?:\n | \"bottom\"\n | \"bottom-start\"\n | \"bottom-end\"\n | \"top\"\n | \"top-start\"\n | \"top-end\"\n | \"left\"\n | \"right\";\n\n /**\n * Menu width\n */\n width?: number | string;\n\n /**\n * Menu shadow\n */\n shadow?: \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n\n on?: \"hover\" | \"click\";\n\n targetProps?: MenuTargetProps;\n menuProps?: MenuProps;\n}\n\nexport interface ActionCommonProps extends ButtonProps {\n children?: ReactNode;\n textVisibleFrom?: \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n\n /**\n * Tooltip to display on hover. Can be a string for simple tooltips\n * or a TooltipProps object for advanced configuration.\n */\n tooltip?: string | TooltipProps;\n\n /**\n * Menu configuration. When provided, the action will display a dropdown menu.\n */\n menu?: ActionMenuConfig;\n\n /**\n * If set, a confirmation dialog will be shown before performing the action.\n * If `true`, a default title and message will be used.\n * If a string, it will be used as the message with a default title.\n * If an object, it can contain `title` and `message` properties to customize the dialog.\n */\n confirm?: boolean | string | { title?: string; message: string };\n\n /**\n * Icon to display on the left side of the button.\n * If no children are provided, the button will be styled as an icon-only button.\n */\n icon?: ReactNode;\n\n /**\n * Additional props to pass to the ThemeIcon wrapping the icon.\n */\n themeIconProps?: ThemeIconProps;\n}\n\nexport type ActionProps = ActionCommonProps &\n (\n | ActionNavigationButtonProps\n | ActionClickButtonProps\n | ActionSubmitButtonProps\n | ActionHookButtonProps\n | {}\n );\n\n// ---------------------------------------------------------------------------------------------------------------------\n\n// Helper function to render menu items recursively\nconst ActionMenuItem = (props: {\n item: ActionMenuItem;\n index: number;\n}): ReactNode => {\n const { item, index } = props;\n\n const router = useRouter();\n const action = useAction(\n {\n handler: async (e: any) => {\n await item.onClick?.();\n },\n },\n [item.onClick],\n );\n\n // Render divider\n if (item.type === \"divider\") {\n return <Menu.Divider key={index} />;\n }\n\n // Render label\n if (item.type === \"label\") {\n return <Menu.Label key={index}>{item.label}</Menu.Label>;\n }\n\n // Render submenu if it has children\n if (item.children && item.children.length > 0) {\n return (\n <Menu key={index} trigger=\"hover\" position=\"right-start\" offset={2}>\n <Menu.Target>\n <Menu.Item\n leftSection={item.icon}\n rightSection={<IconChevronRight size={14} />}\n >\n {item.label}\n </Menu.Item>\n </Menu.Target>\n <Menu.Dropdown>\n {item.children.map((child, childIndex) => (\n <ActionMenuItem item={child} index={childIndex} key={childIndex} />\n ))}\n </Menu.Dropdown>\n </Menu>\n );\n }\n\n const menuItemProps: MenuItemProps & ButtonHTMLAttributes<unknown> = {};\n if (props.item.onClick) {\n menuItemProps.onClick = action.run;\n } else if (props.item.href) {\n Object.assign(menuItemProps, router.anchor(props.item.href));\n }\n\n // render regular menu item\n return (\n <Menu.Item\n key={index}\n leftSection={item.icon}\n onClick={item.onClick}\n color={item.color}\n rightSection={\n item.active ? (\n <ThemeIcon size={\"xs\"} variant={\"transparent\"}>\n <IconCheck />\n </ThemeIcon>\n ) : undefined\n }\n {...menuItemProps}\n >\n {item.label}\n </Menu.Item>\n );\n};\n\nconst ActionButton = (_props: ActionProps) => {\n const props = { variant: \"subtle\", ..._props };\n const { tooltip, menu, icon, ...restProps } = props;\n\n if (props.icon) {\n const icon = (\n <ThemeIcon\n w={24} // TODO: make size configurable\n variant={\"transparent\"}\n size={\"sm\"}\n c={\"var(--mantine-color-text)\"}\n {...props.themeIconProps}\n >\n {props.icon}\n </ThemeIcon>\n );\n if (!props.children) {\n restProps.children = icon;\n restProps.p ??= \"xs\";\n } else {\n restProps.leftSection = icon;\n }\n }\n\n if (props.leftSection && !props.children) {\n restProps.className ??= \"mantine-Action-iconOnly\";\n restProps.p ??= \"xs\";\n }\n\n if (props.textVisibleFrom) {\n const { children, textVisibleFrom, leftSection, ...rest } = restProps;\n return (\n <>\n <Flex w={\"100%\"} visibleFrom={textVisibleFrom}>\n <ActionButton\n flex={1}\n {...rest}\n leftSection={leftSection}\n tooltip={tooltip}\n menu={menu}\n >\n {children}\n </ActionButton>\n </Flex>\n <Flex w={\"100%\"} hiddenFrom={textVisibleFrom}>\n <ActionButton px={\"xs\"} {...rest} tooltip={tooltip} menu={menu}>\n {leftSection}\n </ActionButton>\n </Flex>\n </>\n );\n }\n\n const renderAction = () => {\n if (\"href\" in restProps && restProps.href) {\n if (restProps.href.startsWith(\"http\")) {\n return (\n <ActionHrefButton {...restProps} href={restProps.href}>\n {restProps.children}\n </ActionHrefButton>\n );\n }\n return (\n <ActionNavigationButton {...restProps} href={restProps.href}>\n {restProps.children}\n </ActionNavigationButton>\n );\n }\n\n delete (restProps as any).classNameActive;\n delete (restProps as any).variantActive;\n\n if (\"action\" in restProps && restProps.action) {\n return (\n <ActionHookButton {...restProps} action={restProps.action}>\n {restProps.children}\n </ActionHookButton>\n );\n }\n\n if (\"onClick\" in restProps && restProps.onClick) {\n return (\n <ActionClickButton {...restProps} onClick={restProps.onClick}>\n {restProps.children}\n </ActionClickButton>\n );\n }\n\n if (\"form\" in restProps && restProps.form) {\n return (\n <ActionSubmitButton {...restProps} form={restProps.form}>\n {restProps.children}\n </ActionSubmitButton>\n );\n }\n\n return <Button {...(restProps as any)}>{restProps.children}</Button>;\n };\n\n let actionElement = renderAction();\n\n // wrap with Menu if provided\n if (menu) {\n actionElement = (\n <Menu\n position={menu.position || \"bottom-start\"}\n width={menu.width || 200}\n shadow={menu.shadow || \"md\"}\n trigger={menu.on === \"hover\" ? \"hover\" : \"click\"}\n {...menu.menuProps}\n >\n <Menu.Target {...menu.targetProps}>{actionElement}</Menu.Target>\n <Menu.Dropdown>\n {menu.items.map((item, index) => (\n <ActionMenuItem item={item} index={index} key={index} />\n ))}\n </Menu.Dropdown>\n </Menu>\n );\n }\n\n // Wrap with Tooltip if provided\n if (tooltip) {\n const tooltipProps: TooltipProps =\n typeof tooltip === \"string\"\n ? { label: tooltip, children: actionElement }\n : { ...tooltip, children: actionElement };\n\n return <Tooltip {...tooltipProps} />;\n }\n\n return actionElement;\n};\n\nexport default ActionButton;\n\n// ---------------------------------------------------------------------------------------------------------------------\n\n// Action Submit\n\n// ---------------------------------------------------------------------------------------------------------------------\n\nexport interface ActionSubmitButtonProps extends ButtonProps {\n form: FormModel<any>;\n}\n\n/**\n * Action button that submits a form with loading and disabled state handling.\n */\nconst ActionSubmitButton = (props: ActionSubmitButtonProps) => {\n const { form, ...buttonProps } = props;\n const state = useFormState(form);\n return (\n <Button\n {...buttonProps}\n loading={state.loading}\n disabled={state.loading}\n type={\"submit\"}\n >\n {props.children}\n </Button>\n );\n};\n\n// ---------------------------------------------------------------------------------------------------------------------\n\n// Action with useAction Hook\n\n// ---------------------------------------------------------------------------------------------------------------------\n\nexport interface ActionHookButtonProps extends ButtonProps {\n action: UseActionReturn<any[], any>;\n}\n\n/**\n * Action button that integrates with useAction hook return value.\n * Automatically handles loading state and executes the action on click.\n *\n * @example\n * ```tsx\n * const saveAction = useAction({\n * handler: async (data) => {\n * await api.save(data);\n * }\n * }, []);\n *\n * <ActionButton action={saveAction}>\n * Save\n * </ActionButton>\n * ```\n */\nconst ActionHookButton = (props: ActionHookButtonProps) => {\n const { action, ...buttonProps } = props;\n\n return (\n <Button\n {...buttonProps}\n disabled={action.loading || props.disabled}\n loading={action.loading}\n onClick={() => action.run()}\n >\n {props.children}\n </Button>\n );\n};\n\n// ---------------------------------------------------------------------------------------------------------------------\n\n// Action Click\n\n// ---------------------------------------------------------------------------------------------------------------------\n\nexport interface ActionClickButtonProps extends ButtonProps {\n onClick: (e: any) => any;\n}\n\n/**\n * Basic action button that handles click events with loading and error handling.\n *\n * @example\n * ```tsx\n * <ActionButton onClick={() => api.doSomething()}>\n * Do Something\n * </ActionButton>\n * ```\n */\nconst ActionClickButton = (props: ActionClickButtonProps) => {\n const action = useAction(\n {\n handler: async (e: any) => {\n await props.onClick(e);\n },\n },\n [props.onClick],\n );\n\n return (\n <Button\n {...props}\n disabled={action.loading || props.disabled}\n loading={action.loading}\n onClick={action.run}\n >\n {props.children}\n </Button>\n );\n};\n\n// ---------------------------------------------------------------------------------------------------------------------\n\n// Action Navigation\n\n// ---------------------------------------------------------------------------------------------------------------------\n\nexport interface ActionNavigationButtonProps extends ButtonProps {\n href: string;\n active?: Partial<UseActiveOptions> | false;\n routerGoOptions?: RouterGoOptions;\n classNameActive?: string;\n variantActive?: ButtonProps[\"variant\"];\n target?: string;\n}\n\n/**\n * Action for navigation with active state support.\n */\nconst ActionNavigationButton = (props: ActionNavigationButtonProps) => {\n const {\n active: options,\n classNameActive,\n variantActive,\n routerGoOptions,\n ...buttonProps\n } = props;\n const router = useRouter();\n const { isPending, isActive } = useActive(\n options ? { href: props.href, ...options } : { href: props.href },\n );\n const anchorProps = router.anchor(props.href, routerGoOptions);\n\n const className = buttonProps.className || \"\";\n if (isActive && options !== false && classNameActive) {\n buttonProps.className = `${className} ${classNameActive}`.trim();\n }\n\n return (\n <Button\n component={\"a\"}\n loading={isPending}\n {...buttonProps}\n {...anchorProps}\n variant={\n isActive && options !== false\n ? (variantActive ?? \"filled\")\n : (buttonProps.variant ?? \"subtle\")\n }\n >\n {props.children}\n </Button>\n );\n};\n\nconst ActionHrefButton = (props: ActionNavigationButtonProps) => {\n const {\n active: options,\n classNameActive,\n variantActive,\n routerGoOptions,\n target,\n ...buttonProps\n } = props;\n\n return (\n <Button component={\"a\"} target={target} {...buttonProps}>\n {props.children}\n </Button>\n );\n};\n","import {\n Flex,\n type MantineBreakpoint,\n SegmentedControl,\n type SegmentedControlProps,\n useComputedColorScheme,\n useMantineColorScheme,\n} from \"@mantine/core\";\nimport { IconMoon, IconSun } from \"@tabler/icons-react\";\nimport { useEffect, useState } from \"react\";\nimport ActionButton, { type ActionProps } from \"./ActionButton.tsx\";\n\nexport interface DarkModeButtonProps {\n mode?: \"minimal\" | \"segmented\";\n size?: MantineBreakpoint;\n variant?:\n | \"filled\"\n | \"light\"\n | \"outline\"\n | \"default\"\n | \"subtle\"\n | \"transparent\";\n\n fullWidth?: boolean;\n\n segmentedProps?: Partial<SegmentedControlProps>;\n actionProps?: Partial<ActionProps>;\n}\n\nconst DarkModeButton = (props: DarkModeButtonProps) => {\n const { setColorScheme } = useMantineColorScheme();\n const computedColorScheme = useComputedColorScheme(\"light\");\n const [colorScheme, setColorScheme2] = useState(\"default\");\n const mode = props.mode ?? \"minimal\";\n\n useEffect(() => {\n setColorScheme2(computedColorScheme);\n }, [computedColorScheme]);\n\n const toggleColorScheme = () => {\n setColorScheme(computedColorScheme === \"dark\" ? \"light\" : \"dark\");\n };\n\n if (mode === \"segmented\") {\n return (\n <SegmentedControl\n value={colorScheme}\n onChange={(value) => setColorScheme(value as \"light\" | \"dark\")}\n data={[\n {\n value: \"light\",\n label: (\n <Flex h={20} align=\"center\" justify=\"center\">\n <IconSun size={16} />\n </Flex>\n ),\n },\n {\n value: \"dark\",\n label: (\n <Flex h={20} align=\"center\" justify=\"center\">\n <IconMoon size={16} />\n </Flex>\n ),\n },\n ]}\n w={props.fullWidth ? \"100%\" : undefined}\n {...props.segmentedProps}\n />\n );\n }\n\n return (\n <ActionButton\n onClick={toggleColorScheme}\n variant={props.variant ?? \"outline\"}\n size={props.size ?? \"sm\"}\n aria-label=\"Toggle color scheme\"\n px={\"xs\"}\n fullWidth={props.fullWidth ?? false}\n icon={\n colorScheme === \"dark\" ? (\n <IconSun size={20} />\n ) : colorScheme === \"light\" ? (\n <IconMoon size={20} />\n ) : (\n <Flex h={20} w={20} />\n )\n }\n {...props.actionProps}\n />\n );\n};\n\nexport default DarkModeButton;\n","import { Flex, Kbd, Text } from \"@mantine/core\";\nimport { spotlight } from \"@mantine/spotlight\";\nimport { IconSearch } from \"@tabler/icons-react\";\nimport ActionButton, { type ActionProps } from \"./ActionButton.tsx\";\n\nexport interface OmnibarButtonProps {\n actionProps?: ActionProps;\n collapsed?: boolean;\n}\n\nconst OmnibarButton = (props: OmnibarButtonProps) => {\n return (\n <ActionButton\n variant={\"outline\"}\n miw={256}\n onClick={spotlight.open}\n justify={\"space-between\"}\n rightSection={<Kbd size={\"sm\"}>⌘+K</Kbd>}\n radius={\"md\"}\n {...props.actionProps}\n >\n <Flex align={\"center\"} gap={\"xs\"}>\n <IconSearch size={16} color={\"gray\"} />\n <Text size={\"xs\"} c={\"dimmed\"}>\n Search...\n </Text>\n </Flex>\n </ActionButton>\n );\n};\n\nexport default OmnibarButton;\n","import {\n IconAt,\n IconCalendar,\n IconClock,\n IconColorPicker,\n IconFile,\n IconHash,\n IconKey,\n IconLetterCase,\n IconLink,\n IconList,\n IconMail,\n IconPalette,\n IconPhone,\n IconSelector,\n IconToggleLeft,\n} from \"@tabler/icons-react\";\nimport type { ReactNode } from \"react\";\n\n/**\n * Icon size presets following Mantine's size conventions\n */\nexport const ICON_SIZES = {\n xs: 12,\n sm: 16,\n md: 20,\n lg: 24,\n xl: 28,\n} as const;\n\nexport type IconSize = keyof typeof ICON_SIZES;\n\n/**\n * Get the default icon for an input based on its type, format, or name.\n */\nexport const getDefaultIcon = (params: {\n type?: string;\n format?: string;\n name?: string;\n isEnum?: boolean;\n isArray?: boolean;\n size?: IconSize;\n}): ReactNode => {\n const { type, format, name, isEnum, isArray, size = \"sm\" } = params;\n const iconSize = ICON_SIZES[size];\n\n // Format-based icons (highest priority)\n if (format) {\n switch (format) {\n case \"email\":\n return <IconMail size={iconSize} />;\n case \"url\":\n case \"uri\":\n return <IconLink size={iconSize} />;\n case \"tel\":\n case \"phone\":\n return <IconPhone size={iconSize} />;\n case \"date\":\n return <IconCalendar size={iconSize} />;\n case \"date-time\":\n return <IconCalendar size={iconSize} />;\n case \"time\":\n return <IconClock size={iconSize} />;\n case \"color\":\n return <IconColorPicker size={iconSize} />;\n case \"uuid\":\n return <IconKey size={iconSize} />;\n }\n }\n\n // Name-based icons (medium priority)\n if (name) {\n const nameLower = name.toLowerCase();\n if (nameLower.includes(\"password\") || nameLower.includes(\"secret\")) {\n return <IconKey size={iconSize} />;\n }\n if (nameLower.includes(\"email\") || nameLower.includes(\"mail\")) {\n return <IconMail size={iconSize} />;\n }\n if (nameLower.includes(\"url\") || nameLower.includes(\"link\")) {\n return <IconLink size={iconSize} />;\n }\n if (nameLower.includes(\"phone\") || nameLower.includes(\"tel\")) {\n return <IconPhone size={iconSize} />;\n }\n if (nameLower.includes(\"color\")) {\n return <IconPalette size={iconSize} />;\n }\n if (nameLower.includes(\"file\") || nameLower.includes(\"upload\")) {\n return <IconFile size={iconSize} />;\n }\n if (nameLower.includes(\"date\")) {\n return <IconCalendar size={iconSize} />;\n }\n if (nameLower.includes(\"time\")) {\n return <IconClock size={iconSize} />;\n }\n }\n\n // Type-based icons (lowest priority)\n if (isEnum || isArray) {\n return <IconSelector size={iconSize} />;\n }\n\n if (type) {\n switch (type) {\n case \"boolean\":\n return <IconToggleLeft size={iconSize} />;\n case \"number\":\n case \"integer\":\n return <IconHash size={iconSize} />;\n case \"array\":\n return <IconList size={iconSize} />;\n case \"string\":\n return <IconLetterCase size={iconSize} />;\n }\n }\n\n // Default icon\n return <IconAt size={iconSize} />;\n};\n","/**\n * Capitalizes the first letter of a string.\n *\n * @example\n * capitalize(\"hello\") // \"Hello\"\n */\nexport const capitalize = (str: string): string => {\n return str.charAt(0).toUpperCase() + str.slice(1);\n};\n\n/**\n * Converts a path or identifier string into a pretty display name.\n * Removes slashes and capitalizes the first letter.\n *\n * @example\n * prettyName(\"/userName\") // \"UserName\"\n * prettyName(\"email\") // \"Email\"\n */\nexport const prettyName = (name: string): string => {\n return capitalize(name.replaceAll(\"/\", \"\"));\n};\n","import { type TObject, TypeBoxError } from \"@alepha/core\";\nimport type { InputField } from \"@alepha/react-form\";\nimport type { ReactNode } from \"react\";\nimport type { ControlProps } from \"../components/form/Control.tsx\";\nimport { getDefaultIcon } from \"./icons.tsx\";\nimport { prettyName } from \"./string.ts\";\n\nexport const parseInput = (\n props: GenericControlProps,\n form: {\n error?: Error;\n },\n): ControlInput => {\n const disabled = false; // form.loading;\n const id = props.input.props.id;\n const label =\n props.title ??\n (\"title\" in props.input.schema &&\n typeof props.input.schema.title === \"string\"\n ? props.input.schema.title\n : undefined) ??\n prettyName(props.input.path);\n const description =\n props.description ??\n (\"description\" in props.input.schema &&\n typeof props.input.schema.description === \"string\"\n ? props.input.schema.description\n : undefined);\n const error =\n form.error && form.error instanceof TypeBoxError\n ? form.error.value.message\n : undefined;\n\n // Auto-generate icon if not provided\n const icon =\n props.icon ??\n getDefaultIcon({\n type:\n props.input.schema && \"type\" in props.input.schema\n ? String(props.input.schema.type)\n : undefined,\n format:\n props.input.schema &&\n \"format\" in props.input.schema &&\n typeof props.input.schema.format === \"string\"\n ? props.input.schema.format\n : undefined,\n name: props.input.props.name,\n isEnum:\n props.input.schema &&\n \"enum\" in props.input.schema &&\n Boolean(props.input.schema.enum),\n isArray:\n props.input.schema &&\n \"type\" in props.input.schema &&\n props.input.schema.type === \"array\",\n });\n\n const format =\n props.input.schema &&\n \"format\" in props.input.schema &&\n typeof props.input.schema.format === \"string\"\n ? props.input.schema.format\n : undefined;\n\n const required = props.input.required;\n const schema = props.input.schema as TObject & { $control?: ControlProps };\n\n const inputProps: InputProps = {\n label,\n description,\n error,\n required,\n disabled,\n };\n\n if (\"minLength\" in schema && typeof schema.minLength === \"number\") {\n inputProps.minLength = schema.minLength;\n }\n if (\"maxLength\" in schema && typeof schema.maxLength === \"number\") {\n inputProps.maxLength = schema.maxLength;\n }\n if (\"minimum\" in schema && typeof schema.minimum === \"number\") {\n inputProps.minimum = schema.minimum;\n }\n if (\"maximum\" in schema && typeof schema.maximum === \"number\") {\n inputProps.maximum = schema.maximum;\n }\n\n return {\n id,\n icon,\n format,\n schema: props.input.schema as TObject & { $control?: ControlProps },\n inputProps,\n };\n};\n\nexport interface GenericControlProps {\n input: InputField;\n title?: string;\n description?: string;\n icon?: ReactNode;\n}\n\nexport interface ControlInput {\n id?: string;\n icon: ReactNode;\n format?: string;\n schema: TObject & { $control?: ControlProps };\n inputProps: InputProps;\n}\n\nexport interface InputProps {\n label: string;\n description?: string;\n error?: string;\n required: boolean;\n disabled: boolean;\n\n minLength?: number;\n maxLength?: number;\n minimum?: number;\n maximum?: number;\n}\n","import { useFormState } from \"@alepha/react-form\";\nimport {\n DateInput,\n type DateInputProps,\n DateTimePicker,\n type DateTimePickerProps,\n TimeInput,\n type TimeInputProps,\n} from \"@mantine/dates\";\nimport {\n type GenericControlProps,\n parseInput,\n} from \"../../utils/parseInput.ts\";\n\nexport interface ControlDateProps extends GenericControlProps {\n date?: boolean | DateInputProps;\n datetime?: boolean | DateTimePickerProps;\n time?: boolean | TimeInputProps;\n}\n\n/**\n * ControlDate component for handling date, datetime, and time inputs.\n *\n * Features:\n * - DateInput for date format\n * - DateTimePicker for date-time format\n * - TimeInput for time format\n *\n * Automatically detects date formats from schema and renders appropriate picker.\n */\nconst ControlDate = (props: ControlDateProps) => {\n const form = useFormState(props.input);\n const { inputProps, id, icon, format } = parseInput(props, form);\n if (!props.input?.props) {\n return null;\n }\n\n // region <DateTimePicker/>\n if (props.datetime || format === \"date-time\") {\n const dateTimePickerProps =\n typeof props.datetime === \"object\" ? props.datetime : {};\n return (\n <DateTimePicker\n {...inputProps}\n id={id}\n leftSection={icon}\n defaultValue={\n props.input.props.defaultValue\n ? new Date(props.input.props.defaultValue)\n : undefined\n }\n onChange={(value) => {\n props.input.set(value ? new Date(value).toISOString() : undefined);\n }}\n {...dateTimePickerProps}\n />\n );\n }\n //endregion\n\n // region <DateInput/>\n if (props.date || format === \"date\") {\n const dateInputProps = typeof props.date === \"object\" ? props.date : {};\n return (\n <DateInput\n {...inputProps}\n id={id}\n leftSection={icon}\n defaultValue={\n props.input.props.defaultValue\n ? new Date(props.input.props.defaultValue)\n : undefined\n }\n onChange={(value) => {\n props.input.set(\n value ? new Date(value).toISOString().slice(0, 10) : undefined,\n );\n }}\n {...dateInputProps}\n />\n );\n }\n //endregion\n\n // region <TimeInput/>\n if (props.time || format === \"time\") {\n const timeInputProps = typeof props.time === \"object\" ? props.time : {};\n return (\n <TimeInput\n {...inputProps}\n id={id}\n leftSection={icon}\n defaultValue={props.input.props.defaultValue}\n onChange={(event) => {\n props.input.set(event.currentTarget.value);\n }}\n {...timeInputProps}\n />\n );\n }\n //endregion\n\n // Fallback - shouldn't happen\n return null;\n};\n\nexport default ControlDate;\n","import { useFormState } from \"@alepha/react-form\";\nimport {\n Autocomplete,\n type AutocompleteProps,\n Flex,\n Input,\n MultiSelect,\n type MultiSelectProps,\n SegmentedControl,\n type SegmentedControlProps,\n Select,\n type SelectProps,\n TagsInput,\n type TagsInputProps,\n} from \"@mantine/core\";\nimport { useEffect, useState } from \"react\";\nimport {\n type GenericControlProps,\n parseInput,\n} from \"../../utils/parseInput.ts\";\n\nexport type SelectValueLabel =\n | string\n | { value: string; label: string; icon?: string };\n\nexport interface ControlSelectProps extends GenericControlProps {\n select?: boolean | SelectProps;\n multi?: boolean | MultiSelectProps;\n tags?: boolean | TagsInputProps;\n autocomplete?: boolean | AutocompleteProps;\n segmented?: boolean | Partial<SegmentedControlProps>;\n\n loader?: () => Promise<SelectValueLabel[]>;\n}\n\n/**\n * ControlSelect component for handling Select, MultiSelect, and TagsInput.\n *\n * Features:\n * - Basic Select with enum support\n * - MultiSelect for array of enums\n * - TagsInput for array of strings (no enum)\n * - Future: Lazy loading\n * - Future: Searchable/filterable options\n * - Future: Custom option rendering\n *\n * Automatically detects enum values and array types from schema.\n */\nconst ControlSelect = (props: ControlSelectProps) => {\n const form = useFormState(props.input);\n const { inputProps, id, icon } = parseInput(props, form);\n\n // Detect if schema is an array type\n const isArray =\n props.input.schema &&\n \"type\" in props.input.schema &&\n props.input.schema.type === \"array\";\n\n // For arrays, check if items have enum (MultiSelect) or not (TagsInput)\n let itemsEnum: string[] | undefined;\n if (isArray && \"items\" in props.input.schema && props.input.schema.items) {\n const items: any = props.input.schema.items;\n if (\"enum\" in items && Array.isArray(items.enum)) {\n itemsEnum = items.enum;\n }\n }\n\n // Extract enum values from schema (for non-array select)\n const enumValues =\n props.input.schema &&\n \"enum\" in props.input.schema &&\n Array.isArray(props.input.schema.enum)\n ? props.input.schema.enum\n : [];\n\n const [data, setData] = useState<SelectValueLabel[]>([]);\n\n useEffect(() => {\n if (!props.input?.props) {\n return;\n }\n\n if (props.loader) {\n props.loader().then(setData);\n } else {\n setData(enumValues);\n }\n }, [props.input, props.loader]);\n\n if (!props.input?.props) {\n return null;\n }\n\n if (props.segmented) {\n const segmentedControlProps: Partial<SegmentedControlProps> =\n typeof props.segmented === \"object\" ? props.segmented : {};\n\n return (\n <Input.Wrapper {...inputProps}>\n <Flex mt={\"calc(var(--mantine-spacing-xs) / 2)\"}>\n <SegmentedControl\n disabled={inputProps.disabled}\n defaultValue={String(props.input.props.defaultValue)}\n {...segmentedControlProps}\n onChange={(value) => {\n props.input.set(value);\n }}\n data={data.slice(0, 10)}\n />\n </Flex>\n </Input.Wrapper>\n );\n }\n\n if (props.autocomplete) {\n const autocompleteProps =\n typeof props.autocomplete === \"object\" ? props.autocomplete : {};\n\n return (\n <Autocomplete\n {...inputProps}\n id={id}\n leftSection={icon}\n data={data}\n {...props.input.props}\n {...autocompleteProps}\n />\n );\n }\n\n // region <TagsInput/> - for array of strings without enum\n if ((isArray && !itemsEnum) || props.tags) {\n const tagsInputProps = typeof props.tags === \"object\" ? props.tags : {};\n return (\n <TagsInput\n {...inputProps}\n id={id}\n leftSection={icon}\n defaultValue={\n Array.isArray(props.input.props.defaultValue)\n ? props.input.props.defaultValue\n : []\n }\n onChange={(value) => {\n props.input.set(value);\n }}\n {...tagsInputProps}\n />\n );\n }\n // endregion\n\n // region <MultiSelect/> - for array of enums\n if ((isArray && itemsEnum) || props.multi) {\n const data =\n itemsEnum?.map((value: string) => ({\n value,\n label: value,\n })) || [];\n\n const multiSelectProps = typeof props.multi === \"object\" ? props.multi : {};\n\n return (\n <MultiSelect\n {...inputProps}\n id={id}\n leftSection={icon}\n data={data}\n defaultValue={\n Array.isArray(props.input.props.defaultValue)\n ? props.input.props.defaultValue\n : []\n }\n onChange={(value) => {\n props.input.set(value);\n }}\n {...multiSelectProps}\n />\n );\n }\n // endregion\n\n // region <Select/> - for single enum value\n const selectProps = typeof props.select === \"object\" ? props.select : {};\n\n return (\n <Select\n {...inputProps}\n id={id}\n leftSection={icon}\n data={data}\n {...props.input.props}\n {...selectProps}\n />\n );\n // endregion\n};\n\nexport default ControlSelect;\n","import { useFormState } from \"@alepha/react-form\";\nimport {\n ColorInput,\n type ColorInputProps,\n FileInput,\n type FileInputProps,\n Flex,\n Input,\n NumberInput,\n type NumberInputProps,\n PasswordInput,\n type PasswordInputProps,\n Switch,\n type SwitchProps,\n Textarea,\n type TextareaProps,\n TextInput,\n type TextInputProps,\n} from \"@mantine/core\";\nimport type {\n DateInputProps,\n DateTimePickerProps,\n TimeInputProps,\n} from \"@mantine/dates\";\nimport type { ComponentType } from \"react\";\nimport {\n type GenericControlProps,\n parseInput,\n} from \"../../utils/parseInput.ts\";\nimport ControlDate from \"./ControlDate.tsx\";\nimport ControlSelect, { type ControlSelectProps } from \"./ControlSelect.tsx\";\n\nexport interface ControlProps extends GenericControlProps {\n text?: TextInputProps;\n area?: boolean | TextareaProps;\n select?: boolean | Partial<ControlSelectProps>;\n password?: boolean | PasswordInputProps;\n switch?: boolean | SwitchProps;\n number?: boolean | NumberInputProps;\n file?: boolean | FileInputProps;\n color?: boolean | ColorInputProps;\n date?: boolean | DateInputProps;\n datetime?: boolean | DateTimePickerProps;\n time?: boolean | TimeInputProps;\n custom?: ComponentType<CustomControlProps>;\n}\n\n/**\n * Generic form control that renders the appropriate input based on the schema and props.\n *\n * Supports:\n * - TextInput (with format detection: email, url, tel)\n * - Textarea\n * - NumberInput (for number/integer types)\n * - FileInput\n * - ColorInput (for color format)\n * - Select (for enum types)\n * - Autocomplete\n * - PasswordInput\n * - Switch (for boolean types)\n * - SegmentedControl (for enum types)\n * - DateInput (for date format)\n * - DateTimePicker (for date-time format)\n * - TimeInput (for time format)\n * - Custom component\n *\n * Automatically handles labels, descriptions, error messages, required state, and default icons.\n */\nconst Control = (_props: ControlProps) => {\n const form = useFormState(_props.input, [\"error\"]);\n const { inputProps, id, icon, format, schema } = parseInput(_props, form);\n if (!_props.input?.props) {\n return null;\n }\n\n const props = {\n ..._props,\n ...schema.$control,\n };\n\n //region <Custom/>\n if (props.custom) {\n const Custom = props.custom;\n return (\n <Input.Wrapper {...inputProps}>\n <Flex flex={1} mt={\"calc(var(--mantine-spacing-xs) / 2)\"}>\n <Custom\n defaultValue={props.input.props.defaultValue}\n onChange={(value) => {\n props.input.set(value);\n }}\n />\n </Flex>\n </Input.Wrapper>\n );\n }\n //endregion\n\n //region <NumberInput/>\n if (\n props.number ||\n (props.input.schema &&\n \"type\" in props.input.schema &&\n (props.input.schema.type === \"number\" ||\n props.input.schema.type === \"integer\"))\n ) {\n const numberInputProps =\n typeof props.number === \"object\" ? props.number : {};\n const { type, ...inputPropsWithoutType } = props.input.props;\n return (\n <NumberInput\n {...inputProps}\n id={id}\n leftSection={icon}\n {...inputPropsWithoutType}\n {...numberInputProps}\n />\n );\n }\n //endregion\n\n //region <FileInput/>\n if (props.file) {\n const fileInputProps = typeof props.file === \"object\" ? props.file : {};\n return (\n <FileInput\n {...inputProps}\n id={id}\n leftSection={icon}\n onChange={(file) => {\n props.input.set(file);\n }}\n {...fileInputProps}\n />\n );\n }\n //endregion\n\n //region <ColorInput/>\n if (props.color || format === \"color\") {\n const colorInputProps = typeof props.color === \"object\" ? props.color : {};\n return (\n <ColorInput\n {...inputProps}\n id={id}\n leftSection={icon}\n {...props.input.props}\n {...colorInputProps}\n />\n );\n }\n //endregion\n\n //region <ControlSelect/>\n // Handle: single enum, array of enum, array of strings, or explicit select/multi/tags props\n const isEnum =\n props.input.schema &&\n \"enum\" in props.input.schema &&\n props.input.schema.enum;\n const isArray =\n props.input.schema &&\n \"type\" in props.input.schema &&\n props.input.schema.type === \"array\";\n\n if (isEnum || isArray || props.select) {\n const opts = typeof props.select === \"object\" ? props.select : {};\n return (\n <ControlSelect\n input={props.input}\n title={props.title}\n description={props.description}\n icon={icon}\n {...opts}\n />\n );\n }\n //endregion\n\n //region <Switch/>\n if (\n (props.input.schema &&\n \"type\" in props.input.schema &&\n props.input.schema.type === \"boolean\") ||\n props.switch\n ) {\n const switchProps = typeof props.switch === \"object\" ? props.switch : {};\n\n return (\n <Switch\n {...inputProps}\n id={id}\n color={\"blue\"}\n defaultChecked={props.input.props.defaultValue}\n {...props.input.props}\n {...switchProps}\n />\n );\n }\n //endregion\n\n //region <PasswordInput/>\n if (props.password || props.input.props.name?.includes(\"password\")) {\n const passwordInputProps =\n typeof props.password === \"object\" ? props.password : {};\n return (\n <PasswordInput\n {...inputProps}\n id={id}\n leftSection={icon}\n {...props.input.props}\n {...passwordInputProps}\n />\n );\n }\n //endregion\n\n //region <Textarea/>\n if (props.area) {\n const textAreaProps = typeof props.area === \"object\" ? props.area : {};\n return (\n <Textarea\n {...inputProps}\n id={id}\n leftSection={icon}\n {...props.input.props}\n {...textAreaProps}\n />\n );\n }\n //endregion\n\n //region <ControlDate/>\n // Handle: date, date-time, and time formats\n if (\n props.date ||\n props.datetime ||\n props.time ||\n format === \"date\" ||\n format === \"date-time\" ||\n format === \"time\"\n ) {\n return (\n <ControlDate\n input={props.input}\n title={props.title}\n description={props.description}\n icon={icon}\n date={props.date}\n datetime={props.datetime}\n time={props.time}\n />\n );\n }\n //endregion\n\n //region <TextInput/> with format detection\n const textInputProps = typeof props.text === \"object\" ? props.text : {};\n\n // Detect HTML5 input type from format\n const getInputType = (): string | undefined => {\n switch (format) {\n case \"email\":\n return \"email\";\n case \"url\":\n case \"uri\":\n return \"url\";\n case \"tel\":\n case \"phone\":\n return \"tel\";\n default:\n return undefined;\n }\n };\n\n return (\n <TextInput\n {...inputProps}\n id={id}\n leftSection={icon}\n type={getInputType()}\n {...props.input.props}\n {...textInputProps}\n />\n );\n //endregion\n};\n\nexport default Control;\n\nexport type CustomControlProps = {\n defaultValue: any;\n onChange: (value: any) => void;\n};\n","import type { TObject } from \"@alepha/core\";\nimport type { FormModel } from \"@alepha/react-form\";\nimport { Flex, Grid } from \"@mantine/core\";\nimport type { ReactNode } from \"react\";\nimport ActionButton, {\n type ActionSubmitButtonProps,\n} from \"../buttons/ActionButton.tsx\";\nimport Control, { type ControlProps } from \"./Control.tsx\";\n\nexport interface TypeFormProps<T extends TObject> {\n form: FormModel<T>;\n columns?:\n | number\n | {\n base?: number;\n xs?: number;\n sm?: number;\n md?: number;\n lg?: number;\n xl?: number;\n };\n children?: (input: FormModel<T>[\"input\"]) => ReactNode;\n controlProps?: Partial<Omit<ControlProps, \"input\">>;\n skipFormElement?: boolean;\n skipSubmitButton?: boolean;\n submitButtonProps?: Partial<Omit<ActionSubmitButtonProps, \"form\">>;\n resetButtonProps?: Partial<Omit<ActionSubmitButtonProps, \"form\">>;\n}\n\n/**\n * TypeForm component that automatically renders all form inputs based on schema.\n * Uses the Control component to render individual fields and Mantine Grid for responsive layout.\n *\n * @example\n * ```tsx\n * import { t } from \"alepha\";\n * import { useForm } from \"@alepha/react-form\";\n * import { TypeForm } from \"@alepha/ui\";\n *\n * const form = useForm({\n * schema: t.object({\n * username: t.text(),\n * email: t.text(),\n * age: t.integer(),\n * subscribe: t.boolean(),\n * }),\n * handler: (values) => {\n * console.log(values);\n * },\n * });\n *\n * return <TypeForm form={form} columns={2} />;\n * ```\n */\nconst TypeForm = <T extends TObject>(props: TypeFormProps<T>) => {\n const {\n form,\n columns = 3,\n children,\n controlProps,\n skipFormElement = false,\n skipSubmitButton = false,\n submitButtonProps,\n } = props;\n\n if (!form.options?.schema?.properties) {\n return null;\n }\n\n const fieldNames = Object.keys(form.options.schema.properties);\n\n // Filter out unsupported field types (objects only, arrays are now supported)\n const supportedFields = fieldNames.filter((fieldName) => {\n const field = form.input[fieldName as keyof typeof form.input];\n if (!field || typeof field !== \"object\" || !(\"schema\" in field)) {\n return false;\n }\n\n const schema: any = field.schema;\n\n // Skip if it's an object (not supported by Control)\n // Arrays are now supported via ControlSelect (MultiSelect/TagsInput)\n if (\"type\" in schema) {\n if (schema.type === \"object\") {\n return false;\n }\n }\n\n // Check if it has properties (nested object)\n if (\"properties\" in schema && schema.properties) {\n return false;\n }\n\n return true;\n });\n\n // Handle column configuration with defaults: xs=1, sm=2, lg=3\n const colSpan =\n typeof columns === \"number\"\n ? {\n xs: 12,\n sm: 6,\n lg: 12 / columns,\n }\n : {\n base: columns.base ? 12 / columns.base : undefined,\n xs: columns.xs ? 12 / columns.xs : 12,\n sm: columns.sm ? 12 / columns.sm : 6,\n md: columns.md ? 12 / columns.md : undefined,\n lg: columns.lg ? 12 / columns.lg : 4,\n xl: columns.xl ? 12 / columns.xl : undefined,\n };\n\n const renderFields = () => {\n if (children) {\n return <>{children(form.input)}</>;\n }\n\n return (\n <Grid>\n {supportedFields.map((fieldName) => {\n const field = form.input[fieldName as keyof typeof form.input];\n\n // Type guard to ensure field has the expected structure\n if (!field || typeof field !== \"object\" || !(\"schema\" in field)) {\n return null;\n }\n\n return (\n <Grid.Col key={fieldName} span={colSpan}>\n <Control input={field as any} {...controlProps} />\n </Grid.Col>\n );\n })}\n </Grid>\n );\n };\n\n const content = (\n <Flex direction={\"column\"} gap={\"sm\"}>\n {renderFields()}\n {!skipSubmitButton && (\n <Flex>\n <ActionButton form={form} {...submitButtonProps}>\n {submitButtonProps?.children ?? \"Submit\"}\n </ActionButton>\n <button type={\"reset\"}>Reset</button>\n </Flex>\n )}\n </Flex>\n );\n\n if (skipFormElement) {\n return content;\n }\n\n return <form {...form.props}>{content}</form>;\n};\n\nexport default TypeForm;\n","export const ui = {\n colors: {\n transparent: \"transparent\",\n background: \"var(--alepha-background)\",\n surface: \"var(--alepha-surface)\",\n elevated: \"var(--alepha-elevated)\",\n },\n};\n","import { useStore } from \"@alepha/react\";\nimport { Burger, type BurgerProps } from \"@mantine/core\";\n\nexport interface BurgerButtonProps extends BurgerProps {}\n\nconst BurgerButton = (props: BurgerButtonProps) => {\n const [opened, setOpened] = useStore(\"alepha.ui.sidebar.opened\");\n\n return (\n <Burger\n opened={opened}\n onClick={() => setOpened(!opened)}\n hiddenFrom=\"sm\"\n size=\"sm\"\n {...props}\n />\n );\n};\n\nexport default BurgerButton;\n","import { useI18n } from \"@alepha/react-i18n\";\nimport { IconLanguage } from \"@tabler/icons-react\";\nimport ActionButton, { type ActionProps } from \"./ActionButton.tsx\";\n\nexport interface LanguageButtonProps {\n languages?: string[];\n actionProps?: ActionProps;\n}\n\nconst LanguageButton = (props: LanguageButtonProps) => {\n const i18n = useI18n();\n return (\n <ActionButton\n icon={<IconLanguage />}\n variant={\"outline\"}\n menu={{\n items: i18n.languages.map((lang) => ({\n label: i18n.tr(lang),\n onClick: () => i18n.setLang(lang),\n active: i18n.lang === lang,\n })),\n }}\n {...props.actionProps}\n />\n );\n};\n\nexport default LanguageButton;\n","import { Divider, Flex, type FlexProps } from \"@mantine/core\";\nimport type { ReactNode } from \"react\";\nimport BurgerButton from \"../buttons/BurgerButton.tsx\";\nimport DarkModeButton, {\n type DarkModeButtonProps,\n} from \"../buttons/DarkModeButton.tsx\";\nimport LanguageButton, {\n type LanguageButtonProps,\n} from \"../buttons/LanguageButton.tsx\";\nimport OmnibarButton, {\n type OmnibarButtonProps,\n} from \"../buttons/OmnibarButton.tsx\";\n\nexport type AppBarItem =\n | AppBarElement\n | AppBarBurger\n | AppBarDark\n | AppBarSearch\n | AppBarLang\n | AppBarSpacer\n | AppBarDivider;\n\nexport interface AppBarElement {\n position: \"left\" | \"center\" | \"right\";\n element: ReactNode;\n}\n\nexport interface AppBarBurger {\n position: \"left\" | \"center\" | \"right\";\n type: \"burger\";\n}\n\nexport interface AppBarDark {\n position: \"left\" | \"center\" | \"right\";\n type: \"dark\";\n props?: DarkModeButtonProps;\n}\n\nexport interface AppBarSearch {\n position: \"left\" | \"center\" | \"right\";\n type: \"search\";\n props?: OmnibarButtonProps;\n}\n\nexport interface AppBarLang {\n position: \"left\" | \"center\" | \"right\";\n type: \"lang\";\n props?: LanguageButtonProps;\n}\n\nexport interface AppBarSpacer {\n position: \"left\" | \"center\" | \"right\";\n type: \"spacer\";\n}\n\nexport interface AppBarDivider {\n position: \"left\" | \"center\" | \"right\";\n type: \"divider\";\n}\n\nexport interface AppBarProps {\n flexProps?: FlexProps;\n items?: AppBarItem[];\n}\n\nconst AppBar = (props: AppBarProps) => {\n const { items = [] } = props;\n\n const renderItem = (item: AppBarItem, index: number) => {\n if (\"type\" in item) {\n if (item.type === \"burger\") {\n return <BurgerButton key={index} />;\n }\n if (item.type === \"dark\") {\n return <DarkModeButton key={index} {...item.props} />;\n }\n if (item.type === \"search\") {\n return <OmnibarButton key={index} {...item.props} />;\n }\n if (item.type === \"lang\") {\n return <LanguageButton key={index} {...item.props} />;\n }\n if (item.type === \"spacer\") {\n return <Flex key={index} w={16} />;\n }\n if (item.type === \"divider\") {\n return <Divider key={index} orientation=\"vertical\" />;\n }\n }\n if (\"element\" in item) {\n return item.element;\n }\n return null;\n };\n\n const leftItems = items.filter((item) => item.position === \"left\");\n const centerItems = items.filter((item) => item.position === \"center\");\n const rightItems = items.filter((item) => item.position === \"right\");\n\n return (\n <Flex\n h=\"100%\"\n align=\"center\"\n px=\"md\"\n justify=\"space-between\"\n {...props.flexProps}\n >\n <Flex flex={1}>\n {leftItems.map((item, index) => (\n <Flex key={index} ml={index === 0 ? 0 : \"md\"} align=\"center\">\n {renderItem(item, index)}\n </Flex>\n ))}\n </Flex>\n <Flex>\n {centerItems.map((item, index) => (\n <Flex key={index} mx=\"md\" align=\"center\">\n {renderItem(item, index)}\n </Flex>\n ))}\n </Flex>\n <Flex flex={1} gap=\"md\" align={\"center\"} justify={\"end\"}>\n {rightItems.map((item, index) => (\n <Flex key={index} ml={index === 0 ? 0 : \"md\"} align=\"center\">\n {renderItem(item, index)}\n </Flex>\n ))}\n </Flex>\n </Flex>\n );\n};\n\nexport default AppBar;\n","import { useEvents, useRouter } from \"@alepha/react\";\nimport {\n Flex,\n type FlexProps,\n type MantineBreakpoint,\n Text,\n ThemeIcon,\n} from \"@mantine/core\";\nimport {\n IconChevronDown,\n IconChevronRight,\n IconSquareRounded,\n} from \"@tabler/icons-react\";\nimport { type ReactNode, useCallback, useState } from \"react\";\nimport ActionButton, { type ActionProps } from \"../buttons/ActionButton.tsx\";\nimport OmnibarButton from \"../buttons/OmnibarButton.tsx\";\n\nexport interface SidebarProps {\n menu?: SidebarNode[];\n top?: SidebarNode[];\n bottom?: SidebarNode[];\n onItemClick?: (item: SidebarMenuItem) => void;\n onSearchClick?: () => void;\n theme?: SidebarTheme;\n flexProps?: Partial<FlexProps>;\n collapsed?: boolean;\n gap?: MantineBreakpoint;\n}\n\nexport const Sidebar = (props: SidebarProps) => {\n const router = useRouter();\n const { top = [], bottom = [], onItemClick } = props;\n\n const renderNode = (item: SidebarNode, key: number) => {\n if (\"type\" in item) {\n if (item.type === \"spacer\") {\n return <Flex key={key} h={16} />;\n }\n\n if (item.type === \"divider\") {\n return (\n <Flex\n key={key}\n h={1}\n bg={\"var(--alepha-border)\"}\n my={\"md\"}\n mx={\"sm\"}\n />\n );\n }\n\n if (item.type === \"search\") {\n return <OmnibarButton collapsed={props.collapsed} key={key} />;\n }\n\n if (item.type === \"section\") {\n if (props.collapsed) return;\n return (\n <Text\n key={key}\n size={\"xs\"}\n c={\"dimmed\"}\n mt={\"md\"}\n mb={\"xs\"}\n mx={\"sm\"}\n tt={\"uppercase\"}\n fw={\"bold\"}\n >\n {item.label}\n </Text>\n );\n }\n }\n\n if (\"element\" in item) {\n return <Flex key={key}>{item.element}</Flex>;\n }\n\n if (props.collapsed) {\n return (\n <SidebarCollapsedItem\n key={key}\n item={item}\n level={0}\n onItemClick={onItemClick}\n theme={props.theme ?? {}}\n />\n );\n }\n\n return (\n <SidebarItem\n key={key}\n item={item}\n level={0}\n onItemClick={onItemClick}\n theme={props.theme ?? {}}\n />\n );\n };\n\n const padding = \"md\";\n const gap = props.gap;\n const menu =\n props.menu ??\n (router.concretePages.map((page) => ({\n label: page.label ?? page.name,\n description: page.description,\n icon: page.icon,\n href: page.path,\n })) as SidebarMenuItem[]);\n\n return (\n <Flex\n flex={1}\n py={padding}\n direction={\"column\"}\n className={\"overflow-auto\"}\n {...props.flexProps}\n >\n <Flex gap={gap} px={padding} direction={\"column\"}>\n {top.map((item, index) => renderNode(item, index))}\n {menu\n .filter((it) => it.position === \"top\")\n .map((item, index) => renderNode(item, index + top.length))}\n </Flex>\n <Flex\n gap={gap}\n px={padding}\n direction={\"column\"}\n flex={1}\n className={\"overflow-auto\"}\n >\n {menu\n .filter((it) => !it.position)\n .map((item, index) => renderNode(item, index))}\n </Flex>\n <Flex gap={gap} px={padding} direction={\"column\"}>\n {bottom.map((item, index) => renderNode(item, index))}\n {menu\n .filter((it) => it.position === \"bottom\")\n .map((item, index) => renderNode(item, index + bottom.length))}\n </Flex>\n </Flex>\n );\n};\n\n// ---------------------------------------------------------------------------------------------------------------------\n\nexport interface SidebarItemProps {\n item: SidebarMenuItem;\n level: number;\n onItemClick?: (item: SidebarMenuItem) => void;\n theme: SidebarTheme;\n}\n\nexport const SidebarItem = (props: SidebarItemProps) => {\n const { item, level } = props;\n const maxLevel = 2; // 0, 1, 2 = 3 levels total\n\n const router = useRouter();\n const isActive = useCallback((item: SidebarMenuItem): boolean => {\n if (!item.children) return false;\n for (const child of item.children) {\n if (child.href) {\n if (router.isActive(child.href)) {\n return true;\n }\n }\n if (isActive(child)) {\n return true;\n }\n }\n return false;\n }, []);\n\n const [isOpen, setIsOpen] = useState<boolean>(isActive(item));\n\n useEvents(\n {\n \"react:transition:end\": () => {\n // recalculate open state on transition end to ensure correct state after navigation\n if (isActive(item)) {\n setIsOpen(true);\n }\n },\n },\n [],\n );\n\n if (level > maxLevel) return null;\n\n const handleItemClick = (e: MouseEvent) => {\n e.preventDefault();\n if (item.children && item.children.length > 0) {\n setIsOpen(!isOpen);\n } else {\n props.onItemClick?.(item);\n item.onClick?.();\n }\n };\n\n return (\n <Flex direction={\"column\"} ps={level === 0 ? 0 : 32} pos={\"relative\"}>\n <ActionButton\n w={\"100%\"}\n justify=\"space-between\"\n href={props.item.href}\n variant={\"subtle\"}\n size={\n props.item.theme?.size ??\n props.theme.button?.size ??\n (level === 0 ? \"sm\" : \"xs\")\n }\n variantActive={\"default\"}\n radius={props.item.theme?.radius ?? props.theme.button?.radius ?? \"md\"}\n onClick={handleItemClick}\n leftSection={\n <Flex w={\"100%\"} align=\"center\" gap={\"sm\"}>\n {item.icon && (\n <ThemeIcon\n size={level === 0 ? \"sm\" : \"xs\"}\n variant={\"transparent\"}\n >\n {item.icon}\n </ThemeIcon>\n )}\n <Flex direction={\"column\"}>\n <Flex>{item.label}</Flex>\n {item.description && (\n <Text size={\"xs\"} c={\"dimmed\"}>\n {item.description}\n </Text>\n )}\n </Flex>\n </Flex>\n }\n rightSection={\n item.children ? (\n <Flex>\n {isOpen ? (\n <IconChevronDown size={14} />\n ) : (\n <IconChevronRight size={14} />\n )}\n </Flex>\n ) : (\n props.item.rightSection\n )\n }\n {...props.item.actionProps}\n />\n\n {item.children && isOpen && (\n <Flex direction={\"column\"} data-parent-level={level}>\n <Flex\n style={{\n position: \"absolute\",\n width: 1,\n background:\n \"linear-gradient(to bottom, transparent, var(--alepha-border), transparent)\",\n top: 48,\n left: 20 + 32 * level,\n bottom: 16,\n }}\n />\n {item.children.map((child, index) => (\n <SidebarItem\n key={index}\n item={child}\n level={level + 1}\n onItemClick={props.onItemClick}\n theme={props.theme}\n />\n ))}\n </Flex>\n )}\n </Flex>\n );\n};\n\n// ---------------------------------------------------------------------------------------------------------------------\n\nexport interface SidebarItemProps {\n item: SidebarMenuItem;\n level: number;\n onItemClick?: (item: SidebarMenuItem) => void;\n theme: SidebarTheme;\n}\n\nconst SidebarCollapsedItem = (props: SidebarItemProps) => {\n const { item, level } = props;\n\n const router = useRouter();\n const isActive = useCallback((item: SidebarMenuItem): boolean => {\n if (!item.children) return false;\n for (const child of item.children) {\n if (child.href) {\n if (router.isActive(child.href)) {\n return true;\n }\n }\n if (isActive(child)) {\n return true;\n }\n }\n return false;\n }, []);\n\n const [isOpen, setIsOpen] = useState<boolean>(isActive(item));\n\n const handleItemClick = (e: MouseEvent) => {\n e.preventDefault();\n if (item.children && item.children.length > 0) {\n setIsOpen(!isOpen);\n } else {\n props.onItemClick?.(item);\n item.onClick?.();\n }\n };\n\n return (\n <ActionButton\n variant={\"subtle\"}\n size={\n props.item.theme?.size ??\n props.theme.button?.size ??\n (level === 0 ? \"sm\" : \"xs\")\n }\n variantActive={\"default\"}\n radius={props.item.theme?.radius ?? props.theme.button?.radius ?? \"md\"}\n onClick={handleItemClick}\n icon={item.icon ?? <IconSquareRounded />}\n href={props.item.href}\n menu={\n item.children\n ? {\n position: \"right\",\n on: \"hover\",\n items: item.children.map((child) => ({\n label: child.label,\n href: child.href,\n icon: child.icon,\n children: child.children,\n })),\n }\n : undefined\n }\n {...props.item.actionProps}\n />\n );\n};\n\n// ---------------------------------------------------------------------------------------------------------------------\n\nexport type SidebarNode =\n | SidebarMenuItem\n | SidebarSpacer\n | SidebarDivider\n | SidebarSearch\n | SidebarElement\n | SidebarSection;\n\nexport interface SidebarAbstractItem {\n position?: \"top\" | \"bottom\";\n}\n\nexport interface SidebarElement extends SidebarAbstractItem {\n element: ReactNode;\n}\n\nexport interface SidebarSpacer extends SidebarAbstractItem {\n type: \"spacer\";\n}\n\nexport interface SidebarDivider extends SidebarAbstractItem {\n type: \"divider\";\n}\n\nexport interface SidebarSearch extends SidebarAbstractItem {\n type: \"search\";\n}\n\nexport interface SidebarSection extends SidebarAbstractItem {\n type: \"section\";\n label: string;\n}\n\nexport interface SidebarMenuItem extends SidebarAbstractItem {\n label: string | ReactNode;\n description?: string;\n icon?: ReactNode;\n href?: string;\n activeStartsWith?: boolean; // Use startWith matching for active state\n onClick?: () => void;\n children?: SidebarMenuItem[];\n rightSection?: ReactNode;\n theme?: SidebarButtonTheme;\n actionProps?: ActionProps;\n}\n\nexport interface SidebarButtonTheme {\n radius?: MantineBreakpoint;\n size?: MantineBreakpoint;\n}\n\nexport interface SidebarTheme {\n button?: SidebarButtonTheme;\n search?: SidebarButtonTheme;\n}\n","import { NestedView, useEvents, useStore } from \"@alepha/react\";\nimport {\n AppShell,\n type AppShellFooterProps,\n type AppShellHeaderProps,\n type AppShellMainProps,\n type AppShellNavbarProps,\n type AppShellProps,\n} from \"@mantine/core\";\nimport type { ReactNode } from \"react\";\nimport { ui } from \"../../constants/ui.ts\";\nimport AppBar, { type AppBarProps } from \"./AppBar.tsx\";\nimport { Sidebar, type SidebarProps } from \"./Sidebar.tsx\";\n\nexport interface AdminShellProps {\n appShellProps?: Partial<AppShellProps>;\n appShellMainProps?: Partial<AppShellMainProps>;\n appShellHeaderProps?: Partial<AppShellHeaderProps>;\n appShellNavbarProps?: Partial<AppShellNavbarProps>;\n appShellFooterProps?: Partial<AppShellFooterProps>;\n sidebarProps?: Partial<SidebarProps>;\n appBarProps?: Partial<AppBarProps>;\n header?: ReactNode;\n footer?: ReactNode;\n children?: ReactNode;\n}\n\ndeclare module \"@alepha/core\" {\n interface State {\n \"alepha.ui.sidebar.opened\"?: boolean;\n \"alepha.ui.sidebar.collapsed\"?: boolean;\n }\n}\n\nconst AdminShell = (props: AdminShellProps) => {\n const [opened, setOpened] = useStore(\"alepha.ui.sidebar.opened\");\n const [collapsed] = useStore(\n \"alepha.ui.sidebar.collapsed\",\n props.sidebarProps?.collapsed,\n );\n\n useEvents(\n {\n \"react:transition:begin\": () => {\n setOpened(false);\n },\n },\n [],\n );\n\n // Default AppBar items with burger button on the left\n const defaultAppBarItems = [\n { position: \"left\" as const, type: \"burger\" as const },\n ];\n\n return (\n <AppShell\n padding=\"md\"\n header={{ height: 60 }}\n navbar={\n props.sidebarProps !== undefined\n ? {\n width: collapsed ? { base: 72 } : { base: 300 },\n breakpoint: \"sm\",\n collapsed: { mobile: !opened },\n }\n : undefined\n }\n footer={props.footer ? { height: 60 } : undefined}\n {...props.appShellProps}\n >\n <AppShell.Header bg={ui.colors.surface} {...props.appShellHeaderProps}>\n {props.header ?? (\n <AppBar items={defaultAppBarItems} {...props.appBarProps} />\n )}\n </AppShell.Header>\n\n {props.sidebarProps !== undefined && (\n <AppShell.Navbar bg={ui.colors.surface} {...props.appShellNavbarProps}>\n <Sidebar collapsed={collapsed} {...props.sidebarProps} />\n </AppShell.Navbar>\n )}\n\n <AppShell.Main {...props.appShellMainProps}>\n {props.children ?? <NestedView />}\n </AppShell.Main>\n\n {props.footer && (\n <AppShell.Footer bg={ui.colors.surface} {...props.appShellFooterProps}>\n {props.footer}\n </AppShell.Footer>\n )}\n </AppShell>\n );\n};\n\nexport default AdminShell;\n","import type { Async } from \"@alepha/core\";\nimport type { TableTrProps } from \"@mantine/core\";\nimport { Table, type TableProps } from \"@mantine/core\";\nimport { type ReactNode, useEffect, useState } from \"react\";\nimport ActionButton from \"../buttons/ActionButton.tsx\";\n\nexport interface DataTableColumn<T extends object> {\n label: string;\n value: (item: T) => ReactNode;\n}\n\nexport interface DataTableProps<T extends object> {\n items: T[] | (() => Async<T[]>);\n columns: {\n [key: string]: DataTableColumn<T>;\n };\n tableProps?: TableProps;\n tableTrProps?: (item: T) => TableTrProps;\n}\n\nconst DataTable = <T extends object>(props: DataTableProps<T>) => {\n const [items, setItems] = useState<object[]>(\n typeof props.items === \"function\" ? [] : props.items,\n );\n\n useEffect(() => {\n if (typeof props.items !== \"function\") {\n setItems(props.items);\n }\n }, [props.items]);\n\n const head = Object.entries(props.columns).map(([key, col]) => (\n <Table.Th key={key}>\n <ActionButton justify={\"space-between\"} radius={0} fullWidth size={\"xs\"}>\n {col.label}\n </ActionButton>\n </Table.Th>\n ));\n\n const rows = items.map((item, index) => {\n const trProps = props.tableTrProps\n ? props.tableTrProps(item as T)\n : ({} as TableTrProps);\n return (\n <Table.Tr key={JSON.stringify(item)} {...trProps}>\n {Object.entries(props.columns).map(([key, col]) => (\n <Table.Td key={key}>{col.value(item as T)}</Table.Td>\n ))}\n </Table.Tr>\n );\n });\n\n return (\n <Table {...props.tableProps}>\n <Table.Thead>\n <Table.Tr>{head}</Table.Tr>\n </Table.Thead>\n <Table.Tbody>{rows}</Table.Tbody>\n </Table>\n );\n};\n\nexport default DataTable;\n","import { useInject } from \"@alepha/react\";\nimport { DialogService } from \"../services/DialogService.tsx\";\n\n/**\n * Use this hook to access the Dialog Service for showing various dialog types.\n *\n * @example\n * const dialog = useDialog();\n * await dialog.alert({ title: \"Alert\", message: \"This is an alert message\" });\n * const confirmed = await dialog.confirm({ title: \"Confirm\", message: \"Are you sure?\" });\n * const input = await dialog.prompt({ title: \"Input\", message: \"Enter your name:\" });\n */\nexport const useDialog = (): DialogService => {\n return useInject(DialogService);\n};\n","import { $module } from \"@alepha/core\";\nimport { AlephaReactForm } from \"@alepha/react-form\";\nimport { AlephaReactHead } from \"@alepha/react-head\";\nimport { AlephaReactI18n } from \"@alepha/react-i18n\";\nimport type { ReactNode } from \"react\";\nimport type { ControlProps } from \"./components/form/Control.tsx\";\nimport { RootRouter } from \"./RootRouter.ts\";\nimport { DialogService } from \"./services/DialogService.tsx\";\nimport { ToastService } from \"./services/ToastService.tsx\";\n\n// ---------------------------------------------------------------------------------------------------------------------\n\nexport { Flex, Text } from \"@mantine/core\";\nexport type {\n ActionClickButtonProps,\n ActionCommonProps,\n ActionMenuConfig,\n ActionMenuItem,\n ActionNavigationButtonProps,\n ActionProps,\n ActionSubmitButtonProps,\n} from \"./components/buttons/ActionButton.tsx\";\nexport { default as ActionButton } from \"./components/buttons/ActionButton.tsx\";\nexport { default as DarkModeButton } from \"./components/buttons/DarkModeButton.tsx\";\nexport { default as OmnibarButton } from \"./components/buttons/OmnibarButton.tsx\";\nexport { default as AlertDialog } from \"./components/dialogs/AlertDialog.tsx\";\nexport { default as ConfirmDialog } from \"./components/dialogs/ConfirmDialog.tsx\";\nexport { default as PromptDialog } from \"./components/dialogs/PromptDialog.tsx\";\nexport { default as Control } from \"./components/form/Control.tsx\";\nexport { default as ControlDate } from \"./components/form/ControlDate.tsx\";\nexport { default as ControlSelect } from \"./components/form/ControlSelect.tsx\";\nexport { default as TypeForm } from \"./components/form/TypeForm.tsx\";\nexport { default as AdminShell } from \"./components/layout/AdminShell.tsx\";\nexport { default as AlephaMantineProvider } from \"./components/layout/AlephaMantineProvider.tsx\";\nexport type {\n AppBarBurger,\n AppBarDark,\n AppBarDivider,\n AppBarElement,\n AppBarItem,\n AppBarLang,\n AppBarProps,\n AppBarSearch,\n AppBarSpacer,\n} from \"./components/layout/AppBar.tsx\";\nexport { default as AppBar } from \"./components/layout/AppBar.tsx\";\nexport { default as Omnibar } from \"./components/layout/Omnibar.tsx\";\nexport type {\n SidebarAbstractItem,\n SidebarButtonTheme,\n SidebarDivider,\n SidebarElement,\n SidebarItemProps,\n SidebarMenuItem,\n SidebarNode,\n SidebarProps,\n SidebarSearch,\n SidebarSection,\n SidebarSpacer,\n SidebarTheme,\n} from \"./components/layout/Sidebar.tsx\";\nexport { Sidebar } from \"./components/layout/Sidebar.tsx\";\nexport type {\n DataTableColumn,\n DataTableProps,\n} from \"./components/table/DataTable.tsx\";\nexport { default as DataTable } from \"./components/table/DataTable.tsx\";\nexport * from \"./constants/ui.ts\";\nexport { useDialog } from \"./hooks/useDialog.ts\";\nexport { useToast } from \"./hooks/useToast.ts\";\nexport * from \"./RootRouter.ts\";\nexport type {\n AlertDialogOptions,\n AlertDialogProps,\n BaseDialogOptions,\n ConfirmDialogOptions,\n ConfirmDialogProps,\n PromptDialogOptions,\n PromptDialogProps,\n} from \"./services/DialogService.tsx\";\nexport { DialogService } from \"./services/DialogService.tsx\";\nexport { ToastService } from \"./services/ToastService.tsx\";\nexport * from \"./utils/icons.tsx\";\nexport * from \"./utils/string.ts\";\n\n// ---------------------------------------------------------------------------------------------------------------------\n\ndeclare module \"typebox\" {\n interface TSchemaOptions {\n $control?: Omit<ControlProps, \"input\">;\n }\n}\n\ndeclare module \"@alepha/react\" {\n interface PageDescriptorOptions {\n /**\n * Human-readable title for the page.\n * - for Sidebar navigation\n * - for Omnibar navigation\n * (soon)\n * - for Breadcrumbs\n * - for document title (with AlephaReactHead)\n */\n label?: string;\n\n /**\n * Optional description of the page.\n */\n description?: string;\n\n /**\n * Optional icon for the page.\n */\n icon?: ReactNode;\n }\n}\n\n// ---------------------------------------------------------------------------------------------------------------------\n\n/**\n * Mantine\n *\n * @module alepha.ui\n */\nexport const AlephaUI = $module({\n name: \"alepha.ui\",\n services: [DialogService, ToastService, RootRouter],\n register: (alepha) => {\n alepha.with(AlephaReactI18n);\n alepha.with(AlephaReactHead);\n alepha.with(AlephaReactForm);\n alepha.with(DialogService);\n alepha.with(ToastService);\n },\n});\n"],"mappings":";;;;;;;;;;;;;;;AAEA,IAAa,aAAb,MAAwB;CACtB,AAAgB,OAAO,MAAM;EAC3B,MAAM;EACN,YAAY,OAAO;EACpB,CAAC;;;;;ACHJ,MAAM,eAAe,EAAE,SAAS,cAC9B,4CACG,SAAS,WAAW,oBAACA;CAAK,IAAG;WAAM,QAAQ;EAAe,EAC3D,oBAAC;CAAM,SAAQ;WACb,oBAAC;EAAO,SAAS;YAAU,SAAS,WAAW;GAAc;EACvD,IACP;AAGL,0BAAe;;;;ACTf,MAAM,iBAAiB,EAAE,SAAS,gBAChC,4CACG,SAAS,WAAW,oBAACC;CAAK,IAAG;WAAM,QAAQ;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