-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(@dpc-sdp/ripple-tide-search): added sort dropdown to custom coll…
…ection also added loading state and tidied up error display
- Loading branch information
1 parent
7398b3f
commit 5ed7868
Showing
5 changed files
with
146 additions
and
41 deletions.
There are no files selected for viewing
61 changes: 61 additions & 0 deletions
61
packages/ripple-tide-search/components/TideSearchAboveResults.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<template> | ||
<RplPageComponent> | ||
<div | ||
:class="{ | ||
'tide-search-listing-above-result': true, | ||
'tide-search-listing-above-result--compact': hasSidebar | ||
}" | ||
> | ||
<slot name="left"> | ||
<div /> | ||
</slot> | ||
|
||
<div class="tide-search-listing-above-result__right"> | ||
<slot name="right"> | ||
<div /> | ||
</slot> | ||
</div> | ||
</div> | ||
</RplPageComponent> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
interface Props { | ||
hasSidebar?: boolean | ||
} | ||
withDefaults(defineProps<Props>(), { | ||
hasSidebar: false | ||
}) | ||
</script> | ||
|
||
<style> | ||
@import '@dpc-sdp/ripple-ui-core/style/breakpoints'; | ||
.tide-search-listing-above-result { | ||
@media (--rpl-bp-m) { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: baseline; | ||
} | ||
} | ||
.tide-search-listing-above-result__right { | ||
@media (--rpl-bp-m) { | ||
width: 360px; | ||
} | ||
} | ||
.tide-search-listing-above-result.tide-search-listing-above-result--compact { | ||
@media (--rpl-bp-m) { | ||
display: block; | ||
} | ||
} | ||
.tide-search-listing-above-result--compact | ||
.tide-search-listing-above-result__right { | ||
@media (--rpl-bp-m) { | ||
width: auto; | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
packages/ripple-tide-search/components/TideSearchResultsLoadingState.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<template> | ||
<div :class="{ 'tide-search-results--loading': isActive }"> | ||
<slot /> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
interface Props { | ||
isActive?: boolean | ||
} | ||
withDefaults(defineProps<Props>(), { | ||
isActive: false | ||
}) | ||
</script> | ||
|
||
<style> | ||
.tide-search-results--loading { | ||
opacity: 0.5; | ||
pointer-events: none; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters