-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7ffc3e1
commit 8d54625
Showing
10 changed files
with
166 additions
and
60 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
div.vue-slider { | ||
@apply mt-5 mb-3.5 max-w-sm; | ||
} | ||
|
||
div.vue-slider-process, | ||
div.vue-slider-rail { | ||
@apply h-2 bg-neutral !important; | ||
} | ||
|
||
div.vue-slider-rail { | ||
@apply bg-highlight !important; | ||
} | ||
|
||
div.vue-slider .vue-slider-dot { | ||
@apply size-6 !important; | ||
} | ||
|
||
div.vue-slider-dot-tooltip-inner { | ||
@apply bg-white text-neutral border-border border px-1.5 !important; | ||
} | ||
|
||
span.vue-slider-dot-tooltip-text { | ||
@apply font-medium font-sans text-neutral; | ||
} | ||
|
||
div.vue-slider-dot-tooltip::before { | ||
@apply hidden; | ||
} | ||
|
||
div.vue-slider-dot .vue-slider-dot-handle { | ||
@apply border border-border shadow; | ||
} | ||
|
||
div.vue-slider-tooltip-wrap.vue-slider-tooltip-top { | ||
@apply font-sans; | ||
} | ||
|
||
.price-input { | ||
@apply space-x-3; | ||
} | ||
|
||
.vue-slider-component.vue-slider-horizontal { | ||
@apply mt-5; | ||
} |
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,14 @@ | ||
<input class="peer hidden" type="checkbox" checked :set="id = Math.random().toString(36).slice(2)" :id="id" /> | ||
|
||
<label class="flex cursor-pointer items-center justify-between gap-x-2 border-t pb-2.5 pt-4 text-neutral peer-checked:[&>.chevron]:rotate-180" :for="id"> | ||
<span class="block font-sans text-base font-semibold text-neutral"> | ||
@{{ filter?.name?.replace('_', ' ') }} | ||
</span> | ||
|
||
<x-heroicon-o-chevron-down class="size-4 chevron transition" /> | ||
</label> | ||
<div class="peer-checked:*:-my-1 peer-checked:*:py-1 grid grid-rows-[0fr] transition-all peer-checked:grid-rows-[1fr]"> | ||
<div class="-mx-1 overflow-hidden px-1"> | ||
{{ $slot }} | ||
</div> | ||
</div> |
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
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
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 |
---|---|---|
@@ -1,13 +1,16 @@ | ||
<dynamic-range-slider | ||
v-if="filter.input == 'price'" | ||
:component-id="filter.code" | ||
:data-field="filter.code" | ||
:title="filter.name.replace('_', ' ')" | ||
:react="{and: ['query-filter']}" | ||
:show-filter="false" | ||
:inner-class="{ | ||
title: 'capitalize text-sm font-medium text-gray-900', | ||
}" | ||
:slider-options="{ dragOnClick: true, useKeyboard: false }" | ||
u-r-l-params | ||
></dynamic-range-slider> | ||
<div v-if="filter.input == 'price'" class="relative pb-4"> | ||
<x-rapidez::filter.heading> | ||
<dynamic-range-slider | ||
:component-id="filter.code" | ||
:data-field="filter.code" | ||
:react="{and: ['query-filter']}" | ||
:show-filter="false" | ||
:slider-options="{ dragOnClick: true, useKeyboard: false }" | ||
:inner-class="{ | ||
slider: '!pt-4 !mt-0 mx-2', | ||
}" | ||
u-r-l-params | ||
> | ||
</dynamic-range-slider> | ||
</x-rapidez::filter.heading> | ||
</div> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,38 @@ | ||
<multi-list | ||
v-else-if="filter.text_swatch || filter.visual_swatch" | ||
:component-id="filter.code" | ||
:data-field="filter.super ? 'super_' + filter.code : filter.code" | ||
:data-field="filter.super ? 'super_' + filter.code : (filter.visual_swatch ? 'visual_' + filter.code : filter.code)" | ||
:inner-class="{ | ||
title: 'capitalize text-sm font-medium text-gray-900', | ||
list: '!max-h-full flex flex-wrap', | ||
}" | ||
:title="filter.name.replace('_', ' ')" | ||
:react="{and: filter.input == 'multiselect' ? reactiveFilters : reactiveFilters.filter(item => item != filter.code) }" | ||
:query-format="filter.input == 'multiselect' ? 'and' : 'or'" | ||
:show-search="false" | ||
:show-checkbox="false" | ||
u-r-l-params | ||
> | ||
<div | ||
v-if="filter.visual_swatch" | ||
slot="renderItem" | ||
slot-scope="{ label, isChecked }" | ||
class="w-6 h-6 border-black mr-1 mb-1 rounded-full hover:opacity-75" | ||
:class="isChecked ? 'border-2' : 'border'" | ||
:style="{ background: $root.swatches[filter.code]?.options[label].swatch }" | ||
> | ||
<x-heroicon-o-check v-if="isChecked"/> | ||
</div> | ||
|
||
<div | ||
v-else | ||
slot="renderItem" | ||
slot-scope="{ label, isChecked }" | ||
class="border-black mr-1 mb-1 px-3 hover:opacity-75" | ||
:class="isChecked ? 'border-2' : 'border'" | ||
:style="{ background: $root.swatches[filter.code]?.options[label].swatch }" | ||
> | ||
@{{ $root.swatches[filter.code]?.options[label].swatch }} | ||
<div slot="render" class="pb-4" slot-scope="{ data, value, handleChange }"> | ||
<x-rapidez::filter.heading> | ||
<div class="flex flex-wrap gap-2 items-center my-1"> | ||
<template v-for="swatch in data"> | ||
<label | ||
v-if="filter.visual_swatch" | ||
class="size-6 ring-black/5 ring-1 ring-inset cursor-pointer flex items-center justify-center hover:opacity-75 rounded-full transition" | ||
v-bind:class="{'outline-2 outline outline-black outline-offset-1' : value[swatch.key]}" | ||
v-bind:style="{ background: $root.swatches[filter.code]?.options[swatch.key].swatch }" | ||
> | ||
<input type="checkbox" v-on:change="handleChange(swatch.key)" class="hidden" v-bind:checked="value[swatch.key]"/> | ||
</label> | ||
<label | ||
v-else | ||
class="border px-3 transition-all rounded cursor-pointer text-sm text-inactive font-medium" | ||
v-bind:class="{'border-neutral text-neutral' : value[swatch.key]}" | ||
> | ||
@{{ $root.swatches[filter.code]?.options[swatch.key].swatch }} | ||
<input type="checkbox" v-on:change="handleChange(swatch.key)" class="hidden" v-bind:checked="value[swatch.key]"/> | ||
</label> | ||
</template> | ||
</div> | ||
</x-rapidez::filter.heading> | ||
</div> | ||
</multi-list> |