Commit awal: prototipe UI SIAKAD Untan

This commit is contained in:
Ariyutta
2026-10-24 11:45:32 +07:00
commit d9b9cb5c0f
477 changed files with 51958 additions and 0 deletions
@@ -0,0 +1,28 @@
{{-- Satu-satunya tempat yang memancarkan <img> lambang Untan. --}}
@props(['size' => 'md', 'priority' => false])
@php
$px = ['sm' => 32, 'md' => 44, 'lg' => 72, 'xl' => 128][$size] ?? 44;
// Berkas bawaan untuk layar 2x; srcset memilih sisanya sesuai kepadatan layar.
$file = match (true) {
$px <= 32 => 64,
$px <= 64 => 128,
$px <= 128 => 256,
default => 512,
};
$srcset = collect([64, 128, 256, 512])
->map(fn (int $w) => asset("images/logo-untan-{$w}.png")." {$w}w")
->implode(', ');
@endphp
<img
src="{{ asset("images/logo-untan-{$file}.png") }}"
srcset="{{ $srcset }}"
sizes="{{ $px }}px"
alt="Lambang Universitas Tanjungpura"
width="{{ $px }}"
height="{{ $px }}"
decoding="async"
@if ($priority) fetchpriority="high" @endif
{{ $attributes->class('logo') }}
>
@@ -0,0 +1,14 @@
@props(['size' => 'md', 'href' => null])
@php($tag = $href ? 'a' : 'span')
<{{ $tag }}
@if ($href) href="{{ $href }}" aria-label="SIAKAD Universitas Tanjungpura, beranda" @endif
{{ $attributes->class('wordmark') }}
>
<x-brand.logo :size="$size" />
<span class="wordmark__text">
<span class="wordmark__name">SIAKAD</span>
<span class="wordmark__org" x-data="nameMarquee"><span class="wordmark__org-text" x-ref="inner">Universitas Tanjungpura</span></span>
</span>
</{{ $tag }}>
@@ -0,0 +1,81 @@
{{-- Sambutan (panel gradien) dan kartu identitas akademik: dua panel bersaudara, tidak bersarang. Slot = aksi cepat di sambutan. --}}
@props(['user', 'details' => [], 'subtitle' => null])
@php
$role = $user->role;
$idLabel = $role->identifierLabel();
$idValue = $details[$idLabel] ?? null;
$others = array_diff_key($details, [$idLabel => true]);
$subtitle ??= "Anda masuk sebagai {$role->label()} di Sistem Informasi Akademik Universitas Tanjungpura.";
$now = now()->locale('id');
$hour = (int) $now->format('G');
$sapaan = match (true) {
$hour < 11 => 'Selamat pagi',
$hour < 15 => 'Selamat siang',
$hour < 18 => 'Selamat sore',
default => 'Selamat malam',
};
$icons = ['Username' => 'at-symbol', 'Jabatan' => 'briefcase', 'Unit kerja' => 'building-office-2', 'Program studi' => 'academic-cap', 'Fakultas' => 'building-library', 'Angkatan' => 'calendar-days', 'Status' => 'check-badge'];
$initial = \Illuminate\Support\Str::of($user->name)->explode(' ')->filter()->take(2)->map(fn ($w) => \Illuminate\Support\Str::upper(\Illuminate\Support\Str::substr($w, 0, 1)))->implode('');
@endphp
<div {{ $attributes->class('welcome') }}>
<x-glass.panel as="section" padding="none" aria-labelledby="judul-sambutan" class="welcome__hero">
<span class="welcome__orb welcome__orb--a" aria-hidden="true"></span>
<span class="welcome__orb welcome__orb--b" aria-hidden="true"></span>
<div class="welcome__top">
<p class="welcome__eyebrow">
<x-heroicon-o-sparkles aria-hidden="true" />
<span>{{ $sapaan }}</span>
<span class="welcome__dot" aria-hidden="true"></span>
<time datetime="{{ $now->toDateString() }}">{{ $now->isoFormat('dddd, D MMMM YYYY') }}</time>
</p>
<h1 id="judul-sambutan" class="welcome__title">Selamat Datang, {{ $user->name }}!</h1>
<p class="welcome__lede">{{ $subtitle }}</p>
</div>
<div class="welcome__foot">
<span class="welcome__chip welcome__chip--role"><x-heroicon-s-shield-check aria-hidden="true" />{{ $role->label() }}</span>
@foreach (array_slice($others, 0, 3, true) as $label => $value)
@continue($label === 'Username')
<span class="welcome__chip"><span class="visually-hidden">{{ $label }}: </span>{{ $value }}</span>
@endforeach
@if (trim((string) $slot) !== '')
<div class="welcome__actions">{{ $slot }}</div>
@endif
</div>
</x-glass.panel>
<x-glass.panel as="aside" padding="none" aria-labelledby="judul-identitas" class="welcome__id">
<div class="welcome__id-head">
<span class="welcome__avatar" aria-hidden="true"><x-brand.logo size="lg" :priority="true" /></span>
<div class="welcome__id-text">
<h2 id="judul-identitas" class="welcome__id-title">Identitas akademik</h2>
<p class="welcome__id-name">{{ $user->name }}</p>
</div>
</div>
@if ($idValue !== null)
<div class="welcome__idnum">
<span class="welcome__idnum-label">{{ $idLabel }}</span>
<span class="welcome__idnum-value num">{{ $idValue }}</span>
</div>
@endif
@if ($others)
<dl class="welcome__facts">
@foreach ($others as $label => $value)
<div class="welcome__fact">
<span class="welcome__fact-icon" aria-hidden="true"><x-dynamic-component :component="'heroicon-o-'.($icons[$label] ?? 'tag')" /></span>
<div class="welcome__fact-text">
<dt>{{ $label }}</dt>
<dd>{{ $value }}</dd>
</div>
</div>
@endforeach
</dl>
@endif
</x-glass.panel>
</div>
@@ -0,0 +1,4 @@
{{-- Baris tombol di dasar formulir, sejajar kanan (simpan/batal). Satu tombol primer saja. --}}
<div {{ $attributes->class('form-actions') }}>
{{ $slot }}
</div>
@@ -0,0 +1,19 @@
@props(['name', 'label', 'value' => '1', 'checked' => false, 'id' => null])
@php
$id ??= 'check-'.\Illuminate\Support\Str::slug($name);
// Setelah validasi gagal, nilai lama menang atas nilai bawaan (kotak yang tidak dicentang tidak dikirim browser)
$isChecked = request()->hasSession() && session()->hasOldInput() ? (bool) old($name) : (bool) $checked;
@endphp
<label class="check" for="{{ $id }}">
<input
type="checkbox"
id="{{ $id }}"
name="{{ $name }}"
value="{{ $value }}"
@checked($isChecked)
{{ $attributes->class('check__input') }}
>
<span>{{ $label }}</span>
</label>
@@ -0,0 +1,76 @@
{{--
Label + input + bantuan/galat. Type "password" otomatis mendapat tombol tampil/sembunyikan (hanya jika JS aktif).
Atribut lain (required, autofocus, autocomplete, inputmode, maxlength...) diteruskan ke <input>.
--}}
@props([
'name',
'label',
'type' => 'text',
'value' => null,
'hint' => null,
'error' => null,
'optional' => false,
'id' => null,
'prefix' => null,
'suffix' => null,
])
@php
$id ??= 'field-'.\Illuminate\Support\Str::slug($name);
$isPassword = $type === 'password';
$message = $error ?? (isset($errors) ? $errors->first($name) : null);
$current = $isPassword ? null : old($name, $value);
$helpId = $id.'-help';
// Lebar prefiks/sufiks diperkirakan dengan satuan ch agar teks input tidak menimpa satuan
$pads = collect(['--pad-start' => $prefix, '--pad-end' => $suffix])
->filter(fn ($text) => filled($text))
->map(fn ($text, $var) => $var.': calc('.mb_strlen($text).'ch + 1.75rem)')
->implode('; ');
@endphp
<div class="field" @if ($isPassword) x-data="passwordField" @endif>
<label class="field__label" for="{{ $id }}">
{{ $label }}
@if ($optional) <span class="field__optional">(opsional)</span> @endif
</label>
<div class="field__control">
@if (filled($prefix)) <span class="field__affix field__affix--start">{{ $prefix }}</span> @endif
<input
id="{{ $id }}"
name="{{ $name }}"
type="{{ $type }}"
@if ($current !== null) value="{{ $current }}" @endif
@if ($message) aria-invalid="true" @endif
@if ($attributes->get('required')) aria-required="true" @endif
aria-describedby="{{ $helpId }}"
@if ($pads) style="{{ $pads }}" @endif
@if ($isPassword) x-bind:type="show ? 'text' : 'password'" @endif
{{ $attributes->class(['field__input', 'field__input--password' => $isPassword]) }}
>
@if (filled($suffix)) <span class="field__affix field__affix--end">{{ $suffix }}</span> @endif
@if ($isPassword)
<button
type="button"
class="field__toggle"
aria-label="Tampilkan kata sandi"
aria-pressed="false"
x-on:click="toggle()"
x-bind:aria-pressed="show"
>
<x-heroicon-o-eye x-show="!show" />
<x-heroicon-o-eye-slash x-show="show" x-cloak />
</button>
@endif
</div>
<p id="{{ $helpId }}" @class(['field__help', 'field__help--error' => $message]) aria-live="polite" @if ($message) role="alert" @endif>
@if ($message)
<x-heroicon-s-exclamation-circle />
<span>{{ $message }}</span>
@elseif ($hint)
<span>{{ $hint }}</span>
@endif
</p>
</div>
@@ -0,0 +1,16 @@
{{-- Bagian formulir: fieldset + legend + grid kolom responsif (container query). Kolom lebar penuh: beri class="col-span-full". --}}
@props(['title', 'description' => null, 'columns' => 2])
@php
$columns = in_array((int) $columns, [1, 2, 3], true) ? (int) $columns : 2;
@endphp
<fieldset {{ $attributes->class('form-section') }}>
<legend class="form-section__title">{{ $title }}</legend>
@if ($description) <p class="form-section__desc">{{ $description }}</p> @endif
<div class="form-section__body">
<div class="form-section__grid form-section__grid--{{ $columns }}">
{{ $slot }}
</div>
</div>
</fieldset>
@@ -0,0 +1,63 @@
{{--
Label + <select> + bantuan/galat, selaras dengan form.field. `options` = nilai => label; atau isi slot dengan <option>.
Atribut lain (required, disabled, x-model, onchange...) diteruskan ke <select>. old() menang atas value.
--}}
@props([
'name',
'label',
'options' => [],
'value' => null,
'placeholder' => null,
'hint' => null,
'error' => null,
'optional' => false,
'id' => null,
])
@php
$key = trim(str_replace(['[', ']'], ['.', ''], $name), '.');
$id ??= 'field-'.\Illuminate\Support\Str::slug($key, '-');
$message = $error ?? (isset($errors) ? $errors->first($key) : null);
$current = old($key, $value);
$helpId = $id.'-help';
$hasSlot = trim((string) $slot) !== '';
@endphp
<div class="field">
<label class="field__label" for="{{ $id }}">
{{ $label }}
@if ($optional) <span class="field__optional">(opsional)</span> @endif
</label>
<div class="field__control">
<select
id="{{ $id }}"
name="{{ $name }}"
@if ($message) aria-invalid="true" @endif
@if ($attributes->get('required')) aria-required="true" @endif
aria-describedby="{{ $helpId }}"
{{ $attributes->class(['field__input', 'field__select']) }}
>
@if ($placeholder !== null)
<option value="">{{ $placeholder }}</option>
@endif
@if ($hasSlot)
{{ $slot }}
@else
@foreach ($options as $optionValue => $optionLabel)
<option value="{{ $optionValue }}" @selected($current !== null && (string) $current === (string) $optionValue)>{{ $optionLabel }}</option>
@endforeach
@endif
</select>
<span class="field__chevron" aria-hidden="true"><x-heroicon-m-chevron-down /></span>
</div>
<p id="{{ $helpId }}" @class(['field__help', 'field__help--error' => $message]) aria-live="polite" @if ($message) role="alert" @endif>
@if ($message)
<x-heroicon-s-exclamation-circle />
<span>{{ $message }}</span>
@elseif ($hint)
<span>{{ $hint }}</span>
@endif
</p>
</div>
@@ -0,0 +1,47 @@
{{-- Label + <textarea> + bantuan/galat, selaras dengan form.field. Atribut lain (required, maxlength, placeholder...) ke <textarea>. --}}
@props([
'name',
'label',
'value' => null,
'rows' => 4,
'hint' => null,
'error' => null,
'optional' => false,
'id' => null,
])
@php
$key = trim(str_replace(['[', ']'], ['.', ''], $name), '.');
$id ??= 'field-'.\Illuminate\Support\Str::slug($key, '-');
$message = $error ?? (isset($errors) ? $errors->first($key) : null);
$current = old($key, $value);
$helpId = $id.'-help';
@endphp
<div class="field">
<label class="field__label" for="{{ $id }}">
{{ $label }}
@if ($optional) <span class="field__optional">(opsional)</span> @endif
</label>
<div class="field__control">
<textarea
id="{{ $id }}"
name="{{ $name }}"
rows="{{ $rows }}"
@if ($message) aria-invalid="true" @endif
@if ($attributes->get('required')) aria-required="true" @endif
aria-describedby="{{ $helpId }}"
{{ $attributes->class(['field__input', 'field__textarea']) }}
>{{ $current }}</textarea>
</div>
<p id="{{ $helpId }}" @class(['field__help', 'field__help--error' => $message]) aria-live="polite" @if ($message) role="alert" @endif>
@if ($message)
<x-heroicon-s-exclamation-circle />
<span>{{ $message }}</span>
@elseif ($hint)
<span>{{ $hint }}</span>
@endif
</p>
</div>
@@ -0,0 +1,15 @@
{{-- Permukaan kaca. Jangan menaruh glass.panel di dalam glass.panel lain. --}}
@props(['as' => 'div', 'padding' => 'md', 'strong' => false])
@php
$pad = match ($padding) {
'none' => null,
'sm' => 'glass--pad-sm',
'lg' => 'glass--pad-lg',
default => 'glass--pad-md',
};
@endphp
<{{ $as }} {{ $attributes->class(array_filter(['glass', $strong ? 'glass--strong' : null, $pad])) }}>
{{ $slot }}
</{{ $as }}>
@@ -0,0 +1,128 @@
{{-- Cangkang pengguna masuk: sidebar kaca melayang, bilah atas ramping, <main> berisi slot. --}}
@props(['title' => null, 'description' => 'Sistem Informasi Akademik Universitas Tanjungpura.', 'menu' => null])
@php
$user = auth()->user();
$menuView = $menu ?? $user->role->value.'.partials.menu';
$today = now()->locale('id');
@endphp
<!DOCTYPE html>
<html lang="id">
<head>
<x-layouts.head :title="$title" :description="$description" />
</head>
<body>
<a class="skip-link" href="#isi">Lewati ke konten utama</a>
<x-ui.sky :defs="true" />
<x-ui.flash />
<div class="app" x-data="appShell" x-on:keydown.escape.window="close()">
<x-glass.panel as="aside" padding="none" :strong="true" id="sidebar" class="sidebar" x-bind:class="{ 'is-open': open }" x-on:touchstart.passive="swipeStart($event)" x-on:touchend.passive="swipeEnd($event)">
<div class="sidebar__head">
<x-brand.wordmark :href="route('dashboard')" />
<x-ui.button
variant="ghost"
icon="x-mark"
:icon-only="true"
class="sidebar__close"
aria-label="Tutup menu"
x-ref="close"
x-on:click="close()"
/>
</div>
<nav class="sidebar__nav" aria-labelledby="menu-label">
<p id="menu-label" class="sidebar__label">Menu {{ $user->role->label() }}</p>
<div class="sidebar__list">
@include($menuView)
</div>
</nav>
<div class="sidebar__foot">
<div class="sidebar__user">
<x-ui.avatar :name="$user->name" />
<div class="sidebar__who">
<span class="sidebar__name" x-data="nameMarquee" title="{{ $user->name }}"><span class="sidebar__name-text" x-ref="inner">{{ $user->name }}</span></span>
<span class="sidebar__role">{{ $user->profile?->nomor_induk ?? $user->role->label() }}</span>
</div>
</div>
<form method="POST" action="{{ route('logout') }}">
@csrf
<x-ui.button type="submit" variant="secondary" icon="arrow-right-on-rectangle" :block="true">Keluar</x-ui.button>
</form>
</div>
</x-glass.panel>
<div class="scrim" x-bind:class="{ 'is-open': open }" x-on:click="close()" aria-hidden="true"></div>
<div class="app__col" x-bind:inert="locked">
<div class="veil veil--top" aria-hidden="true"><x-ui.sky /></div>
<div class="veil veil--bottom" aria-hidden="true"><x-ui.sky /></div>
<div class="veil-edge veil-edge--top" aria-hidden="true"></div>
<div class="veil-edge veil-edge--bottom" aria-hidden="true"></div>
<x-glass.panel as="header" padding="none" :strong="true" class="topbar" x-data="{ over: false }" x-on:scroll.window.passive="over = window.scrollY > 4" x-bind:data-over="over || null">
<x-ui.button
variant="ghost"
icon="bars-3"
:icon-only="true"
class="topbar__menu"
aria-label="Buka menu"
aria-controls="sidebar"
aria-expanded="false"
x-ref="menu"
x-bind:aria-label="menuLabel"
x-bind:aria-expanded="narrow ? open : !collapsed"
x-on:click="toggle()"
/>
@php
$tickerLines = [
'Selamat Datang di SIAKAD Universitas Tanjungpura',
'Sistem Informasi Akademik terpadu untuk mahasiswa, dosen, dan tenaga kependidikan',
'Kelola perkuliahan, nilai, dan layanan akademik dalam satu tempat',
];
@endphp
<div class="ticker" role="group" aria-label="{{ $tickerLines[0] }}" x-data="{ i: 0, lines: @js($tickerLines) }">
<span class="ticker__badge" aria-hidden="true"><x-heroicon-s-megaphone /></span>
<div class="ticker__viewport" aria-hidden="true">
<span class="ticker__item" x-text="lines[i]" x-on:animationiteration="i = (i + 1) % lines.length">{{ $tickerLines[0] }}</span>
</div>
</div>
<time class="topbar__date" datetime="{{ $today->toDateString() }}">
<span class="topbar__date-long">{{ $today->isoFormat('dddd, D MMMM YYYY') }}</span>
<span class="topbar__date-short">{{ $today->isoFormat('ddd, D MMM YYYY') }}</span>
</time>
<x-ui.theme-toggle />
<x-ui.role-switch :user="$user" />
</x-glass.panel>
<main id="isi" class="app__main">
{{ $slot }}
</main>
<x-glass.panel as="footer" padding="none" :strong="true" class="app-footer" x-data="{ over: false }" x-init="over = (window.innerHeight + window.scrollY) < document.documentElement.scrollHeight - 4" x-on:scroll.window.passive="over = (window.innerHeight + window.scrollY) < document.documentElement.scrollHeight - 4" x-bind:data-over="over || null">
<p>&copy; {{ $today->year }} Universitas Tanjungpura. Hak cipta dilindungi.</p>
<p>SIAKAD, Sistem Informasi Akademik</p>
</x-glass.panel>
</div>
<button
type="button"
class="to-top"
aria-label="Kembali ke atas"
title="Kembali ke atas"
x-data="{ show: false }"
x-on:scroll.window.passive="show = window.scrollY > 320"
x-bind:class="{ 'is-visible': show }"
x-bind:inert="!show"
x-on:click="window.scrollTo({ top: 0, behavior: window.matchMedia('(prefers-reduced-motion: reduce)').matches ? 'auto' : 'smooth' })"
inert
>
<x-heroicon-m-arrow-up />
</button>
</div>
</body>
</html>
@@ -0,0 +1,63 @@
{{-- Cangkang masuk: panel merek bergradien di kiri, formulir kaca di kanan. Tanpa DB/sesi. --}}
@props(['title' => null, 'description' => 'Sistem Informasi Akademik Universitas Tanjungpura.'])
@php
$points = [
['icon' => 'calendar-days', 'title' => 'Jadwal dan kalender', 'text' => 'Kuliah, ujian, dan tenggat akademik terkumpul rapi.'],
['icon' => 'clipboard-document-check', 'title' => 'KRS dan nilai', 'text' => 'Pengisian KRS sampai KHS dalam satu alur.'],
['icon' => 'megaphone', 'title' => 'Pengumuman kampus', 'text' => 'Kabar resmi universitas sampai langsung ke Anda.'],
];
@endphp
<!DOCTYPE html>
<html lang="id">
<head>
<x-layouts.head :title="$title" :description="$description" />
</head>
<body>
<a class="skip-link" href="#isi">Lewati ke konten utama</a>
<x-ui.sky :defs="true" />
<x-ui.flash />
<div class="auth">
<x-ui.theme-toggle class="auth__theme" />
<aside class="auth__brand" aria-label="Tentang SIAKAD Untan">
<div class="auth__brand-top">
<span class="auth__logo"><x-brand.logo size="lg" priority /></span>
<div class="auth__id">
<span class="auth__id-name">SIAKAD Untan</span>
<span class="auth__id-sub">Universitas Tanjungpura</span>
</div>
</div>
<div class="auth__pitch">
<p class="auth__headline">Satu pintu untuk seluruh urusan akademik Anda.</p>
<ul class="auth__points">
@foreach ($points as $point)
<li class="auth__point">
<span class="auth__point-icon" aria-hidden="true"><x-dynamic-component :component="'heroicon-o-'.$point['icon']" /></span>
<span class="auth__point-text">
<span class="auth__point-title">{{ $point['title'] }}</span>
<span class="auth__point-desc">{{ $point['text'] }}</span>
</span>
</li>
@endforeach
</ul>
</div>
<p class="auth__copy">&copy; {{ now()->year }} Universitas Tanjungpura</p>
</aside>
<main id="isi" class="auth__main">
<div class="auth__content">
<div class="auth__mobile-brand">
<x-brand.wordmark :href="url('/')" />
</div>
{{ $slot }}
</div>
</main>
</div>
</body>
</html>
@@ -0,0 +1,34 @@
{{-- Cangkang publik (login, halaman galat). Tidak butuh DB, sesi, atau pengguna masuk. --}}
@props(['title' => null, 'description' => 'Sistem Informasi Akademik Universitas Tanjungpura.', 'width' => 'sm', 'brand' => true])
<!DOCTYPE html>
<html lang="id">
<head>
<x-layouts.head :title="$title" :description="$description" />
</head>
<body>
<a class="skip-link" href="#isi">Lewati ke konten utama</a>
<x-ui.sky :defs="true" />
<x-ui.flash />
<div class="guest">
<header class="guest__header">
@if ($brand)
<x-brand.wordmark :href="url('/')" />
@endif
</header>
<main id="isi" class="guest__main">
<div @class(['guest__content', "guest__content--{$width}" => $width !== 'sm'])>
{{ $slot }}
</div>
</main>
<footer class="guest__footer">
<p>Sistem Informasi Akademik Universitas Tanjungpura</p>
</footer>
</div>
</body>
</html>
@@ -0,0 +1,22 @@
@props(['title' => null, 'description' => 'Sistem Informasi Akademik Universitas Tanjungpura.'])
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<title>{{ $title ? $title.' | SIAKAD Untan' : 'SIAKAD Untan' }}</title>
<meta name="description" content="{{ $description }}">
<meta name="color-scheme" content="light dark">
<link rel="icon" type="image/png" sizes="64x64" href="{{ asset('images/logo-untan-64.png') }}">
<link rel="apple-touch-icon" href="{{ asset('images/logo-untan-256.png') }}">
<script>
document.documentElement.classList.add('js');
(function () {
var mode = null;
try { mode = localStorage.getItem('siakad-theme'); } catch (e) {}
if (mode !== 'light' && mode !== 'dark') {
mode = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
}
document.documentElement.dataset.theme = mode;
try { if (localStorage.getItem('siakad-sidebar') === 'collapsed') document.documentElement.classList.add('sidebar-collapsed'); } catch (e) {}
})();
</script>
@vite(['resources/css/app.css', 'resources/js/app.js'])
@@ -0,0 +1,15 @@
{{-- Kelompok butir menu (<details>): terbuka dari server bila `open`, jadi berfungsi tanpa JS. Isi: <x-nav.item>. --}}
@props(['label', 'icon' => null, 'open' => false])
<details {{ $attributes->class('nav-group') }} @if ($open) open data-has-active @endif>
<summary>
@if ($icon)
<x-dynamic-component :component="'heroicon-o-'.$icon" class="nav-item__icon" />
@endif
<span class="nav-group__label" x-data="nameMarquee"><span class="nav-group__label-text" x-ref="inner">{{ $label }}</span></span>
<x-heroicon-m-chevron-down class="nav-group__chevron" />
</summary>
<div class="nav-group__items">
{{ $slot }}
</div>
</details>
@@ -0,0 +1,16 @@
@props(['href', 'active' => false, 'icon' => null, 'count' => null])
<a
href="{{ $href }}"
@if ($active) aria-current="page" @endif
{{ $attributes->class('nav-item') }}
>
@if ($icon)
<x-dynamic-component :component="'heroicon-'.($active ? 's' : 'o').'-'.$icon" class="nav-item__icon" />
@endif
<span class="nav-item__label" x-data="nameMarquee"><span class="nav-item__label-text" x-ref="inner">{{ $slot }}</span></span>
{{-- Penghitung hanya diisi dengan angka nyata dari DB; nol tidak ditampilkan --}}
@if (is_numeric($count) && $count > 0)
<span class="nav-item__count">{{ $count > 99 ? '99+' : (int) $count }}</span>
@endif
</a>
@@ -0,0 +1,12 @@
{{-- Bingkai halaman SIM Akademik (peran Operator): kepala halaman, jejak, dan catatan prototipe. Slot = isi. --}}
@props(['page', 'crumbs'])
<x-layouts.app :title="$page['title']">
<x-ui.page-header :title="$page['title']" :description="$page['subtitle'] ?: null" :breadcrumbs="$crumbs" />
<div class="stack">
<x-ui.alert tone="info">Tampilan prototipe untuk peran Operator. Isi tabel adalah data contoh dan tombol simpan, ubah, atau hapus tidak mengubah data.</x-ui.alert>
{{ $slot }}
</div>
</x-layouts.app>
@@ -0,0 +1,34 @@
{{-- Peringatan satu blok: ikon + teks (bukan warna saja). Slot = isi. Tutup hanya bila JS aktif. --}}
@props(['tone' => 'info', 'title' => null, 'dismissible' => false])
@php
$tone = in_array($tone, ['info', 'success', 'warning', 'danger'], true) ? $tone : 'info';
$icon = ['info' => 'information-circle', 'success' => 'check-circle', 'warning' => 'exclamation-triangle', 'danger' => 'exclamation-circle'][$tone];
$name = ['info' => 'Informasi', 'success' => 'Berhasil', 'warning' => 'Peringatan', 'danger' => 'Galat'][$tone];
$role = in_array($tone, ['warning', 'danger'], true) ? 'alert' : 'status';
@endphp
<div
{{ $attributes->class(['alert', "alert--{$tone}"]) }}
role="{{ $role }}"
@if ($dismissible) x-data="{ open: true }" x-show="open" x-transition.opacity @endif
>
<x-dynamic-component :component="'heroicon-m-'.$icon" class="alert__icon" aria-hidden="true" />
<div class="alert__body">
<span class="visually-hidden">{{ $name }}:</span>
@if ($title) <p class="alert__title">{{ $title }}</p> @endif
<div class="alert__text">{{ $slot }}</div>
</div>
@if ($dismissible)
<x-ui.button
variant="ghost"
icon="x-mark"
:icon-only="true"
class="alert__close"
aria-label="Tutup peringatan"
x-on:click="open = false"
/>
@endif
</div>
@@ -0,0 +1,14 @@
{{-- Inisial dari nama; gelar di depan (Dr., Ir., Prof.) dan di belakang koma dilewati. --}}
@props(['name', 'size' => 'md', 'labelled' => false])
@php
$words = preg_split('/\s+/u', trim(\Illuminate\Support\Str::before((string) $name, ',')), -1, PREG_SPLIT_NO_EMPTY) ?: [];
$plain = array_values(array_filter($words, fn (string $w) => ! str_ends_with($w, '.')));
$words = $plain ?: $words;
$initials = mb_strtoupper(
mb_substr($words[0] ?? '?', 0, 1).(count($words) > 1 ? mb_substr(end($words), 0, 1) : '')
);
$sizeClass = in_array($size, ['sm', 'lg', 'xl'], true) ? "avatar--{$size}" : null;
@endphp
<span {{ $attributes->class(array_filter(['avatar', $sizeClass])) }} @if ($labelled) role="img" aria-label="{{ $name }}" @else aria-hidden="true" @endif>{{ $initials }}</span>
@@ -0,0 +1,10 @@
@props(['tone' => 'neutral', 'icon' => null])
@php
$tone = in_array($tone, ['neutral', 'accent', 'gold', 'success', 'danger'], true) ? $tone : 'neutral';
@endphp
<span {{ $attributes->class(['badge', "badge--{$tone}" => $tone !== 'neutral']) }}>
@if ($icon) <x-dynamic-component :component="'heroicon-m-'.$icon" /> @endif
{{ $slot }}
</span>
@@ -0,0 +1,38 @@
@props([
'variant' => 'primary',
'type' => 'button',
'href' => null,
'size' => 'md',
'block' => false,
'icon' => null,
'iconOnly' => false,
'loading' => false,
])
@php
$variant = in_array($variant, ['primary', 'secondary', 'ghost', 'danger'], true) ? $variant : 'primary';
$classes = array_filter([
'btn',
"btn--{$variant}",
$size === 'sm' ? 'btn--sm' : null,
$block ? 'btn--block' : null,
$iconOnly ? 'btn--icon' : null,
]);
@endphp
@if ($href)
<a href="{{ $href }}" {{ $attributes->class($classes) }}>
@if ($icon) <x-dynamic-component :component="'heroicon-o-'.$icon" /> @endif
@unless ($iconOnly) <span>{{ $slot }}</span> @endunless
</a>
@else
<button
type="{{ $type }}"
@if ($loading) data-busy="true" aria-busy="true" @endif
{{ $attributes->class($classes) }}
>
<span class="btn__spinner" aria-hidden="true"></span>
@if ($icon) <x-dynamic-component :component="'heroicon-o-'.$icon" /> @endif
@unless ($iconOnly) <span>{{ $slot }}</span> @endunless
</button>
@endif
@@ -0,0 +1,36 @@
{{--
Grafik Chart.js dengan data nyata. type: bar | line | doughnut. datasets: [['label' => ..., 'data' => [...]]].
Tabel tersembunyi menyediakan data yang sama bagi pembaca layar.
--}}
@props(['title', 'type' => 'bar', 'labels' => [], 'datasets' => [], 'description' => null, 'height' => '16rem'])
@php
$type = in_array($type, ['bar', 'line', 'doughnut'], true) ? $type : 'bar';
$id = 'chart-'.\Illuminate\Support\Str::random(6);
@endphp
<x-glass.panel as="figure" {{ $attributes->class('chart') }}>
<figcaption class="panel-title">
<h2>{{ $title }}</h2>
</figcaption>
@if ($description) <p class="stat__hint">{{ $description }}</p> @endif
@if (count($labels) === 0)
<x-ui.empty icon="chart-bar" title="Belum ada data" description="Grafik tampil setelah data tersedia." />
@else
<div class="chart__canvas" style="height: {{ $height }}" x-data="chartCanvas(@js(['type' => $type, 'labels' => $labels, 'datasets' => $datasets]))">
<canvas x-ref="canvas" id="{{ $id }}" role="img" aria-label="{{ $title }}"></canvas>
</div>
<table class="visually-hidden">
<caption>{{ $title }}</caption>
<thead>
<tr><th scope="col">Kategori</th>@foreach ($datasets as $ds)<th scope="col">{{ $ds['label'] ?? 'Nilai' }}</th>@endforeach</tr>
</thead>
<tbody>
@foreach ($labels as $i => $label)
<tr><th scope="row">{{ $label }}</th>@foreach ($datasets as $ds)<td>{{ $ds['data'][$i] ?? 0 }}</td>@endforeach</tr>
@endforeach
</tbody>
</table>
@endif
</x-glass.panel>
@@ -0,0 +1,71 @@
{{--
Tombol pemicu + dialog konfirmasi. Dirender sebagai <form> (atribut tambahan ke form).
Tanpa JS pemicu adalah tombol kirim biasa: formulir langsung terkirim (progressive enhancement).
Jangan taruh di dalam <form> lain.
--}}
@props([
'action',
'method' => 'POST',
'title',
'message' => null,
'confirmLabel' => 'Ya, lanjutkan',
'cancelLabel' => 'Batal',
'tone' => 'primary',
'icon' => null,
'iconOnly' => false,
'triggerLabel' => null,
'label' => null,
'variant' => 'ghost',
])
@php
$method = strtoupper($method);
$method = in_array($method, ['POST', 'PUT', 'PATCH', 'DELETE'], true) ? $method : 'POST';
$tone = $tone === 'danger' ? 'danger' : 'primary';
$variant = $variant === 'secondary' ? 'secondary' : 'ghost';
$uid = 'confirm-'.\Illuminate\Support\Str::random(8);
@endphp
<form
method="POST"
action="{{ $action }}"
x-data="confirmDialog"
{{ $attributes->class('confirm') }}
>
@csrf
@if ($method !== 'POST') @method($method) @endif
<x-ui.button
type="submit"
:variant="$variant"
:icon="$icon"
:icon-only="$iconOnly"
:class="$tone === 'danger' ? 'confirm__trigger--danger' : ''"
:aria-label="$iconOnly ? ($label ?? $title) : null"
x-ref="trigger"
x-on:click.prevent="show()"
>{{ $triggerLabel ?? $title }}</x-ui.button>
<dialog
x-ref="dialog"
@class(['dialog', 'dialog--danger' => $tone === 'danger'])
aria-labelledby="{{ $uid }}-title"
@if ($message) aria-describedby="{{ $uid }}-message" @endif
x-on:click="backdrop($event)"
x-on:close="restore()"
>
<div class="dialog__body">
<div class="dialog__head">
<span class="dialog__icon" aria-hidden="true">
@if ($tone === 'danger') <x-heroicon-o-exclamation-triangle /> @else <x-heroicon-o-question-mark-circle /> @endif
</span>
<p id="{{ $uid }}-title" class="dialog__title">{{ $title }}</p>
</div>
@if ($message) <p id="{{ $uid }}-message" class="dialog__message">{{ $message }}</p> @endif
<div class="dialog__actions">
<x-ui.button type="submit" :variant="$tone === 'danger' ? 'danger' : 'primary'">{{ $confirmLabel }}</x-ui.button>
<x-ui.button variant="secondary" x-ref="cancel" x-on:click="close()">{{ $cancelLabel }}</x-ui.button>
</div>
</div>
</dialog>
</form>
@@ -0,0 +1,9 @@
{{-- Keadaan kosong standar: ikon, judul, penjelasan, dan aksi (slot). --}}
@props(['icon' => 'inbox', 'title', 'description' => null])
<div {{ $attributes->class('empty') }}>
<span class="empty__icon" aria-hidden="true"><x-dynamic-component :component="'heroicon-o-'.$icon" /></span>
<p class="empty__title">{{ $title }}</p>
@if ($description) <p class="empty__text">{{ $description }}</p> @endif
@if (trim((string) $slot) !== '') <div class="empty__actions">{{ $slot }}</div> @endif
</div>
@@ -0,0 +1,14 @@
{{-- Satu angka: label, nilai, petunjuk, dan tautan opsional (seluruh sel menjadi tautan). --}}
@props(['label', 'value', 'href' => null, 'hint' => null])
@php
$shown = is_int($value) ? number_format($value, 0, ',', '.') : $value;
@endphp
<div {{ $attributes->class('figure') }}>
<dt class="figure__label">
@if ($href) <a href="{{ $href }}" class="figure__link">{{ $label }}</a> @else {{ $label }} @endif
</dt>
<dd class="figure__value num">{{ $shown }}</dd>
@if ($hint) <dd class="figure__hint">{{ $hint }}</dd> @endif
</div>
@@ -0,0 +1,8 @@
{{-- Deret angka ringkas: satu panel kaca berisi <dl> dengan pemisah hairline. Isi: <x-ui.figure> (angka nyata dari DB). --}}
@props(['label'])
<x-glass.panel as="section" padding="none" :aria-label="$label" {{ $attributes }}>
<dl class="figures">
{{ $slot }}
</dl>
</x-glass.panel>
@@ -0,0 +1,33 @@
{{-- Formulir GET untuk pencarian (q) dan filter di atas tabel. Slot = filter tambahan (form.select). Terkirim otomatis saat pilihan berubah (Enter/keluar kolom untuk pencarian). --}}
@props(['action' => null, 'search' => true, 'placeholder' => 'Cari', 'label' => 'Cari', 'id' => 'filter-q'])
@php
$target = $action ?? url()->current();
$query = request()->query('q');
$query = is_string($query) ? $query : '';
@endphp
<form method="GET" action="{{ $target }}" role="search" aria-label="Pencarian dan filter" x-data x-on:change="$el.requestSubmit()" {{ $attributes->class('filter-bar') }}>
@if ($search)
<div class="field filter-bar__search">
<label class="visually-hidden" for="{{ $id }}">{{ $label }}</label>
<div class="field__control">
<span class="field__icon" aria-hidden="true"><x-heroicon-o-magnifying-glass /></span>
<input
type="search"
id="{{ $id }}"
name="q"
value="{{ $query }}"
placeholder="{{ $placeholder }}"
autocomplete="off"
enterkeyhint="search"
class="field__input"
style="--pad-start: 2.5rem"
>
</div>
</div>
@endif
{{ $slot }}
</form>
@@ -0,0 +1,51 @@
{{--
Pesan dari sesi (status, error, warning, info, toast) + tempat toast klien.
Pasang satu kali per layout, tepat setelah tautan lewati (bukan di dalam <main>: toast memakai position fixed).
Tanpa JS pesan tampil sebagai daftar peringatan di atas cangkang; setelah Alpine siap, daftar itu disembunyikan dan toast mengambil alih.
Dari klien: window.toast('success', 'Tersimpan') atau $dispatch('toast', { tone: 'danger', message: '...' }).
--}}
@php
$tones = ['info', 'success', 'warning', 'danger'];
$messages = [];
if (request()->hasSession()) {
foreach (['status' => 'success', 'error' => 'danger', 'warning' => 'warning', 'info' => 'info'] as $key => $tone) {
$text = session($key);
if (is_string($text) && $text !== '') {
$messages[] = ['tone' => $tone, 'message' => $text];
}
}
foreach ((array) session('toast', []) as $item) {
if (is_array($item) && is_string($item['message'] ?? null) && $item['message'] !== '') {
$messages[] = [
'tone' => in_array($item['tone'] ?? 'info', $tones, true) ? $item['tone'] : 'info',
'message' => $item['message'],
];
}
}
}
@endphp
@if ($messages)
<div class="flash-static" data-flash-static>
@foreach ($messages as $item)
<x-ui.alert :tone="$item['tone']">{{ $item['message'] }}</x-ui.alert>
@endforeach
</div>
@endif
<div class="toasts" x-data x-init="$store.toasts.seed(@js($messages))">
<div class="toasts__stack" role="region" aria-label="Notifikasi">
<div aria-live="polite" aria-atomic="false">
<template x-for="item in $store.toasts.items.filter((i) => !i.assertive)" :key="item.id">
@include('ui.toast')
</template>
</div>
<div aria-live="assertive" aria-atomic="false">
<template x-for="item in $store.toasts.items.filter((i) => i.assertive)" :key="item.id">
@include('ui.toast')
</template>
</div>
</div>
</div>
@@ -0,0 +1,30 @@
{{-- Batang kemajuan bernilai nyata (role="meter"). Isi memakai skala, bukan lebar. --}}
@props(['value', 'max' => 100, 'label', 'valueText' => null, 'tone' => 'neutral', 'id' => null])
@php
$id ??= 'meter-'.\Illuminate\Support\Str::random(6);
$tone = in_array($tone, ['neutral', 'success', 'danger', 'accent'], true) ? $tone : 'neutral';
$max = (float) $max > 0 ? (float) $max : 100.0;
$now = max(0.0, min((float) $value, $max));
$ratio = round($now / $max, 4);
$fmt = fn (float $n): string => rtrim(rtrim(number_format($n, 2, ',', '.'), '0'), ',');
$valueText ??= $fmt($now).' dari '.$fmt($max);
@endphp
<div {{ $attributes->class(['meter', "meter--{$tone}" => $tone !== 'neutral']) }}>
<div class="meter__head">
<span class="meter__label" id="{{ $id }}-label">{{ $label }}</span>
<span class="meter__text">{{ $valueText }}</span>
</div>
<div
class="meter__track"
role="meter"
aria-labelledby="{{ $id }}-label"
aria-valuemin="0"
aria-valuemax="{{ $max }}"
aria-valuenow="{{ $now }}"
aria-valuetext="{{ $valueText }}"
>
<div class="meter__fill" style="--meter-ratio: {{ $ratio }}"></div>
</div>
</div>
@@ -0,0 +1,41 @@
{{-- Kepala halaman: satu-satunya <h1>, kalimat pengantar, jejak halaman, dan slot aksi (<x-slot:actions>). Blok polos, bukan kaca. --}}
@props(['title', 'description' => null, 'breadcrumbs' => []])
<header {{ $attributes->class('page-header') }}>
@if ($breadcrumbs)
<nav aria-label="Breadcrumb">
<div class="crumbs" x-data="nameMarquee">
<ol class="crumbs__list" x-ref="inner">
@foreach ($breadcrumbs as $text => $url)
<li class="crumbs__item">
@if ($loop->last || blank($url))
<span class="crumbs__text" @if ($loop->last) aria-current="page" @endif>{{ $text }}</span>
@else
<a class="crumbs__link" href="{{ $url }}">
@if ($loop->first) <x-heroicon-o-home class="crumbs__home" aria-hidden="true" /> @endif
{{ $text }}
</a>
@endif
@unless ($loop->last)
<x-heroicon-m-chevron-right class="crumbs__sep" aria-hidden="true" />
@endunless
</li>
@endforeach
</ol>
</div>
</nav>
@endif
<div class="page-header__row">
<div class="page-header__text">
<h1>{{ $title }}</h1>
@if ($description) <p class="lede">{{ $description }}</p> @endif
</div>
@isset($actions)
@if (trim((string) $actions) !== '')
<div class="page-header__actions">{{ $actions }}</div>
@endif
@endisset
</div>
</header>
@@ -0,0 +1,50 @@
{{-- Pemilih peran di bilah atas: menampilkan peran aktif; menu hanya berisi daftar peran milik akun (prototipe: peralihan belum aktif). --}}
@props(['user'])
@php
$roles = \App\Support\Prototype\RoleAccess::for($user);
$current = $user->role;
@endphp
<div class="role-switch" x-data="{ open: false }" x-on:keydown.escape="open = false" x-on:click.outside="open = false">
<button
type="button"
class="role-switch__trigger"
aria-haspopup="true" aria-label="Peran aktif: {{ $current->label() }}. Lihat daftar peran"
aria-controls="role-switch-menu"
x-bind:aria-expanded="open"
aria-expanded="false"
data-no-busy
x-on:click="open = !open"
>
<x-dynamic-component :component="'heroicon-o-'.$current->roleIcon()" class="role-switch__icon" />
<span class="role-switch__role">{{ $current->label() }}</span>
</button>
<div id="role-switch-menu" class="role-switch__menu" x-bind:class="{ 'is-open': open }" x-bind:inert="!open" inert>
<ul class="role-switch__list" role="list" aria-label="Peran yang dimiliki">
@foreach ($roles as $role)
<li>
@if ($role === $current)
<span class="role-switch__item is-current" aria-current="true">
<x-dynamic-component :component="'heroicon-o-'.$role->roleIcon()" class="role-switch__icon" />
<span class="role-switch__item-text">{{ $role->label() }}</span>
<x-heroicon-s-check class="role-switch__check" />
</span>
@else
<button
type="button"
class="role-switch__item"
data-no-busy
x-on:click="open = false; toast('info', 'Peralihan ke peran {{ $role->label() }} belum aktif pada tampilan prototipe.')"
>
<x-dynamic-component :component="'heroicon-o-'.$role->roleIcon()" class="role-switch__icon" />
<span class="role-switch__item-text">{{ $role->label() }}</span>
</button>
@endif
</li>
@endforeach
</ul>
</div>
</div>
@@ -0,0 +1,26 @@
{{-- Hiasan latar: garis awan bergerak (tema terang) dan bintang berkedip (tema gelap). Murni dekoratif, hanya opacity/transform. --}}
@props(['defs' => false])
<div class="sky" aria-hidden="true">
@if ($defs)
<svg class="sky__defs" width="0" height="0" focusable="false">
<symbol id="sky-cloud" viewBox="0 0 200 92">
<path d="M40 70 H150 C175 70 190 56 190 42 C190 28 176 18 160 20 C156 8 142 0 126 0 C108 0 94 10 90 24 C86 22 82 22 78 22 C62 22 50 33 50 46 C34 46 22 56 22 64 C22 68 28 70 40 70 Z M12 82 H74 M92 82 H168 M30 90 H120" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" vector-effect="non-scaling-stroke" />
</symbol>
</svg>
@endif
<div class="sky__clouds">
<svg class="sky__cloud" viewBox="0 0 200 92" style="--y: 9vh; --w: 15rem; --d: 170s; --t: -20s; --o: 1"><use href="#sky-cloud" /></svg>
<svg class="sky__cloud" viewBox="0 0 200 92" style="--y: 24vh; --w: 10rem; --d: 210s; --t: -130s; --o: 0.8"><use href="#sky-cloud" /></svg>
<svg class="sky__cloud" viewBox="0 0 200 92" style="--y: 46vh; --w: 18rem; --d: 240s; --t: -60s; --o: 0.9"><use href="#sky-cloud" /></svg>
<svg class="sky__cloud" viewBox="0 0 200 92" style="--y: 68vh; --w: 12rem; --d: 190s; --t: -170s; --o: 0.75"><use href="#sky-cloud" /></svg>
<svg class="sky__cloud" viewBox="0 0 200 92" style="--y: 86vh; --w: 16rem; --d: 260s; --t: -100s; --o: 0.85"><use href="#sky-cloud" /></svg>
</div>
<div class="sky__stars">
<i class="sky__star-layer sky__star-layer--1"></i>
<i class="sky__star-layer sky__star-layer--2"></i>
<i class="sky__star-layer sky__star-layer--3"></i>
<i class="sky__star-layer sky__star-layer--4"></i>
<i class="sky__star-layer sky__star-layer--5"></i>
</div>
</div>
@@ -0,0 +1,14 @@
{{-- Kartu angka tunggal dengan ikon. Nilai harus nyata dari DB. Dengan href, seluruh kartu menjadi tautan. --}}
@props(['label', 'value', 'icon' => 'chart-bar', 'hint' => null, 'href' => null])
@php
$shown = is_int($value) ? number_format($value, 0, ',', '.') : $value;
$tag = $href ? 'a' : 'div';
@endphp
<x-glass.panel :as="$tag" :href="$href" {{ $attributes->class('stat') }}>
<span class="stat__icon" aria-hidden="true"><x-dynamic-component :component="'heroicon-o-'.$icon" /></span>
<span class="stat__label">{{ $label }}</span>
<span class="stat__value">{{ $shown }}</span>
@if ($hint) <span class="stat__hint">{{ $hint }}</span> @endif
</x-glass.panel>
@@ -0,0 +1,4 @@
{{-- Deret kartu angka (ui.stat). --}}
<div {{ $attributes->class('stats') }}>
{{ $slot }}
</div>
@@ -0,0 +1,3 @@
@props(['href', 'active' => false])
<a href="{{ $href }}" @if ($active) aria-current="page" @endif {{ $attributes->class('tab') }}>{{ $slot }}</a>
@@ -0,0 +1,6 @@
{{-- Pembungkus tabel yang bisa digulir dan dapat difokus. Isi: <table class="table"> (atau table table--compact). Taruh di dalam glass.panel padding="none". --}}
@props(['label'])
<div {{ $attributes->class('table-wrap') }} role="region" tabindex="0" aria-label="{{ $label }}">
{{ $slot }}
</div>
@@ -0,0 +1,6 @@
{{-- Navigasi tab berbasis tautan (server). Isi: <x-ui.tab :href :active>. Menggulir ke samping di layar sempit. --}}
@props(['label'])
<nav {{ $attributes->class('tabs') }} aria-label="{{ $label }}">
<div class="tabs__list">{{ $slot }}</div>
</nav>
@@ -0,0 +1,13 @@
{{-- Tombol ganti tema terang/gelap. Pilihan disimpan di peramban; tanpa JS tombol disembunyikan. --}}
<button
type="button"
{{ $attributes->class('theme-toggle js-only') }}
x-data="themeToggle"
x-on:click="toggle($event)"
x-bind:aria-label="dark ? 'Ganti ke tema terang' : 'Ganti ke tema gelap'"
x-bind:title="dark ? 'Tema terang' : 'Tema gelap'"
aria-label="Ganti tema"
>
<span class="theme-toggle__moon" aria-hidden="true"><x-heroicon-o-moon /></span>
<span class="theme-toggle__sun" aria-hidden="true"><x-heroicon-o-sun /></span>
</button>