@signal9/era-ui 4.9.1 → 4.9.2

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.
@@ -95,22 +95,23 @@
95
95
  held preview recolours to the action it will commit — yellow for
96
96
  minimize, green for maximize — so the tone and glyph agree on what
97
97
  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.
98
+ <!-- size="xxs" is the handle's content tier (see Pane.Handle), and the glyph
99
+ is h-xs for the same reason Pane.Close's is the two close
100
+ affordances have to be the same weight, and a chrome close button has
101
+ to read at a glance.
102
102
 
103
103
  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>
104
+ silhouette fills its whole box, so beside the × and − strokes it reads
105
+ bulkier at the same nominal size. icon-xxs is exactly 2px under h-xs at
106
+ every density the same step this pair has always had, now spelled in
107
+ named tokens on both sides. It has to be written as [&_svg]: because
108
+ that is the selector the variant uses; a plain size-* on the <svg>
108
109
  loses to it. -->
109
110
  <Button
110
111
  icon
111
112
  size="xxs"
112
113
  tone={armed === 'minimize' ? 'warning' : armed === 'maximize' ? 'success' : 'destructive'}
113
- class={armed === 'maximize' ? '[&_svg]:size-(--era-icon-xs)' : undefined}
114
+ class={armed === 'maximize' ? '[&_svg]:size-(--era-icon-xxs)' : '[&_svg]:size-(--era-h-xs)'}
114
115
  aria-label="Close (right-click minimizes, middle-click maximizes)"
115
116
  onclick={() => pm.close(pane.id)}
116
117
  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.2",
4
4
  "scripts": {
5
5
  "dev": "vite dev --host",
6
6
  "build": "vite build && npm run prepack",