@signal9/era-ui 4.9.1 → 4.9.3
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.
- package/dist/os/pane.svelte +19 -10
- package/dist/ui/pane/pane-close.svelte +17 -7
- package/package.json +1 -1
package/dist/os/pane.svelte
CHANGED
|
@@ -72,7 +72,15 @@
|
|
|
72
72
|
pane.state === 'minimized' && 'hidden'
|
|
73
73
|
)}
|
|
74
74
|
>
|
|
75
|
-
|
|
75
|
+
<!-- Asymmetric on purpose, the same way a Conversations row is: the TRAILING
|
|
76
|
+
side holds xxs buttons, so it keeps the handle's own concentric wall
|
|
77
|
+
(--era-xxs-inset-md, 3/5/7/11) and their corners nest in the pane's; the
|
|
78
|
+
LEADING side holds a bare glyph and a label, which have no corner to nest,
|
|
79
|
+
so they sit at the text inset instead. At the wall the glyph's ink was 3px
|
|
80
|
+
from the edge against 5px above and below it — read as crowded because it
|
|
81
|
+
was. --era-inset-md is (h-md − text)/2, so the label now starts the same
|
|
82
|
+
distance in from the edge as it sits from the top. -->
|
|
83
|
+
<Pane.Handle class="gap-(--era-gap) pl-(--era-inset-md)">
|
|
76
84
|
{#if pane.icon}
|
|
77
85
|
{@const Icon = pane.icon}
|
|
78
86
|
<Icon class="size-(--era-h-xs) shrink-0 text-muted" />
|
|
@@ -95,22 +103,23 @@
|
|
|
95
103
|
held preview recolours to the action it will commit — yellow for
|
|
96
104
|
minimize, green for maximize — so the tone and glyph agree on what
|
|
97
105
|
the release does. -->
|
|
98
|
-
<!-- size="xxs" is the handle's content tier (see Pane.Handle), and
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
106
|
+
<!-- size="xxs" is the handle's content tier (see Pane.Handle), and the glyph
|
|
107
|
+
is h-xs for the same reason Pane.Close's is — the two close
|
|
108
|
+
affordances have to be the same weight, and a chrome close button has
|
|
109
|
+
to read at a glance.
|
|
102
110
|
|
|
103
111
|
The ONE exception stays a sub-tier down: the maximize bracket's
|
|
104
|
-
silhouette fills its whole box, so beside the
|
|
105
|
-
bulkier at the same nominal size. icon-
|
|
106
|
-
|
|
107
|
-
|
|
112
|
+
silhouette fills its whole box, so beside the × and − strokes it reads
|
|
113
|
+
bulkier at the same nominal size. icon-xxs is exactly 2px under h-xs at
|
|
114
|
+
every density — the same step this pair has always had, now spelled in
|
|
115
|
+
named tokens on both sides. It has to be written as [&_svg]: because
|
|
116
|
+
that is the selector the variant uses; a plain size-* on the <svg>
|
|
108
117
|
loses to it. -->
|
|
109
118
|
<Button
|
|
110
119
|
icon
|
|
111
120
|
size="xxs"
|
|
112
121
|
tone={armed === 'minimize' ? 'warning' : armed === 'maximize' ? 'success' : 'destructive'}
|
|
113
|
-
class={armed === 'maximize' ? '[&_svg]:size-(--era-icon-
|
|
122
|
+
class={armed === 'maximize' ? '[&_svg]:size-(--era-icon-xxs)' : '[&_svg]:size-(--era-h-xs)'}
|
|
114
123
|
aria-label="Close (right-click minimizes, middle-click maximizes)"
|
|
115
124
|
onclick={() => pm.close(pane.id)}
|
|
116
125
|
oncontextmenu={(e: MouseEvent) => e.preventDefault()}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import type { HTMLButtonAttributes } from 'svelte/elements';
|
|
3
3
|
import { Button } from '../button';
|
|
4
4
|
import X from '@lucide/svelte/icons/x';
|
|
5
|
+
import { cn } from '../../utils/index.js';
|
|
5
6
|
|
|
6
7
|
let {
|
|
7
8
|
ref = $bindable(null),
|
|
@@ -20,19 +21,28 @@
|
|
|
20
21
|
not the other way round.
|
|
21
22
|
|
|
22
23
|
xxs rather than the tighter `icon` size, which is what the handle's tier
|
|
23
|
-
asks for
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
asks for. The GLYPH then steps up to the icon tier itself (h-xs — 14/16/18/22)
|
|
25
|
+
rather than taking the xxs sub-tier's sp+4: a close button is the one control
|
|
26
|
+
in the chrome you must be able to hit and read at a glance, and half of a
|
|
27
|
+
Lucide glyph's box is padding inside its own viewBox, so the sub-tier rendered
|
|
28
|
+
visibly lighter than the reference app's (13px at dense, with Lucide's default
|
|
29
|
+
2px stroke against era's 1.75).
|
|
30
|
+
|
|
31
|
+
h-xs in an h-xxs box is a 2px pad — the same pad density.css derives for a
|
|
32
|
+
glyph in an xs box, so this is the documented step, not an exception to it.
|
|
33
|
+
It is also an INTEGER pad at every mode, where mirroring 13-in-18 exactly
|
|
34
|
+
would put the glyph on a half pixel at dense and blur a 1.75px stroke.
|
|
35
|
+
|
|
36
|
+
Written as [&_svg]: because that is the selector Button's icon variant uses —
|
|
37
|
+
a bare size-* on the <X> loses to it, which is why an earlier class there had
|
|
38
|
+
no effect at all. -->
|
|
29
39
|
<Button
|
|
30
40
|
bind:ref
|
|
31
41
|
icon
|
|
32
42
|
size="xxs"
|
|
33
43
|
tone="destructive"
|
|
34
44
|
aria-label="Close"
|
|
35
|
-
class={className}
|
|
45
|
+
class={cn('[&_svg]:size-(--era-h-xs)', className)}
|
|
36
46
|
{...restProps}
|
|
37
47
|
>
|
|
38
48
|
<X />
|