@akira-io/ui 1.0.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/README.md +15 -10
  2. package/dist/blocks.d.ts +162 -9
  3. package/dist/blocks.js +1410 -36
  4. package/dist/blocks.js.map +1 -1
  5. package/dist/button-Bj6My68b.d.ts +17 -0
  6. package/dist/chunk-2WIIRDHT.js +83 -0
  7. package/dist/chunk-2WIIRDHT.js.map +1 -0
  8. package/dist/{chunk-A2SIZOEA.js → chunk-4SOQAVUP.js} +125 -45
  9. package/dist/chunk-4SOQAVUP.js.map +1 -0
  10. package/dist/chunk-5AJFQ6C4.js +35 -0
  11. package/dist/chunk-5AJFQ6C4.js.map +1 -0
  12. package/dist/chunk-CFDDAFPJ.js +1243 -0
  13. package/dist/chunk-CFDDAFPJ.js.map +1 -0
  14. package/dist/chunk-FWQFB37J.js +45 -0
  15. package/dist/chunk-FWQFB37J.js.map +1 -0
  16. package/dist/chunk-IQMRJXEO.js +59 -0
  17. package/dist/chunk-IQMRJXEO.js.map +1 -0
  18. package/dist/chunk-L2H5GIF7.js +22 -0
  19. package/dist/chunk-L2H5GIF7.js.map +1 -0
  20. package/dist/chunk-ODYCBCKS.js +290 -0
  21. package/dist/chunk-ODYCBCKS.js.map +1 -0
  22. package/dist/{chunk-5MQWJVM2.js → chunk-QHZWW55M.js} +383 -326
  23. package/dist/chunk-QHZWW55M.js.map +1 -0
  24. package/dist/chunk-RPCL7VFQ.js +123 -0
  25. package/dist/chunk-RPCL7VFQ.js.map +1 -0
  26. package/dist/chunk-T2INZOCM.js +165 -0
  27. package/dist/chunk-T2INZOCM.js.map +1 -0
  28. package/dist/chunk-TGF54WAO.js +29 -0
  29. package/dist/chunk-TGF54WAO.js.map +1 -0
  30. package/dist/chunk-XZCC6MTE.js +26 -0
  31. package/dist/chunk-XZCC6MTE.js.map +1 -0
  32. package/dist/{chunk-UXL33CZ4.js → chunk-YOVY3KT6.js} +13 -11
  33. package/dist/chunk-YOVY3KT6.js.map +1 -0
  34. package/dist/code.d.ts +9 -0
  35. package/dist/code.js +650 -0
  36. package/dist/code.js.map +1 -0
  37. package/dist/context-YWbxMH0C.d.ts +383 -0
  38. package/dist/editor.d.ts +128 -0
  39. package/dist/editor.js +450 -0
  40. package/dist/editor.js.map +1 -0
  41. package/dist/index.d.ts +298 -222
  42. package/dist/index.js +1300 -670
  43. package/dist/index.js.map +1 -1
  44. package/dist/inertia.d.ts +47 -2
  45. package/dist/inertia.js +138 -7
  46. package/dist/inertia.js.map +1 -1
  47. package/dist/input-Dpi7pXeR.d.ts +6 -0
  48. package/dist/json-viewer-BARA2RCW.d.ts +51 -0
  49. package/dist/{language-Bft6rBBt.d.ts → language-Dgjr9bm3.d.ts} +1 -1
  50. package/dist/locales/pt.d.ts +26 -4
  51. package/dist/locales/pt.js +127 -1
  52. package/dist/locales/pt.js.map +1 -1
  53. package/dist/password-input-DcXX7SG9.d.ts +51 -0
  54. package/dist/shells.d.ts +45 -7
  55. package/dist/shells.js +96 -60
  56. package/dist/shells.js.map +1 -1
  57. package/dist/sidebar-DqkFRUxQ.d.ts +81 -0
  58. package/dist/types-B-eGPoFD.d.ts +111 -0
  59. package/dist/types-cmBL8zOc.d.ts +51 -0
  60. package/package.json +170 -130
  61. package/theme.css +20 -0
  62. package/themes/nosferry.css +4 -0
  63. package/dist/chunk-42BJBH56.js +0 -786
  64. package/dist/chunk-42BJBH56.js.map +0 -1
  65. package/dist/chunk-5MQWJVM2.js.map +0 -1
  66. package/dist/chunk-A2SIZOEA.js.map +0 -1
  67. package/dist/chunk-POE7OYET.js +0 -96
  68. package/dist/chunk-POE7OYET.js.map +0 -1
  69. package/dist/chunk-UXL33CZ4.js.map +0 -1
  70. package/dist/date-range-filter-QEa8fhUM.d.ts +0 -149
  71. package/dist/sidebar-BDhG9SUU.d.ts +0 -88
  72. package/dist/types-Cno1_Ijx.d.ts +0 -40
  73. package/dist/types-cOieac8G.d.ts +0 -77
