@alepha/ui 0.18.0 → 0.18.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. package/dist/admin/{AdminApiKeys-C-6_Q-lH.js → AdminApiKeys-BJhIwfD6.js} +17 -38
  2. package/dist/admin/AdminApiKeys-BJhIwfD6.js.map +1 -0
  3. package/dist/admin/{AdminAudits-Bgbf04hO.js → AdminAudits-DzD_4cDt.js} +23 -19
  4. package/dist/admin/AdminAudits-DzD_4cDt.js.map +1 -0
  5. package/dist/admin/AdminDashboard-C92tIc6x.js +67 -0
  6. package/dist/admin/AdminDashboard-C92tIc6x.js.map +1 -0
  7. package/dist/admin/{AdminFiles-B9a7G3cY.js → AdminFiles-DLpfhBkf.js} +3 -7
  8. package/dist/admin/AdminFiles-DLpfhBkf.js.map +1 -0
  9. package/dist/admin/{AdminJobDashboard-DaTwf5OY.js → AdminJobDashboard-KIOkeMgE.js} +2 -2
  10. package/dist/admin/{AdminJobDashboard-DaTwf5OY.js.map → AdminJobDashboard-KIOkeMgE.js.map} +1 -1
  11. package/dist/admin/{AdminJobExecutions-B9cek5dl.js → AdminJobExecutions-D0Yo_PU0.js} +24 -36
  12. package/dist/admin/AdminJobExecutions-D0Yo_PU0.js.map +1 -0
  13. package/dist/admin/{AdminJobRegistry-DFgV3oqx.js → AdminJobRegistry-PFajqaGK.js} +10 -18
  14. package/dist/admin/AdminJobRegistry-PFajqaGK.js.map +1 -0
  15. package/dist/admin/AdminLayout-B1DXZHDn.js +61 -0
  16. package/dist/admin/AdminLayout-B1DXZHDn.js.map +1 -0
  17. package/dist/admin/{AdminParameters-DHw9ATgl.js → AdminParameters-BspPeqp_.js} +2 -2
  18. package/dist/admin/{AdminParameters-DHw9ATgl.js.map → AdminParameters-BspPeqp_.js.map} +1 -1
  19. package/dist/admin/{AdminSessions-BhGJPI3z.js → AdminSessions-BnH5CZQl.js} +48 -53
  20. package/dist/admin/AdminSessions-BnH5CZQl.js.map +1 -0
  21. package/dist/admin/{AdminUserLayout-BdC4Te8m.js → AdminUserLayout-DUbC6-BI.js} +2 -2
  22. package/dist/admin/{AdminUserLayout-BdC4Te8m.js.map → AdminUserLayout-DUbC6-BI.js.map} +1 -1
  23. package/dist/admin/{AdminUserProfile-DAt23fqY.js → AdminUserProfile-DuTUnjdG.js} +3 -3
  24. package/dist/admin/{AdminUserProfile-DAt23fqY.js.map → AdminUserProfile-DuTUnjdG.js.map} +1 -1
  25. package/dist/admin/{AdminUserSessions-1uzcx02z.js → AdminUserSessions-DvZdAGpL.js} +33 -35
  26. package/dist/admin/AdminUserSessions-DvZdAGpL.js.map +1 -0
  27. package/dist/admin/AdminUsers-CR9z0g_5.js +206 -0
  28. package/dist/admin/AdminUsers-CR9z0g_5.js.map +1 -0
  29. package/dist/admin/{AuthLayout-DFJvCvzw.js → AuthLayout-DsUfp9RG.js} +2 -2
  30. package/dist/admin/{AuthLayout-DFJvCvzw.js.map → AuthLayout-DsUfp9RG.js.map} +1 -1
  31. package/dist/admin/{IconGoogle-CSQLPYwX.js → IconGoogle-Ch1m3Uzl.js} +1 -1
  32. package/dist/admin/{IconGoogle-CSQLPYwX.js.map → IconGoogle-Ch1m3Uzl.js.map} +1 -1
  33. package/dist/admin/{Login-BGheURrg.js → Login-DHbYJKwg.js} +3 -3
  34. package/dist/{auth/Login-Denw_UGy.js.map → admin/Login-DHbYJKwg.js.map} +1 -1
  35. package/dist/{auth/Profile-BMX_Ar_s.js → admin/Profile-B2EcIDB9.js} +2 -2
  36. package/dist/{auth/Profile-BMX_Ar_s.js.map → admin/Profile-B2EcIDB9.js.map} +1 -1
  37. package/dist/admin/{Register-Cs10l8vX.js → Register-Z3fxRbUF.js} +3 -3
  38. package/dist/{demo/Register-a70LPgs2.js.map → admin/Register-Z3fxRbUF.js.map} +1 -1
  39. package/dist/admin/{ResetPassword-BwDdfkGH.js → ResetPassword-_Y1qTTKh.js} +2 -2
  40. package/dist/admin/{ResetPassword-BwDdfkGH.js.map → ResetPassword-_Y1qTTKh.js.map} +1 -1
  41. package/dist/admin/{VerifyEmail-DfXHAiQl.js → VerifyEmail-Bg22bwcC.js} +2 -2
  42. package/dist/admin/{VerifyEmail-DfXHAiQl.js.map → VerifyEmail-Bg22bwcC.js.map} +1 -1
  43. package/dist/admin/{core-2xoLiT0o.js → core-BVO_TQxb.js} +1474 -233
  44. package/dist/admin/core-BVO_TQxb.js.map +1 -0
  45. package/dist/admin/index.d.ts +29 -4
  46. package/dist/admin/index.d.ts.map +1 -1
  47. package/dist/admin/index.js +448 -69
  48. package/dist/admin/index.js.map +1 -1
  49. package/dist/auth/{AuthLayout-CAE1pX9s.js → AuthLayout-C161NeF6.js} +2 -2
  50. package/dist/auth/{AuthLayout-CAE1pX9s.js.map → AuthLayout-C161NeF6.js.map} +1 -1
  51. package/dist/auth/{Login-Denw_UGy.js → Login-C7jIqf00.js} +2 -2
  52. package/dist/{admin/Login-BGheURrg.js.map → auth/Login-C7jIqf00.js.map} +1 -1
  53. package/dist/{admin/Profile-B-c9pCPf.js → auth/Profile-BMpXJ0oi.js} +2 -2
  54. package/dist/{demo/Profile-CWqti7FB.js.map → auth/Profile-BMpXJ0oi.js.map} +1 -1
  55. package/dist/auth/{Register-6hi_cpfF.js → Register-2gx8qll-.js} +2 -2
  56. package/dist/auth/{Register-6hi_cpfF.js.map → Register-2gx8qll-.js.map} +1 -1
  57. package/dist/{demo/ResetPassword-DWN0lzr5.js → auth/ResetPassword-DBxt9hKk.js} +2 -2
  58. package/dist/auth/{ResetPassword-CqfTk1FI.js.map → ResetPassword-DBxt9hKk.js.map} +1 -1
  59. package/dist/{demo/VerifyEmail-DZWL72K4.js → auth/VerifyEmail-Z80Ubajk.js} +2 -2
  60. package/dist/auth/{VerifyEmail-nWiSTMjF.js.map → VerifyEmail-Z80Ubajk.js.map} +1 -1
  61. package/dist/auth/{core-niW0sFLv.js → core-DyfeVr5c.js} +1002 -38
  62. package/dist/auth/core-DyfeVr5c.js.map +1 -0
  63. package/dist/auth/index.d.ts +12 -1
  64. package/dist/auth/index.d.ts.map +1 -1
  65. package/dist/auth/index.js +12 -13
  66. package/dist/auth/index.js.map +1 -1
  67. package/dist/core/index.d.ts +95 -14
  68. package/dist/core/index.d.ts.map +1 -1
  69. package/dist/core/index.js +1473 -232
  70. package/dist/core/index.js.map +1 -1
  71. package/dist/demo/{AuthLayout-jLa0aKsI.js → AuthLayout-DN-ClJQk.js} +2 -2
  72. package/dist/demo/{AuthLayout-jLa0aKsI.js.map → AuthLayout-DN-ClJQk.js.map} +1 -1
  73. package/dist/demo/{DemoButton-BmaWZVwf.js → DemoButton-CGUyR9eM.js} +3 -3
  74. package/dist/demo/{DemoButton-BmaWZVwf.js.map → DemoButton-CGUyR9eM.js.map} +1 -1
  75. package/dist/demo/{DemoDataTable-Z9xyV221.js → DemoDataTable-QFG-xXSx.js} +15 -19
  76. package/dist/demo/DemoDataTable-QFG-xXSx.js.map +1 -0
  77. package/dist/demo/{DemoDialog-4ItHLf9t.js → DemoDialog-DW8QEvD1.js} +2 -2
  78. package/dist/demo/{DemoDialog-4ItHLf9t.js.map → DemoDialog-DW8QEvD1.js.map} +1 -1
  79. package/dist/demo/{DemoFlex-EtVq8QfX.js → DemoFlex-CAhLUanT.js} +3 -3
  80. package/dist/demo/{DemoFlex-EtVq8QfX.js.map → DemoFlex-CAhLUanT.js.map} +1 -1
  81. package/dist/demo/{DemoHeading-BS-vGfkI.js → DemoHeading-yIFmNjHB.js} +3 -3
  82. package/dist/demo/{DemoHeading-BS-vGfkI.js.map → DemoHeading-yIFmNjHB.js.map} +1 -1
  83. package/dist/demo/{DemoHome-Clbn8AmS.js → DemoHome-BSGuBHus.js} +2 -2
  84. package/dist/demo/{DemoHome-Clbn8AmS.js.map → DemoHome-BSGuBHus.js.map} +1 -1
  85. package/dist/demo/{DemoJsonViewer-DkIX_ky2.js → DemoJsonViewer-DsA2IpgV.js} +3 -3
  86. package/dist/demo/{DemoJsonViewer-DkIX_ky2.js.map → DemoJsonViewer-DsA2IpgV.js.map} +1 -1
  87. package/dist/demo/{DemoLayout-C56xb5EE.js → DemoLayout-Cy6xjn6P.js} +2 -2
  88. package/dist/demo/{DemoLayout-C56xb5EE.js.map → DemoLayout-Cy6xjn6P.js.map} +1 -1
  89. package/dist/demo/{DemoLogin-BZwpicOS.js → DemoLogin-vqxgTu4P.js} +8 -8
  90. package/dist/demo/{DemoLogin-BZwpicOS.js.map → DemoLogin-vqxgTu4P.js.map} +1 -1
  91. package/dist/demo/{DemoRegister-C7_qc4MJ.js → DemoRegister-YHPvPg77.js} +8 -8
  92. package/dist/demo/{DemoRegister-C7_qc4MJ.js.map → DemoRegister-YHPvPg77.js.map} +1 -1
  93. package/dist/demo/{DemoResetPassword-BI1Ct4Dw.js → DemoResetPassword-mOW18Zlm.js} +8 -8
  94. package/dist/demo/{DemoResetPassword-BI1Ct4Dw.js.map → DemoResetPassword-mOW18Zlm.js.map} +1 -1
  95. package/dist/demo/{DemoSidebar-CcBo4ltC.js → DemoSidebar-od7aLjP_.js} +3 -3
  96. package/dist/demo/{DemoSidebar-CcBo4ltC.js.map → DemoSidebar-od7aLjP_.js.map} +1 -1
  97. package/dist/demo/{DemoText-CzXuUn3g.js → DemoText-DU3JeRS0.js} +3 -3
  98. package/dist/demo/{DemoText-CzXuUn3g.js.map → DemoText-DU3JeRS0.js.map} +1 -1
  99. package/dist/demo/{DemoToast-BgHDhWrX.js → DemoToast-CUJEiPRa.js} +2 -2
  100. package/dist/demo/{DemoToast-BgHDhWrX.js.map → DemoToast-CUJEiPRa.js.map} +1 -1
  101. package/dist/demo/{DemoTypeForm-DDzWoMSV.js → DemoTypeForm-C1dNkahD.js} +3 -3
  102. package/dist/demo/{DemoTypeForm-DDzWoMSV.js.map → DemoTypeForm-C1dNkahD.js.map} +1 -1
  103. package/dist/demo/{DemoVerifyEmail-C_Irdnov.js → DemoVerifyEmail-D9EcXZ38.js} +8 -8
  104. package/dist/demo/{DemoVerifyEmail-C_Irdnov.js.map → DemoVerifyEmail-D9EcXZ38.js.map} +1 -1
  105. package/dist/demo/{Login-hSOU3jZc.js → Login-CoYf_P_F.js} +2 -2
  106. package/dist/demo/{Login-hSOU3jZc.js.map → Login-CoYf_P_F.js.map} +1 -1
  107. package/dist/demo/{Profile-CWqti7FB.js → Profile-BE_Y3co2.js} +2 -2
  108. package/dist/{admin/Profile-B-c9pCPf.js.map → demo/Profile-BE_Y3co2.js.map} +1 -1
  109. package/dist/demo/{Register-a70LPgs2.js → Register-fXHmBpr3.js} +2 -2
  110. package/dist/{admin/Register-Cs10l8vX.js.map → demo/Register-fXHmBpr3.js.map} +1 -1
  111. package/dist/{auth/ResetPassword-CqfTk1FI.js → demo/ResetPassword-CAPj8MO3.js} +2 -2
  112. package/dist/demo/{ResetPassword-DWN0lzr5.js.map → ResetPassword-CAPj8MO3.js.map} +1 -1
  113. package/dist/demo/{Showcase-Dq3MISpd.js → Showcase-BtEU0pY9.js} +2 -2
  114. package/dist/demo/{Showcase-Dq3MISpd.js.map → Showcase-BtEU0pY9.js.map} +1 -1
  115. package/dist/{auth/VerifyEmail-nWiSTMjF.js → demo/VerifyEmail-DFmdCdYs.js} +2 -2
  116. package/dist/demo/{VerifyEmail-DZWL72K4.js.map → VerifyEmail-DFmdCdYs.js.map} +1 -1
  117. package/dist/demo/{auth-d6n3xbug.js → auth-Djd7SKiw.js} +8 -8
  118. package/dist/demo/{auth-d6n3xbug.js.map → auth-Djd7SKiw.js.map} +1 -1
  119. package/dist/demo/{core-RCUw1Q-a.js → core-B7LNjM78.js} +1484 -226
  120. package/dist/demo/core-B7LNjM78.js.map +1 -0
  121. package/dist/demo/index.js +17 -17
  122. package/package.json +4 -4
  123. package/src/admin/{AdminRouter.ts → AdminRouter.tsx} +128 -19
  124. package/src/admin/components/AdminDashboard.tsx +52 -0
  125. package/src/admin/components/AdminLayout.tsx +32 -40
  126. package/src/admin/components/audits/AdminAudits.tsx +22 -16
  127. package/src/admin/components/files/AdminFiles.tsx +1 -6
  128. package/src/admin/components/jobs/AdminJobExecutions.tsx +33 -39
  129. package/src/admin/components/jobs/AdminJobRegistry.tsx +9 -18
  130. package/src/admin/components/keys/AdminApiKeys.tsx +23 -41
  131. package/src/admin/components/sessions/AdminSessions.tsx +71 -71
  132. package/src/admin/components/users/AdminUserSessions.tsx +33 -31
  133. package/src/admin/components/users/AdminUsers.tsx +184 -72
  134. package/src/admin/index.ts +2 -2
  135. package/src/admin/primitives/$uiAdmin.ts +1 -1
  136. package/src/auth/components/buttons/UserButton.tsx +1 -3
  137. package/src/core/atoms/alephaSidebarAtom.ts +1 -1
  138. package/src/core/atoms/alephaThemeListAtom.ts +14 -1
  139. package/src/core/atoms/alephaThemeOverridesAtom.ts +17 -0
  140. package/src/core/atoms/themes/editorial.ts +184 -0
  141. package/src/core/atoms/themes/monochrome.ts +197 -0
  142. package/src/core/atoms/themes/rosePine.ts +208 -0
  143. package/src/core/atoms/themes/softBrutalism.ts +221 -0
  144. package/src/core/atoms/themes/terminal.ts +186 -0
  145. package/src/core/components/Flex.tsx +91 -1
  146. package/src/core/components/Text.tsx +1 -1
  147. package/src/core/components/buttons/ActionButton.tsx +15 -19
  148. package/src/core/components/buttons/DarkModeButton.tsx +3 -3
  149. package/src/core/components/buttons/LanguageButton.tsx +1 -1
  150. package/src/core/components/buttons/OmnibarButton.tsx +1 -2
  151. package/src/core/components/buttons/ThemeButton.tsx +40 -11
  152. package/src/core/components/buttons/ThemeExpertModal.tsx +184 -0
  153. package/src/core/components/buttons/ToggleSidebarButton.tsx +1 -2
  154. package/src/core/components/layout/AppBar.tsx +10 -0
  155. package/src/core/components/layout/DashboardShell.tsx +10 -7
  156. package/src/core/components/layout/Sidebar.tsx +60 -52
  157. package/src/core/constants/ui.ts +5 -5
  158. package/src/core/hooks/useTheme.ts +26 -3
  159. package/src/core/index.ts +6 -1
  160. package/src/core/interfaces/AlephaTheme.ts +2 -0
  161. package/src/core/providers/ThemeProvider.ts +108 -8
  162. package/src/core/services/DialogService.tsx +24 -3
  163. package/src/core/styles.css +26 -23
  164. package/src/core/table/components/DataTable.tsx +167 -137
  165. package/src/core/table/components/DataTableFilters.tsx +1 -6
  166. package/src/core/table/components/DataTablePagination.tsx +51 -28
  167. package/src/core/table/components/DataTableToolbar.tsx +9 -4
  168. package/src/core/table/index.ts +1 -0
  169. package/src/core/table/interfaces/types.ts +13 -9
  170. package/src/demo/components/core/DemoDataTable.tsx +15 -19
  171. package/dist/admin/AdminApiKeys-C-6_Q-lH.js.map +0 -1
  172. package/dist/admin/AdminAudits-Bgbf04hO.js.map +0 -1
  173. package/dist/admin/AdminFiles-B9a7G3cY.js.map +0 -1
  174. package/dist/admin/AdminJobExecutions-B9cek5dl.js.map +0 -1
  175. package/dist/admin/AdminJobRegistry-DFgV3oqx.js.map +0 -1
  176. package/dist/admin/AdminLayout-DHsvWxVB.js +0 -70
  177. package/dist/admin/AdminLayout-DHsvWxVB.js.map +0 -1
  178. package/dist/admin/AdminSessions-BhGJPI3z.js.map +0 -1
  179. package/dist/admin/AdminUserSessions-1uzcx02z.js.map +0 -1
  180. package/dist/admin/AdminUsers-C85c3eiQ.js +0 -121
  181. package/dist/admin/AdminUsers-C85c3eiQ.js.map +0 -1
  182. package/dist/admin/auth-Dr0Cf8I7.js +0 -319
  183. package/dist/admin/auth-Dr0Cf8I7.js.map +0 -1
  184. package/dist/admin/core-2xoLiT0o.js.map +0 -1
  185. package/dist/auth/core-niW0sFLv.js.map +0 -1
  186. package/dist/demo/DemoDataTable-Z9xyV221.js.map +0 -1
  187. package/dist/demo/core-RCUw1Q-a.js.map +0 -1
