Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ui fix for labels of sidebarNavItem #921

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<a
href={item.href}
class={cn(
"group flex w-full items-center rounded-md border border-transparent px-2 py-1 hover:underline",
"group w-full rounded-md border border-transparent px-2 py-1",
item.disabled && "cursor-not-allowed opacity-60",
$page.url.pathname === item.href
? "font-medium text-foreground"
Expand All @@ -22,10 +22,10 @@
target={item.external ? "_blank" : ""}
rel={item.external ? "noreferrer" : ""}
>
{item.title}
<span class="group-hover:underline">{item.title}</span>
{#if item.label}
<span
class="ml-2 rounded-md bg-[#adfa1d] px-1.5 py-0.5 text-xs leading-none text-[#000000] no-underline group-hover:no-underline"
class="ml-1 inline-block rounded-md bg-[#adfa1d] px-1.5 py-0.5 text-xs leading-none text-[#000000]"
>
{item.label}
</span>
Expand Down
11 changes: 5 additions & 6 deletions apps/www/src/lib/registry/default/ui/carousel/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ import { getContext, hasContext, setContext } from "svelte";
import type { HTMLAttributes } from "svelte/elements";
import type { Readable, Writable } from "svelte/store";

export type CarouselAPI =
NonNullable<NonNullable<EmblaCarouselSvelteType["$$_attributes"]>["on:emblaInit"]> extends (
evt: CustomEvent<infer CarouselAPI>
) => void
? CarouselAPI
: never;
export type CarouselAPI = NonNullable<
NonNullable<EmblaCarouselSvelteType["$$_attributes"]>["on:emblaInit"]
> extends (evt: CustomEvent<infer CarouselAPI>) => void
? CarouselAPI
: never;

type EmblaCarouselConfig = NonNullable<Parameters<typeof emblaCarouselSvelte>[1]>;

Expand Down
11 changes: 5 additions & 6 deletions apps/www/src/lib/registry/new-york/ui/carousel/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ import { getContext, hasContext, setContext } from "svelte";
import type { HTMLAttributes } from "svelte/elements";
import type { Readable, Writable } from "svelte/store";

export type CarouselAPI =
NonNullable<NonNullable<EmblaCarouselSvelteType["$$_attributes"]>["on:emblaInit"]> extends (
evt: CustomEvent<infer CarouselAPI>
) => void
? CarouselAPI
: never;
export type CarouselAPI = NonNullable<
NonNullable<EmblaCarouselSvelteType["$$_attributes"]>["on:emblaInit"]
> extends (evt: CustomEvent<infer CarouselAPI>) => void
? CarouselAPI
: never;

type EmblaCarouselConfig = NonNullable<Parameters<typeof emblaCarouselSvelte>[1]>;

Expand Down
101 changes: 44 additions & 57 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,59 +1,46 @@
{
"name": "shadcn-svelte",
"version": "0.0.1",
"description": "monorepo for shadcn-svelte",
"author": {
"name": "huntabyte",
"url": "https://twitter.com/huntabyte"
},
"private": true,
"scripts": {
"build": "pnpm build:registry && pnpm build:site",
"build:cli": "pnpm -F shadcn-svelte build",
"build:registry": "pnpm -F www build:registry",
"build:site": "pnpm -F www build",
"dev": "pnpm build:registry && pnpm -F www dev",
"dev:cli": "pnpm -F shadcn-svelte start:dev",
"preview": "pnpm -F www preview",
"test": "pnpm -F www test",
"check": "pnpm -F www check",
"check:watch": "pnpm -F www check:watch",
"test:unit": "pnpm -F www test:unit",
"lint": "prettier --check . && eslint .",
"format:check": "pnpm -r format:check",
"format": "prettier --write .",
"preinstall": "npx only-allow pnpm",
"postinstall": "pnpm -r sync",
"ci:publish": "changeset publish",
"ci:build": "pnpm build:cli",
"ci:release": "pnpm ci:build && pnpm ci:publish"
},
"engines": {
"pnpm": ">=8",
"node": ">=18"
},
"repository": {
"type": "git",
"url": "https://github.com/huntabyte/shadcn-svelte.git"
},
"license": "MIT",
"type": "module",
"devDependencies": {
"@antfu/eslint-config": "^2.11.6",
"@changesets/cli": "^2.27.1",
"@huntabyte/eslint-config": "^0.0.1",
"eslint": "^8.57.0",
"eslint-plugin-antfu": "^2.1.2",
"eslint-plugin-svelte": "2.36.0-next.13",
"prettier": "^3.2.5",
"prettier-plugin-svelte": "^3.2.3",
"prettier-plugin-tailwindcss": "^0.5.12",
"pretty-quick": "^4.0.0",
"simple-git-hooks": "^2.10.0",
"svelte": "^4.2.12",
"svelte-eslint-parser": "^0.33.1"
},
"simple-git-hooks": {
"pre-commit": "pnpm -r format:staged --staged"
}
"name": "shadcn-svelte",
"version": "0.0.1",
"description": "monorepo for shadcn-svelte",
"author": {
"name": "huntabyte",
"url": "https://twitter.com/huntabyte"
},
"private": true,
"scripts": {
"build": "pnpm build:registry && pnpm --filter www build",
"build:cli": "pnpm --filter shadcn-svelte build",
"build:registry": "pnpm --filter www build:registry",
"dev": "pnpm build:registry && pnpm --filter www dev",
"dev:cli": "pnpm --filter shadcn-svelte start:dev",
"preview": "pnpm --filter www preview",
"test": "pnpm --filter www test",
"check": "pnpm --filter www check",
"check:watch": "pnpm --filter www check:watch",
"test:unit": "pnpm --filter www test:unit",
"lint": "pnpm -r lint",
"format:check": "pnpm -r format:check",
"format": "pnpm -r format",
"preinstall": "npx only-allow pnpm",
"postinstall": "pnpm -r sync",
"ci:publish": "changeset publish",
"ci:build": "pnpm --filter shadcn-svelte build",
"ci:release": "pnpm ci:build && pnpm ci:publish",
"pub:beta": "cd packages/cli && pnpm pub:beta",
"pub:release": "cd packages/cli && pnpm pub:release"
},
"engines": {
"pnpm": ">=8"
},
"repository": {
"type": "git",
"url": "https://github.com/huntabyte/shadcn-svelte.git"
},
"license": "MIT",
"type": "module",
"devDependencies": {
"@changesets/cli": "^2.27.1",
"pretty-quick": "^4.0.0",
"simple-git-hooks": "^2.10.0"
}
}
Loading