@akira-io/ui 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -10
- package/dist/blocks.d.ts +159 -6
- package/dist/blocks.js +1388 -29
- package/dist/blocks.js.map +1 -1
- package/dist/button-B6wQRe7p.d.ts +16 -0
- package/dist/chunk-5AJFQ6C4.js +35 -0
- package/dist/chunk-5AJFQ6C4.js.map +1 -0
- package/dist/chunk-6QM5BA7B.js +148 -0
- package/dist/chunk-6QM5BA7B.js.map +1 -0
- package/dist/chunk-6X4TKSF6.js +21 -0
- package/dist/chunk-6X4TKSF6.js.map +1 -0
- package/dist/chunk-DSD7MVLL.js +287 -0
- package/dist/chunk-DSD7MVLL.js.map +1 -0
- package/dist/chunk-IQMRJXEO.js +59 -0
- package/dist/chunk-IQMRJXEO.js.map +1 -0
- package/dist/chunk-JAHTUAQL.js +82 -0
- package/dist/chunk-JAHTUAQL.js.map +1 -0
- package/dist/{chunk-A2SIZOEA.js → chunk-KYWA5UYN.js} +125 -45
- package/dist/chunk-KYWA5UYN.js.map +1 -0
- package/dist/chunk-L2H5GIF7.js +22 -0
- package/dist/chunk-L2H5GIF7.js.map +1 -0
- package/dist/chunk-LKSM3WLK.js +44 -0
- package/dist/chunk-LKSM3WLK.js.map +1 -0
- package/dist/{chunk-5MQWJVM2.js → chunk-MNGNBEYN.js} +168 -200
- package/dist/chunk-MNGNBEYN.js.map +1 -0
- package/dist/chunk-SA5LM2GD.js +102 -0
- package/dist/chunk-SA5LM2GD.js.map +1 -0
- package/dist/chunk-UUEWFCKT.js +28 -0
- package/dist/chunk-UUEWFCKT.js.map +1 -0
- package/dist/{chunk-42BJBH56.js → chunk-UUTXPPRN.js} +521 -107
- package/dist/chunk-UUTXPPRN.js.map +1 -0
- package/dist/{chunk-UXL33CZ4.js → chunk-YOVY3KT6.js} +13 -11
- package/dist/chunk-YOVY3KT6.js.map +1 -0
- package/dist/code.d.ts +6 -0
- package/dist/code.js +651 -0
- package/dist/code.js.map +1 -0
- package/dist/context-VgHq4U98.d.ts +384 -0
- package/dist/editor.d.ts +126 -0
- package/dist/editor.js +436 -0
- package/dist/editor.js.map +1 -0
- package/dist/index.d.ts +93 -17
- package/dist/index.js +996 -472
- package/dist/index.js.map +1 -1
- package/dist/inertia.d.ts +47 -2
- package/dist/inertia.js +138 -7
- package/dist/inertia.js.map +1 -1
- package/dist/input-4uxAHW6y.d.ts +5 -0
- package/dist/json-viewer-BTHBACj9.d.ts +50 -0
- package/dist/{language-Bft6rBBt.d.ts → language-Dgjr9bm3.d.ts} +1 -1
- package/dist/locales/pt.d.ts +26 -4
- package/dist/locales/pt.js +127 -1
- package/dist/locales/pt.js.map +1 -1
- package/dist/password-input-r39y2pCT.d.ts +50 -0
- package/dist/shells.d.ts +45 -7
- package/dist/shells.js +95 -60
- package/dist/shells.js.map +1 -1
- package/dist/{sidebar-BDhG9SUU.d.ts → sidebar-BhOIlSjt.d.ts} +4 -12
- package/dist/{types-Cno1_Ijx.d.ts → types-B4QS3h5p.d.ts} +9 -1
- package/dist/types-CT0rBsFc.d.ts +110 -0
- package/package.json +170 -130
- package/theme.css +20 -0
- package/themes/nosferry.css +4 -0
- package/dist/chunk-42BJBH56.js.map +0 -1
- package/dist/chunk-5MQWJVM2.js.map +0 -1
- package/dist/chunk-A2SIZOEA.js.map +0 -1
- package/dist/chunk-POE7OYET.js +0 -96
- package/dist/chunk-POE7OYET.js.map +0 -1
- package/dist/chunk-UXL33CZ4.js.map +0 -1
- package/dist/date-range-filter-QEa8fhUM.d.ts +0 -149
- package/dist/types-cOieac8G.d.ts +0 -77
|
@@ -0,0 +1,50 @@
|
|
|
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 { I as Input } from './input-4uxAHW6y.js';
|
|
5
|
+
|
|
6
|
+
type FieldOrientation = 'vertical' | 'horizontal';
|
|
7
|
+
interface FieldContextValue {
|
|
8
|
+
controlId: string;
|
|
9
|
+
descriptionId: string;
|
|
10
|
+
errorId: string;
|
|
11
|
+
orientation: FieldOrientation;
|
|
12
|
+
invalid: boolean;
|
|
13
|
+
required: boolean;
|
|
14
|
+
hasDescription: boolean;
|
|
15
|
+
setHasDescription: (present: boolean) => void;
|
|
16
|
+
}
|
|
17
|
+
declare function useField(): FieldContextValue;
|
|
18
|
+
|
|
19
|
+
declare function Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>): React.JSX.Element;
|
|
20
|
+
|
|
21
|
+
interface FieldLabels {
|
|
22
|
+
requiredLabel: string;
|
|
23
|
+
}
|
|
24
|
+
interface FieldProps extends React.ComponentProps<'div'> {
|
|
25
|
+
orientation?: FieldOrientation;
|
|
26
|
+
error?: string;
|
|
27
|
+
invalid?: boolean;
|
|
28
|
+
required?: boolean;
|
|
29
|
+
}
|
|
30
|
+
declare function Field({ className, children, id, orientation, error, invalid, required, ...props }: FieldProps): React.JSX.Element;
|
|
31
|
+
declare function FieldGroup({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
32
|
+
interface FieldLabelProps extends React.ComponentProps<typeof Label> {
|
|
33
|
+
requiredLabel?: FieldLabels['requiredLabel'];
|
|
34
|
+
}
|
|
35
|
+
declare function FieldLabel({ className, children, requiredLabel, ...props }: FieldLabelProps): React.JSX.Element;
|
|
36
|
+
declare function FieldDescription({ className, ...props }: React.ComponentProps<'p'>): React.JSX.Element;
|
|
37
|
+
declare function FieldControl({ className, ...props }: React.ComponentProps<typeof Slot>): React.JSX.Element;
|
|
38
|
+
|
|
39
|
+
interface PasswordInputLabels {
|
|
40
|
+
showLabel: string;
|
|
41
|
+
hideLabel: string;
|
|
42
|
+
}
|
|
43
|
+
interface PasswordInputProps extends Omit<React.ComponentProps<typeof Input>, 'type'> {
|
|
44
|
+
revealable?: boolean;
|
|
45
|
+
showLabel?: PasswordInputLabels['showLabel'];
|
|
46
|
+
hideLabel?: PasswordInputLabels['hideLabel'];
|
|
47
|
+
}
|
|
48
|
+
declare function PasswordInput({ className, revealable, showLabel, hideLabel, ...props }: PasswordInputProps): React.JSX.Element;
|
|
49
|
+
|
|
50
|
+
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,
|
|
2
|
-
export { I as IconComponent,
|
|
1
|
+
import { U as UrlLike, N as NavGroup, b as NavItem, S as SharedUser, c as LinkComponent, B as BreadcrumbItem } from './types-B4QS3h5p.js';
|
|
2
|
+
export { C as Column, a as ColumnDef, F as FilterFn, I as IconComponent, d as LinkProps, L as LucideIcon, R as Row, T as TableInstance } from './types-B4QS3h5p.js';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ReactNode, ComponentPropsWithoutRef, PropsWithChildren } from 'react';
|
|
5
|
-
import { d as SidebarGroup } from './sidebar-
|
|
5
|
+
import { d as SidebarGroup } from './sidebar-BhOIlSjt.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-B6wQRe7p.js';
|
|
11
|
+
import './input-4uxAHW6y.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, }: AuthShellProps): 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
|
-
|
|
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
|
-
|
|
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, UrlLike, UserInfo, UserMenuContent, hrefToString, initializeTheme, useAppearance, useCollapsedGroup, useInitials, useIsMobile };
|
package/dist/shells.js
CHANGED
|
@@ -1,63 +1,14 @@
|
|
|
1
|
-
export {
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
4
|
-
import './chunk-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
export { initializeTheme, useAppearance } from './chunk-IQMRJXEO.js';
|
|
2
|
+
import { Card } from './chunk-SA5LM2GD.js';
|
|
3
|
+
export { AppSidebar, AppSidebarHeader, Breadcrumbs, Heading, NavFooter, NavMain, NavUser, SIDEBAR_COLLAPSED_GROUPS_KEY, SettingsLayout, UserInfo, UserMenuContent, useCollapsedGroup, useInitials } from './chunk-KYWA5UYN.js';
|
|
4
|
+
import { SidebarInset, SidebarProvider } from './chunk-MNGNBEYN.js';
|
|
5
|
+
export { useIsMobile } from './chunk-MNGNBEYN.js';
|
|
6
|
+
export { hrefToString } from './chunk-L2H5GIF7.js';
|
|
7
|
+
import './chunk-UUEWFCKT.js';
|
|
8
|
+
import './chunk-6X4TKSF6.js';
|
|
9
|
+
import { cn } from './chunk-DSD7MVLL.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,91 @@ 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
|
+
}) {
|
|
62
|
+
const split = arrangement === "split";
|
|
63
|
+
const form = /* @__PURE__ */ jsxs(
|
|
64
|
+
"div",
|
|
65
|
+
{
|
|
66
|
+
"data-slot": "auth-shell-form",
|
|
67
|
+
className: "gap-6 max-w-md flex w-full flex-col",
|
|
68
|
+
children: [
|
|
69
|
+
logo && /* @__PURE__ */ jsx(
|
|
70
|
+
"div",
|
|
71
|
+
{
|
|
72
|
+
"data-slot": "auth-shell-logo",
|
|
73
|
+
className: "flex justify-center",
|
|
74
|
+
children: logo
|
|
75
|
+
}
|
|
76
|
+
),
|
|
77
|
+
/* @__PURE__ */ jsxs("div", { "data-slot": "auth-shell-heading", className: "space-y-2", children: [
|
|
78
|
+
/* @__PURE__ */ jsx("h1", { className: "text-xl font-bold tracking-tight text-foreground", children: title }),
|
|
79
|
+
description && /* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-muted-foreground", children: description })
|
|
80
|
+
] }),
|
|
81
|
+
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 }),
|
|
82
|
+
footer && /* @__PURE__ */ jsx(
|
|
83
|
+
"footer",
|
|
84
|
+
{
|
|
85
|
+
"data-slot": "auth-shell-footer",
|
|
86
|
+
className: "gap-2 text-sm font-medium flex flex-wrap items-center justify-center text-muted-foreground",
|
|
87
|
+
children: footer
|
|
88
|
+
}
|
|
89
|
+
)
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
return /* @__PURE__ */ jsxs(
|
|
94
|
+
"div",
|
|
95
|
+
{
|
|
96
|
+
"data-slot": "auth-shell",
|
|
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
|
+
children: [
|
|
104
|
+
split && panel && /* @__PURE__ */ jsx(
|
|
105
|
+
"aside",
|
|
106
|
+
{
|
|
107
|
+
"data-slot": "auth-shell-panel",
|
|
108
|
+
"aria-hidden": panelDecorative || void 0,
|
|
109
|
+
className: "p-10 lg:flex hidden flex-col justify-between bg-primary text-primary-foreground",
|
|
110
|
+
children: panel
|
|
111
|
+
}
|
|
112
|
+
),
|
|
113
|
+
/* @__PURE__ */ jsx(
|
|
114
|
+
"main",
|
|
115
|
+
{
|
|
116
|
+
"data-slot": "auth-shell-main",
|
|
117
|
+
className: "p-6 flex flex-1 items-center justify-center",
|
|
118
|
+
children: form
|
|
119
|
+
}
|
|
120
|
+
),
|
|
121
|
+
appearanceControl && /* @__PURE__ */ jsx(
|
|
122
|
+
"div",
|
|
123
|
+
{
|
|
124
|
+
"data-slot": "auth-shell-appearance",
|
|
125
|
+
className: "top-4 right-4 absolute",
|
|
126
|
+
children: appearanceControl
|
|
127
|
+
}
|
|
128
|
+
)
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
);
|
|
132
|
+
}
|
|
98
133
|
|
|
99
|
-
export { AppContent, AppShell,
|
|
134
|
+
export { AppContent, AppShell, AuthShell };
|
|
100
135
|
//# sourceMappingURL=shells.js.map
|
|
101
136
|
//# sourceMappingURL=shells.js.map
|
package/dist/shells.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/
|
|
1
|
+
{"version":3,"sources":["../src/shells/app-content.tsx","../src/shells/app-shell.tsx","../src/shells/auth-shell.tsx"],"names":["jsx"],"mappings":"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","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 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}: AuthShellProps) {\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-slot=\"auth-shell\"\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 >\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"]}
|
|
@@ -1,19 +1,11 @@
|
|
|
1
1
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
+
import { B as Button } from './button-B6wQRe7p.js';
|
|
5
|
+
import { I as Input } from './input-4uxAHW6y.js';
|
|
4
6
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
5
7
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
6
8
|
|
|
7
|
-
declare const buttonVariants: (props?: ({
|
|
8
|
-
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
|
|
9
|
-
size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
|
|
10
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
11
|
-
declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
|
|
12
|
-
asChild?: boolean;
|
|
13
|
-
}): React.JSX.Element;
|
|
14
|
-
|
|
15
|
-
declare function Input({ className, type, ...props }: React.ComponentProps<'input'>): React.JSX.Element;
|
|
16
|
-
|
|
17
9
|
declare function Separator({ className, orientation, decorative, ...props }: React.ComponentProps<typeof SeparatorPrimitive.Root>): React.JSX.Element;
|
|
18
10
|
|
|
19
11
|
declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>): React.JSX.Element;
|
|
@@ -62,7 +54,7 @@ declare function SidebarMenu({ className, ...props }: React.ComponentProps<'ul'>
|
|
|
62
54
|
declare function SidebarMenuItem({ className, ...props }: React.ComponentProps<'li'>): React.JSX.Element;
|
|
63
55
|
declare const sidebarMenuButtonVariants: (props?: ({
|
|
64
56
|
variant?: "default" | "outline" | null | undefined;
|
|
65
|
-
size?: "
|
|
57
|
+
size?: "sm" | "default" | "lg" | null | undefined;
|
|
66
58
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
67
59
|
declare function SidebarMenuButton({ asChild, isActive, variant, size, tooltip, className, ...props }: React.ComponentProps<'button'> & {
|
|
68
60
|
asChild?: boolean;
|
|
@@ -85,4 +77,4 @@ declare function SidebarMenuSubButton({ asChild, size, isActive, className, ...p
|
|
|
85
77
|
isActive?: boolean;
|
|
86
78
|
}): React.JSX.Element;
|
|
87
79
|
|
|
88
|
-
export {
|
|
80
|
+
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 };
|
|
@@ -1,9 +1,17 @@
|
|
|
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';
|
|
1
3
|
import { ComponentType, ReactNode, MouseEvent } from 'react';
|
|
2
4
|
|
|
3
5
|
type UrlLike = string | {
|
|
4
6
|
url: string;
|
|
5
7
|
method?: string;
|
|
6
8
|
};
|
|
9
|
+
type Column<TData, TValue = unknown> = Column$1<TData, TValue>;
|
|
10
|
+
type ColumnDef<TData, TValue = unknown> = ColumnDef$1<TData, TValue>;
|
|
11
|
+
type FilterFn<TData> = FilterFn$1<TData>;
|
|
12
|
+
type Row<TData> = Row$1<TData>;
|
|
13
|
+
type TableInstance<TData> = Table<TData>;
|
|
14
|
+
type LucideIcon = LucideIcon$1;
|
|
7
15
|
type IconComponent = ComponentType<{
|
|
8
16
|
className?: string;
|
|
9
17
|
}>;
|
|
@@ -37,4 +45,4 @@ interface LinkProps {
|
|
|
37
45
|
}
|
|
38
46
|
type LinkComponent = ComponentType<LinkProps>;
|
|
39
47
|
|
|
40
|
-
export type { BreadcrumbItem as B, IconComponent as I,
|
|
48
|
+
export type { BreadcrumbItem as B, Column as C, FilterFn as F, IconComponent as I, LucideIcon as L, NavGroup as N, Row as R, SharedUser as S, TableInstance as T, UrlLike as U, ColumnDef as a, NavItem as b, LinkComponent as c, LinkProps as d };
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
interface DangerZoneLabels {
|
|
5
|
+
title: string;
|
|
6
|
+
description: string;
|
|
7
|
+
actionLabel: string;
|
|
8
|
+
confirmTitle: string;
|
|
9
|
+
confirmDescription: string;
|
|
10
|
+
confirmText: string;
|
|
11
|
+
cancelText: string;
|
|
12
|
+
requiredValueLabel: string;
|
|
13
|
+
}
|
|
14
|
+
declare const dangerZoneLabels: DangerZoneLabels;
|
|
15
|
+
interface DangerZoneAction {
|
|
16
|
+
id: string;
|
|
17
|
+
title: string;
|
|
18
|
+
description?: string;
|
|
19
|
+
actionLabel?: string;
|
|
20
|
+
confirmTitle?: string;
|
|
21
|
+
confirmDescription?: string;
|
|
22
|
+
confirmText?: string;
|
|
23
|
+
cancelText?: string;
|
|
24
|
+
requiredValue?: string;
|
|
25
|
+
requiredValueLabel?: string;
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
onConfirm: () => void;
|
|
28
|
+
}
|
|
29
|
+
interface DangerZoneProps {
|
|
30
|
+
title?: string;
|
|
31
|
+
description?: string;
|
|
32
|
+
actions: DangerZoneAction[];
|
|
33
|
+
processing?: boolean;
|
|
34
|
+
labels?: Partial<DangerZoneLabels>;
|
|
35
|
+
footer?: ReactNode;
|
|
36
|
+
className?: string;
|
|
37
|
+
}
|
|
38
|
+
declare function DangerZone({ title, description, actions, processing, labels, footer, className, }: DangerZoneProps): React.JSX.Element;
|
|
39
|
+
|
|
40
|
+
interface FormOverlayLabels {
|
|
41
|
+
cancelLabel: string;
|
|
42
|
+
saveLabel: string;
|
|
43
|
+
savingLabel: string;
|
|
44
|
+
}
|
|
45
|
+
declare const formOverlayDefaultLabels: FormOverlayLabels;
|
|
46
|
+
type FormOverlayIntent = 'default' | 'destructive';
|
|
47
|
+
interface FormOverlayActionsProps {
|
|
48
|
+
labels?: FormOverlayLabels;
|
|
49
|
+
processing?: boolean;
|
|
50
|
+
intent?: FormOverlayIntent;
|
|
51
|
+
submit?: boolean;
|
|
52
|
+
className?: string;
|
|
53
|
+
onCancel: () => void;
|
|
54
|
+
onSave?: () => void;
|
|
55
|
+
}
|
|
56
|
+
declare function FormOverlayActions({ labels, processing, intent, submit, className, onCancel, onSave, }: FormOverlayActionsProps): React.JSX.Element;
|
|
57
|
+
|
|
58
|
+
type TwoFactorSetupStep = 'pending' | 'scan' | 'confirm' | 'recovery';
|
|
59
|
+
type TwoFactorCodeMode = 'code' | 'recovery';
|
|
60
|
+
interface TwoFactorLabels {
|
|
61
|
+
setupTitle: string;
|
|
62
|
+
setupDescription: string;
|
|
63
|
+
pendingLabel: string;
|
|
64
|
+
scanTitle: string;
|
|
65
|
+
scanDescription: string;
|
|
66
|
+
qrFallbackLabel: string;
|
|
67
|
+
manualKeyLabel: string;
|
|
68
|
+
manualKeyDescription: string;
|
|
69
|
+
manualKeyRevealLabel: string;
|
|
70
|
+
manualKeyHideLabel: string;
|
|
71
|
+
continueLabel: string;
|
|
72
|
+
confirmTitle: string;
|
|
73
|
+
confirmDescription: string;
|
|
74
|
+
codeLabel: string;
|
|
75
|
+
recoveryCodeLabel: string;
|
|
76
|
+
recoveryCodePlaceholder: string;
|
|
77
|
+
useRecoveryCodeLabel: string;
|
|
78
|
+
useCodeLabel: string;
|
|
79
|
+
verifyLabel: string;
|
|
80
|
+
verifyingLabel: string;
|
|
81
|
+
errorFallbackLabel: string;
|
|
82
|
+
cancelLabel: string;
|
|
83
|
+
challengeTitle: string;
|
|
84
|
+
challengeDescription: string;
|
|
85
|
+
recoveryTitle: string;
|
|
86
|
+
recoveryDescription: string;
|
|
87
|
+
recoveryWarning: string;
|
|
88
|
+
revealLabel: string;
|
|
89
|
+
hideLabel: string;
|
|
90
|
+
copyLabel: string;
|
|
91
|
+
copiedLabel: string;
|
|
92
|
+
copyFailedLabel: string;
|
|
93
|
+
regenerateLabel: string;
|
|
94
|
+
doneLabel: string;
|
|
95
|
+
disableLabel: string;
|
|
96
|
+
disableTitle: string;
|
|
97
|
+
disableDescription: string;
|
|
98
|
+
disableConfirmLabel: string;
|
|
99
|
+
disableCancelLabel: string;
|
|
100
|
+
}
|
|
101
|
+
declare const twoFactorLabels: TwoFactorLabels;
|
|
102
|
+
interface TwoFactorLabelProps {
|
|
103
|
+
labels?: Partial<TwoFactorLabels>;
|
|
104
|
+
}
|
|
105
|
+
interface TwoFactorQrProps {
|
|
106
|
+
qrCode?: ReactNode;
|
|
107
|
+
qrCodeSvg?: string;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
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 };
|