Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions design-system/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Design System - Unicode Lookup</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/design-system/main.ts"></script>
</body>
</html>
4 changes: 2 additions & 2 deletions dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="manifest" href="/manifest.json" />
<title>Unicode Lookup</title>
<script type="module" crossorigin src="/assets/index-BW8to3cp.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-CtjIMKUN.css">
<script type="module" crossorigin src="/assets/main-Dff8Vm2P.js"></script>
<link rel="stylesheet" crossorigin href="/assets/main-D-Cx_0zz.css">
</head>
<body>
<div id="app"></div>
Expand Down
11 changes: 9 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ onMounted(() => {
<template v-if="hasFirstLoaded">
<ResultsContainer v-if="results.length" />
<template v-else>
<br />
<p>No results fit that query :/</p>
<p class="no-results">No results fit that query</p>
</template>
</template>
<Loader v-else />
Expand All @@ -71,10 +70,12 @@ main {
margin: 0 auto;
width: 600px;
max-width: 100%;
padding: 0 var(--space-4);
}
@media (min-width: 640px) {
main {
max-width: none;
padding: 0;
}
}
.content.middle {
Expand All @@ -94,4 +95,10 @@ aside div {
overflow-y: auto;
height: 100vh;
}
.no-results {
color: var(--color-text-tertiary);
font-weight: 300;
letter-spacing: -0.01em;
padding: var(--space-4) 0;
}
</style>
38 changes: 23 additions & 15 deletions src/components/CommandPalette.vue
Original file line number Diff line number Diff line change
Expand Up @@ -140,33 +140,36 @@ const handleItemHover = (index: number) => {

<style scoped>
.command-palette {
width: 500px;
width: 480px;
max-width: 90vw;
}

.search-container {
padding: var(--space-3);
border-bottom: var(--border-width-1) solid var(--color-border);
padding: var(--space-4);
border-bottom: 1px solid rgba(128, 128, 128, 0.12);
}

.search-input {
width: 100%;
padding: var(--space-3) var(--space-4);
border: none;
background: var(--color-bg-offset);
border-radius: var(--radius-md);
background: var(--color-bg);
border-radius: var(--radius-lg);
font-size: var(--font-size-base);
font-weight: 300;
color: var(--color-text);
outline: none;
box-sizing: border-box;
letter-spacing: -0.01em;
}

.search-input::placeholder {
color: var(--color-text-tertiary);
opacity: 0.6;
}

.command-list {
max-height: 400px;
max-height: 360px;
overflow-y: auto;
padding: var(--space-2);
}
Expand All @@ -179,7 +182,7 @@ const handleItemHover = (index: number) => {
padding: var(--space-3) var(--space-4);
border: none;
background: transparent;
border-radius: var(--radius-md);
border-radius: var(--radius-lg);
cursor: pointer;
text-align: left;
color: var(--color-text);
Expand All @@ -194,31 +197,36 @@ const handleItemHover = (index: number) => {
.command-info {
display: flex;
flex-direction: column;
gap: var(--space-1);
gap: 2px;
}

.command-name {
font-weight: var(--font-weight-medium);
font-weight: 400;
color: var(--color-text);
font-size: var(--font-size-sm);
}

.command-description {
font-size: var(--font-size-sm);
font-size: var(--font-size-xs);
color: var(--color-text-tertiary);
font-weight: 300;
}

.command-shortcut {
font-size: var(--font-size-sm);
color: var(--color-text-secondary);
font-size: var(--font-size-xs);
color: var(--color-text-tertiary);
background: var(--color-bg);
padding: var(--space-1) var(--space-2);
border-radius: var(--radius-sm);
padding: 2px var(--space-2);
border-radius: var(--radius-md);
font-family: var(--font-family-mono);
border: 1px solid rgba(128, 128, 128, 0.12);
}

.no-results {
padding: var(--space-4);
padding: var(--space-6);
text-align: center;
color: var(--color-text-tertiary);
font-weight: 300;
font-size: var(--font-size-sm);
}
</style>
27 changes: 17 additions & 10 deletions src/components/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,24 @@ header {
display: flex;
justify-content: space-between;
max-width: 600px;
margin: var(--space-5) auto;
display: flex;
align-items: center;
margin: var(--space-8) auto var(--space-6);
align-items: baseline;
}
h1 {
font-size: 1.7em;
font-size: 1.5em;
font-weight: 400;
letter-spacing: -0.025em;
}
h3 {
font-weight: 300;
font-size: var(--font-size-sm);
color: var(--color-text-tertiary);
letter-spacing: 0.01em;
}
.text {
display: flex;
align-items: baseline;
gap: var(--space-3);
}
.buttons {
display: flex;
Expand All @@ -42,15 +54,10 @@ button {
cursor: pointer;
margin: 0;
z-index: 2;
padding: var(--space-3) var(--space-5);
padding: var(--space-2) var(--space-4);
}
.active {
color: var(--hsl-bg);
background: var(--hsl);
transition: 0.25s;
}
button:focus {
outline: var(--border-width-2) solid var(--color-border-focus);
outline-offset: var(--border-width-2);
}
</style>
8 changes: 8 additions & 0 deletions src/components/Loader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,18 @@ section {
text-align: center;
padding-top: var(--space-12);
}
h2 {
font-weight: 300;
font-size: var(--font-size-base);
color: var(--color-text-tertiary);
letter-spacing: 0.02em;
margin-bottom: var(--space-4);
}
.chars span {
display: inline-block;
width: var(--space-6);
text-align: center;
line-height: 1em;
opacity: 0.5;
}
</style>
10 changes: 7 additions & 3 deletions src/components/ThemeSwitcher.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,14 @@ button {
margin: 0;
background: none;
border: none;
padding: 0 10px;
opacity: 0.6;
padding: 0 var(--space-3);
opacity: 0.5;
transition: opacity var(--duration-fast) var(--ease-out);
}
button:hover {
opacity: 0.8;
}
button:active {
transform: scale(0.9);
transform: scale(0.92);
}
</style>
17 changes: 11 additions & 6 deletions src/components/advanced-search/BoxContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,32 +65,37 @@ function handleDataChange(data: any) {

<style scoped>
.content {
padding: var(--space-10);
padding: var(--space-8);
display: grid;
justify-content: center;
margin-top: -1px;
position: relative;
z-index: 1;
isolation: isolate;
border-radius: var(--radius-xl);
}
button {
position: absolute;
top: var(--space-1);
top: var(--space-2);
right: var(--space-3);
background: none;
border: none;
font-size: 2em;
font-size: 1.5em;
padding: var(--space-1);
line-height: 0.8em;
margin: 0;
z-index: 3;
cursor: pointer;
opacity: 0.5;
transition: opacity var(--duration-fast);
}
button:hover {
opacity: 0.7;
opacity: 0.9;
}
hr {
margin: var(--space-3) calc(var(--space-10) * -1);
opacity: 0.4;
margin: var(--space-3) calc(var(--space-8) * -1);
opacity: 0.2;
border: none;
border-top: 1px solid currentColor;
}
</style>
20 changes: 6 additions & 14 deletions src/components/advanced-search/Button.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,19 @@ const btnClass = computed(() => ["styled", props.disabled && "disabled"].filter(
<style scoped>
button {
margin: 0;
padding: var(--space-2) var(--space-4);
border-radius: var(--radius-md);
box-shadow: var(--shadow-sm);
padding: var(--space-2) var(--space-5);
border-radius: var(--radius-lg);
box-shadow: none;
cursor: pointer;
}
button:focus {
outline: var(--border-width-2) solid var(--color-border-focus);
outline-offset: var(--border-width-2);
}
button:active {
color: var(--hsl);
border: var(--border-width-1) solid var(--hsl);
background: hsl(var(--hue), 100%, 95%);
font-weight: 400;
}
button:active {
background: hsl(var(--hue), 70%, 95%);
transform: scale(0.95);
transform: scale(0.97);
}
.disabled {
border: 1px solid hsl(var(--hue), 40%, 75%);
color: hsl(var(--hue), 40%, 75%);
cursor: auto;
opacity: 0.6;
}
</style>
10 changes: 3 additions & 7 deletions src/components/advanced-search/Dropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,12 @@ function handleChange(e: Event) {

<style scoped>
select {
box-shadow: var(--shadow-sm);
box-shadow: none;
cursor: pointer;
}
select:focus {
outline: var(--border-width-2) solid var(--color-border-focus);
outline-offset: var(--border-width-2);
font-weight: 400;
}
select:disabled {
opacity: 1;
filter: brightness(95%);
opacity: 0.6;
cursor: auto;
}
</style>
5 changes: 4 additions & 1 deletion src/components/advanced-search/Input.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ function handleInput(e: Event) {

<style scoped>
p {
color: red;
color: var(--color-error);
font-size: var(--font-size-xs);
margin-top: var(--space-1);
font-weight: 400;
}
</style>
5 changes: 4 additions & 1 deletion src/components/advanced-search/NumberInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ function handleInput(e: Event) {
<style scoped>
p {
margin: 0;
color: red;
color: var(--color-error);
font-size: var(--font-size-xs);
margin-top: var(--space-1);
font-weight: 400;
}
</style>
Loading
Loading