-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tree filters feature
- Loading branch information
Showing
36 changed files
with
967 additions
and
747 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 @@ | ||
<script lang="ts"> | ||
import { compareValues } from '$lib/components/sharedStore' | ||
export let compareInput = "" | ||
</script> | ||
|
||
<div class="dropdown"> | ||
<button class="dropdown-button px-2 py-1 text-xs text-center rounded-lg inline-flex items-center dark:text-white | ||
bg-gray-100 hover:bg-gray-200 dark:bg-gray-700 dark:hover:bg-gray-600 | ||
border border-gray-200 dark:border-gray-600"> | ||
{#if compareInput === ""} | ||
All Changes | ||
<svg class="w-2.5 h-2.5 ms-3" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 10 6"> | ||
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 4 4 4-4"/> | ||
</svg> | ||
{:else} | ||
<span class="font-fira text-gray-600 dark:text-gray-300 px-1">{compareInput}</span> {compareValues.filter(x => x.value === compareInput)[0].label} | ||
<button class="text-gray-600 hover:text-gray-900 dark:text-gray-300 dark:hover:text-gray-400" on:click={() => compareInput = ""}> | ||
<svg class="w-4 h-4 ms-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" viewBox="0 0 24 24"> | ||
<path fill-rule="evenodd" d="M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Zm7.707-3.707a1 1 0 0 0-1.414 1.414L10.586 12l-2.293 2.293a1 1 0 1 0 1.414 1.414L12 13.414l2.293 2.293a1 1 0 0 0 1.414-1.414L13.414 12l2.293-2.293a1 1 0 0 0-1.414-1.414L12 10.586 9.707 8.293Z" clip-rule="evenodd"/> | ||
</svg> | ||
</button> | ||
{/if} | ||
</button> | ||
<div class="dropdown-content absolute z-10 hidden dark:text-white rounded-lg shadow | ||
bg-gray-100 dark:bg-gray-700 border border-gray-200 dark:border-gray-600"> | ||
<div class="my-1 overflow-y-auto scroll-light dark:scroll-dark"> | ||
<ul> | ||
{#each compareValues as entry} | ||
{#if entry.value != ""} | ||
<!-- svelte-ignore a11y-click-events-have-key-events --> | ||
<!-- svelte-ignore a11y-no-noninteractive-element-interactions --> | ||
<li class="flex items-center px-4 py-2 text-xs hover:bg-gray-200 dark:hover:bg-gray-600 cursor-pointer" on:click={() => compareInput = entry.value}> | ||
<p class="flex"> | ||
<span class="font-fira text-gray-500 dark:text-gray-400 w-3">{entry.value}</span> | ||
<span class="ml-1">{entry.label}</span> | ||
</p> | ||
</li> | ||
{/if} | ||
{/each} | ||
</ul> | ||
</div> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<script lang="ts"> | ||
export let home: boolean; | ||
export let home: boolean | ||
</script> | ||
|
||
<p | ||
|
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,23 @@ | ||
<script lang="ts"> | ||
import { fade } from "svelte/transition" | ||
export let enabled: number | ||
export let showPlatformFilters = false | ||
</script> | ||
|
||
{#if enabled} | ||
<button class="flex items-center px-3 py-1 rounded-lg text-xs text-nowrap | ||
text-white bg-blue-600 dark:bg-blue-700 hover:bg-blue-700 dark:hover:bg-blue-600" | ||
on:click={() => showPlatformFilters = !showPlatformFilters}> | ||
{#if !showPlatformFilters} | ||
<svg class="w-2 h-2 mr-1" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 18 18"> | ||
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 1v16M1 9h16"/> | ||
</svg> | ||
{:else} | ||
<svg class="w-2 h-2 mr-1" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 18 2"> | ||
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M1 1h16"/> | ||
</svg> | ||
{/if} | ||
Platform Filters | ||
</button> | ||
{/if} |
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,20 @@ | ||
<script lang="ts"> | ||
import { fade } from "svelte/transition" | ||
export let showPlatformFilters: boolean | ||
export let supportedPlatforms: string[] | ||
export let platformSelected = "" | ||
</script> | ||
|
||
{#if showPlatformFilters && supportedPlatforms?.length} | ||
<div transition:fade class="mt-4 grid grid-cols-2 md:grid-cols-6 lg:grid-cols-8 gap-4"> | ||
{#each supportedPlatforms as entry} | ||
<input id="platform-{entry}" type="radio" class="hidden peer" bind:group={platformSelected} value="{entry}"/> | ||
<label for="platform-{entry}" class="px-3 py-1 text-xs dark:text-white rounded-lg text-center cursor-pointer | ||
{entry === platformSelected ? | ||
'text-white dark:text-white bg-blue-600 dark:bg-blue-700' : | ||
'text-black dark:text-gray-400 bg-gray-100 hover:bg-gray-300 dark:bg-gray-700 dark:hover:bg-gray-500'}">{entry} | ||
</label> | ||
{/each} | ||
</div> | ||
{/if} |
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,11 @@ | ||
<script lang="ts"> | ||
export let searchInput: string = "" | ||
</script> | ||
|
||
<div class="my-2 font-fira"> | ||
<input type="text" bind:value={searchInput} placeholder="Search..." | ||
class="px-3 py-2 rounded-lg w-full text-[12.5px] | ||
text-gray-900 dark:text-white dark:placeholder-gray-400 | ||
border border-gray-300 dark:border-gray-600 | ||
bg-gray-50 dark:bg-gray-700"> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<script lang="ts"> | ||
export let showPathPrefix: boolean | ||
</script> | ||
|
||
<div class="px-2 py-1 flex items-center border hover:border-gray-300 dark:border-gray-500 dark:hover:border-gray-400 rounded-lg"> | ||
<input id="prefix-checkbox" type="checkbox" class="w-3 h-3" bind:checked={showPathPrefix}> | ||
<label for="prefix-checkbox" class="ms-2 text-xs text-nowrap text-gray-900 dark:text-gray-300 cursor-pointer">Show prefix</label> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<script lang="ts"> | ||
import { stateValues } from '$lib/components/sharedStore' | ||
export let stateInput = "" | ||
</script> | ||
|
||
<div class="dropdown"> | ||
<button class="dropdown-button px-2 py-1 text-xs text-center rounded-lg inline-flex items-center dark:text-white | ||
bg-gray-100 hover:bg-gray-200 dark:bg-gray-700 dark:hover:bg-gray-600 | ||
border border-gray-200 dark:border-gray-600"> | ||
{#if stateInput === ""} | ||
State & Config | ||
<svg class="w-2.5 h-2.5 ms-3" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 10 6"> | ||
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 4 4 4-4"/> | ||
</svg> | ||
{:else} | ||
<span class="font-fira text-gray-600 dark:text-gray-300 px-1">{stateInput}</span> - {stateValues.filter(x => x.value === stateInput)[0].label} | ||
<button class="text-gray-600 hover:text-gray-900 dark:text-gray-300 dark:hover:text-gray-400" on:click={() => stateInput = ""}> | ||
<svg class="w-4 h-4 ms-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" viewBox="0 0 24 24"> | ||
<path fill-rule="evenodd" d="M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Zm7.707-3.707a1 1 0 0 0-1.414 1.414L10.586 12l-2.293 2.293a1 1 0 1 0 1.414 1.414L12 13.414l2.293 2.293a1 1 0 0 0 1.414-1.414L13.414 12l2.293-2.293a1 1 0 0 0-1.414-1.414L12 10.586 9.707 8.293Z" clip-rule="evenodd"/> | ||
</svg> | ||
</button> | ||
{/if} | ||
</button> | ||
<div class="dropdown-content absolute z-10 hidden dark:text-white rounded-lg shadow | ||
bg-gray-100 dark:bg-gray-700 border border-gray-200 dark:border-gray-600"> | ||
<div class="my-1 overflow-y-auto scroll-light dark:scroll-dark"> | ||
<ul> | ||
{#each stateValues as entry} | ||
{#if entry.value != ""} | ||
<!-- svelte-ignore a11y-click-events-have-key-events --> | ||
<!-- svelte-ignore a11y-no-noninteractive-element-interactions --> | ||
<li class="flex items-center px-4 py-2 text-xs hover:bg-gray-200 dark:hover:bg-gray-600 cursor-pointer" on:click={() => stateInput = entry.value}> | ||
<p class="flex"> | ||
<span class="font-fira text-gray-500 dark:text-gray-400 w-3 mr-2">{entry.value}</span> | ||
<span class="ml-1">{entry.label}</span> | ||
</p> | ||
</li> | ||
{/if} | ||
{/each} | ||
</ul> | ||
</div> | ||
</div> | ||
</div> |
Oops, something went wrong.