Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
121 commits
Select commit Hold shift + click to select a range
ccc9f73
reorganize interfaces, implement sketch of new form
jthrilly Jul 31, 2025
5815e49
working prototype
jthrilly Jul 31, 2025
71a9023
improved types and context
jthrilly Jul 31, 2025
7649a2f
manual rewrite
jthrilly Aug 5, 2025
dbaef8f
default field value should be undefined not empty string
jthrilly Aug 6, 2025
f53f6a6
implement select component
jthrilly Aug 6, 2025
9dbe007
WIP new field array
jthrilly Aug 6, 2025
2c1869c
fix fiels array reorder
jthrilly Aug 7, 2025
62556db
update submit button to use existing button component
jthrilly Aug 8, 2025
7ec5fcd
start upgrade to cva beta
jthrilly Aug 8, 2025
6b2d2b7
standardise field sub components; improve a11y
jthrilly Aug 8, 2025
5dfd574
prepare to reorganise field component
jthrilly Aug 11, 2025
68dbda4
reorganise field component
jthrilly Aug 11, 2025
1df1737
reduce duplication
jthrilly Aug 11, 2025
79536b9
working
jthrilly Aug 11, 2025
ff83195
add select story and fix read only attribute styling
jthrilly Aug 11, 2025
a84da9f
fix validation state; implement verrer radiogroup styling
jthrilly Aug 11, 2025
490757a
improve styling of checkbox group
jthrilly Aug 11, 2025
c83d25e
improve shared styles
jthrilly Aug 12, 2025
b94bc64
implement new FieldGroup component
jthrilly Aug 12, 2025
4f52080
implement animation
jthrilly Aug 12, 2025
da6be74
add container to radiogroup
jthrilly Aug 12, 2025
c69bdbb
implement useColumns for radio and checkbox groups
jthrilly Aug 12, 2025
ebac9e4
implement more robust submit handler function types
jthrilly Aug 13, 2025
31b4ed4
fix field unregister/re-register behaviour
jthrilly Aug 13, 2025
993b761
better implementation of strictmode
jthrilly Aug 13, 2025
92b9a90
WIP quick add form implementation
jthrilly Aug 13, 2025
91870c6
make quickadd semantically a checkbox
buckhalt Aug 14, 2025
9b053b3
first pass at useFormField translation hook
buckhalt Aug 14, 2025
5beb883
fix initial values, rename hook
buckhalt Aug 15, 2025
cc68fb4
translate protocol validation to new system
buckhalt Aug 15, 2025
f8998f3
replace fieldId with variable name for comparision validation
buckhalt Aug 18, 2025
2b1f89e
update package and basic api changes
buckhalt Aug 18, 2025
a921add
type fixes
buckhalt Aug 18, 2025
a4db9de
remove unneeded placeholder. just append name
buckhalt Aug 18, 2025
b0e90cb
implement unique validation
buckhalt Aug 19, 2025
8f034d7
bring over ReactMarkdown to label
buckhalt Aug 20, 2025
f55428a
recreate input fields for new form system
buckhalt Aug 20, 2025
4aba0e5
basic stories for new inputs
buckhalt Aug 20, 2025
e68c2da
base new inputs on radix primitives
buckhalt Aug 20, 2025
8876d09
fix boolean field and scale ticks
buckhalt Aug 20, 2025
3866c04
fix unique validation by passing currentEntityId
buckhalt Aug 21, 2025
f56f707
bugfixes and improve component ui
buckhalt Aug 21, 2025
8b941d5
accessibility and performance improvements
buckhalt Aug 22, 2025
32a2fb3
aria labels and other storybook accessibility issues
buckhalt Aug 22, 2025
44258f9
implement first pass at new datepicker component
buckhalt Aug 25, 2025
2a60e68
revert 44258f9
buckhalt Aug 26, 2025
d58fb84
pass codebookVariables in additionalContext to translateProtocolValid…
buckhalt Aug 26, 2025
d7a8e50
feature: DatePicker and RelativeDatePicker based on shadcn components
buckhalt Aug 26, 2025
61f5e6c
revert d7a8e50
buckhalt Aug 28, 2025
27cf24e
handle datepicker props, use step for mm/yyyy and yyyy
buckhalt Aug 28, 2025
c5bc92e
add better DatePicker storybook coverage
buckhalt Aug 28, 2025
b365ab5
example of month/year and year popovers
buckhalt Aug 28, 2025
7063160
somewhat working select datepicker
buckhalt Aug 29, 2025
7d7858e
update internal packages with versions that support zod4
buckhalt Sep 2, 2025
9ada180
type fixes related to new protocol-validaiton package version
buckhalt Sep 2, 2025
078f38d
merge base into head
buckhalt Sep 2, 2025
8fac240
Merge pull request #460 from complexdatacollective/zod4-upgrade
buckhalt Sep 2, 2025
21cae19
merge
buckhalt Sep 2, 2025
4458ba2
regenerate lockfile
buckhalt Sep 2, 2025
a5a522f
remove useZodForm, fix export * client boundary issue
buckhalt Sep 2, 2025
8bf95d2
fix storybook
buckhalt Sep 2, 2025
5e31dae
fix form validation for zod 4
buckhalt Sep 2, 2025
cbaeeaa
fix month/year date picker to correctly propagate changes
buckhalt Sep 2, 2025
62ec36f
fix type/lint issues in DatePicker
buckhalt Sep 2, 2025
7b7d7e2
pass onClick to node so that it will open editing NodeForm on name gen
buckhalt Sep 2, 2025
24e263b
add client directive to Button to avoid workaround
buckhalt Sep 2, 2025
1b8963d
type/lint fixes in form field components
buckhalt Sep 3, 2025
deb112d
update zod-form-data for zod4 compatibility
buckhalt Sep 3, 2025
4fbeea0
WIP rewrite useProtocolForm
jthrilly Sep 4, 2025
ebd074a
merge with main
jthrilly Sep 4, 2025
94d2445
working small example
jthrilly Sep 4, 2025
fc4c707
move form system to use zod native error types
jthrilly Sep 5, 2025
42a77bc
correct return type
jthrilly Sep 8, 2025
ac70007
merge with 3.0.0
jthrilly Sep 9, 2025
540b6a3
integrate node form and dialog system
jthrilly Sep 9, 2025
a8ae5d9
refactor validations
jthrilly Sep 11, 2025
bc73832
add test coverage
jthrilly Sep 11, 2025
9c7c3cb
reimplement validation correctly
jthrilly Sep 11, 2025
9b69b21
fix tests and wip storybook test integration
jthrilly Sep 12, 2025
66e2edd
working storybook a11y config
jthrilly Sep 12, 2025
85e87b6
fixing storybook vite errors
jthrilly Sep 15, 2025
a7dcf9a
dont use path aliases in css files to allow vite to build the app
jthrilly Sep 15, 2025
b33eab9
storybook building
jthrilly Sep 15, 2025
6e33b3f
chromatic build passing
jthrilly Sep 15, 2025
248eb80
refactor deprecated SCSS
jthrilly Sep 16, 2025
0832192
remove @apply from SCSS files
jthrilly Sep 16, 2025
95c1472
rename .js to .jsx when the file contains jsx
jthrilly Sep 16, 2025
4d64a46
implement elevation plugin in tailwind
jthrilly Sep 19, 2025
e2b96d5
implement elevation plugin using correct heuristics; implement and ha…
jthrilly Sep 22, 2025
4e9223a
remove old dialog system
jthrilly Sep 28, 2025
86dc334
add dialog footer back in; fix issue with validation on form close
jthrilly Oct 6, 2025
0bd0a4e
add initial icon component
jthrilly Oct 6, 2025
e781753
implement new Icon component and update existing icons to ts
jthrilly Oct 6, 2025
7d22aae
begin to replace use of old dialog component
jthrilly Oct 6, 2025
e5456f8
implement type scale
jthrilly Oct 7, 2025
76123b2
switch to margin bottom for spacing
jthrilly Oct 7, 2025
c2c5d6c
increase spacing
jthrilly Oct 7, 2025
ab876aa
correctly handle overflow for node form
jthrilly Oct 8, 2025
4c9f781
fix scrollToFirstError
jthrilly Oct 8, 2025
76d3b13
implement example of async form submission:
jthrilly Oct 9, 2025
2715d02
implement better return type for submission result
jthrilly Oct 9, 2025
f897b4b
fix existing dialog uses in dashboard
jthrilly Oct 10, 2025
c05e87b
fix dialog centering; fix node component
jthrilly Oct 13, 2025
0388d89
debugging validation and dialog instability
jthrilly Oct 13, 2025
c99084c
add eslint plugin for missing tailwind classes
jthrilly Oct 14, 2025
a010ecc
Implement RenderMarkdown component
jthrilly Oct 14, 2025
57f4458
add position:relative to body to fix iOS 26 issue with dialogs
jthrilly Oct 16, 2025
4356d34
merge with base branch
jthrilly Oct 16, 2025
5de1953
finish merge with parent branch
jthrilly Oct 16, 2025
86e1107
implement DialogTrigger
jthrilly Oct 20, 2025
bb85adb
implement chroma scaling
jthrilly Oct 21, 2025
0331073
tweak shadows for the last time
jthrilly Oct 22, 2025
19e6782
fix interviews table
jthrilly Oct 22, 2025
df069e7
update basic interview shell and nav bar
jthrilly Oct 23, 2025
fe764dd
improve prompt;name generator; name gen panels; quick add button
jthrilly Oct 23, 2025
11fb42a
numberous style fixes; new navigation bar
jthrilly Oct 24, 2025
096f943
simplify typography ssytem
jthrilly Oct 27, 2025
afe1098
remove next.lock
jthrilly Oct 27, 2025
5f80a8f
fix button text color
jthrilly Oct 28, 2025
3a57649
further component fixes
jthrilly Oct 31, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 10 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,14 @@ const config = {
'next/core-web-vitals',
'prettier',
'plugin:storybook/recommended',
'plugin:better-tailwindcss/recommended-error',
],
ignorePatterns: ['node_modules', '*.stories.*', 'public'],
settings: {
'better-tailwindcss': {
entryPoint: 'styles/globals.css',
},
},
ignorePatterns: ['node_modules', 'public'],
rules: {
'@typescript-eslint/switch-exhaustiveness-check': 'error',
'@next/next/no-img-element': 'off',
Expand Down Expand Up @@ -76,6 +82,9 @@ const config = {
},
],
'no-unreachable': 'error',
'better-tailwindcss/enforce-consistent-line-wrapping': 'off', // Conflict with prettier
'better-tailwindcss/enforce-consistent-class-order': 'off', // Conflict with prettier
'better-tailwindcss/no-unregistered-classes': 'warn', // TODO: set to error after fixing existing issues
},
};