@@ -0,0 +1,51 @@
1
+ import { Slot } from '@radix-ui/react-slot';
2
+ import * as React from 'react';
3
+ import * as LabelPrimitive from '@radix-ui/react-label';
4
+ import { S as SlotNameProps } from './types-cmBL8zOc.js';
5
+ import { I as Input } from './input-Dpi7pXeR.js';
6
+
7
+ type FieldOrientation = 'vertical' | 'horizontal';
8
+ interface FieldContextValue {
9
+ controlId: string;
10
+ descriptionId: string;
11
+ errorId: string;
12
+ orientation: FieldOrientation;
13
+ invalid: boolean;
14
+ required: boolean;
15
+ hasDescription: boolean;
16
+ setHasDescription: (present: boolean) => void;
17
+ }
18
+ declare function useField(): FieldContextValue;
19
+
20
+ declare function Label({ className, slotName, ...props }: React.ComponentProps<typeof LabelPrimitive.Root> & SlotNameProps): React.JSX.Element;
21
+
22
+ interface FieldLabels {
23
+ requiredLabel: string;
24
+ }
25
+ interface FieldProps extends React.ComponentProps<'div'> {
26
+ orientation?: FieldOrientation;
27
+ error?: string;
28
+ invalid?: boolean;
29
+ required?: boolean;
30
+ }
31
+ declare function Field({ className, children, id, orientation, error, invalid, required, slotName, ...props }: FieldProps & SlotNameProps): React.JSX.Element;
32
+ declare function FieldGroup({ className, slotName, ...props }: React.ComponentProps<'div'> & SlotNameProps): React.JSX.Element;
33
+ interface FieldLabelProps extends React.ComponentProps<typeof Label> {
34
+ requiredLabel?: FieldLabels['requiredLabel'];
35
+ }
36
+ declare function FieldLabel({ className, children, requiredLabel, slotName, ...props }: FieldLabelProps & SlotNameProps): React.JSX.Element;
37
+ declare function FieldDescription({ className, slotName, ...props }: React.ComponentProps<'p'> & SlotNameProps): React.JSX.Element;
38
+ declare function FieldControl({ className, ...props }: React.ComponentProps<typeof Slot>): React.JSX.Element;
39
+
40
+ interface PasswordInputLabels {
41
+ showLabel: string;
42
+ hideLabel: string;
43
+ }
44
+ interface PasswordInputProps extends Omit<React.ComponentProps<typeof Input>, 'type'> {
45
+ revealable?: boolean;
46
+ showLabel?: PasswordInputLabels['showLabel'];
47
+ hideLabel?: PasswordInputLabels['hideLabel'];
48
+ }
49
+ declare function PasswordInput({ className, revealable, showLabel, hideLabel, slotName, ...props }: PasswordInputProps & SlotNameProps): React.JSX.Element;
50
+
51
+ export { Field as F, Label as L, PasswordInput as P, type FieldContextValue as a, FieldControl as b, FieldDescription as c, FieldGroup as d, FieldLabel as e, type FieldLabels as f, type FieldOrientation as g, type PasswordInputLabels as h, useField as u };
package/dist/shells.d.ts CHANGED
@@ -1,10 +1,14 @@
1
- import { U as UrlLike, N as NavGroup, a as NavItem, S as SharedUser, L as LinkComponent, B as BreadcrumbItem } from './types-Cno1_Ijx.js';
2
- export { I as IconComponent, b as LinkProps } from './types-Cno1_Ijx.js';
1
+ import { U as UrlLike, N as NavGroup, b as NavItem, c as SharedUser, d as LinkComponent, B as BreadcrumbItem, S as SlotNameProps } from './types-cmBL8zOc.js';
2
+ export { C as Column, a as ColumnDef, F as FilterFn, I as IconComponent, e as LinkProps, L as LucideIcon, R as Row, T as TableInstance } from './types-cmBL8zOc.js';
3
3
  import * as React from 'react';
4
4
  import { ReactNode, ComponentPropsWithoutRef, PropsWithChildren } from 'react';
5
- import { d as SidebarGroup } from './sidebar-BDhG9SUU.js';
5
+ import { d as SidebarGroup } from './sidebar-DqkFRUxQ.js';
6
+ import '@tanstack/react-table';
7
+ import 'lucide-react';
6
8
  import 'class-variance-authority/types';
7
9
  import 'class-variance-authority';
10
+ import './button-Bj6My68b.js';
11
+ import './input-Dpi7pXeR.js';
8
12
  import '@radix-ui/react-separator';
9
13
  import '@radix-ui/react-tooltip';
10
14
 
@@ -17,6 +21,18 @@ declare function useAppearance(): {
17
21
  readonly updateAppearance: (mode: Appearance) => void;
18
22
  };
19
23
 
24
+ declare const SIDEBAR_COLLAPSED_GROUPS_KEY = "akira-ui:collapsed-nav-groups";
25
+ interface CollapsedGroupsOptions {
26
+ group: string;
27
+ defaultOpen?: boolean;
28
+ collapsedGroups?: string[];
29
+ onCollapsedChange?: (collapsedGroups: string[]) => void;
30
+ }
31
+ declare function useCollapsedGroup({ group, defaultOpen, collapsedGroups, onCollapsedChange, }: CollapsedGroupsOptions): {
32
+ open: boolean;
33
+ setOpen: (open: boolean) => void;
34
+ };
35
+
20
36
  declare function useInitials(): (fullName: string) => string;
21
37
 
22
38
  declare function useIsMobile(): boolean;
@@ -45,10 +61,13 @@ interface AppSidebarProps {
45
61
  logoutHref: UrlLike;
46
62
  currentUrl?: string;
47
63
  linkComponent?: LinkComponent;
64
+ collapsibleGroups?: boolean;
65
+ collapsedGroups?: string[];
66
+ onCollapsedChange?: (collapsedGroups: string[]) => void;
48
67
  onSettingsClick?: () => void;
49
68
  onLogout?: () => void;
50
69
  }
51
- declare function AppSidebar({ logo, logoHref, groups, footerItems, user, settingsHref, logoutHref, currentUrl, linkComponent, onSettingsClick, onLogout, }: AppSidebarProps): React.JSX.Element;
70
+ declare function AppSidebar({ logo, logoHref, groups, footerItems, user, settingsHref, logoutHref, currentUrl, linkComponent, collapsibleGroups, collapsedGroups, onCollapsedChange, onSettingsClick, onLogout, }: AppSidebarProps): React.JSX.Element;
52
71
 
