-
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added content settings and other minor improvements (#88)
* feat: added command menu * feat: added partial content settings * feat: improved progress bar with real progress * feat: added working of input chips & other minor improvements * feat: completed adding all settings and some other minor improvements
- Loading branch information
1 parent
2641de0
commit f3444cc
Showing
33 changed files
with
913 additions
and
60 deletions.
There are no files selected for viewing
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
@import 'nprogress.css'; | ||
|
||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
|
This file contains 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
23 changes: 23 additions & 0 deletions
23
frontend/src/lib/components/ui/command/command-dialog.svelte
This file contains 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,23 @@ | ||
<script lang="ts"> | ||
import Command from "./command.svelte"; | ||
import * as Dialog from "$lib/components/ui/dialog"; | ||
import type { Dialog as DialogPrimitive } from "bits-ui"; | ||
import type { Command as CommandPrimitive } from "cmdk-sv"; | ||
type $$Props = DialogPrimitive.Props & CommandPrimitive.CommandProps; | ||
export let open: $$Props["open"] = false; | ||
export let value: $$Props["value"] = undefined; | ||
</script> | ||
|
||
<Dialog.Root bind:open {...$$restProps}> | ||
<Dialog.Content class="overflow-hidden p-0 shadow-lg"> | ||
<Command | ||
class="[&_[data-cmdk-group-heading]]:px-2 [&_[data-cmdk-group-heading]]:font-medium [&_[data-cmdk-group-heading]]:text-muted-foreground [&_[data-cmdk-group]:not([hidden])_~[data-cmdk-group]]:pt-0 [&_[data-cmdk-group]]:px-2 [&_[data-cmdk-input-wrapper]_svg]:h-5 [&_[data-cmdk-input-wrapper]_svg]:w-5 [&_[data-cmdk-input]]:h-12 [&_[data-cmdk-item]]:px-2 [&_[data-cmdk-item]]:py-3 [&_[data-cmdk-item]_svg]:h-5 [&_[data-cmdk-item]_svg]:w-5" | ||
{...$$restProps} | ||
bind:value | ||
> | ||
<slot /> | ||
</Command> | ||
</Dialog.Content> | ||
</Dialog.Root> |
15 changes: 15 additions & 0 deletions
15
frontend/src/lib/components/ui/command/command-empty.svelte
This file contains 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,15 @@ | ||
<script lang="ts"> | ||
import { Command as CommandPrimitive } from "cmdk-sv"; | ||
import { cn } from "$lib/utils"; | ||
type $$Props = CommandPrimitive.EmptyProps; | ||
let className: string | undefined | null = undefined; | ||
export { className as class }; | ||
</script> | ||
|
||
<CommandPrimitive.Empty | ||
class={cn("py-6 text-center text-sm", className)} | ||
{...$$restProps} | ||
> | ||
<slot /> | ||
</CommandPrimitive.Empty> |
18 changes: 18 additions & 0 deletions
18
frontend/src/lib/components/ui/command/command-group.svelte
This file contains 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,18 @@ | ||
<script lang="ts"> | ||
import { Command as CommandPrimitive } from "cmdk-sv"; | ||
import { cn } from "$lib/utils"; | ||
type $$Props = CommandPrimitive.GroupProps; | ||
let className: string | undefined | null = undefined; | ||
export { className as class }; | ||
</script> | ||
|
||
<CommandPrimitive.Group | ||
class={cn( | ||
"overflow-hidden p-1 text-foreground [&_[data-cmdk-group-heading]]:px-2 [&_[data-cmdk-group-heading]]:py-1.5 [&_[data-cmdk-group-heading]]:text-xs [&_[data-cmdk-group-heading]]:font-medium [&_[data-cmdk-group-heading]]:text-muted-foreground", | ||
className | ||
)} | ||
{...$$restProps} | ||
> | ||
<slot /> | ||
</CommandPrimitive.Group> |
23 changes: 23 additions & 0 deletions
23
frontend/src/lib/components/ui/command/command-input.svelte
This file contains 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,23 @@ | ||
<script lang="ts"> | ||
import { Command as CommandPrimitive } from "cmdk-sv"; | ||
import { Search } from "lucide-svelte"; | ||
import { cn } from "$lib/utils"; | ||
type $$Props = CommandPrimitive.InputProps; | ||
let className: string | undefined | null = undefined; | ||
export { className as class }; | ||
export let value: string = ""; | ||
</script> | ||
|
||
<div class="flex items-center border-b px-2" data-cmdk-input-wrapper=""> | ||
<Search class="mr-2 h-4 w-4 shrink-0 opacity-50" /> | ||
<CommandPrimitive.Input | ||
class={cn( | ||
"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50", | ||
className | ||
)} | ||
{...$$restProps} | ||
bind:value | ||
/> | ||
</div> |
19 changes: 19 additions & 0 deletions
19
frontend/src/lib/components/ui/command/command-item.svelte
This file contains 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,19 @@ | ||
<script lang="ts"> | ||
import { Command as CommandPrimitive } from "cmdk-sv"; | ||
import { cn } from "$lib/utils"; | ||
type $$Props = CommandPrimitive.ItemProps; | ||
let className: string | undefined | null = undefined; | ||
export { className as class }; | ||
</script> | ||
|
||
<CommandPrimitive.Item | ||
class={cn( | ||
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", | ||
className | ||
)} | ||
{...$$restProps} | ||
> | ||
<slot /> | ||
</CommandPrimitive.Item> |
15 changes: 15 additions & 0 deletions
15
frontend/src/lib/components/ui/command/command-list.svelte
This file contains 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,15 @@ | ||
<script lang="ts"> | ||
import { Command as CommandPrimitive } from "cmdk-sv"; | ||
import { cn } from "$lib/utils"; | ||
type $$Props = CommandPrimitive.ListProps; | ||
let className: string | undefined | null = undefined; | ||
export { className as class }; | ||
</script> | ||
|
||
<CommandPrimitive.List | ||
class={cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className)} | ||
{...$$restProps} | ||
> | ||
<slot /> | ||
</CommandPrimitive.List> |
13 changes: 13 additions & 0 deletions
13
frontend/src/lib/components/ui/command/command-separator.svelte
This file contains 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,13 @@ | ||
<script lang="ts"> | ||
import { Command as CommandPrimitive } from "cmdk-sv"; | ||
import { cn } from "$lib/utils"; | ||
type $$Props = CommandPrimitive.SeparatorProps; | ||
let className: string | undefined | null = undefined; | ||
export { className as class }; | ||
</script> | ||
|
||
<CommandPrimitive.Separator | ||
class={cn("-mx-1 h-px bg-border", className)} | ||
{...$$restProps} | ||
/> |
19 changes: 19 additions & 0 deletions
19
frontend/src/lib/components/ui/command/command-shortcut.svelte
This file contains 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,19 @@ | ||
<script lang="ts"> | ||
import { cn } from "$lib/utils"; | ||
import type { HTMLAttributes } from "svelte/elements"; | ||
type $$Props = HTMLAttributes<HTMLSpanElement>; | ||
let className: string | undefined | null = undefined; | ||
export { className as class }; | ||
</script> | ||
|
||
<span | ||
class={cn( | ||
"ml-auto text-xs tracking-widest text-muted-foreground", | ||
className | ||
)} | ||
{...$$restProps} | ||
> | ||
<slot /> | ||
</span> |
This file contains 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,22 @@ | ||
<script lang="ts"> | ||
import { Command as CommandPrimitive } from "cmdk-sv"; | ||
import { cn } from "$lib/utils"; | ||
type $$Props = CommandPrimitive.CommandProps; | ||
export let value: $$Props["value"] = undefined; | ||
let className: string | undefined | null = undefined; | ||
export { className as class }; | ||
</script> | ||
|
||
<CommandPrimitive.Root | ||
class={cn( | ||
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground", | ||
className | ||
)} | ||
bind:value | ||
{...$$restProps} | ||
> | ||
<slot /> | ||
</CommandPrimitive.Root> |
Oops, something went wrong.