@vadimcomanescu/nadicode-design-system 2.0.9 → 4.0.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/.agents/skills/seed/SKILL.md +19 -10
- package/.agents/skills/seed/contract.md +9 -2
- package/.agents/skills/seed/references/blocks.md +5 -5
- package/.agents/skills/seed/references/components.md +2 -2
- package/.agents/skills/seed/references/nextjs.md +2 -2
- package/README.md +3 -3
- package/contracts/consumer-intent-map.json +1 -2
- package/contracts/release-governance-baseline.json +3 -37
- package/dist/catalog/catalog.d.ts +2220 -0
- package/dist/catalog/catalog.js +1913 -0
- package/dist/catalog/components.d.ts +201 -0
- package/dist/catalog/components.js +407 -0
- package/dist/catalog/types.d.ts +4 -0
- package/dist/catalog/types.js +1 -0
- package/dist/chunk-224KPIOG.js +60 -0
- package/dist/chunk-25BOZMXA.js +169 -0
- package/dist/chunk-32OLQ7FC.js +130 -0
- package/dist/chunk-3JJBJ4VR.js +47 -0
- package/dist/chunk-3U56FXYC.js +30 -0
- package/dist/chunk-4MWKE6F5.js +86 -0
- package/dist/chunk-6HGSU24S.js +94 -0
- package/dist/chunk-7IADIXDV.js +168 -0
- package/dist/chunk-7NS3VFD7.js +86 -0
- package/dist/chunk-7XLZCXUL.js +175 -0
- package/dist/chunk-ALA6OM7K.js +134 -0
- package/dist/chunk-AN5TW4AL.js +50 -0
- package/dist/chunk-AWZFQQGN.js +167 -0
- package/dist/chunk-BRCBJ3S4.js +42 -0
- package/dist/chunk-BRICSLHJ.js +30 -0
- package/dist/chunk-BYEHHZZN.js +115 -0
- package/dist/chunk-C33GUEDY.js +149 -0
- package/dist/chunk-CUDMDYKE.js +150 -0
- package/dist/chunk-CVTMWSNS.js +145 -0
- package/dist/chunk-DEZXWNYF.js +165 -0
- package/dist/chunk-DNJEVMDY.js +40 -0
- package/dist/chunk-DNJOBML6.js +66 -0
- package/dist/chunk-FTGFOK6T.js +69 -0
- package/dist/chunk-HFBJ6L6O.js +104 -0
- package/dist/chunk-HPTHS7SX.js +52 -0
- package/dist/chunk-KNR3WB5C.js +147 -0
- package/dist/chunk-KQ7ZC6EM.js +66 -0
- package/dist/chunk-LGW7FVG5.js +83 -0
- package/dist/chunk-LP6ZZYOQ.js +36 -0
- package/dist/chunk-LV4P7WVM.js +54 -0
- package/dist/chunk-MGSGCARB.js +164 -0
- package/dist/chunk-N3YFYMNZ.js +73 -0
- package/dist/chunk-Q5IYBNA7.js +56 -0
- package/dist/chunk-QJCE7NZF.js +85 -0
- package/dist/chunk-QW5II6YK.js +96 -0
- package/dist/chunk-RMGDDOCD.js +138 -0
- package/dist/chunk-RNCX4JIE.js +70 -0
- package/dist/chunk-RWCL5OPX.js +112 -0
- package/dist/chunk-S5OY2B63.js +28 -0
- package/dist/chunk-SIQNG72C.js +257 -0
- package/dist/chunk-SP7NIZFP.js +117 -0
- package/dist/chunk-SWRJWMGG.js +30 -0
- package/dist/chunk-TCQIJ3DO.js +85 -0
- package/dist/chunk-TPJ6JJ2F.js +290 -0
- package/dist/chunk-TUJZMJXW.js +72 -0
- package/dist/chunk-UR43ANYS.js +159 -0
- package/dist/chunk-VRGPG2YN.js +79 -0
- package/dist/chunk-WSBLCWY7.js +126 -0
- package/dist/chunk-XKKFSFYO.js +93 -0
- package/dist/chunk-XO7TBM47.js +32 -0
- package/dist/chunk-YDYDGG5K.js +132 -0
- package/dist/chunk-YMJOUYMT.js +171 -0
- package/dist/chunk-Z2WION42.js +32 -0
- package/dist/chunk-ZFKSVEYW.js +35 -0
- package/dist/components/blocks/AgentProfileGridBlock.js +8 -86
- package/dist/components/blocks/AgentRunOverviewBlock.js +8 -147
- package/dist/components/blocks/AgentWorkbenchBlock.js +15 -257
- package/dist/components/blocks/AudioVisualizerBlock.js +2 -50
- package/dist/components/blocks/AuthLayout.js +9 -73
- package/dist/components/blocks/BannerBlock.js +8 -66
- package/dist/components/blocks/BarChartBlock.js +5 -47
- package/dist/components/blocks/ChartBlock.js +7 -54
- package/dist/components/blocks/ChartCollectionBlock.js +11 -171
- package/dist/components/blocks/ChatLayout.js +12 -126
- package/dist/components/blocks/CreateBlock.js +9 -104
- package/dist/components/blocks/DataGridBlock.js +9 -117
- package/dist/components/blocks/DirectoryBlock.js +12 -85
- package/dist/components/blocks/FeatureGridBlock.js +6 -56
- package/dist/components/blocks/GalleryBlock.js +6 -69
- package/dist/components/blocks/HeroSectionBlock.js +10 -134
- package/dist/components/blocks/IntegrationsBlock.js +13 -94
- package/dist/components/blocks/InteractiveAreaChartBlock.js +5 -290
- package/dist/components/blocks/KanbanDemoBlock.js +8 -145
- package/dist/components/blocks/LogoCloud.js +4 -35
- package/dist/components/blocks/NavUser.js +5 -85
- package/dist/components/blocks/NotFoundBlock.js +8 -32
- package/dist/components/blocks/OnboardingBlock.js +7 -66
- package/dist/components/blocks/SettingsLayout.js +13 -86
- package/dist/components/blocks/SignUpBlock.js +8 -168
- package/dist/components/blocks/SolutionShowcaseBlock.js +11 -112
- package/dist/components/blocks/StatsBlock.js +6 -60
- package/dist/components/blocks/UsageDonutBlock.js +5 -79
- package/dist/components/blocks/WizardBlock.js +12 -93
- package/dist/components/blocks/user/InviteUserModal.js +10 -132
- package/dist/components/page-kits/AccountLockedPageKit.js +3 -40
- package/dist/components/page-kits/AgentsChatPageKit.js +11 -159
- package/dist/components/page-kits/AnalyticsPageKit.js +12 -150
- package/dist/components/page-kits/BlogContentPageKit.js +12 -167
- package/dist/components/page-kits/CheckoutPageKit.js +9 -83
- package/dist/components/page-kits/CompanySuitePageKit.js +9 -96
- package/dist/components/page-kits/DashboardPageKit.js +11 -149
- package/dist/components/page-kits/ErrorPageKit.js +5 -52
- package/dist/components/page-kits/KanbanBoardPageKit.js +7 -169
- package/dist/components/page-kits/LandingPageKit.js +11 -72
- package/dist/components/page-kits/LoginPageKit.js +3 -32
- package/dist/components/page-kits/OnboardingPageKit.js +6 -115
- package/dist/components/page-kits/PricingPageKit.js +12 -138
- package/dist/components/page-kits/ProfileSettingsPageKit.js +10 -164
- package/dist/components/page-kits/RecoveryPageKit.js +3 -42
- package/dist/components/page-kits/ResetPageKit.js +3 -36
- package/dist/components/page-kits/ServiceSuitePageKit.js +10 -175
- package/dist/components/page-kits/SignupPageKit.js +3 -30
- package/dist/components/page-kits/SuccessPageKit.js +4 -30
- package/dist/components/page-kits/TeamSettingsPageKit.js +9 -165
- package/dist/components/page-kits/TwoFactorPageKit.js +4 -28
- package/dist/components/page-kits/VerifyEmailPageKit.js +4 -30
- package/dist/components/page-kits/VoiceAgentsPageKit.js +13 -130
- package/dist/components/ui/CheckoutForm.js +5 -70
- package/eslint-rules/nadicode/config.js +1 -0
- package/eslint-rules/nadicode/data/catalog-names.json +93 -0
- package/eslint-rules/nadicode/index.js +2 -0
- package/eslint-rules/nadicode/rules/__tests__/require-catalog-component.test.js +77 -0
- package/eslint-rules/nadicode/rules/require-catalog-component.js +79 -0
- package/package.json +18 -25
- package/contracts/block-props-schemas.json +0 -2186
- package/contracts/component-props-schemas.json +0 -8322
- package/contracts/consumer-contract.json +0 -178
- package/contracts/page-kit-props-schemas.json +0 -1894
- package/contracts/public-surface-registry.json +0 -5822
- package/contracts/public-surface-registry.schema.json +0 -219
- package/contracts/spec-manifest.json +0 -46
- package/dist/catalog.json +0 -5221
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
export { OnboardingPageKit } from '../../chunk-BYEHHZZN.js';
|
|
2
|
+
import '../../chunk-KWILREVQ.js';
|
|
2
3
|
import '../../chunk-ZKLB5N3Q.js';
|
|
3
|
-
import
|
|
4
|
+
import '../../chunk-N53OMWW2.js';
|
|
4
5
|
import '../../chunk-4OBE2FS2.js';
|
|
5
6
|
import '../../chunk-J2DCQDXO.js';
|
|
6
7
|
import '../../chunk-C4SNHMYC.js';
|
|
7
8
|
import '../../chunk-B5QL76GA.js';
|
|
8
9
|
import '../../chunk-HOWTYZL5.js';
|
|
9
10
|
import '../../chunk-WH62BE24.js';
|
|
10
|
-
import
|
|
11
|
+
import '../../chunk-WI547C47.js';
|
|
11
12
|
import '../../chunk-RX5EUODB.js';
|
|
12
13
|
import '../../chunk-CUZJIDU7.js';
|
|
13
14
|
import '../../chunk-AP3XXYAY.js';
|
|
@@ -15,9 +16,9 @@ import '../../chunk-LIBXYD5Q.js';
|
|
|
15
16
|
import '../../chunk-RASEB2XI.js';
|
|
16
17
|
import '../../chunk-MJ4CB6ZL.js';
|
|
17
18
|
import '../../chunk-35EX5FP5.js';
|
|
18
|
-
import
|
|
19
|
+
import '../../chunk-AH6YSYYT.js';
|
|
19
20
|
import '../../chunk-NAAU5IWU.js';
|
|
20
|
-
import
|
|
21
|
+
import '../../chunk-7KIDDF3I.js';
|
|
21
22
|
import '../../chunk-6FOHUNXR.js';
|
|
22
23
|
import '../../chunk-PD2YEH3H.js';
|
|
23
24
|
import '../../chunk-CRY67BIF.js';
|
|
@@ -136,113 +137,3 @@ import '../../chunk-TV4RSQH4.js';
|
|
|
136
137
|
import '../../chunk-HJBXUXTD.js';
|
|
137
138
|
import '../../chunk-ASKFAYYR.js';
|
|
138
139
|
import '../../chunk-QYZT24TS.js';
|
|
139
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
140
|
-
|
|
141
|
-
function mapState(state) {
|
|
142
|
-
switch (state) {
|
|
143
|
-
case "validation-error":
|
|
144
|
-
return "validation-error";
|
|
145
|
-
case "saving":
|
|
146
|
-
return "submitting";
|
|
147
|
-
case "active-step":
|
|
148
|
-
return "dirty";
|
|
149
|
-
case "complete":
|
|
150
|
-
return "saved";
|
|
151
|
-
default:
|
|
152
|
-
return "pristine";
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
function OnboardingPageKit({
|
|
156
|
-
shell,
|
|
157
|
-
steps,
|
|
158
|
-
activeStepIndex,
|
|
159
|
-
state = "default",
|
|
160
|
-
validationMessage,
|
|
161
|
-
onStepChange,
|
|
162
|
-
onComplete,
|
|
163
|
-
canSkipOptionalStep = false,
|
|
164
|
-
onBack,
|
|
165
|
-
onContinueFromComplete,
|
|
166
|
-
completeTitle = "Onboarding complete",
|
|
167
|
-
completeDescription = "Your workspace is ready. Continue to your dashboard.",
|
|
168
|
-
className
|
|
169
|
-
}) {
|
|
170
|
-
const hasSteps = steps.length > 0;
|
|
171
|
-
const boundedStepIndex = hasSteps ? Math.min(Math.max(activeStepIndex, 0), steps.length - 1) : 0;
|
|
172
|
-
const currentStep = hasSteps ? steps[boundedStepIndex] : null;
|
|
173
|
-
const isLastStep = hasSteps ? boundedStepIndex === steps.length - 1 : true;
|
|
174
|
-
if (state === "complete") {
|
|
175
|
-
return /* @__PURE__ */ jsx(
|
|
176
|
-
CrudFormPageKit,
|
|
177
|
-
{
|
|
178
|
-
shell,
|
|
179
|
-
title: "Onboarding",
|
|
180
|
-
description: "Complete state",
|
|
181
|
-
state: "saved",
|
|
182
|
-
sections: [
|
|
183
|
-
{
|
|
184
|
-
id: "complete",
|
|
185
|
-
title: completeTitle,
|
|
186
|
-
content: /* @__PURE__ */ jsxs(Card, { children: [
|
|
187
|
-
/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: completeTitle }) }),
|
|
188
|
-
/* @__PURE__ */ jsxs(CardContent, { className: "space-y-3", children: [
|
|
189
|
-
/* @__PURE__ */ jsx(Typography, { variant: "muted", children: completeDescription }),
|
|
190
|
-
onContinueFromComplete ? /* @__PURE__ */ jsx(Button, { onClick: onContinueFromComplete, children: "Continue" }) : null
|
|
191
|
-
] })
|
|
192
|
-
] })
|
|
193
|
-
}
|
|
194
|
-
],
|
|
195
|
-
className
|
|
196
|
-
}
|
|
197
|
-
);
|
|
198
|
-
}
|
|
199
|
-
const title = currentStep ? `Onboarding \xB7 ${currentStep.title}` : "Onboarding";
|
|
200
|
-
const description = hasSteps ? `Step ${boundedStepIndex + 1} of ${steps.length}` : "Configure your workspace in a guided flow.";
|
|
201
|
-
return /* @__PURE__ */ jsx(
|
|
202
|
-
CrudFormPageKit,
|
|
203
|
-
{
|
|
204
|
-
shell,
|
|
205
|
-
title,
|
|
206
|
-
description,
|
|
207
|
-
state: mapState(state),
|
|
208
|
-
validationMessage,
|
|
209
|
-
sections: [
|
|
210
|
-
{
|
|
211
|
-
id: currentStep?.id ?? "no-steps",
|
|
212
|
-
title: currentStep?.title ?? "No steps configured",
|
|
213
|
-
description: currentStep?.description,
|
|
214
|
-
optional: currentStep?.optional,
|
|
215
|
-
content: currentStep ? /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
216
|
-
/* @__PURE__ */ jsx(Heading, { level: 4, children: currentStep.title }),
|
|
217
|
-
currentStep.description ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-text-secondary", children: currentStep.description }) : null,
|
|
218
|
-
/* @__PURE__ */ jsx("div", { children: currentStep.content })
|
|
219
|
-
] }) : /* @__PURE__ */ jsx(Typography, { variant: "muted", children: "Provide at least one onboarding step." })
|
|
220
|
-
}
|
|
221
|
-
],
|
|
222
|
-
actions: {
|
|
223
|
-
secondary: onBack ? {
|
|
224
|
-
label: "Back",
|
|
225
|
-
onAction: onBack,
|
|
226
|
-
disabled: boundedStepIndex === 0
|
|
227
|
-
} : void 0,
|
|
228
|
-
tertiary: canSkipOptionalStep && currentStep?.optional ? {
|
|
229
|
-
label: "Skip optional step",
|
|
230
|
-
onAction: () => onComplete?.()
|
|
231
|
-
} : void 0,
|
|
232
|
-
primary: {
|
|
233
|
-
label: isLastStep ? "Complete" : "Next",
|
|
234
|
-
onAction: () => {
|
|
235
|
-
if (!hasSteps || isLastStep) {
|
|
236
|
-
onComplete?.();
|
|
237
|
-
} else {
|
|
238
|
-
onStepChange?.(boundedStepIndex + 1);
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
},
|
|
243
|
-
className
|
|
244
|
-
}
|
|
245
|
-
);
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
export { OnboardingPageKit };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
1
|
+
export { PricingPageKit } from '../../chunk-RMGDDOCD.js';
|
|
2
|
+
import '../../chunk-Z233ZQZE.js';
|
|
3
|
+
import '../../chunk-VNNAL4A6.js';
|
|
3
4
|
import '../../chunk-DARC2ACH.js';
|
|
4
5
|
import '../../chunk-WOYBVPXK.js';
|
|
5
|
-
import
|
|
6
|
+
import '../../chunk-NEHCPO53.js';
|
|
6
7
|
import '../../chunk-AYWL4IYM.js';
|
|
7
|
-
import
|
|
8
|
-
import
|
|
8
|
+
import '../../chunk-GJPTPLCQ.js';
|
|
9
|
+
import '../../chunk-VZCB4APK.js';
|
|
9
10
|
import '../../chunk-G5EO22OR.js';
|
|
10
11
|
import '../../chunk-OHX2LFAH.js';
|
|
11
12
|
import '../../chunk-SGI25ZJ6.js';
|
|
@@ -15,22 +16,22 @@ import '../../chunk-XZ3A33GP.js';
|
|
|
15
16
|
import '../../chunk-F3T2U7YL.js';
|
|
16
17
|
import '../../chunk-6DYFX5IR.js';
|
|
17
18
|
import '../../chunk-EB5PYS7Q.js';
|
|
18
|
-
import
|
|
19
|
+
import '../../chunk-N53OMWW2.js';
|
|
19
20
|
import '../../chunk-DQPK2XRL.js';
|
|
20
21
|
import '../../chunk-R7N7YLFT.js';
|
|
21
22
|
import '../../chunk-HOWTYZL5.js';
|
|
22
23
|
import '../../chunk-ULLTRLBD.js';
|
|
23
24
|
import '../../chunk-4O6L5YWT.js';
|
|
24
25
|
import '../../chunk-GHIBG7OM.js';
|
|
25
|
-
import
|
|
26
|
+
import '../../chunk-WI547C47.js';
|
|
26
27
|
import '../../chunk-PXDHNGTG.js';
|
|
27
28
|
import '../../chunk-A7NUWD76.js';
|
|
28
29
|
import '../../chunk-CUZJIDU7.js';
|
|
29
30
|
import '../../chunk-AP3XXYAY.js';
|
|
30
31
|
import '../../chunk-LIBXYD5Q.js';
|
|
31
32
|
import '../../chunk-I23DDSU7.js';
|
|
32
|
-
import
|
|
33
|
-
import
|
|
33
|
+
import '../../chunk-AH6YSYYT.js';
|
|
34
|
+
import '../../chunk-7KIDDF3I.js';
|
|
34
35
|
import '../../chunk-6FOHUNXR.js';
|
|
35
36
|
import '../../chunk-PD2YEH3H.js';
|
|
36
37
|
import '../../chunk-CRY67BIF.js';
|
|
@@ -145,135 +146,8 @@ import '../../chunk-UHXGBV5N.js';
|
|
|
145
146
|
import '../../chunk-UIUMTURU.js';
|
|
146
147
|
import '../../chunk-PRUXIDBD.js';
|
|
147
148
|
import '../../chunk-NURPUVUV.js';
|
|
148
|
-
import
|
|
149
|
+
import '../../chunk-S4JAHKOP.js';
|
|
149
150
|
import '../../chunk-TV4RSQH4.js';
|
|
150
151
|
import '../../chunk-HJBXUXTD.js';
|
|
151
152
|
import '../../chunk-ASKFAYYR.js';
|
|
152
|
-
import
|
|
153
|
-
import React from 'react';
|
|
154
|
-
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
155
|
-
|
|
156
|
-
var STATE_BADGE_LABELS = {
|
|
157
|
-
"billing-toggle": "Billing toggle",
|
|
158
|
-
"loading-action": "Loading actions",
|
|
159
|
-
"empty-plan": "Empty plan state"
|
|
160
|
-
};
|
|
161
|
-
var EMPTY_PLAN_ACTIONS = [];
|
|
162
|
-
var EMPTY_PLANS = [];
|
|
163
|
-
var DEFAULT_COMPARISON = {};
|
|
164
|
-
var DEFAULT_FAQ = {};
|
|
165
|
-
var DEFAULT_CTA = {
|
|
166
|
-
title: "Need a custom rollout?",
|
|
167
|
-
description: "Talk to our team for multi-team migration and governance support.",
|
|
168
|
-
primaryAction: { label: "Contact sales", href: "/contact" }
|
|
169
|
-
};
|
|
170
|
-
var DEFAULT_EMPTY_STATE = {
|
|
171
|
-
title: "No plans available",
|
|
172
|
-
description: "Configure at least one plan to render pricing actions."
|
|
173
|
-
};
|
|
174
|
-
function PricingPageKit({
|
|
175
|
-
shell,
|
|
176
|
-
state = "default",
|
|
177
|
-
title = "Choose the plan that fits your team.",
|
|
178
|
-
description = "Use stable pricing blocks while keeping plan copy, links, and billing behavior app-owned.",
|
|
179
|
-
plans = EMPTY_PLANS,
|
|
180
|
-
billing,
|
|
181
|
-
comparison = DEFAULT_COMPARISON,
|
|
182
|
-
faq = DEFAULT_FAQ,
|
|
183
|
-
cta = DEFAULT_CTA,
|
|
184
|
-
planActions = EMPTY_PLAN_ACTIONS,
|
|
185
|
-
emptyState = DEFAULT_EMPTY_STATE,
|
|
186
|
-
loadingMessage = "Preparing checkout actions...",
|
|
187
|
-
className
|
|
188
|
-
}) {
|
|
189
|
-
const [selectedBilling, setSelectedBilling] = React.useState("monthly");
|
|
190
|
-
const supportsYearly = billing?.supportsYearly ?? true;
|
|
191
|
-
const monthlyLabel = billing?.monthlyLabel ?? "Monthly";
|
|
192
|
-
const yearlyLabel = billing?.yearlyLabel ?? "Yearly";
|
|
193
|
-
const yearlyBadgeLabel = billing?.yearlyBadgeLabel ?? "Save";
|
|
194
|
-
const isLoadingActions = state === "loading-action";
|
|
195
|
-
const shouldRenderEmpty = state === "empty-plan" || plans.length === 0;
|
|
196
|
-
return /* @__PURE__ */ jsx(MarketingShellPageKit, { ...shell, children: /* @__PURE__ */ jsxs("section", { className: cn("mx-auto w-full max-w-6xl space-y-8 px-6 pb-16", className), children: [
|
|
197
|
-
/* @__PURE__ */ jsxs("header", { className: "space-y-4", children: [
|
|
198
|
-
/* @__PURE__ */ jsx(Heading, { level: 2, children: title }),
|
|
199
|
-
/* @__PURE__ */ jsx(Typography, { variant: "muted", children: description }),
|
|
200
|
-
state !== "default" ? /* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-center gap-2", children: /* @__PURE__ */ jsx(Badge, { variant: "outline", children: STATE_BADGE_LABELS[state] }) }) : null
|
|
201
|
-
] }),
|
|
202
|
-
state === "billing-toggle" ? /* @__PURE__ */ jsxs(Card, { "data-testid": "pricing-billing-controls", children: [
|
|
203
|
-
/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: "Billing interval" }) }),
|
|
204
|
-
/* @__PURE__ */ jsxs(CardContent, { className: "space-y-3", children: [
|
|
205
|
-
/* @__PURE__ */ jsxs("div", { className: "inline-flex items-center gap-2 rounded-md border border-border/70 bg-surface/60 p-1", children: [
|
|
206
|
-
/* @__PURE__ */ jsx(
|
|
207
|
-
Button,
|
|
208
|
-
{
|
|
209
|
-
type: "button",
|
|
210
|
-
size: "sm",
|
|
211
|
-
variant: selectedBilling === "monthly" ? "primary" : "ghost",
|
|
212
|
-
onClick: () => setSelectedBilling("monthly"),
|
|
213
|
-
children: monthlyLabel
|
|
214
|
-
}
|
|
215
|
-
),
|
|
216
|
-
supportsYearly ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
217
|
-
/* @__PURE__ */ jsx(
|
|
218
|
-
Button,
|
|
219
|
-
{
|
|
220
|
-
type: "button",
|
|
221
|
-
size: "sm",
|
|
222
|
-
variant: selectedBilling === "yearly" ? "primary" : "ghost",
|
|
223
|
-
onClick: () => setSelectedBilling("yearly"),
|
|
224
|
-
children: yearlyLabel
|
|
225
|
-
}
|
|
226
|
-
),
|
|
227
|
-
/* @__PURE__ */ jsx(Badge, { variant: "accent", children: yearlyBadgeLabel })
|
|
228
|
-
] }) : null
|
|
229
|
-
] }),
|
|
230
|
-
billing?.note ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-text-secondary", children: billing.note }) : null
|
|
231
|
-
] })
|
|
232
|
-
] }) : null,
|
|
233
|
-
isLoadingActions ? /* @__PURE__ */ jsx(
|
|
234
|
-
"div",
|
|
235
|
-
{
|
|
236
|
-
"data-testid": "pricing-loading-action",
|
|
237
|
-
role: "status",
|
|
238
|
-
className: "rounded-md border border-border/70 bg-surface/70 px-4 py-3 text-sm text-text-secondary",
|
|
239
|
-
children: loadingMessage
|
|
240
|
-
}
|
|
241
|
-
) : null,
|
|
242
|
-
shouldRenderEmpty ? /* @__PURE__ */ jsxs(Card, { "data-testid": "pricing-empty-state", children: [
|
|
243
|
-
/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: emptyState.title }) }),
|
|
244
|
-
/* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(Typography, { variant: "muted", children: emptyState.description }) })
|
|
245
|
-
] }) : /* @__PURE__ */ jsx(
|
|
246
|
-
PricingBlock,
|
|
247
|
-
{
|
|
248
|
-
title: "Pricing plans",
|
|
249
|
-
description: "All plans are rendered from declared data inputs.",
|
|
250
|
-
plans,
|
|
251
|
-
showBillingToggle: state === "billing-toggle" && supportsYearly
|
|
252
|
-
}
|
|
253
|
-
),
|
|
254
|
-
planActions.length > 0 ? /* @__PURE__ */ jsxs(Card, { "data-testid": "pricing-plan-actions", children: [
|
|
255
|
-
/* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: "Checkout actions" }) }),
|
|
256
|
-
/* @__PURE__ */ jsx(CardContent, { className: "grid gap-3 sm:grid-cols-2", children: planActions.map((action) => {
|
|
257
|
-
const isDisabled = isLoadingActions || action.disabled;
|
|
258
|
-
return /* @__PURE__ */ jsxs("div", { className: "rounded-md border border-border/70 p-3", children: [
|
|
259
|
-
/* @__PURE__ */ jsx(
|
|
260
|
-
Button,
|
|
261
|
-
{
|
|
262
|
-
type: "button",
|
|
263
|
-
disabled: isDisabled,
|
|
264
|
-
onClick: action.onAction,
|
|
265
|
-
className: "w-full",
|
|
266
|
-
children: action.label
|
|
267
|
-
}
|
|
268
|
-
),
|
|
269
|
-
/* @__PURE__ */ jsx(Typography, { variant: "small", className: "mt-2 break-all text-text-tertiary", children: action.href })
|
|
270
|
-
] }, action.id);
|
|
271
|
-
}) })
|
|
272
|
-
] }) : null,
|
|
273
|
-
comparison === null ? null : /* @__PURE__ */ jsx("section", { children: /* @__PURE__ */ jsx(ComparisonBlock, { ...comparison }) }),
|
|
274
|
-
faq === null ? null : /* @__PURE__ */ jsx("section", { children: /* @__PURE__ */ jsx(FAQBlock, { ...faq }) }),
|
|
275
|
-
cta === null ? null : /* @__PURE__ */ jsx("section", { children: /* @__PURE__ */ jsx(CallToActionBlock, { ...cta }) })
|
|
276
|
-
] }) });
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
export { PricingPageKit };
|
|
153
|
+
import '../../chunk-QYZT24TS.js';
|
|
@@ -1,171 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
export { ProfileSettingsPageKit } from '../../chunk-MGSGCARB.js';
|
|
2
|
+
import '../../chunk-RKQPU75I.js';
|
|
3
|
+
import '../../chunk-N53OMWW2.js';
|
|
4
|
+
import '../../chunk-R7N7YLFT.js';
|
|
4
5
|
import '../../chunk-WI547C47.js';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import '../../chunk-RX5EUODB.js';
|
|
7
|
+
import '../../chunk-AP3XXYAY.js';
|
|
8
|
+
import '../../chunk-LIBXYD5Q.js';
|
|
8
9
|
import '../../chunk-55HD4L6G.js';
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
10
|
+
import '../../chunk-AH6YSYYT.js';
|
|
11
|
+
import '../../chunk-NAAU5IWU.js';
|
|
12
|
+
import '../../chunk-7KIDDF3I.js';
|
|
12
13
|
import '../../chunk-PD2YEH3H.js';
|
|
13
14
|
import '../../chunk-CRY67BIF.js';
|
|
14
15
|
import '../../chunk-HJC6U46F.js';
|
|
15
16
|
import '../../chunk-S4JAHKOP.js';
|
|
16
17
|
import '../../chunk-QYZT24TS.js';
|
|
17
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
18
|
-
|
|
19
|
-
var DEFAULT_SECTIONS = [{ id: "profile", label: "Profile" }];
|
|
20
|
-
var EMPTY_VALIDATION_ERRORS = {};
|
|
21
|
-
function renderProfileSection({
|
|
22
|
-
profileFields,
|
|
23
|
-
notificationPreferences,
|
|
24
|
-
avatar,
|
|
25
|
-
mode,
|
|
26
|
-
validationErrors,
|
|
27
|
-
onFieldChange,
|
|
28
|
-
onNotificationChange
|
|
29
|
-
}) {
|
|
30
|
-
const readOnlyMode = mode === "view";
|
|
31
|
-
return /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
|
|
32
|
-
/* @__PURE__ */ jsxs(Card, { children: [
|
|
33
|
-
/* @__PURE__ */ jsxs(CardHeader, { children: [
|
|
34
|
-
/* @__PURE__ */ jsx(CardTitle, { children: "Avatar" }),
|
|
35
|
-
/* @__PURE__ */ jsx(CardDescription, { children: "Upload a profile image visible to your workspace." })
|
|
36
|
-
] }),
|
|
37
|
-
/* @__PURE__ */ jsxs(CardContent, { className: "flex flex-wrap items-center gap-4", children: [
|
|
38
|
-
/* @__PURE__ */ jsxs(Avatar, { className: "h-14 w-14", children: [
|
|
39
|
-
/* @__PURE__ */ jsx(AvatarImage, { src: avatar?.src, alt: "Profile avatar" }),
|
|
40
|
-
/* @__PURE__ */ jsx(AvatarFallback, { children: avatar?.fallback ?? "U" })
|
|
41
|
-
] }),
|
|
42
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-2", children: [
|
|
43
|
-
/* @__PURE__ */ jsx(
|
|
44
|
-
Button,
|
|
45
|
-
{
|
|
46
|
-
variant: "secondary",
|
|
47
|
-
onClick: avatar?.onUpload,
|
|
48
|
-
disabled: readOnlyMode || avatar?.status === "uploading",
|
|
49
|
-
children: avatar?.status === "uploading" ? "Uploading\u2026" : "Upload avatar"
|
|
50
|
-
}
|
|
51
|
-
),
|
|
52
|
-
/* @__PURE__ */ jsx(Button, { variant: "ghost", onClick: avatar?.onRemove, disabled: readOnlyMode, children: "Remove" })
|
|
53
|
-
] })
|
|
54
|
-
] }),
|
|
55
|
-
avatar?.errorMessage ? /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-destructive", children: avatar.errorMessage }) }) : null
|
|
56
|
-
] }),
|
|
57
|
-
/* @__PURE__ */ jsxs(Card, { children: [
|
|
58
|
-
/* @__PURE__ */ jsxs(CardHeader, { children: [
|
|
59
|
-
/* @__PURE__ */ jsx(CardTitle, { children: "Personal information" }),
|
|
60
|
-
/* @__PURE__ */ jsx(CardDescription, { children: "Control profile details used across your account." })
|
|
61
|
-
] }),
|
|
62
|
-
/* @__PURE__ */ jsx(CardContent, { className: "space-y-4", children: profileFields.map((field) => {
|
|
63
|
-
const inputId = `profile-settings-field-${field.id}`;
|
|
64
|
-
const fieldError = validationErrors[field.id];
|
|
65
|
-
return /* @__PURE__ */ jsxs(Field, { children: [
|
|
66
|
-
/* @__PURE__ */ jsxs(FieldLabel, { htmlFor: inputId, children: [
|
|
67
|
-
field.label,
|
|
68
|
-
field.required ? " *" : ""
|
|
69
|
-
] }),
|
|
70
|
-
/* @__PURE__ */ jsx(
|
|
71
|
-
Input,
|
|
72
|
-
{
|
|
73
|
-
id: inputId,
|
|
74
|
-
type: field.type ?? "text",
|
|
75
|
-
value: field.value,
|
|
76
|
-
placeholder: field.placeholder,
|
|
77
|
-
readOnly: readOnlyMode || field.readOnly,
|
|
78
|
-
disabled: readOnlyMode || field.readOnly,
|
|
79
|
-
onChange: (event) => onFieldChange?.(field.id, event.target.value)
|
|
80
|
-
}
|
|
81
|
-
),
|
|
82
|
-
field.helperText ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-text-tertiary", children: field.helperText }) : null,
|
|
83
|
-
fieldError ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-destructive", children: fieldError }) : null
|
|
84
|
-
] }, field.id);
|
|
85
|
-
}) })
|
|
86
|
-
] }),
|
|
87
|
-
/* @__PURE__ */ jsxs(Card, { children: [
|
|
88
|
-
/* @__PURE__ */ jsxs(CardHeader, { children: [
|
|
89
|
-
/* @__PURE__ */ jsx(CardTitle, { children: "Notification preferences" }),
|
|
90
|
-
/* @__PURE__ */ jsx(CardDescription, { children: "Set communication and security notification behavior." })
|
|
91
|
-
] }),
|
|
92
|
-
/* @__PURE__ */ jsx(CardContent, { className: "space-y-4", children: notificationPreferences.map((preference) => /* @__PURE__ */ jsxs(
|
|
93
|
-
"div",
|
|
94
|
-
{
|
|
95
|
-
className: "flex flex-wrap items-center justify-between gap-3 rounded-lg border border-border-subtle bg-surface-hover p-4",
|
|
96
|
-
children: [
|
|
97
|
-
/* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
98
|
-
/* @__PURE__ */ jsx(Label, { htmlFor: `profile-settings-pref-${preference.id}`, children: preference.label }),
|
|
99
|
-
preference.description ? /* @__PURE__ */ jsx(Typography, { variant: "small", className: "text-text-secondary", children: preference.description }) : null
|
|
100
|
-
] }),
|
|
101
|
-
/* @__PURE__ */ jsx(
|
|
102
|
-
Switch,
|
|
103
|
-
{
|
|
104
|
-
id: `profile-settings-pref-${preference.id}`,
|
|
105
|
-
checked: preference.enabled,
|
|
106
|
-
disabled: readOnlyMode || preference.disabled,
|
|
107
|
-
onCheckedChange: (checked) => onNotificationChange?.(preference.id, checked),
|
|
108
|
-
"aria-label": preference.label
|
|
109
|
-
}
|
|
110
|
-
)
|
|
111
|
-
]
|
|
112
|
-
},
|
|
113
|
-
preference.id
|
|
114
|
-
)) })
|
|
115
|
-
] })
|
|
116
|
-
] });
|
|
117
|
-
}
|
|
118
|
-
function ProfileSettingsPageKit({
|
|
119
|
-
title = "Profile settings",
|
|
120
|
-
description = "Manage profile details, avatar controls, and personal notification preferences.",
|
|
121
|
-
sections = DEFAULT_SECTIONS,
|
|
122
|
-
activeSectionId,
|
|
123
|
-
onSectionChange,
|
|
124
|
-
profileFields,
|
|
125
|
-
notificationPreferences,
|
|
126
|
-
avatar,
|
|
127
|
-
mode = "edit",
|
|
128
|
-
saveState = "default",
|
|
129
|
-
validationErrors = EMPTY_VALIDATION_ERRORS,
|
|
130
|
-
validationMessage,
|
|
131
|
-
fatalErrorMessage,
|
|
132
|
-
onFieldChange,
|
|
133
|
-
onNotificationChange,
|
|
134
|
-
onSave,
|
|
135
|
-
onDiscard,
|
|
136
|
-
renderAdditionalSection
|
|
137
|
-
}) {
|
|
138
|
-
const firstSectionId = sections[0]?.id ?? "profile";
|
|
139
|
-
const resolvedActiveSectionId = activeSectionId ?? firstSectionId;
|
|
140
|
-
return /* @__PURE__ */ jsx(
|
|
141
|
-
SettingsPageKit,
|
|
142
|
-
{
|
|
143
|
-
title,
|
|
144
|
-
description,
|
|
145
|
-
sections,
|
|
146
|
-
activeSectionId: resolvedActiveSectionId,
|
|
147
|
-
onSectionChange,
|
|
148
|
-
saveState,
|
|
149
|
-
validationMessage,
|
|
150
|
-
fatalErrorMessage,
|
|
151
|
-
onSave,
|
|
152
|
-
onDiscard,
|
|
153
|
-
renderSection: (section) => {
|
|
154
|
-
if (section.id === "profile") {
|
|
155
|
-
return renderProfileSection({
|
|
156
|
-
profileFields,
|
|
157
|
-
notificationPreferences,
|
|
158
|
-
avatar,
|
|
159
|
-
mode,
|
|
160
|
-
validationErrors,
|
|
161
|
-
onFieldChange,
|
|
162
|
-
onNotificationChange
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
return renderAdditionalSection ? renderAdditionalSection(section) : null;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
export { ProfileSettingsPageKit };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
export { RecoveryPageKit } from '../../chunk-BRCBJ3S4.js';
|
|
2
|
+
import '../../chunk-5PZ4VR2D.js';
|
|
2
3
|
import '../../chunk-MDAYDDTC.js';
|
|
3
4
|
import '../../chunk-ZLSWCV55.js';
|
|
4
5
|
import '../../chunk-RX5EUODB.js';
|
|
@@ -15,44 +16,4 @@ import '../../chunk-XQ2UDMPO.js';
|
|
|
15
16
|
import '../../chunk-CXACRCZ4.js';
|
|
16
17
|
import '../../chunk-S4JAHKOP.js';
|
|
17
18
|
import '../../chunk-ASKFAYYR.js';
|
|
18
|
-
import
|
|
19
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
20
|
-
|
|
21
|
-
function RecoveryPageKit({
|
|
22
|
-
mode = "reset",
|
|
23
|
-
onSubmit,
|
|
24
|
-
onBackToLogin,
|
|
25
|
-
title,
|
|
26
|
-
description,
|
|
27
|
-
buttonText,
|
|
28
|
-
successTitle,
|
|
29
|
-
errorMessage,
|
|
30
|
-
className,
|
|
31
|
-
cardClassName
|
|
32
|
-
}) {
|
|
33
|
-
return /* @__PURE__ */ jsx("section", { className: cn("min-h-dvh w-full bg-background px-4 py-12 md:px-8 md:py-20", className), children: /* @__PURE__ */ jsxs("div", { className: "mx-auto flex w-full max-w-5xl flex-col items-center justify-center gap-4", children: [
|
|
34
|
-
errorMessage ? /* @__PURE__ */ jsx(
|
|
35
|
-
"div",
|
|
36
|
-
{
|
|
37
|
-
role: "alert",
|
|
38
|
-
className: "w-full max-w-sm rounded-md border border-destructive/40 bg-destructive/10 px-4 py-3 text-sm text-destructive",
|
|
39
|
-
children: errorMessage
|
|
40
|
-
}
|
|
41
|
-
) : null,
|
|
42
|
-
/* @__PURE__ */ jsx(
|
|
43
|
-
PasswordRecoveryBlock,
|
|
44
|
-
{
|
|
45
|
-
className: cn("w-full", cardClassName),
|
|
46
|
-
mode,
|
|
47
|
-
onSubmit,
|
|
48
|
-
onBackToLogin,
|
|
49
|
-
title,
|
|
50
|
-
description,
|
|
51
|
-
buttonText,
|
|
52
|
-
successTitle
|
|
53
|
-
}
|
|
54
|
-
)
|
|
55
|
-
] }) });
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export { RecoveryPageKit };
|
|
19
|
+
import '../../chunk-QYZT24TS.js';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
export { ResetPageKit } from '../../chunk-LP6ZZYOQ.js';
|
|
2
|
+
import '../../chunk-X6VXWEDO.js';
|
|
2
3
|
import '../../chunk-ZLSWCV55.js';
|
|
3
4
|
import '../../chunk-UJDEGCCZ.js';
|
|
4
5
|
import '../../chunk-RX5EUODB.js';
|
|
@@ -15,38 +16,4 @@ import '../../chunk-FMH55OKV.js';
|
|
|
15
16
|
import '../../chunk-CXACRCZ4.js';
|
|
16
17
|
import '../../chunk-UIUMTURU.js';
|
|
17
18
|
import '../../chunk-ASKFAYYR.js';
|
|
18
|
-
import
|
|
19
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
20
|
-
|
|
21
|
-
function ResetPageKit({
|
|
22
|
-
onSubmit,
|
|
23
|
-
onBackToLogin,
|
|
24
|
-
title,
|
|
25
|
-
description,
|
|
26
|
-
errorMessage,
|
|
27
|
-
className,
|
|
28
|
-
cardClassName
|
|
29
|
-
}) {
|
|
30
|
-
return /* @__PURE__ */ jsx("section", { className: cn("min-h-dvh w-full bg-background px-4 py-12 md:px-8 md:py-20", className), children: /* @__PURE__ */ jsxs("div", { className: "mx-auto flex w-full max-w-5xl flex-col items-center justify-center gap-4", children: [
|
|
31
|
-
errorMessage ? /* @__PURE__ */ jsx(
|
|
32
|
-
"div",
|
|
33
|
-
{
|
|
34
|
-
role: "alert",
|
|
35
|
-
className: "w-full max-w-sm rounded-md border border-destructive/40 bg-destructive/10 px-4 py-3 text-sm text-destructive",
|
|
36
|
-
children: errorMessage
|
|
37
|
-
}
|
|
38
|
-
) : null,
|
|
39
|
-
/* @__PURE__ */ jsx(
|
|
40
|
-
ResetPasswordBlock,
|
|
41
|
-
{
|
|
42
|
-
className: cn("w-full", cardClassName),
|
|
43
|
-
onSubmit,
|
|
44
|
-
onBackToLogin,
|
|
45
|
-
title,
|
|
46
|
-
description
|
|
47
|
-
}
|
|
48
|
-
)
|
|
49
|
-
] }) });
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export { ResetPageKit };
|
|
19
|
+
import '../../chunk-QYZT24TS.js';
|