create-auto-app 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +182 -85
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/shopping-app/.context/auto-ia-scheme.json +175 -0
- package/templates/shopping-app/.context/design-system.md +118 -0
- package/templates/shopping-app/.context/figma-variables.json +14448 -0
- package/templates/shopping-app/.context/schema.graphql +46 -0
- package/templates/shopping-app/.context/schema.json +583 -0
- package/templates/shopping-app/.context/shadcn-filter.ts +31 -0
- package/templates/shopping-app/.env +8 -0
- package/templates/shopping-app/auto.config.ts +21 -0
- package/templates/shopping-app/client/auto-configure.ts +107 -0
- package/templates/shopping-app/client/codegen.ts +16 -0
- package/templates/shopping-app/client/components.json +20 -0
- package/templates/shopping-app/client/design-system-principles.md +19 -0
- package/templates/shopping-app/client/eslint.config.ts +57 -0
- package/templates/shopping-app/client/index.html +26 -0
- package/templates/shopping-app/client/package.json +100 -0
- package/templates/shopping-app/client/postcss.config.js +6 -0
- package/templates/shopping-app/client/public/favicon.ico +0 -0
- package/templates/shopping-app/client/schema.graphql +46 -0
- package/templates/shopping-app/client/src/App.css +42 -0
- package/templates/shopping-app/client/src/App.tsx +20 -0
- package/templates/shopping-app/client/src/apolloClient.ts +8 -0
- package/templates/shopping-app/client/src/components/atoms/accordion.tsx +51 -0
- package/templates/shopping-app/client/src/components/atoms/alert-dialog.tsx +111 -0
- package/templates/shopping-app/client/src/components/atoms/alert.tsx +49 -0
- package/templates/shopping-app/client/src/components/atoms/aspect-ratio.tsx +7 -0
- package/templates/shopping-app/client/src/components/atoms/avatar.tsx +32 -0
- package/templates/shopping-app/client/src/components/atoms/badge.tsx +36 -0
- package/templates/shopping-app/client/src/components/atoms/breadcrumb.tsx +92 -0
- package/templates/shopping-app/client/src/components/atoms/button.tsx +50 -0
- package/templates/shopping-app/client/src/components/atoms/calendar.tsx +156 -0
- package/templates/shopping-app/client/src/components/atoms/card.tsx +56 -0
- package/templates/shopping-app/client/src/components/atoms/carousel.tsx +214 -0
- package/templates/shopping-app/client/src/components/atoms/chart.tsx +290 -0
- package/templates/shopping-app/client/src/components/atoms/checkbox.tsx +27 -0
- package/templates/shopping-app/client/src/components/atoms/collapsible.tsx +15 -0
- package/templates/shopping-app/client/src/components/atoms/command.tsx +135 -0
- package/templates/shopping-app/client/src/components/atoms/context-menu.tsx +209 -0
- package/templates/shopping-app/client/src/components/atoms/dialog.tsx +123 -0
- package/templates/shopping-app/client/src/components/atoms/drawer.tsx +106 -0
- package/templates/shopping-app/client/src/components/atoms/dropdown-menu.tsx +217 -0
- package/templates/shopping-app/client/src/components/atoms/hover-card.tsx +36 -0
- package/templates/shopping-app/client/src/components/atoms/input-otp.tsx +66 -0
- package/templates/shopping-app/client/src/components/atoms/input.tsx +21 -0
- package/templates/shopping-app/client/src/components/atoms/label.tsx +19 -0
- package/templates/shopping-app/client/src/components/atoms/logo.tsx +33 -0
- package/templates/shopping-app/client/src/components/atoms/menubar.tsx +234 -0
- package/templates/shopping-app/client/src/components/atoms/navigation-menu.tsx +142 -0
- package/templates/shopping-app/client/src/components/atoms/pagination.tsx +100 -0
- package/templates/shopping-app/client/src/components/atoms/popover.tsx +40 -0
- package/templates/shopping-app/client/src/components/atoms/progress.tsx +22 -0
- package/templates/shopping-app/client/src/components/atoms/radio-group.tsx +31 -0
- package/templates/shopping-app/client/src/components/atoms/resizable.tsx +46 -0
- package/templates/shopping-app/client/src/components/atoms/scroll-area.tsx +46 -0
- package/templates/shopping-app/client/src/components/atoms/select.tsx +158 -0
- package/templates/shopping-app/client/src/components/atoms/separator.tsx +26 -0
- package/templates/shopping-app/client/src/components/atoms/sheet.tsx +101 -0
- package/templates/shopping-app/client/src/components/atoms/sidebar.tsx +675 -0
- package/templates/shopping-app/client/src/components/atoms/skeleton.tsx +7 -0
- package/templates/shopping-app/client/src/components/atoms/slider.tsx +54 -0
- package/templates/shopping-app/client/src/components/atoms/sonner.tsx +23 -0
- package/templates/shopping-app/client/src/components/atoms/switch.tsx +26 -0
- package/templates/shopping-app/client/src/components/atoms/table.tsx +73 -0
- package/templates/shopping-app/client/src/components/atoms/tabs.tsx +40 -0
- package/templates/shopping-app/client/src/components/atoms/textarea.tsx +18 -0
- package/templates/shopping-app/client/src/components/atoms/toggle-group.tsx +65 -0
- package/templates/shopping-app/client/src/components/atoms/toggle.tsx +39 -0
- package/templates/shopping-app/client/src/components/atoms/tooltip.tsx +48 -0
- package/templates/shopping-app/client/src/components/molecules/QuantitySelector.tsx +8 -0
- package/templates/shopping-app/client/src/components/molecules/ShoppingCriteriaForm.tsx +8 -0
- package/templates/shopping-app/client/src/components/molecules/SuggestedItemCard.tsx +10 -0
- package/templates/shopping-app/client/src/components/organisms/AssistantChatInterface.tsx +14 -0
- package/templates/shopping-app/client/src/components/organisms/PageHeader.tsx +6 -0
- package/templates/shopping-app/client/src/components/organisms/SuggestedItemsList.tsx +15 -0
- package/templates/shopping-app/client/src/gql/fragment-masking.ts +48 -0
- package/templates/shopping-app/client/src/gql/gql.ts +47 -0
- package/templates/shopping-app/client/src/gql/graphql.ts +106 -0
- package/templates/shopping-app/client/src/gql/index.ts +2 -0
- package/templates/shopping-app/client/src/graphql/mutations.ts +13 -0
- package/templates/shopping-app/client/src/graphql/queries.ts +14 -0
- package/templates/shopping-app/client/src/hooks/use-mobile.tsx +19 -0
- package/templates/shopping-app/client/src/hooks/use-toast.ts +186 -0
- package/templates/shopping-app/client/src/index.css +153 -0
- package/templates/shopping-app/client/src/lib/utils.ts +6 -0
- package/templates/shopping-app/client/src/main.tsx +5 -0
- package/templates/shopping-app/client/src/mockApolloClient.ts +93 -0
- package/templates/shopping-app/client/src/pages/AssistantChatPage.tsx +8 -0
- package/templates/shopping-app/client/src/pages/Index.tsx +10 -0
- package/templates/shopping-app/client/src/pages/NotFound.tsx +22 -0
- package/templates/shopping-app/client/src/pages/SuggestedItemsPage.tsx +8 -0
- package/templates/shopping-app/client/tailwind.config.ts +92 -0
- package/templates/shopping-app/client/tsconfig.json +49 -0
- package/templates/shopping-app/client/vite.config.ts +17 -0
- package/templates/shopping-app/flows/shopping-assistant.flow.ts +369 -0
- package/templates/shopping-app/package.json +25 -0
- package/templates/shopping-app/pnpm-workspace.yaml +2 -0
- package/templates/shopping-app/server/package.json +25 -0
- package/templates/shopping-app/server/scripts/generate-schema.ts +31 -0
- package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/accepts-items-and-adds-to-their-cart/commands.ts +8 -0
- package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/accepts-items-and-adds-to-their-cart/decide.specs.ts +46 -0
- package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/accepts-items-and-adds-to-their-cart/decide.ts +36 -0
- package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/accepts-items-and-adds-to-their-cart/events.ts +10 -0
- package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/accepts-items-and-adds-to-their-cart/evolve.ts +28 -0
- package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/accepts-items-and-adds-to-their-cart/handle.ts +31 -0
- package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/accepts-items-and-adds-to-their-cart/mutation.resolver.ts +29 -0
- package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/accepts-items-and-adds-to-their-cart/register.ts +10 -0
- package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/accepts-items-and-adds-to-their-cart/state.ts +47 -0
- package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/creates-a-chat-session-/react.specs.ts +63 -0
- package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/creates-a-chat-session-/react.ts +49 -0
- package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/creates-a-chat-session-/register.ts +31 -0
- package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/enters-shopping-criteria-into-assistant/commands.ts +8 -0
- package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/enters-shopping-criteria-into-assistant/decide.specs.ts +38 -0
- package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/enters-shopping-criteria-into-assistant/decide.ts +36 -0
- package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/enters-shopping-criteria-into-assistant/events.ts +10 -0
- package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/enters-shopping-criteria-into-assistant/evolve.ts +28 -0
- package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/enters-shopping-criteria-into-assistant/handle.ts +31 -0
- package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/enters-shopping-criteria-into-assistant/mutation.resolver.ts +30 -0
- package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/enters-shopping-criteria-into-assistant/register.ts +10 -0
- package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/enters-shopping-criteria-into-assistant/state.ts +47 -0
- package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/selects-items-relevant-to-the-shopping-criteria-/commands.ts +8 -0
- package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/selects-items-relevant-to-the-shopping-criteria-/decide.specs.ts +61 -0
- package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/selects-items-relevant-to-the-shopping-criteria-/decide.ts +45 -0
- package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/selects-items-relevant-to-the-shopping-criteria-/events.ts +14 -0
- package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/selects-items-relevant-to-the-shopping-criteria-/evolve.ts +28 -0
- package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/selects-items-relevant-to-the-shopping-criteria-/handle.ts +59 -0
- package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/selects-items-relevant-to-the-shopping-criteria-/mutation.resolver.ts +30 -0
- package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/selects-items-relevant-to-the-shopping-criteria-/register.ts +10 -0
- package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/selects-items-relevant-to-the-shopping-criteria-/state.ts +47 -0
- package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/views-suggested-items/projection.specs.ts +94 -0
- package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/views-suggested-items/projection.ts +40 -0
- package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/views-suggested-items/query.resolver.ts +59 -0
- package/templates/shopping-app/server/src/domain/flows/seasonal-assistant/views-suggested-items/state.ts +9 -0
- package/templates/shopping-app/server/src/domain/shared/ReadModel.d.ts +10 -0
- package/templates/shopping-app/server/src/domain/shared/ReadModel.d.ts.map +1 -0
- package/templates/shopping-app/server/src/domain/shared/ReadModel.js +19 -0
- package/templates/shopping-app/server/src/domain/shared/ReadModel.js.map +1 -0
- package/templates/shopping-app/server/src/domain/shared/ReadModel.ts +26 -0
- package/templates/shopping-app/server/src/domain/shared/index.d.ts +5 -0
- package/templates/shopping-app/server/src/domain/shared/index.d.ts.map +1 -0
- package/templates/shopping-app/server/src/domain/shared/index.js +5 -0
- package/templates/shopping-app/server/src/domain/shared/index.js.map +1 -0
- package/templates/shopping-app/server/src/domain/shared/index.ts +4 -0
- package/templates/shopping-app/server/src/domain/shared/reactorSpecification.d.ts +35 -0
- package/templates/shopping-app/server/src/domain/shared/reactorSpecification.d.ts.map +1 -0
- package/templates/shopping-app/server/src/domain/shared/reactorSpecification.js +155 -0
- package/templates/shopping-app/server/src/domain/shared/reactorSpecification.js.map +1 -0
- package/templates/shopping-app/server/src/domain/shared/reactorSpecification.ts +257 -0
- package/templates/shopping-app/server/src/domain/shared/sendCommand.d.ts +4 -0
- package/templates/shopping-app/server/src/domain/shared/sendCommand.d.ts.map +1 -0
- package/templates/shopping-app/server/src/domain/shared/sendCommand.js +17 -0
- package/templates/shopping-app/server/src/domain/shared/sendCommand.js.map +1 -0
- package/templates/shopping-app/server/src/domain/shared/sendCommand.ts +21 -0
- package/templates/shopping-app/server/src/domain/shared/types.d.ts +19 -0
- package/templates/shopping-app/server/src/domain/shared/types.d.ts.map +1 -0
- package/templates/shopping-app/server/src/domain/shared/types.js +39 -0
- package/templates/shopping-app/server/src/domain/shared/types.js.map +1 -0
- package/templates/shopping-app/server/src/domain/shared/types.ts +31 -0
- package/templates/shopping-app/server/src/integrations/ai-integration.ts +76 -0
- package/templates/shopping-app/server/src/integrations/cart-integration.ts +178 -0
- package/templates/shopping-app/server/src/integrations/index.ts +3 -0
- package/templates/shopping-app/server/src/integrations/product-catalogue-integration.ts +363 -0
- package/templates/shopping-app/server/src/server.ts +43 -0
- package/templates/shopping-app/server/src/utils/index.d.ts +4 -0
- package/templates/shopping-app/server/src/utils/index.d.ts.map +1 -0
- package/templates/shopping-app/server/src/utils/index.js +4 -0
- package/templates/shopping-app/server/src/utils/index.js.map +1 -0
- package/templates/shopping-app/server/src/utils/index.ts +3 -0
- package/templates/shopping-app/server/src/utils/loadProjections.d.ts +3 -0
- package/templates/shopping-app/server/src/utils/loadProjections.d.ts.map +1 -0
- package/templates/shopping-app/server/src/utils/loadProjections.js +23 -0
- package/templates/shopping-app/server/src/utils/loadProjections.js.map +1 -0
- package/templates/shopping-app/server/src/utils/loadProjections.ts +30 -0
- package/templates/shopping-app/server/src/utils/loadRegisterFiles.d.ts +6 -0
- package/templates/shopping-app/server/src/utils/loadRegisterFiles.d.ts.map +1 -0
- package/templates/shopping-app/server/src/utils/loadRegisterFiles.js +28 -0
- package/templates/shopping-app/server/src/utils/loadRegisterFiles.js.map +1 -0
- package/templates/shopping-app/server/src/utils/loadRegisterFiles.ts +41 -0
- package/templates/shopping-app/server/src/utils/loadResolvers.d.ts +5 -0
- package/templates/shopping-app/server/src/utils/loadResolvers.d.ts.map +1 -0
- package/templates/shopping-app/server/src/utils/loadResolvers.js +27 -0
- package/templates/shopping-app/server/src/utils/loadResolvers.js.map +1 -0
- package/templates/shopping-app/server/src/utils/loadResolvers.ts +36 -0
- package/templates/shopping-app/server/tsconfig.json +19 -0
- package/templates/shopping-app/server/vitest.config.ts +7 -0
- package/templates/shopping-app/tsconfig.json +21 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { createFile, templatePropsAIMapper } from '@auto-engineer/react-graphql-generator';
|
|
2
|
+
|
|
3
|
+
const cssVariables = {
|
|
4
|
+
tokens: {
|
|
5
|
+
radius: '0.5rem',
|
|
6
|
+
|
|
7
|
+
background: '',
|
|
8
|
+
foreground: '',
|
|
9
|
+
|
|
10
|
+
card: '',
|
|
11
|
+
'card-foreground': '',
|
|
12
|
+
|
|
13
|
+
popover: '',
|
|
14
|
+
'popover-foreground': '',
|
|
15
|
+
|
|
16
|
+
primary: '',
|
|
17
|
+
'primary-foreground': '',
|
|
18
|
+
|
|
19
|
+
secondary: '',
|
|
20
|
+
'secondary-foreground': '',
|
|
21
|
+
|
|
22
|
+
muted: '',
|
|
23
|
+
'muted-foreground': '',
|
|
24
|
+
|
|
25
|
+
accent: '',
|
|
26
|
+
'accent-foreground': '',
|
|
27
|
+
|
|
28
|
+
destructive: '',
|
|
29
|
+
'destructive-foreground': '',
|
|
30
|
+
|
|
31
|
+
border: '',
|
|
32
|
+
input: '',
|
|
33
|
+
ring: '',
|
|
34
|
+
|
|
35
|
+
'chart-1': '',
|
|
36
|
+
'chart-2': '',
|
|
37
|
+
'chart-3': '',
|
|
38
|
+
'chart-4': '',
|
|
39
|
+
'chart-5': '',
|
|
40
|
+
|
|
41
|
+
sidebar: '',
|
|
42
|
+
'sidebar-foreground': '',
|
|
43
|
+
'sidebar-primary': '',
|
|
44
|
+
'sidebar-primary-foreground': '',
|
|
45
|
+
'sidebar-accent': '',
|
|
46
|
+
'sidebar-accent-foreground': '',
|
|
47
|
+
'sidebar-border': '',
|
|
48
|
+
'sidebar-ring': '',
|
|
49
|
+
},
|
|
50
|
+
darkTokens: {
|
|
51
|
+
background: '',
|
|
52
|
+
foreground: '',
|
|
53
|
+
|
|
54
|
+
card: '',
|
|
55
|
+
'card-foreground': '',
|
|
56
|
+
|
|
57
|
+
popover: '',
|
|
58
|
+
'popover-foreground': '',
|
|
59
|
+
|
|
60
|
+
primary: '',
|
|
61
|
+
'primary-foreground': '',
|
|
62
|
+
|
|
63
|
+
secondary: '',
|
|
64
|
+
'secondary-foreground': '',
|
|
65
|
+
|
|
66
|
+
muted: '',
|
|
67
|
+
'muted-foreground': '',
|
|
68
|
+
|
|
69
|
+
accent: '',
|
|
70
|
+
'accent-foreground': '',
|
|
71
|
+
|
|
72
|
+
destructive: '',
|
|
73
|
+
'destructive-foreground': '',
|
|
74
|
+
|
|
75
|
+
border: '',
|
|
76
|
+
input: '',
|
|
77
|
+
ring: '',
|
|
78
|
+
|
|
79
|
+
sidebar: '',
|
|
80
|
+
'sidebar-foreground': '',
|
|
81
|
+
'sidebar-primary': '',
|
|
82
|
+
'sidebar-primary-foreground': '',
|
|
83
|
+
'sidebar-accent': '',
|
|
84
|
+
'sidebar-accent-foreground': '',
|
|
85
|
+
'sidebar-border': '',
|
|
86
|
+
'sidebar-ring': '',
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
await createFile(
|
|
91
|
+
'index.css.ejs',
|
|
92
|
+
'index.css',
|
|
93
|
+
templatePropsAIMapper('../.context/figma-variables.json', {
|
|
94
|
+
prompt: `
|
|
95
|
+
- Goal: Map Figma variables to strictly named CSS variables provided as input: ${JSON.stringify(cssVariables)}
|
|
96
|
+
- The input will contain a predefined set of CSS variable names.
|
|
97
|
+
- Output format must be:
|
|
98
|
+
{
|
|
99
|
+
"tokens": { ... },
|
|
100
|
+
"tokensDark": { ... }
|
|
101
|
+
}
|
|
102
|
+
- If a variable does not have a dark mode, map the same light mode value to the dark mode.
|
|
103
|
+
- Ensure multi-part values and HSL values are kept exactly as provided.
|
|
104
|
+
- Use zero-like defaults for any missing matches.
|
|
105
|
+
`,
|
|
106
|
+
}),
|
|
107
|
+
);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { CodegenConfig } from '@graphql-codegen/cli';
|
|
2
|
+
|
|
3
|
+
const config: CodegenConfig = {
|
|
4
|
+
overwrite: true,
|
|
5
|
+
schema: './schema.graphql',
|
|
6
|
+
documents: ['src/graphql/**/*.ts', 'src/graphql/**/*.tsx'],
|
|
7
|
+
ignoreNoDocuments: true,
|
|
8
|
+
generates: {
|
|
9
|
+
'src/gql/': {
|
|
10
|
+
preset: 'client',
|
|
11
|
+
plugins: [],
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export default config;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema.json",
|
|
3
|
+
"style": "default",
|
|
4
|
+
"rsc": false,
|
|
5
|
+
"tsx": true,
|
|
6
|
+
"tailwind": {
|
|
7
|
+
"config": "tailwind.config.ts",
|
|
8
|
+
"css": "src/index.css",
|
|
9
|
+
"baseColor": "slate",
|
|
10
|
+
"cssVariables": true,
|
|
11
|
+
"prefix": ""
|
|
12
|
+
},
|
|
13
|
+
"aliases": {
|
|
14
|
+
"components": "@/components",
|
|
15
|
+
"utils": "@/lib/utils",
|
|
16
|
+
"ui": "@/components/ui",
|
|
17
|
+
"lib": "@/lib",
|
|
18
|
+
"hooks": "@/hooks"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Branding & Visual Identity:
|
|
2
|
+
|
|
3
|
+
- You must **infer the branding** (tone, visual identity, personality) directly from the TailwindCSS + shadcn theme in `src/globals.css`.
|
|
4
|
+
- Use the brand's tone and color palette consistently across all components, spacing, interactions, and layout structure.
|
|
5
|
+
- Avoid visual indicators like H1/H2 headings — do not use them to represent concepts or sections.
|
|
6
|
+
- Communicate page hierarchy through layout, spacing, color intensity, and component usage — **not headings**.
|
|
7
|
+
|
|
8
|
+
Design Patterns:
|
|
9
|
+
|
|
10
|
+
- Layouts must be responsive by default.
|
|
11
|
+
- Use a consistent spacing scale: 4 / 8 / 12 / 16 px.
|
|
12
|
+
- Components must reflect brand personality: minimal, bold, playful, formal, etc., as inferred from the theme.
|
|
13
|
+
- Component files should be small and composable.
|
|
14
|
+
|
|
15
|
+
UX Principles:
|
|
16
|
+
|
|
17
|
+
- Do not use visual headers or hero titles to convey page identity.
|
|
18
|
+
- Use dynamic hierarchy expressed through tone, spacing, and primary-color signals.
|
|
19
|
+
- Prefer subtle transitions and clear focus indicators.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import js from '@eslint/js';
|
|
2
|
+
import globals from 'globals';
|
|
3
|
+
import reactHooks from 'eslint-plugin-react-hooks';
|
|
4
|
+
import reactRefresh from 'eslint-plugin-react-refresh';
|
|
5
|
+
import tseslint from 'typescript-eslint';
|
|
6
|
+
import { dirname } from 'path';
|
|
7
|
+
import { fileURLToPath } from 'url';
|
|
8
|
+
|
|
9
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
10
|
+
|
|
11
|
+
export default tseslint.config(
|
|
12
|
+
js.configs.recommended,
|
|
13
|
+
...tseslint.configs.recommended,
|
|
14
|
+
{
|
|
15
|
+
languageOptions: {
|
|
16
|
+
parserOptions: {
|
|
17
|
+
tsconfigRootDir: __dirname,
|
|
18
|
+
project: ['./tsconfig.json'],
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
ignores: ['dist', 'eslint.config.ts', 'postcss.config.js'],
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
files: ['**/*.{ts,tsx}'],
|
|
27
|
+
languageOptions: {
|
|
28
|
+
ecmaVersion: 2020,
|
|
29
|
+
globals: globals.browser,
|
|
30
|
+
parserOptions: {
|
|
31
|
+
project: './tsconfig.json',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
plugins: {
|
|
35
|
+
'react-hooks': reactHooks,
|
|
36
|
+
'react-refresh': reactRefresh,
|
|
37
|
+
},
|
|
38
|
+
rules: {
|
|
39
|
+
...reactHooks.configs.recommended.rules,
|
|
40
|
+
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
|
|
41
|
+
'@typescript-eslint/no-unused-vars': 'off',
|
|
42
|
+
'@typescript-eslint/no-unsafe-assignment': 'off',
|
|
43
|
+
'@typescript-eslint/no-unsafe-call': 'off',
|
|
44
|
+
'@typescript-eslint/no-unsafe-member-access': 'off',
|
|
45
|
+
'@typescript-eslint/no-unsafe-return': 'off',
|
|
46
|
+
'@typescript-eslint/strict-boolean-expressions': 'off',
|
|
47
|
+
'@typescript-eslint/no-floating-promises': 'off',
|
|
48
|
+
'@typescript-eslint/no-misused-promises': 'off',
|
|
49
|
+
'@typescript-eslint/no-implied-eval': 'off',
|
|
50
|
+
'@typescript-eslint/no-unnecessary-type-assertion': 'off',
|
|
51
|
+
'@typescript-eslint/restrict-plus-operands': 'off',
|
|
52
|
+
'@typescript-eslint/restrict-template-expressions': 'off',
|
|
53
|
+
'@typescript-eslint/unbound-method': 'off',
|
|
54
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<title>Auto Starter</title>
|
|
8
|
+
<meta name="description" content="Auto Generated Project" />
|
|
9
|
+
<meta name="author" content="Auto" />
|
|
10
|
+
|
|
11
|
+
<meta property="og:title" content="Auto Starter" />
|
|
12
|
+
<meta property="og:description" content="Auto Generated Project" />
|
|
13
|
+
<meta property="og:type" content="website" />
|
|
14
|
+
<!-- <meta property="og:image" content="https://on.auto/opengraph-image-p98pqg.png" /> -->
|
|
15
|
+
|
|
16
|
+
<meta name="twitter:card" content="summary_large_image" />
|
|
17
|
+
<meta name="twitter:site" content="@beonauto" />
|
|
18
|
+
<meta name="twitter:image" content="https://on.auto/opengraph-image-p98pqg.png" />
|
|
19
|
+
</head>
|
|
20
|
+
|
|
21
|
+
<body>
|
|
22
|
+
<div id="root"></div>
|
|
23
|
+
<script type="module" src="/src/main.tsx"></script>
|
|
24
|
+
</body>
|
|
25
|
+
|
|
26
|
+
</html>
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@examples/react-graphql-shadcn-starter",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "0.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite",
|
|
8
|
+
"start": "vite",
|
|
9
|
+
"build": "vite build",
|
|
10
|
+
"build:dev": "vite build --mode development",
|
|
11
|
+
"lint": "eslint .",
|
|
12
|
+
"preview": "vite preview",
|
|
13
|
+
"codegen": "graphql-codegen --config codegen.ts",
|
|
14
|
+
"format": "prettier --write \"**/*.{js,ts,json,md,yml,yaml}\" --ignore-path ../../../.prettierignore",
|
|
15
|
+
"type:check": "tsc --noEmit",
|
|
16
|
+
"type-check": "tsc --noEmit",
|
|
17
|
+
"lint:fix": "eslint .",
|
|
18
|
+
"format:fix": "prettier --write \"**/*.{js,ts,json,md,yml,yaml}\" --ignore-path ../../../.prettierignore",
|
|
19
|
+
"auto-configure": "tsx auto-configure.ts"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@apollo/client": "^3.13.8",
|
|
23
|
+
"@auto-engineer/ai-gateway": "^0.4.2",
|
|
24
|
+
"@auto-engineer/react-graphql-generator": "^0.3.0",
|
|
25
|
+
"@hookform/resolvers": "^3.10.0",
|
|
26
|
+
"@radix-ui/react-accordion": "^1.2.11",
|
|
27
|
+
"@radix-ui/react-alert-dialog": "^1.1.14",
|
|
28
|
+
"@radix-ui/react-aspect-ratio": "^1.1.7",
|
|
29
|
+
"@radix-ui/react-avatar": "^1.1.10",
|
|
30
|
+
"@radix-ui/react-checkbox": "^1.3.2",
|
|
31
|
+
"@radix-ui/react-collapsible": "^1.1.11",
|
|
32
|
+
"@radix-ui/react-context-menu": "^2.2.15",
|
|
33
|
+
"@radix-ui/react-dialog": "^1.1.14",
|
|
34
|
+
"@radix-ui/react-dropdown-menu": "^2.1.15",
|
|
35
|
+
"@radix-ui/react-hover-card": "^1.1.14",
|
|
36
|
+
"@radix-ui/react-label": "^2.1.7",
|
|
37
|
+
"@radix-ui/react-menubar": "^1.1.15",
|
|
38
|
+
"@radix-ui/react-navigation-menu": "^1.2.13",
|
|
39
|
+
"@radix-ui/react-popover": "^1.1.14",
|
|
40
|
+
"@radix-ui/react-progress": "^1.1.7",
|
|
41
|
+
"@radix-ui/react-radio-group": "^1.3.7",
|
|
42
|
+
"@radix-ui/react-scroll-area": "^1.2.9",
|
|
43
|
+
"@radix-ui/react-select": "^2.2.5",
|
|
44
|
+
"@radix-ui/react-separator": "^1.1.7",
|
|
45
|
+
"@radix-ui/react-slider": "^1.3.5",
|
|
46
|
+
"@radix-ui/react-slot": "^1.2.3",
|
|
47
|
+
"@radix-ui/react-switch": "^1.2.5",
|
|
48
|
+
"@radix-ui/react-tabs": "^1.1.12",
|
|
49
|
+
"@radix-ui/react-toast": "^1.2.14",
|
|
50
|
+
"@radix-ui/react-toggle": "^1.1.9",
|
|
51
|
+
"@radix-ui/react-toggle-group": "^1.1.10",
|
|
52
|
+
"@radix-ui/react-tooltip": "^1.2.7",
|
|
53
|
+
"@tanstack/react-query": "^5.56.2",
|
|
54
|
+
"class-variance-authority": "^0.7.1",
|
|
55
|
+
"clsx": "^2.1.1",
|
|
56
|
+
"cmdk": "^1.1.1",
|
|
57
|
+
"commander": "^14.0.0",
|
|
58
|
+
"date-fns": "^3.6.0",
|
|
59
|
+
"dev": "^0.1.3",
|
|
60
|
+
"ejs": "^3.1.10",
|
|
61
|
+
"embla-carousel-react": "^8.6.0",
|
|
62
|
+
"graphql": "16.8.1",
|
|
63
|
+
"input-otp": "^1.4.2",
|
|
64
|
+
"lucide-react": "^0.462.0",
|
|
65
|
+
"next-themes": "^0.3.0",
|
|
66
|
+
"react": "^18.3.1",
|
|
67
|
+
"react-day-picker": "^9.7.0",
|
|
68
|
+
"react-dom": "^18.3.1",
|
|
69
|
+
"react-hook-form": "^7.57.0",
|
|
70
|
+
"react-resizable-panels": "^2.1.9",
|
|
71
|
+
"react-router-dom": "^6.26.2",
|
|
72
|
+
"recharts": "^2.15.3",
|
|
73
|
+
"sonner": "^1.7.4",
|
|
74
|
+
"tailwind-merge": "^2.5.2",
|
|
75
|
+
"tailwindcss-animate": "^1.0.7",
|
|
76
|
+
"vaul": "^0.9.9",
|
|
77
|
+
"zod": "^3.25.63"
|
|
78
|
+
},
|
|
79
|
+
"devDependencies": {
|
|
80
|
+
"@eslint/js": "^9.9.0",
|
|
81
|
+
"@graphql-codegen/cli": "3.2.0",
|
|
82
|
+
"@graphql-codegen/client-preset": "2.1.0",
|
|
83
|
+
"@graphql-typed-document-node/core": "^3.2.0",
|
|
84
|
+
"@tailwindcss/typography": "^0.5.15",
|
|
85
|
+
"@types/node": "^22.16.5",
|
|
86
|
+
"@types/react": "^18.3.23",
|
|
87
|
+
"@types/react-dom": "^18.3.7",
|
|
88
|
+
"@vitejs/plugin-react": "^4.7.0",
|
|
89
|
+
"autoprefixer": "^10.4.20",
|
|
90
|
+
"eslint": "^9.9.0",
|
|
91
|
+
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
|
|
92
|
+
"eslint-plugin-react-refresh": "^0.4.9",
|
|
93
|
+
"globals": "^15.9.0",
|
|
94
|
+
"postcss": "^8.4.47",
|
|
95
|
+
"tailwindcss": "^3.4.11",
|
|
96
|
+
"typescript": "^5.4.5",
|
|
97
|
+
"typescript-eslint": "^8.0.1",
|
|
98
|
+
"vite": "^5.4.1"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
type Query {
|
|
2
|
+
suggestedItems(sessionId: ID): [SuggestedItems!]!
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
type SuggestedItems {
|
|
6
|
+
sessionId: String!
|
|
7
|
+
items: [SuggestedItemsItems!]!
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
type SuggestedItemsItems {
|
|
11
|
+
productId: String!
|
|
12
|
+
name: String!
|
|
13
|
+
quantity: Float!
|
|
14
|
+
reason: String!
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
type Mutation {
|
|
18
|
+
suggestShoppingItems(input: SuggestShoppingItemsInput!): MutationResponse!
|
|
19
|
+
enterShoppingCriteria(input: EnterShoppingCriteriaInput!): MutationResponse!
|
|
20
|
+
addItemsToCart(input: AddItemsToCartInput!): MutationResponse!
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
type MutationResponse {
|
|
24
|
+
success: Boolean!
|
|
25
|
+
error: MutationError
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
type MutationError {
|
|
29
|
+
type: String!
|
|
30
|
+
message: String
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
input SuggestShoppingItemsInput {
|
|
34
|
+
sessionId: String!
|
|
35
|
+
prompt: String!
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
input EnterShoppingCriteriaInput {
|
|
39
|
+
sessionId: String!
|
|
40
|
+
criteria: String!
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
input AddItemsToCartInput {
|
|
44
|
+
sessionId: String!
|
|
45
|
+
items: String!
|
|
46
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
#root {
|
|
2
|
+
max-width: 1280px;
|
|
3
|
+
margin: 0 auto;
|
|
4
|
+
padding: 2rem;
|
|
5
|
+
text-align: center;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.logo {
|
|
9
|
+
height: 6em;
|
|
10
|
+
padding: 1.5em;
|
|
11
|
+
will-change: filter;
|
|
12
|
+
transition: filter 300ms;
|
|
13
|
+
}
|
|
14
|
+
.logo:hover {
|
|
15
|
+
filter: drop-shadow(0 0 2em #646cffaa);
|
|
16
|
+
}
|
|
17
|
+
.logo.react:hover {
|
|
18
|
+
filter: drop-shadow(0 0 2em #61dafbaa);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@keyframes logo-spin {
|
|
22
|
+
from {
|
|
23
|
+
transform: rotate(0deg);
|
|
24
|
+
}
|
|
25
|
+
to {
|
|
26
|
+
transform: rotate(360deg);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
31
|
+
a:nth-of-type(2) .logo {
|
|
32
|
+
animation: logo-spin infinite 20s linear;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.card {
|
|
37
|
+
padding: 2em;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.read-the-docs {
|
|
41
|
+
color: #888;
|
|
42
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ApolloProvider } from '@apollo/client';
|
|
2
|
+
import { BrowserRouter, Route, Routes } from 'react-router-dom';
|
|
3
|
+
import { apolloClient } from '@/apolloClient';
|
|
4
|
+
import { Index } from '@/pages/Index';
|
|
5
|
+
import { NotFound } from '@/pages/NotFound';
|
|
6
|
+
import { AssistantChatPage } from '@/pages/AssistantChatPage';
|
|
7
|
+
import { SuggestedItemsPage } from '@/pages/SuggestedItemsPage';
|
|
8
|
+
|
|
9
|
+
export const App = () => (
|
|
10
|
+
<ApolloProvider client={apolloClient}>
|
|
11
|
+
<BrowserRouter>
|
|
12
|
+
<Routes>
|
|
13
|
+
<Route path="/" element={<Index />} />
|
|
14
|
+
<Route path="/" element={<AssistantChatPage />} />
|
|
15
|
+
<Route path="/suggested-items/:sessionId" element={<SuggestedItemsPage />} />
|
|
16
|
+
<Route path="*" element={<NotFound />} />
|
|
17
|
+
</Routes>
|
|
18
|
+
</BrowserRouter>
|
|
19
|
+
</ApolloProvider>
|
|
20
|
+
);
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
3
|
+
import { ChevronDownIcon } from 'lucide-react';
|
|
4
|
+
|
|
5
|
+
import { cn } from '../../lib/utils';
|
|
6
|
+
|
|
7
|
+
function Accordion({ ...props }: React.ComponentProps<typeof AccordionPrimitive.Root>) {
|
|
8
|
+
return <AccordionPrimitive.Root data-slot="accordion" {...props} />;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function AccordionItem({ className, ...props }: React.ComponentProps<typeof AccordionPrimitive.Item>) {
|
|
12
|
+
return (
|
|
13
|
+
<AccordionPrimitive.Item
|
|
14
|
+
data-slot="accordion-item"
|
|
15
|
+
className={cn('border-b last:border-b-0', className)}
|
|
16
|
+
{...props}
|
|
17
|
+
/>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function AccordionTrigger({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Trigger>) {
|
|
22
|
+
return (
|
|
23
|
+
<AccordionPrimitive.Header className="flex">
|
|
24
|
+
<AccordionPrimitive.Trigger
|
|
25
|
+
data-slot="accordion-trigger"
|
|
26
|
+
className={cn(
|
|
27
|
+
'focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180',
|
|
28
|
+
className,
|
|
29
|
+
)}
|
|
30
|
+
{...props}
|
|
31
|
+
>
|
|
32
|
+
{children}
|
|
33
|
+
<ChevronDownIcon className="text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" />
|
|
34
|
+
</AccordionPrimitive.Trigger>
|
|
35
|
+
</AccordionPrimitive.Header>
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function AccordionContent({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Content>) {
|
|
40
|
+
return (
|
|
41
|
+
<AccordionPrimitive.Content
|
|
42
|
+
data-slot="accordion-content"
|
|
43
|
+
className="data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm"
|
|
44
|
+
{...props}
|
|
45
|
+
>
|
|
46
|
+
<div className={cn('pt-0 pb-4', className)}>{children}</div>
|
|
47
|
+
</AccordionPrimitive.Content>
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
3
|
+
|
|
4
|
+
import { cn } from '../../lib/utils';
|
|
5
|
+
import { buttonVariants } from './button';
|
|
6
|
+
|
|
7
|
+
function AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {
|
|
8
|
+
return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props} />;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function AlertDialogTrigger({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {
|
|
12
|
+
return <AlertDialogPrimitive.Trigger data-slot="alert-dialog-trigger" {...props} />;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {
|
|
16
|
+
return <AlertDialogPrimitive.Portal data-slot="alert-dialog-portal" {...props} />;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function AlertDialogOverlay({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {
|
|
20
|
+
return (
|
|
21
|
+
<AlertDialogPrimitive.Overlay
|
|
22
|
+
data-slot="alert-dialog-overlay"
|
|
23
|
+
className={cn(
|
|
24
|
+
'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50',
|
|
25
|
+
className,
|
|
26
|
+
)}
|
|
27
|
+
{...props}
|
|
28
|
+
/>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function AlertDialogContent({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Content>) {
|
|
33
|
+
return (
|
|
34
|
+
<AlertDialogPortal>
|
|
35
|
+
<AlertDialogOverlay />
|
|
36
|
+
<AlertDialogPrimitive.Content
|
|
37
|
+
data-slot="alert-dialog-content"
|
|
38
|
+
className={cn(
|
|
39
|
+
'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg',
|
|
40
|
+
className,
|
|
41
|
+
)}
|
|
42
|
+
{...props}
|
|
43
|
+
/>
|
|
44
|
+
</AlertDialogPortal>
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function AlertDialogHeader({ className, ...props }: React.ComponentProps<'div'>) {
|
|
49
|
+
return (
|
|
50
|
+
<div
|
|
51
|
+
data-slot="alert-dialog-header"
|
|
52
|
+
className={cn('flex flex-col gap-2 text-center sm:text-left', className)}
|
|
53
|
+
{...props}
|
|
54
|
+
/>
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function AlertDialogFooter({ className, ...props }: React.ComponentProps<'div'>) {
|
|
59
|
+
return (
|
|
60
|
+
<div
|
|
61
|
+
data-slot="alert-dialog-footer"
|
|
62
|
+
className={cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', className)}
|
|
63
|
+
{...props}
|
|
64
|
+
/>
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {
|
|
69
|
+
return (
|
|
70
|
+
<AlertDialogPrimitive.Title
|
|
71
|
+
data-slot="alert-dialog-title"
|
|
72
|
+
className={cn('text-lg font-semibold', className)}
|
|
73
|
+
{...props}
|
|
74
|
+
/>
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function AlertDialogDescription({
|
|
79
|
+
className,
|
|
80
|
+
...props
|
|
81
|
+
}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {
|
|
82
|
+
return (
|
|
83
|
+
<AlertDialogPrimitive.Description
|
|
84
|
+
data-slot="alert-dialog-description"
|
|
85
|
+
className={cn('text-muted-foreground text-sm', className)}
|
|
86
|
+
{...props}
|
|
87
|
+
/>
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function AlertDialogAction({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Action>) {
|
|
92
|
+
return <AlertDialogPrimitive.Action className={cn(buttonVariants(), className)} {...props} />;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function AlertDialogCancel({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>) {
|
|
96
|
+
return <AlertDialogPrimitive.Cancel className={cn(buttonVariants({ variant: 'outline' }), className)} {...props} />;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export {
|
|
100
|
+
AlertDialog,
|
|
101
|
+
AlertDialogPortal,
|
|
102
|
+
AlertDialogOverlay,
|
|
103
|
+
AlertDialogTrigger,
|
|
104
|
+
AlertDialogContent,
|
|
105
|
+
AlertDialogHeader,
|
|
106
|
+
AlertDialogFooter,
|
|
107
|
+
AlertDialogTitle,
|
|
108
|
+
AlertDialogDescription,
|
|
109
|
+
AlertDialogAction,
|
|
110
|
+
AlertDialogCancel,
|
|
111
|
+
};
|