nightshade-api 0.53.0

Procedural high level API for the nightshade game engine
Documentation
/* nightshade floating layer: popover, dropdown, combobox, dialog. */

.nightshade-popover-anchor {
  display: inline-flex;
}

.nightshade-popover-catcher {
  position: fixed;
  inset: 0;
  z-index: 310;
}

.nightshade-popover {
  position: fixed;
  z-index: 320;
  min-width: 160px;
  border: 1px solid var(--nightshade-panel-border);
  border-radius: 9px;
  background: var(--nightshade-panel);
  box-shadow: var(--nightshade-shadow);
  animation: nightshade-popover-in 0.12s ease;
}

@keyframes nightshade-popover-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

.nightshade-popover .nightshade-menu-list {
  position: static;
  border: none;
  box-shadow: none;
  background: transparent;
}

.nightshade-combobox-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 160px;
  padding: 6px 10px;
  border: 1px solid var(--nightshade-panel-border);
  border-radius: 7px;
  background: var(--nightshade-input-bg);
  color: var(--nightshade-text);
  font: inherit;
  cursor: pointer;
}

.nightshade-combobox-trigger:hover {
  border-color: var(--nightshade-accent);
}

.nightshade-combobox-caret {
  color: var(--nightshade-text-dim);
}

.nightshade-combobox-panel {
  display: flex;
  flex-direction: column;
  width: 220px;
}

.nightshade-combobox-input {
  padding: 9px 12px;
  border: none;
  border-bottom: 1px solid var(--nightshade-panel-border);
  background: transparent;
  color: var(--nightshade-text);
  font: inherit;
}

.nightshade-combobox-input:focus {
  outline: none;
}

.nightshade-combobox-list {
  max-height: 240px;
  overflow-y: auto;
  padding: 4px;
}

.nightshade-combobox-empty {
  padding: 14px;
  text-align: center;
  color: var(--nightshade-text-dim);
}

.nightshade-combobox-option {
  padding: 7px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.nightshade-combobox-option:hover,
.nightshade-combobox-option.active {
  background: var(--nightshade-hover);
}

.nightshade-dialog {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 20px 16px;
  min-width: 320px;
  max-width: min(480px, 92vw);
}

.nightshade-dialog-title {
  font-size: 15px;
  font-weight: 600;
}

.nightshade-dialog-body {
  color: var(--nightshade-text-dim);
  line-height: 1.5;
}

.nightshade-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}