-
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.
- Loading branch information
1 parent
d0281ab
commit 9a8da76
Showing
44 changed files
with
6,640 additions
and
8,283 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
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,30 @@ | ||
<template> | ||
<div :class="$style.component" /> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
const message = 'Woof'; | ||
</script> | ||
|
||
<style module> | ||
.component { | ||
--spinner-size: 24px; | ||
width: var(--spinner-size); | ||
height: var(--spinner-size); | ||
border: 3px solid rgb(0 0 0 / 15%); | ||
border-top: 3px solid currentColor; | ||
border-radius: 50%; | ||
animation: spin 0.5s linear infinite; | ||
} | ||
@keyframes spin { | ||
0% { | ||
rotate: 0; | ||
} | ||
100% { | ||
rotate: 360deg; | ||
} | ||
} | ||
</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
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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<template> | ||
<div | ||
:class="$style.component" | ||
@click="handleClick" | ||
> | ||
{{ displayValue }} | ||
</div> | ||
</template> | ||
|
||
<script lang="ts" setup generic="Option"> | ||
interface Props { | ||
readonly option: Option; | ||
readonly displayField: string; | ||
} | ||
type Emits = (event: 'click', value: Option) => void | ||
const props = defineProps<Props>(); | ||
const emit = defineEmits<Emits>(); | ||
const displayValue = computed(() => { | ||
if (isRecord(props.option)) { | ||
return props.option[props.displayField] ?? 'N/A'; | ||
} | ||
return 'N/A'; | ||
}) | ||
function handleClick() { | ||
emit('click', props.option); | ||
} | ||
</script> | ||
|
||
<style module> | ||
.component { | ||
display: flex; | ||
align-items: center; | ||
height: var(--input-height); | ||
padding: 0 var(--input-spacing-horizontal); | ||
transition: background-color 0.15s ease-out; | ||
cursor: pointer; | ||
&:hover { | ||
background-color: color-mix(in srgb, var(--input-color-main) 15%, transparent) | ||
} | ||
&:global(.empty) { | ||
color: var(--input-color-placeholder); | ||
&:hover { | ||
background-color: initial; | ||
cursor: initial; | ||
} | ||
} | ||
} | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<template> | ||
<div :class="$style.component"> | ||
<slot /> | ||
</div> | ||
</template> | ||
|
||
<style module> | ||
.component { | ||
display: flex; | ||
height: 100%; | ||
align-items: center; | ||
color: var(--input-color-placeholder); | ||
padding: 0 var(--input-spacing-horizontal); | ||
} | ||
</style> |
Oops, something went wrong.