@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.
@@ -72,7 +72,15 @@
72
72
  pane.state === 'minimized' && 'hidden'
73
73
  )}
74
74
  >
75
- <Pane.Handle class="gap-(--era-gap)">
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 it also
99
- sets the glyph: the xxs button draws icon-xxs, which is what this
100
- button used to force with a hand-written [&_svg] class. Same size as
101
- Pane.Close, so the two close affordances match.
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 x and − strokes it reads
105
- bulkier at the same nominal size. icon-xs is exactly 2px under
106
- icon-xxs at every density. It has to be written as [&_svg]: because
107
- that is the selector the variant uses a plain size-* on the <svg>
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-xs)' : undefined}
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 and it also gets the glyph right for free. A close button is the
24
- one control in the chrome you must be able to hit and read at a glance, and
25
- half of a Lucide glyph's box is padding inside its own viewBox, so `icon`'s
26
- 10px rendered about 5px of actual ink; this tier draws icon-xxs (12px at
27
- dense), which is what the old hand-written [&_svg] override existed to
28
- force. One tier declaration now says both things. -->
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 />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signal9/era-ui",
3
- "version": "4.9.1",
3
+ "version": "4.9.3",
4
4
  "scripts": {
5
5
  "dev": "vite dev --host",
6
6
  "build": "vite build && npm run prepack",