@tc96/cli 0.0.0-stage → 0.28.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/LICENSE +21 -0
- package/README.md +213 -2
- package/cli.js +1450 -0
- package/package.json +35 -4
- package/registry/agenda-1.json +1297 -0
- package/registry/aggregate.json +4 -0
- package/registry/ai-chat-1.json +91 -0
- package/registry/app-shell-1.json +81 -0
- package/registry/app-shell-2.json +89 -0
- package/registry/app-shell-3.json +109 -0
- package/registry/app-shell-4.json +104 -0
- package/registry/card-1.json +104 -0
- package/registry/card-2.json +97 -0
- package/registry/card-3.json +104 -0
- package/registry/card-4.json +98 -0
- package/registry/card-5.json +85 -0
- package/registry/card-6.json +98 -0
- package/registry/card-7.json +104 -0
- package/registry/card-8.json +106 -0
- package/registry/card-9.json +92 -0
- package/registry/charts.json +30 -0
- package/registry/chat-assistant.json +110 -0
- package/registry/chats-panel.json +97 -0
- package/registry/checklist.json +321 -0
- package/registry/collection.json +1104 -0
- package/registry/crm-1.json +1317 -0
- package/registry/crm-2.json +1400 -0
- package/registry/dashboard-1.json +160 -0
- package/registry/dashboard-2.json +153 -0
- package/registry/dashboard-3.json +154 -0
- package/registry/dashboard-4.json +168 -0
- package/registry/dashboard-5.json +167 -0
- package/registry/dashboard-6.json +143 -0
- package/registry/dashboard-7.json +188 -0
- package/registry/documents-1.json +1322 -0
- package/registry/editable.json +36 -0
- package/registry/empty-state-1.json +40 -0
- package/registry/empty-state-2.json +39 -0
- package/registry/empty-state-3.json +61 -0
- package/registry/empty-state-4.json +39 -0
- package/registry/empty-state-5.json +47 -0
- package/registry/empty-state-6.json +40 -0
- package/registry/finance-1.json +845 -0
- package/registry/finance-2.json +973 -0
- package/registry/finance-3.json +1436 -0
- package/registry/flow-1.json +460 -0
- package/registry/flow-2.json +503 -0
- package/registry/flow-3.json +198 -0
- package/registry/flow-4.json +75 -0
- package/registry/flow-canvas.json +198 -0
- package/registry/flow-inspector.json +151 -0
- package/registry/flow-step-library.json +112 -0
- package/registry/forgot-password-1.json +73 -0
- package/registry/forgot-password-2.json +73 -0
- package/registry/inbox-1.json +1184 -0
- package/registry/inventory-1.json +828 -0
- package/registry/inventory-2.json +956 -0
- package/registry/legal-1.json +1345 -0
- package/registry/legal-2.json +1279 -0
- package/registry/legal-3.json +1273 -0
- package/registry/legal-4.json +1273 -0
- package/registry/legal-5.json +1393 -0
- package/registry/legal-6.json +1309 -0
- package/registry/legal-7.json +1315 -0
- package/registry/legal-8.json +1358 -0
- package/registry/legal-9.json +1381 -0
- package/registry/list-1.json +129 -0
- package/registry/list-2.json +117 -0
- package/registry/list-3.json +129 -0
- package/registry/list-4.json +105 -0
- package/registry/list-5.json +98 -0
- package/registry/list-6.json +92 -0
- package/registry/list.json +52 -0
- package/registry/login-1.json +89 -0
- package/registry/login-10.json +88 -0
- package/registry/login-2.json +81 -0
- package/registry/login-3.json +90 -0
- package/registry/login-4.json +81 -0
- package/registry/login-5.json +82 -0
- package/registry/login-6.json +88 -0
- package/registry/login-7.json +83 -0
- package/registry/login-8.json +81 -0
- package/registry/login-9.json +88 -0
- package/registry/magic-link-6.json +79 -0
- package/registry/marketing-1.json +833 -0
- package/registry/marketing-2.json +961 -0
- package/registry/navbar-1.json +66 -0
- package/registry/navbar-10.json +50 -0
- package/registry/navbar-11.json +48 -0
- package/registry/navbar-12.json +48 -0
- package/registry/navbar-2.json +48 -0
- package/registry/navbar-3.json +50 -0
- package/registry/navbar-4.json +39 -0
- package/registry/navbar-5.json +50 -0
- package/registry/navbar-6.json +48 -0
- package/registry/navbar-7.json +72 -0
- package/registry/navbar-8.json +50 -0
- package/registry/navbar-9.json +54 -0
- package/registry/onboarding-1.json +114 -0
- package/registry/onboarding-2.json +78 -0
- package/registry/onboarding-3.json +71 -0
- package/registry/otp-1.json +73 -0
- package/registry/projects-1.json +865 -0
- package/registry/projects-2.json +993 -0
- package/registry/projects-3.json +1346 -0
- package/registry/properties.json +530 -0
- package/registry/record-dialog.json +88 -0
- package/registry/record-group.json +194 -0
- package/registry/record-preview.json +70 -0
- package/registry/record-status-list.json +70 -0
- package/registry/reset-password-1.json +92 -0
- package/registry/reset-password-2.json +98 -0
- package/registry/reset-password-6.json +91 -0
- package/registry/revenue-1.json +834 -0
- package/registry/revenue-2.json +968 -0
- package/registry/revenue-3.json +821 -0
- package/registry/revenue-4.json +949 -0
- package/registry/rich-text-editor-1.json +172 -0
- package/registry/rich-text-editor-2.json +158 -0
- package/registry/rich-text-editor-3.json +198 -0
- package/registry/rich-text-editor-4.json +200 -0
- package/registry/rich-text-editor-5.json +237 -0
- package/registry/rich-text-editor.json +113 -0
- package/registry/settings-account-1.json +119 -0
- package/registry/settings-account-2.json +118 -0
- package/registry/settings-catalog-1.json +128 -0
- package/registry/settings-catalog-10.json +129 -0
- package/registry/settings-catalog-2.json +116 -0
- package/registry/settings-catalog-3.json +118 -0
- package/registry/settings-catalog-4.json +227 -0
- package/registry/settings-catalog-5.json +129 -0
- package/registry/settings-catalog-6.json +130 -0
- package/registry/settings-catalog-7.json +130 -0
- package/registry/settings-catalog-8.json +183 -0
- package/registry/settings-catalog-9.json +159 -0
- package/registry/settings-integration-1.json +125 -0
- package/registry/settings-integration-2.json +122 -0
- package/registry/settings-integration-3.json +118 -0
- package/registry/settings-integration-4.json +129 -0
- package/registry/settings-integration-5.json +122 -0
- package/registry/settings-integration-6.json +92 -0
- package/registry/settings-integration-7.json +122 -0
- package/registry/settings-integration-8.json +593 -0
- package/registry/settings-notification-channel-1.json +112 -0
- package/registry/settings-preference-1.json +123 -0
- package/registry/settings-preference-2.json +123 -0
- package/registry/settings-preference-3.json +116 -0
- package/registry/settings-role-permission-1.json +117 -0
- package/registry/settings-security-1.json +117 -0
- package/registry/settings-workspace-1.json +119 -0
- package/registry/settings-workspace-2.json +125 -0
- package/registry/settings.json +82 -0
- package/registry/signup-1.json +100 -0
- package/registry/signup-2.json +93 -0
- package/registry/signup-3.json +83 -0
- package/registry/signup-6.json +99 -0
- package/registry/state-surface.json +58 -0
- package/registry/stats-1.json +116 -0
- package/registry/stats-2.json +115 -0
- package/registry/stats-3.json +97 -0
- package/registry/stats-4.json +92 -0
- package/registry/stats-5.json +103 -0
- package/registry/stats-6.json +105 -0
- package/registry/stats-7.json +103 -0
- package/registry/stats.json +64 -0
- package/registry/support-1.json +853 -0
- package/registry/support-2.json +981 -0
- package/registry/support-3.json +762 -0
- package/registry/support-4.json +538 -0
- package/registry/team-1.json +829 -0
- package/registry/team-2.json +957 -0
- package/registry/timeline-1.json +97 -0
- package/registry/timeline-2.json +102 -0
- package/registry/timeline-3.json +68 -0
- package/registry/timeline-4.json +86 -0
- package/registry/ui/accordion.json +15 -0
- package/registry/ui/alert-dialog.json +14 -0
- package/registry/ui/alert.json +50 -0
- package/registry/ui/autocomplete.json +18 -0
- package/registry/ui/avatar.json +14 -0
- package/registry/ui/badge.json +51 -0
- package/registry/ui/breadcrumb.json +15 -0
- package/registry/ui/button.json +25 -0
- package/registry/ui/calendar.json +15 -0
- package/registry/ui/card.json +14 -0
- package/registry/ui/chat.json +115 -0
- package/registry/ui/checkbox-group.json +14 -0
- package/registry/ui/checkbox.json +14 -0
- package/registry/ui/collapsible.json +14 -0
- package/registry/ui/combobox.json +18 -0
- package/registry/ui/command.json +17 -0
- package/registry/ui/composer-clipboard.json +14 -0
- package/registry/ui/composer-document.json +14 -0
- package/registry/ui/composer-editor.json +16 -0
- package/registry/ui/composer-query.json +12 -0
- package/registry/ui/composer.json +17 -0
- package/registry/ui/context-menu.json +23 -0
- package/registry/ui/dialog.json +18 -0
- package/registry/ui/drawer.json +18 -0
- package/registry/ui/empty.json +14 -0
- package/registry/ui/field.json +22 -0
- package/registry/ui/fieldset.json +14 -0
- package/registry/ui/form.json +14 -0
- package/registry/ui/frame.json +12 -0
- package/registry/ui/gauge.json +31 -0
- package/registry/ui/group.json +17 -0
- package/registry/ui/icon-frame.json +31 -0
- package/registry/ui/input-group.json +17 -0
- package/registry/ui/input.json +14 -0
- package/registry/ui/kbd.json +12 -0
- package/registry/ui/label.json +14 -0
- package/registry/ui/menu.json +39 -0
- package/registry/ui/meter.json +14 -0
- package/registry/ui/number-field.json +17 -0
- package/registry/ui/otp-field.json +31 -0
- package/registry/ui/pagination.json +17 -0
- package/registry/ui/popover.json +14 -0
- package/registry/ui/preview-card.json +14 -0
- package/registry/ui/progress.json +14 -0
- package/registry/ui/property-meta.json +16 -0
- package/registry/ui/property-tone.json +12 -0
- package/registry/ui/radio-group.json +14 -0
- package/registry/ui/render-anchor.json +12 -0
- package/registry/ui/scroll-area.json +14 -0
- package/registry/ui/segmented-control.json +14 -0
- package/registry/ui/select.json +16 -0
- package/registry/ui/separator.json +14 -0
- package/registry/ui/sheet.json +18 -0
- package/registry/ui/sidebar.json +25 -0
- package/registry/ui/skeleton.json +24 -0
- package/registry/ui/slider.json +14 -0
- package/registry/ui/spinner.json +14 -0
- package/registry/ui/switch.json +14 -0
- package/registry/ui/table.json +14 -0
- package/registry/ui/tabs.json +16 -0
- package/registry/ui/text.json +31 -0
- package/registry/ui/textarea.json +14 -0
- package/registry/ui/toast.json +89 -0
- package/registry/ui/toggle-group.json +18 -0
- package/registry/ui/toggle.json +15 -0
- package/registry/ui/toolbar.json +14 -0
- package/registry/ui/tooltip.json +14 -0
- package/registry/ui/use-composer-editor.json +17 -0
- package/registry/ui/use-copy-to-clipboard.json +12 -0
- package/registry/ui/use-media-query.json +12 -0
- package/registry/view.json +1104 -0
- package/registry/widgets.json +319 -0
- package/registry/wizard.json +89 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "wizard",
|
|
3
|
+
"type": "registry:block",
|
|
4
|
+
"files": [
|
|
5
|
+
{
|
|
6
|
+
"path": "patterns/wizard/components/wizard-step-item.tsx",
|
|
7
|
+
"type": "registry:file",
|
|
8
|
+
"content": "'use client'\n\nimport { CheckIcon } from '@phosphor-icons/react'\nimport { IconFrame } from '@tc96/ui/icon-frame'\nimport type { ReactElement } from 'react'\nimport type { WizardStep, WizardStepStatus } from '../core'\nimport {\n wizardStepIndicatorVariants,\n wizardStepTriggerClassName,\n} from '../lib/variants'\n\nexport interface WizardStepItemProps {\n number: number\n onSelect: (value: string) => void\n status: WizardStepStatus\n step: WizardStep\n titleId: string\n}\n\nexport function WizardStepItem({\n number,\n onSelect,\n status,\n step,\n titleId,\n}: Readonly<WizardStepItemProps>): ReactElement {\n const fallbackIcon =\n status === 'complete' ? <CheckIcon aria-hidden=\"true\" /> : number\n\n return (\n <li data-slot=\"wizard-step\" data-status={status}>\n <button\n aria-current={status === 'current' ? 'step' : undefined}\n className={wizardStepTriggerClassName}\n data-slot=\"wizard-step-trigger\"\n disabled={step.disabled}\n onClick={() => onSelect(step.value)}\n type=\"button\"\n >\n <IconFrame\n className={wizardStepIndicatorVariants({ status })}\n data-slot=\"wizard-step-indicator\"\n >\n {step.icon ?? fallbackIcon}\n </IconFrame>\n <span className=\"flex min-w-0 flex-col gap-0.5\">\n <span\n className=\"font-medium text-sm\"\n data-slot=\"wizard-step-title\"\n id={titleId}\n >\n {step.title}\n </span>\n {step.description ? (\n <span\n className=\"text-muted-foreground text-xs\"\n data-slot=\"wizard-step-description\"\n >\n {step.description}\n </span>\n ) : null}\n </span>\n </button>\n </li>\n )\n}\n",
|
|
9
|
+
"target": "~/packages/ui/src/patterns/wizard/components/wizard-step-item.tsx"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"path": "patterns/wizard/composition/index.ts",
|
|
13
|
+
"type": "registry:file",
|
|
14
|
+
"content": "export * from './wizard/index'\nexport * from './wizard-footer/index'\n",
|
|
15
|
+
"target": "~/packages/ui/src/patterns/wizard/composition/index.ts"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"path": "patterns/wizard/composition/wizard-footer/index.ts",
|
|
19
|
+
"type": "registry:file",
|
|
20
|
+
"content": "export { WizardFooter } from './wizard-footer'\nexport { WizardNext } from './wizard-next'\nexport { WizardPrevious } from './wizard-previous'\n",
|
|
21
|
+
"target": "~/packages/ui/src/patterns/wizard/composition/wizard-footer/index.ts"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"path": "patterns/wizard/composition/wizard-footer/wizard-footer.tsx",
|
|
25
|
+
"type": "registry:file",
|
|
26
|
+
"content": "'use client'\n\nimport { cn } from '@tc96/utils'\nimport type { ReactElement } from 'react'\nimport type { WizardFooterProps } from '../../core'\nimport { wizardFooterClassName } from '../../lib/variants'\n\nexport function WizardFooter({\n className,\n ...props\n}: Readonly<WizardFooterProps>): ReactElement {\n return (\n <div\n className={cn(wizardFooterClassName, className)}\n data-slot=\"wizard-footer\"\n {...props}\n />\n )\n}\n",
|
|
27
|
+
"target": "~/packages/ui/src/patterns/wizard/composition/wizard-footer/wizard-footer.tsx"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"path": "patterns/wizard/composition/wizard-footer/wizard-next.tsx",
|
|
31
|
+
"type": "registry:file",
|
|
32
|
+
"content": "'use client'\n\nimport { Button } from '@tc96/ui/button'\nimport type { ReactElement } from 'react'\nimport type { WizardNextProps } from '../../core'\nimport { useWizardContext } from '../../store/wizard-context'\n\nexport function WizardNext({\n disabled,\n onClick,\n ...props\n}: Readonly<WizardNextProps>): ReactElement {\n const { move, next } = useWizardContext('WizardNext')\n\n return (\n <Button\n data-slot=\"wizard-next\"\n disabled={disabled || !next}\n onClick={(event) => {\n onClick?.(event)\n if (!event.defaultPrevented) move(1)\n }}\n {...props}\n />\n )\n}\n",
|
|
33
|
+
"target": "~/packages/ui/src/patterns/wizard/composition/wizard-footer/wizard-next.tsx"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"path": "patterns/wizard/composition/wizard-footer/wizard-previous.tsx",
|
|
37
|
+
"type": "registry:file",
|
|
38
|
+
"content": "'use client'\n\nimport { Button } from '@tc96/ui/button'\nimport type { ReactElement } from 'react'\nimport type { WizardPreviousProps } from '../../core'\nimport { useWizardContext } from '../../store/wizard-context'\n\nexport function WizardPrevious({\n disabled,\n onClick,\n variant = 'secondary',\n ...props\n}: Readonly<WizardPreviousProps>): ReactElement {\n const { move, previous } = useWizardContext('WizardPrevious')\n\n return (\n <Button\n data-slot=\"wizard-previous\"\n disabled={disabled || !previous}\n onClick={(event) => {\n onClick?.(event)\n if (!event.defaultPrevented) move(-1)\n }}\n variant={variant}\n {...props}\n />\n )\n}\n",
|
|
39
|
+
"target": "~/packages/ui/src/patterns/wizard/composition/wizard-footer/wizard-previous.tsx"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"path": "patterns/wizard/composition/wizard/index.ts",
|
|
43
|
+
"type": "registry:file",
|
|
44
|
+
"content": "export { Wizard } from './wizard'\n",
|
|
45
|
+
"target": "~/packages/ui/src/patterns/wizard/composition/wizard/index.ts"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"path": "patterns/wizard/composition/wizard/wizard.tsx",
|
|
49
|
+
"type": "registry:file",
|
|
50
|
+
"content": "'use client'\n\nimport { Card } from '@tc96/ui/card'\nimport { cn } from '@tc96/utils'\nimport { type ReactElement, useEffect, useId, useMemo, useRef } from 'react'\nimport { WizardStepItem } from '../../components/wizard-step-item'\nimport {\n adjacentWizardStep,\n type WizardProps,\n wizardStepStatus,\n} from '../../core'\nimport {\n wizardClassName,\n wizardNavClassName,\n wizardPanelCardClassName,\n wizardPanelClassName,\n wizardShellClassName,\n wizardStepListClassName,\n} from '../../lib/variants'\nimport {\n WizardContext,\n type WizardContextValue,\n} from '../../store/wizard-context'\n\nexport function Wizard({\n children,\n className,\n label,\n onValueChange,\n steps,\n value,\n}: Readonly<WizardProps>): ReactElement {\n const id = useId()\n const panelRef = useRef<HTMLElement>(null)\n const focusPanelOn = useRef<string | undefined>(undefined)\n const renderedValue = useRef(value)\n const currentIndex = steps.findIndex((step) => step.value === value)\n const titleId = (index: number) => `wizard-${id}-step-${index}-title`\n\n useEffect(() => {\n if (renderedValue.current === value) return\n renderedValue.current = value\n const moved = focusPanelOn.current === value\n focusPanelOn.current = undefined\n const focusLost =\n !document.activeElement || document.activeElement === document.body\n if (moved || focusLost) panelRef.current?.focus()\n }, [value])\n\n const context = useMemo<WizardContextValue>(() => {\n const previous = adjacentWizardStep(steps, value, -1)\n const next = adjacentWizardStep(steps, value, 1)\n\n return {\n move: (offset) => {\n const target = offset < 0 ? previous : next\n if (!target) return\n focusPanelOn.current = target.value\n onValueChange(target.value)\n },\n next,\n previous,\n }\n }, [onValueChange, steps, value])\n\n const select = (stepValue: string) => {\n if (stepValue !== value) onValueChange(stepValue)\n }\n\n return (\n <WizardContext.Provider value={context}>\n <div className={cn(wizardClassName, className)} data-slot=\"wizard\">\n <Card className={wizardShellClassName}>\n <nav\n aria-label={label}\n className={wizardNavClassName}\n data-slot=\"wizard-nav\"\n >\n <ol className={wizardStepListClassName}>\n {steps.map((step, index) => (\n <WizardStepItem\n key={step.value}\n number={index + 1}\n onSelect={select}\n status={wizardStepStatus(steps, value, step.value)}\n step={step}\n titleId={titleId(index)}\n />\n ))}\n </ol>\n </nav>\n <Card className={wizardPanelCardClassName}>\n <section\n aria-labelledby={\n currentIndex >= 0 ? titleId(currentIndex) : undefined\n }\n className={wizardPanelClassName}\n data-slot=\"wizard-panel\"\n ref={panelRef}\n tabIndex={-1}\n >\n {children}\n </section>\n </Card>\n </Card>\n </div>\n </WizardContext.Provider>\n )\n}\n",
|
|
51
|
+
"target": "~/packages/ui/src/patterns/wizard/composition/wizard/wizard.tsx"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"path": "patterns/wizard/core.ts",
|
|
55
|
+
"type": "registry:file",
|
|
56
|
+
"content": "import type { ButtonProps } from '@tc96/ui/button'\nimport type { ComponentProps, ReactNode } from 'react'\n\nexport const wizardStepStatuses = ['complete', 'current', 'upcoming'] as const\n\nexport type WizardStepStatus = (typeof wizardStepStatuses)[number]\n\nexport interface WizardStep {\n description?: ReactNode\n disabled?: boolean\n icon?: ReactNode\n title: ReactNode\n value: string\n}\n\nexport interface WizardProps {\n children?: ReactNode\n className?: string\n label: string\n onValueChange: (value: string) => void\n steps: readonly WizardStep[]\n value: string\n}\n\nexport type WizardFooterProps = ComponentProps<'div'>\n\nexport type WizardPreviousProps = ButtonProps\n\nexport type WizardNextProps = ButtonProps\n\nexport function wizardStepStatus(\n steps: readonly WizardStep[],\n value: string,\n stepValue: string,\n): WizardStepStatus {\n const current = steps.findIndex((step) => step.value === value)\n const index = steps.findIndex((step) => step.value === stepValue)\n if (index < 0 || current < 0 || index > current) return 'upcoming'\n return index === current ? 'current' : 'complete'\n}\n\nexport function adjacentWizardStep(\n steps: readonly WizardStep[],\n value: string,\n offset: -1 | 1,\n): WizardStep | undefined {\n const current = steps.findIndex((step) => step.value === value)\n if (current < 0) return undefined\n return steps[current + offset]\n}\n",
|
|
57
|
+
"target": "~/packages/ui/src/patterns/wizard/core.ts"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"path": "patterns/wizard/index.ts",
|
|
61
|
+
"type": "registry:file",
|
|
62
|
+
"content": "export * from './composition/index'\nexport type {\n WizardFooterProps,\n WizardNextProps,\n WizardPreviousProps,\n WizardProps,\n WizardStep,\n WizardStepStatus,\n} from './core'\nexport {\n adjacentWizardStep,\n wizardStepStatus,\n wizardStepStatuses,\n} from './core'\n",
|
|
63
|
+
"target": "~/packages/ui/src/patterns/wizard/index.ts"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"path": "patterns/wizard/lib/variants.ts",
|
|
67
|
+
"type": "registry:file",
|
|
68
|
+
"content": "import { cva } from 'class-variance-authority'\n\nexport const wizardClassName = '@container/wizard min-w-0'\n\nexport const wizardShellClassName =\n 'gap-1 bg-muted p-1 shadow-none [--wizard-shell-radius:var(--card-surface-radius,var(--radius-2xl))] before:hidden dark:bg-sidebar @2xl/wizard:grid @2xl/wizard:grid-cols-[16rem_minmax(0,1fr)]'\n\nexport const wizardNavClassName = 'p-3'\n\nexport const wizardPanelCardClassName =\n 'min-w-0 [--card-radius:calc(var(--wizard-shell-radius)_-_var(--spacing))]'\n\nexport const wizardStepListClassName = 'm-0 flex list-none flex-col gap-1 p-0'\n\nexport const wizardStepTriggerClassName =\n 'flex w-full min-w-0 items-center gap-3 rounded-lg p-2 text-start outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring enabled:hover:bg-accent disabled:cursor-not-allowed'\n\nexport const wizardStepIndicatorVariants = cva(\n 'font-medium text-sm transition-colors',\n {\n defaultVariants: { status: 'upcoming' },\n variants: {\n status: {\n complete: 'bg-primary text-primary-foreground',\n current: 'bg-primary text-primary-foreground ring-4 ring-primary/16',\n upcoming: '',\n },\n },\n },\n)\n\nexport const wizardPanelClassName =\n 'flex min-w-0 flex-1 flex-col gap-6 p-6 outline-none'\n\nexport const wizardFooterClassName =\n 'mt-auto flex flex-wrap items-center justify-between gap-4'\n",
|
|
69
|
+
"target": "~/packages/ui/src/patterns/wizard/lib/variants.ts"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"path": "patterns/wizard/store/wizard-context.ts",
|
|
73
|
+
"type": "registry:file",
|
|
74
|
+
"content": "import { createContext, useContext } from 'react'\nimport type { WizardStep } from '../core'\n\nexport interface WizardContextValue {\n move: (offset: -1 | 1) => void\n next?: WizardStep\n previous?: WizardStep\n}\n\nexport const WizardContext = createContext<WizardContextValue | undefined>(\n undefined,\n)\n\nexport function useWizardContext(component: string): WizardContextValue {\n const context = useContext(WizardContext)\n if (!context) throw new Error(`${component} must be used inside a Wizard.`)\n return context\n}\n",
|
|
75
|
+
"target": "~/packages/ui/src/patterns/wizard/store/wizard-context.ts"
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
"dependencies": [
|
|
79
|
+
"@phosphor-icons/react@2.1.10",
|
|
80
|
+
"class-variance-authority@0.7.1",
|
|
81
|
+
"react@19.1.1"
|
|
82
|
+
],
|
|
83
|
+
"registryDependencies": [
|
|
84
|
+
"@ui/button",
|
|
85
|
+
"@ui/card",
|
|
86
|
+
"@ui/icon-frame"
|
|
87
|
+
],
|
|
88
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json"
|
|
89
|
+
}
|