singularity-components 0.1.193 → 0.1.195
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/dist/components/blocks/cards/blogpost-card.d.ts +2 -2
- package/dist/components/blocks/cards/card.d.ts +7 -8
- package/dist/components/blocks/empty-state/EmptyState.d.ts +2 -2
- package/dist/components/blocks/index.d.ts +1 -1
- package/dist/components/blocks/index.js +1 -0
- package/dist/components/blocks/index.js.map +1 -1
- package/dist/components/blocks/login/login.d.ts +78 -0
- package/dist/components/blocks/login/login.js +95 -0
- package/dist/components/blocks/login/login.js.map +1 -0
- package/dist/components/blocks/post-list/post-filters.d.ts +2 -2
- package/dist/components/blocks/post-list/post-list-with-filters.d.ts +2 -2
- package/dist/components/index.d.ts +2 -2
- package/dist/components/pages/admin/admin-page.d.ts +2 -2
- package/dist/components/pages/blogpost/blogpost.d.ts +2 -2
- package/dist/components/pages/category/category-page.d.ts +2 -2
- package/dist/components/pages/chat/chat-page.d.ts +2 -2
- package/dist/components/pages/index.d.ts +1 -1
- package/dist/components/pages/login/login-page.d.ts +2 -2
- package/dist/components/pages/login/login-page.js +19 -69
- package/dist/components/pages/login/login-page.js.map +1 -1
- package/dist/components/pages/maintenance/maintenance-page.d.ts +2 -2
- package/dist/components/pages/not-found/not-found.d.ts +2 -2
- package/dist/components/pages/privacy/privacy-page.d.ts +2 -2
- package/dist/components/pages/search/search-page.d.ts +2 -2
- package/dist/components/pages/startpage/startpage.d.ts +2 -2
- package/dist/components/pages/terms/terms-page.d.ts +2 -2
- package/dist/components/primitives/accordion/accordion.d.ts +5 -5
- package/dist/components/primitives/alert/alert.d.ts +4 -5
- package/dist/components/primitives/avatar/avatar.d.ts +6 -7
- package/dist/components/primitives/badge/badges.d.ts +1 -2
- package/dist/components/primitives/buttons/button.d.ts +2 -2
- package/dist/components/primitives/buttons/icon-button.d.ts +2 -2
- package/dist/components/primitives/buttons/link-button.d.ts +2 -3
- package/dist/components/primitives/collapsible/collapsible.d.ts +3 -4
- package/dist/components/primitives/dropdown-menu/dropdown-menu.d.ts +1 -2
- package/dist/components/primitives/forms/checkbox.d.ts +2 -2
- package/dist/components/primitives/forms/field.d.ts +11 -12
- package/dist/components/primitives/forms/input.d.ts +1 -2
- package/dist/components/primitives/forms/select.d.ts +7 -8
- package/dist/components/primitives/forms/textarea.d.ts +1 -2
- package/dist/components/primitives/icon/icon.d.ts +1 -2
- package/dist/components/primitives/index.d.ts +2 -3
- package/dist/components/primitives/label/label.d.ts +1 -2
- package/dist/components/primitives/layout/layout.d.ts +4 -3
- package/dist/components/primitives/layout/layout.js.map +1 -1
- package/dist/components/primitives/link/link.d.ts +2 -3
- package/dist/components/primitives/separator/separator.d.ts +2 -2
- package/dist/components/primitives/sheet/sheet.d.ts +2 -3
- package/dist/components/primitives/skeleton/skeleton.d.ts +2 -2
- package/dist/components/primitives/sonner/sonner.d.ts +2 -2
- package/dist/components/primitives/spinner/spinner.d.ts +2 -2
- package/dist/components/primitives/stack/stack.d.ts +45 -1
- package/dist/components/primitives/stack/stack.js +44 -42
- package/dist/components/primitives/stack/stack.js.map +1 -1
- package/dist/components/primitives/text/heading.d.ts +2 -3
- package/dist/components/primitives/text/internal/text-element.d.ts +1 -2
- package/dist/components/primitives/text/text-code.d.ts +2 -2
- package/dist/components/primitives/text/text-div.d.ts +2 -3
- package/dist/components/primitives/text/text-span.d.ts +2 -3
- package/dist/components/primitives/text/text-time.d.ts +2 -3
- package/dist/components/primitives/text/text.d.ts +2 -3
- package/dist/components/primitives/ui-image/ui-image.d.ts +2 -3
- package/dist/components/primitives/ui-link/ui-link.d.ts +2 -3
- package/dist/components/providers/SingularityContext.d.ts +0 -1
- package/dist/components/providers/auth-provider.d.ts +2 -2
- package/dist/components/providers/index.d.ts +0 -1
- package/dist/components/providers/theme-provider.d.ts +1 -2
- package/dist/components/templates/container/container.d.ts +4 -5
- package/dist/components/templates/footer/footer.d.ts +2 -2
- package/dist/components/templates/form/form.d.ts +2 -2
- package/dist/components/templates/hero/hero.d.ts +2 -2
- package/dist/components/templates/hero/hero.js +2 -2
- package/dist/components/templates/hero/hero.js.map +1 -1
- package/dist/components/templates/index.d.ts +0 -1
- package/dist/components/templates/navigation/header.d.ts +1 -2
- package/dist/components/templates/navigation/index.d.ts +0 -1
- package/dist/index.d.ts +2 -2
- package/dist/main.css +50 -32
- package/dist/main.css.map +1 -1
- package/package.json +52 -39
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
|
|
3
3
|
interface Props {
|
|
4
4
|
id: number;
|
|
@@ -8,6 +8,6 @@ interface Props {
|
|
|
8
8
|
title: string;
|
|
9
9
|
excerpt: string;
|
|
10
10
|
}
|
|
11
|
-
declare function BlogPostCard({ id, image, title, categories, date, excerpt, }: Props):
|
|
11
|
+
declare function BlogPostCard({ id, image, title, categories, date, excerpt, }: Props): React.JSX.Element;
|
|
12
12
|
|
|
13
13
|
export { BlogPostCard as default };
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
|
|
4
3
|
declare function Card({ className, size, ...props }: React.ComponentProps<"div"> & {
|
|
5
4
|
size?: "default" | "sm";
|
|
6
|
-
}):
|
|
7
|
-
declare function CardHeader({ className, ...props }: React.ComponentProps<"div">):
|
|
8
|
-
declare function CardTitle({ className, ...props }: React.ComponentProps<"div">):
|
|
9
|
-
declare function CardDescription({ className, ...props }: React.ComponentProps<"div">):
|
|
10
|
-
declare function CardAction({ className, ...props }: React.ComponentProps<"div">):
|
|
11
|
-
declare function CardContent({ className, ...props }: React.ComponentProps<"div">):
|
|
12
|
-
declare function CardFooter({ className, ...props }: React.ComponentProps<"div">):
|
|
5
|
+
}): React.JSX.Element;
|
|
6
|
+
declare function CardHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
7
|
+
declare function CardTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
8
|
+
declare function CardDescription({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
9
|
+
declare function CardAction({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
10
|
+
declare function CardContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
11
|
+
declare function CardFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
13
12
|
|
|
14
13
|
export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { icons } from 'lucide-react';
|
|
3
3
|
|
|
4
4
|
interface Props {
|
|
@@ -10,6 +10,6 @@ interface Props {
|
|
|
10
10
|
onAction?: () => void;
|
|
11
11
|
className?: string;
|
|
12
12
|
}
|
|
13
|
-
declare function EmptyState({ icon, title, description, actionLabel, actionTo, onAction, className, }: Props):
|
|
13
|
+
declare function EmptyState({ icon, title, description, actionLabel, actionTo, onAction, className, }: Props): React.JSX.Element;
|
|
14
14
|
|
|
15
15
|
export { EmptyState as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from './cards/card.js';
|
|
2
|
+
export { Login, LoginCredentials, LoginProps } from './login/login.js';
|
|
2
3
|
export { PostListWithFilters } from './post-list/post-list-with-filters.js';
|
|
3
|
-
import 'react/jsx-runtime';
|
|
4
4
|
import 'react';
|
|
5
5
|
import '../../data/posts.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/blocks/index.ts"],"sourcesContent":["/**\n * Blocks index\n *\n * Please keep exports sorted alphabetically by path!\n */\n\nexport * from \"./cards/blogpost-card\";\nexport * from \"./cards/card\";\nexport * from \"./empty-state/EmptyState\";\nexport * from \"./post-list/post-list-with-filters\";\n"],"mappings":"AAMA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/blocks/index.ts"],"sourcesContent":["/**\n * Blocks index\n *\n * Please keep exports sorted alphabetically by path!\n */\n\nexport * from \"./cards/blogpost-card\";\nexport * from \"./cards/card\";\nexport * from \"./empty-state/EmptyState\";\nexport * from \"./login/login\";\nexport * from \"./post-list/post-list-with-filters\";\n"],"mappings":"AAMA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
type LoginCredentials = {
|
|
4
|
+
username: string;
|
|
5
|
+
password: string;
|
|
6
|
+
};
|
|
7
|
+
type LoginProps = {
|
|
8
|
+
/**
|
|
9
|
+
* Form heading text.
|
|
10
|
+
*/
|
|
11
|
+
title?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Supporting text shown below the heading.
|
|
14
|
+
*/
|
|
15
|
+
description?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Label for the username or email field.
|
|
18
|
+
*/
|
|
19
|
+
usernameLabel?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Input type for the identifier field.
|
|
22
|
+
*/
|
|
23
|
+
usernameType?: "text" | "email";
|
|
24
|
+
/**
|
|
25
|
+
* Placeholder for the identifier field.
|
|
26
|
+
*/
|
|
27
|
+
usernamePlaceholder?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Label for the password field.
|
|
30
|
+
*/
|
|
31
|
+
passwordLabel?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Placeholder for the password field.
|
|
34
|
+
*/
|
|
35
|
+
passwordPlaceholder?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Submit button label when not loading.
|
|
38
|
+
*/
|
|
39
|
+
submitLabel?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Submit button label while loading.
|
|
42
|
+
*/
|
|
43
|
+
loadingLabel?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Disables the form and shows the loading label on submit.
|
|
46
|
+
*/
|
|
47
|
+
loading?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Label for the optional sign-up link.
|
|
50
|
+
*/
|
|
51
|
+
signUpLabel?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Destination for the optional sign-up link.
|
|
54
|
+
*/
|
|
55
|
+
signUpHref?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Heading level for the title.
|
|
58
|
+
*/
|
|
59
|
+
titleVariant?: "h1" | "h2" | "h3" | "h4";
|
|
60
|
+
/**
|
|
61
|
+
* Called when the form is submitted with valid credentials.
|
|
62
|
+
*/
|
|
63
|
+
onSubmit?: (credentials: LoginCredentials) => void | Promise<void>;
|
|
64
|
+
/**
|
|
65
|
+
* Additional classes for the root wrapper.
|
|
66
|
+
*/
|
|
67
|
+
className?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Focuses the identifier field on mount.
|
|
70
|
+
*/
|
|
71
|
+
autoFocus?: boolean;
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Reusable login form with username/email and password fields.
|
|
75
|
+
*/
|
|
76
|
+
declare function Login({ title, description, usernameLabel, usernameType, usernamePlaceholder, passwordLabel, passwordPlaceholder, submitLabel, loadingLabel, loading, signUpLabel, signUpHref, titleVariant, onSubmit, className, autoFocus, }: LoginProps): React.JSX.Element;
|
|
77
|
+
|
|
78
|
+
export { Login, type LoginCredentials, type LoginProps };
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useId, useState } from "react";
|
|
4
|
+
import { Button } from "../../primitives/buttons/button.js";
|
|
5
|
+
import { Input } from "../../primitives/forms/input.js";
|
|
6
|
+
import { Label } from "../../primitives/label/label.js";
|
|
7
|
+
import { Heading, Link, Text } from "../../primitives/index.js";
|
|
8
|
+
import { cn } from "../../../utils/index.js";
|
|
9
|
+
function Login({
|
|
10
|
+
title = "Log in",
|
|
11
|
+
description,
|
|
12
|
+
usernameLabel = "Username",
|
|
13
|
+
usernameType = "text",
|
|
14
|
+
usernamePlaceholder = "johndoe",
|
|
15
|
+
passwordLabel = "Password",
|
|
16
|
+
passwordPlaceholder = "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",
|
|
17
|
+
submitLabel = "Log in",
|
|
18
|
+
loadingLabel = "Logging in...",
|
|
19
|
+
loading = false,
|
|
20
|
+
signUpLabel,
|
|
21
|
+
signUpHref,
|
|
22
|
+
titleVariant = "h1",
|
|
23
|
+
onSubmit,
|
|
24
|
+
className,
|
|
25
|
+
autoFocus = false
|
|
26
|
+
}) {
|
|
27
|
+
const id = useId();
|
|
28
|
+
const usernameId = `${id}-username`;
|
|
29
|
+
const passwordId = `${id}-password`;
|
|
30
|
+
const titleId = `${id}-title`;
|
|
31
|
+
const [username, setUsername] = useState("");
|
|
32
|
+
const [password, setPassword] = useState("");
|
|
33
|
+
const handleSubmit = async (event) => {
|
|
34
|
+
event.preventDefault();
|
|
35
|
+
await onSubmit?.({ username, password });
|
|
36
|
+
};
|
|
37
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("sg:w-full sg:max-w-sm sg:space-y-6", className), children: [
|
|
38
|
+
/* @__PURE__ */ jsxs("div", { className: "sg:text-center", children: [
|
|
39
|
+
/* @__PURE__ */ jsx(Heading, { variant: titleVariant, id: titleId, children: title }),
|
|
40
|
+
description && /* @__PURE__ */ jsx(Text, { className: "sg:mt-2", foreground: "muted-foreground", children: description })
|
|
41
|
+
] }),
|
|
42
|
+
/* @__PURE__ */ jsxs("form", { onSubmit: handleSubmit, className: "sg:space-y-4", "aria-labelledby": titleId, children: [
|
|
43
|
+
/* @__PURE__ */ jsxs("div", { className: "sg:space-y-2", children: [
|
|
44
|
+
/* @__PURE__ */ jsx(Label, { htmlFor: usernameId, children: usernameLabel }),
|
|
45
|
+
/* @__PURE__ */ jsx(
|
|
46
|
+
Input,
|
|
47
|
+
{
|
|
48
|
+
id: usernameId,
|
|
49
|
+
type: usernameType,
|
|
50
|
+
placeholder: usernamePlaceholder,
|
|
51
|
+
value: username,
|
|
52
|
+
onChange: (event) => setUsername(event.target.value),
|
|
53
|
+
required: true,
|
|
54
|
+
autoFocus,
|
|
55
|
+
disabled: loading,
|
|
56
|
+
autoComplete: "username"
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
] }),
|
|
60
|
+
/* @__PURE__ */ jsxs("div", { className: "sg:space-y-2", children: [
|
|
61
|
+
/* @__PURE__ */ jsx(Label, { htmlFor: passwordId, children: passwordLabel }),
|
|
62
|
+
/* @__PURE__ */ jsx(
|
|
63
|
+
Input,
|
|
64
|
+
{
|
|
65
|
+
id: passwordId,
|
|
66
|
+
type: "password",
|
|
67
|
+
placeholder: passwordPlaceholder,
|
|
68
|
+
value: password,
|
|
69
|
+
onChange: (event) => setPassword(event.target.value),
|
|
70
|
+
required: true,
|
|
71
|
+
disabled: loading,
|
|
72
|
+
autoComplete: "current-password"
|
|
73
|
+
}
|
|
74
|
+
)
|
|
75
|
+
] }),
|
|
76
|
+
/* @__PURE__ */ jsx(Button, { type: "submit", className: "sg:w-full", disabled: loading, children: loading ? loadingLabel : submitLabel })
|
|
77
|
+
] }),
|
|
78
|
+
signUpLabel && signUpHref && /* @__PURE__ */ jsxs(
|
|
79
|
+
Text,
|
|
80
|
+
{
|
|
81
|
+
size: "sm",
|
|
82
|
+
foreground: "muted-foreground",
|
|
83
|
+
className: "sg:text-center",
|
|
84
|
+
children: [
|
|
85
|
+
"Don't have an account? ",
|
|
86
|
+
/* @__PURE__ */ jsx(Link, { to: signUpHref, children: signUpLabel })
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
)
|
|
90
|
+
] });
|
|
91
|
+
}
|
|
92
|
+
export {
|
|
93
|
+
Login
|
|
94
|
+
};
|
|
95
|
+
//# sourceMappingURL=login.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/blocks/login/login.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport { useId, useState } from \"react\";\r\nimport { Button } from \"../../primitives/buttons/button\";\r\nimport { Input } from \"../../primitives/forms/input\";\r\nimport { Label } from \"../../primitives/label/label\";\r\nimport { Heading, Link, Text } from \"../../primitives/index\";\r\nimport { cn } from \"../../../utils/index\";\r\n\r\nexport type LoginCredentials = {\r\n username: string;\r\n password: string;\r\n};\r\n\r\nexport type LoginProps = {\r\n /**\r\n * Form heading text.\r\n */\r\n title?: string;\r\n /**\r\n * Supporting text shown below the heading.\r\n */\r\n description?: string;\r\n /**\r\n * Label for the username or email field.\r\n */\r\n usernameLabel?: string;\r\n /**\r\n * Input type for the identifier field.\r\n */\r\n usernameType?: \"text\" | \"email\";\r\n /**\r\n * Placeholder for the identifier field.\r\n */\r\n usernamePlaceholder?: string;\r\n /**\r\n * Label for the password field.\r\n */\r\n passwordLabel?: string;\r\n /**\r\n * Placeholder for the password field.\r\n */\r\n passwordPlaceholder?: string;\r\n /**\r\n * Submit button label when not loading.\r\n */\r\n submitLabel?: string;\r\n /**\r\n * Submit button label while loading.\r\n */\r\n loadingLabel?: string;\r\n /**\r\n * Disables the form and shows the loading label on submit.\r\n */\r\n loading?: boolean;\r\n /**\r\n * Label for the optional sign-up link.\r\n */\r\n signUpLabel?: string;\r\n /**\r\n * Destination for the optional sign-up link.\r\n */\r\n signUpHref?: string;\r\n /**\r\n * Heading level for the title.\r\n */\r\n titleVariant?: \"h1\" | \"h2\" | \"h3\" | \"h4\";\r\n /**\r\n * Called when the form is submitted with valid credentials.\r\n */\r\n onSubmit?: (credentials: LoginCredentials) => void | Promise<void>;\r\n /**\r\n * Additional classes for the root wrapper.\r\n */\r\n className?: string;\r\n /**\r\n * Focuses the identifier field on mount.\r\n */\r\n autoFocus?: boolean;\r\n};\r\n\r\n/**\r\n * Reusable login form with username/email and password fields.\r\n */\r\nexport function Login({\r\n title = \"Log in\",\r\n description,\r\n usernameLabel = \"Username\",\r\n usernameType = \"text\",\r\n usernamePlaceholder = \"johndoe\",\r\n passwordLabel = \"Password\",\r\n passwordPlaceholder = \"••••••••\",\r\n submitLabel = \"Log in\",\r\n loadingLabel = \"Logging in...\",\r\n loading = false,\r\n signUpLabel,\r\n signUpHref,\r\n titleVariant = \"h1\",\r\n onSubmit,\r\n className,\r\n autoFocus = false,\r\n}: LoginProps) {\r\n const id = useId();\r\n const usernameId = `${id}-username`;\r\n const passwordId = `${id}-password`;\r\n const titleId = `${id}-title`;\r\n const [username, setUsername] = useState(\"\");\r\n const [password, setPassword] = useState(\"\");\r\n\r\n const handleSubmit = async (event: React.FormEvent) => {\r\n event.preventDefault();\r\n await onSubmit?.({ username, password });\r\n };\r\n\r\n return (\r\n <div className={cn(\"sg:w-full sg:max-w-sm sg:space-y-6\", className)}>\r\n <div className=\"sg:text-center\">\r\n <Heading variant={titleVariant} id={titleId}>\r\n {title}\r\n </Heading>\r\n {description && (\r\n <Text className=\"sg:mt-2\" foreground=\"muted-foreground\">\r\n {description}\r\n </Text>\r\n )}\r\n </div>\r\n\r\n <form onSubmit={handleSubmit} className=\"sg:space-y-4\" aria-labelledby={titleId}>\r\n <div className=\"sg:space-y-2\">\r\n <Label htmlFor={usernameId}>{usernameLabel}</Label>\r\n <Input\r\n id={usernameId}\r\n type={usernameType}\r\n placeholder={usernamePlaceholder}\r\n value={username}\r\n onChange={(event) => setUsername(event.target.value)}\r\n required\r\n autoFocus={autoFocus}\r\n disabled={loading}\r\n autoComplete=\"username\"\r\n />\r\n </div>\r\n <div className=\"sg:space-y-2\">\r\n <Label htmlFor={passwordId}>{passwordLabel}</Label>\r\n <Input\r\n id={passwordId}\r\n type=\"password\"\r\n placeholder={passwordPlaceholder}\r\n value={password}\r\n onChange={(event) => setPassword(event.target.value)}\r\n required\r\n disabled={loading}\r\n autoComplete=\"current-password\"\r\n />\r\n </div>\r\n <Button type=\"submit\" className=\"sg:w-full\" disabled={loading}>\r\n {loading ? loadingLabel : submitLabel}\r\n </Button>\r\n </form>\r\n\r\n {signUpLabel && signUpHref && (\r\n <Text\r\n size=\"sm\"\r\n foreground=\"muted-foreground\"\r\n className=\"sg:text-center\"\r\n >\r\n Don't have an account? <Link to={signUpHref}>{signUpLabel}</Link>\r\n </Text>\r\n )}\r\n </div>\r\n );\r\n}\r\n"],"mappings":";AAoHM,SACE,KADF;AAlHN,SAAS,OAAO,gBAAgB;AAChC,SAAS,cAAc;AACvB,SAAS,aAAa;AACtB,SAAS,aAAa;AACtB,SAAS,SAAS,MAAM,YAAY;AACpC,SAAS,UAAU;AA6EZ,SAAS,MAAM;AAAA,EACpB,QAAQ;AAAA,EACR;AAAA,EACA,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,sBAAsB;AAAA,EACtB,gBAAgB;AAAA,EAChB,sBAAsB;AAAA,EACtB,cAAc;AAAA,EACd,eAAe;AAAA,EACf,UAAU;AAAA,EACV;AAAA,EACA;AAAA,EACA,eAAe;AAAA,EACf;AAAA,EACA;AAAA,EACA,YAAY;AACd,GAAe;AACb,QAAM,KAAK,MAAM;AACjB,QAAM,aAAa,GAAG,EAAE;AACxB,QAAM,aAAa,GAAG,EAAE;AACxB,QAAM,UAAU,GAAG,EAAE;AACrB,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,EAAE;AAC3C,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,EAAE;AAE3C,QAAM,eAAe,OAAO,UAA2B;AACrD,UAAM,eAAe;AACrB,UAAM,WAAW,EAAE,UAAU,SAAS,CAAC;AAAA,EACzC;AAEA,SACE,qBAAC,SAAI,WAAW,GAAG,sCAAsC,SAAS,GAChE;AAAA,yBAAC,SAAI,WAAU,kBACb;AAAA,0BAAC,WAAQ,SAAS,cAAc,IAAI,SACjC,iBACH;AAAA,MACC,eACC,oBAAC,QAAK,WAAU,WAAU,YAAW,oBAClC,uBACH;AAAA,OAEJ;AAAA,IAEA,qBAAC,UAAK,UAAU,cAAc,WAAU,gBAAe,mBAAiB,SACtE;AAAA,2BAAC,SAAI,WAAU,gBACb;AAAA,4BAAC,SAAM,SAAS,YAAa,yBAAc;AAAA,QAC3C;AAAA,UAAC;AAAA;AAAA,YACC,IAAI;AAAA,YACJ,MAAM;AAAA,YACN,aAAa;AAAA,YACb,OAAO;AAAA,YACP,UAAU,CAAC,UAAU,YAAY,MAAM,OAAO,KAAK;AAAA,YACnD,UAAQ;AAAA,YACR;AAAA,YACA,UAAU;AAAA,YACV,cAAa;AAAA;AAAA,QACf;AAAA,SACF;AAAA,MACA,qBAAC,SAAI,WAAU,gBACb;AAAA,4BAAC,SAAM,SAAS,YAAa,yBAAc;AAAA,QAC3C;AAAA,UAAC;AAAA;AAAA,YACC,IAAI;AAAA,YACJ,MAAK;AAAA,YACL,aAAa;AAAA,YACb,OAAO;AAAA,YACP,UAAU,CAAC,UAAU,YAAY,MAAM,OAAO,KAAK;AAAA,YACnD,UAAQ;AAAA,YACR,UAAU;AAAA,YACV,cAAa;AAAA;AAAA,QACf;AAAA,SACF;AAAA,MACA,oBAAC,UAAO,MAAK,UAAS,WAAU,aAAY,UAAU,SACnD,oBAAU,eAAe,aAC5B;AAAA,OACF;AAAA,IAEC,eAAe,cACd;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,YAAW;AAAA,QACX,WAAU;AAAA,QACX;AAAA;AAAA,UAC6B,oBAAC,QAAK,IAAI,YAAa,uBAAY;AAAA;AAAA;AAAA,IACjE;AAAA,KAEJ;AAEJ;","names":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
|
|
3
3
|
type SortOption = "newest" | "oldest" | "a-z" | "z-a";
|
|
4
4
|
interface FilterControlsProps {
|
|
@@ -14,6 +14,6 @@ interface FilterControlsProps {
|
|
|
14
14
|
setSortBy: (s: SortOption) => void;
|
|
15
15
|
hideAuthorFilter?: boolean;
|
|
16
16
|
}
|
|
17
|
-
declare function FilterControls({ categories, authors, selectedCategories, selectedAuthors, toggleCategory, toggleAuthor, clearFilters, activeCount, sortBy, setSortBy, hideAuthorFilter, }: FilterControlsProps):
|
|
17
|
+
declare function FilterControls({ categories, authors, selectedCategories, selectedAuthors, toggleCategory, toggleAuthor, clearFilters, activeCount, sortBy, setSortBy, hideAuthorFilter, }: FilterControlsProps): React.JSX.Element;
|
|
18
18
|
|
|
19
19
|
export { FilterControls };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { BlogPost } from '../../../data/posts.js';
|
|
3
3
|
|
|
4
4
|
type LoadMode = "pagination" | "load-more";
|
|
@@ -14,6 +14,6 @@ interface PostListWithFiltersProps {
|
|
|
14
14
|
/** Default load mode. "load-more" (default) or "pagination". User can still toggle. */
|
|
15
15
|
defaultLoadMode?: LoadMode;
|
|
16
16
|
}
|
|
17
|
-
declare function PostListWithFilters({ posts: sourcePosts, hideSearch, hideAuthorFilter, filterMode, defaultLoadMode, }: PostListWithFiltersProps):
|
|
17
|
+
declare function PostListWithFilters({ posts: sourcePosts, hideSearch, hideAuthorFilter, filterMode, defaultLoadMode, }: PostListWithFiltersProps): React.JSX.Element;
|
|
18
18
|
|
|
19
19
|
export { PostListWithFilters };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from './blocks/cards/card.js';
|
|
2
|
+
export { Login, LoginCredentials, LoginProps } from './blocks/login/login.js';
|
|
2
3
|
export { PostListWithFilters } from './blocks/post-list/post-list-with-filters.js';
|
|
3
4
|
export { AdminPage, AdminPageProps } from './pages/admin/admin-page.js';
|
|
4
5
|
export { BlogPost } from './pages/blogpost/blogpost.js';
|
|
@@ -32,7 +33,7 @@ export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHe
|
|
|
32
33
|
export { Skeleton } from './primitives/skeleton/skeleton.js';
|
|
33
34
|
export { Toaster } from './primitives/sonner/sonner.js';
|
|
34
35
|
export { Spinner } from './primitives/spinner/spinner.js';
|
|
35
|
-
export { Stack, StackProps, stackVariants } from './primitives/stack/stack.js';
|
|
36
|
+
export { Stack, StackProps, stackVariantOptions, stackVariants } from './primitives/stack/stack.js';
|
|
36
37
|
export { Heading, HeadingProps, headingVariants, headingVariantsProps } from './primitives/text/heading.js';
|
|
37
38
|
export { TextCode, TextCodeProps, textCodeVariants, textCodeVariantsProps } from './primitives/text/text-code.js';
|
|
38
39
|
export { TextDiv } from './primitives/text/text-div.js';
|
|
@@ -50,7 +51,6 @@ export { Container } from './templates/container/container.js';
|
|
|
50
51
|
export { Footer } from './templates/footer/footer.js';
|
|
51
52
|
export { Header, HeaderProps, NavLink } from './templates/navigation/header.js';
|
|
52
53
|
export { toast } from 'sonner';
|
|
53
|
-
import 'react/jsx-runtime';
|
|
54
54
|
import 'react';
|
|
55
55
|
import '../data/posts.js';
|
|
56
56
|
import '@base-ui/react/accordion';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
|
|
3
3
|
interface AdminPageProps {
|
|
4
4
|
initialEditId?: number;
|
|
5
5
|
}
|
|
6
|
-
declare function AdminPage({ initialEditId }: AdminPageProps):
|
|
6
|
+
declare function AdminPage({ initialEditId }: AdminPageProps): React.JSX.Element;
|
|
7
7
|
|
|
8
8
|
export { AdminPage, type AdminPageProps };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
|
|
3
3
|
interface Props {
|
|
4
4
|
category?: string;
|
|
5
5
|
}
|
|
6
|
-
declare function CategoryPage({ category: propCategory }: Props):
|
|
6
|
+
declare function CategoryPage({ category: propCategory }: Props): React.JSX.Element;
|
|
7
7
|
|
|
8
8
|
export { CategoryPage };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
|
|
3
3
|
interface LoginPageProps {
|
|
4
4
|
/**
|
|
@@ -14,6 +14,6 @@ interface LoginPageProps {
|
|
|
14
14
|
*/
|
|
15
15
|
signUpHref?: string;
|
|
16
16
|
}
|
|
17
|
-
declare function LoginPage({ onLoginSuccess, signUpLabel, signUpHref, }: LoginPageProps):
|
|
17
|
+
declare function LoginPage({ onLoginSuccess, signUpLabel, signUpHref, }: LoginPageProps): React.JSX.Element;
|
|
18
18
|
|
|
19
19
|
export { LoginPage };
|
|
@@ -1,34 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
Layout,
|
|
6
|
-
Button,
|
|
7
|
-
Input,
|
|
8
|
-
Label,
|
|
9
|
-
Heading,
|
|
10
|
-
Text,
|
|
11
|
-
Link
|
|
12
|
-
} from "../../primitives/index.js";
|
|
3
|
+
import { Layout, Button, Heading, Text } from "../../primitives/index.js";
|
|
13
4
|
import { useToast } from "../../primitives/sonner/use-toast.js";
|
|
5
|
+
import { Login } from "../../blocks/login/login.js";
|
|
14
6
|
import { useAuth } from "singularity-components/components/providers/auth-provider";
|
|
15
7
|
function LoginPage({
|
|
16
8
|
onLoginSuccess,
|
|
17
9
|
signUpLabel = "Sign up",
|
|
18
10
|
signUpHref = "#"
|
|
19
11
|
}) {
|
|
20
|
-
const [email, setEmail] = useState("");
|
|
21
|
-
const [password, setPassword] = useState("");
|
|
22
12
|
const { toast } = useToast();
|
|
23
13
|
const { isLoggedIn, login, logout, userName } = useAuth();
|
|
24
|
-
const handleSubmit = (e) => {
|
|
25
|
-
e.preventDefault();
|
|
26
|
-
login(email.split("@")[0]);
|
|
27
|
-
toast.success("Logged in!", {
|
|
28
|
-
description: `Welcome back, ${email}!`
|
|
29
|
-
});
|
|
30
|
-
onLoginSuccess?.();
|
|
31
|
-
};
|
|
32
14
|
if (isLoggedIn) {
|
|
33
15
|
return /* @__PURE__ */ jsx(Layout, { type: "col", className: "sg:py-20", as: "main", children: /* @__PURE__ */ jsx(Layout.Col1, { centerContent: true, children: /* @__PURE__ */ jsxs("div", { className: "sg:w-full sg:max-w-sm sg:space-y-6", children: [
|
|
34
16
|
/* @__PURE__ */ jsxs(Heading, { variant: "h1", className: "sg:text-foreground", children: [
|
|
@@ -51,56 +33,24 @@ function LoginPage({
|
|
|
51
33
|
)
|
|
52
34
|
] }) }) });
|
|
53
35
|
}
|
|
54
|
-
return /* @__PURE__ */ jsx(Layout, { type: "col", className: "sg:py-20", as: "main", children: /* @__PURE__ */ jsx(Layout.Col1, { centerContent: true, children: /* @__PURE__ */
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
onChange: (e) => setEmail(e.target.value),
|
|
70
|
-
required: true
|
|
71
|
-
}
|
|
72
|
-
)
|
|
73
|
-
] }),
|
|
74
|
-
/* @__PURE__ */ jsxs("div", { className: "sg:space-y-2", children: [
|
|
75
|
-
/* @__PURE__ */ jsx(Label, { htmlFor: "password", children: "Password" }),
|
|
76
|
-
/* @__PURE__ */ jsx(
|
|
77
|
-
Input,
|
|
78
|
-
{
|
|
79
|
-
id: "password",
|
|
80
|
-
type: "password",
|
|
81
|
-
placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",
|
|
82
|
-
value: password,
|
|
83
|
-
onChange: (e) => setPassword(e.target.value),
|
|
84
|
-
required: true
|
|
85
|
-
}
|
|
86
|
-
)
|
|
87
|
-
] }),
|
|
88
|
-
/* @__PURE__ */ jsx(Button, { type: "submit", className: "sg:w-full", children: "Log in" })
|
|
89
|
-
] }),
|
|
90
|
-
/* @__PURE__ */ jsxs(
|
|
91
|
-
Text,
|
|
92
|
-
{
|
|
93
|
-
size: "sm",
|
|
94
|
-
foreground: "muted-foreground",
|
|
95
|
-
className: "sg:text-center",
|
|
96
|
-
children: [
|
|
97
|
-
"Don't have an account?",
|
|
98
|
-
" ",
|
|
99
|
-
/* @__PURE__ */ jsx(Link, { to: signUpHref, children: signUpLabel })
|
|
100
|
-
]
|
|
36
|
+
return /* @__PURE__ */ jsx(Layout, { type: "col", className: "sg:py-20", as: "main", children: /* @__PURE__ */ jsx(Layout.Col1, { centerContent: true, children: /* @__PURE__ */ jsx(
|
|
37
|
+
Login,
|
|
38
|
+
{
|
|
39
|
+
description: "Welcome back to Storied.",
|
|
40
|
+
usernameLabel: "Email",
|
|
41
|
+
usernameType: "email",
|
|
42
|
+
usernamePlaceholder: "you@example.com",
|
|
43
|
+
signUpLabel,
|
|
44
|
+
signUpHref,
|
|
45
|
+
onSubmit: ({ username }) => {
|
|
46
|
+
login(username.split("@")[0]);
|
|
47
|
+
toast.success("Logged in!", {
|
|
48
|
+
description: `Welcome back, ${username}!`
|
|
49
|
+
});
|
|
50
|
+
onLoginSuccess?.();
|
|
101
51
|
}
|
|
102
|
-
|
|
103
|
-
|
|
52
|
+
}
|
|
53
|
+
) }) });
|
|
104
54
|
}
|
|
105
55
|
export {
|
|
106
56
|
LoginPage
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/pages/login/login-page.tsx"],"sourcesContent":["\"use client\";\nimport {
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/pages/login/login-page.tsx"],"sourcesContent":["\"use client\";\nimport { Layout, Button, Heading, Text } from \"../../primitives/index\";\nimport { useToast } from \"../../primitives/sonner/use-toast\";\nimport { Login } from \"../../blocks/login/login\";\nimport { useAuth } from \"singularity-components/components/providers/auth-provider\";\n\ninterface LoginPageProps {\n /**\n * Callback fired when login is successful\n */\n onLoginSuccess?: () => void;\n /**\n * Label for the \"Sign up\" link\n */\n signUpLabel?: string;\n /**\n * URL for the \"Sign up\" link\n */\n signUpHref?: string;\n}\n\nexport function LoginPage({\n onLoginSuccess,\n signUpLabel = \"Sign up\",\n signUpHref = \"#\",\n}: LoginPageProps) {\n const { toast } = useToast();\n const { isLoggedIn, login, logout, userName } = useAuth();\n\n if (isLoggedIn) {\n return (\n <Layout type=\"col\" className=\"sg:py-20\" as=\"main\">\n <Layout.Col1 centerContent>\n <div className=\"sg:w-full sg:max-w-sm sg:space-y-6\">\n <Heading variant=\"h1\" className=\"sg:text-foreground\">\n Welcome, {userName}\n </Heading>\n <Text foreground=\"muted-foreground\">\n You are currently logged in.\n </Text>\n <Button\n variant=\"outline\"\n onClick={() => {\n logout();\n toast.message(\"Logged out\", {\n description: \"See you next time!\",\n });\n }}\n >\n Log out\n </Button>\n </div>\n </Layout.Col1>\n </Layout>\n );\n }\n\n return (\n <Layout type=\"col\" className=\"sg:py-20\" as=\"main\">\n <Layout.Col1 centerContent>\n <Login\n description=\"Welcome back to Storied.\"\n usernameLabel=\"Email\"\n usernameType=\"email\"\n usernamePlaceholder=\"you@example.com\"\n signUpLabel={signUpLabel}\n signUpHref={signUpHref}\n onSubmit={({ username }) => {\n login(username.split(\"@\")[0]);\n toast.success(\"Logged in!\", {\n description: `Welcome back, ${username}!`,\n });\n onLoginSuccess?.();\n }}\n />\n </Layout.Col1>\n </Layout>\n );\n}\n"],"mappings":";AAkCY,SAGA,KAHA;AAjCZ,SAAS,QAAQ,QAAQ,SAAS,YAAY;AAC9C,SAAS,gBAAgB;AACzB,SAAS,aAAa;AACtB,SAAS,eAAe;AAiBjB,SAAS,UAAU;AAAA,EACxB;AAAA,EACA,cAAc;AAAA,EACd,aAAa;AACf,GAAmB;AACjB,QAAM,EAAE,MAAM,IAAI,SAAS;AAC3B,QAAM,EAAE,YAAY,OAAO,QAAQ,SAAS,IAAI,QAAQ;AAExD,MAAI,YAAY;AACd,WACE,oBAAC,UAAO,MAAK,OAAM,WAAU,YAAW,IAAG,QACzC,8BAAC,OAAO,MAAP,EAAY,eAAa,MACxB,+BAAC,SAAI,WAAU,sCACb;AAAA,2BAAC,WAAQ,SAAQ,MAAK,WAAU,sBAAqB;AAAA;AAAA,QACzC;AAAA,SACZ;AAAA,MACA,oBAAC,QAAK,YAAW,oBAAmB,0CAEpC;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,SAAQ;AAAA,UACR,SAAS,MAAM;AACb,mBAAO;AACP,kBAAM,QAAQ,cAAc;AAAA,cAC1B,aAAa;AAAA,YACf,CAAC;AAAA,UACH;AAAA,UACD;AAAA;AAAA,MAED;AAAA,OACF,GACF,GACF;AAAA,EAEJ;AAEA,SACE,oBAAC,UAAO,MAAK,OAAM,WAAU,YAAW,IAAG,QACzC,8BAAC,OAAO,MAAP,EAAY,eAAa,MACxB;AAAA,IAAC;AAAA;AAAA,MACC,aAAY;AAAA,MACZ,eAAc;AAAA,MACd,cAAa;AAAA,MACb,qBAAoB;AAAA,MACpB;AAAA,MACA;AAAA,MACA,UAAU,CAAC,EAAE,SAAS,MAAM;AAC1B,cAAM,SAAS,MAAM,GAAG,EAAE,CAAC,CAAC;AAC5B,cAAM,QAAQ,cAAc;AAAA,UAC1B,aAAa,iBAAiB,QAAQ;AAAA,QACxC,CAAC;AACD,yBAAiB;AAAA,MACnB;AAAA;AAAA,EACF,GACF,GACF;AAEJ;","names":[]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
|
|
3
3
|
interface NotFoundProps {
|
|
4
4
|
pathname?: string;
|
|
5
5
|
homeHref?: string;
|
|
6
6
|
onGoBack?: () => void;
|
|
7
7
|
}
|
|
8
|
-
declare const NotFound: ({ pathname, homeHref, onGoBack, }: NotFoundProps) =>
|
|
8
|
+
declare const NotFound: ({ pathname, homeHref, onGoBack, }: NotFoundProps) => React.JSX.Element;
|
|
9
9
|
|
|
10
10
|
export { NotFound };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
|
|
3
3
|
interface Section {
|
|
4
4
|
title: string;
|
|
@@ -10,6 +10,6 @@ interface PrivacyPageProps {
|
|
|
10
10
|
introText?: string;
|
|
11
11
|
sections?: Section[];
|
|
12
12
|
}
|
|
13
|
-
declare const PrivacyPage: ({ title, effectiveDate, introText, sections, }: PrivacyPageProps) =>
|
|
13
|
+
declare const PrivacyPage: ({ title, effectiveDate, introText, sections, }: PrivacyPageProps) => React.JSX.Element;
|
|
14
14
|
|
|
15
15
|
export { PrivacyPage };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
|
|
3
3
|
interface Section {
|
|
4
4
|
title: string;
|
|
@@ -10,6 +10,6 @@ interface TermsPageProps {
|
|
|
10
10
|
introText?: string;
|
|
11
11
|
sections?: Section[];
|
|
12
12
|
}
|
|
13
|
-
declare const TermsPage: ({ title, effectiveDate, introText, sections, }: TermsPageProps) =>
|
|
13
|
+
declare const TermsPage: ({ title, effectiveDate, introText, sections, }: TermsPageProps) => React.JSX.Element;
|
|
14
14
|
|
|
15
15
|
export { TermsPage };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { Accordion as Accordion$1 } from '@base-ui/react/accordion';
|
|
3
3
|
|
|
4
|
-
declare function Accordion({ className, ...props }: Accordion$1.Root.Props):
|
|
5
|
-
declare function AccordionItem({ className, ...props }: Accordion$1.Item.Props):
|
|
6
|
-
declare function AccordionTrigger({ className, children, ...props }: Accordion$1.Trigger.Props):
|
|
7
|
-
declare function AccordionContent({ className, children, ...props }: Accordion$1.Panel.Props):
|
|
4
|
+
declare function Accordion({ className, ...props }: Accordion$1.Root.Props): React.JSX.Element;
|
|
5
|
+
declare function AccordionItem({ className, ...props }: Accordion$1.Item.Props): React.JSX.Element;
|
|
6
|
+
declare function AccordionTrigger({ className, children, ...props }: Accordion$1.Trigger.Props): React.JSX.Element;
|
|
7
|
+
declare function AccordionContent({ className, children, ...props }: Accordion$1.Panel.Props): React.JSX.Element;
|
|
8
8
|
|
|
9
9
|
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
2
|
import * as React from 'react';
|
|
4
3
|
import { VariantProps } from 'class-variance-authority';
|
|
@@ -12,9 +11,9 @@ declare const alertVariants: {
|
|
|
12
11
|
declare const alertVariantsProps: (props?: ({
|
|
13
12
|
variant?: "default" | "destructive" | null | undefined;
|
|
14
13
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
15
|
-
declare function Alert({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof alertVariantsProps>):
|
|
16
|
-
declare function AlertTitle({ className, ...props }: React.ComponentProps<"div">):
|
|
17
|
-
declare function AlertDescription({ className, ...props }: React.ComponentProps<"div">):
|
|
18
|
-
declare function AlertAction({ className, ...props }: React.ComponentProps<"div">):
|
|
14
|
+
declare function Alert({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof alertVariantsProps>): React.JSX.Element;
|
|
15
|
+
declare function AlertTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
16
|
+
declare function AlertDescription({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
17
|
+
declare function AlertAction({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
19
18
|
|
|
20
19
|
export { Alert, AlertAction, AlertDescription, AlertTitle, alertVariants };
|