@signal9/era-ui 2.35.2 → 2.35.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.
@@ -120,27 +120,31 @@
120
120
  bind:ref
121
121
  aria-label={label ? `${label}: ${current?.label}` : current?.label}
122
122
  data-value={value}
123
- class={cn('grid place-items-center', className)}
123
+ class={className}
124
124
  onclick={click}
125
125
  onkeydown={keydown}
126
126
  {...restProps}
127
127
  >
128
- {#each options as option (option.value)}
129
- {@const isCurrent = option.value === current?.value}
130
- <!--
131
- All faces occupy ONE grid cell, so the button sizes to the widest of them
132
- and never resizes as you cycle. Stacking with `absolute` would collapse
133
- the box to nothing instead.
134
- -->
135
- <span aria-hidden={!isCurrent} class={cn(faceBase, isCurrent ? faceIn : faceOut)}>
136
- {#if children}
137
- {@render children(option)}
138
- {:else if option.icon}
139
- {@const Icon = option.icon}
140
- <Icon class="size-(--era-h-xs) shrink-0" />
141
- {:else}
142
- {option.label}
143
- {/if}
144
- </span>
145
- {/each}
128
+ <!--
129
+ The stack owns its OWN grid, rather than making the Button the grid: the
130
+ Button wraps its content in a flex layer (for the surface press treatment),
131
+ so faces handed straight to it would lay out in a ROW, not a stack. All faces
132
+ occupy ONE cell of THIS grid, so it sizes to the widest of them and the button
133
+ never resizes as you cycle. (`absolute` would collapse the box to nothing.)
134
+ -->
135
+ <span class="grid place-items-center">
136
+ {#each options as option (option.value)}
137
+ {@const isCurrent = option.value === current?.value}
138
+ <span aria-hidden={!isCurrent} class={cn(faceBase, isCurrent ? faceIn : faceOut)}>
139
+ {#if children}
140
+ {@render children(option)}
141
+ {:else if option.icon}
142
+ {@const Icon = option.icon}
143
+ <Icon class="size-(--era-h-xs) shrink-0" />
144
+ {:else}
145
+ {option.label}
146
+ {/if}
147
+ </span>
148
+ {/each}
149
+ </span>
146
150
  </Button>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signal9/era-ui",
3
- "version": "2.35.2",
3
+ "version": "2.35.3",
4
4
  "scripts": {
5
5
  "dev": "vite dev --host",
6
6
  "build": "vite build && npm run prepack",