Expand Down
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v22.18.0
1 change: 0 additions & 1 deletion .nvmrc

This file was deleted.

Binary file added .playwright-mcp/choice-dialog-test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .playwright-mcp/dashboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .playwright-mcp/dialog-appeared.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .playwright-mcp/dialog-fixed-working.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .playwright-mcp/nodeform-story-error-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .playwright-mcp/nodeform-story-error.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .playwright-mcp/page-2025-10-23T08-44-16-145Z.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .playwright-mcp/page-2025-10-23T08-47-46-763Z.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .playwright-mcp/page-2025-10-23T08-51-05-093Z.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .playwright-mcp/storybook-docs-page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .playwright-mcp/storybook-surface.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
30 changes: 23 additions & 7 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,31 @@
import type { StorybookConfig } from '@storybook/nextjs';
import type { StorybookConfig } from '@storybook/nextjs-vite';

const config: StorybookConfig = {
stories: [
'../(app|components|lib)/**/*.mdx',
'../(app|components|lib)/**/*.stories.@(js|jsx|mjs|ts|tsx)',
addons: [
'@storybook/addon-docs',
'@storybook/addon-a11y',
'@storybook/addon-vitest',
'@chromatic-com/storybook',
],
addons: [],
framework: {
name: '@storybook/nextjs',
options: {},
name: '@storybook/nextjs-vite',
options: {
builder: {
// Customize the Vite builder options here
viteConfigPath: './vitest.config.ts',
},
},
},
staticDirs: ['../public'],
typescript: {
check: false,
// reactDocgen: 'react-docgen',
// reactDocgenTypescriptOptions: {
// shouldExtractLiteralValuesFromEnum: true,
// propFilter: (prop) =>
// prop.parent ? !/node_modules/.test(prop.parent.fileName) : true,
// },
},
stories: ['../**/*.stories.@(js|jsx|mjs|ts|tsx|mdx)'],
};
export default config;
36 changes: 27 additions & 9 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Preview } from '@storybook/nextjs';
import type { Preview } from '@storybook/nextjs-vite';
import Providers from '../components/Providers';
import '../styles/globals.css';
// import '../styles/interview.scss';

