diff --git a/.oxlintrc.json b/.oxlintrc.json index 56bc2c7..5957e03 100644 --- a/.oxlintrc.json +++ b/.oxlintrc.json @@ -1,135 +1,135 @@ { - "$schema": "./node_modules/oxlint/configuration_schema.json", - "plugins": ["typescript", "unicorn"], - "categories": { - "correctness": "off" - }, - "env": { - "builtin": true, - "browser": true, - "commonjs": true, - "node": true, - "shared-node-browser": true - }, - "rules": { - "for-direction": "error", - "no-async-promise-executor": "error", - "no-case-declarations": "error", - "no-class-assign": "error", - "no-compare-neg-zero": "error", - "no-cond-assign": "error", - "no-const-assign": "error", - "no-constant-binary-expression": "error", - "no-constant-condition": "error", - "no-control-regex": "error", - "no-debugger": "error", - "no-delete-var": "error", - "no-dupe-class-members": "error", - "no-dupe-else-if": "error", - "no-dupe-keys": "error", - "no-duplicate-case": "error", - "no-empty": "error", - "no-empty-character-class": "error", - "no-empty-pattern": "error", - "no-empty-static-block": "error", - "no-ex-assign": "error", - "no-extra-boolean-cast": "error", - "no-fallthrough": "error", - "no-func-assign": "error", - "no-global-assign": "error", - "no-import-assign": "error", - "no-invalid-regexp": "error", - "no-irregular-whitespace": "error", - "no-loss-of-precision": "error", - "no-new-native-nonconstructor": "error", - "no-nonoctal-decimal-escape": "error", - "no-obj-calls": "error", - "no-prototype-builtins": "error", - "no-redeclare": "error", - "no-regex-spaces": "error", - "no-self-assign": "error", - "no-setter-return": "error", - "no-shadow-restricted-names": "error", - "no-sparse-arrays": "error", - "no-this-before-super": "error", - "no-unexpected-multiline": "off", - "no-unsafe-finally": "error", - "no-unsafe-negation": "error", - "no-unsafe-optional-chaining": "error", - "no-unused-labels": "error", - "no-unused-private-class-members": "error", - "no-unused-vars": "error", - "no-useless-backreference": "error", - "no-useless-catch": "error", - "no-useless-escape": "error", - "no-with": "error", - "require-yield": "error", - "use-isnan": "error", - "valid-typeof": "error", - "@typescript-eslint/ban-ts-comment": "error", - "no-array-constructor": "error", - "@typescript-eslint/no-duplicate-enum-values": "error", - "@typescript-eslint/no-empty-object-type": "error", - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/no-extra-non-null-assertion": "error", - "@typescript-eslint/no-misused-new": "error", - "@typescript-eslint/no-namespace": "error", - "@typescript-eslint/no-non-null-asserted-optional-chain": "error", - "@typescript-eslint/no-require-imports": "error", - "@typescript-eslint/no-this-alias": "error", - "@typescript-eslint/no-unnecessary-type-constraint": "error", - "@typescript-eslint/no-unsafe-declaration-merging": "error", - "@typescript-eslint/no-unsafe-function-type": "error", - "no-unused-expressions": "error", - "@typescript-eslint/no-wrapper-object-types": "error", - "@typescript-eslint/prefer-as-const": "error", - "@typescript-eslint/prefer-namespace-keyword": "error", - "@typescript-eslint/triple-slash-reference": "error", - "curly": "off", - "unicorn/empty-brace-spaces": "off", - "unicorn/no-nested-ternary": "off", - "unicorn/number-literal-case": "off" - }, - "globals": { - "route": "readonly", - "Laravel": "readonly" - }, - "ignorePatterns": [ - "vendor", - "node_modules", - "public", - "bootstrap/ssr", - "tailwind.config.js", - "resources/js/components/ui/*" - ], - "overrides": [ - { - "files": ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts"], - "rules": { - "no-class-assign": "off", - "no-const-assign": "off", - "no-dupe-class-members": "off", - "no-dupe-keys": "off", - "no-func-assign": "off", - "no-import-assign": "off", - "no-new-native-nonconstructor": "off", - "no-obj-calls": "off", - "no-redeclare": "off", - "no-setter-return": "off", - "no-this-before-super": "off", - "no-unsafe-negation": "off", - "no-var": "error", - "no-with": "off", - "prefer-rest-params": "error", - "prefer-spread": "error" - } - }, - { - "files": ["*.svelte", "**/*.svelte"], - "rules": { - "no-inner-declarations": "off", - "no-self-assign": "off" - } - } - ] + "$schema": "./node_modules/oxlint/configuration_schema.json", + "plugins": ["typescript", "unicorn"], + "categories": { + "correctness": "off" + }, + "env": { + "builtin": true, + "browser": true, + "commonjs": true, + "node": true, + "shared-node-browser": true + }, + "rules": { + "for-direction": "error", + "no-async-promise-executor": "error", + "no-case-declarations": "error", + "no-class-assign": "error", + "no-compare-neg-zero": "error", + "no-cond-assign": "error", + "no-const-assign": "error", + "no-constant-binary-expression": "error", + "no-constant-condition": "error", + "no-control-regex": "error", + "no-debugger": "error", + "no-delete-var": "error", + "no-dupe-class-members": "error", + "no-dupe-else-if": "error", + "no-dupe-keys": "error", + "no-duplicate-case": "error", + "no-empty": "error", + "no-empty-character-class": "error", + "no-empty-pattern": "error", + "no-empty-static-block": "error", + "no-ex-assign": "error", + "no-extra-boolean-cast": "error", + "no-fallthrough": "error", + "no-func-assign": "error", + "no-global-assign": "error", + "no-import-assign": "error", + "no-invalid-regexp": "error", + "no-irregular-whitespace": "error", + "no-loss-of-precision": "error", + "no-new-native-nonconstructor": "error", + "no-nonoctal-decimal-escape": "error", + "no-obj-calls": "error", + "no-prototype-builtins": "error", + "no-redeclare": "error", + "no-regex-spaces": "error", + "no-self-assign": "error", + "no-setter-return": "error", + "no-shadow-restricted-names": "error", + "no-sparse-arrays": "error", + "no-this-before-super": "error", + "no-unexpected-multiline": "off", + "no-unsafe-finally": "error", + "no-unsafe-negation": "error", + "no-unsafe-optional-chaining": "error", + "no-unused-labels": "error", + "no-unused-private-class-members": "error", + "no-unused-vars": "error", + "no-useless-backreference": "error", + "no-useless-catch": "error", + "no-useless-escape": "error", + "no-with": "error", + "require-yield": "error", + "use-isnan": "error", + "valid-typeof": "error", + "@typescript-eslint/ban-ts-comment": "error", + "no-array-constructor": "error", + "@typescript-eslint/no-duplicate-enum-values": "error", + "@typescript-eslint/no-empty-object-type": "error", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-extra-non-null-assertion": "error", + "@typescript-eslint/no-misused-new": "error", + "@typescript-eslint/no-namespace": "error", + "@typescript-eslint/no-non-null-asserted-optional-chain": "error", + "@typescript-eslint/no-require-imports": "error", + "@typescript-eslint/no-this-alias": "error", + "@typescript-eslint/no-unnecessary-type-constraint": "error", + "@typescript-eslint/no-unsafe-declaration-merging": "error", + "@typescript-eslint/no-unsafe-function-type": "error", + "no-unused-expressions": "error", + "@typescript-eslint/no-wrapper-object-types": "error", + "@typescript-eslint/prefer-as-const": "error", + "@typescript-eslint/prefer-namespace-keyword": "error", + "@typescript-eslint/triple-slash-reference": "error", + "curly": "off", + "unicorn/empty-brace-spaces": "off", + "unicorn/no-nested-ternary": "off", + "unicorn/number-literal-case": "off" + }, + "globals": { + "route": "readonly", + "Laravel": "readonly" + }, + "ignorePatterns": [ + "vendor", + "node_modules", + "public", + "bootstrap/ssr", + "tailwind.config.js", + "resources/js/components/ui/*" + ], + "overrides": [ + { + "files": ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts"], + "rules": { + "no-class-assign": "off", + "no-const-assign": "off", + "no-dupe-class-members": "off", + "no-dupe-keys": "off", + "no-func-assign": "off", + "no-import-assign": "off", + "no-new-native-nonconstructor": "off", + "no-obj-calls": "off", + "no-redeclare": "off", + "no-setter-return": "off", + "no-this-before-super": "off", + "no-unsafe-negation": "off", + "no-var": "error", + "no-with": "off", + "prefer-rest-params": "error", + "prefer-spread": "error" + } + }, + { + "files": ["*.svelte", "**/*.svelte"], + "rules": { + "no-inner-declarations": "off", + "no-self-assign": "off" + } + } + ] } diff --git a/docker-compose.yml b/docker-compose.yml index 5ec5392..e611e22 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,7 @@ services: image: postgres restart: always ports: - - 5432:5432 + - 127.0.0.1:1234:5432 environment: POSTGRES_USER: root POSTGRES_PASSWORD: mysecretpassword diff --git a/src/app.css b/src/app.css index e48f5f0..b37c9b3 100644 --- a/src/app.css +++ b/src/app.css @@ -1,121 +1,121 @@ -@import "tailwindcss"; +@import 'tailwindcss'; -@import "tw-animate-css"; +@import 'tw-animate-css'; @custom-variant dark (&:is(.dark *)); :root { - --radius: 0.625rem; - --background: oklch(1 0 0); - --foreground: oklch(0.129 0.042 264.695); - --card: oklch(1 0 0); - --card-foreground: oklch(0.129 0.042 264.695); - --popover: oklch(1 0 0); - --popover-foreground: oklch(0.129 0.042 264.695); - --primary: oklch(0.208 0.042 265.755); - --primary-foreground: oklch(0.984 0.003 247.858); - --secondary: oklch(0.968 0.007 247.896); - --secondary-foreground: oklch(0.208 0.042 265.755); - --muted: oklch(0.968 0.007 247.896); - --muted-foreground: oklch(0.554 0.046 257.417); - --accent: oklch(0.968 0.007 247.896); - --accent-foreground: oklch(0.208 0.042 265.755); - --destructive: oklch(0.577 0.245 27.325); - --border: oklch(0.929 0.013 255.508); - --input: oklch(0.929 0.013 255.508); - --ring: oklch(0.704 0.04 256.788); - --chart-1: oklch(0.646 0.222 41.116); - --chart-2: oklch(0.6 0.118 184.704); - --chart-3: oklch(0.398 0.07 227.392); - --chart-4: oklch(0.828 0.189 84.429); - --chart-5: oklch(0.769 0.188 70.08); - --sidebar: oklch(0.984 0.003 247.858); - --sidebar-foreground: oklch(0.129 0.042 264.695); - --sidebar-primary: oklch(0.208 0.042 265.755); - --sidebar-primary-foreground: oklch(0.984 0.003 247.858); - --sidebar-accent: oklch(0.968 0.007 247.896); - --sidebar-accent-foreground: oklch(0.208 0.042 265.755); - --sidebar-border: oklch(0.929 0.013 255.508); - --sidebar-ring: oklch(0.704 0.04 256.788); + --radius: 0.625rem; + --background: oklch(1 0 0); + --foreground: oklch(0.129 0.042 264.695); + --card: oklch(1 0 0); + --card-foreground: oklch(0.129 0.042 264.695); + --popover: oklch(1 0 0); + --popover-foreground: oklch(0.129 0.042 264.695); + --primary: oklch(0.208 0.042 265.755); + --primary-foreground: oklch(0.984 0.003 247.858); + --secondary: oklch(0.968 0.007 247.896); + --secondary-foreground: oklch(0.208 0.042 265.755); + --muted: oklch(0.968 0.007 247.896); + --muted-foreground: oklch(0.554 0.046 257.417); + --accent: oklch(0.968 0.007 247.896); + --accent-foreground: oklch(0.208 0.042 265.755); + --destructive: oklch(0.577 0.245 27.325); + --border: oklch(0.929 0.013 255.508); + --input: oklch(0.929 0.013 255.508); + --ring: oklch(0.704 0.04 256.788); + --chart-1: oklch(0.646 0.222 41.116); + --chart-2: oklch(0.6 0.118 184.704); + --chart-3: oklch(0.398 0.07 227.392); + --chart-4: oklch(0.828 0.189 84.429); + --chart-5: oklch(0.769 0.188 70.08); + --sidebar: oklch(0.984 0.003 247.858); + --sidebar-foreground: oklch(0.129 0.042 264.695); + --sidebar-primary: oklch(0.208 0.042 265.755); + --sidebar-primary-foreground: oklch(0.984 0.003 247.858); + --sidebar-accent: oklch(0.968 0.007 247.896); + --sidebar-accent-foreground: oklch(0.208 0.042 265.755); + --sidebar-border: oklch(0.929 0.013 255.508); + --sidebar-ring: oklch(0.704 0.04 256.788); } .dark { - --background: oklch(0.129 0.042 264.695); - --foreground: oklch(0.984 0.003 247.858); - --card: oklch(0.208 0.042 265.755); - --card-foreground: oklch(0.984 0.003 247.858); - --popover: oklch(0.208 0.042 265.755); - --popover-foreground: oklch(0.984 0.003 247.858); - --primary: oklch(0.929 0.013 255.508); - --primary-foreground: oklch(0.208 0.042 265.755); - --secondary: oklch(0.279 0.041 260.031); - --secondary-foreground: oklch(0.984 0.003 247.858); - --muted: oklch(0.279 0.041 260.031); - --muted-foreground: oklch(0.704 0.04 256.788); - --accent: oklch(0.279 0.041 260.031); - --accent-foreground: oklch(0.984 0.003 247.858); - --destructive: oklch(0.704 0.191 22.216); - --border: oklch(1 0 0 / 10%); - --input: oklch(1 0 0 / 15%); - --ring: oklch(0.551 0.027 264.364); - --chart-1: oklch(0.488 0.243 264.376); - --chart-2: oklch(0.696 0.17 162.48); - --chart-3: oklch(0.769 0.188 70.08); - --chart-4: oklch(0.627 0.265 303.9); - --chart-5: oklch(0.645 0.246 16.439); - --sidebar: oklch(0.208 0.042 265.755); - --sidebar-foreground: oklch(0.984 0.003 247.858); - --sidebar-primary: oklch(0.488 0.243 264.376); - --sidebar-primary-foreground: oklch(0.984 0.003 247.858); - --sidebar-accent: oklch(0.279 0.041 260.031); - --sidebar-accent-foreground: oklch(0.984 0.003 247.858); - --sidebar-border: oklch(1 0 0 / 10%); - --sidebar-ring: oklch(0.551 0.027 264.364); + --background: oklch(0.129 0.042 264.695); + --foreground: oklch(0.984 0.003 247.858); + --card: oklch(0.208 0.042 265.755); + --card-foreground: oklch(0.984 0.003 247.858); + --popover: oklch(0.208 0.042 265.755); + --popover-foreground: oklch(0.984 0.003 247.858); + --primary: oklch(0.929 0.013 255.508); + --primary-foreground: oklch(0.208 0.042 265.755); + --secondary: oklch(0.279 0.041 260.031); + --secondary-foreground: oklch(0.984 0.003 247.858); + --muted: oklch(0.279 0.041 260.031); + --muted-foreground: oklch(0.704 0.04 256.788); + --accent: oklch(0.279 0.041 260.031); + --accent-foreground: oklch(0.984 0.003 247.858); + --destructive: oklch(0.704 0.191 22.216); + --border: oklch(1 0 0 / 10%); + --input: oklch(1 0 0 / 15%); + --ring: oklch(0.551 0.027 264.364); + --chart-1: oklch(0.488 0.243 264.376); + --chart-2: oklch(0.696 0.17 162.48); + --chart-3: oklch(0.769 0.188 70.08); + --chart-4: oklch(0.627 0.265 303.9); + --chart-5: oklch(0.645 0.246 16.439); + --sidebar: oklch(0.208 0.042 265.755); + --sidebar-foreground: oklch(0.984 0.003 247.858); + --sidebar-primary: oklch(0.488 0.243 264.376); + --sidebar-primary-foreground: oklch(0.984 0.003 247.858); + --sidebar-accent: oklch(0.279 0.041 260.031); + --sidebar-accent-foreground: oklch(0.984 0.003 247.858); + --sidebar-border: oklch(1 0 0 / 10%); + --sidebar-ring: oklch(0.551 0.027 264.364); } @theme inline { - --radius-sm: calc(var(--radius) - 4px); - --radius-md: calc(var(--radius) - 2px); - --radius-lg: var(--radius); - --radius-xl: calc(var(--radius) + 4px); - --color-background: var(--background); - --color-foreground: var(--foreground); - --color-card: var(--card); - --color-card-foreground: var(--card-foreground); - --color-popover: var(--popover); - --color-popover-foreground: var(--popover-foreground); - --color-primary: var(--primary); - --color-primary-foreground: var(--primary-foreground); - --color-secondary: var(--secondary); - --color-secondary-foreground: var(--secondary-foreground); - --color-muted: var(--muted); - --color-muted-foreground: var(--muted-foreground); - --color-accent: var(--accent); - --color-accent-foreground: var(--accent-foreground); - --color-destructive: var(--destructive); - --color-border: var(--border); - --color-input: var(--input); - --color-ring: var(--ring); - --color-chart-1: var(--chart-1); - --color-chart-2: var(--chart-2); - --color-chart-3: var(--chart-3); - --color-chart-4: var(--chart-4); - --color-chart-5: var(--chart-5); - --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); + --radius-sm: calc(var(--radius) - 4px); + --radius-md: calc(var(--radius) - 2px); + --radius-lg: var(--radius); + --radius-xl: calc(var(--radius) + 4px); + --color-background: var(--background); + --color-foreground: var(--foreground); + --color-card: var(--card); + --color-card-foreground: var(--card-foreground); + --color-popover: var(--popover); + --color-popover-foreground: var(--popover-foreground); + --color-primary: var(--primary); + --color-primary-foreground: var(--primary-foreground); + --color-secondary: var(--secondary); + --color-secondary-foreground: var(--secondary-foreground); + --color-muted: var(--muted); + --color-muted-foreground: var(--muted-foreground); + --color-accent: var(--accent); + --color-accent-foreground: var(--accent-foreground); + --color-destructive: var(--destructive); + --color-border: var(--border); + --color-input: var(--input); + --color-ring: var(--ring); + --color-chart-1: var(--chart-1); + --color-chart-2: var(--chart-2); + --color-chart-3: var(--chart-3); + --color-chart-4: var(--chart-4); + --color-chart-5: var(--chart-5); + --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); } @layer base { - * { - @apply border-border outline-ring/50; - } - body { - @apply bg-background text-foreground; - } -} \ No newline at end of file + * { + @apply border-border outline-ring/50; + } + body { + @apply bg-background text-foreground; + } +} diff --git a/src/app.d.ts b/src/app.d.ts index e3dda87..89311bd 100644 --- a/src/app.d.ts +++ b/src/app.d.ts @@ -3,10 +3,10 @@ declare global { namespace App { interface Locals { - user: import('$lib/server/auth').SessionValidationResult['users']; + user: import('$lib/server/auth').SessionValidationResult['user']; session: import('$lib/server/auth').SessionValidationResult['sessions']; - roles: import('$lib/server/db/schema').Role[]; - permissions: import('$lib/server/db/schema').Permission[]; + roles: import('$lib/server/db/schema/roles').Role[]; + permissions: import('$lib/server/db/schema/permissions').Permission[]; } } // interface Error {} // interface Locals {} diff --git a/src/lib/components/rounds/create-round.svelte b/src/lib/components/rounds/create-round.svelte index 0ad9f9d..abae1e4 100644 --- a/src/lib/components/rounds/create-round.svelte +++ b/src/lib/components/rounds/create-round.svelte @@ -1,36 +1,92 @@
+
+ + + + + + + + Number of participants at the beginning of the stage. + + + + +
schedulingMode, (t: SchedulingMode) => {}} @@ -38,11 +94,10 @@ > {#each Object.values(SchedulingMode) as mode} + diff --git a/src/lib/components/ui/alert-dialog/alert-dialog-action.svelte b/src/lib/components/ui/alert-dialog/alert-dialog-action.svelte index a005691..df663a6 100644 --- a/src/lib/components/ui/alert-dialog/alert-dialog-action.svelte +++ b/src/lib/components/ui/alert-dialog/alert-dialog-action.svelte @@ -1,7 +1,7 @@ diff --git a/src/lib/components/ui/alert-dialog/index.ts b/src/lib/components/ui/alert-dialog/index.ts index cc281c5..a4439bc 100644 --- a/src/lib/components/ui/alert-dialog/index.ts +++ b/src/lib/components/ui/alert-dialog/index.ts @@ -1,13 +1,13 @@ -import { AlertDialog as AlertDialogPrimitive } from "bits-ui"; -import Trigger from "./alert-dialog-trigger.svelte"; -import Title from "./alert-dialog-title.svelte"; -import Action from "./alert-dialog-action.svelte"; -import Cancel from "./alert-dialog-cancel.svelte"; -import Footer from "./alert-dialog-footer.svelte"; -import Header from "./alert-dialog-header.svelte"; -import Overlay from "./alert-dialog-overlay.svelte"; -import Content from "./alert-dialog-content.svelte"; -import Description from "./alert-dialog-description.svelte"; +import { AlertDialog as AlertDialogPrimitive } from 'bits-ui'; +import Trigger from './alert-dialog-trigger.svelte'; +import Title from './alert-dialog-title.svelte'; +import Action from './alert-dialog-action.svelte'; +import Cancel from './alert-dialog-cancel.svelte'; +import Footer from './alert-dialog-footer.svelte'; +import Header from './alert-dialog-header.svelte'; +import Overlay from './alert-dialog-overlay.svelte'; +import Content from './alert-dialog-content.svelte'; +import Description from './alert-dialog-description.svelte'; const Root = AlertDialogPrimitive.Root; const Portal = AlertDialogPrimitive.Portal; @@ -35,5 +35,5 @@ export { Trigger as AlertDialogTrigger, Overlay as AlertDialogOverlay, Content as AlertDialogContent, - Description as AlertDialogDescription, + Description as AlertDialogDescription }; diff --git a/src/lib/components/ui/alert/alert-description.svelte b/src/lib/components/ui/alert/alert-description.svelte index 8b56aed..5920ca6 100644 --- a/src/lib/components/ui/alert/alert-description.svelte +++ b/src/lib/components/ui/alert/alert-description.svelte @@ -1,6 +1,6 @@ - import EllipsisIcon from "@lucide/svelte/icons/ellipsis"; - import type { HTMLAttributes } from "svelte/elements"; - import { cn, type WithElementRef, type WithoutChildren } from "$lib/utils.js"; + import EllipsisIcon from '@lucide/svelte/icons/ellipsis'; + import type { HTMLAttributes } from 'svelte/elements'; + import { cn, type WithElementRef, type WithoutChildren } from '$lib/utils.js'; let { ref = $bindable(null), @@ -15,7 +15,7 @@ data-slot="breadcrumb-ellipsis" role="presentation" aria-hidden="true" - class={cn("flex size-9 items-center justify-center", className)} + class={cn('flex size-9 items-center justify-center', className)} {...restProps} > diff --git a/src/lib/components/ui/breadcrumb/breadcrumb-item.svelte b/src/lib/components/ui/breadcrumb/breadcrumb-item.svelte index 1a84c4c..081b636 100644 --- a/src/lib/components/ui/breadcrumb/breadcrumb-item.svelte +++ b/src/lib/components/ui/breadcrumb/breadcrumb-item.svelte @@ -1,6 +1,6 @@ diff --git a/src/lib/components/ui/breadcrumb/breadcrumb-list.svelte b/src/lib/components/ui/breadcrumb/breadcrumb-list.svelte index b5458fa..33abc27 100644 --- a/src/lib/components/ui/breadcrumb/breadcrumb-list.svelte +++ b/src/lib/components/ui/breadcrumb/breadcrumb-list.svelte @@ -1,6 +1,6 @@ @@ -58,15 +58,15 @@ {/snippet} -{#if captionLayout === "dropdown"} +{#if captionLayout === 'dropdown'} {@render MonthSelect()} {@render YearSelect()} -{:else if captionLayout === "dropdown-months"} +{:else if captionLayout === 'dropdown-months'} {@render MonthSelect()} {#if placeholder} {formatYear(placeholder)} {/if} -{:else if captionLayout === "dropdown-years"} +{:else if captionLayout === 'dropdown-years'} {#if placeholder} {formatMonth(placeholder)} {/if} diff --git a/src/lib/components/ui/calendar/calendar-cell.svelte b/src/lib/components/ui/calendar/calendar-cell.svelte index 5f295d6..6eb8149 100644 --- a/src/lib/components/ui/calendar/calendar-cell.svelte +++ b/src/lib/components/ui/calendar/calendar-cell.svelte @@ -1,6 +1,6 @@ - + diff --git a/src/lib/components/ui/calendar/calendar-grid.svelte b/src/lib/components/ui/calendar/calendar-grid.svelte index e0c8627..bfa49dc 100644 --- a/src/lib/components/ui/calendar/calendar-grid.svelte +++ b/src/lib/components/ui/calendar/calendar-grid.svelte @@ -1,6 +1,6 @@ -
+
{@render children?.()}
diff --git a/src/lib/components/ui/calendar/calendar-months.svelte b/src/lib/components/ui/calendar/calendar-months.svelte index f717a9d..023cad3 100644 --- a/src/lib/components/ui/calendar/calendar-months.svelte +++ b/src/lib/components/ui/calendar/calendar-months.svelte @@ -1,6 +1,6 @@ @@ -50,7 +50,7 @@ get along, so we shut typescript up by casting `value` to `never`. {weekdayFormat} {disableDaysOutsideMonth} class={cn( - "bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent", + 'bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent', className )} {locale} @@ -97,7 +97,7 @@ get along, so we shut typescript up by casting `value` to `never`. {#if day} {@render day({ day: date, - outsideMonth: !isEqualMonth(date, month.value), + outsideMonth: !isEqualMonth(date, month.value) })} {:else} diff --git a/src/lib/components/ui/calendar/index.ts b/src/lib/components/ui/calendar/index.ts index f3a16d2..180d173 100644 --- a/src/lib/components/ui/calendar/index.ts +++ b/src/lib/components/ui/calendar/index.ts @@ -1,21 +1,21 @@ -import Root from "./calendar.svelte"; -import Cell from "./calendar-cell.svelte"; -import Day from "./calendar-day.svelte"; -import Grid from "./calendar-grid.svelte"; -import Header from "./calendar-header.svelte"; -import Months from "./calendar-months.svelte"; -import GridRow from "./calendar-grid-row.svelte"; -import Heading from "./calendar-heading.svelte"; -import GridBody from "./calendar-grid-body.svelte"; -import GridHead from "./calendar-grid-head.svelte"; -import HeadCell from "./calendar-head-cell.svelte"; -import NextButton from "./calendar-next-button.svelte"; -import PrevButton from "./calendar-prev-button.svelte"; -import MonthSelect from "./calendar-month-select.svelte"; -import YearSelect from "./calendar-year-select.svelte"; -import Month from "./calendar-month.svelte"; -import Nav from "./calendar-nav.svelte"; -import Caption from "./calendar-caption.svelte"; +import Root from './calendar.svelte'; +import Cell from './calendar-cell.svelte'; +import Day from './calendar-day.svelte'; +import Grid from './calendar-grid.svelte'; +import Header from './calendar-header.svelte'; +import Months from './calendar-months.svelte'; +import GridRow from './calendar-grid-row.svelte'; +import Heading from './calendar-heading.svelte'; +import GridBody from './calendar-grid-body.svelte'; +import GridHead from './calendar-grid-head.svelte'; +import HeadCell from './calendar-head-cell.svelte'; +import NextButton from './calendar-next-button.svelte'; +import PrevButton from './calendar-prev-button.svelte'; +import MonthSelect from './calendar-month-select.svelte'; +import YearSelect from './calendar-year-select.svelte'; +import Month from './calendar-month.svelte'; +import Nav from './calendar-nav.svelte'; +import Caption from './calendar-caption.svelte'; export { Day, @@ -36,5 +36,5 @@ export { MonthSelect, Caption, // - Root as Calendar, + Root as Calendar }; diff --git a/src/lib/components/ui/card/card-action.svelte b/src/lib/components/ui/card/card-action.svelte index cc36c56..bbaafd2 100644 --- a/src/lib/components/ui/card/card-action.svelte +++ b/src/lib/components/ui/card/card-action.svelte @@ -1,6 +1,6 @@ -
+
{@render children?.()}
diff --git a/src/lib/components/ui/card/card-description.svelte b/src/lib/components/ui/card/card-description.svelte index 9b20ac7..bfb0725 100644 --- a/src/lib/components/ui/card/card-description.svelte +++ b/src/lib/components/ui/card/card-description.svelte @@ -1,6 +1,6 @@ @@ -16,7 +16,7 @@ - import { Command as CommandPrimitive } from "bits-ui"; - import { cn } from "$lib/utils.js"; + import { Command as CommandPrimitive } from 'bits-ui'; + import { cn } from '$lib/utils.js'; let { ref = $bindable(null), @@ -13,7 +13,7 @@ bind:ref data-slot="command-item" class={cn( - "aria-selected:bg-accent aria-selected:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground outline-hidden relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", + "aria-selected:bg-accent aria-selected:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className )} {...restProps} diff --git a/src/lib/components/ui/command/command-link-item.svelte b/src/lib/components/ui/command/command-link-item.svelte index 944c22d..4edde50 100644 --- a/src/lib/components/ui/command/command-link-item.svelte +++ b/src/lib/components/ui/command/command-link-item.svelte @@ -1,6 +1,6 @@ diff --git a/src/lib/components/ui/dialog/dialog-content.svelte b/src/lib/components/ui/dialog/dialog-content.svelte index 99cc73b..c0e54b8 100644 --- a/src/lib/components/ui/dialog/dialog-content.svelte +++ b/src/lib/components/ui/dialog/dialog-content.svelte @@ -1,9 +1,9 @@ diff --git a/src/lib/components/ui/dialog/index.ts b/src/lib/components/ui/dialog/index.ts index dce1d9d..d9e5fb8 100644 --- a/src/lib/components/ui/dialog/index.ts +++ b/src/lib/components/ui/dialog/index.ts @@ -1,13 +1,13 @@ -import { Dialog as DialogPrimitive } from "bits-ui"; +import { Dialog as DialogPrimitive } from 'bits-ui'; -import Title from "./dialog-title.svelte"; -import Footer from "./dialog-footer.svelte"; -import Header from "./dialog-header.svelte"; -import Overlay from "./dialog-overlay.svelte"; -import Content from "./dialog-content.svelte"; -import Description from "./dialog-description.svelte"; -import Trigger from "./dialog-trigger.svelte"; -import Close from "./dialog-close.svelte"; +import Title from './dialog-title.svelte'; +import Footer from './dialog-footer.svelte'; +import Header from './dialog-header.svelte'; +import Overlay from './dialog-overlay.svelte'; +import Content from './dialog-content.svelte'; +import Description from './dialog-description.svelte'; +import Trigger from './dialog-trigger.svelte'; +import Close from './dialog-close.svelte'; const Root = DialogPrimitive.Root; const Portal = DialogPrimitive.Portal; @@ -33,5 +33,5 @@ export { Overlay as DialogOverlay, Content as DialogContent, Description as DialogDescription, - Close as DialogClose, + Close as DialogClose }; diff --git a/src/lib/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte b/src/lib/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte index e03f949..e94c637 100644 --- a/src/lib/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte +++ b/src/lib/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte @@ -1,9 +1,9 @@ diff --git a/src/lib/components/ui/dropdown-menu/dropdown-menu-item.svelte b/src/lib/components/ui/dropdown-menu/dropdown-menu-item.svelte index 64bb283..38bc45b 100644 --- a/src/lib/components/ui/dropdown-menu/dropdown-menu-item.svelte +++ b/src/lib/components/ui/dropdown-menu/dropdown-menu-item.svelte @@ -1,16 +1,16 @@ @@ -20,7 +20,7 @@ data-inset={inset} data-variant={variant} class={cn( - "data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:data-highlighted:bg-destructive/10 dark:data-[variant=destructive]:data-highlighted:bg-destructive/20 data-[variant=destructive]:data-highlighted:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground outline-hidden relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm data-[disabled]:pointer-events-none data-[inset]:pl-8 data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", + "data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:data-highlighted:bg-destructive/10 dark:data-[variant=destructive]:data-highlighted:bg-destructive/20 data-[variant=destructive]:data-highlighted:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className )} {...restProps} diff --git a/src/lib/components/ui/dropdown-menu/dropdown-menu-label.svelte b/src/lib/components/ui/dropdown-menu/dropdown-menu-label.svelte index f72e477..14e40f7 100644 --- a/src/lib/components/ui/dropdown-menu/dropdown-menu-label.svelte +++ b/src/lib/components/ui/dropdown-menu/dropdown-menu-label.svelte @@ -1,6 +1,6 @@ diff --git a/src/lib/components/ui/dropdown-menu/index.ts b/src/lib/components/ui/dropdown-menu/index.ts index 1cf9f70..aeb398e 100644 --- a/src/lib/components/ui/dropdown-menu/index.ts +++ b/src/lib/components/ui/dropdown-menu/index.ts @@ -1,17 +1,17 @@ -import { DropdownMenu as DropdownMenuPrimitive } from "bits-ui"; -import CheckboxItem from "./dropdown-menu-checkbox-item.svelte"; -import Content from "./dropdown-menu-content.svelte"; -import Group from "./dropdown-menu-group.svelte"; -import Item from "./dropdown-menu-item.svelte"; -import Label from "./dropdown-menu-label.svelte"; -import RadioGroup from "./dropdown-menu-radio-group.svelte"; -import RadioItem from "./dropdown-menu-radio-item.svelte"; -import Separator from "./dropdown-menu-separator.svelte"; -import Shortcut from "./dropdown-menu-shortcut.svelte"; -import Trigger from "./dropdown-menu-trigger.svelte"; -import SubContent from "./dropdown-menu-sub-content.svelte"; -import SubTrigger from "./dropdown-menu-sub-trigger.svelte"; -import GroupHeading from "./dropdown-menu-group-heading.svelte"; +import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui'; +import CheckboxItem from './dropdown-menu-checkbox-item.svelte'; +import Content from './dropdown-menu-content.svelte'; +import Group from './dropdown-menu-group.svelte'; +import Item from './dropdown-menu-item.svelte'; +import Label from './dropdown-menu-label.svelte'; +import RadioGroup from './dropdown-menu-radio-group.svelte'; +import RadioItem from './dropdown-menu-radio-item.svelte'; +import Separator from './dropdown-menu-separator.svelte'; +import Shortcut from './dropdown-menu-shortcut.svelte'; +import Trigger from './dropdown-menu-trigger.svelte'; +import SubContent from './dropdown-menu-sub-content.svelte'; +import SubTrigger from './dropdown-menu-sub-trigger.svelte'; +import GroupHeading from './dropdown-menu-group-heading.svelte'; const Sub = DropdownMenuPrimitive.Sub; const Root = DropdownMenuPrimitive.Root; @@ -45,5 +45,5 @@ export { Sub, SubContent, SubTrigger, - Trigger, + Trigger }; diff --git a/src/lib/components/ui/form/form-button.svelte b/src/lib/components/ui/form/form-button.svelte index cc0c590..550f6ac 100644 --- a/src/lib/components/ui/form/form-button.svelte +++ b/src/lib/components/ui/form/form-button.svelte @@ -1,5 +1,5 @@ diff --git a/src/lib/components/ui/form/form-description.svelte b/src/lib/components/ui/form/form-description.svelte index a5f42be..fa6f8f8 100644 --- a/src/lib/components/ui/form/form-description.svelte +++ b/src/lib/components/ui/form/form-description.svelte @@ -1,6 +1,6 @@ - + diff --git a/src/lib/components/ui/form/form-label.svelte b/src/lib/components/ui/form/form-label.svelte index 8749360..6d92ce7 100644 --- a/src/lib/components/ui/form/form-label.svelte +++ b/src/lib/components/ui/form/form-label.svelte @@ -1,7 +1,7 @@ -{#if type === "file"} +{#if type === 'file'} - import { Label as LabelPrimitive } from "bits-ui"; - import { cn } from "$lib/utils.js"; + import { Label as LabelPrimitive } from 'bits-ui'; + import { cn } from '$lib/utils.js'; let { ref = $bindable(null), @@ -13,7 +13,7 @@ bind:ref data-slot="label" class={cn( - "flex select-none items-center gap-2 text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-50 group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50", + 'flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50', className )} {...restProps} diff --git a/src/lib/components/ui/menubar/index.ts b/src/lib/components/ui/menubar/index.ts index 57a6cfb..8489c00 100644 --- a/src/lib/components/ui/menubar/index.ts +++ b/src/lib/components/ui/menubar/index.ts @@ -1,17 +1,17 @@ -import { Menubar as MenubarPrimitive } from "bits-ui"; -import Root from "./menubar.svelte"; -import CheckboxItem from "./menubar-checkbox-item.svelte"; -import Content from "./menubar-content.svelte"; -import Item from "./menubar-item.svelte"; -import Group from "./menubar-group.svelte"; -import RadioItem from "./menubar-radio-item.svelte"; -import Separator from "./menubar-separator.svelte"; -import Shortcut from "./menubar-shortcut.svelte"; -import SubContent from "./menubar-sub-content.svelte"; -import SubTrigger from "./menubar-sub-trigger.svelte"; -import Trigger from "./menubar-trigger.svelte"; -import Label from "./menubar-label.svelte"; -import GroupHeading from "./menubar-group-heading.svelte"; +import { Menubar as MenubarPrimitive } from 'bits-ui'; +import Root from './menubar.svelte'; +import CheckboxItem from './menubar-checkbox-item.svelte'; +import Content from './menubar-content.svelte'; +import Item from './menubar-item.svelte'; +import Group from './menubar-group.svelte'; +import RadioItem from './menubar-radio-item.svelte'; +import Separator from './menubar-separator.svelte'; +import Shortcut from './menubar-shortcut.svelte'; +import SubContent from './menubar-sub-content.svelte'; +import SubTrigger from './menubar-sub-trigger.svelte'; +import Trigger from './menubar-trigger.svelte'; +import Label from './menubar-label.svelte'; +import GroupHeading from './menubar-group-heading.svelte'; const Menu = MenubarPrimitive.Menu; const Sub = MenubarPrimitive.Sub; @@ -50,5 +50,5 @@ export { Sub as MenubarSub, RadioGroup as MenubarRadioGroup, Label as MenubarLabel, - GroupHeading as MenubarGroupHeading, + GroupHeading as MenubarGroupHeading }; diff --git a/src/lib/components/ui/menubar/menubar-checkbox-item.svelte b/src/lib/components/ui/menubar/menubar-checkbox-item.svelte index 012d68b..5f7192e 100644 --- a/src/lib/components/ui/menubar/menubar-checkbox-item.svelte +++ b/src/lib/components/ui/menubar/menubar-checkbox-item.svelte @@ -1,9 +1,9 @@ @@ -20,7 +20,7 @@ data-inset={inset} data-variant={variant} class={cn( - "focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground outline-hidden relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm data-[disabled]:pointer-events-none data-[inset]:pl-8 data-[disabled]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", + "focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className )} {...restProps} diff --git a/src/lib/components/ui/menubar/menubar-label.svelte b/src/lib/components/ui/menubar/menubar-label.svelte index 1b36f6c..4d05d2e 100644 --- a/src/lib/components/ui/menubar/menubar-label.svelte +++ b/src/lib/components/ui/menubar/menubar-label.svelte @@ -1,7 +1,7 @@ -
+
- import { NavigationMenu as NavigationMenuPrimitive } from "bits-ui"; - import { cn } from "$lib/utils.js"; - import NavigationMenuViewport from "./navigation-menu-viewport.svelte"; + import { NavigationMenu as NavigationMenuPrimitive } from 'bits-ui'; + import { cn } from '$lib/utils.js'; + import NavigationMenuViewport from './navigation-menu-viewport.svelte'; let { ref = $bindable(null), @@ -19,7 +19,7 @@ data-slot="navigation-menu" data-viewport={viewport} class={cn( - "group/navigation-menu relative flex max-w-max flex-1 items-center justify-center", + 'group/navigation-menu relative flex max-w-max flex-1 items-center justify-center', className )} {...restProps} diff --git a/src/lib/components/ui/pagination/index.ts b/src/lib/components/ui/pagination/index.ts index d83c7a9..2f5532a 100644 --- a/src/lib/components/ui/pagination/index.ts +++ b/src/lib/components/ui/pagination/index.ts @@ -1,10 +1,10 @@ -import Root from "./pagination.svelte"; -import Content from "./pagination-content.svelte"; -import Item from "./pagination-item.svelte"; -import Link from "./pagination-link.svelte"; -import PrevButton from "./pagination-prev-button.svelte"; -import NextButton from "./pagination-next-button.svelte"; -import Ellipsis from "./pagination-ellipsis.svelte"; +import Root from './pagination.svelte'; +import Content from './pagination-content.svelte'; +import Item from './pagination-item.svelte'; +import Link from './pagination-link.svelte'; +import PrevButton from './pagination-prev-button.svelte'; +import NextButton from './pagination-next-button.svelte'; +import Ellipsis from './pagination-ellipsis.svelte'; export { Root, @@ -21,5 +21,5 @@ export { Link as PaginationLink, PrevButton as PaginationPrevButton, NextButton as PaginationNextButton, - Ellipsis as PaginationEllipsis, + Ellipsis as PaginationEllipsis }; diff --git a/src/lib/components/ui/pagination/pagination-content.svelte b/src/lib/components/ui/pagination/pagination-content.svelte index e1124fc..ce650ce 100644 --- a/src/lib/components/ui/pagination/pagination-content.svelte +++ b/src/lib/components/ui/pagination/pagination-content.svelte @@ -1,6 +1,6 @@ @@ -14,6 +14,6 @@ bind:ref bind:value data-slot="radio-group" - class={cn("grid gap-3", className)} + class={cn('grid gap-3', className)} {...restProps} /> diff --git a/src/lib/components/ui/select/index.ts b/src/lib/components/ui/select/index.ts index 9e8d3e9..bfa73d9 100644 --- a/src/lib/components/ui/select/index.ts +++ b/src/lib/components/ui/select/index.ts @@ -1,14 +1,14 @@ -import { Select as SelectPrimitive } from "bits-ui"; +import { Select as SelectPrimitive } from 'bits-ui'; -import Group from "./select-group.svelte"; -import Label from "./select-label.svelte"; -import Item from "./select-item.svelte"; -import Content from "./select-content.svelte"; -import Trigger from "./select-trigger.svelte"; -import Separator from "./select-separator.svelte"; -import ScrollDownButton from "./select-scroll-down-button.svelte"; -import ScrollUpButton from "./select-scroll-up-button.svelte"; -import GroupHeading from "./select-group-heading.svelte"; +import Group from './select-group.svelte'; +import Label from './select-label.svelte'; +import Item from './select-item.svelte'; +import Content from './select-content.svelte'; +import Trigger from './select-trigger.svelte'; +import Separator from './select-separator.svelte'; +import ScrollDownButton from './select-scroll-down-button.svelte'; +import ScrollUpButton from './select-scroll-up-button.svelte'; +import GroupHeading from './select-group-heading.svelte'; const Root = SelectPrimitive.Root; @@ -33,5 +33,5 @@ export { Separator as SelectSeparator, ScrollDownButton as SelectScrollDownButton, ScrollUpButton as SelectScrollUpButton, - GroupHeading as SelectGroupHeading, + GroupHeading as SelectGroupHeading }; diff --git a/src/lib/components/ui/select/select-content.svelte b/src/lib/components/ui/select/select-content.svelte index dc16d65..ca9d1b5 100644 --- a/src/lib/components/ui/select/select-content.svelte +++ b/src/lib/components/ui/select/select-content.svelte @@ -1,8 +1,8 @@ diff --git a/src/lib/components/ui/select/select-item.svelte b/src/lib/components/ui/select/select-item.svelte index 49dbbd7..06e48be 100644 --- a/src/lib/components/ui/select/select-item.svelte +++ b/src/lib/components/ui/select/select-item.svelte @@ -1,7 +1,7 @@ @@ -19,7 +19,7 @@ data-slot="select-trigger" data-size={size} class={cn( - "border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 shadow-xs flex w-fit select-none items-center justify-between gap-2 whitespace-nowrap rounded-md border bg-transparent px-3 py-2 text-sm outline-none transition-[color,box-shadow] focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", + "border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none select-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className )} {...restProps} diff --git a/src/lib/components/ui/separator/index.ts b/src/lib/components/ui/separator/index.ts index 82442d2..768efac 100644 --- a/src/lib/components/ui/separator/index.ts +++ b/src/lib/components/ui/separator/index.ts @@ -1,7 +1,7 @@ -import Root from "./separator.svelte"; +import Root from './separator.svelte'; export { Root, // - Root as Separator, + Root as Separator }; diff --git a/src/lib/components/ui/separator/separator.svelte b/src/lib/components/ui/separator/separator.svelte index 09d88f4..6ceb6a5 100644 --- a/src/lib/components/ui/separator/separator.svelte +++ b/src/lib/components/ui/separator/separator.svelte @@ -1,6 +1,6 @@ diff --git a/src/lib/components/ui/sheet/sheet-content.svelte b/src/lib/components/ui/sheet/sheet-content.svelte index 856922e..ba4228d 100644 --- a/src/lib/components/ui/sheet/sheet-content.svelte +++ b/src/lib/components/ui/sheet/sheet-content.svelte @@ -1,34 +1,36 @@ diff --git a/src/lib/components/ui/sidebar/constants.ts b/src/lib/components/ui/sidebar/constants.ts index 4de4435..2d3bbfb 100644 --- a/src/lib/components/ui/sidebar/constants.ts +++ b/src/lib/components/ui/sidebar/constants.ts @@ -1,6 +1,6 @@ -export const SIDEBAR_COOKIE_NAME = "sidebar:state"; +export const SIDEBAR_COOKIE_NAME = 'sidebar:state'; export const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7; -export const SIDEBAR_WIDTH = "16rem"; -export const SIDEBAR_WIDTH_MOBILE = "18rem"; -export const SIDEBAR_WIDTH_ICON = "3rem"; -export const SIDEBAR_KEYBOARD_SHORTCUT = "b"; +export const SIDEBAR_WIDTH = '16rem'; +export const SIDEBAR_WIDTH_MOBILE = '18rem'; +export const SIDEBAR_WIDTH_ICON = '3rem'; +export const SIDEBAR_KEYBOARD_SHORTCUT = 'b'; diff --git a/src/lib/components/ui/sidebar/context.svelte.ts b/src/lib/components/ui/sidebar/context.svelte.ts index 15248ad..6fa2aa3 100644 --- a/src/lib/components/ui/sidebar/context.svelte.ts +++ b/src/lib/components/ui/sidebar/context.svelte.ts @@ -1,6 +1,6 @@ -import { IsMobile } from "$lib/hooks/is-mobile.svelte.js"; -import { getContext, setContext } from "svelte"; -import { SIDEBAR_KEYBOARD_SHORTCUT } from "./constants.js"; +import { IsMobile } from '$lib/hooks/is-mobile.svelte.js'; +import { getContext, setContext } from 'svelte'; +import { SIDEBAR_KEYBOARD_SHORTCUT } from './constants.js'; type Getter = () => T; @@ -24,9 +24,9 @@ class SidebarState { readonly props: SidebarStateProps; open = $derived.by(() => this.props.open()); openMobile = $state(false); - setOpen: SidebarStateProps["setOpen"]; + setOpen: SidebarStateProps['setOpen']; #isMobile: IsMobile; - state = $derived.by(() => (this.open ? "expanded" : "collapsed")); + state = $derived.by(() => (this.open ? 'expanded' : 'collapsed')); constructor(props: SidebarStateProps) { this.setOpen = props.setOpen; @@ -53,13 +53,11 @@ class SidebarState { }; toggle = () => { - return this.#isMobile.current - ? (this.openMobile = !this.openMobile) - : this.setOpen(!this.open); + return this.#isMobile.current ? (this.openMobile = !this.openMobile) : this.setOpen(!this.open); }; } -const SYMBOL_KEY = "scn-sidebar"; +const SYMBOL_KEY = 'scn-sidebar'; /** * Instantiates a new `SidebarState` instance and sets it in the context. diff --git a/src/lib/components/ui/sidebar/index.ts b/src/lib/components/ui/sidebar/index.ts index 318a341..280e640 100644 --- a/src/lib/components/ui/sidebar/index.ts +++ b/src/lib/components/ui/sidebar/index.ts @@ -1,27 +1,27 @@ -import { useSidebar } from "./context.svelte.js"; -import Content from "./sidebar-content.svelte"; -import Footer from "./sidebar-footer.svelte"; -import GroupAction from "./sidebar-group-action.svelte"; -import GroupContent from "./sidebar-group-content.svelte"; -import GroupLabel from "./sidebar-group-label.svelte"; -import Group from "./sidebar-group.svelte"; -import Header from "./sidebar-header.svelte"; -import Input from "./sidebar-input.svelte"; -import Inset from "./sidebar-inset.svelte"; -import MenuAction from "./sidebar-menu-action.svelte"; -import MenuBadge from "./sidebar-menu-badge.svelte"; -import MenuButton from "./sidebar-menu-button.svelte"; -import MenuItem from "./sidebar-menu-item.svelte"; -import MenuSkeleton from "./sidebar-menu-skeleton.svelte"; -import MenuSubButton from "./sidebar-menu-sub-button.svelte"; -import MenuSubItem from "./sidebar-menu-sub-item.svelte"; -import MenuSub from "./sidebar-menu-sub.svelte"; -import Menu from "./sidebar-menu.svelte"; -import Provider from "./sidebar-provider.svelte"; -import Rail from "./sidebar-rail.svelte"; -import Separator from "./sidebar-separator.svelte"; -import Trigger from "./sidebar-trigger.svelte"; -import Root from "./sidebar.svelte"; +import { useSidebar } from './context.svelte.js'; +import Content from './sidebar-content.svelte'; +import Footer from './sidebar-footer.svelte'; +import GroupAction from './sidebar-group-action.svelte'; +import GroupContent from './sidebar-group-content.svelte'; +import GroupLabel from './sidebar-group-label.svelte'; +import Group from './sidebar-group.svelte'; +import Header from './sidebar-header.svelte'; +import Input from './sidebar-input.svelte'; +import Inset from './sidebar-inset.svelte'; +import MenuAction from './sidebar-menu-action.svelte'; +import MenuBadge from './sidebar-menu-badge.svelte'; +import MenuButton from './sidebar-menu-button.svelte'; +import MenuItem from './sidebar-menu-item.svelte'; +import MenuSkeleton from './sidebar-menu-skeleton.svelte'; +import MenuSubButton from './sidebar-menu-sub-button.svelte'; +import MenuSubItem from './sidebar-menu-sub-item.svelte'; +import MenuSub from './sidebar-menu-sub.svelte'; +import Menu from './sidebar-menu.svelte'; +import Provider from './sidebar-provider.svelte'; +import Rail from './sidebar-rail.svelte'; +import Separator from './sidebar-separator.svelte'; +import Trigger from './sidebar-trigger.svelte'; +import Root from './sidebar.svelte'; export { Content, @@ -71,5 +71,5 @@ export { Separator as SidebarSeparator, Trigger as SidebarTrigger, Trigger, - useSidebar, + useSidebar }; diff --git a/src/lib/components/ui/sidebar/sidebar-content.svelte b/src/lib/components/ui/sidebar/sidebar-content.svelte index f121800..f1d195e 100644 --- a/src/lib/components/ui/sidebar/sidebar-content.svelte +++ b/src/lib/components/ui/sidebar/sidebar-content.svelte @@ -1,6 +1,6 @@ diff --git a/src/lib/components/ui/sidebar/sidebar-group-content.svelte b/src/lib/components/ui/sidebar/sidebar-group-content.svelte index 415255f..fafacee 100644 --- a/src/lib/components/ui/sidebar/sidebar-group-content.svelte +++ b/src/lib/components/ui/sidebar/sidebar-group-content.svelte @@ -1,6 +1,6 @@ diff --git a/src/lib/components/ui/sidebar/sidebar-group.svelte b/src/lib/components/ui/sidebar/sidebar-group.svelte index ec18a69..897445d 100644 --- a/src/lib/components/ui/sidebar/sidebar-group.svelte +++ b/src/lib/components/ui/sidebar/sidebar-group.svelte @@ -1,6 +1,6 @@ diff --git a/src/lib/components/ui/sidebar/sidebar-menu-badge.svelte b/src/lib/components/ui/sidebar/sidebar-menu-badge.svelte index 69e5a3c..a9ebc18 100644 --- a/src/lib/components/ui/sidebar/sidebar-menu-badge.svelte +++ b/src/lib/components/ui/sidebar/sidebar-menu-badge.svelte @@ -1,6 +1,6 @@ @@ -90,10 +88,10 @@