feat(pokemon): add CSV data fetch to populate edit form
Allow users to search and fetch Pokemon data from local CSV files Auto-populate basic fields, stats, types, and translations Add type icons to Pokemon detail and list views
This commit is contained in:
@@ -732,7 +732,84 @@ button:disabled,
|
||||
.pokemon-edit-form {
|
||||
height: clamp(420px, calc(100dvh - 188px), 640px);
|
||||
min-height: 0;
|
||||
grid-template-rows: auto minmax(0, 1fr);
|
||||
grid-template-rows: auto auto minmax(0, 1fr);
|
||||
}
|
||||
|
||||
.pokemon-fetch-panel {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) auto;
|
||||
gap: 10px;
|
||||
align-items: end;
|
||||
padding: 10px;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: var(--radius-card);
|
||||
background: var(--surface-soft);
|
||||
}
|
||||
|
||||
.pokemon-fetch-panel__input {
|
||||
position: relative;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.pokemon-fetch-panel__button {
|
||||
min-width: 118px;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.pokemon-fetch-results {
|
||||
position: absolute;
|
||||
top: calc(100% + 6px);
|
||||
right: 0;
|
||||
left: 0;
|
||||
z-index: 35;
|
||||
max-height: 260px;
|
||||
overflow-y: auto;
|
||||
display: grid;
|
||||
gap: 4px;
|
||||
padding: 6px;
|
||||
border: 2px solid var(--line-strong);
|
||||
border-radius: var(--radius-control);
|
||||
background: var(--surface);
|
||||
box-shadow: var(--shadow-raised);
|
||||
}
|
||||
|
||||
.pokemon-fetch-option {
|
||||
width: 100%;
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) auto;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
padding: 8px 10px;
|
||||
border-radius: var(--radius-small);
|
||||
background: transparent;
|
||||
color: var(--ink);
|
||||
text-align: left;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.pokemon-fetch-option:hover,
|
||||
.pokemon-fetch-option:focus-visible {
|
||||
background: color-mix(in srgb, var(--pokemon-blue) 10%, var(--surface));
|
||||
}
|
||||
|
||||
.pokemon-fetch-option__name {
|
||||
min-width: 0;
|
||||
font-weight: 900;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.pokemon-fetch-option__identifier {
|
||||
color: var(--muted);
|
||||
font-family: var(--font-mono);
|
||||
font-size: 0.78rem;
|
||||
}
|
||||
|
||||
.pokemon-fetch-results__status {
|
||||
margin: 0;
|
||||
padding: 10px;
|
||||
color: var(--muted);
|
||||
font-size: 0.88rem;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.pokemon-edit-panel {
|
||||
@@ -3131,6 +3208,18 @@ button:disabled,
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.pokemon-type-chip {
|
||||
gap: 7px;
|
||||
min-height: 32px;
|
||||
padding: 5px 10px 5px 7px;
|
||||
}
|
||||
|
||||
.pokemon-type-chip__icon {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.progress {
|
||||
display: grid;
|
||||
gap: 6px;
|
||||
@@ -3713,6 +3802,7 @@ button:disabled,
|
||||
.toolbar,
|
||||
.entity-grid,
|
||||
.grid,
|
||||
.pokemon-fetch-panel,
|
||||
.pokemon-edit-grid,
|
||||
.coming-soon-preview {
|
||||
grid-template-columns: 1fr;
|
||||
|
||||
Reference in New Issue
Block a user