-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from flip-ui/rework
Rework
- Loading branch information
Showing
91 changed files
with
2,650 additions
and
1,071 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
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 |
---|---|---|
|
@@ -3,8 +3,6 @@ node_modules | |
/build | ||
/.svelte-kit | ||
/package | ||
/.vscode | ||
/img | ||
.env | ||
.env.* | ||
!.env.example | ||
|
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
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
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,14 @@ | ||
{ | ||
"$schema": "https://shadcn-svelte.com/schema.json", | ||
"style": "default", | ||
"tailwind": { | ||
"config": "tailwind.config.ts", | ||
"css": "src/app.css", | ||
"baseColor": "zinc" | ||
}, | ||
"aliases": { | ||
"components": "$lib/components", | ||
"utils": "$lib/utils" | ||
}, | ||
"typescript": true | ||
} |
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
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,4 +1,4 @@ | ||
module.exports = { | ||
export default { | ||
plugins: { | ||
tailwindcss: {}, | ||
autoprefixer: {} | ||
|
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,9 +1,13 @@ | ||
// See https://kit.svelte.dev/docs/types#app | ||
// for information about these interfaces | ||
// and what to do when importing types | ||
declare namespace App { | ||
// interface Locals {} | ||
// interface PageData {} | ||
// interface Error {} | ||
// interface Platform {} | ||
declare global { | ||
namespace App { | ||
// interface Error {} | ||
// interface Locals {} | ||
// interface PageData {} | ||
// interface PageState {} | ||
// interface Platform {} | ||
} | ||
} | ||
|
||
export {}; |
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,12 +1,12 @@ | ||
<!doctype html> | ||
<html lang="en" class="dark"> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<link rel="icon" href="%sveltekit.assets%/favicon.png" /> | ||
<meta name="viewport" content="width=device-width" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
%sveltekit.head% | ||
</head> | ||
<body data-sveltekit-preload-data="hover" data-theme="vintage"> | ||
<div style="display: contents" class="h-full overflow-hidden">%sveltekit.body%</div> | ||
<body data-sveltekit-preload-data="hover"> | ||
<div style="display: contents">%sveltekit.body%</div> | ||
</body> | ||
</html> |
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,109 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
|
||
@layer base { | ||
:root { | ||
--background: 0 0% 100%; | ||
--foreground: 240 10% 3.9%; | ||
|
||
--muted: 240 4.8% 95.9%; | ||
--muted-foreground: 240 3.8% 46.1%; | ||
|
||
--popover: 0 0% 100%; | ||
--popover-foreground: 240 10% 3.9%; | ||
|
||
--card: 0 0% 100%; | ||
--card-foreground: 240 10% 3.9%; | ||
|
||
--border: 240 5.9% 90%; | ||
--input: 240 5.9% 90%; | ||
|
||
--primary: 240 5.9% 10%; | ||
--primary-foreground: 0 0% 98%; | ||
|
||
--secondary: 240 4.8% 95.9%; | ||
--secondary-foreground: 240 5.9% 10%; | ||
|
||
--accent: 240 4.8% 95.9%; | ||
--accent-foreground: 240 5.9% 10%; | ||
|
||
--destructive: 0 72.2% 50.6%; | ||
--destructive-foreground: 0 0% 98%; | ||
|
||
--ring: 240 10% 3.9%; | ||
|
||
--radius: 0.5rem; | ||
} | ||
|
||
.dark { | ||
--background: 240 10% 3.9%; | ||
--foreground: 0 0% 98%; | ||
|
||
--muted: 240 3.7% 15.9%; | ||
--muted-foreground: 240 5% 64.9%; | ||
|
||
--popover: 240 10% 3.9%; | ||
--popover-foreground: 0 0% 98%; | ||
|
||
--card: 240 10% 3.9%; | ||
--card-foreground: 0 0% 98%; | ||
|
||
--border: 240 3.7% 15.9%; | ||
--input: 240 3.7% 15.9%; | ||
|
||
--primary: 0 0% 98%; | ||
--primary-foreground: 240 5.9% 10%; | ||
|
||
--secondary: 240 3.7% 15.9%; | ||
--secondary-foreground: 0 0% 98%; | ||
|
||
--accent: 240 3.7% 15.9%; | ||
--accent-foreground: 0 0% 98%; | ||
|
||
--destructive: 0 62.8% 30.6%; | ||
--destructive-foreground: 0 0% 98%; | ||
|
||
--ring: 240 4.9% 83.9%; | ||
} | ||
} | ||
|
||
@layer base { | ||
html, | ||
body { | ||
@apply h-full overflow-hidden; | ||
} | ||
html { | ||
font-family: pixelify-sans; | ||
} | ||
* { | ||
@apply border-border; | ||
} | ||
body { | ||
@apply !overflow-y-scroll bg-gradient-conic from-amber-900 via-background to-green-950 text-foreground; | ||
} | ||
@font-face { | ||
font-family: 'pixelify-sans'; | ||
src: url('/PixelifySans.ttf') format('truetype'); | ||
font-weight: normal; | ||
font-style: normal; | ||
} | ||
.h1 { | ||
@apply scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl; | ||
} | ||
.h2 { | ||
@apply scroll-m-20 text-3xl font-semibold tracking-tight first:mt-0; | ||
} | ||
.h3 { | ||
@apply scroll-m-20 text-2xl font-semibold tracking-tight; | ||
} | ||
.p { | ||
@apply leading-7 [&:not(:first-child)]:mt-6; | ||
} | ||
.blockquote { | ||
@apply mt-6 border-l-2 pl-6 italic; | ||
} | ||
.code { | ||
@apply relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold; | ||
} | ||
} |
This file was deleted.
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<script lang="ts"> | ||
import type { HTMLAttributes } from 'svelte/elements'; | ||
import { cn } from '$lib/utils.js'; | ||
type $$Props = HTMLAttributes<HTMLDivElement>; | ||
let className: $$Props['class'] = undefined; | ||
export { className as class }; | ||
</script> | ||
|
||
<div class={cn('text-sm [&_p]:leading-relaxed', className)} {...$$restProps}> | ||
<slot /> | ||
</div> |
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,21 @@ | ||
<script lang="ts"> | ||
import type { HTMLAttributes } from 'svelte/elements'; | ||
import type { HeadingLevel } from './index.js'; | ||
import { cn } from '$lib/utils.js'; | ||
type $$Props = HTMLAttributes<HTMLHeadingElement> & { | ||
level?: HeadingLevel; | ||
}; | ||
let className: $$Props['class'] = undefined; | ||
export let level: $$Props['level'] = 'h5'; | ||
export { className as class }; | ||
</script> | ||
|
||
<svelte:element | ||
this={level} | ||
class={cn('mb-1 font-medium leading-none tracking-tight', className)} | ||
{...$$restProps} | ||
> | ||
<slot /> | ||
</svelte:element> |
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,17 @@ | ||
<script lang="ts"> | ||
import type { HTMLAttributes } from 'svelte/elements'; | ||
import { type Variant, alertVariants } from './index.js'; | ||
import { cn } from '$lib/utils.js'; | ||
type $$Props = HTMLAttributes<HTMLDivElement> & { | ||
variant?: Variant; | ||
}; | ||
let className: $$Props['class'] = undefined; | ||
export let variant: $$Props['variant'] = 'default'; | ||
export { className as class }; | ||
</script> | ||
|
||
<div class={cn(alertVariants({ variant }), className)} {...$$restProps} role="alert"> | ||
<slot /> | ||
</div> |
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,33 @@ | ||
import { type VariantProps, tv } from 'tailwind-variants'; | ||
|
||
import Root from './alert.svelte'; | ||
import Description from './alert-description.svelte'; | ||
import Title from './alert-title.svelte'; | ||
|
||
export const alertVariants = tv({ | ||
base: 'relative w-full rounded-lg border p-4 [&:has(svg)]:pl-11 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground', | ||
|
||
variants: { | ||
variant: { | ||
default: 'bg-background text-foreground', | ||
destructive: | ||
'border-destructive/50 text-destructive text-destructive dark:border-destructive [&>svg]:text-destructive' | ||
} | ||
}, | ||
defaultVariants: { | ||
variant: 'default' | ||
} | ||
}); | ||
|
||
export type Variant = VariantProps<typeof alertVariants>['variant']; | ||
export type HeadingLevel = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'; | ||
|
||
export { | ||
Root, | ||
Description, | ||
Title, | ||
// | ||
Root as Alert, | ||
Description as AlertDescription, | ||
Title as AlertTitle | ||
}; |
Oops, something went wrong.