diff --git a/sites/docs/src/content/components/sidebar.md b/sites/docs/src/content/components/sidebar.md index ad7b1041d8..31d4c37284 100644 --- a/sites/docs/src/content/components/sidebar.md +++ b/sites/docs/src/content/components/sidebar.md @@ -39,28 +39,26 @@ We now have a solid foundation to build on top of. Composable. Themeable. Custom We'll go over the colors later in the [theming section](/docs/components/sidebar#theming). ```css title="src/app.css" -@layer base { - :root { - --sidebar-background: 0 0% 98%; - --sidebar-foreground: 240 5.3% 26.1%; - --sidebar-primary: 240 5.9% 10%; - --sidebar-primary-foreground: 0 0% 98%; - --sidebar-accent: 240 4.8% 95.9%; - --sidebar-accent-foreground: 240 5.9% 10%; - --sidebar-border: 220 13% 91%; - --sidebar-ring: 217.2 91.2% 59.8%; - } - - .dark { - --sidebar-background: 240 5.9% 10%; - --sidebar-foreground: 240 4.8% 95.9%; - --sidebar-primary: 224.3 76.3% 48%; - --sidebar-primary-foreground: 0 0% 100%; - --sidebar-accent: 240 3.7% 15.9%; - --sidebar-accent-foreground: 240 4.8% 95.9%; - --sidebar-border: 240 3.7% 15.9%; - --sidebar-ring: 217.2 91.2% 59.8%; - } +:root { + --sidebar: oklch(0.985 0 0); + --sidebar-foreground: oklch(0.145 0 0); + --sidebar-primary: oklch(0.205 0 0); + --sidebar-primary-foreground: oklch(0.985 0 0); + --sidebar-accent: oklch(0.97 0 0); + --sidebar-accent-foreground: oklch(0.205 0 0); + --sidebar-border: oklch(0.922 0 0); + --sidebar-ring: oklch(0.708 0 0); +} + +.dark { + --sidebar: oklch(0.205 0 0); + --sidebar-foreground: oklch(0.985 0 0); + --sidebar-primary: oklch(0.488 0.243 264.376); + --sidebar-primary-foreground: oklch(0.985 0 0); + --sidebar-accent: oklch(0.269 0 0); + --sidebar-accent-foreground: oklch(0.985 0 0); + --sidebar-border: oklch(1 0 0 / 10%); + --sidebar-ring: oklch(0.439 0 0); } ``` @@ -82,28 +80,26 @@ Copy and paste the component source files linked at the top of this page into yo We'll go over the colors later in the [theming section](/docs/components/sidebar#theming). ```css title="src/app.css" -@layer base { - :root { - --sidebar-background: 0 0% 98%; - --sidebar-foreground: 240 5.3% 26.1%; - --sidebar-primary: 240 5.9% 10%; - --sidebar-primary-foreground: 0 0% 98%; - --sidebar-accent: 240 4.8% 95.9%; - --sidebar-accent-foreground: 240 5.9% 10%; - --sidebar-border: 220 13% 91%; - --sidebar-ring: 217.2 91.2% 59.8%; - } - - .dark { - --sidebar-background: 240 5.9% 10%; - --sidebar-foreground: 240 4.8% 95.9%; - --sidebar-primary: 224.3 76.3% 48%; - --sidebar-primary-foreground: 0 0% 100%; - --sidebar-accent: 240 3.7% 15.9%; - --sidebar-accent-foreground: 240 4.8% 95.9%; - --sidebar-border: 240 3.7% 15.9%; - --sidebar-ring: 217.2 91.2% 59.8%; - } +:root { + --sidebar: oklch(0.985 0 0); + --sidebar-foreground: oklch(0.145 0 0); + --sidebar-primary: oklch(0.205 0 0); + --sidebar-primary-foreground: oklch(0.985 0 0); + --sidebar-accent: oklch(0.97 0 0); + --sidebar-accent-foreground: oklch(0.205 0 0); + --sidebar-border: oklch(0.922 0 0); + --sidebar-ring: oklch(0.708 0 0); +} + +.dark { + --sidebar: oklch(0.205 0 0); + --sidebar-foreground: oklch(0.985 0 0); + --sidebar-primary: oklch(0.488 0.243 264.376); + --sidebar-primary-foreground: oklch(0.985 0 0); + --sidebar-accent: oklch(0.269 0 0); + --sidebar-accent-foreground: oklch(0.985 0 0); + --sidebar-border: oklch(1 0 0 / 10%); + --sidebar-ring: oklch(0.439 0 0); } ``` @@ -943,28 +939,26 @@ Use Svelte's [Function Binding](https://svelte.dev/docs/svelte/bind#Function-bin We use the following CSS variables to theme the sidebar. ```css -@layer base { - :root { - --sidebar-background: 0 0% 98%; - --sidebar-foreground: 240 5.3% 26.1%; - --sidebar-primary: 240 5.9% 10%; - --sidebar-primary-foreground: 0 0% 98%; - --sidebar-accent: 240 4.8% 95.9%; - --sidebar-accent-foreground: 240 5.9% 10%; - --sidebar-border: 220 13% 91%; - --sidebar-ring: 217.2 91.2% 59.8%; - } - - .dark { - --sidebar-background: 240 5.9% 10%; - --sidebar-foreground: 240 4.8% 95.9%; - --sidebar-primary: 0 0% 98%; - --sidebar-primary-foreground: 240 5.9% 10%; - --sidebar-accent: 240 3.7% 15.9%; - --sidebar-accent-foreground: 240 4.8% 95.9%; - --sidebar-border: 240 3.7% 15.9%; - --sidebar-ring: 217.2 91.2% 59.8%; - } +:root { + --sidebar: oklch(0.985 0 0); + --sidebar-foreground: oklch(0.145 0 0); + --sidebar-primary: oklch(0.205 0 0); + --sidebar-primary-foreground: oklch(0.985 0 0); + --sidebar-accent: oklch(0.97 0 0); + --sidebar-accent-foreground: oklch(0.205 0 0); + --sidebar-border: oklch(0.922 0 0); + --sidebar-ring: oklch(0.708 0 0); +} + +.dark { + --sidebar: oklch(0.205 0 0); + --sidebar-foreground: oklch(0.985 0 0); + --sidebar-primary: oklch(0.488 0.243 264.376); + --sidebar-primary-foreground: oklch(0.985 0 0); + --sidebar-accent: oklch(0.269 0 0); + --sidebar-accent-foreground: oklch(0.985 0 0); + --sidebar-border: oklch(1 0 0 / 10%); + --sidebar-ring: oklch(0.439 0 0); } ``` diff --git a/sites/docs/src/lib/components/docs/block-preview.svelte b/sites/docs/src/lib/components/docs/block-preview.svelte index 5f2c8cbf8f..e526c89a49 100644 --- a/sites/docs/src/lib/components/docs/block-preview.svelte +++ b/sites/docs/src/lib/components/docs/block-preview.svelte @@ -49,7 +49,7 @@ class="bg-background absolute left-0 top-0 z-20 hidden w-[970px] max-w-none data-[block=sidebar-10]:left-auto data-[block=sidebar-10]:right-0 data-[block=sidebar-11]:-top-1/3 data-[block=sidebar-14]:left-auto data-[block=sidebar-14]:right-0 data-[block=login-01]:max-w-full data-[block=sidebar-13]:max-w-full data-[block=sidebar-15]:max-w-full sm:w-[1280px] md:hidden dark:block md:dark:hidden" /> + {:else} diff --git a/sites/docs/src/lib/components/docs/nav/main-nav.svelte b/sites/docs/src/lib/components/docs/nav/main-nav.svelte index b31647b14c..03a2b50ff8 100644 --- a/sites/docs/src/lib/components/docs/nav/main-nav.svelte +++ b/sites/docs/src/lib/components/docs/nav/main-nav.svelte @@ -28,7 +28,7 @@ href="/docs/components" class={cn( "hover:text-foreground/80 transition-colors", - page.url.pathname?.startsWith("/docs/components") && + page.url.pathname?.startsWith("/docs/components/") && !page.url.pathname?.startsWith("/docs/component/chart") ? "text-foreground" : "text-foreground/80" diff --git a/sites/docs/src/lib/components/docs/pm-block.svelte b/sites/docs/src/lib/components/docs/pm-block.svelte index ca377acd79..ea51331f2a 100644 --- a/sites/docs/src/lib/components/docs/pm-block.svelte +++ b/sites/docs/src/lib/components/docs/pm-block.svelte @@ -1,12 +1,8 @@ @@ -29,17 +25,17 @@ class="flex place-items-end justify-between rounded-lg border-b border-zinc-800 bg-zinc-900 p-2 pb-0" >
- {#each PACKAGE_MANAGERS as pm (pm)} + {#each PACKAGE_MANAGERS as packageManager (packageManager)} {/each}
diff --git a/sites/docs/src/lib/components/docs/theme-customizer/customizer-code.svelte b/sites/docs/src/lib/components/docs/theme-customizer/customizer-code.svelte index c774696b55..8a59f6c481 100644 --- a/sites/docs/src/lib/components/docs/theme-customizer/customizer-code.svelte +++ b/sites/docs/src/lib/components/docs/theme-customizer/customizer-code.svelte @@ -26,7 +26,7 @@ @@ -45,7 +47,7 @@ size="sm" variant="outline" onclick={() => { - clipboard.copy(getThemeCodeOKLCH(activeThemeOKLCH, $config.radius)); + clipboard.copy(getThemeCodeOKLCH(activeThemeOKLCH, config.current.radius)); }} class="absolute right-0 top-0 shadow-none" > @@ -61,7 +63,7 @@ class="flex max-h-[450px] flex-col overflow-x-auto rounded-lg border bg-zinc-950 py-4 dark:bg-zinc-900">  :root { -    --radius: {$config.radius}rem; +    --radius: {config.current.radius}rem; {#each Object.entries(activeThemeOKLCH?.light) as [key, value] (key)}    --{key}: {value}; {/each} diff --git a/sites/docs/src/lib/components/docs/theme-customizer/customizer.svelte b/sites/docs/src/lib/components/docs/theme-customizer/customizer.svelte index d6d846c4b5..db51fd43ab 100644 --- a/sites/docs/src/lib/components/docs/theme-customizer/customizer.svelte +++ b/sites/docs/src/lib/components/docs/theme-customizer/customizer.svelte @@ -1,6 +1,6 @@ @@ -23,13 +24,13 @@
{#each baseColors.filter((theme) => !["slate", "stone", "gray", "neutral"].includes(theme.name)) as theme (theme.name)} - {@const isActive = $config.theme === theme.name} + {@const isActive = config.current.theme === theme.name} {#if isMounted.current} -
-
{goal}
-
Calories/day
-
- - -
-
- -
- - - - - diff --git a/v4/src/lib/registry/examples/cards/all.svelte b/v4/src/lib/registry/examples/cards/all.svelte deleted file mode 100644 index 14dfa56dfe..0000000000 --- a/v4/src/lib/registry/examples/cards/all.svelte +++ /dev/null @@ -1,58 +0,0 @@ - - -
-
- -
- -
- -
-
- -
-
-
-
- - - -
-
- - - -
-
-
-
- - - -
- -
-
-
diff --git a/v4/src/lib/registry/examples/cards/calendar.svelte b/v4/src/lib/registry/examples/cards/calendar.svelte deleted file mode 100644 index 2fdc977bb8..0000000000 --- a/v4/src/lib/registry/examples/cards/calendar.svelte +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - diff --git a/v4/src/lib/registry/examples/cards/chat.svelte b/v4/src/lib/registry/examples/cards/chat.svelte deleted file mode 100644 index 7342482e42..0000000000 --- a/v4/src/lib/registry/examples/cards/chat.svelte +++ /dev/null @@ -1,207 +0,0 @@ - - - - -
- - - OM - -
-

Sofia Davis

-

m@example.com

-
-
- - (open = true)} - > - - New message - - New message - -
- -
- {#each messages as message (message)} -
- {message.content} -
- {/each} -
-
- -
{ - event.preventDefault(); - if (inputLength === 0) return; - messages.push({ - role: "user", - content: input, - }); - input = ""; - }} - class="flex w-full items-center space-x-2" - > - - -
-
-
- - - - New message - - Invite a user to this thread. This will create a new group message. - - - - - - No users found. - - {#each users as user (user.email)} - { - if (selectedUsers.includes(user)) { - selectedUsers = selectedUsers.filter( - (selectedUser) => selectedUser !== user - ); - } else { - selectedUsers = [...users].filter((u) => - [...selectedUsers, user].includes(u) - ); - } - }} - > - - - {user.name[0]} - -
-

- {user.name} -

-

- {user.email} -

-
- {#if selectedUsers.includes(user)} - - {/if} -
- {/each} -
-
-
- - {#if selectedUsers.length} -
- {#each selectedUsers as user (user.email)} - - - {user.name[0]} - - {/each} -
- {:else} -

Select users to add to this thread.

- {/if} - -
-
-
diff --git a/v4/src/lib/registry/examples/cards/cookie-settings.svelte b/v4/src/lib/registry/examples/cards/cookie-settings.svelte deleted file mode 100644 index 0a6c6bdf78..0000000000 --- a/v4/src/lib/registry/examples/cards/cookie-settings.svelte +++ /dev/null @@ -1,45 +0,0 @@ - - - - - Cookie Settings - Manage your cookie settings here. - - -
- - -
-
- - -
-
- - -
-
- - - -
diff --git a/v4/src/lib/registry/examples/cards/create-account.svelte b/v4/src/lib/registry/examples/cards/create-account.svelte deleted file mode 100644 index 6be03edbd7..0000000000 --- a/v4/src/lib/registry/examples/cards/create-account.svelte +++ /dev/null @@ -1,45 +0,0 @@ - - - - - Create an account - Enter your email below to create your account - - -
- - -
-
-
- -
-
- Or continue with -
-
-
- - -
-
- - -
-
- - - -
diff --git a/v4/src/lib/registry/examples/cards/data-table.svelte b/v4/src/lib/registry/examples/cards/data-table.svelte deleted file mode 100644 index 18f56d51d7..0000000000 --- a/v4/src/lib/registry/examples/cards/data-table.svelte +++ /dev/null @@ -1,319 +0,0 @@ - - - - - Payments - Manage your payments. - - -
- table.getColumn("email")?.setFilterValue(e.currentTarget.value)} - onchange={(e) => { - table.getColumn("email")?.setFilterValue(e.currentTarget.value); - }} - class="max-w-sm" - /> - - - {#snippet child({ props })} - - {/snippet} - - - {#each table - .getAllColumns() - .filter((col) => col.getCanHide()) as column (column)} - column.getIsVisible(), (v) => column.toggleVisibility(!!v) - } - > - {column.id} - - {/each} - - -
-
- - - {#each table.getHeaderGroups() as headerGroup (headerGroup.id)} - - {#each headerGroup.headers as header (header.id)} - - {#if !header.isPlaceholder} - - {/if} - - {/each} - - {/each} - - - {#each table.getRowModel().rows as row (row.id)} - - {#each row.getVisibleCells() as cell (cell.id)} - - - - {/each} - - {:else} - - - No results. - - - {/each} - - -
-
-
- {table.getFilteredSelectedRowModel().rows.length} of - {table.getFilteredRowModel().rows.length} row(s) selected. -
-
- - -
-
-
-
diff --git a/v4/src/lib/registry/examples/cards/github.svelte b/v4/src/lib/registry/examples/cards/github.svelte deleted file mode 100644 index e68d815edd..0000000000 --- a/v4/src/lib/registry/examples/cards/github.svelte +++ /dev/null @@ -1,61 +0,0 @@ - - - - -
- shadcn-svelte - - Beautifully designed components built with Melt UI and Tailwind CSS. - -
-
- - - - - - - - - Suggested Lists - - Future Ideas - My Stack - Inspiration - - - Create List - - - - -
-
- -
-
- - TypeScript -
-
- - 1k -
-
Updated April 2023
-
-
-
diff --git a/v4/src/lib/registry/examples/cards/index.ts b/v4/src/lib/registry/examples/cards/index.ts deleted file mode 100644 index 041c6cf04e..0000000000 --- a/v4/src/lib/registry/examples/cards/index.ts +++ /dev/null @@ -1,14 +0,0 @@ -export { default as CardsActivityGoal } from "./activity-goal.svelte"; -export { default as CardsCalendar } from "./calendar.svelte"; -export { default as CardsCookieSettings } from "./cookie-settings.svelte"; -export { default as CardsCreateAccount } from "./create-account.svelte"; -export { default as CardsDataTable } from "./data-table.svelte"; -export { default as CardsGithub } from "./github.svelte"; -export { default as CardsMetric } from "./metric.svelte"; -export { default as CardsNotifications } from "./notifications.svelte"; -export { default as CardsPaymentMethod } from "./payment-method.svelte"; -export { default as CardsReportIssue } from "./report-issue.svelte"; -export { default as CardsShare } from "./share.svelte"; -export { default as CardsStats } from "./stats.svelte"; -export { default as CardsDefault } from "./all.svelte"; -export { default as CardsChat } from "./chat.svelte"; diff --git a/v4/src/lib/registry/examples/cards/metric.svelte b/v4/src/lib/registry/examples/cards/metric.svelte deleted file mode 100644 index 6b2a7f37e5..0000000000 --- a/v4/src/lib/registry/examples/cards/metric.svelte +++ /dev/null @@ -1,18 +0,0 @@ - - - - - Exercise Minutes - Your excercise minutes are ahead of where you normally are. - - -
- -
-
-
diff --git a/v4/src/lib/registry/examples/cards/notifications.svelte b/v4/src/lib/registry/examples/cards/notifications.svelte deleted file mode 100644 index f7c5d26845..0000000000 --- a/v4/src/lib/registry/examples/cards/notifications.svelte +++ /dev/null @@ -1,40 +0,0 @@ - - - - - Notifications - Choose what you want to be notified about. - - -
- -
-

Everything

-

Email digest, mentions & all activity.

-
-
-
- -
-

Available

-

Only mentions and comments.

-
-
-
- -
-

Ignoring

-

Turn off all notifications.

-
-
-
-
diff --git a/v4/src/lib/registry/examples/cards/payment-method.svelte b/v4/src/lib/registry/examples/cards/payment-method.svelte deleted file mode 100644 index 4ca84e86b0..0000000000 --- a/v4/src/lib/registry/examples/cards/payment-method.svelte +++ /dev/null @@ -1,161 +0,0 @@ - - - - - Payment Method - Add a new payment method to your account. - - - - - - - -
- - -
-
- - -
-
- - -
-
-
- - - - {monthLabel} - - - {#each months as { value, label } (value)} - - {/each} - - -
-
- - - - {year ?? "Year"} - - - {#each { length: 10 } as _, i (i)} - - {/each} - - -
-
- - -
-
-
- - - -
diff --git a/v4/src/lib/registry/examples/cards/report-issue.svelte b/v4/src/lib/registry/examples/cards/report-issue.svelte deleted file mode 100644 index 0a1281f22c..0000000000 --- a/v4/src/lib/registry/examples/cards/report-issue.svelte +++ /dev/null @@ -1,112 +0,0 @@ - - - - - Report an issue - What area are you having problems with? - - -
-
- - - - {areaLabel} - - - {#each areas as { value, label } (value)} - - {/each} - - -
-
- - - - {securityLevelLabel} - - - {#each securityLevels as { value, label } (value)} - - {/each} - - -
-
-
- - -
-
- -