-
Filters
-
-
Match:
-
+ >
);
}
diff --git a/docs/src/pages/showcase/_components/ShowcaseFilters/styles.module.css b/docs/src/pages/showcase/_components/ShowcaseFilters/styles.module.css
index e36a9e6d672..b07e7a79f31 100644
--- a/docs/src/pages/showcase/_components/ShowcaseFilters/styles.module.css
+++ b/docs/src/pages/showcase/_components/ShowcaseFilters/styles.module.css
@@ -1,17 +1,25 @@
.filtersWrapper {
- flex: 1;
+ display: flex;
+ align-items: center;
+ flex-wrap: wrap;
+ gap: 16px;
+ height: 40px; /* Match the height of the search bar */
}
.filterHeader {
display: flex;
align-items: center;
- justify-content: space-between;
- margin-bottom: 16px;
+ justify-content: flex-start;
+ flex-shrink: 0;
+ height: 40px;
}
.filterTitle {
margin: 0;
font-size: 1.2rem;
+ margin-right: 16px;
+ white-space: nowrap;
+ font-weight: bold;
}
.operatorToggle {
@@ -19,6 +27,8 @@
align-items: center;
gap: 8px;
font-size: 0.9rem;
+ white-space: nowrap;
+ margin-left: 8px;
}
.operatorSwitch {
@@ -65,27 +75,35 @@
font-size: 0.8rem;
font-weight: bold;
text-align: center;
- transition: opacity 0.3s;
+ transition: color 0.3s;
}
.switchLabel:first-of-type {
left: 0;
- color: var(--ifm-color-emphasis-700);
- opacity: 1;
}
.switchLabel:last-of-type {
right: 0;
- color: white;
- opacity: 0.6;
}
+/* OR label color when OR is selected */
+.operatorSwitch:not(.operatorSwitchAnd) .switchLabel:first-of-type {
+ color: var(--ifm-color-emphasis-800);
+}
+
+/* OR label color when AND is selected */
.operatorSwitchAnd .switchLabel:first-of-type {
- opacity: 0.6;
+ color: white;
}
+/* AND label color when OR is selected */
+.operatorSwitch:not(.operatorSwitchAnd) .switchLabel:last-of-type {
+ color: var(--ifm-color-emphasis-600);
+}
+
+/* AND label color when AND is selected */
.operatorSwitchAnd .switchLabel:last-of-type {
- opacity: 1;
+ color: var(--ifm-color-emphasis-800);
}
.tagList {
@@ -93,6 +111,8 @@
align-items: center;
flex-wrap: wrap;
gap: 8px;
+ margin: 0;
+ padding: 0;
}
.tagListItem {
@@ -122,10 +142,63 @@
color: white;
}
+.filterControls {
+ display: flex;
+ align-items: center;
+ gap: 12px;
+ margin-left: 16px;
+}
+
+.clearButton {
+ display: inline-flex;
+ align-items: center;
+ margin-left:6px;
+ gap: 4px;
+ padding: 6px 14px;
+ border-radius: 15px;
+ font-size: 0.875rem;
+ font-weight: 500;
+ border: 1px solid var(--ifm-color-emphasis-300);
+ background-color: transparent;
+ color: var(--ifm-color-emphasis-700);
+ cursor: pointer;
+ transition: all 0.2s;
+}
+
+.clearButton:hover {
+ background-color: var(--ifm-color-emphasis-200);
+ color: var(--ifm-color-emphasis-900);
+}
+
+.clearButton:disabled {
+ opacity: 0.5;
+ cursor: not-allowed;
+}
+
+@media (max-width: 992px) {
+ .filtersWrapper {
+ height: auto;
+ width: 100%;
+ }
+
+ .filterHeader {
+ width: 100%;
+ justify-content: space-between;
+ }
+}
+
@media (max-width: 768px) {
.filterHeader {
flex-direction: column;
align-items: flex-start;
gap: 12px;
}
+
+ .filterControls {
+ margin-left: 0;
+ }
+
+ .tagList {
+ margin-top: 16px;
+ }
}
diff --git a/docs/src/pages/showcase/_components/ShowcaseLayout/styles.module.css b/docs/src/pages/showcase/_components/ShowcaseLayout/styles.module.css
index 342398cfa87..00b06960b9a 100644
--- a/docs/src/pages/showcase/_components/ShowcaseLayout/styles.module.css
+++ b/docs/src/pages/showcase/_components/ShowcaseLayout/styles.module.css
@@ -1,15 +1,37 @@
.filtersContainer {
display: flex;
- justify-content: space-between;
- align-items: center;
+ flex-direction: column;
margin-bottom: 20px;
- padding: 0 var(--ifm-spacing-horizontal);
+ padding: 12px var(--ifm-spacing-horizontal);
+ gap: 16px;
+ background-color: var(--ifm-color-emphasis-100);
+ border-radius: 8px;
+}
+
+.filtersRow {
+ display: flex;
+ justify-content: space-between;
+ width: 100%;
+ flex-wrap: nowrap;
+ gap: 16px;
+}
+
+.tagsRow {
+ display: flex;
+ width: 100%;
}
.submitButton {
margin-top: 1rem;
}
+@media (max-width: 992px) {
+ .filtersContainer {
+ flex-direction: column;
+ align-items: flex-start;
+ }
+}
+
@media (max-width: 768px) {
.filtersContainer {
flex-direction: column;
diff --git a/docs/src/pages/showcase/_components/ShowcaseSearchBar/styles.module.css b/docs/src/pages/showcase/_components/ShowcaseSearchBar/styles.module.css
index 3c28fba7f31..7afe5497aa3 100644
--- a/docs/src/pages/showcase/_components/ShowcaseSearchBar/styles.module.css
+++ b/docs/src/pages/showcase/_components/ShowcaseSearchBar/styles.module.css
@@ -1,5 +1,7 @@
.searchContainer {
width: 300px;
+ min-width: 200px;
+ flex-shrink: 0;
}
.searchInputWrapper {
@@ -24,6 +26,7 @@
color: var(--ifm-font-color-base);
font-size: 0.9rem;
transition: all var(--ifm-transition-fast);
+ margin: 0;
}
.searchInput:focus {
@@ -58,6 +61,12 @@
color: var(--ifm-color-emphasis-700);
}
+@media (max-width: 992px) {
+ .searchContainer {
+ width: 300px;
+ }
+}
+
@media (max-width: 768px) {
.searchContainer {
width: 100%;
diff --git a/docs/src/pages/showcase/index.tsx b/docs/src/pages/showcase/index.tsx
index de0954ee6fa..043f6542595 100644
--- a/docs/src/pages/showcase/index.tsx
+++ b/docs/src/pages/showcase/index.tsx
@@ -72,6 +72,10 @@ export default function Showcase(): JSX.Element {
setOperator(op => op === 'OR' ? 'AND' : 'OR');
};
+ const clearSearch = () => {
+ setSearchValue('');
+ };
+
const filteredUsers = useMemo(() => {
return filterUsers(sortedUsers, searchValue, selectedTags, operator);
}, [searchValue, selectedTags, operator]);
@@ -81,17 +85,24 @@ export default function Showcase(): JSX.Element {
-
-
-
+
+
+
+
+
+
+
+ {/* Tag buttons will be rendered inside ShowcaseFilters component */}
+
+