const preview: Preview = {
parameters: {
Expand All @@ -10,27 +11,44 @@ const preview: Preview = {
date: /Date$/i,
},
},

backgrounds: {
default: 'light',
values: [
{
options: {
light: {
name: 'light',
value: '#ffffff',
},
{

dark: {
name: 'dark',
value: '#1f1f1f',
},
],
},
},

a11y: {
// 'todo' - show a11y violations in the test UI only
// 'error' - fail CI on a11y violations
// 'off' - skip a11y checks entirely
test: 'todo',
},
},

decorators: [
(Story) => (
<Providers>
<Story />
</Providers>
<div className="root" style={{ isolation: 'isolate' }}>
<Providers>
<Story />
</Providers>
</div>
),
],

initialGlobals: {
backgrounds: {
value: 'light',
},
},
};

export default preview;
12 changes: 12 additions & 0 deletions .storybook/vitest.setup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import * as a11yAddonAnnotations from '@storybook/addon-a11y/preview';
import * as docsAnnotations from '@storybook/addon-docs/preview';
import { setProjectAnnotations } from '@storybook/nextjs-vite';
import * as projectAnnotations from './preview';

// This is an important step to apply the right configuration when testing your stories.
// More info at: https://storybook.js.org/docs/api/portable-stories/portable-stories-vitest#setprojectannotations
setProjectAnnotations([
a11yAddonAnnotations,
projectAnnotations,
docsAnnotations,
]);
5 changes: 1 addition & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,5 @@
"source.fixAll.typescript": "always"
},
"editor.formatOnSave": true,
"tailwindCSS.experimental.classRegex": [
["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"],
["cx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"]
]
"tailwindCSS.classFunctions": ["cva", "cx"]
}
17 changes: 4 additions & 13 deletions actions/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import { revalidatePath } from 'next/cache';
import { cookies } from 'next/headers';
import { redirect } from 'next/navigation';
import z from 'zod';
import { type FormSubmissionResult } from '~/lib/form';
import { createUserFormDataSchema, loginSchema } from '~/schemas/auth';
import { auth, getServerSession } from '~/utils/auth';
import { prisma } from '~/utils/db';
Expand Down Expand Up @@ -63,24 +65,13 @@ export async function signup(formData: unknown) {
}
}

