@vadimcomanescu/nadicode-design-system 2.0.6 → 2.0.7
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/.agents/skills/seed/contract.md +1 -0
- package/.agents/skills/seed/recipes/marketing-shell.md +10 -19
- package/.agents/skills/seed/recipes/navigation-shell.md +5 -5
- package/.agents/skills/seed/recipes/service-detail.md +1 -1
- package/.agents/skills/seed/references/blocks.md +25 -24
- package/.agents/skills/seed/references/brand-override.md +3 -1
- package/css/tokens.css +300 -122
- package/dist/catalog.json +1926 -125
- package/dist/chunk-2BADJLMV.js +117 -0
- package/dist/chunk-35EX5FP5.js +106 -0
- package/dist/chunk-5PORR6LE.js +60 -0
- package/dist/chunk-5PZ4VR2D.js +142 -0
- package/dist/chunk-5UESKK6S.js +76 -0
- package/dist/chunk-6N6CSJVE.js +269 -0
- package/dist/chunk-AURJQZC4.js +110 -0
- package/dist/{chunk-DF47R6LN.js → chunk-AWIG4QN6.js} +9 -9
- package/dist/chunk-AYWL4IYM.js +67 -0
- package/dist/{chunk-SV3KZ6CB.js → chunk-DSMGCFMJ.js} +7 -2
- package/dist/chunk-E4L6LR6P.js +33 -0
- package/dist/chunk-EJNF6JLL.js +105 -0
- package/dist/chunk-FX23F33E.js +57 -0
- package/dist/chunk-GJPTPLCQ.js +52 -0
- package/dist/chunk-GV4PKHG4.js +147 -0
- package/dist/chunk-HJ3A2YNO.js +163 -0
- package/dist/chunk-HJZRSPWB.js +38 -0
- package/dist/chunk-IDKZEPWK.js +133 -0
- package/dist/chunk-K7NQ6ZAW.js +84 -0
- package/dist/chunk-LCKLZ4XK.js +60 -0
- package/dist/chunk-MX5FUFQR.js +205 -0
- package/dist/chunk-NEHCPO53.js +44 -0
- package/dist/chunk-OHOOQUVJ.js +113 -0
- package/dist/chunk-QIHA7S3A.js +36 -0
- package/dist/chunk-RKQPU75I.js +126 -0
- package/dist/chunk-RMLS2QUC.js +77 -0
- package/dist/chunk-TS2JSPQR.js +120 -0
- package/dist/chunk-TUKZKU72.js +110 -0
- package/dist/chunk-TZXZFSD2.js +33 -0
- package/dist/chunk-UGV45DH3.js +18 -0
- package/dist/chunk-VBZQ4DBE.js +52 -0
- package/dist/{chunk-LQLFA2EL.js → chunk-VDONTZZX.js} +2 -2
- package/dist/{chunk-RWNJ54CI.js → chunk-VN475YZS.js} +1 -1
- package/dist/chunk-VZCB4APK.js +94 -0
- package/dist/chunk-W7FXDRQJ.js +94 -0
- package/dist/chunk-WAVU744B.js +183 -0
- package/dist/{chunk-5I3FWRC5.js → chunk-WOYBVPXK.js} +10 -10
- package/dist/chunk-WST5NLLC.js +73 -0
- package/dist/chunk-X6VXWEDO.js +125 -0
- package/dist/chunk-ZM2NODUK.js +39 -0
- package/dist/components/blocks/AccountLockedBlock.js +7 -57
- package/dist/components/blocks/ActivityFeedBlock.js +6 -39
- package/dist/components/blocks/AgentConversationBlock.js +5 -33
- package/dist/components/blocks/AudioVisualizerBlock.d.ts +1 -1
- package/dist/components/blocks/AudioVisualizerBlock.js +2 -2
- package/dist/components/blocks/AuthSuccessBlock.js +5 -60
- package/dist/components/blocks/BarChartBlock.d.ts +1 -1
- package/dist/components/blocks/BarChartBlock.js +2 -2
- package/dist/components/blocks/CallToActionBlock.d.ts +1 -1
- package/dist/components/blocks/CallToActionBlock.js +6 -52
- package/dist/components/blocks/ChangelogBlock.js +8 -105
- package/dist/components/blocks/ChartCollectionBlock.js +2 -2
- package/dist/components/blocks/CodeBlock.js +7 -60
- package/dist/components/blocks/ComparisonBlock.js +9 -94
- package/dist/components/blocks/ContactBlock.js +11 -120
- package/dist/components/blocks/FAQBlock.js +6 -44
- package/dist/components/blocks/FeatureBlock.d.ts +10 -14
- package/dist/components/blocks/FeatureBlock.js +17 -159
- package/dist/components/blocks/FeatureGridBlock.d.ts +1 -1
- package/dist/components/blocks/FeatureGridBlock.js +2 -2
- package/dist/components/blocks/FooterBlock.d.ts +2 -2
- package/dist/components/blocks/FooterBlock.js +11 -67
- package/dist/components/blocks/HeaderBlock.d.ts +2 -2
- package/dist/components/blocks/HeaderBlock.js +1 -1
- package/dist/components/blocks/HeatmapChartBlock.d.ts +1 -1
- package/dist/components/blocks/HeatmapChartBlock.js +1 -1
- package/dist/components/blocks/HeroBlock.d.ts +6 -3
- package/dist/components/blocks/HeroBlock.js +16 -199
- package/dist/components/blocks/HeroSectionBlock.d.ts +1 -1
- package/dist/components/blocks/HeroSectionBlock.js +4 -4
- package/dist/components/blocks/IntegrationsBlock.d.ts +1 -1
- package/dist/components/blocks/IntegrationsBlock.js +4 -4
- package/dist/components/blocks/InteractiveAreaChartBlock.d.ts +1 -1
- package/dist/components/blocks/InteractiveAreaChartBlock.js +2 -2
- package/dist/components/blocks/NewsletterBlock.js +11 -84
- package/dist/components/blocks/PasswordRecoveryBlock.js +14 -142
- package/dist/components/blocks/PricingBlock.d.ts +1 -1
- package/dist/components/blocks/PricingBlock.js +11 -110
- package/dist/components/blocks/ProcessFlowBlock.js +10 -77
- package/dist/components/blocks/ResetPasswordBlock.js +11 -125
- package/dist/components/blocks/SignUpBlock.d.ts +1 -1
- package/dist/components/blocks/SignUpBlock.js +2 -2
- package/dist/components/blocks/SocialProofBlock.d.ts +7 -11
- package/dist/components/blocks/SocialProofBlock.js +8 -107
- package/dist/components/blocks/StatsBlock.d.ts +1 -1
- package/dist/components/blocks/StatsBlock.js +2 -2
- package/dist/components/blocks/StatsMarketingBlock.d.ts +1 -1
- package/dist/components/blocks/StatsMarketingBlock.js +5 -36
- package/dist/components/blocks/TeamBlock.d.ts +1 -1
- package/dist/components/blocks/TeamBlock.js +4 -52
- package/dist/components/blocks/TestimonialsBlock.d.ts +1 -1
- package/dist/components/blocks/TestimonialsBlock.js +4 -133
- package/dist/components/blocks/TwoFactorChallengeBlock.js +9 -94
- package/dist/components/blocks/TwoFactorSetupBlock.js +16 -183
- package/dist/components/blocks/UsageDonutBlock.d.ts +1 -1
- package/dist/components/blocks/UsageDonutBlock.js +2 -2
- package/dist/components/logos/index.js +2 -2
- package/dist/components/page-kits/AccountLockedPageKit.d.ts +10 -0
- package/dist/components/page-kits/AccountLockedPageKit.js +48 -0
- package/dist/components/page-kits/AgentsChatPageKit.d.ts +46 -0
- package/dist/components/page-kits/AgentsChatPageKit.js +289 -0
- package/dist/components/page-kits/AnalyticsPageKit.d.ts +49 -0
- package/dist/components/page-kits/AnalyticsPageKit.js +277 -0
- package/dist/components/page-kits/BlogContentPageKit.d.ts +64 -0
- package/dist/components/page-kits/BlogContentPageKit.js +296 -0
- package/dist/components/page-kits/CheckoutPageKit.d.ts +36 -0
- package/dist/components/page-kits/CheckoutPageKit.js +209 -0
- package/dist/components/page-kits/CompanySuitePageKit.d.ts +25 -0
- package/dist/components/page-kits/CompanySuitePageKit.js +240 -0
- package/dist/components/page-kits/CrudFormPageKit.d.ts +54 -0
- package/dist/components/page-kits/CrudFormPageKit.js +138 -0
- package/dist/components/page-kits/CrudListDetailPageKit.d.ts +70 -0
- package/dist/components/page-kits/CrudListDetailPageKit.js +138 -0
- package/dist/components/page-kits/DashboardPageKit.d.ts +39 -0
- package/dist/components/page-kits/DashboardPageKit.js +284 -0
- package/dist/components/page-kits/ErrorPageKit.d.ts +22 -0
- package/dist/components/page-kits/ErrorPageKit.js +55 -0
- package/dist/components/page-kits/KanbanBoardPageKit.d.ts +31 -0
- package/dist/components/page-kits/KanbanBoardPageKit.js +305 -0
- package/dist/components/page-kits/LandingPageKit.d.ts +29 -0
- package/dist/components/page-kits/LandingPageKit.js +221 -0
- package/dist/components/page-kits/LoginPageKit.d.ts +16 -0
- package/dist/components/page-kits/LoginPageKit.js +43 -0
- package/dist/components/page-kits/MarketingShellPageKit.d.ts +21 -0
- package/dist/components/page-kits/MarketingShellPageKit.js +131 -0
- package/dist/components/page-kits/NavigationShellPageKit.d.ts +41 -0
- package/dist/components/page-kits/NavigationShellPageKit.js +132 -0
- package/dist/components/page-kits/OnboardingPageKit.d.ts +26 -0
- package/dist/components/page-kits/OnboardingPageKit.js +248 -0
- package/dist/components/page-kits/PricingPageKit.d.ts +41 -0
- package/dist/components/page-kits/PricingPageKit.js +279 -0
- package/dist/components/page-kits/ProfileSettingsPageKit.d.ts +50 -0
- package/dist/components/page-kits/ProfileSettingsPageKit.js +171 -0
- package/dist/components/page-kits/RecoveryPageKit.d.ts +17 -0
- package/dist/components/page-kits/RecoveryPageKit.js +58 -0
- package/dist/components/page-kits/ResetPageKit.d.ts +14 -0
- package/dist/components/page-kits/ResetPageKit.js +52 -0
- package/dist/components/page-kits/ServiceSuitePageKit.d.ts +25 -0
- package/dist/components/page-kits/ServiceSuitePageKit.js +320 -0
- package/dist/components/page-kits/SettingsPageKit.d.ts +27 -0
- package/dist/components/page-kits/SettingsPageKit.js +11 -0
- package/dist/components/page-kits/SignupPageKit.d.ts +15 -0
- package/dist/components/page-kits/SignupPageKit.js +41 -0
- package/dist/components/page-kits/SuccessPageKit.d.ts +15 -0
- package/dist/components/page-kits/SuccessPageKit.js +146 -0
- package/dist/components/page-kits/TeamSettingsPageKit.d.ts +50 -0
- package/dist/components/page-kits/TeamSettingsPageKit.js +297 -0
- package/dist/components/page-kits/TwoFactorPageKit.d.ts +16 -0
- package/dist/components/page-kits/TwoFactorPageKit.js +156 -0
- package/dist/components/page-kits/VerifyEmailPageKit.d.ts +15 -0
- package/dist/components/page-kits/VerifyEmailPageKit.js +146 -0
- package/dist/components/page-kits/VoiceAgentsPageKit.d.ts +35 -0
- package/dist/components/page-kits/VoiceAgentsPageKit.js +246 -0
- package/dist/components/ui/AudioWaveform.js +2 -76
- package/dist/components/ui/AvatarUpload.js +1 -1
- package/dist/components/ui/Breadcrumb.js +4 -106
- package/dist/components/ui/ChartCard.js +5 -38
- package/dist/components/ui/CheckoutFormDemo.js +5 -6
- package/dist/components/ui/DataFreshness.js +2 -73
- package/dist/components/ui/MouseEffect.js +1 -1
- package/dist/components/ui/NativeSelect.js +2 -18
- package/dist/components/ui/Pagination.js +6 -117
- package/dist/components/ui/ShaderBackground.js +2 -2
- package/dist/hooks/use-shader-preset.js +2 -2
- package/dist/lib/shader-presets.js +1 -1
- package/dist/lib/tokens.config.d.ts +19 -0
- package/package.json +792 -680
- package/scripts/ds-check.mjs +8 -0
- package/src/lib/tokens.config.js +63 -41
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { buttonVariants } from './chunk-7KIDDF3I.js';
|
|
2
|
+
import { EllipsisIcon } from './chunk-5ESF6N36.js';
|
|
3
|
+
import { ChevronLeftIcon } from './chunk-G5YLGJXR.js';
|
|
4
|
+
import { ChevronRightIcon } from './chunk-G24VV5NO.js';
|
|
5
|
+
import { cn } from './chunk-QYZT24TS.js';
|
|
6
|
+
import { useTranslations } from 'next-intl';
|
|
7
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
var NS = "components.pagination";
|
|
10
|
+
function Pagination({ className, ...props }) {
|
|
11
|
+
const t = useTranslations(NS);
|
|
12
|
+
return /* @__PURE__ */ jsx(
|
|
13
|
+
"nav",
|
|
14
|
+
{
|
|
15
|
+
role: "navigation",
|
|
16
|
+
"aria-label": t("pagination"),
|
|
17
|
+
className: cn("mx-auto flex w-full justify-center", className),
|
|
18
|
+
...props
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
function PaginationContent({
|
|
23
|
+
className,
|
|
24
|
+
ref,
|
|
25
|
+
...props
|
|
26
|
+
}) {
|
|
27
|
+
return /* @__PURE__ */ jsx(
|
|
28
|
+
"ul",
|
|
29
|
+
{
|
|
30
|
+
ref,
|
|
31
|
+
className: cn("flex flex-row items-center gap-1.5", className),
|
|
32
|
+
...props
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
function PaginationItem({
|
|
37
|
+
className,
|
|
38
|
+
ref,
|
|
39
|
+
...props
|
|
40
|
+
}) {
|
|
41
|
+
return /* @__PURE__ */ jsx("li", { ref, className: cn("", className), ...props });
|
|
42
|
+
}
|
|
43
|
+
var PaginationLink = ({
|
|
44
|
+
className,
|
|
45
|
+
isActive,
|
|
46
|
+
size = "icon",
|
|
47
|
+
...props
|
|
48
|
+
}) => /* @__PURE__ */ jsx(
|
|
49
|
+
"a",
|
|
50
|
+
{
|
|
51
|
+
"aria-current": isActive ? "page" : void 0,
|
|
52
|
+
className: cn(
|
|
53
|
+
buttonVariants({ variant: "ghost", size }),
|
|
54
|
+
isActive && "pagination-active",
|
|
55
|
+
"text-text-primary transition-[transform,background-color] duration-150 hover:scale-105 active:scale-95 motion-reduce:hover:scale-100 motion-reduce:active:scale-100",
|
|
56
|
+
className
|
|
57
|
+
),
|
|
58
|
+
...props
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
function PaginationPrevious({
|
|
62
|
+
className,
|
|
63
|
+
...props
|
|
64
|
+
}) {
|
|
65
|
+
const t = useTranslations(NS);
|
|
66
|
+
return /* @__PURE__ */ jsxs(
|
|
67
|
+
PaginationLink,
|
|
68
|
+
{
|
|
69
|
+
"aria-label": t("goToPreviousPage"),
|
|
70
|
+
size: "default",
|
|
71
|
+
className: cn("gap-1.5 pl-2.5", className),
|
|
72
|
+
...props,
|
|
73
|
+
children: [
|
|
74
|
+
/* @__PURE__ */ jsx(ChevronLeftIcon, { size: 16 }),
|
|
75
|
+
/* @__PURE__ */ jsx("span", { children: t("previous") })
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
function PaginationNext({
|
|
81
|
+
className,
|
|
82
|
+
...props
|
|
83
|
+
}) {
|
|
84
|
+
const t = useTranslations(NS);
|
|
85
|
+
return /* @__PURE__ */ jsxs(
|
|
86
|
+
PaginationLink,
|
|
87
|
+
{
|
|
88
|
+
"aria-label": t("goToNextPage"),
|
|
89
|
+
size: "default",
|
|
90
|
+
className: cn("gap-1.5 pr-2.5", className),
|
|
91
|
+
...props,
|
|
92
|
+
children: [
|
|
93
|
+
/* @__PURE__ */ jsx("span", { children: t("next") }),
|
|
94
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, { size: 16 })
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
function PaginationEllipsis({
|
|
100
|
+
className,
|
|
101
|
+
...props
|
|
102
|
+
}) {
|
|
103
|
+
const t = useTranslations(NS);
|
|
104
|
+
return /* @__PURE__ */ jsxs(
|
|
105
|
+
"span",
|
|
106
|
+
{
|
|
107
|
+
className: cn("flex h-9 w-9 items-center justify-center", className),
|
|
108
|
+
...props,
|
|
109
|
+
children: [
|
|
110
|
+
/* @__PURE__ */ jsx(EllipsisIcon, { size: 16, "aria-hidden": true }),
|
|
111
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: t("morePages") })
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { EllipsisIcon } from './chunk-5ESF6N36.js';
|
|
2
|
+
import { ChevronRightIcon } from './chunk-G24VV5NO.js';
|
|
3
|
+
import { cn } from './chunk-QYZT24TS.js';
|
|
4
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
5
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
function Breadcrumb({
|
|
8
|
+
ref,
|
|
9
|
+
...props
|
|
10
|
+
}) {
|
|
11
|
+
return /* @__PURE__ */ jsx("nav", { ref, "aria-label": "breadcrumb", ...props });
|
|
12
|
+
}
|
|
13
|
+
function BreadcrumbList({
|
|
14
|
+
className,
|
|
15
|
+
ref,
|
|
16
|
+
...props
|
|
17
|
+
}) {
|
|
18
|
+
return /* @__PURE__ */ jsx(
|
|
19
|
+
"ol",
|
|
20
|
+
{
|
|
21
|
+
ref,
|
|
22
|
+
className: cn(
|
|
23
|
+
"flex flex-wrap items-center gap-1.5 break-words text-sm text-text-tertiary sm:gap-2.5",
|
|
24
|
+
className
|
|
25
|
+
),
|
|
26
|
+
...props
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
function BreadcrumbItem({
|
|
31
|
+
className,
|
|
32
|
+
ref,
|
|
33
|
+
...props
|
|
34
|
+
}) {
|
|
35
|
+
return /* @__PURE__ */ jsx(
|
|
36
|
+
"li",
|
|
37
|
+
{
|
|
38
|
+
ref,
|
|
39
|
+
className: cn("inline-flex items-center gap-1.5", className),
|
|
40
|
+
...props
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
function BreadcrumbLink({
|
|
45
|
+
asChild,
|
|
46
|
+
className,
|
|
47
|
+
ref,
|
|
48
|
+
...props
|
|
49
|
+
}) {
|
|
50
|
+
const Comp = asChild ? Slot : "a";
|
|
51
|
+
return /* @__PURE__ */ jsx(
|
|
52
|
+
Comp,
|
|
53
|
+
{
|
|
54
|
+
ref,
|
|
55
|
+
className: cn("transition-colors duration-150 hover:text-text-primary hover:underline hover:decoration-accent/40 hover:underline-offset-4", className),
|
|
56
|
+
...props
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
function BreadcrumbPage({
|
|
61
|
+
className,
|
|
62
|
+
ref,
|
|
63
|
+
...props
|
|
64
|
+
}) {
|
|
65
|
+
return /* @__PURE__ */ jsx(
|
|
66
|
+
"span",
|
|
67
|
+
{
|
|
68
|
+
ref,
|
|
69
|
+
"aria-current": "page",
|
|
70
|
+
className: cn("font-medium text-text-primary", className),
|
|
71
|
+
...props
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
var BreadcrumbSeparator = ({
|
|
76
|
+
children,
|
|
77
|
+
className,
|
|
78
|
+
...props
|
|
79
|
+
}) => /* @__PURE__ */ jsx(
|
|
80
|
+
"li",
|
|
81
|
+
{
|
|
82
|
+
role: "presentation",
|
|
83
|
+
"aria-hidden": "true",
|
|
84
|
+
className: cn("[&>svg]:size-3.5", className),
|
|
85
|
+
...props,
|
|
86
|
+
children: children ?? /* @__PURE__ */ jsx(ChevronRightIcon, { size: 14 })
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
var BreadcrumbEllipsis = ({
|
|
90
|
+
className,
|
|
91
|
+
...props
|
|
92
|
+
}) => /* @__PURE__ */ jsxs(
|
|
93
|
+
"span",
|
|
94
|
+
{
|
|
95
|
+
role: "presentation",
|
|
96
|
+
"aria-hidden": "true",
|
|
97
|
+
className: cn("flex h-9 w-9 items-center justify-center rounded-md transition-colors duration-150 hover:bg-surface-hover", className),
|
|
98
|
+
...props,
|
|
99
|
+
children: [
|
|
100
|
+
/* @__PURE__ */ jsx(EllipsisIcon, { size: 16 }),
|
|
101
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "More" })
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
|
|
106
|
+
export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { useSafeTimeout } from './chunk-MDAYDDTC.js';
|
|
2
|
+
import { ScrollFadeIn } from './chunk-I23DDSU7.js';
|
|
3
|
+
import { Button } from './chunk-7KIDDF3I.js';
|
|
4
|
+
import { CopyIcon } from './chunk-TV4RSQH4.js';
|
|
5
|
+
import { CheckIcon } from './chunk-CXACRCZ4.js';
|
|
6
|
+
import { cn } from './chunk-QYZT24TS.js';
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
import Prism from 'prismjs';
|
|
9
|
+
import 'prismjs/themes/prism-tomorrow.css';
|
|
10
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
11
|
+
|
|
12
|
+
function CodeBlock({
|
|
13
|
+
code,
|
|
14
|
+
language = "javascript",
|
|
15
|
+
filename,
|
|
16
|
+
className,
|
|
17
|
+
...props
|
|
18
|
+
}) {
|
|
19
|
+
const [copied, setCopied] = React.useState(false);
|
|
20
|
+
const setSafeTimeout = useSafeTimeout();
|
|
21
|
+
React.useEffect(() => {
|
|
22
|
+
Prism.highlightAll();
|
|
23
|
+
}, [code, language]);
|
|
24
|
+
const onCopy = () => {
|
|
25
|
+
navigator.clipboard.writeText(code);
|
|
26
|
+
setCopied(true);
|
|
27
|
+
setSafeTimeout(() => setCopied(false), 2e3);
|
|
28
|
+
};
|
|
29
|
+
return /* @__PURE__ */ jsx(ScrollFadeIn, { children: /* @__PURE__ */ jsxs(
|
|
30
|
+
"div",
|
|
31
|
+
{
|
|
32
|
+
className: cn(
|
|
33
|
+
"relative overflow-hidden rounded-lg glass-panel",
|
|
34
|
+
className
|
|
35
|
+
),
|
|
36
|
+
...props,
|
|
37
|
+
children: [
|
|
38
|
+
!!filename && /* @__PURE__ */ jsx("div", { className: "flex items-center justify-between border-b border-border/30 bg-surface-hover px-4 py-2 text-xs text-text-tertiary", children: /* @__PURE__ */ jsx("span", { children: filename }) }),
|
|
39
|
+
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
40
|
+
/* @__PURE__ */ jsxs(
|
|
41
|
+
Button,
|
|
42
|
+
{
|
|
43
|
+
size: "icon",
|
|
44
|
+
variant: "ghost",
|
|
45
|
+
className: "absolute right-1 top-1 text-text-tertiary hover:bg-surface-hover hover:text-text-secondary",
|
|
46
|
+
onClick: onCopy,
|
|
47
|
+
children: [
|
|
48
|
+
copied ? /* @__PURE__ */ jsx(CheckIcon, { size: 14 }) : /* @__PURE__ */ jsx(CopyIcon, { size: 14 }),
|
|
49
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Copy code" })
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
),
|
|
53
|
+
/* @__PURE__ */ jsx("div", { className: "overflow-x-auto p-4", children: /* @__PURE__ */ jsx("pre", { className: "!m-0 !bg-transparent !p-0", children: /* @__PURE__ */ jsx("code", { className: `language-${language}`, children: code }) }) })
|
|
54
|
+
] })
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
) });
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export { CodeBlock };
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { useSafeTimeout } from './chunk-MDAYDDTC.js';
|
|
2
|
+
import { Spinner } from './chunk-ZLSWCV55.js';
|
|
3
|
+
import { Field, FieldLabel } from './chunk-RX5EUODB.js';
|
|
4
|
+
import { Separator } from './chunk-CUZJIDU7.js';
|
|
5
|
+
import { Input } from './chunk-AP3XXYAY.js';
|
|
6
|
+
import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from './chunk-AH6YSYYT.js';
|
|
7
|
+
import { Button } from './chunk-7KIDDF3I.js';
|
|
8
|
+
import { m, fadeInUp, scaleIn } from './chunk-PD2YEH3H.js';
|
|
9
|
+
import { SparklesIcon } from './chunk-CGUCH322.js';
|
|
10
|
+
import { MailIcon } from './chunk-XQ2UDMPO.js';
|
|
11
|
+
import { CheckIcon } from './chunk-CXACRCZ4.js';
|
|
12
|
+
import { Badge } from './chunk-S4JAHKOP.js';
|
|
13
|
+
import { cn } from './chunk-QYZT24TS.js';
|
|
14
|
+
import * as React from 'react';
|
|
15
|
+
import { useTranslations } from 'next-intl';
|
|
16
|
+
import { useReducedMotion } from 'motion/react';
|
|
17
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
18
|
+
|
|
19
|
+
var MODE_ICONS = {
|
|
20
|
+
reset: /* @__PURE__ */ jsx(MailIcon, { size: 32, className: "text-text-secondary" }),
|
|
21
|
+
"magic-link": /* @__PURE__ */ jsx(SparklesIcon, { size: 32, className: "text-accent" })
|
|
22
|
+
};
|
|
23
|
+
var INSTRUCTION_STEPS = ["step1", "step2", "step3"];
|
|
24
|
+
function PasswordRecoveryBlock({
|
|
25
|
+
className,
|
|
26
|
+
mode = "reset",
|
|
27
|
+
onSubmit,
|
|
28
|
+
onBackToLogin,
|
|
29
|
+
title,
|
|
30
|
+
description,
|
|
31
|
+
buttonText,
|
|
32
|
+
successTitle
|
|
33
|
+
}) {
|
|
34
|
+
const prefersReduced = useReducedMotion();
|
|
35
|
+
const tShared = useTranslations("auth.passwordRecovery.shared");
|
|
36
|
+
const tMode = useTranslations(mode === "magic-link" ? "auth.passwordRecovery.magicLink" : "auth.passwordRecovery.reset");
|
|
37
|
+
const [email, setEmail] = React.useState("");
|
|
38
|
+
const [state, setState] = React.useState("entry");
|
|
39
|
+
const [resendState, setResendState] = React.useState("idle");
|
|
40
|
+
const setSafeTimeout = useSafeTimeout();
|
|
41
|
+
const resolvedTitle = title ?? tMode("title");
|
|
42
|
+
const resolvedDescription = description ?? tMode("description");
|
|
43
|
+
const resolvedButtonText = buttonText ?? tMode("button");
|
|
44
|
+
const resolvedSuccessTitle = successTitle ?? tShared("checkEmail");
|
|
45
|
+
const handleSubmit = (e) => {
|
|
46
|
+
e.preventDefault();
|
|
47
|
+
if (!email) return;
|
|
48
|
+
setState("loading");
|
|
49
|
+
onSubmit?.(email);
|
|
50
|
+
setSafeTimeout(() => setState("success"), 1500);
|
|
51
|
+
};
|
|
52
|
+
const handleResend = () => {
|
|
53
|
+
setResendState("sending");
|
|
54
|
+
onSubmit?.(email);
|
|
55
|
+
setSafeTimeout(() => {
|
|
56
|
+
setResendState("sent");
|
|
57
|
+
setSafeTimeout(() => setResendState("idle"), 3e3);
|
|
58
|
+
}, 1e3);
|
|
59
|
+
};
|
|
60
|
+
if (state === "success") {
|
|
61
|
+
return /* @__PURE__ */ jsx(m.div, { ...prefersReduced ? {} : fadeInUp, className: cn("w-full max-w-sm mx-auto", className), children: /* @__PURE__ */ jsxs(Card, { children: [
|
|
62
|
+
/* @__PURE__ */ jsxs(CardHeader, { className: "text-center", children: [
|
|
63
|
+
/* @__PURE__ */ jsx("div", { className: "mx-auto mb-2", children: /* @__PURE__ */ jsx(MailIcon, { size: 48, className: "text-accent" }) }),
|
|
64
|
+
/* @__PURE__ */ jsx(CardTitle, { className: "text-2xl", children: resolvedSuccessTitle }),
|
|
65
|
+
/* @__PURE__ */ jsx(CardDescription, { children: tMode("successDescription") })
|
|
66
|
+
] }),
|
|
67
|
+
/* @__PURE__ */ jsxs(CardContent, { className: "grid gap-4", children: [
|
|
68
|
+
/* @__PURE__ */ jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsx(Badge, { variant: "outline", className: "font-mono text-xs", children: email }) }),
|
|
69
|
+
/* @__PURE__ */ jsx("ol", { className: "space-y-2 text-sm text-text-secondary list-none", children: INSTRUCTION_STEPS.map((key) => /* @__PURE__ */ jsxs("li", { className: "flex items-start gap-2", children: [
|
|
70
|
+
/* @__PURE__ */ jsx(CheckIcon, { size: 16, className: "text-success mt-0.5 shrink-0" }),
|
|
71
|
+
/* @__PURE__ */ jsx("span", { children: tMode(`instructions.${key}`) })
|
|
72
|
+
] }, key)) }),
|
|
73
|
+
/* @__PURE__ */ jsx(Separator, {}),
|
|
74
|
+
/* @__PURE__ */ jsxs("div", { className: "text-center space-y-2", children: [
|
|
75
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-text-tertiary", children: tShared("didNotReceiveEmail") }),
|
|
76
|
+
/* @__PURE__ */ jsxs(
|
|
77
|
+
Button,
|
|
78
|
+
{
|
|
79
|
+
variant: "outline",
|
|
80
|
+
size: "sm",
|
|
81
|
+
onClick: handleResend,
|
|
82
|
+
disabled: resendState === "sending",
|
|
83
|
+
children: [
|
|
84
|
+
resendState === "sending" && /* @__PURE__ */ jsx(Spinner, { className: "mr-2" }),
|
|
85
|
+
resendState === "sent" ? tShared("emailResent") : tShared("resendEmail")
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
)
|
|
89
|
+
] })
|
|
90
|
+
] }),
|
|
91
|
+
/* @__PURE__ */ jsx(CardFooter, { className: "justify-center", children: /* @__PURE__ */ jsx(
|
|
92
|
+
"button",
|
|
93
|
+
{
|
|
94
|
+
type: "button",
|
|
95
|
+
onClick: onBackToLogin,
|
|
96
|
+
className: "text-sm text-text-tertiary hover:text-text-primary transition-colors",
|
|
97
|
+
children: tShared("backToLogin")
|
|
98
|
+
}
|
|
99
|
+
) })
|
|
100
|
+
] }) });
|
|
101
|
+
}
|
|
102
|
+
return /* @__PURE__ */ jsx(m.div, { ...prefersReduced ? {} : scaleIn, className: cn("w-full max-w-sm mx-auto", className), children: /* @__PURE__ */ jsxs(Card, { children: [
|
|
103
|
+
/* @__PURE__ */ jsxs(CardHeader, { className: "text-center", children: [
|
|
104
|
+
/* @__PURE__ */ jsx("div", { className: "mx-auto mb-2", children: MODE_ICONS[mode] }),
|
|
105
|
+
/* @__PURE__ */ jsx(CardTitle, { className: "text-2xl", children: resolvedTitle }),
|
|
106
|
+
/* @__PURE__ */ jsx(CardDescription, { children: resolvedDescription })
|
|
107
|
+
] }),
|
|
108
|
+
/* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("form", { noValidate: true, onSubmit: handleSubmit, className: "grid gap-4", children: [
|
|
109
|
+
/* @__PURE__ */ jsxs(Field, { children: [
|
|
110
|
+
/* @__PURE__ */ jsx(FieldLabel, { htmlFor: "recovery-email", children: tShared("email") }),
|
|
111
|
+
/* @__PURE__ */ jsx(
|
|
112
|
+
Input,
|
|
113
|
+
{
|
|
114
|
+
name: "email",
|
|
115
|
+
id: "recovery-email",
|
|
116
|
+
type: "email",
|
|
117
|
+
placeholder: tShared("emailPlaceholder"),
|
|
118
|
+
value: email,
|
|
119
|
+
onChange: (e) => setEmail(e.target.value),
|
|
120
|
+
autoComplete: "email",
|
|
121
|
+
required: true
|
|
122
|
+
}
|
|
123
|
+
)
|
|
124
|
+
] }),
|
|
125
|
+
/* @__PURE__ */ jsx(Button, { variant: "accent", className: "w-full", disabled: state === "loading", children: state === "loading" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
126
|
+
/* @__PURE__ */ jsx(Spinner, { className: "mr-2" }),
|
|
127
|
+
tShared("sending")
|
|
128
|
+
] }) : resolvedButtonText })
|
|
129
|
+
] }) }),
|
|
130
|
+
/* @__PURE__ */ jsx(CardFooter, { className: "justify-center", children: /* @__PURE__ */ jsx(
|
|
131
|
+
"button",
|
|
132
|
+
{
|
|
133
|
+
type: "button",
|
|
134
|
+
onClick: onBackToLogin,
|
|
135
|
+
className: "text-sm text-text-tertiary hover:text-text-primary transition-colors",
|
|
136
|
+
children: mode === "magic-link" ? tMode("backToPassword") : tShared("backToLogin")
|
|
137
|
+
}
|
|
138
|
+
) })
|
|
139
|
+
] }) });
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export { PasswordRecoveryBlock };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { cn } from './chunk-QYZT24TS.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { cva } from 'class-variance-authority';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
var audioWaveformVariants = cva(
|
|
7
|
+
"flex items-center",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: "[--waveform-color:rgb(var(--color-text-primary))]",
|
|
12
|
+
accent: "[--waveform-color:rgb(var(--color-accent))]",
|
|
13
|
+
success: "[--waveform-color:rgb(var(--color-success))]"
|
|
14
|
+
},
|
|
15
|
+
size: {
|
|
16
|
+
sm: "h-4 gap-[2px]",
|
|
17
|
+
default: "h-8 gap-1",
|
|
18
|
+
lg: "h-12 gap-1.5"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
defaultVariants: {
|
|
22
|
+
variant: "default",
|
|
23
|
+
size: "default"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
function AudioWaveform({
|
|
28
|
+
className,
|
|
29
|
+
variant,
|
|
30
|
+
size,
|
|
31
|
+
bars = 24,
|
|
32
|
+
active = false,
|
|
33
|
+
barWidth = 3,
|
|
34
|
+
ref,
|
|
35
|
+
...props
|
|
36
|
+
}) {
|
|
37
|
+
const randomOffsetsRef = React.useRef(null);
|
|
38
|
+
if (randomOffsetsRef.current === null || randomOffsetsRef.current.length !== bars) {
|
|
39
|
+
randomOffsetsRef.current = Array.from({ length: bars }, (_, i) => (i * 7 + 3) % 20);
|
|
40
|
+
}
|
|
41
|
+
const randomOffsets = randomOffsetsRef.current;
|
|
42
|
+
return /* @__PURE__ */ jsx(
|
|
43
|
+
"div",
|
|
44
|
+
{
|
|
45
|
+
ref,
|
|
46
|
+
className: cn(audioWaveformVariants({ variant, size }), className),
|
|
47
|
+
role: "img",
|
|
48
|
+
"aria-label": active ? "Audio waveform active" : "Audio waveform inactive",
|
|
49
|
+
...props,
|
|
50
|
+
children: Array.from({ length: bars }).map((_, i) => {
|
|
51
|
+
const activeHeight = 20 + Math.sin(i * 0.7) * 60 + randomOffsets[i];
|
|
52
|
+
const activeOpacity = 0.6 + Math.sin(i * 0.5) * 0.4;
|
|
53
|
+
return /* @__PURE__ */ jsx(
|
|
54
|
+
"span",
|
|
55
|
+
{
|
|
56
|
+
className: cn(
|
|
57
|
+
"rounded-full bg-[var(--waveform-color)] transition-all",
|
|
58
|
+
active && "animate-pulse"
|
|
59
|
+
),
|
|
60
|
+
style: {
|
|
61
|
+
width: `${barWidth}px`,
|
|
62
|
+
height: active ? `${activeHeight.toFixed(3)}%` : "15%",
|
|
63
|
+
opacity: active ? activeOpacity.toFixed(6) : "0.300000",
|
|
64
|
+
animationDelay: `${i * 75}ms`,
|
|
65
|
+
animationDuration: `${600 + i % 5 * 200}ms`
|
|
66
|
+
},
|
|
67
|
+
"aria-hidden": "true"
|
|
68
|
+
},
|
|
69
|
+
i
|
|
70
|
+
);
|
|
71
|
+
})
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export { AudioWaveform, audioWaveformVariants };
|