diff --git a/apps/www/src/lib/registry/default/example/button-icon.svelte b/apps/www/src/lib/registry/default/example/button-icon.svelte index 858bc0aa1..cb9552d67 100644 --- a/apps/www/src/lib/registry/default/example/button-icon.svelte +++ b/apps/www/src/lib/registry/default/example/button-icon.svelte @@ -4,5 +4,5 @@ diff --git a/apps/www/src/lib/registry/default/ui/table/table.svelte b/apps/www/src/lib/registry/default/ui/table/table.svelte index 99a093b6a..f945a244c 100644 --- a/apps/www/src/lib/registry/default/ui/table/table.svelte +++ b/apps/www/src/lib/registry/default/ui/table/table.svelte @@ -8,7 +8,7 @@ export { className as class }; -
+
diff --git a/apps/www/src/lib/registry/new-york/ui/table/table.svelte b/apps/www/src/lib/registry/new-york/ui/table/table.svelte index 99a093b6a..f945a244c 100644 --- a/apps/www/src/lib/registry/new-york/ui/table/table.svelte +++ b/apps/www/src/lib/registry/new-york/ui/table/table.svelte @@ -8,7 +8,7 @@ export { className as class }; -
+
- Asc - Desc + + + Asc + + + + Desc + diff --git a/apps/www/src/routes/examples/tasks/(components)/data-table-faceted-filter.svelte b/apps/www/src/routes/examples/tasks/(components)/data-table-faceted-filter.svelte index 42a92f28e..519c52d94 100644 --- a/apps/www/src/routes/examples/tasks/(components)/data-table-faceted-filter.svelte +++ b/apps/www/src/routes/examples/tasks/(components)/data-table-faceted-filter.svelte @@ -11,7 +11,7 @@ export let filterValues: string[] = []; export let title: string; export let options = [] as typeof statuses; - + export let view: "pill" | "list" = "pill"; let open = false; const handleSelect = (currentValue: string) => { @@ -29,48 +29,9 @@ }; - - - - - +{#if view === "list"} +
+ {title} @@ -91,7 +52,7 @@ : "opacity-50 [&_svg]:invisible" )} > - +
{option.label} @@ -99,18 +60,119 @@ {/each} + + + { + filterValues = + filterValues.length > 0 + ? [] + : options.map(({ value }) => value); + }} + > + {#if filterValues.length > 0} + Clear filters + {:else} + Select all + {/if} + + + + +{:else} + + + + + + + + + No results found. + + {#each options as option} + { + handleSelect(currentValue); + }} + > +
+ +
+ + {option.label} + +
+ {/each} +
+ { - filterValues = []; + filterValues = + filterValues.length > 0 + ? [] + : options.map(({ value }) => value); }} > - Clear filters + {#if filterValues.length > 0} + Clear filters + {:else} + Select all + {/if} - {/if} -
-
-
-
+ + +
+
+{/if} diff --git a/apps/www/src/routes/examples/tasks/(components)/data-table-filter-left-sidebar.svelte b/apps/www/src/routes/examples/tasks/(components)/data-table-filter-left-sidebar.svelte new file mode 100644 index 000000000..ac8a19816 --- /dev/null +++ b/apps/www/src/routes/examples/tasks/(components)/data-table-filter-left-sidebar.svelte @@ -0,0 +1,69 @@ + + + diff --git a/apps/www/src/routes/examples/tasks/(components)/data-table-filter-right-sidebar.svelte b/apps/www/src/routes/examples/tasks/(components)/data-table-filter-right-sidebar.svelte new file mode 100644 index 000000000..f7ca45acf --- /dev/null +++ b/apps/www/src/routes/examples/tasks/(components)/data-table-filter-right-sidebar.svelte @@ -0,0 +1,100 @@ + + +