mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-23 12:06:42 +02:00
Merge branch 'dev' into till-dev
This commit is contained in:
commit
285e142970
251 changed files with 9752 additions and 3942 deletions
|
|
@ -1,7 +1,14 @@
|
|||
<script lang="ts">
|
||||
import type { Snippet } from 'svelte';
|
||||
|
||||
type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'danger' | 'outline' | 'success';
|
||||
type ButtonVariant =
|
||||
| 'primary'
|
||||
| 'secondary'
|
||||
| 'ghost'
|
||||
| 'danger'
|
||||
| 'destructive'
|
||||
| 'outline'
|
||||
| 'success';
|
||||
type ButtonSize = 'sm' | 'md' | 'lg' | 'xl';
|
||||
|
||||
interface Props {
|
||||
|
|
@ -31,6 +38,7 @@
|
|||
secondary: 'bg-menu text-theme hover:bg-menu-hover border-theme',
|
||||
ghost: 'bg-transparent text-theme hover:bg-menu-hover border-transparent',
|
||||
danger: 'bg-red-600 text-white hover:bg-red-700 border-transparent',
|
||||
destructive: 'bg-red-600 text-white hover:bg-red-700 border-transparent',
|
||||
outline: 'bg-transparent text-primary border-primary hover:bg-primary/10',
|
||||
success: 'bg-green-600 text-white hover:bg-green-700 border-transparent',
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script lang="ts">
|
||||
import { ChevronDown, ChevronUp } from 'lucide-svelte';
|
||||
import { ChevronDown, ChevronUp } from '@lucide/svelte';
|
||||
|
||||
interface Props {
|
||||
/** Whether immersive mode is currently enabled */
|
||||
|
|
|
|||
|
|
@ -86,7 +86,6 @@
|
|||
|
||||
{#if visible}
|
||||
<!-- Backdrop to block clicks on elements behind -->
|
||||
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
||||
<div
|
||||
class="context-menu-backdrop"
|
||||
onpointerdown={(e) => {
|
||||
|
|
@ -104,9 +103,17 @@
|
|||
e.stopPropagation();
|
||||
onClose();
|
||||
}}
|
||||
onkeydown={(e) => {
|
||||
if (e.key === 'Escape' || e.key === 'Enter' || e.key === ' ') {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
onClose();
|
||||
}
|
||||
}}
|
||||
role="presentation"
|
||||
aria-hidden="true"
|
||||
></div>
|
||||
|
||||
<!-- svelte-ignore a11y_no_noninteractive_element_interactions -->
|
||||
<div
|
||||
bind:this={menuElement}
|
||||
class="context-menu"
|
||||
|
|
|
|||
|
|
@ -217,8 +217,20 @@
|
|||
<svelte:window onkeydown={handleKeydown} onclick={handleClickOutside} />
|
||||
|
||||
<!-- Trigger wrapper -->
|
||||
<!-- svelte-ignore a11y_click_events_have_key_events a11y_no_static_element_interactions -->
|
||||
<div class="confirmation-popover-trigger" bind:this={triggerRef} onclick={handleTriggerClick}>
|
||||
<div
|
||||
class="confirmation-popover-trigger"
|
||||
bind:this={triggerRef}
|
||||
onclick={handleTriggerClick}
|
||||
onkeydown={(e) => {
|
||||
if (e.key === 'Enter' || e.key === ' ') {
|
||||
e.preventDefault();
|
||||
handleTriggerClick(e as unknown as MouseEvent);
|
||||
}
|
||||
}}
|
||||
role="button"
|
||||
tabindex="0"
|
||||
aria-expanded={visible}
|
||||
>
|
||||
{@render children()}
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@
|
|||
class?: string;
|
||||
id?: string;
|
||||
name?: string;
|
||||
minlength?: number;
|
||||
maxlength?: number;
|
||||
}
|
||||
|
||||
let {
|
||||
|
|
@ -33,6 +35,8 @@
|
|||
class: className = '',
|
||||
id = `input-${Math.random().toString(36).slice(2, 9)}`,
|
||||
name,
|
||||
minlength,
|
||||
maxlength,
|
||||
}: Props = $props();
|
||||
|
||||
function handleInput(e: Event) {
|
||||
|
|
@ -65,6 +69,8 @@
|
|||
{placeholder}
|
||||
{disabled}
|
||||
{required}
|
||||
{minlength}
|
||||
{maxlength}
|
||||
autocomplete={autocomplete as HTMLInputAttributes['autocomplete']}
|
||||
oninput={handleInput}
|
||||
onchange={handleChange}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script lang="ts">
|
||||
import { Search, ZoomIn, ZoomOut, RotateCcw, Filter, X, Focus, Keyboard } from 'lucide-svelte';
|
||||
import { Search, ZoomIn, ZoomOut, RotateCcw, Filter, X, Focus, Keyboard } from '@lucide/svelte';
|
||||
import type { NetworkTag } from './network.types';
|
||||
|
||||
interface Props {
|
||||
|
|
@ -56,6 +56,7 @@
|
|||
let showFilters = $state(false);
|
||||
let showKeyboardHelp = $state(false);
|
||||
let strengthValue = $state(minStrength);
|
||||
// svelte-ignore non_reactive_update - Element reference doesn't need reactivity
|
||||
let searchInputElement: HTMLInputElement;
|
||||
|
||||
// Sync searchInput with external searchQuery
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ export interface NetworkLink {
|
|||
export interface SimulationLink {
|
||||
source: string | SimulationNode;
|
||||
target: string | SimulationNode;
|
||||
type: 'tag';
|
||||
type: string; // e.g., 'tag', 'calendar', 'date', 'location', etc.
|
||||
strength: number;
|
||||
sharedTags: string[];
|
||||
index?: number;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue