@invopop/popui 0.1.53 → 0.1.55

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.
@@ -5,9 +5,9 @@
5
5
  let { size = 'sm', theme = 'light', children }: ShortcutWrapperProps = $props()
6
6
 
7
7
  const styles = $derived(
8
- clsx('inline-flex items-center justify-center border p-0.5', {
9
- 'size-5 rounded': size === 'sm',
10
- 'size-6 rounded-md': size === 'md',
8
+ clsx('inline-flex items-center justify-center border', {
9
+ 'size-4 rounded': size === 'sm',
10
+ 'size-5 rounded-md': size === 'md',
11
11
  'bg-background-default-secondary border-border-default-secondary shadow-shortcut text-foreground-default-secondary':
12
12
  theme === 'light',
13
13
  'bg-background-inverse-secondary border-border-inverse-secondary shadow-[0px_1px_0px_rgba(255,255,255,0.20)] text-foreground-inverse-secondary':
@@ -200,13 +200,15 @@
200
200
  let iconOnly = $derived(!children)
201
201
  let hasIcon = $derived(!!icon && !iconOnly)
202
202
 
203
- let iconSize = $derived(
204
- {
203
+ let iconSize = $derived.by(() => {
204
+ if (shortcut) return 'size-3'
205
+
206
+ return {
205
207
  sm: 'size-3',
206
208
  md: 'size-4',
207
209
  lg: 'size-4'
208
210
  }[size]
209
- )
211
+ })
210
212
 
211
213
  // For icon-right, we need to reverse the padding
212
214
  let paddingClass = $derived(
@@ -225,6 +227,7 @@
225
227
  {#snippet iconContent()}
226
228
  {#if shortcut}
227
229
  <ShortcutWrapper
230
+ size="sm"
228
231
  theme={['dark', 'primary', 'danger'].includes(variant) ? 'navigation' : 'light'}
229
232
  >
230
233
  {@render iconElement()}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@invopop/popui",
3
3
  "license": "MIT",
4
- "version": "0.1.53",
4
+ "version": "0.1.55",
5
5
  "repository": {
6
6
  "url": "https://github.com/invopop/popui"
7
7
  },