@3birds/midori-ui 0.0.47 → 0.0.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,12 +8,31 @@
8
8
  dial: import('svelte').Snippet;
9
9
  children: import('svelte').Snippet;
10
10
  } = $props();
11
+
12
+ let overlay: boolean = $state(false);
13
+
14
+ const onFocusOut = (e: FocusEvent): void => {
15
+ const container = e.currentTarget as HTMLElement;
16
+ if (!container.contains(e.relatedTarget as Node | null)) overlay = false;
17
+ };
18
+
19
+ const onClickOverlay = (): void => (document.activeElement as HTMLElement | null)?.blur();
11
20
  </script>
12
21
 
13
- <div class="fab {className}">
14
- <div tabindex="0" role="button" class="btn z-10 btn-circle btn-primary btn-xl">
22
+ {#if overlay}
23
+ <button
24
+ type="button"
25
+ tabindex="-1"
26
+ aria-label="閉じる"
27
+ class="fixed inset-0 z-40 cursor-default bg-base-content/40"
28
+ onmousedown={(e) => e.preventDefault()}
29
+ onclick={onClickOverlay}
30
+ ></button>
31
+ {/if}
32
+
33
+ <div class="fab z-50 {className}" onfocusin={() => (overlay = true)} onfocusout={onFocusOut}>
34
+ <div tabindex="0" role="button" class="btn btn-circle btn-primary btn-xl">
15
35
  {@render dial()}
16
36
  </div>
17
- <div class="fixed inset-0 z-0 bg-base-content/40"></div>
18
37
  {@render children()}
19
38
  </div>
@@ -48,6 +48,7 @@ export interface ContentReview {
48
48
  content_name: string;
49
49
  reviewer_nickname: string;
50
50
  reviewer_icon?: string;
51
+ updated_at: string;
51
52
  }
52
53
  export interface ContentMinimal {
53
54
  id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@3birds/midori-ui",
3
- "version": "0.0.47",
3
+ "version": "0.0.48",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite dev",