export const login = async (
data: unknown,
): Promise<
| {
success: true;
}
| {
success: false;
formErrors: string[];
fieldErrors?: Record<string, string[]>;
}
> => {
export const login = async (data: unknown): Promise<FormSubmissionResult> => {
const parsedFormData = loginSchema.safeParse(data);

if (!parsedFormData.success) {
return {
success: false,
...parsedFormData.error.flatten(),
...z.flattenError(parsedFormData.error),
};
}

Expand Down
2 changes: 2 additions & 0 deletions actions/protocols.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ export async function insertProtocol(
try {
const protocolHash = hash(protocol);

// TODO: updating protocol-validation package to use zod4 should fix the type issues

await prisma.protocol.create({
data: {
hash: protocolHash,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function ConnectUploadThing() {
return (
<div className="w-[30rem]">
<div className="mb-4">
<Heading variant="h2">Connect UploadThing</Heading>
<Heading level="h2">Connect UploadThing</Heading>
<Paragraph>
Fresco uses a third-party service called UploadThing to store media
files, including protocol assets. In order to use this service, you
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function CreateAccount() {
return (
<div className="w-[30rem]">
<div className="mb-4">
<Heading variant="h2">Create an Account</Heading>
<Heading level="h2">Create an Account</Heading>
<Paragraph>
To use Fresco, you need to set up an administrator account which will
enable to you access the protected parts of the app. Only one
Expand Down
34 changes: 19 additions & 15 deletions app/(blobs)/(setup)/_components/OnboardSteps/Documentation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { createId } from '@paralleldrive/cuid2';
import { FileText } from 'lucide-react';
import { redirect } from 'next/navigation';
import { setAppSetting } from '~/actions/appSettings';
import Section from '~/components/layout/Section';
import Surface from '~/components/layout/Surface';
import Heading from '~/components/typography/Heading';
import Paragraph from '~/components/typography/Paragraph';
import { Button } from '~/components/ui/Button';
import { IconButton } from '~/components/ui/Button';
import SubmitButton from '~/components/ui/SubmitButton';
import trackEvent from '~/lib/analytics';
import { getInstallationId } from '~/queries/appSettings';
Expand All @@ -30,17 +30,17 @@ function Documentation() {
return (
<div className="max-w-[30rem]">
<div className="mb-4">
<Heading variant="h2">Documentation</Heading>
<Heading level="h2">Documentation</Heading>
<Paragraph>
This is the end of the onboarding process. You are now ready to use
Fresco! For further help and information, consider using the resources
below.
</Paragraph>
</div>
<div className="flex flex-col gap-2">
<Section classNames="flex gap-10">
<Surface className="flex gap-10">
<div className="flex-1">
<Heading variant="h4-all-caps" className="mb-2">
<Heading level="h4" variant="all-caps" className="mb-2">
About Fresco
</Heading>
Visit our documentation site to learn more about Fresco.
Expand All @@ -50,15 +50,17 @@ function Documentation() {
href="https://documentation.networkcanvas.com/en/fresco"
target="_blank"
>
<Button variant="outline" size="icon">
<FileText />
</Button>
<IconButton
variant="outline"
aria-label="View Fresco documentation"
icon={<FileText />}
/>
</a>
</div>
</Section>
<Section classNames="flex gap-10">
</Surface>
<Surface className="flex gap-10">
<div className="flex-1">
<Heading variant="h4-all-caps" className="mb-2">
<Heading level="h4" variant="all-caps" className="mb-2">
Using Fresco
</Heading>
Read our guide on the basic workflow for using Fresco to conduct
Expand All @@ -69,12 +71,14 @@ function Documentation() {
href="https://documentation.networkcanvas.com/en/fresco/using-fresco"
target="_blank"
>
<Button variant="outline" size="icon">
<FileText />
</Button>
<IconButton
variant="outline"
aria-label="View Using Fresco guide"
icon={<FileText />}
/>
</a>
</div>
</Section>
</Surface>
</div>

<div className="flex justify-end pt-12">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function ManageParticipants({
return (
<div className="max-w-[30rem]">
<div className="mb-6">
<Heading variant="h2">Configure Participation</Heading>
<Heading level="h2">Configure Participation</Heading>
<Paragraph>
You can now optionally upload a CSV file containing the details of
participants you wish to recruit for your study. You can also choose
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function ConfigureStudy() {
return (
<div className="flex max-w-[30rem] flex-col items-stretch justify-between">
<div className="flex flex-col">
<Heading variant="h2">Import Protocols</Heading>
<Heading level="h2">Import Protocols</Heading>
<Paragraph>
If you have already created a Network Canvas protocol (
<code>.netcanvas</code>) you can import it now.
Expand Down
3 changes: 1 addition & 2 deletions app/(blobs)/(setup)/_components/SandboxCredentials.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import { env } from '~/env';
export default function SandboxCredentials() {
if (!env.SANDBOX_MODE) return null;
return (
<Alert variant="info">
<KeyRound className="h-4 w-4" />
<Alert variant="info" icon={KeyRound}>
<AlertTitle>Sandbox Credentials</AlertTitle>
<AlertDescription>
<div className="flex flex-col space-y-2">
Expand Down
11 changes: 5 additions & 6 deletions app/(blobs)/(setup)/_components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { Check } from 'lucide-react';
import { parseAsInteger, useQueryState } from 'nuqs';
import Heading from '~/components/typography/Heading';
import { cn } from '~/utils/shadcn';
import { cx } from '~/utils/cva';

function OnboardSteps({ steps }: { steps: string[] }) {
const [currentStep, setCurrentStep] = useQueryState(
Expand All @@ -16,18 +16,17 @@ function OnboardSteps({ steps }: { steps: string[] }) {
{steps.map((step, index) => (
<div
key={index}
className={cn(
className={cx(
'pointer-events-none flex items-center gap-2 rounded-xl',
// Make 'clickable' if the step is complete
currentStep > index && 'pointer-events-auto cursor-pointer',
)}
onClick={() => void setCurrentStep(index + 1)}
>
<div
className={cn(
className={cx(
'border-primary/[.06] flex h-10 w-10 items-center justify-center rounded-full border text-sm font-bold',
index < currentStep - 1 &&
'bg-success border-teal-400 text-white',
index < currentStep - 1 && 'bg-success border-success text-white',
index === currentStep - 1 &&
'border-primary bg-primary text-white',
)}
Expand All @@ -39,7 +38,7 @@ function OnboardSteps({ steps }: { steps: string[] }) {
)}
</div>
<div className="flex flex-col">
<Heading variant={'h4-all-caps'} className="m-0 text-xs">
<Heading level="h4" variant="all-caps" className="m-0 text-xs">
{step}
</Heading>
</div>
Expand Down
Loading