-
Notifications
You must be signed in to change notification settings - Fork 8
feat: Add shadcn config and sidebar #149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ricardozanini
merged 1 commit into
serverlessworkflow:main
from
lornakelly:144/shadcn-sidebar
May 15, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
packages/serverless-workflow-diagram-editor/components.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| { | ||
| "$schema": "https://ui.shadcn.com/schema.json", | ||
| "style": "new-york", | ||
| "rsc": false, | ||
| "tsx": true, | ||
| "tailwind": { | ||
| "config": "", | ||
| "css": "src/components/ui/shadcn.css", | ||
| "baseColor": "zinc", | ||
| "cssVariables": true, | ||
| "prefix": "dec" | ||
| }, | ||
| "aliases": { | ||
| "components": "@/components", | ||
| "ui": "@/components/ui", | ||
| "lib": "@/lib", | ||
| "utils": "@/lib/utils", | ||
| "hooks": "@/hooks" | ||
| }, | ||
| "iconLibrary": "lucide" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78 changes: 78 additions & 0 deletions
78
packages/serverless-workflow-diagram-editor/src/components/ui/button.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| /* | ||
| * Copyright 2021-Present The Serverless Workflow Specification Authors | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| import * as React from "react"; | ||
| import { cva, type VariantProps } from "class-variance-authority"; | ||
| import { Slot } from "radix-ui"; | ||
|
|
||
| import { cn } from "@/lib/utils"; | ||
|
|
||
| const buttonVariants = cva( | ||
| "dec:inline-flex dec:shrink-0 dec:items-center dec:justify-center dec:gap-2 dec:rounded-md dec:text-sm dec:font-medium dec:whitespace-nowrap dec:transition-all dec:outline-none dec:focus-visible:border-ring dec:focus-visible:ring-[3px] dec:focus-visible:ring-ring/50 dec:disabled:pointer-events-none dec:disabled:opacity-50 dec:aria-invalid:border-destructive dec:aria-invalid:ring-destructive/20 dec:dark:aria-invalid:ring-destructive/40 dec:[&_svg]:pointer-events-none dec:[&_svg]:shrink-0 dec:[&_svg:not([class*=size-])]:size-4", | ||
| { | ||
| variants: { | ||
| variant: { | ||
| default: "dec:bg-primary dec:text-primary-foreground dec:hover:bg-primary/90", | ||
| destructive: | ||
| "dec:bg-destructive dec:text-white dec:hover:bg-destructive/90 dec:focus-visible:ring-destructive/20 dec:dark:bg-destructive/60 dec:dark:focus-visible:ring-destructive/40", | ||
| outline: | ||
| "dec:border dec:bg-background dec:shadow-xs dec:hover:bg-accent dec:hover:text-accent-foreground dec:dark:border-input dec:dark:bg-input/30 dec:dark:hover:bg-input/50", | ||
| secondary: "dec:bg-secondary dec:text-secondary-foreground dec:hover:bg-secondary/80", | ||
| ghost: "dec:hover:bg-accent dec:hover:text-accent-foreground dec:dark:hover:bg-accent/50", | ||
| link: "dec:text-primary dec:underline-offset-4 dec:hover:underline", | ||
| }, | ||
| size: { | ||
| default: "dec:h-9 dec:px-4 dec:py-2 dec:has-[>svg]:px-3", | ||
| xs: "dec:h-6 dec:gap-1 dec:rounded-md dec:px-2 dec:text-xs dec:has-[>svg]:px-1.5 dec:[&_svg:not([class*=size-])]:size-3", | ||
| sm: "dec:h-8 dec:gap-1.5 dec:rounded-md dec:px-3 dec:has-[>svg]:px-2.5", | ||
| lg: "dec:h-10 dec:rounded-md dec:px-6 dec:has-[>svg]:px-4", | ||
| icon: "dec:size-9", | ||
| "icon-xs": "dec:size-6 dec:rounded-md dec:[&_svg:not([class*=size-])]:size-3", | ||
| "icon-sm": "dec:size-8", | ||
| "icon-lg": "dec:size-10", | ||
| }, | ||
| }, | ||
| defaultVariants: { | ||
| variant: "default", | ||
| size: "default", | ||
| }, | ||
| }, | ||
| ); | ||
|
|
||
| function Button({ | ||
| className, | ||
| variant = "default", | ||
| size = "default", | ||
| asChild = false, | ||
| ...props | ||
| }: React.ComponentProps<"button"> & | ||
| VariantProps<typeof buttonVariants> & { | ||
| asChild?: boolean; | ||
| }) { | ||
| const Comp = asChild ? Slot.Root : "button"; | ||
|
|
||
| return ( | ||
| <Comp | ||
| data-slot="button" | ||
| data-variant={variant} | ||
| data-size={size} | ||
| className={cn(buttonVariants({ variant, size, className }))} | ||
| {...props} | ||
| /> | ||
| ); | ||
| } | ||
|
|
||
| export { Button, buttonVariants }; |
37 changes: 37 additions & 0 deletions
37
packages/serverless-workflow-diagram-editor/src/components/ui/input.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| /* | ||
| * Copyright 2021-Present The Serverless Workflow Specification Authors | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| import * as React from "react"; | ||
|
|
||
| import { cn } from "@/lib/utils"; | ||
|
|
||
| function Input({ className, type, ...props }: React.ComponentProps<"input">) { | ||
| return ( | ||
| <input | ||
| type={type} | ||
| data-slot="input" | ||
| className={cn( | ||
| "dec:h-9 dec:w-full dec:min-w-0 dec:rounded-md dec:border dec:border-input dec:bg-transparent dec:px-3 dec:py-1 dec:text-base dec:shadow-xs dec:transition-[color,box-shadow] dec:outline-none dec:selection:bg-primary dec:selection:text-primary-foreground dec:file:inline-flex dec:file:h-7 dec:file:border-0 dec:file:bg-transparent dec:file:text-sm dec:file:font-medium dec:file:text-foreground dec:placeholder:text-muted-foreground dec:disabled:pointer-events-none dec:disabled:cursor-not-allowed dec:disabled:opacity-50 dec:md:text-sm dec:dark:bg-input/30", | ||
| "dec:focus-visible:border-ring dec:focus-visible:ring-[3px] dec:focus-visible:ring-ring/50", | ||
| "dec:aria-invalid:border-destructive dec:aria-invalid:ring-destructive/20 dec:dark:aria-invalid:ring-destructive/40", | ||
| className, | ||
| )} | ||
| {...props} | ||
| /> | ||
| ); | ||
| } | ||
|
|
||
| export { Input }; |
42 changes: 42 additions & 0 deletions
42
packages/serverless-workflow-diagram-editor/src/components/ui/separator.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| /* | ||
| * Copyright 2021-Present The Serverless Workflow Specification Authors | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| import * as React from "react"; | ||
| import { Separator as SeparatorPrimitive } from "radix-ui"; | ||
|
|
||
| import { cn } from "@/lib/utils"; | ||
|
|
||
| function Separator({ | ||
| className, | ||
| orientation = "horizontal", | ||
| decorative = true, | ||
| ...props | ||
| }: React.ComponentProps<typeof SeparatorPrimitive.Root>) { | ||
| return ( | ||
| <SeparatorPrimitive.Root | ||
| data-slot="separator" | ||
| decorative={decorative} | ||
| orientation={orientation} | ||
| className={cn( | ||
| "dec:shrink-0 dec:bg-border dec:data-[orientation=horizontal]:h-px dec:data-[orientation=horizontal]:w-full dec:data-[orientation=vertical]:h-full dec:data-[orientation=vertical]:w-px", | ||
| className, | ||
| )} | ||
| {...props} | ||
| /> | ||
| ); | ||
| } | ||
|
|
||
| export { Separator }; |
79 changes: 79 additions & 0 deletions
79
packages/serverless-workflow-diagram-editor/src/components/ui/shadcn.css
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| /* | ||
| * Copyright 2021-Present The Serverless Workflow Specification Authors | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| /* | ||
| shadcn/ui component styles. | ||
|
|
||
| The shadcn CLI (via components.json) points here for CSS variable | ||
| injection. Keep all shadcn-specific CSS in this file so it stays | ||
| isolated from the editor's own global styles in styles.css. | ||
|
|
||
| Imported by styles.css. | ||
| */ | ||
|
|
||
| .dec-root { | ||
| --sidebar: hsl(0 0% 98%); | ||
|
|
||
| --sidebar-foreground: hsl(240 5.3% 26.1%); | ||
|
|
||
| --sidebar-primary: hsl(240 5.9% 10%); | ||
|
|
||
| --sidebar-primary-foreground: hsl(0 0% 98%); | ||
|
|
||
| --sidebar-accent: hsl(240 4.8% 95.9%); | ||
|
|
||
| --sidebar-accent-foreground: hsl(240 5.9% 10%); | ||
|
|
||
| --sidebar-border: hsl(220 13% 91%); | ||
|
|
||
| --sidebar-ring: hsl(217.2 91.2% 59.8%); | ||
| } | ||
|
|
||
| .dec-root.dark { | ||
| --sidebar: #2d3748; | ||
|
|
||
| --sidebar-foreground: hsl(240 4.8% 95.9%); | ||
|
|
||
| --sidebar-primary: hsl(224.3 76.3% 48%); | ||
|
|
||
| --sidebar-primary-foreground: hsl(0 0% 100%); | ||
|
|
||
| --sidebar-accent: #3d4a5c; | ||
|
|
||
| --sidebar-accent-foreground: hsl(240 4.8% 95.9%); | ||
|
|
||
| --sidebar-border: #3d4a5c; | ||
|
|
||
| --sidebar-ring: hsl(217.2 91.2% 59.8%); | ||
| } | ||
|
|
||
| @theme inline { | ||
| --color-sidebar: var(--sidebar); | ||
|
|
||
| --color-sidebar-foreground: var(--sidebar-foreground); | ||
|
|
||
| --color-sidebar-primary: var(--sidebar-primary); | ||
|
|
||
| --color-sidebar-primary-foreground: var(--sidebar-primary-foreground); | ||
|
|
||
| --color-sidebar-accent: var(--sidebar-accent); | ||
|
|
||
| --color-sidebar-accent-foreground: var(--sidebar-accent-foreground); | ||
|
|
||
| --color-sidebar-border: var(--sidebar-border); | ||
|
|
||
| --color-sidebar-ring: var(--sidebar-ring); | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.