@pie-players/pie-section-player-tools-shared 0.3.3 → 0.3.5

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.
@@ -3,20 +3,31 @@
3
3
  minimized = false,
4
4
  onToggle,
5
5
  onClose,
6
- buttonClass = "btn btn-xs btn-ghost btn-circle",
6
+ buttonClass = "",
7
7
  } = $props<{
8
8
  minimized?: boolean;
9
9
  onToggle?: () => void;
10
10
  onClose?: () => void;
11
11
  buttonClass?: string;
12
12
  }>();
13
+
14
+ const resolvedButtonClass = $derived.by(
15
+ () => (buttonClass || "").trim() || "pie-window-controls__button",
16
+ );
13
17
  </script>
14
18
 
15
- <button class={buttonClass} onclick={onToggle} title={minimized ? "Maximize" : "Minimize"}>
19
+ <button
20
+ class={resolvedButtonClass}
21
+ onclick={onToggle}
22
+ title={minimized ? "Maximize" : "Minimize"}
23
+ aria-label={minimized ? "Maximize panel" : "Minimize panel"}
24
+ >
16
25
  {#if minimized}
17
26
  <svg
18
27
  xmlns="http://www.w3.org/2000/svg"
19
- class="h-3 w-3"
28
+ class="pie-window-controls__icon"
29
+ width="12"
30
+ height="12"
20
31
  fill="none"
21
32
  viewBox="0 0 24 24"
22
33
  stroke="currentColor"
@@ -26,7 +37,9 @@
26
37
  {:else}
27
38
  <svg
28
39
  xmlns="http://www.w3.org/2000/svg"
29
- class="h-3 w-3"
40
+ class="pie-window-controls__icon"
41
+ width="12"
42
+ height="12"
30
43
  fill="none"
31
44
  viewBox="0 0 24 24"
32
45
  stroke="currentColor"
@@ -35,10 +48,17 @@
35
48
  </svg>
36
49
  {/if}
37
50
  </button>
38
- <button class={buttonClass} onclick={onClose} title="Close">
51
+ <button
52
+ class={resolvedButtonClass}
53
+ onclick={onClose}
54
+ title="Close"
55
+ aria-label="Close panel"
56
+ >
39
57
  <svg
40
58
  xmlns="http://www.w3.org/2000/svg"
41
- class="h-3 w-3"
59
+ class="pie-window-controls__icon"
60
+ width="12"
61
+ height="12"
42
62
  fill="none"
43
63
  viewBox="0 0 24 24"
44
64
  stroke="currentColor"
@@ -46,3 +66,32 @@
46
66
  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
47
67
  </svg>
48
68
  </button>
69
+
70
+ <style>
71
+ .pie-window-controls__button {
72
+ display: inline-flex;
73
+ align-items: center;
74
+ justify-content: center;
75
+ width: 1.35rem;
76
+ height: 1.35rem;
77
+ padding: 0;
78
+ border: 1px solid rgba(148, 163, 184, 0.7);
79
+ border-radius: 9999px;
80
+ background: rgba(255, 255, 255, 0.65);
81
+ color: #334155;
82
+ cursor: pointer;
83
+ }
84
+
85
+ .pie-window-controls__button:hover {
86
+ background: rgba(241, 245, 249, 0.95);
87
+ }
88
+
89
+ .pie-window-controls__button:focus-visible {
90
+ outline: 2px solid #3b82f6;
91
+ outline-offset: 1px;
92
+ }
93
+
94
+ .pie-window-controls__icon {
95
+ display: block;
96
+ }
97
+ </style>