@@ -1,14 +1,14 @@
1
1
  import { $atom, $context, $inject, $module, Alepha, AlephaError, TypeBoxError, t } from "alepha";
2
2
  import { AlephaReactForm, FormValidationError, useForm, useFormState } from "alepha/react/form";
3
- import { $head, AlephaReactHead } from "alepha/react/head";
3
+ import { $head, AlephaReactHead, BrowserHeadProvider } from "alepha/react/head";
4
4
  import { AlephaReactI18n, useI18n } from "alepha/react/i18n";
5
5
  import { $cookie } from "alepha/server/cookies";
6
+ import { ActionIcon, Anchor, AppShell, Autocomplete, Badge, Burger, Button, Card, Checkbox, ColorInput, ColorSchemeScript, ColorSwatch, Container, Divider, Drawer, Fieldset, FileInput, Flex, Grid, Image, Input, Kbd, Loader, MantineProvider, Menu, MultiSelect, NumberInput, Pagination, Paper, PasswordInput, Popover, ScrollArea, SegmentedControl, Select, SimpleGrid, Slider, Switch, Table, TagsInput, Text, TextInput, Textarea, Tooltip, Tree, UnstyledButton, getTreeExpandedState, useMantineColorScheme, useMantineTheme, useTree } from "@mantine/core";
6
7
  import { ModalsProvider, modals } from "@mantine/modals";
7
- import { ActionIcon, Anchor, AppShell, Autocomplete, Badge, Burger, Button, Card, Checkbox, ColorInput, ColorSchemeScript, Container, Divider, Drawer, Fieldset, FileInput, Flex, Grid, Image, Input, Kbd, Loader, MantineProvider, Menu, MultiSelect, NumberInput, Pagination, Paper, PasswordInput, Popover, ScrollArea, SegmentedControl, Select, Slider, Switch, Table, TagsInput, Text, TextInput, Textarea, ThemeIcon, Tooltip, Tree, UnstyledButton, getTreeExpandedState, useMantineColorScheme, useMantineTheme, useTree } from "@mantine/core";
8
8
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
9
9
  import { Children, Fragment as Fragment$1, createElement, forwardRef, isValidElement, useCallback, useEffect, useMemo, useRef, useState } from "react";
10
10
  import { Notifications, notifications } from "@mantine/notifications";
11
- import { IconAlertTriangle, IconArrowDown, IconArrowLeft, IconArrowUp, IconArrowsSort, IconAt, IconCalendar, IconCheck, IconChevronDown, IconChevronRight, IconClipboard, IconClock, IconColorPicker, IconColumns, IconCopy, IconDownload, IconFile, IconFilter, IconGripVertical, IconHash, IconInfoCircle, IconInfoTriangle, IconKey, IconLanguage, IconLayoutSidebarLeftCollapse, IconLayoutSidebarRightCollapse, IconLetterCase, IconLink, IconList, IconMail, IconMoon, IconPalette, IconPhone, IconPlus, IconRefresh, IconSearch, IconSelector, IconSquareRounded, IconSun, IconToggleLeft, IconTrash, IconX } from "@tabler/icons-react";
11
+ import { IconAlertTriangle, IconArrowDown, IconArrowLeft, IconArrowUp, IconArrowsSort, IconAt, IconCalendar, IconCheck, IconChevronDown, IconChevronRight, IconClipboard, IconClock, IconColorPicker, IconColumns, IconCopy, IconDotsVertical, IconDownload, IconFile, IconFilter, IconGripVertical, IconHash, IconInfoCircle, IconInfoTriangle, IconKey, IconLanguage, IconLayoutSidebarLeftCollapse, IconLayoutSidebarRightCollapse, IconLetterCase, IconLink, IconList, IconMail, IconMoon, IconPalette, IconPhone, IconPlus, IconRefresh, IconSearch, IconSelector, IconSquareRounded, IconSun, IconToggleLeft, IconTrash, IconX } from "@tabler/icons-react";
12
12
  import { $page, Link, NestedView, useActive, useRouter, useRouterState } from "alepha/react/router";
13
13
  import { NavigationProgress, nprogress } from "@mantine/nprogress";
14
14
  import { ClientOnly, useAction, useAlepha, useEvents, useInject, useStore } from "alepha/react";
@@ -32,7 +32,7 @@ const alephaSidebarAtom = $atom({
32
32
  closed: true,
33
33
  collapsed: false,
34
34
  expandedWidth: 300,
35
- collapsedWidth: 78
35
+ collapsedWidth: 72
36
36
  }
37
37
  });
38
38
 
@@ -44,6 +44,20 @@ const alephaThemeAtom = $atom({
44
44
  default: { index: 0 }
45
45
  });
46
46
 
47
+ //#endregion
48
+ //#region ../../src/core/atoms/alephaThemeOverridesAtom.ts
49
+ const alephaThemeOverridesAtom = $atom({
50
+ name: "alepha.ui.themeOverrides",
51
+ schema: t.object({
52
+ primaryColor: t.optional(t.text()),
53
+ radius: t.optional(t.text()),
54
+ fontFamily: t.optional(t.text()),
55
+ fontSize: t.optional(t.text()),
56
+ scale: t.optional(t.text())
57
+ }),
58
+ default: {}
59
+ });
60
+
47
61
  //#endregion
48
62
  //#region ../../src/core/atoms/themes/default.ts