53
72
  interface AppSidebarHeaderProps {
54
73
  breadcrumbs?: BreadcrumbItem[];
@@ -58,6 +77,22 @@ interface AppSidebarHeaderProps {
58
77
  }
59
78
  declare function AppSidebarHeader({ breadcrumbs, linkComponent, onSearchClick, searchLabel, }: AppSidebarHeaderProps): React.JSX.Element;
60
79
 
80
+ type AuthArrangement = 'centred' | 'split';
81
+ interface AuthShellProps {
82
+ logo?: ReactNode;
83
+ title: string;
84
+ description?: string;
85
+ arrangement?: AuthArrangement;
86
+ panel?: ReactNode;
87
+ panelDecorative?: boolean;
88
+ footer?: ReactNode;
89
+ appearanceControl?: ReactNode;
90
+ surface?: boolean;
91
+ children: ReactNode;
92
+ className?: string;
93
+ }
94
+ declare function AuthShell({ logo, title, description, arrangement, panel, panelDecorative, footer, appearanceControl, surface, children, className, slotName, }: AuthShellProps & SlotNameProps): React.JSX.Element;
95
+
61
96
  declare function Breadcrumbs({ breadcrumbs, linkComponent, }: {
62
97
  breadcrumbs: BreadcrumbItem[];
63
98
  linkComponent?: LinkComponent;
@@ -72,14 +107,17 @@ declare function NavFooter({ items, className, ...props }: ComponentPropsWithout
72
107
  items: NavItem[];
73
108
  }): React.JSX.Element;
74
109
 
75
- declare function NavMain({ items, label, currentUrl, linkComponent, collapsible, defaultOpen, }: {
110
+ interface NavMainProps {
76
111
  items: NavItem[];
77
112
  label?: string;
78
113
  currentUrl?: string;
79
114
  linkComponent?: LinkComponent;
80
115
  collapsible?: boolean;
81
116
  defaultOpen?: boolean;
82
- }): React.JSX.Element;
117
+ collapsedGroups?: string[];
118
+ onCollapsedChange?: (collapsedGroups: string[]) => void;
119
+ }
120
+ declare function NavMain({ items, label, currentUrl, linkComponent, collapsible, defaultOpen, collapsedGroups, onCollapsedChange, }: NavMainProps): React.JSX.Element;
83
121
 
84
122
  interface NavUserProps {
85
123
  user: SharedUser;
@@ -118,4 +156,4 @@ interface UserMenuContentProps {
118
156
  }
119
157
  declare function UserMenuContent({ user, settingsHref, logoutHref, linkComponent, onSettingsClick, onLogout, settingsLabel, logoutLabel, }: UserMenuContentProps): React.JSX.Element;
120
158
 
121
- export { AppContent, AppShell, AppSidebar, AppSidebarHeader, type Appearance, BreadcrumbItem, Breadcrumbs, Heading, LinkComponent, NavFooter, NavGroup, NavItem, NavMain, NavUser, SettingsLayout, type SettingsLayoutProps, SharedUser, UrlLike, UserInfo, UserMenuContent, hrefToString, initializeTheme, useAppearance, useInitials, useIsMobile };
159
+ export { AppContent, AppShell, AppSidebar, AppSidebarHeader, type Appearance, type AuthArrangement, AuthShell, type AuthShellProps, BreadcrumbItem, Breadcrumbs, Heading, LinkComponent, NavFooter, NavGroup, NavItem, NavMain, type NavMainProps, NavUser, SIDEBAR_COLLAPSED_GROUPS_KEY, SettingsLayout, type SettingsLayoutProps, SharedUser, SlotNameProps, UrlLike, UserInfo, UserMenuContent, hrefToString, initializeTheme, useAppearance, useCollapsedGroup, useInitials, useIsMobile };
package/dist/shells.js CHANGED
@@ -1,63 +1,14 @@
1
- export { AppSidebar, AppSidebarHeader, Breadcrumbs, Heading, NavFooter, NavMain, NavUser, SettingsLayout, UserInfo, UserMenuContent, hrefToString, useInitials } from './chunk-A2SIZOEA.js';
2
- import { SidebarInset, SidebarProvider } from './chunk-5MQWJVM2.js';
3
- export { useIsMobile } from './chunk-5MQWJVM2.js';
4
- import './chunk-POE7OYET.js';
5
- import { useState, useCallback, useEffect } from 'react';
6
- import { jsx } from 'react/jsx-runtime';
1
+ export { initializeTheme, useAppearance } from './chunk-IQMRJXEO.js';
2
+ import { Card } from './chunk-RPCL7VFQ.js';
3
+ export { AppSidebar, AppSidebarHeader, Breadcrumbs, Heading, NavFooter, NavMain, NavUser, SIDEBAR_COLLAPSED_GROUPS_KEY, SettingsLayout, UserInfo, UserMenuContent, useCollapsedGroup, useInitials } from './chunk-4SOQAVUP.js';
4
+ import { SidebarInset, SidebarProvider } from './chunk-QHZWW55M.js';
5
+ export { useIsMobile } from './chunk-QHZWW55M.js';
6
+ export { hrefToString } from './chunk-L2H5GIF7.js';
7
+ import './chunk-TGF54WAO.js';
8
+ import './chunk-XZCC6MTE.js';
9
+ import { cn } from './chunk-ODYCBCKS.js';
10
+ import { jsx, jsxs } from 'react/jsx-runtime';
7
11
 
8
- var prefersDark = () => {
9
- if (typeof window === "undefined") {
10
- return false;
11
- }
12
- return window.matchMedia("(prefers-color-scheme: dark)").matches;
13
- };
14
- var setCookie = (name, value, days = 365) => {
15
- if (typeof document === "undefined") {
16
- return;
17
- }
18
- const maxAge = days * 24 * 60 * 60;
19
- document.cookie = `${name}=${value};path=/;max-age=${maxAge};SameSite=Lax`;
20
- };
21
- var applyTheme = (appearance) => {
22
- const isDark = appearance === "dark" || appearance === "system" && prefersDark();
23
- document.documentElement.classList.toggle("dark", isDark);
24
- document.documentElement.style.colorScheme = isDark ? "dark" : "light";
25
- };
26
- var mediaQuery = () => {
27
- if (typeof window === "undefined") {
28
- return null;
29
- }
30
- return window.matchMedia("(prefers-color-scheme: dark)");
31
- };
32
- var handleSystemThemeChange = () => {
33
- const currentAppearance = localStorage.getItem("appearance");
34
- applyTheme(currentAppearance || "system");
35
- };
36
- function initializeTheme() {
37
- const savedAppearance = localStorage.getItem("appearance") || "system";
38
- applyTheme(savedAppearance);
39
- mediaQuery()?.addEventListener("change", handleSystemThemeChange);
40
- }
41
- function useAppearance() {
42
- const [appearance, setAppearance] = useState("system");
43
- const updateAppearance = useCallback((mode) => {
44
- setAppearance(mode);
45
- localStorage.setItem("appearance", mode);
46
- setCookie("appearance", mode);
47
- applyTheme(mode);
48
- }, []);
49
- useEffect(() => {
50
- const savedAppearance = localStorage.getItem(
51
- "appearance"
52
- );
53
- updateAppearance(savedAppearance || "system");
54
- return () => mediaQuery()?.removeEventListener(
55
- "change",
56
- handleSystemThemeChange
57
- );
58
- }, [updateAppearance]);
59
- return { appearance, updateAppearance };
60
- }
61
12
  function AppContent({
62
13
  variant = "header",
63
14
  children,
@@ -95,7 +46,92 @@ function AppShell({
95
46
  }
96
47
  );
97
48
  }
49
+ function AuthShell({
50
+ logo,
51
+ title,
52
+ description,
53
+ arrangement = "centred",
54
+ panel,
55
+ panelDecorative = true,
56
+ footer,
57
+ appearanceControl,
58
+ surface = true,
59
+ children,
60
+ className,
61
+ slotName = "auth-shell"
62
+ }) {
63
+ const split = arrangement === "split";
64
+ const form = /* @__PURE__ */ jsxs(
65
+ "div",
66
+ {
67
+ "data-slot": "auth-shell-form",
68
+ className: "gap-6 max-w-md flex w-full flex-col",
69
+ children: [
70
+ logo && /* @__PURE__ */ jsx(
71
+ "div",
72
+ {
73
+ "data-slot": "auth-shell-logo",
74
+ className: "flex justify-center",
75
+ children: logo
76
+ }
77
+ ),
78
+ /* @__PURE__ */ jsxs("div", { "data-slot": "auth-shell-heading", className: "space-y-2", children: [
79
+ /* @__PURE__ */ jsx("h1", { className: "text-xl font-bold tracking-tight text-foreground", children: title }),
80
+ description && /* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-muted-foreground", children: description })
81
+ ] }),
82
+ surface ? /* @__PURE__ */ jsx(Card, { className: "p-6", children: /* @__PURE__ */ jsx("div", { "data-slot": "auth-shell-body", children }) }) : /* @__PURE__ */ jsx("div", { "data-slot": "auth-shell-body", children }),
83
+ footer && /* @__PURE__ */ jsx(
84
+ "footer",
85
+ {
86
+ "data-slot": "auth-shell-footer",
87
+ className: "gap-2 text-sm font-medium flex flex-wrap items-center justify-center text-muted-foreground",
88
+ children: footer
89
+ }
90
+ )
91
+ ]
92
+ }
93
+ );
94
+ return /* @__PURE__ */ jsxs(
95
+ "div",
96
+ {
97
+ "data-arrangement": arrangement,
98
+ className: cn(
99
+ "relative flex min-h-screen w-full",
100
+ split && "lg:grid lg:grid-cols-2",
101
+ className
102
+ ),
103
+ "data-slot": slotName,
104
+ children: [
105
+ split && panel && /* @__PURE__ */ jsx(
106
+ "aside",
107
+ {
108
+ "data-slot": "auth-shell-panel",
109
+ "aria-hidden": panelDecorative || void 0,
110
+ className: "p-10 lg:flex hidden flex-col justify-between bg-primary text-primary-foreground",
111
+ children: panel
112
+ }
113
+ ),
114
+ /* @__PURE__ */ jsx(
115
+ "main",
116
+ {
117
+ "data-slot": "auth-shell-main",
118
+ className: "p-6 flex flex-1 items-center justify-center",
119
+ children: form
120
+ }
121
+ ),
122
+ appearanceControl && /* @__PURE__ */ jsx(
123
+ "div",
124
+ {
125
+ "data-slot": "auth-shell-appearance",
126
+ className: "top-4 right-4 absolute",
127
+ children: appearanceControl
128
+ }
129
+ )
130
+ ]
131
+ }
132
+ );
133
+ }
98
134
 
99
- export { AppContent, AppShell, initializeTheme, useAppearance };
135
+ export { AppContent, AppShell, AuthShell };
100
136
  //# sourceMappingURL=shells.js.map
101
137
  //# sourceMappingURL=shells.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/hooks/use-appearance.tsx","../src/shells/app-content.tsx","../src/shells/app-shell.tsx"],"names":["j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A;AAAA,GACL;AAER;ACbO,SAAS,QAAA,CAAS;AAAA,EACrB,QAAA;AAAA,EACA,OAAA,GAAU,QAAA;AAAA,EACV,IAAA;AAAA,EACA,YAAA;AAAA,EACA,WAAA,GAAc;AAClB,CAAA,EAAkB;AACd,EAAA,IAAI,YAAY,QAAA,EAAU;AACtB,IAAA,uBACIA,GAAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,qCAAqC,QAAA,EAAS,CAAA;AAAA,EAErE;AAEA,EAAA,uBACIA,GAAAA;AAAA,IAAC,eAAA;AAAA,IAAA;AAAA,MACG,IAAA;AAAA,MACA,YAAA;AAAA,MACA,WAAA;AAAA,MAEC;AAAA;AAAA,GACL;AAER","file":"shells.js","sourcesContent":["import { useCallback, useEffect, useState } from 'react';\n\nexport type Appearance = 'light' | 'dark' | 'system';\n\nconst prefersDark = () => {\n if (typeof window === 'undefined') {\n return false;\n }\n\n return window.matchMedia('(prefers-color-scheme: dark)').matches;\n};\n\nconst setCookie = (name: string, value: string, days = 365) => {\n if (typeof document === 'undefined') {\n return;\n }\n\n const maxAge = days * 24 * 60 * 60;\n document.cookie = `${name}=${value};path=/;max-age=${maxAge};SameSite=Lax`;\n};\n\nconst applyTheme = (appearance: Appearance) => {\n const isDark =\n appearance === 'dark' || (appearance === 'system' && prefersDark());\n\n document.documentElement.classList.toggle('dark', isDark);\n document.documentElement.style.colorScheme = isDark ? 'dark' : 'light';\n};\n\nconst mediaQuery = () => {\n if (typeof window === 'undefined') {\n return null;\n }\n\n return window.matchMedia('(prefers-color-scheme: dark)');\n};\n\nconst handleSystemThemeChange = () => {\n const currentAppearance = localStorage.getItem('appearance') as Appearance;\n applyTheme(currentAppearance || 'system');\n};\n\nexport function initializeTheme() {\n const savedAppearance =\n (localStorage.getItem('appearance') as Appearance) || 'system';\n\n applyTheme(savedAppearance);\n\n mediaQuery()?.addEventListener('change', handleSystemThemeChange);\n}\n\nexport function useAppearance() {\n const [appearance, setAppearance] = useState<Appearance>('system');\n\n const updateAppearance = useCallback((mode: Appearance) => {\n setAppearance(mode);\n\n localStorage.setItem('appearance', mode);\n setCookie('appearance', mode);\n applyTheme(mode);\n }, []);\n\n useEffect(() => {\n const savedAppearance = localStorage.getItem(\n 'appearance',\n ) as Appearance | null;\n updateAppearance(savedAppearance || 'system');\n\n return () =>\n mediaQuery()?.removeEventListener(\n 'change',\n handleSystemThemeChange,\n );\n }, [updateAppearance]);\n\n return { appearance, updateAppearance } as const;\n}\n","import * as React from 'react';\n\nimport { SidebarInset } from '@/components/ui/sidebar';\n\ninterface AppContentProps extends React.ComponentProps<'main'> {\n variant?: 'header' | 'sidebar';\n}\n\nexport function AppContent({\n variant = 'header',\n children,\n ...props\n}: AppContentProps) {\n if (variant === 'sidebar') {\n return <SidebarInset {...props}>{children}</SidebarInset>;\n }\n\n return (\n <main\n className=\"max-w-7xl gap-4 rounded-xl mx-auto flex h-full w-full flex-1 flex-col\"\n {...props}\n >\n {children}\n </main>\n );\n}\n","import * as React from 'react';\n\nimport { SidebarProvider } from '@/components/ui/sidebar';\n\ninterface AppShellProps {\n children: React.ReactNode;\n variant?: 'header' | 'sidebar';\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n defaultOpen?: boolean;\n}\n\nexport function AppShell({\n children,\n variant = 'header',\n open,\n onOpenChange,\n defaultOpen = true,\n}: AppShellProps) {\n if (variant === 'header') {\n return (\n <div className=\"flex min-h-screen w-full flex-col\">{children}</div>\n );\n }\n\n return (\n <SidebarProvider\n open={open}\n onOpenChange={onOpenChange}\n defaultOpen={defaultOpen}\n >\n {children}\n </SidebarProvider>\n );\n}\n"]}
1
+ {"version":3,"sources":["../src/shells/app-content.tsx","../src/shells/app-shell.tsx","../src/shells/auth-shell.tsx"],"names":["jsx"],"mappings":";;;;;;;;;;;AAQO,SAAS,UAAA,CAAW;AAAA,EACvB,OAAA,GAAU,QAAA;AAAA,EACV,QAAA;AAAA,EACA,GAAG;AACP,CAAA,EAAoB;AAChB,EAAA,IAAI,Y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AA;AAAA;AAAA,SACL;AAAA,wBAGJA,GAAAA;AAAA,UAAC,MAAA;AAAA,UAAA;AAAA,YACG,WAAA,EAAU,iBAAA;AAAA,YACV,SAAA,EAAU,6CAAA;AAAA,YAET,QAAA,EAAA;AAAA;AAAA,SACL;AAAA,QAEC,qCACGA,GAAAA;AAAA,UAAC,KAAA;AAAA,UAAA;AAAA,YACG,WAAA,EAAU,uBAAA;AAAA,YACV,SAAA,EAAU,wBAAA;AAAA,YAET,QAAA,EAAA;AAAA;AAAA;AACL;AAAA;AAAA,GAER;AAER","file":"shells.js","sourcesContent":["import * as React from 'react';\n\nimport { SidebarInset } from '@/components/ui/sidebar';\n\ninterface AppContentProps extends React.ComponentProps<'main'> {\n variant?: 'header' | 'sidebar';\n}\n\nexport function AppContent({\n variant = 'header',\n children,\n ...props\n}: AppContentProps) {\n if (variant === 'sidebar') {\n return <SidebarInset {...props}>{children}</SidebarInset>;\n }\n\n return (\n <main\n className=\"max-w-7xl gap-4 rounded-xl mx-auto flex h-full w-full flex-1 flex-col\"\n {...props}\n >\n {children}\n </main>\n );\n}\n","import * as React from 'react';\n\nimport { SidebarProvider } from '@/components/ui/sidebar';\n\ninterface AppShellProps {\n children: React.ReactNode;\n variant?: 'header' | 'sidebar';\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n defaultOpen?: boolean;\n}\n\nexport function AppShell({\n children,\n variant = 'header',\n open,\n onOpenChange,\n defaultOpen = true,\n}: AppShellProps) {\n if (variant === 'header') {\n return (\n <div className=\"flex min-h-screen w-full flex-col\">{children}</div>\n );\n }\n\n return (\n <SidebarProvider\n open={open}\n onOpenChange={onOpenChange}\n defaultOpen={defaultOpen}\n >\n {children}\n </SidebarProvider>\n );\n}\n","import { Card } from '@/components/ui/card';\nimport { cn } from '@/lib/utils';\nimport type { SlotNameProps } from '@/types';\nimport { type ReactNode } from 'react';\n\nexport type AuthArrangement = 'centred' | 'split';\n\nexport interface AuthShellProps {\n logo?: ReactNode;\n title: string;\n description?: string;\n arrangement?: AuthArrangement;\n panel?: ReactNode;\n panelDecorative?: boolean;\n footer?: ReactNode;\n appearanceControl?: ReactNode;\n surface?: boolean;\n children: ReactNode;\n className?: string;\n}\n\nexport function AuthShell({\n logo,\n title,\n description,\n arrangement = 'centred',\n panel,\n panelDecorative = true,\n footer,\n appearanceControl,\n surface = true,\n children,\n className,\n slotName = 'auth-shell',\n}: AuthShellProps & SlotNameProps) {\n const split = arrangement === 'split';\n\n const form = (\n <div\n data-slot=\"auth-shell-form\"\n className=\"gap-6 max-w-md flex w-full flex-col\"\n >\n {logo && (\n <div\n data-slot=\"auth-shell-logo\"\n className=\"flex justify-center\"\n >\n {logo}\n </div>\n )}\n\n <div data-slot=\"auth-shell-heading\" className=\"space-y-2\">\n <h1 className=\"text-xl font-bold tracking-tight text-foreground\">\n {title}\n </h1>\n {description && (\n <p className=\"text-sm font-medium text-muted-foreground\">\n {description}\n </p>\n )}\n </div>\n\n {surface ? (\n <Card className=\"p-6\">\n <div data-slot=\"auth-shell-body\">{children}</div>\n </Card>\n ) : (\n <div data-slot=\"auth-shell-body\">{children}</div>\n )}\n\n {footer && (\n <footer\n data-slot=\"auth-shell-footer\"\n className=\"gap-2 text-sm font-medium flex flex-wrap items-center justify-center text-muted-foreground\"\n >\n {footer}\n </footer>\n )}\n </div>\n );\n\n return (\n <div\n data-arrangement={arrangement}\n className={cn(\n 'relative flex min-h-screen w-full',\n split && 'lg:grid lg:grid-cols-2',\n className,\n )}\n data-slot={slotName}\n >\n {split && panel && (\n <aside\n data-slot=\"auth-shell-panel\"\n aria-hidden={panelDecorative || undefined}\n className=\"p-10 lg:flex hidden flex-col justify-between bg-primary text-primary-foreground\"\n >\n {panel}\n </aside>\n )}\n\n <main\n data-slot=\"auth-shell-main\"\n className=\"p-6 flex flex-1 items-center justify-center\"\n >\n {form}\n </main>\n\n {appearanceControl && (\n <div\n data-slot=\"auth-shell-appearance\"\n className=\"top-4 right-4 absolute\"\n >\n {appearanceControl}\n </div>\n )}\n </div>\n );\n}\n"]}
@@ -0,0 +1,81 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ import * as React from 'react';
4
+ import { B as Button } from './button-Bj6My68b.js';
5
+ import { I as Input } from './input-Dpi7pXeR.js';
6
+ import * as SeparatorPrimitive from '@radix-ui/react-separator';
7
+ import { S as SlotNameProps } from './types-cmBL8zOc.js';
8
+ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
9
+
10
+ declare function Separator({ className, orientation, decorative, slotName, ...props }: React.ComponentProps<typeof SeparatorPrimitive.Root> & SlotNameProps): React.JSX.Element;
11
+
12
+ declare function TooltipProvider({ delayDuration, slotName, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider> & SlotNameProps): React.JSX.Element;
13
+ declare function Tooltip({ slotName, ...props }: React.ComponentProps<typeof TooltipPrimitive.Root> & SlotNameProps): React.JSX.Element;
14
+ declare function TooltipTrigger({ slotName, ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger> & SlotNameProps): React.JSX.Element;
15
+ declare function TooltipContent({ className, sideOffset, children, slotName, ...props }: React.ComponentProps<typeof TooltipPrimitive.Content> & SlotNameProps): React.JSX.Element;
16
+
17
+ type SidebarContext = {
18
+ state: 'expanded' | 'collapsed';
19
+ open: boolean;
20
+ setOpen: (open: boolean) => void;
21
+ openMobile: boolean;
22
+ setOpenMobile: (open: boolean) => void;
23
+ isMobile: boolean;
24
+ toggleSidebar: () => void;
25
+ };
26
+ declare const SidebarContext: React.Context<SidebarContext | null>;
27
+ declare function useSidebar(): SidebarContext;
28
+ declare function SidebarProvider({ defaultOpen, open: openProp, onOpenChange: setOpenProp, className, style, children, slotName, ...props }: React.ComponentProps<'div'> & {
29
+ defaultOpen?: boolean;
30
+ open?: boolean;
31
+ onOpenChange?: (open: boolean) => void;
32
+ } & SlotNameProps): React.JSX.Element;
33
+ declare function Sidebar({ side, variant, collapsible, className, children, slotName, ...props }: React.ComponentProps<'div'> & {
34
+ side?: 'left' | 'right';
35
+ variant?: 'sidebar' | 'floating' | 'inset';
36
+ collapsible?: 'offcanvas' | 'icon' | 'none';
37
+ } & SlotNameProps): React.JSX.Element;
38
+ declare function SidebarTrigger({ className, onClick, slotName, ...props }: React.ComponentProps<typeof Button> & SlotNameProps): React.JSX.Element;
39
+ declare function SidebarRail({ className, slotName, ...props }: React.ComponentProps<'button'> & SlotNameProps): React.JSX.Element;
40
+ declare function SidebarInset({ className, slotName, ...props }: React.ComponentProps<'main'> & SlotNameProps): React.JSX.Element;
41
+ declare function SidebarInput({ className, slotName, ...props }: React.ComponentProps<typeof Input> & SlotNameProps): React.JSX.Element;
42
+ declare function SidebarHeader({ className, slotName, ...props }: React.ComponentProps<'div'> & SlotNameProps): React.JSX.Element;
43
+ declare function SidebarFooter({ className, slotName, ...props }: React.ComponentProps<'div'> & SlotNameProps): React.JSX.Element;
44
+ declare function SidebarSeparator({ className, slotName, ...props }: React.ComponentProps<typeof Separator> & SlotNameProps): React.JSX.Element;
45
+ declare function SidebarContent({ className, slotName, ...props }: React.ComponentProps<'div'> & SlotNameProps): React.JSX.Element;
46
+ declare function SidebarGroup({ className, slotName, ...props }: React.ComponentProps<'div'> & SlotNameProps): React.JSX.Element;
47
+ declare function SidebarGroupLabel({ className, asChild, slotName, ...props }: React.ComponentProps<'div'> & {
48
+ asChild?: boolean;
49
+ } & SlotNameProps): React.JSX.Element;
50
+ declare function SidebarGroupAction({ className, asChild, slotName, ...props }: React.ComponentProps<'button'> & {
51
+ asChild?: boolean;
52
+ } & SlotNameProps): React.JSX.Element;
53
+ declare function SidebarGroupContent({ className, slotName, ...props }: React.ComponentProps<'div'> & SlotNameProps): React.JSX.Element;
54
+ declare function SidebarMenu({ className, slotName, ...props }: React.ComponentProps<'ul'> & SlotNameProps): React.JSX.Element;
55
+ declare function SidebarMenuItem({ className, slotName, ...props }: React.ComponentProps<'li'> & SlotNameProps): React.JSX.Element;
56
+ declare const sidebarMenuButtonVariants: (props?: ({
57
+ variant?: "default" | "outline" | null | undefined;
58
+ size?: "sm" | "default" | "lg" | null | undefined;
59
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
60
+ declare function SidebarMenuButton({ asChild, isActive, variant, size, tooltip, className, slotName, ...props }: React.ComponentProps<'button'> & {
61
+ asChild?: boolean;
62
+ isActive?: boolean;
63
+ tooltip?: string | React.ComponentProps<typeof TooltipContent>;
64
+ } & VariantProps<typeof sidebarMenuButtonVariants> & SlotNameProps): React.JSX.Element;
65
+ declare function SidebarMenuAction({ className, asChild, showOnHover, slotName, ...props }: React.ComponentProps<'button'> & {
66
+ asChild?: boolean;
67
+ showOnHover?: boolean;
68
+ } & SlotNameProps): React.JSX.Element;
69
+ declare function SidebarMenuBadge({ className, slotName, ...props }: React.ComponentProps<'div'> & SlotNameProps): React.JSX.Element;
70
+ declare function SidebarMenuSkeleton({ className, showIcon, slotName, ...props }: React.ComponentProps<'div'> & {
71
+ showIcon?: boolean;
72
+ } & SlotNameProps): React.JSX.Element;
73
+ declare function SidebarMenuSub({ className, slotName, ...props }: React.ComponentProps<'ul'> & SlotNameProps): React.JSX.Element;
74
+ declare function SidebarMenuSubItem({ className, slotName, ...props }: React.ComponentProps<'li'> & SlotNameProps): React.JSX.Element;
75
+ declare function SidebarMenuSubButton({ asChild, size, isActive, className, slotName, ...props }: React.ComponentProps<'a'> & {
76
+ asChild?: boolean;
77
+ size?: 'sm' | 'md';
78
+ isActive?: boolean;
79
+ } & SlotNameProps): React.JSX.Element;
80
+
81
+ export { useSidebar as A, Separator as S, Tooltip as T, Sidebar as a, SidebarContent as b, SidebarFooter as c, SidebarGroup as d, SidebarGroupAction as e, SidebarGroupContent as f, SidebarGroupLabel as g, SidebarHeader as h, SidebarInput as i, SidebarInset as j, SidebarMenu as k, SidebarMenuAction as l, SidebarMenuBadge as m, SidebarMenuButton as n, SidebarMenuItem as o, SidebarMenuSkeleton as p, SidebarMenuSub as q, SidebarMenuSubButton as r, SidebarMenuSubItem as s, SidebarProvider as t, SidebarRail as u, SidebarSeparator as v, SidebarTrigger as w, TooltipContent as x, TooltipProvider as y, TooltipTrigger as z };
@@ -0,0 +1,111 @@
1
+ import * as React from 'react';
2
+ import { ReactNode } from 'react';
3
+ import { S as SlotNameProps } from './types-cmBL8zOc.js';
4
+
5
+ interface DangerZoneLabels {
6
+ title: string;
7
+ description: string;
8
+ actionLabel: string;
9
+ confirmTitle: string;
10
+ confirmDescription: string;
11
+ confirmText: string;
12
+ cancelText: string;
13
+ requiredValueLabel: string;
14
+ }
15
+ declare const dangerZoneLabels: DangerZoneLabels;
16
+ interface DangerZoneAction {
17
+ id: string;
18
+ title: string;
19
+ description?: string;
20
+ actionLabel?: string;
21
+ confirmTitle?: string;
22
+ confirmDescription?: string;
23
+ confirmText?: string;
24
+ cancelText?: string;
25
+ requiredValue?: string;
26
+ requiredValueLabel?: string;
27
+ disabled?: boolean;
28
+ onConfirm: () => void;
29
+ }
30
+ interface DangerZoneProps {
31
+ title?: string;
32
+ description?: string;
33
+ actions: DangerZoneAction[];
34
+ processing?: boolean;
35
+ labels?: Partial<DangerZoneLabels>;
36
+ footer?: ReactNode;
37
+ className?: string;
38
+ }
39
+ declare function DangerZone({ title, description, actions, processing, labels, footer, className, slotName, }: DangerZoneProps & SlotNameProps): React.JSX.Element;
40
+
41
+ interface FormOverlayLabels {
42
+ cancelLabel: string;
43
+ saveLabel: string;
44
+ savingLabel: string;
45
+ }
46
+ declare const formOverlayDefaultLabels: FormOverlayLabels;
47
+ type FormOverlayIntent = 'default' | 'destructive';
48
+ interface FormOverlayActionsProps {
49
+ labels?: FormOverlayLabels;
50
+ processing?: boolean;
51
+ intent?: FormOverlayIntent;
52
+ submit?: boolean;
53
+ className?: string;
54
+ onCancel: () => void;
55
+ onSave?: () => void;
56
+ }
57
+ declare function FormOverlayActions({ labels, processing, intent, submit, className, onCancel, onSave, slotName, }: FormOverlayActionsProps & SlotNameProps): React.JSX.Element;
58
+
59
+ type TwoFactorSetupStep = 'pending' | 'scan' | 'confirm' | 'recovery';
60
+ type TwoFactorCodeMode = 'code' | 'recovery';
61
+ interface TwoFactorLabels {
62
+ setupTitle: string;
63
+ setupDescription: string;
64
+ pendingLabel: string;
65
+ scanTitle: string;
66
+ scanDescription: string;
67
+ qrFallbackLabel: string;
68
+ manualKeyLabel: string;
69
+ manualKeyDescription: string;
70
+ manualKeyRevealLabel: string;
71
+ manualKeyHideLabel: string;
72
+ continueLabel: string;
73
+ confirmTitle: string;
74
+ confirmDescription: string;
75
+ codeLabel: string;
76
+ recoveryCodeLabel: string;
77
+ recoveryCodePlaceholder: string;
78
+ useRecoveryCodeLabel: string;
79
+ useCodeLabel: string;
80
+ verifyLabel: string;
81
+ verifyingLabel: string;
82
+ errorFallbackLabel: string;
83
+ cancelLabel: string;
84
+ challengeTitle: string;
85
+ challengeDescription: string;
86
+ recoveryTitle: string;
87
+ recoveryDescription: string;
88
+ recoveryWarning: string;
89
+ revealLabel: string;
90
+ hideLabel: string;
91
+ copyLabel: string;
92
+ copiedLabel: string;
93
+ copyFailedLabel: string;
94
+ regenerateLabel: string;
95
+ doneLabel: string;
96
+ disableLabel: string;
97
+ disableTitle: string;
98
+ disableDescription: string;
99
+ disableConfirmLabel: string;
100
+ disableCancelLabel: string;
101
+ }
102
+ declare const twoFactorLabels: TwoFactorLabels;
103
+ interface TwoFactorLabelProps {
104
+ labels?: Partial<TwoFactorLabels>;
105
+ }
106
+ interface TwoFactorQrProps {
107
+ qrCode?: ReactNode;
108
+ qrCodeSvg?: string;
109
+ }
110
+
111
+ export { DangerZone as D, type FormOverlayIntent as F, type TwoFactorLabelProps as T, type FormOverlayLabels as a, type TwoFactorCodeMode as b, type TwoFactorQrProps as c, type DangerZoneAction as d, type DangerZoneLabels as e, type DangerZoneProps as f, FormOverlayActions as g, type FormOverlayActionsProps as h, type TwoFactorLabels as i, type TwoFactorSetupStep as j, dangerZoneLabels as k, formOverlayDefaultLabels as l, twoFactorLabels as t };
@@ -0,0 +1,51 @@
1
+ import { Column as Column$1, ColumnDef as ColumnDef$1, FilterFn as FilterFn$1, Row as Row$1, Table } from '@tanstack/react-table';
2
+ import { LucideIcon as LucideIcon$1 } from 'lucide-react';
3
+ import { ComponentType, ReactNode, MouseEvent } from 'react';
4
+
5
+ interface SlotNameProps {
6
+ slotName?: string;
7
+ }
8
+ type UrlLike = string | {
9
+ url: string;
10
+ method?: string;
11
+ };
12
+ type Column<TData, TValue = unknown> = Column$1<TData, TValue>;
13
+ type ColumnDef<TData, TValue = unknown> = ColumnDef$1<TData, TValue>;
14
+ type FilterFn<TData> = FilterFn$1<TData>;
15
+ type Row<TData> = Row$1<TData>;
16
+ type TableInstance<TData> = Table<TData>;
17
+ type LucideIcon = LucideIcon$1;
18
+ type IconComponent = ComponentType<{
19
+ className?: string;
20
+ }>;
21
+ interface NavItem {
22
+ title: string;
23
+ href: UrlLike;
24
+ icon?: IconComponent | null;
25
+ isActive?: boolean;
26
+ }
27
+ interface BreadcrumbItem {
28
+ title: string;
29
+ href: UrlLike;
30
+ }
31
+ interface NavGroup {
32
+ label?: string;
33
+ items: NavItem[];
34
+ }
35
+ interface SharedUser {
36
+ name: string;
37
+ email: string;
38
+ avatar?: string;
39
+ }
40
+ interface LinkProps {
41
+ href: UrlLike;
42
+ children?: ReactNode;
43
+ className?: string;
44
+ prefetch?: boolean;
45
+ as?: string;
46
+ onClick?: (event: MouseEvent) => void;
47
+ [key: string]: unknown;
48
+ }
49
+ type LinkComponent = ComponentType<LinkProps>;
50
+
51
+ export type { BreadcrumbItem as B, Column as C, FilterFn as F, IconComponent as I, LucideIcon as L, NavGroup as N, Row as R, SlotNameProps as S, TableInstance as T, UrlLike as U, ColumnDef as a, NavItem as b, SharedUser as c, LinkComponent as d, LinkProps as e };