From 56f0a27d28b7af5e2179d90b7b0e5e1bd7e0e49f Mon Sep 17 00:00:00 2001 From: Hunter Johnston Date: Wed, 30 Oct 2024 09:54:24 -0400 Subject: [PATCH 1/2] default icon sizes for dropdown menu items --- sites/docs/src/content/components/command.md | 6 ++++++ sites/docs/src/content/components/dropdown-menu.md | 7 +++++++ .../lib/registry/default/ui/command/command-item.svelte | 2 +- .../ui/dropdown-menu/dropdown-menu-sub-trigger.svelte | 4 ++-- .../lib/registry/new-york/ui/command/command-item.svelte | 2 +- .../ui/dropdown-menu/dropdown-menu-sub-trigger.svelte | 4 ++-- .../tasks/(components)/data-table-pagination.svelte | 1 + 7 files changed, 20 insertions(+), 6 deletions(-) diff --git a/sites/docs/src/content/components/command.md b/sites/docs/src/content/components/command.md index ed26fa3a5..5ced972d5 100644 --- a/sites/docs/src/content/components/command.md +++ b/sites/docs/src/content/components/command.md @@ -104,3 +104,9 @@ To show the command menu in a dialog, use the `` component ins ``` + +## Changelog + +### 2024-10-30 Classes for icons + +- Added `gap-2 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0` to the `` component to automatically style the icons inside. diff --git a/sites/docs/src/content/components/dropdown-menu.md b/sites/docs/src/content/components/dropdown-menu.md index 367299689..911a1c39e 100644 --- a/sites/docs/src/content/components/dropdown-menu.md +++ b/sites/docs/src/content/components/dropdown-menu.md @@ -75,3 +75,10 @@ Install `bits-ui`:
+ +## Changelog + +### 2024-10-30 Classes for DropdownMenu.SubTrigger + +- Added `gap-2 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0` to the `` to automatically style icon inside the dropdown menu sub trigger. +- Removed `size-4` from the icon inside the `` since it is now handled by the parent ``. diff --git a/sites/docs/src/lib/registry/default/ui/command/command-item.svelte b/sites/docs/src/lib/registry/default/ui/command/command-item.svelte index 666311e68..3738ff270 100644 --- a/sites/docs/src/lib/registry/default/ui/command/command-item.svelte +++ b/sites/docs/src/lib/registry/default/ui/command/command-item.svelte @@ -11,7 +11,7 @@ {@render children?.()} - + diff --git a/sites/docs/src/lib/registry/new-york/ui/command/command-item.svelte b/sites/docs/src/lib/registry/new-york/ui/command/command-item.svelte index 666311e68..3738ff270 100644 --- a/sites/docs/src/lib/registry/new-york/ui/command/command-item.svelte +++ b/sites/docs/src/lib/registry/new-york/ui/command/command-item.svelte @@ -11,7 +11,7 @@ {@render children?.()} - + diff --git a/sites/docs/src/routes/(app)/examples/tasks/(components)/data-table-pagination.svelte b/sites/docs/src/routes/(app)/examples/tasks/(components)/data-table-pagination.svelte index 3551f902c..a86bee3f3 100644 --- a/sites/docs/src/routes/(app)/examples/tasks/(components)/data-table-pagination.svelte +++ b/sites/docs/src/routes/(app)/examples/tasks/(components)/data-table-pagination.svelte @@ -23,6 +23,7 @@

Rows per page

{ From 0b70f54116a5f9c1006cddb6317b6678147999d1 Mon Sep 17 00:00:00 2001 From: Hunter Johnston Date: Wed, 30 Oct 2024 10:54:51 -0400 Subject: [PATCH 2/2] tidy up --- pnpm-lock.yaml | 12 ++++++------ sites/docs/package.json | 2 +- .../routes/(app)/examples/forms/profile-form.svelte | 4 +++- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ba9fcf6d5..fbc0674e6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -193,8 +193,8 @@ importers: specifier: ^3.0.3 version: 3.0.3 formsnap: - specifier: 2.0.0-next.0 - version: 2.0.0-next.0(svelte@5.0.4)(sveltekit-superforms@2.19.1(@sveltejs/kit@2.7.2(@sveltejs/vite-plugin-svelte@4.0.0(svelte@5.0.4)(vite@5.4.9(@types/node@20.16.14)(terser@5.36.0)))(svelte@5.0.4)(vite@5.4.9(@types/node@20.16.14)(terser@5.36.0)))(@types/json-schema@7.0.15)(svelte@5.0.4)) + specifier: 2.0.0-next.1 + version: 2.0.0-next.1(svelte@5.0.4)(sveltekit-superforms@2.19.1(@sveltejs/kit@2.7.2(@sveltejs/vite-plugin-svelte@4.0.0(svelte@5.0.4)(vite@5.4.9(@types/node@20.16.14)(terser@5.36.0)))(svelte@5.0.4)(vite@5.4.9(@types/node@20.16.14)(terser@5.36.0)))(@types/json-schema@7.0.15)(svelte@5.0.4)) hast-util-to-html: specifier: ^9.0.1 version: 9.0.1 @@ -3346,11 +3346,11 @@ packages: resolution: {integrity: sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==} engines: {node: '>=14'} - formsnap@2.0.0-next.0: - resolution: {integrity: sha512-cxZNwFeHv6wguYH1BbaX0hPpl7xBDVqk0JEEtUTukBdlXK7DMrSLdBMUnruKGtChcDcjGZKQrMxxCq9Xw3PpjQ==} + formsnap@2.0.0-next.1: + resolution: {integrity: sha512-ha8r9eMmsGEGMY+ljV3FEyTtB72E7dt95y9HHUbCcaDnjbz3Q6n00BHLz7dfBZ9rqyaMeIO200EmP1IcYMExeg==} engines: {node: '>=18', pnpm: '>=8.7.0'} peerDependencies: - svelte: ^4.0.0 || ^5.0.0-next.1 + svelte: ^5.0.0 sveltekit-superforms: ^2.19.0 fraction.js@4.3.7: @@ -9382,7 +9382,7 @@ snapshots: cross-spawn: 7.0.3 signal-exit: 4.1.0 - formsnap@2.0.0-next.0(svelte@5.0.4)(sveltekit-superforms@2.19.1(@sveltejs/kit@2.7.2(@sveltejs/vite-plugin-svelte@4.0.0(svelte@5.0.4)(vite@5.4.9(@types/node@20.16.14)(terser@5.36.0)))(svelte@5.0.4)(vite@5.4.9(@types/node@20.16.14)(terser@5.36.0)))(@types/json-schema@7.0.15)(svelte@5.0.4)): + formsnap@2.0.0-next.1(svelte@5.0.4)(sveltekit-superforms@2.19.1(@sveltejs/kit@2.7.2(@sveltejs/vite-plugin-svelte@4.0.0(svelte@5.0.4)(vite@5.4.9(@types/node@20.16.14)(terser@5.36.0)))(svelte@5.0.4)(vite@5.4.9(@types/node@20.16.14)(terser@5.36.0)))(@types/json-schema@7.0.15)(svelte@5.0.4)): dependencies: svelte: 5.0.4 svelte-toolbelt: 0.4.4(svelte@5.0.4) diff --git a/sites/docs/package.json b/sites/docs/package.json index 10684b05a..865678c15 100644 --- a/sites/docs/package.json +++ b/sites/docs/package.json @@ -50,7 +50,7 @@ "embla-carousel-autoplay": "8.1.6", "embla-carousel-svelte": "8.1.6", "estree-walker": "^3.0.3", - "formsnap": "2.0.0-next.0", + "formsnap": "2.0.0-next.1", "hast-util-to-html": "^9.0.1", "is-reference": "^3.0.2", "lodash.template": "^4.5.0", diff --git a/sites/docs/src/routes/(app)/examples/forms/profile-form.svelte b/sites/docs/src/routes/(app)/examples/forms/profile-form.svelte index 2f9c78ffb..68a750c3f 100644 --- a/sites/docs/src/routes/(app)/examples/forms/profile-form.svelte +++ b/sites/docs/src/routes/(app)/examples/forms/profile-form.svelte @@ -69,7 +69,9 @@ Email - {$formData.email ?? "Select a verified email to display"} + {$formData.email && $formData.email.length + ? $formData.email + : "Select a verified email to display"}