49
63
  const defaultTheme = {
@@ -51,6 +65,161 @@ const defaultTheme = {
51
65
  description: "Default Alepha Theme"
52
66
  };
53
67
 
68
+ //#endregion
69
+ //#region ../../src/core/atoms/themes/editorial.ts
70
+ /**
71
+ * Editorial theme.
72
+ *
73
+ * Serif typography, high contrast black and white, thin borders, generous whitespace.
74
+ * Newspaper/magazine aesthetic — elegant restraint.
75
+ */
76
+ const editorialTheme = {
77
+ name: "Editorial",
78
+ description: "Serif typography with newspaper elegance",
79
+ defaultColorScheme: "light",
80
+ head: { link: [
81
+ {
82
+ rel: "preconnect",
83
+ href: "https://fonts.googleapis.com"
84
+ },
85
+ {
86
+ rel: "preconnect",
87
+ href: "https://fonts.gstatic.com",
88
+ crossorigin: ""
89
+ },
90
+ {
91
+ rel: "stylesheet",
92
+ href: "https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;800&family=Source+Serif+4:ital,wght@0,300;0,400;0,600;1,300;1,400&display=swap"
93
+ }
94
+ ] },
95
+ primaryColor: "ink",
96
+ primaryShade: {
97
+ light: 7,
98
+ dark: 3
99
+ },
100
+ autoContrast: true,
101
+ fontFamily: "\"Source Serif 4\", \"Georgia\", \"Times New Roman\", serif",
102
+ fontFamilyMonospace: "ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, \"Liberation Mono\", monospace",
103
+ headings: {
104
+ fontFamily: "\"Playfair Display\", \"Georgia\", \"Times New Roman\", serif",
105
+ fontWeight: "700",
106
+ textWrap: "wrap",
107
+ sizes: {
108
+ h1: {
109
+ fontSize: "2.5rem",
110
+ lineHeight: "1.15"
111
+ },
112
+ h2: {
113
+ fontSize: "1.75rem",
114
+ lineHeight: "1.2"
115
+ },
116
+ h3: {
117
+ fontSize: "1.375rem",
118
+ lineHeight: "1.3"
119
+ },
120
+ h4: {
121
+ fontSize: "1.125rem",
122
+ lineHeight: "1.4"
123
+ },
124
+ h5: {
125
+ fontSize: "1rem",
126
+ lineHeight: "1.5"
127
+ },
128
+ h6: {
129
+ fontSize: "0.875rem",
130
+ lineHeight: "1.5"
131
+ }
132
+ }
133
+ },
134
+ defaultRadius: "sm",
135
+ radius: {
136
+ xs: "2px",
137
+ sm: "3px",
138
+ md: "4px",
139
+ lg: "6px",
140
+ xl: "8px"
141
+ },
142
+ shadows: {
143
+ xs: "0 1px 2px rgba(0, 0, 0, 0.06)",
144
+ sm: "0 1px 3px rgba(0, 0, 0, 0.08)",
145
+ md: "0 2px 6px rgba(0, 0, 0, 0.08)",
146
+ lg: "0 4px 12px rgba(0, 0, 0, 0.1)",
147
+ xl: "0 8px 24px rgba(0, 0, 0, 0.1)"
148
+ },
149
+ colors: {
150
+ ink: [
151
+ "#f5f3f0",
152
+ "#e8e4de",
153
+ "#d4cec5",
154
+ "#b5ad9f",
155
+ "#8c8272",
156
+ "#6b6050",
157
+ "#4a4035",
158
+ "#332b22",
159
+ "#1f1812",
160
+ "#0d0a07"
161
+ ],
162
+ burgundy: [
163
+ "#faf0f0",
164
+ "#f0d4d4",
165
+ "#e0adad",
166
+ "#cc8585",
167
+ "#b35e5e",
168
+ "#944545",
169
+ "#763636",
170
+ "#5a2828",
171
+ "#3d1b1b",
172
+ "#220f0f"
173
+ ],
174
+ gray: [
175
+ "#faf9f7",
176
+ "#f0eee9",
177
+ "#e0dcd5",
178
+ "#c8c2b8",
179
+ "#a8a194",
180
+ "#8a8273",
181
+ "#6b6456",
182
+ "#504a3f",
183
+ "#36322b",
184
+ "#1e1b17"
185
+ ],
186
+ dark: [
187
+ "#d5d2cd",
188
+ "#aba59c",
189
+ "#817a6e",
190
+ "#5e584e",
191
+ "#46413a",
192
+ "#36322c",
193
+ "#2a2721",
194
+ "#201d19",
195
+ "#171411",
196
+ "#0d0b09"
197
+ ]
198
+ },
199
+ components: {
200
+ Button: Button.extend({
201
+ defaultProps: { fw: 600 },
202
+ styles: { root: { letterSpacing: "0.02em" } }
203
+ }),
204
+ ActionIcon: ActionIcon.extend({ styles: { root: { border: "1px solid var(--mantine-color-default-border)" } } }),
205
+ Paper: Paper.extend({ styles: { root: { border: "1px solid var(--mantine-color-default-border)" } } }),
206
+ Card: Card.extend({ styles: { root: { border: "1px solid var(--mantine-color-default-border)" } } }),
207
+ TextInput: TextInput.extend({ styles: { input: { border: "1px solid var(--mantine-color-default-border)" } } }),
208
+ Badge: Badge.extend({
209
+ defaultProps: {
210
+ fw: 600,
211
+ variant: "outline"
212
+ },
213
+ styles: { root: {
214
+ fontFamily: "-apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif",
215
+ letterSpacing: "0.04em",
216
+ textTransform: "uppercase",
217
+ fontSize: "0.65rem"
218
+ } }
219
+ })
220
+ }
221
+ };
222
+
54
223
  //#endregion
55
224
  //#region ../../src/core/atoms/themes/midnight.ts
56
225
  const midnightTheme = {
@@ -166,41 +335,793 @@ const midnightTheme = {
166
335
  }
167
336
  };
168
337
 
338
+ //#endregion
339
+ //#region ../../src/core/atoms/themes/monochrome.ts
340
+ /**
341
+ * Monochrome theme.
342
+ *
343
+ * Pure black and white. No color. Bold typography does all the heavy lifting.
344
+ * A design-school statement piece — minimalist color, maximalist type.
345
+ */
346
+ const monochromeTheme = {
347
+ name: "Monochrome",
348
+ description: "Pure black and white — zero color, maximum typography",
349
+ primaryColor: "mono",
350
+ primaryShade: {
351
+ light: 8,
352
+ dark: 1
353
+ },
354
+ autoContrast: true,
355
+ fontFamily: "-apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Noto Sans\", Helvetica, Arial, sans-serif",
356
+ fontFamilyMonospace: "ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, \"Liberation Mono\", monospace",
357
+ headings: {
358
+ fontFamily: "-apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Noto Sans\", Helvetica, Arial, sans-serif",
359
+ fontWeight: "800",
360
+ textWrap: "wrap",
361
+ sizes: {
362
+ h1: {
363
+ fontSize: "2.25rem",
364
+ lineHeight: "1.15"
365
+ },
366
+ h2: {
367
+ fontSize: "1.625rem",
368
+ lineHeight: "1.25"
369
+ },
370
+ h3: {
371
+ fontSize: "1.25rem",
372
+ lineHeight: "1.35"
373
+ },
374
+ h4: {
375
+ fontSize: "1.0625rem",
376
+ lineHeight: "1.45"
377
+ },
378
+ h5: {
379
+ fontSize: "0.9375rem",
380
+ lineHeight: "1.5"
381
+ },
382
+ h6: {
383
+ fontSize: "0.8125rem",
384
+ lineHeight: "1.5"
385
+ }
386
+ }
387
+ },
388
+ defaultRadius: "0",
389
+ radius: {
390
+ xs: "0",
391
+ sm: "0",
392
+ md: "0",
393
+ lg: "0",
394
+ xl: "2px"
395
+ },
396
+ shadows: {
397
+ xs: "0 1px 2px rgba(0, 0, 0, 0.08)",
398
+ sm: "0 1px 4px rgba(0, 0, 0, 0.1)",
399
+ md: "0 2px 8px rgba(0, 0, 0, 0.12)",
400
+ lg: "0 4px 16px rgba(0, 0, 0, 0.14)",
401
+ xl: "0 8px 32px rgba(0, 0, 0, 0.16)"
402
+ },
403
+ colors: {
404
+ mono: [
405
+ "#f5f5f5",
406
+ "#e0e0e0",
407
+ "#c0c0c0",
408
+ "#a0a0a0",
409
+ "#808080",
410
+ "#606060",
411
+ "#404040",
412
+ "#282828",
413
+ "#141414",
414
+ "#000000"
415
+ ],
416
+ gray: [
417
+ "#f5f5f5",
418
+ "#e5e5e5",
419
+ "#cccccc",
420
+ "#b0b0b0",
421
+ "#909090",
422
+ "#707070",
423
+ "#555555",
424
+ "#3a3a3a",
425
+ "#252525",
426
+ "#121212"
427
+ ],
428
+ blue: [
429
+ "#f5f5f5",
430
+ "#e0e0e0",
431
+ "#c0c0c0",
432
+ "#a0a0a0",
433
+ "#808080",
434
+ "#606060",
435
+ "#404040",
436
+ "#282828",
437
+ "#141414",
438
+ "#000000"
439
+ ],
440
+ green: [
441
+ "#f5f5f5",
442
+ "#e0e0e0",
443
+ "#c0c0c0",
444
+ "#a0a0a0",
445
+ "#808080",
446
+ "#606060",
447
+ "#404040",
448
+ "#282828",
449
+ "#141414",
450
+ "#000000"
451
+ ],
452
+ red: [
453
+ "#f5f5f5",
454
+ "#e0e0e0",
455
+ "#c0c0c0",
456
+ "#a0a0a0",
457
+ "#808080",
458
+ "#606060",
459
+ "#404040",
460
+ "#282828",
461
+ "#141414",
462
+ "#000000"
463
+ ],
464
+ dark: [
465
+ "#d0d0d0",
466
+ "#a0a0a0",
467
+ "#707070",
468
+ "#505050",
469
+ "#383838",
470
+ "#282828",
471
+ "#1c1c1c",
472
+ "#141414",
473
+ "#0a0a0a",
474
+ "#000000"
475
+ ]
476
+ },
477
+ components: {
478
+ Button: Button.extend({
479
+ defaultProps: { fw: 700 },
480
+ styles: { root: {
481
+ border: "2px solid currentColor",
482
+ letterSpacing: "0.03em",
483
+ textTransform: "uppercase",
484
+ fontSize: "0.8125rem"
485
+ } }
486
+ }),
487
+ ActionIcon: ActionIcon.extend({ styles: { root: { border: "2px solid currentColor" } } }),
488
+ Paper: Paper.extend({ styles: { root: { border: "2px solid var(--mantine-color-default-border)" } } }),
489
+ Card: Card.extend({ styles: { root: { border: "2px solid var(--mantine-color-default-border)" } } }),
490
+ TextInput: TextInput.extend({ styles: { input: { border: "2px solid var(--mantine-color-default-border)" } } }),
491
+ Badge: Badge.extend({
492
+ defaultProps: {
493
+ fw: 700,
494
+ variant: "outline"
495
+ },
496
+ styles: { root: {
497
+ textTransform: "uppercase",
498
+ letterSpacing: "0.06em",
499
+ fontSize: "0.65rem",
500
+ border: "2px solid currentColor"
501
+ } }
502
+ })
503
+ }
504
+ };
505
+
506
+ //#endregion
507
+ //#region ../../src/core/atoms/themes/rosePine.ts
508
+ /**
509
+ * Rosé Pine theme.
510
+ *
511
+ * Muted pinks, golds, and subtle greens on warm dark backgrounds.
512
+ * Cozy, low-contrast, easy on the eyes.
513
+ * Based on the Rosé Pine color philosophy.
514
+ */
515
+ const rosePineTheme = {
516
+ name: "Rosé Pine",
517
+ description: "Muted pinks and golds on warm dark backgrounds",
518
+ defaultColorScheme: "dark",
519
+ primaryColor: "rose",
520
+ primaryShade: {
521
+ light: 5,
522
+ dark: 4
523
+ },
524
+ autoContrast: true,
525
+ fontFamily: "-apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Noto Sans\", Helvetica, Arial, sans-serif",
526
+ fontFamilyMonospace: "ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, \"Liberation Mono\", monospace",
527
+ headings: {
528
+ fontFamily: "-apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Noto Sans\", Helvetica, Arial, sans-serif",
529
+ fontWeight: "600",
530
+ textWrap: "wrap",
531
+ sizes: {
532
+ h1: {
533
+ fontSize: "2rem",
534
+ lineHeight: "1.25"
535
+ },
536
+ h2: {
537
+ fontSize: "1.5rem",
538
+ lineHeight: "1.3"
539
+ },
540
+ h3: {
541
+ fontSize: "1.25rem",
542
+ lineHeight: "1.4"
543
+ },
544
+ h4: {
545
+ fontSize: "1rem",
546
+ lineHeight: "1.5"
547
+ },
548
+ h5: {
549
+ fontSize: "0.875rem",
550
+ lineHeight: "1.5"
551
+ },
552
+ h6: {
553
+ fontSize: "0.75rem",
554
+ lineHeight: "1.5"
555
+ }
556
+ }
557
+ },
558
+ defaultRadius: "md",
559
+ radius: {
560
+ xs: "4px",
561
+ sm: "6px",
562
+ md: "8px",
563
+ lg: "12px",
564
+ xl: "16px"
565
+ },
566
+ shadows: {
567
+ xs: "0 1px 3px rgba(0, 0, 0, 0.2)",
568
+ sm: "0 2px 6px rgba(0, 0, 0, 0.2)",
569
+ md: "0 4px 12px rgba(0, 0, 0, 0.25)",
570
+ lg: "0 8px 24px rgba(0, 0, 0, 0.3)",
571
+ xl: "0 12px 36px rgba(0, 0, 0, 0.35)"
572
+ },
573
+ colors: {
574
+ rose: [
575
+ "#faf0f4",
576
+ "#f2d8e3",
577
+ "#eabdd0",
578
+ "#e0a0bb",
579
+ "#d4849f",
580
+ "#c4748f",
581
+ "#b06282",
582
+ "#9a5275",
583
+ "#7a3f5e",
584
+ "#5c2e47"
585
+ ],
586
+ gold: [
587
+ "#fdf8ec",
588
+ "#f8ecc8",
589
+ "#f2dda0",
590
+ "#eacb72",
591
+ "#e0b94d",
592
+ "#c9a33e",
593
+ "#a98830",
594
+ "#866b24",
595
+ "#634f1a",
596
+ "#403310"
597
+ ],
598
+ pine: [
599
+ "#ecf5f0",
600
+ "#d0e6da",
601
+ "#add4be",
602
+ "#86c0a0",
603
+ "#62ac84",
604
+ "#4e9670",
605
+ "#3e7a5a",
606
+ "#2f5e44",
607
+ "#20412f",
608
+ "#12251b"
609
+ ],
610
+ foam: [
611
+ "#edf6f7",
612
+ "#d2e9eb",
613
+ "#b0d9dd",
614
+ "#8bc6cc",
615
+ "#6ab3bb",
616
+ "#569da5",
617
+ "#438088",
618
+ "#33636a",
619
+ "#23454a",
620
+ "#14292c"
621
+ ],
622
+ red: [
623
+ "#f9eef0",
624
+ "#efd3d8",
625
+ "#e3b2bb",
626
+ "#d68e9b",
627
+ "#c86c7c",
628
+ "#b25566",
629
+ "#944454",
630
+ "#733442",
631
+ "#52252f",
632
+ "#33161d"
633
+ ],
634
+ gray: [
635
+ "#f4f0f2",
636
+ "#e4dde1",
637
+ "#cec5cb",
638
+ "#b5aab2",
639
+ "#9a8e96",
640
+ "#7e737a",
641
+ "#635a60",
642
+ "#4a4248",
643
+ "#332d31",
644
+ "#1e1a1c"
645
+ ],
646
+ dark: [
647
+ "#e0d8e0",
648
+ "#b0a6b2",
649
+ "#817786",
650
+ "#615768",
651
+ "#4a3f54",
652
+ "#3a3044",
653
+ "#2a2436",
654
+ "#211e2e",
655
+ "#1a1724",
656
+ "#110f1a"
657
+ ]
658
+ },
659
+ components: {
660
+ Button: Button.extend({
661
+ defaultProps: { fw: 500 },
662
+ styles: { root: { transition: "background-color 0.15s ease, opacity 0.15s ease" } }
663
+ }),
664
+ ActionIcon: ActionIcon.extend({ styles: { root: { transition: "background-color 0.15s ease, opacity 0.15s ease" } } }),
665
+ Paper: Paper.extend({
666
+ defaultProps: { shadow: "sm" },
667
+ styles: { root: { border: "1px solid var(--mantine-color-default-border)" } }
668
+ }),
669
+ Card: Card.extend({
670
+ defaultProps: { shadow: "sm" },
671
+ styles: { root: { border: "1px solid var(--mantine-color-default-border)" } }
672
+ }),
673
+ TextInput: TextInput.extend({ styles: { input: { border: "1px solid var(--mantine-color-default-border)" } } }),
674
+ Badge: Badge.extend({ defaultProps: { fw: 500 } })
675
+ }
676
+ };
677
+
678
+ //#endregion
679
+ //#region ../../src/core/atoms/themes/softBrutalism.ts
680
+ /**
681
+ * Soft Brutalism theme.
682
+ *
683
+ * Pastel pop palette with solid offset shadows, rounded corners, and bold borders.
684
+ * A friendlier take on neubrutalism — playful but production-ready.
685
+ */
686
+ const softBrutalismTheme = {
687
+ name: "Soft Brutalism",
688
+ description: "Pastel pop with bold borders and offset shadows",
689
+ head: { link: [
690
+ {
691
+ rel: "preconnect",
692
+ href: "https://fonts.googleapis.com"
693
+ },
694
+ {
695
+ rel: "preconnect",
696
+ href: "https://fonts.gstatic.com",
697
+ crossorigin: ""
698
+ },
699
+ {
700
+ rel: "stylesheet",
701
+ href: "https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap"
702
+ }
703
+ ] },
704
+ primaryColor: "lavender",
705
+ primaryShade: {
706
+ light: 5,
707
+ dark: 7
708
+ },
709
+ autoContrast: true,
710
+ cursorType: "pointer",
711
+ fontFamily: "Inter, -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Noto Sans\", Helvetica, Arial, sans-serif",
712
+ fontFamilyMonospace: "ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, \"Liberation Mono\", monospace",
713
+ headings: {
714
+ fontFamily: "Inter, -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Noto Sans\", Helvetica, Arial, sans-serif",
715
+ fontWeight: "700",
716
+ textWrap: "wrap",
717
+ sizes: {
718
+ h1: {
719
+ fontSize: "2rem",
720
+ lineHeight: "1.25"
721
+ },
722
+ h2: {
723
+ fontSize: "1.5rem",
724
+ lineHeight: "1.3"
725
+ },
726
+ h3: {
727
+ fontSize: "1.25rem",
728
+ lineHeight: "1.4"
729
+ },
730
+ h4: {
731
+ fontSize: "1rem",
732
+ lineHeight: "1.5"
733
+ },
734
+ h5: {
735
+ fontSize: "0.875rem",
736
+ lineHeight: "1.5"
737
+ },
738
+ h6: {
739
+ fontSize: "0.75rem",
740
+ lineHeight: "1.5"
741
+ }
742
+ }
743
+ },
744
+ defaultRadius: "md",
745
+ radius: {
746
+ xs: "6px",
747
+ sm: "8px",
748
+ md: "12px",
749
+ lg: "16px",
750
+ xl: "24px"
751
+ },
752
+ shadows: {
753
+ xs: "2px 2px 0 0 rgba(100, 80, 140, 0.15)",
754
+ sm: "3px 3px 0 0 rgba(100, 80, 140, 0.2)",
755
+ md: "4px 4px 0 0 rgba(100, 80, 140, 0.2)",
756
+ lg: "6px 6px 0 0 rgba(100, 80, 140, 0.25)",
757
+ xl: "8px 8px 0 0 rgba(100, 80, 140, 0.3)"
758
+ },
759
+ colors: {
760
+ lavender: [
761
+ "#f3f0fa",
762
+ "#e4dcf4",
763
+ "#d1c4e9",
764
+ "#b4a7d6",
765
+ "#9a8bc4",
766
+ "#7f6cb0",
767
+ "#6a549e",
768
+ "#543f87",
769
+ "#3d2d6b",
770
+ "#2a1d52"
771
+ ],
772
+ peach: [
773
+ "#fef3ec",
774
+ "#fce4d0",
775
+ "#f9d0ae",
776
+ "#f4b886",
777
+ "#f4a261",
778
+ "#e68a42",
779
+ "#c67234",
780
+ "#a35a28",
781
+ "#6b3a1a",
782
+ "#4a2710"
783
+ ],
784
+ mint: [
785
+ "#ecfaf0",
786
+ "#d4f2dc",
787
+ "#b3e8c2",
788
+ "#8edba4",
789
+ "#81c995",
790
+ "#5ab874",
791
+ "#42a05c",
792
+ "#2e8548",
793
+ "#1a5c2e",
794
+ "#0f3f1e"
795
+ ],
796
+ coral: [
797
+ "#fef0ef",
798
+ "#fcd9d7",
799
+ "#f8b8b4",
800
+ "#f29490",
801
+ "#e97171",
802
+ "#d65454",
803
+ "#b83e3e",
804
+ "#962d2d",
805
+ "#6b1f1f",
806
+ "#4a1414"
807
+ ],
808
+ gray: [
809
+ "#faf8f6",
810
+ "#f0ece8",
811
+ "#ddd7d0",
812
+ "#c4bbb2",
813
+ "#a89e95",
814
+ "#8c8279",
815
+ "#6e655d",
816
+ "#524b44",
817
+ "#3a342f",
818
+ "#24211e"
819
+ ],
820
+ dark: [
821
+ "#d4d0dc",
822
+ "#a9a2b5",
823
+ "#7e7690",
824
+ "#5c546e",
825
+ "#443c56",
826
+ "#342d45",
827
+ "#2a2339",
828
+ "#1e1a2e",
829
+ "#161224",
830
+ "#0f0c1a"
831
+ ]
832
+ },
833
+ components: {
834
+ Button: Button.extend({
835
+ defaultProps: { fw: 600 },
836
+ styles: { root: {
837
+ border: "2px solid currentColor",
838
+ boxShadow: "3px 3px 0 0 rgba(100, 80, 140, 0.2)",
839
+ transition: "box-shadow 0.15s ease, transform 0.15s ease"
840
+ } }
841
+ }),
842
+ ActionIcon: ActionIcon.extend({ styles: { root: {
843
+ border: "2px solid currentColor",
844
+ boxShadow: "2px 2px 0 0 rgba(100, 80, 140, 0.15)"
845
+ } } }),
846
+ Paper: Paper.extend({
847
+ defaultProps: { shadow: "sm" },
848
+ styles: { root: { border: "2px solid var(--mantine-color-default-border)" } }
849
+ }),
850
+ Card: Card.extend({
851
+ defaultProps: { shadow: "sm" },
852
+ styles: { root: { border: "2px solid var(--mantine-color-default-border)" } }
853
+ }),
854
+ TextInput: TextInput.extend({ styles: { input: {
855
+ border: "2px solid var(--mantine-color-default-border)",
856
+ transition: "box-shadow 0.15s ease, border-color 0.15s ease"
857
+ } } }),
858
+ Badge: Badge.extend({
859
+ defaultProps: { fw: 600 },
860
+ styles: { root: { border: "2px solid currentColor" } }
861
+ })
862
+ }
863
+ };
864
+
865
+ //#endregion
866
+ //#region ../../src/core/atoms/themes/terminal.ts
867
+ /**
868
+ * Terminal theme.
869
+ *
870
+ * Monospace everything, green-on-black, zero radius.
871
+ * CRT/hacker aesthetic for developer tools and dashboards.
872
+ */
873
+ const terminalTheme = {
874
+ name: "Terminal",
875
+ description: "Green phosphor on black — monospace hacker aesthetic",
876
+ defaultColorScheme: "dark",
877
+ primaryColor: "terminal",
878
+ primaryShade: {
879
+ light: 5,
880
+ dark: 4
881
+ },
882
+ autoContrast: true,
883
+ fontFamily: "ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, \"Liberation Mono\", monospace",
884
+ fontFamilyMonospace: "ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, \"Liberation Mono\", monospace",
885
+ headings: {
886
+ fontFamily: "ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, \"Liberation Mono\", monospace",
887
+ fontWeight: "700",
888
+ textWrap: "wrap",
889
+ sizes: {
890
+ h1: {
891
+ fontSize: "1.75rem",
892
+ lineHeight: "1.3"
893
+ },
894
+ h2: {
895
+ fontSize: "1.375rem",
896
+ lineHeight: "1.35"
897
+ },
898
+ h3: {
899
+ fontSize: "1.125rem",
900
+ lineHeight: "1.4"
901
+ },
902
+ h4: {
903
+ fontSize: "1rem",
904
+ lineHeight: "1.5"
905
+ },
906
+ h5: {
907
+ fontSize: "0.875rem",
908
+ lineHeight: "1.5"
909
+ },
910
+ h6: {
911
+ fontSize: "0.75rem",
912
+ lineHeight: "1.5"
913
+ }
914
+ }
915
+ },
916
+ defaultRadius: "0",
917
+ radius: {
918
+ xs: "0",
919
+ sm: "0",
920
+ md: "0",
921
+ lg: "2px",
922
+ xl: "4px"
923
+ },
924
+ shadows: {
925
+ xs: "none",
926
+ sm: "none",
927
+ md: "0 0 8px rgba(0, 255, 65, 0.08)",
928
+ lg: "0 0 16px rgba(0, 255, 65, 0.1)",
929
+ xl: "0 0 24px rgba(0, 255, 65, 0.12)"
930
+ },
931
+ colors: {
932
+ terminal: [
933
+ "#e6fff0",
934
+ "#b3ffd1",
935
+ "#80ffb3",
936
+ "#4dff94",
937
+ "#00ff41",
938
+ "#00d636",
939
+ "#00ad2b",
940
+ "#008521",
941
+ "#005c17",
942
+ "#00330d"
943
+ ],
944
+ amber: [
945
+ "#fff8e6",
946
+ "#ffecb3",
947
+ "#ffe080",
948
+ "#ffd54d",
949
+ "#ffca28",
950
+ "#d4a520",
951
+ "#aa8418",
952
+ "#806310",
953
+ "#554208",
954
+ "#2b2104"
955
+ ],
956
+ red: [
957
+ "#ffe6e6",
958
+ "#ffb3b3",
959
+ "#ff8080",
960
+ "#ff4d4d",
961
+ "#ff1a1a",
962
+ "#d41515",
963
+ "#aa1010",
964
+ "#800c0c",
965
+ "#550808",
966
+ "#2b0404"
967
+ ],
968
+ gray: [
969
+ "#e8eaed",
970
+ "#c8cdd3",
971
+ "#a4aab3",
972
+ "#808892",
973
+ "#5f6872",
974
+ "#474f58",
975
+ "#363c44",
976
+ "#282d33",
977
+ "#1c2026",
978
+ "#12151a"
979
+ ],
980
+ dark: [
981
+ "#c9cdd2",
982
+ "#8b9198",
983
+ "#5c636b",
984
+ "#3d444c",
985
+ "#2b3138",
986
+ "#1e242b",
987
+ "#151a20",
988
+ "#0e1216",
989
+ "#080c0f",
990
+ "#020303"
991
+ ]
992
+ },
993
+ components: {
994
+ Button: Button.extend({
995
+ defaultProps: { fw: 600 },
996
+ styles: { root: {
997
+ border: "1px solid currentColor",
998
+ textTransform: "uppercase",
999
+ letterSpacing: "0.05em",
1000
+ fontSize: "0.8125rem"
1001
+ } }
1002
+ }),
1003
+ ActionIcon: ActionIcon.extend({ styles: { root: { border: "1px solid currentColor" } } }),
1004
+ Paper: Paper.extend({ styles: { root: { border: "1px solid var(--mantine-color-default-border)" } } }),
1005
+ Card: Card.extend({ styles: { root: { border: "1px solid var(--mantine-color-default-border)" } } }),
1006
+ TextInput: TextInput.extend({ styles: { input: {
1007
+ border: "1px solid var(--mantine-color-default-border)",
1008
+ fontFamily: "inherit"
1009
+ } } }),
1010
+ Badge: Badge.extend({
1011
+ defaultProps: { fw: 600 },
1012
+ styles: { root: {
1013
+ border: "1px solid currentColor",
1014
+ textTransform: "uppercase",
1015
+ letterSpacing: "0.05em"
1016
+ } }
1017
+ })
1018
+ }
1019
+ };
1020
+
169
1021
  //#endregion
170
1022
  //#region ../../src/core/atoms/alephaThemeListAtom.ts
171
1023
  const alephaThemeListAtom = $atom({
172
1024
  name: "alepha.ui.themeList",
173
1025
  schema: t.array(t.json()),
174
- default: [defaultTheme, midnightTheme]
1026
+ default: [
1027
+ defaultTheme,
1028
+ midnightTheme,
1029
+ softBrutalismTheme,
1030
+ terminalTheme,
1031
+ editorialTheme,
1032
+ rosePineTheme,
1033
+ monochromeTheme
1034
+ ]
175
1035
  });
176
1036
 
177
1037
  //#endregion
178
1038
  //#region ../../src/core/providers/ThemeProvider.ts
179
- var ThemeProvider = class {
1039
+ var ThemeProvider = class ThemeProvider {
180
1040
  alepha = $inject(Alepha);
181
1041
  cookie = $cookie({
182
1042
  name: "theme",
183
1043
  schema: alephaThemeAtom.schema,
184
1044
  ttl: [1, "year"]
185
1045
  });
1046
+ overridesCookie = $cookie({
1047
+ name: "themeOverrides",
1048
+ schema: alephaThemeOverridesAtom.schema,
1049
+ ttl: [1, "year"]
1050
+ });
186
1051
  head = $head(() => {
187
1052
  const theme = this.getTheme();
188
1053
  if (!theme || !theme.name) return {};
189
- return { htmlAttributes: { "data-theme": theme.name } };
1054
+ return {
1055
+ htmlAttributes: { "data-theme": this.slugify(theme.name) },
1056
+ ...theme.head
1057
+ };
190
1058
  });
191
1059
  setTheme(index) {
192
- const newTheme = this.alepha.store.get(alephaThemeListAtom)[index];
193
- if (!newTheme) throw new AlephaError(`Theme with index ${index} not found`);
1060
+ if (!this.alepha.store.get(alephaThemeListAtom)[index]) throw new AlephaError(`Theme with index ${index} not found`);
194
1061
  this.cookie.set({ index });
195
1062
  this.alepha.store.set(alephaThemeAtom, { index });
196
- if (typeof document === "undefined") return;
197
- document.documentElement.removeAttribute("data-theme");
198
- if (newTheme.name) document.documentElement.setAttribute("data-theme", newTheme.name);
1063
+ if (!this.alepha.isBrowser()) return;
1064
+ this.alepha.inject(BrowserHeadProvider).refreshGlobalHead();
1065
+ }
1066
+ slugify(name) {
1067
+ return name.toLowerCase().replace(/\s+/g, "-");
199
1068
  }
1069
+ static FONT_SIZE_MULTIPLIERS = {
1070
+ xs: .85,
1071
+ sm: .925,
1072
+ md: 1,
1073
+ lg: 1.1,
1074
+ xl: 1.25
1075
+ };
1076
+ static SCALE_VALUES = {
1077
+ xs: .85,
1078
+ sm: .925,
1079
+ md: 1,
1080
+ lg: 1.1,
1081
+ xl: 1.25
1082
+ };
1083
+ static DEFAULT_FONT_SIZES = {
1084
+ xs: "0.75rem",
1085
+ sm: "0.875rem",
1086
+ md: "1rem",
1087
+ lg: "1.125rem",
1088
+ xl: "1.25rem"
1089
+ };
200
1090
  getTheme() {
201
1091
  const index = this.getThemeIndex();
202
1092
  const list = this.alepha.store.get(alephaThemeListAtom);
203
- return list[index] || list[0] || defaultTheme;
1093
+ const base = list[index] || list[0] || defaultTheme;
1094
+ const overrides = this.getThemeOverrides();
1095
+ if (!overrides.primaryColor && !overrides.radius && !overrides.fontFamily && !overrides.fontSize && !overrides.scale) return base;
1096
+ const merged = {
1097
+ ...base,
1098
+ ...overrides.primaryColor && { primaryColor: overrides.primaryColor },
1099
+ ...overrides.radius && { defaultRadius: overrides.radius },
1100
+ ...overrides.fontFamily && { fontFamily: overrides.fontFamily },
1101
+ ...overrides.scale && overrides.scale !== "md" && { scale: ThemeProvider.SCALE_VALUES[overrides.scale] ?? 1 }
1102
+ };
1103
+ if (overrides.fontSize && overrides.fontSize !== "md") {
1104
+ const multiplier = ThemeProvider.FONT_SIZE_MULTIPLIERS[overrides.fontSize] ?? 1;
1105
+ const baseSizes = base.fontSizes ?? ThemeProvider.DEFAULT_FONT_SIZES;
1106
+ merged.fontSizes = Object.fromEntries(Object.entries(baseSizes).map(([key, val]) => [key, `${(Number.parseFloat(String(val)) * multiplier).toFixed(4)}rem`]));
1107
+ }
1108
+ return merged;
1109
+ }
1110
+ setThemeOverrides(overrides) {
1111
+ this.overridesCookie.set(overrides);
1112
+ this.alepha.store.set(alephaThemeOverridesAtom, overrides);
1113
+ if (!this.alepha.isBrowser()) return;
1114
+ this.alepha.inject(BrowserHeadProvider).refreshGlobalHead();
1115
+ }
1116
+ getThemeOverrides() {
1117
+ try {
1118
+ return this.overridesCookie.get() ?? this.alepha.store.get(alephaThemeOverridesAtom) ?? {};
1119
+ } catch {
1120
+ return this.alepha.store.get(alephaThemeOverridesAtom) ?? {};
1121
+ }
1122
+ }
1123
+ resetThemeOverrides() {
1124
+ this.setThemeOverrides({});
204
1125
  }
205
1126
  getThemeIndex() {
206
1127
  try {
@@ -307,14 +1228,21 @@ var DialogService = class {
307
1228
  */
308
1229
  alert(options) {
309
1230
  return new Promise((resolve) => {
1231
+ let resolved = false;
1232
+ const done = () => {
1233
+ if (resolved) return;
1234
+ resolved = true;
1235
+ resolve();
1236
+ };
310
1237
  const modalId = this.open({
311
1238
  ...options,
312
1239
  title: options?.title || "Alert",
1240
+ onClose: done,
313
1241
  content: /* @__PURE__ */ jsx(AlertDialog, {
314
1242
  options,
315
1243
  onClose: () => {
316
1244
  this.close(modalId);
317
- resolve();
1245
+ done();
318
1246
  }
319
1247
  })
320
1248
  });
@@ -325,16 +1253,23 @@ var DialogService = class {
325
1253
  */
326
1254
  confirm(options) {
327
1255
  return new Promise((resolve) => {
1256
+ let resolved = false;
1257
+ const done = (confirmed) => {
1258
+ if (resolved) return;
1259
+ resolved = true;
1260
+ resolve(confirmed);
1261
+ };
328
1262
  const modalId = this.open({
329
1263
  ...options,
330
1264
  title: options?.title || "Confirm",
331
1265
  closeOnClickOutside: false,
332
1266
  closeOnEscape: false,
1267
+ onClose: () => done(false),
333
1268
  content: /* @__PURE__ */ jsx(ConfirmDialog, {
334
1269
  options,
335
1270
  onConfirm: (confirmed) => {
336
1271
  this.close(modalId);
337
- resolve(confirmed);
1272
+ done(confirmed);
338
1273
  }
339
1274
  })
340
1275
  });
@@ -345,16 +1280,23 @@ var DialogService = class {
345
1280
  */
346
1281
  prompt(options) {
347
1282
  return new Promise((resolve) => {
1283
+ let resolved = false;
1284
+ const done = (value) => {
1285
+ if (resolved) return;
1286
+ resolved = true;
1287
+ resolve(value);
1288
+ };
348
1289
  const modalId = this.open({
349
1290
  ...options,
350
1291
  title: options?.title || "Input",
351
1292
  closeOnClickOutside: false,
352
1293
  closeOnEscape: false,
1294
+ onClose: () => done(null),
353
1295
  content: /* @__PURE__ */ jsx(PromptDialog, {
354
1296
  options,
355
1297
  onSubmit: (value) => {
356
1298
  this.close(modalId);
357
- resolve(value);
1299
+ done(value);
358
1300
  }
359
1301
  })
360
1302
  });
@@ -458,20 +1400,34 @@ var UiRouter = class {
458
1400
  /**
459
1401
  * Hook to get and set the current theme.
460
1402
  *
461
- * Returns a tuple with the current theme and a function to set the theme.
1403
+ * Returns a tuple with the current theme, a function to set the theme,
1404
+ * and expert mode controls for fine-grained customization.
462
1405
  *
463
1406
  * ```tsx
464
- * const [theme, setTheme] = useTheme();
1407
+ * const [theme, setTheme, expert] = useTheme();
465
1408
  * ```
466
1409
  */
467
1410
  const useTheme = () => {
468
1411
  useStore(alephaThemeAtom);
1412
+ useStore(alephaThemeOverridesAtom);
469
1413
  const themeProvider = useInject(ThemeProvider);
470
1414
  const theme = themeProvider.getTheme();
471
1415
  const setTheme = (theme) => {
472
1416
  themeProvider.setTheme(theme.index);
473
1417
  };
474
- return [theme, setTheme];
1418
+ return [
1419
+ theme,
1420
+ setTheme,
1421
+ {
1422
+ overrides: themeProvider.getThemeOverrides(),
1423
+ setOverrides: (overrides) => {
1424
+ themeProvider.setThemeOverrides(overrides);
1425
+ },
1426
+ resetOverrides: () => {
1427
+ themeProvider.resetThemeOverrides();
1428
+ }
1429
+ }
1430
+ ];
475
1431
  };
476
1432
 
477
1433
  //#endregion
@@ -569,16 +1525,16 @@ const AlephaMantineProvider = (props) => {
569
1525
  const ui = {
570
1526
  colors: {
571
1527
  transparent: "transparent",
572
- background: "var(--alepha-background)",
1528
+ background: "var(--alepha-ground)",
573
1529
  surface: "var(--alepha-surface)",
574
1530
  elevated: "var(--alepha-elevated)",
575
1531
  border: "var(--alepha-border)"
576
1532
  },
577
1533
  sizes: { icon: {
578
- xs: 14,
579
- sm: 16,
580
- md: 20,
581
- lg: 24,
1534
+ xs: 16,
1535
+ sm: 20,
1536
+ md: 24,
1537
+ lg: 28,
582
1538
  xl: 32
583
1539
  } }
584
1540
  };
@@ -617,14 +1573,9 @@ const ActionMenuItem = (props) => {
617
1573
  if (props.item.onClick) menuItemProps.onClick = action.run;
618
1574
  else if (props.item.href) Object.assign(menuItemProps, router.anchor(props.item.href));
619
1575
  return /* @__PURE__ */ jsx(Menu.Item, {
620
- leftSection: item.icon,
1576
+ leftSection: item.icon ?? (item.active ? /* @__PURE__ */ jsx(IconCheck, { size: ui.sizes.icon.sm }) : /* @__PURE__ */ jsx(Flex, { w: ui.sizes.icon.sm })),
621
1577
  onClick: item.onClick,
622
1578
  color: item.color,
623
- rightSection: item.active ? /* @__PURE__ */ jsx(ThemeIcon, {
624
- size: "xs",
625
- variant: "transparent",
626
- children: /* @__PURE__ */ jsx(IconCheck, {})
627
- }) : void 0,
628
1579
  ...menuItemProps,
629
1580
  children: item.label
630
1581
  }, index);
@@ -632,11 +1583,9 @@ const ActionMenuItem = (props) => {
632
1583
  const ActionButton = (_props) => {
633
1584
  const theme = useMantineTheme();
634
1585
  const props = { ..._props };
635
- const { tooltip, menu, icon, ...restProps } = props;
636
- if (props.variant === "subtle" || props.variant === "outline") restProps.color ??= "gray";
1586
+ const { tooltip, menu, icon, iconSize, ...restProps } = props;
637
1587
  if (props.intent) {
638
- if (props.intent === "none") restProps.color ??= "gray";
639
- else if (props.intent === "primary") restProps.color ??= theme.primaryColor;
1588
+ if (props.intent === "primary") restProps.color ??= theme.primaryColor;
640
1589
  else if (props.intent === "success") {
641
1590
  restProps.c ??= "white";
642
1591
  restProps.color ??= "green";
@@ -651,10 +1600,11 @@ const ActionButton = (_props) => {
651
1600
  }
652
1601
  if (props.icon) {
653
1602
  const sizes = ui.sizes.icon;
654
- const icon = isComponentType(props.icon) ? /* @__PURE__ */ jsx(props.icon, { size: sizes[props.size || "md"] }) : /* @__PURE__ */ jsx("span", { children: props.icon });
1603
+ const iconSize = props.iconSize ?? sizes[props.size || "sm"];
1604
+ const icon = isComponentType(props.icon) ? /* @__PURE__ */ jsx(props.icon, { size: iconSize }) : /* @__PURE__ */ jsx("span", { children: props.icon });
655
1605
  if (!props.children) {
656
1606
  restProps.children = Children.only(icon);
657
- restProps.px ??= "xs";
1607
+ restProps.p ??= 8;
658
1608
  } else restProps.leftSection = icon;
659
1609
  }
660
1610
  if (props.leftSection && !props.children) restProps.px ??= "xs";
@@ -905,11 +1855,11 @@ const DarkModeButton = (props) => {
905
1855
  const toggleColorScheme = () => {
906
1856
  setColorScheme((document.documentElement.getAttribute("data-mantine-color-scheme") ?? "light") === "dark" ? "light" : "dark");
907
1857
  };
908
- const size = props.size ?? "md";
909
- const iconSize = ui.sizes.icon[size] ?? ui.sizes.icon.md;
1858
+ const size = props.size ?? "sm";
1859
+ const iconSize = ui.sizes.icon[size] ?? ui.sizes.icon.sm;
910
1860
  return /* @__PURE__ */ jsx(ActionButton, {
911
1861
  onClick: toggleColorScheme,
912
- variant: props.variant ?? "subtle",
1862
+ variant: props.variant ?? "default",
913
1863
  size,
914
1864
  "aria-label": "Toggle color scheme",
915
1865
  icon: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(IconSun, {
@@ -928,7 +1878,7 @@ const DarkModeButton = (props) => {
928
1878
  const LanguageButton = (props) => {
929
1879
  const i18n = useI18n();
930
1880
  return /* @__PURE__ */ jsx(ActionButton, {
931
- variant: "subtle",
1881
+ variant: "default",
932
1882
  icon: IconLanguage,
933
1883
  menu: { items: i18n.languages.map((lang) => ({
934
1884
  label: i18n.tr(lang),
@@ -947,8 +1897,7 @@ const OmnibarButton = (props) => {
947
1897
  if (props.collapsed) return /* @__PURE__ */ jsx(ActionButton, {
948
1898
  variant: "subtle",
949
1899
  onClick: spotlight.open,
950
- radius: "md",
951
- icon: /* @__PURE__ */ jsx(IconSearch, { size: 16 }),
1900
+ icon: IconSearch,
952
1901
  tooltip: {
953
1902
  label: "Search",
954
1903
  position: "right"
@@ -985,6 +1934,261 @@ const OmnibarButton = (props) => {
985
1934
  });
986
1935
  };
987
1936
 
1937
+ //#endregion
1938
+ //#region ../../src/core/hooks/useDialog.ts
1939
+ /**
1940
+ * Use this hook to access the Dialog Service for showing various dialog types.
1941
+ *
1942
+ * @example
1943
+ * ```tsx
1944
+ * const dialog = useDialog();
1945
+ * await dialog.alert({ title: "Alert", message: "This is an alert message" });
1946
+ * const confirmed = await dialog.confirm({ title: "Confirm", message: "Are you sure?" });
1947
+ * const input = await dialog.prompt({ title: "Input", message: "Enter your name:" });
1948
+ * ```
1949
+ */
1950
+ const useDialog = () => {
1951
+ return useInject(DialogService);
1952
+ };
1953
+
1954
+ //#endregion
1955
+ //#region ../../src/core/components/buttons/ThemeExpertModal.tsx
1956
+ const MANTINE_COLORS = [
1957
+ "red",
1958
+ "pink",
1959
+ "grape",
1960
+ "violet",
1961
+ "indigo",
1962
+ "blue",
1963
+ "cyan",
1964
+ "teal",
1965
+ "green",
1966
+ "lime",
1967
+ "yellow",
1968
+ "orange"
1969
+ ];
1970
+ const RADIUS_OPTIONS = [
1971
+ {
1972
+ label: "xs",
1973
+ value: "xs"
1974
+ },
1975
+ {
1976
+ label: "sm",
1977
+ value: "sm"
1978
+ },
1979
+ {
1980
+ label: "md",
1981
+ value: "md"
1982
+ },
1983
+ {
1984
+ label: "lg",
1985
+ value: "lg"
1986
+ },
1987
+ {
1988
+ label: "xl",
1989
+ value: "xl"
1990
+ }
1991
+ ];
1992
+ const SIZE_OPTIONS = [
1993
+ {
1994
+ label: "xs",
1995
+ value: "xs"
1996
+ },
1997
+ {
1998
+ label: "sm",
1999
+ value: "sm"
2000
+ },
2001
+ {
2002
+ label: "md",
2003
+ value: "md"
2004
+ },
2005
+ {
2006
+ label: "lg",
2007
+ value: "lg"
2008
+ },
2009
+ {
2010
+ label: "xl",
2011
+ value: "xl"
2012
+ }
2013
+ ];
2014
+ const FONT_OPTIONS = [
2015
+ {
2016
+ label: "System",
2017
+ value: ""
2018
+ },
2019
+ {
2020
+ label: "Inter",
2021
+ value: "Inter, sans-serif"
2022
+ },
2023
+ {
2024
+ label: "Mono",
2025
+ value: "ui-monospace, SFMono-Regular, Menlo, monospace"
2026
+ },
2027
+ {
2028
+ label: "Serif",
2029
+ value: "Georgia, 'Times New Roman', serif"
2030
+ }
2031
+ ];
2032
+ const ThemeExpertModal = () => {
2033
+ const [, , expert] = useTheme();
2034
+ const dialog = useDialog();
2035
+ const mantineTheme = useMantineTheme();
2036
+ const { overrides, setOverrides } = expert;
2037
+ const currentColor = overrides.primaryColor || mantineTheme.primaryColor;
2038
+ const currentRadius = overrides.radius || mantineTheme.defaultRadius || "md";
2039
+ const currentFont = overrides.fontFamily || "";
2040
+ const currentFontSize = overrides.fontSize || "md";
2041
+ const currentScale = overrides.scale || "md";
2042
+ const updateOverrides = (patch) => {
2043
+ setOverrides({
2044
+ ...overrides,
2045
+ ...patch
2046
+ });
2047
+ };
2048
+ return /* @__PURE__ */ jsxs(Flex, {
2049
+ direction: "column",
2050
+ gap: "lg",
2051
+ children: [
2052
+ /* @__PURE__ */ jsxs(Flex, {
2053
+ direction: "column",
2054
+ gap: "xs",
2055
+ children: [/* @__PURE__ */ jsx(Text, {
2056
+ fw: 500,
2057
+ size: "sm",
2058
+ children: "Primary Color"
2059
+ }), /* @__PURE__ */ jsx(SimpleGrid, {
2060
+ cols: 6,
2061
+ spacing: "xs",
2062
+ children: MANTINE_COLORS.map((color) => /* @__PURE__ */ jsx(Flex, {
2063
+ justify: "center",
2064
+ children: /* @__PURE__ */ jsx(ColorSwatch, {
2065
+ color: mantineTheme.colors[color]?.[6] ?? color,
2066
+ onClick: () => updateOverrides({ primaryColor: color }),
2067
+ style: { cursor: "pointer" },
2068
+ size: 32,
2069
+ children: currentColor === color && /* @__PURE__ */ jsx(IconCheck, {
2070
+ size: 14,
2071
+ color: "white"
2072
+ })
2073
+ })
2074
+ }, color))
2075
+ })]
2076
+ }),
2077
+ /* @__PURE__ */ jsxs(Flex, {
2078
+ direction: "column",
2079
+ gap: "xs",
2080
+ children: [/* @__PURE__ */ jsx(Text, {
2081
+ fw: 500,
2082
+ size: "sm",
2083
+ children: "Border Radius"
2084
+ }), /* @__PURE__ */ jsx(Flex, {
2085
+ gap: "xs",
2086
+ children: RADIUS_OPTIONS.map((opt) => /* @__PURE__ */ jsx(ActionButton, {
2087
+ variant: String(currentRadius) === opt.value ? "filled" : "default",
2088
+ size: "xs",
2089
+ flex: 1,
2090
+ onClick: () => updateOverrides({ radius: opt.value }),
2091
+ children: opt.label
2092
+ }, opt.value))
2093
+ })]
2094
+ }),
2095
+ /* @__PURE__ */ jsxs(Flex, {
2096
+ direction: "column",
2097
+ gap: "xs",
2098
+ children: [/* @__PURE__ */ jsx(Text, {
2099
+ fw: 500,
2100
+ size: "sm",
2101
+ children: "Font Family"
2102
+ }), /* @__PURE__ */ jsx(Select, {
2103
+ data: FONT_OPTIONS,
2104
+ value: currentFont,
2105
+ onChange: (value) => updateOverrides({ fontFamily: value ?? "" }),
2106
+ allowDeselect: false
2107
+ })]
2108
+ }),
2109
+ /* @__PURE__ */ jsxs(Flex, {
2110
+ direction: "column",
2111
+ gap: "xs",
2112
+ children: [/* @__PURE__ */ jsx(Text, {
2113
+ fw: 500,
2114
+ size: "sm",
2115
+ children: "Font Size"
2116
+ }), /* @__PURE__ */ jsx(Flex, {
2117
+ gap: "xs",
2118
+ children: SIZE_OPTIONS.map((opt) => /* @__PURE__ */ jsx(ActionButton, {
2119
+ variant: currentFontSize === opt.value ? "filled" : "default",
2120
+ size: "xs",
2121
+ flex: 1,
2122
+ onClick: () => updateOverrides({ fontSize: opt.value }),
2123
+ children: opt.label
2124
+ }, opt.value))
2125
+ })]
2126
+ }),
2127
+ /* @__PURE__ */ jsxs(Flex, {
2128
+ direction: "column",
2129
+ gap: "xs",
2130
+ children: [/* @__PURE__ */ jsx(Text, {
2131
+ fw: 500,
2132
+ size: "sm",
2133
+ children: "Scale"
2134
+ }), /* @__PURE__ */ jsx(Flex, {
2135
+ gap: "xs",
2136
+ children: SIZE_OPTIONS.map((opt) => /* @__PURE__ */ jsx(ActionButton, {
2137
+ variant: currentScale === opt.value ? "filled" : "default",
2138
+ size: "xs",
2139
+ flex: 1,
2140
+ onClick: () => updateOverrides({ scale: opt.value }),
2141
+ children: opt.label
2142
+ }, opt.value))
2143
+ })]
2144
+ }),
2145
+ /* @__PURE__ */ jsxs(Flex, {
2146
+ justify: "space-between",
2147
+ children: [/* @__PURE__ */ jsx(ActionButton, {
2148
+ variant: "subtle",
2149
+ color: "red",
2150
+ onClick: () => expert.resetOverrides(),
2151
+ children: "Reset"
2152
+ }), /* @__PURE__ */ jsx(ActionButton, {
2153
+ variant: "default",
2154
+ px: "xl",
2155
+ onClick: () => dialog.close(),
2156
+ children: "OK"
2157
+ })]
2158
+ })
2159
+ ]
2160
+ });
2161
+ };
2162
+
2163
+ //#endregion
2164
+ //#region ../../src/core/components/buttons/ThemeButton.tsx
2165
+ const ThemeButton = (props) => {
2166
+ const { expert, ...actionProps } = props;
2167
+ const [theme, setTheme] = useTheme();
2168
+ const themeList = useStore(alephaThemeListAtom)[0];
2169
+ const dialog = useDialog();
2170
+ const items = themeList.map((it, index) => ({
2171
+ label: it.name,
2172
+ onClick: () => setTheme({ index }),
2173
+ active: theme.name === it.name
2174
+ }));
2175
+ if (expert) items.push({ type: "divider" }, {
2176
+ label: "Customize...",
2177
+ onClick: () => {
2178
+ dialog.open({
2179
+ title: "Customize Theme",
2180
+ content: /* @__PURE__ */ jsx(ThemeExpertModal, {})
2181
+ });
2182
+ }
2183
+ });
2184
+ return /* @__PURE__ */ jsx(ActionButton, {
2185
+ variant: "default",
2186
+ icon: IconPalette,
2187
+ menu: { items },
2188
+ ...actionProps
2189
+ });
2190
+ };
2191
+
988
2192
  //#endregion
989
2193
  //#region ../../src/core/components/buttons/ToggleSidebarButton.tsx
990
2194
  const ToggleSidebarButton = (props) => {
@@ -992,8 +2196,7 @@ const ToggleSidebarButton = (props) => {
992
2196
  return /* @__PURE__ */ jsx(ActionButton, {
993
2197
  icon: sidebar.collapsed ? IconLayoutSidebarRightCollapse : IconLayoutSidebarLeftCollapse,
994
2198
  visibleFrom: "md",
995
- variant: "subtle",
996
- size: "md",
2199
+ variant: "default",
997
2200
  onClick: () => {
998
2201
  setSidebar({
999
2202
  ...sidebar,
@@ -1011,7 +2214,7 @@ const ToggleSidebarButton = (props) => {
1011
2214
  //#endregion
1012
2215
  //#region ../../src/core/components/Flex.tsx
1013
2216
  const Flex$1 = forwardRef((props, ref) => {
1014
- const { fill, center, centerX, centerY, col, ...rest } = props;
2217
+ const { fill, center, centerX, centerY, col, ground, surface, elevated, rounded, bordered, borderedTop, borderedBottom, shadowed, ...rest } = props;
1015
2218
  if (fill) rest.flex ??= 1;
1016
2219
  if (col) rest.direction ??= "column";
1017
2220
  if (center) {
@@ -1020,6 +2223,20 @@ const Flex$1 = forwardRef((props, ref) => {
1020
2223
  }
1021
2224
  if (centerX) rest.justify ??= "center";
1022
2225
  if (centerY) rest.align ??= "center";
2226
+ if (ground) rest.bg = "var(--alepha-ground)";
2227
+ else if (surface) rest.bg = "var(--alepha-surface)";
2228
+ else if (elevated) rest.bg = "var(--alepha-elevated)";
2229
+ if (rounded) rest.bdrs = rounded === true ? "md" : rounded;
2230
+ if (bordered) rest.bd = "1px solid var(--alepha-border)";
2231
+ if (borderedTop) rest.style = {
2232
+ borderTop: "1px solid var(--alepha-border)",
2233
+ ...rest.style ?? {}
2234
+ };
2235
+ if (borderedBottom) rest.style = {
2236
+ borderBottom: "1px solid var(--alepha-border)",
2237
+ ...rest.style ?? {}
2238
+ };
2239
+ if (shadowed) rest.className = `${rest.className ?? ""} shadow-${shadowed === true ? "md" : shadowed}`.trim();
1023
2240
  return /* @__PURE__ */ jsx(Flex, {
1024
2241
  ref,
1025
2242
  ...rest
@@ -1043,6 +2260,7 @@ const AppBar = (props) => {
1043
2260
  if ("type" in item) {
1044
2261
  if (item.type === "burger") return /* @__PURE__ */ jsx(BurgerButton, {}, index);
1045
2262
  if (item.type === "dark") return /* @__PURE__ */ jsx(DarkModeButton, { ...item.props }, index);
2263
+ if (item.type === "theme") return /* @__PURE__ */ jsx(ThemeButton, { ...item.props }, index);
1046
2264
  if (item.type === "search") return /* @__PURE__ */ jsx(OmnibarButton, { ...item.props }, index);
1047
2265
  if (item.type === "lang") return /* @__PURE__ */ jsx(LanguageButton, { ...item.props }, index);
1048
2266
  if (item.type === "spacer") return /* @__PURE__ */ jsx(Flex$1, { w: 16 }, index);
@@ -1233,6 +2451,9 @@ const Sidebar = (props) => {
1233
2451
  if (item.type === "divider") return divider(key, item.fill, collapsed);
1234
2452
  if (item.type === "search") return /* @__PURE__ */ jsx(Flex$1, {
1235
2453
  mb: "xs",
2454
+ w: "100%",
2455
+ justify: "center",
2456
+ pos: "relative",
1236
2457
  children: /* @__PURE__ */ jsx(OmnibarButton, { collapsed })
1237
2458
  }, key);
1238
2459
  if (item.type === "toggle") return /* @__PURE__ */ jsx(ToggleSidebarButton, {}, key);
@@ -1240,7 +2461,7 @@ const Sidebar = (props) => {
1240
2461
  if (item.children && item.children.length > 0) {
1241
2462
  if (!item.children.some((child) => !("can" in child) || !child.can || child.can())) return null;
1242
2463
  }
1243
- if (collapsed) return /* @__PURE__ */ jsxs(Fragment$1, { children: [divider(`${key}-d`, void 0, collapsed), item.children?.map((child, index) => renderNode(child, `s${key}-${index}`, collapsed))] }, key);
2464
+ if (collapsed) return /* @__PURE__ */ jsx(Fragment$1, { children: item.children?.map((child, index) => renderNode(child, `s${key}-${index}`, collapsed)) }, key);
1244
2465
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs(Flex$1, {
1245
2466
  mt: "md",
1246
2467
  align: "center",
@@ -1290,7 +2511,7 @@ const Sidebar = (props) => {
1290
2511
  return [];
1291
2512
  };
1292
2513
  const padding = "md";
1293
- const gap = props.items ? props.gap ?? 4 : "xs";
2514
+ const gap = props.items ? props.gap ?? 8 : "xs";
1294
2515
  const menu = useMemo(() => getSidebarNodes(), [props.items, props.autoPopulateMenu]);
1295
2516
  const renderSidebar = (collapsed) => /* @__PURE__ */ jsxs(Flex$1, {
1296
2517
  flex: 1,
@@ -1372,10 +2593,7 @@ const SidebarItem = (props) => {
1372
2593
  bd: 0,
1373
2594
  fw: "normal",
1374
2595
  variant: "default",
1375
- propsActive: {
1376
- variant: "outline",
1377
- fw: "bold"
1378
- },
2596
+ propsActive: { variant: "outline" },
1379
2597
  radius: props.item.theme?.radius ?? props.theme.button?.radius ?? "md",
1380
2598
  onClick: handleItemClick,
1381
2599
  leftSection: /* @__PURE__ */ jsxs(Flex$1, {
@@ -1392,6 +2610,8 @@ const SidebarItem = (props) => {
1392
2610
  }), item.children && isOpen && /* @__PURE__ */ jsxs(Flex$1, {
1393
2611
  direction: "column",
1394
2612
  "data-parent-level": level,
2613
+ gap: 2,
2614
+ py: 2,
1395
2615
  children: [/* @__PURE__ */ jsx(Flex$1, { style: {
1396
2616
  position: "absolute",
1397
2617
  width: 1,
@@ -1419,28 +2639,41 @@ const SidebarCollapsedItem = (props) => {
1419
2639
  const menu = hasChildren ? {
1420
2640
  on: "hover",
1421
2641
  position: "right",
1422
- items: item.children.filter((child) => !child.can || child.can()).map((child) => ({
2642
+ menuProps: {
2643
+ arrowPosition: "center",
2644
+ arrowSize: 10,
2645
+ withArrow: true
2646
+ },
2647
+ items: [{
2648
+ type: "label",
2649
+ label: item.label
2650
+ }, ...item.children.filter((child) => !child.can || child.can()).map((child) => ({
1423
2651
  label: child.label,
1424
2652
  icon: renderIcon(child.icon, ui.sizes.icon.sm),
1425
2653
  href: child.href,
1426
2654
  active: child.href ? router.isActive(child.href, { startWith: child.activeStartsWith }) : void 0
1427
- }))
2655
+ }))]
1428
2656
  } : void 0;
1429
- return /* @__PURE__ */ jsx(ActionButton, {
1430
- size: props.item.theme?.size ?? props.theme.button?.size ?? (level === 0 ? "sm" : "xs"),
1431
- variant: "subtle",
1432
- variantActive: "default",
1433
- tooltip: hasChildren ? void 0 : {
1434
- label: item.label,
1435
- position: "right"
1436
- },
1437
- radius: props.item.theme?.radius ?? props.theme.button?.radius ?? "md",
1438
- onClick: hasChildren ? void 0 : handleItemClick,
1439
- icon: renderIcon(item.icon, ui.sizes.icon.sm) ?? /* @__PURE__ */ jsx(IconSquareRounded, { size: ui.sizes.icon.sm }),
1440
- href: hasChildren ? void 0 : props.item.href,
1441
- target: hasChildren ? void 0 : props.item.target,
1442
- menu,
1443
- ...props.item.actionProps
2657
+ return /* @__PURE__ */ jsx(Flex$1, {
2658
+ w: "100%",
2659
+ justify: "center",
2660
+ pos: "relative",
2661
+ children: /* @__PURE__ */ jsx(ActionButton, {
2662
+ size: props.item.theme?.size ?? props.theme.button?.size ?? (level === 0 ? "sm" : "xs"),
2663
+ bd: 0,
2664
+ variant: "default",
2665
+ propsActive: { variant: "outline" },
2666
+ tooltip: hasChildren ? void 0 : {
2667
+ label: item.label,
2668
+ position: "right"
2669
+ },
2670
+ onClick: hasChildren ? void 0 : handleItemClick,
2671
+ icon: renderIcon(item.icon, ui.sizes.icon.sm) ?? /* @__PURE__ */ jsx(IconSquareRounded, { size: ui.sizes.icon.sm }),
2672
+ href: hasChildren ? void 0 : props.item.href,
2673
+ target: hasChildren ? void 0 : props.item.target,
2674
+ menu,
2675
+ ...props.item.actionProps
2676
+ })
1444
2677
  });
1445
2678
  };
1446
2679
 
@@ -1486,6 +2719,7 @@ const DashboardShell = (props) => {
1486
2719
  return /* @__PURE__ */ jsxs(AppShell, {
1487
2720
  layout: "alt",
1488
2721
  w: "100%",
2722
+ h: "100vh",
1489
2723
  flex: 1,
1490
2724
  header: hasAppBar ? { height: hHeight } : void 0,
1491
2725
  navbar: hasSidebar ? {
@@ -1504,13 +2738,12 @@ const DashboardShell = (props) => {
1504
2738
  })
1505
2739
  }),
1506
2740
  hasSidebar && /* @__PURE__ */ jsxs(AppShell.Navbar, {
1507
- className: "alepha-sidebar-navbar",
1508
2741
  ...props.appShellNavbarProps,
1509
2742
  children: [
1510
2743
  props.navbarHeader ? /* @__PURE__ */ jsx(Flex$1, {
1511
2744
  style: { borderBottom: "1px solid var(--mantine-color-default-border)" },
1512
2745
  h: headerHeight,
1513
- children: props.navbarHeader
2746
+ children: props.navbarHeader({ collapsed })
1514
2747
  }) : null,
1515
2748
  /* @__PURE__ */ jsx(Sidebar, {
1516
2749
  ...props.sidebarProps ?? {},
@@ -1524,6 +2757,8 @@ const DashboardShell = (props) => {
1524
2757
  ]
1525
2758
  }),
1526
2759
  /* @__PURE__ */ jsx(AppShell.Main, {
2760
+ display: "flex",
2761
+ bg: "var(--alepha-ground)",
1527
2762
  pos: "relative",
1528
2763
  ...props.appShellMainProps,
1529
2764
  children: props.children ?? /* @__PURE__ */ jsx(NestedView, {})
@@ -1552,7 +2787,7 @@ const Text$1 = forwardRef((props, ref) => {
1552
2787
  if (light) rest.fw ??= 300;
1553
2788
  if (italic) rest.fs ??= "italic";
1554
2789
  if (muted) rest.c ??= "dimmed";
1555
- if (small) rest.size ??= "sm";
2790
+ if (small) rest.size ??= "xs";
1556
2791
  if (uppercase) rest.tt ??= "uppercase";
1557
2792
  if (capitalize) rest.tt ??= "capitalize";
1558
2793
  if (center) rest.ta ??= "center";
@@ -2812,23 +4047,6 @@ const renderIcon = (icon, size) => {
2812
4047
  return icon;
2813
4048
  };
2814
4049
 
2815
- //#endregion
2816
- //#region ../../src/core/hooks/useDialog.ts
2817
- /**
2818
- * Use this hook to access the Dialog Service for showing various dialog types.
2819
- *
2820
- * @example
2821
- * ```tsx
2822
- * const dialog = useDialog();
2823
- * await dialog.alert({ title: "Alert", message: "This is an alert message" });
2824
- * const confirmed = await dialog.confirm({ title: "Confirm", message: "Are you sure?" });
2825
- * const input = await dialog.prompt({ title: "Input", message: "Enter your name:" });
2826
- * ```
2827
- */
2828
- const useDialog = () => {
2829
- return useInject(DialogService);
2830
- };
2831
-
2832
4050
  //#endregion
2833
4051
  //#region ../../src/core/json/components/JsonViewer.tsx
2834
4052
  const SIZE_CONFIG = {
@@ -3145,8 +4363,9 @@ const DataTableFilters = ({ schema, form, typeFormProps, filterVisibility }) =>
3145
4363
  return /* @__PURE__ */ jsx(Flex, {
3146
4364
  w: "100%",
3147
4365
  p: "xs",
4366
+ m: "xs",
4367
+ bdrs: "md",
3148
4368
  bg: ui.colors.surface,
3149
- style: { borderBottom: "1px solid var(--alepha-border)" },
3150
4369
  children: /* @__PURE__ */ jsx(TypeForm, {
3151
4370
  size: "xs",
3152
4371
  ...typeFormProps,
@@ -3167,48 +4386,62 @@ const DataTableFilters = ({ schema, form, typeFormProps, filterVisibility }) =>
3167
4386
 
3168
4387
  //#endregion
3169
4388
  //#region ../../src/core/table/components/DataTablePagination.tsx
3170
- const DataTablePagination = ({ page, size, totalPages, onPageChange, onSizeChange }) => {
3171
- return /* @__PURE__ */ jsxs(Flex, {
4389
+ const DataTablePagination = ({ page, size, totalPages, totalElements, offset, numberOfElements, onPageChange, onSizeChange }) => {
4390
+ const from = numberOfElements > 0 ? offset + 1 : 0;
4391
+ const to = offset + numberOfElements;
4392
+ return /* @__PURE__ */ jsxs(Flex$1, {
3172
4393
  align: "center",
3173
- justify: "end",
4394
+ justify: "space-between",
3174
4395
  gap: "md",
3175
- p: "xs",
4396
+ px: "xs",
4397
+ py: 4,
3176
4398
  style: { borderTop: "1px solid var(--alepha-border)" },
3177
- children: [/* @__PURE__ */ jsx(Flex, { children: /* @__PURE__ */ jsx(Select, {
3178
- w: 96,
3179
- variant: "default",
3180
- value: size,
3181
- onChange: (value) => {
3182
- if (value) onSizeChange(Number(value));
3183
- },
3184
- data: [
3185
- {
3186
- value: "5",
3187
- label: "5"
3188
- },
3189
- {
3190
- value: "10",
3191
- label: "10"
3192
- },
3193
- {
3194
- value: "25",
3195
- label: "25"
3196
- },
3197
- {
3198
- value: "50",
3199
- label: "50"
4399
+ children: [/* @__PURE__ */ jsx(Flex$1, {
4400
+ align: "center",
4401
+ children: /* @__PURE__ */ jsx(Text$1, {
4402
+ size: "xs",
4403
+ c: "dimmed",
4404
+ children: totalElements != null ? `Showing ${from} - ${to} of ${totalElements}` : `Showing ${from} - ${to}`
4405
+ })
4406
+ }), /* @__PURE__ */ jsxs(Flex$1, {
4407
+ align: "center",
4408
+ gap: "md",
4409
+ children: [/* @__PURE__ */ jsx(Flex$1, { children: /* @__PURE__ */ jsx(Select, {
4410
+ color: "gray",
4411
+ c: "gray",
4412
+ size: "xs",
4413
+ w: 96,
4414
+ variant: "default",
4415
+ value: size,
4416
+ onChange: (value) => {
4417
+ if (value) onSizeChange(Number(value));
3200
4418
  },
3201
- {
3202
- value: "100",
3203
- label: "100"
3204
- }
3205
- ]
3206
- }) }), /* @__PURE__ */ jsx(Flex, { children: /* @__PURE__ */ jsx(Pagination, {
3207
- withEdges: true,
3208
- total: totalPages,
3209
- value: page,
3210
- onChange: onPageChange
3211
- }) })]
4419
+ data: [
4420
+ {
4421
+ value: "10",
4422
+ label: "10"
4423
+ },
4424
+ {
4425
+ value: "25",
4426
+ label: "25"
4427
+ },
4428
+ {
4429
+ value: "50",
4430
+ label: "50"
4431
+ },
4432
+ {
4433
+ value: "100",
4434
+ label: "100"
4435
+ }
4436
+ ]
4437
+ }) }), /* @__PURE__ */ jsx(Flex$1, { children: /* @__PURE__ */ jsx(Pagination, {
4438
+ size: "sm",
4439
+ withEdges: true,
4440
+ total: totalPages,
4441
+ value: page,
4442
+ onChange: onPageChange
4443
+ }) })]
4444
+ })]
3212
4445
  });
3213
4446
  };
3214
4447
 
@@ -3430,7 +4663,7 @@ const extractText = (node) => {
3430
4663
  const DataTableToolbar = ({ columns, filters, columnVisibility, filterVisibility, onColumnVisibilityChange, onFilterVisibilityChange, actions, onRefresh, items, withExport, selectedItems = [], checkboxActions, onClearSelection }) => {
3431
4664
  const hasSelection = selectedItems.length > 0;
3432
4665
  const exportableColumns = useCallback(() => {
3433
- return Object.entries(columns).filter(([key, col]) => !col.actions && columnVisibility[key] !== false);
4666
+ return Object.entries(columns).filter(([key]) => columnVisibility[key] !== false);
3434
4667
  }, [columns, columnVisibility]);
3435
4668
  const buildRows = useCallback(() => {
3436
4669
  const cols = exportableColumns();
@@ -3467,11 +4700,10 @@ const DataTableToolbar = ({ columns, filters, columnVisibility, filterVisibility
3467
4700
  };
3468
4701
  await action.onClick(ctx);
3469
4702
  };
3470
- return /* @__PURE__ */ jsxs(Flex, {
4703
+ return /* @__PURE__ */ jsxs(Flex$1, {
3471
4704
  p: "xs",
3472
- style: { borderBottom: "1px solid var(--alepha-border)" },
3473
4705
  children: [
3474
- /* @__PURE__ */ jsxs(Flex, {
4706
+ /* @__PURE__ */ jsxs(Flex$1, {
3475
4707
  gap: 4,
3476
4708
  align: "center",
3477
4709
  children: [
@@ -3526,8 +4758,8 @@ const DataTableToolbar = ({ columns, filters, columnVisibility, filterVisibility
3526
4758
  ] })
3527
4759
  ]
3528
4760
  }),
3529
- /* @__PURE__ */ jsx(Flex, { flex: 1 }),
3530
- /* @__PURE__ */ jsxs(Flex, {
4761
+ /* @__PURE__ */ jsx(Flex$1, { flex: 1 }),
4762
+ /* @__PURE__ */ jsxs(Flex$1, {
3531
4763
  gap: "xs",
3532
4764
  children: [actions?.map((props, index) => !isValidElement(props) ? /* @__PURE__ */ jsx(ActionButton, {
3533
4765
  ...props,
@@ -3779,7 +5011,7 @@ const DataTable = (props) => {
3779
5011
  currentPage,
3780
5012
  form
3781
5013
  ]);
3782
- const totalColumns = visibleColumns.length + (panelConfig ? 1 : 0) + (props.withCheckbox ? 1 : 0);
5014
+ const totalColumns = visibleColumns.length + (panelConfig ? 1 : 0) + (props.withCheckbox ? 1 : 0) + (props.rowActions ? 1 : 0);
3783
5015
  const checkboxHeader = props.withCheckbox ? /* @__PURE__ */ jsx(Table.Th, {
3784
5016
  style: { width: 40 },
3785
5017
  children: /* @__PURE__ */ jsx(Checkbox, {
@@ -3802,13 +5034,15 @@ const DataTable = (props) => {
3802
5034
  userSelect: "none"
3803
5035
  } : {}
3804
5036
  },
3805
- children: /* @__PURE__ */ jsxs(Flex, {
5037
+ children: /* @__PURE__ */ jsxs(Flex$1, {
3806
5038
  align: "center",
3807
5039
  gap: 4,
3808
- children: [/* @__PURE__ */ jsx(Text, {
5040
+ children: [/* @__PURE__ */ jsx(Text$1, {
5041
+ bold: true,
5042
+ muted: true,
3809
5043
  size: "xs",
3810
5044
  children: col.label
3811
- }), col.sortable && /* @__PURE__ */ jsxs(Flex, {
5045
+ }), col.sortable && /* @__PURE__ */ jsxs(Flex$1, {
3812
5046
  c: "dimmed",
3813
5047
  children: [
3814
5048
  sortDir === "asc" && /* @__PURE__ */ jsx(IconArrowUp, { size: ui.sizes.icon.sm }),
@@ -3850,7 +5084,7 @@ const DataTable = (props) => {
3850
5084
  toggleExpand(itemKey);
3851
5085
  },
3852
5086
  style: { display: "inline-flex" },
3853
- children: /* @__PURE__ */ jsx(Flex, {
5087
+ children: /* @__PURE__ */ jsx(Flex$1, {
3854
5088
  c: "dimmed",
3855
5089
  align: "center",
3856
5090
  justify: "center",
@@ -3873,32 +5107,40 @@ const DataTable = (props) => {
3873
5107
  form,
3874
5108
  alepha
3875
5109
  };
3876
- if (col.actions) {
3877
- const rowActions = col.actions(item, ctx).filter((a) => a.visible !== false);
3878
- return /* @__PURE__ */ jsx(Table.Td, {
3879
- py: 2,
3880
- px: 4,
3881
- style: col.fit ? FIT_STYLE : void 0,
3882
- onClick: (e) => e.stopPropagation(),
3883
- children: /* @__PURE__ */ jsx(Flex, {
3884
- gap: 4,
3885
- children: rowActions.map(({ visible: _, ...actionProps }, i) => /* @__PURE__ */ jsx(ActionButton, {
3886
- variant: "subtle",
3887
- size: "xs",
3888
- preventDefault: true,
3889
- h: 20,
3890
- ...actionProps
3891
- }, i))
3892
- })
3893
- }, key);
3894
- }
3895
5110
  return /* @__PURE__ */ jsx(Table.Td, {
3896
- py: 2,
3897
- px: 4,
3898
5111
  style: col.fit ? FIT_STYLE : void 0,
3899
5112
  children: col.value?.(item, ctx)
3900
5113
  }, key);
3901
- })
5114
+ }),
5115
+ props.rowActions && (() => {
5116
+ const ctx = {
5117
+ index,
5118
+ form,
5119
+ alepha
5120
+ };
5121
+ const actions = props.rowActions(item, ctx).filter((a) => a.visible !== false);
5122
+ if (actions.length === 0) return /* @__PURE__ */ jsx(Table.Td, { style: FIT_STYLE });
5123
+ return /* @__PURE__ */ jsx(Table.Td, {
5124
+ py: 2,
5125
+ px: 4,
5126
+ style: FIT_STYLE,
5127
+ onClick: (e) => e.stopPropagation(),
5128
+ children: /* @__PURE__ */ jsx(ActionButton, {
5129
+ variant: "subtle",
5130
+ size: "xs",
5131
+ icon: IconDotsVertical,
5132
+ menu: { items: actions.map((action) => {
5133
+ const Icon = action.icon;
5134
+ return {
5135
+ label: action.label ?? (typeof action.tooltip === "string" ? action.tooltip : void 0),
5136
+ icon: Icon && isComponentType(Icon) ? /* @__PURE__ */ jsx(Icon, { size: 14 }) : Icon,
5137
+ onClick: action.onClick,
5138
+ color: action.color
5139
+ };
5140
+ }) }
5141
+ })
5142
+ });
5143
+ })()
3902
5144
  ]
3903
5145
  }, itemKey)];
3904
5146
  if (panelConfig && showPanel && isExpanded) elements.push(/* @__PURE__ */ jsx(Table.Tr, { children: /* @__PURE__ */ jsx(Table.Td, {
@@ -3916,13 +5158,19 @@ const DataTable = (props) => {
3916
5158
  "sort"
3917
5159
  ]);
3918
5160
  }, [props.filters, form.options.schema]);
3919
- return /* @__PURE__ */ jsxs(Flex, {
5161
+ return /* @__PURE__ */ jsxs(Flex$1, {
5162
+ gap: "xs",
3920
5163
  flex: 1,
3921
5164
  p: 0,
3922
- bdrs: "sm",
3923
5165
  direction: "column",
3924
- children: [
3925
- /* @__PURE__ */ jsx(DataTableToolbar, {
5166
+ style: { overflow: "hidden" },
5167
+ children: [/* @__PURE__ */ jsxs(Flex$1, {
5168
+ rounded: true,
5169
+ bordered: true,
5170
+ elevated: true,
5171
+ shadowed: "xs",
5172
+ col: true,
5173
+ children: [/* @__PURE__ */ jsx(DataTableToolbar, {
3926
5174
  columns: props.columns,
3927
5175
  filters: props.filters,
3928
5176
  columnVisibility,
@@ -3936,71 +5184,81 @@ const DataTable = (props) => {
3936
5184
  selectedItems: selection.selectedItems,
3937
5185
  checkboxActions: props.checkboxActions,
3938
5186
  onClearSelection: selection.clear
3939
- }),
3940
- filterSchema && props.filters && /* @__PURE__ */ jsx(DataTableFilters, {
5187
+ }), filterSchema && props.filters && /* @__PURE__ */ jsx(DataTableFilters, {
3941
5188
  schema: filterSchema,
3942
5189
  form,
3943
5190
  typeFormProps: props.typeFormProps,
3944
5191
  filterVisibility
3945
- }),
3946
- /* @__PURE__ */ jsx(Flex, {
3947
- className: "overflow-auto",
3948
- children: /* @__PURE__ */ jsxs(Table, {
3949
- "aria-label": "Data table",
3950
- withColumnBorders: true,
3951
- withRowBorders: true,
3952
- ...props.tableProps,
3953
- children: [/* @__PURE__ */ jsx(Table.Thead, {
3954
- style: {
3955
- position: "sticky",
3956
- top: 0,
3957
- zIndex: 1,
3958
- backgroundColor: "var(--mantine-color-body)"
3959
- },
3960
- children: /* @__PURE__ */ jsxs(Table.Tr, { children: [
3961
- panelConfig && /* @__PURE__ */ jsx(Table.Th, { style: { width: 36 } }),
3962
- checkboxHeader,
3963
- head
3964
- ] })
3965
- }), /* @__PURE__ */ jsxs(Table.Tbody, {
3966
- style: {
3967
- opacity: form.submitting ? .5 : 1,
3968
- transition: "opacity 150ms ease"
3969
- },
3970
- children: [rows, items.content.length === 0 && /* @__PURE__ */ jsx(Table.Tr, { children: /* @__PURE__ */ jsx(Table.Td, {
3971
- colSpan: totalColumns || 1,
3972
- py: "xl",
3973
- style: { textAlign: "center" },
3974
- children: /* @__PURE__ */ jsx(Text, {
3975
- c: "dimmed",
3976
- size: "sm",
3977
- children: form.submitting ? "Loading…" : "No results"
3978
- })
3979
- }) })]
3980
- })]
5192
+ })]
5193
+ }), /* @__PURE__ */ jsxs(Flex$1, {
5194
+ col: true,
5195
+ rounded: true,
5196
+ bordered: true,
5197
+ elevated: true,
5198
+ shadowed: "xs",
5199
+ children: [
5200
+ /* @__PURE__ */ jsx(Flex$1, {
5201
+ className: "overflow-auto",
5202
+ children: /* @__PURE__ */ jsxs(Table, {
5203
+ "aria-label": "Data table",
5204
+ withRowBorders: true,
5205
+ highlightOnHover: true,
5206
+ ...props.tableProps,
5207
+ children: [/* @__PURE__ */ jsx(Table.Thead, {
5208
+ style: {
5209
+ position: "sticky",
5210
+ top: 0,
5211
+ zIndex: 1
5212
+ },
5213
+ children: /* @__PURE__ */ jsxs(Table.Tr, { children: [
5214
+ panelConfig && /* @__PURE__ */ jsx(Table.Th, { style: { width: 36 } }),
5215
+ checkboxHeader,
5216
+ head,
5217
+ props.rowActions && /* @__PURE__ */ jsx(Table.Th, { style: FIT_STYLE })
5218
+ ] })
5219
+ }), /* @__PURE__ */ jsxs(Table.Tbody, {
5220
+ style: {
5221
+ opacity: form.submitting ? .5 : 1,
5222
+ transition: "opacity 150ms ease"
5223
+ },
5224
+ children: [rows, items.content.length === 0 && /* @__PURE__ */ jsx(Table.Tr, { children: /* @__PURE__ */ jsx(Table.Td, {
5225
+ colSpan: totalColumns || 1,
5226
+ py: "xl",
5227
+ style: { textAlign: "center" },
5228
+ children: /* @__PURE__ */ jsx(Text$1, {
5229
+ c: "dimmed",
5230
+ size: "sm",
5231
+ children: form.submitting ? "Loading…" : "No results"
5232
+ })
5233
+ }) })]
5234
+ })]
5235
+ })
5236
+ }),
5237
+ props.infinityScroll && /* @__PURE__ */ jsx("div", { ref: sentinelRef }),
5238
+ !props.infinityScroll && /* @__PURE__ */ jsx(DataTablePagination, {
5239
+ page,
5240
+ size,
5241
+ totalPages: items.page?.totalPages ?? 1,
5242
+ totalElements: items.page?.totalElements,
5243
+ offset: items.page?.offset ?? 0,
5244
+ numberOfElements: items.content.length,
5245
+ onPageChange: (value) => {
5246
+ form.input.page.set(value - 1);
5247
+ },
5248
+ onSizeChange: (value) => {
5249
+ form.input.size.set(value);
5250
+ }
5251
+ }),
5252
+ drawerConfig && /* @__PURE__ */ jsx(Drawer, {
5253
+ opened: drawerItem !== null,
5254
+ onClose: () => setDrawerItem(null),
5255
+ position: "right",
5256
+ size: "xl",
5257
+ ...drawerConfig.props,
5258
+ children: drawerItem && drawerConfig.render(drawerItem)
3981
5259
  })
3982
- }),
3983
- props.infinityScroll && /* @__PURE__ */ jsx("div", { ref: sentinelRef }),
3984
- !props.infinityScroll && /* @__PURE__ */ jsx(DataTablePagination, {
3985
- page,
3986
- size,
3987
- totalPages: items.page?.totalPages ?? 1,
3988
- onPageChange: (value) => {
3989
- form.input.page.set(value - 1);
3990
- },
3991
- onSizeChange: (value) => {
3992
- form.input.size.set(value);
3993
- }
3994
- }),
3995
- drawerConfig && /* @__PURE__ */ jsx(Drawer, {
3996
- opened: drawerItem !== null,
3997
- onClose: () => setDrawerItem(null),
3998
- position: "right",
3999
- size: "xl",
4000
- ...drawerConfig.props,
4001
- children: drawerItem && drawerConfig.render(drawerItem)
4002
- })
4003
- ]
5260
+ ]
5261
+ })]
4004
5262
  });
4005
5263
  };
4006
5264
 
@@ -4213,5 +5471,5 @@ const AlephaUI = $module({
4213
5471
  });
4214
5472
 
4215
5473
  //#endregion
4216
- export { AlephaMantineProvider as _, useDialog as a, Text$1 as c, Breadcrumb as d, Heading as f, ui as g, ActionButton as h, JsonViewer as i, DashboardShell as l, ToggleSidebarButton as m, capitalize as n, TypeForm as o, Flex$1 as p, DataTable as r, Control as s, AlephaUI as t, Sidebar as u, useToast as v };
4217
- //# sourceMappingURL=core-RCUw1Q-a.js.map
5474
+ export { AlephaMantineProvider as _, TypeForm as a, DashboardShell as c, Heading as d, Flex$1 as f, ui as g, ActionButton as h, JsonViewer as i, Sidebar as l, useDialog as m, capitalize as n, Control as o, ToggleSidebarButton as p, DataTable as r, Text$1 as s, AlephaUI as t, Breadcrumb as u, useToast as v };
5475
+ //# sourceMappingURL=core-B7LNjM78.js.map