From 60275226f962b86a553a2dcf2dea5eaedb3f0e5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0dris=20=C3=87elik?= Date: Sun, 25 Jan 2026 13:25:00 +0300 Subject: [PATCH 1/2] feat(admin): implement FilterChips component and stories --- .../crud-data/FilterChips.stories.svelte | 201 +++++++++++++++++ .../admin/crud-data/FilterChips.svelte | 213 ++++++++++++++++++ 2 files changed, 414 insertions(+) create mode 100644 hexawebshare/src/components/admin/crud-data/FilterChips.stories.svelte diff --git a/hexawebshare/src/components/admin/crud-data/FilterChips.stories.svelte b/hexawebshare/src/components/admin/crud-data/FilterChips.stories.svelte new file mode 100644 index 00000000..652bb56a --- /dev/null +++ b/hexawebshare/src/components/admin/crud-data/FilterChips.stories.svelte @@ -0,0 +1,201 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + console.log('Remove', id), + onClearAll: () => console.log('Clear all') + }} +/> + + + + + + + + + diff --git a/hexawebshare/src/components/admin/crud-data/FilterChips.svelte b/hexawebshare/src/components/admin/crud-data/FilterChips.svelte index 315da078..7c7fdee2 100644 --- a/hexawebshare/src/components/admin/crud-data/FilterChips.svelte +++ b/hexawebshare/src/components/admin/crud-data/FilterChips.svelte @@ -2,3 +2,216 @@ SPDX-FileCopyrightText: 2025 hexaTune LLC SPDX-License-Identifier: MIT --> + + + +
+ {#if loading && filters.length === 0} + + {:else} + {#each filters as filter (filter.id)} +
+ + {filter.label}: + {filter.value} + + {#if onRemove && !disabled && !loading} + onRemove?.(filter.id)} + ariaLabel={removeFilterAriaLabelFormat.replace('{label}', filter.label)} + class="hover:bg-base-content/20 flex h-auto min-h-0 items-center justify-center p-0.5" + > + + + {/if} +
+ {/each} + + {#if filters.length > 0 && onClearAll && !disabled && !loading} + + {/if} + {/if} +
From 9aa7133026baaa89a4879bb39c1b8a2b0c8608af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0dris=20=C3=87elik?= Date: Sun, 25 Jan 2026 18:02:51 +0300 Subject: [PATCH 2/2] fix(admin): change Turkish text to English in FilterChips stories --- .../src/components/admin/crud-data/FilterChips.stories.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hexawebshare/src/components/admin/crud-data/FilterChips.stories.svelte b/hexawebshare/src/components/admin/crud-data/FilterChips.stories.svelte index 652bb56a..aa3cde4e 100644 --- a/hexawebshare/src/components/admin/crud-data/FilterChips.stories.svelte +++ b/hexawebshare/src/components/admin/crud-data/FilterChips.stories.svelte @@ -131,7 +131,7 @@ SPDX-License-Identifier: MIT name="With Clear All" args={{ filters: sampleFilters, - clearAllLabel: 'Filtreleri Temizle' + clearAllLabel: 'Clear All Filters' }} />