@classic-homes/theme-svelte 1.31.0 → 1.31.1

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.
@@ -1202,6 +1202,17 @@
1202
1202
  };
1203
1203
  });
1204
1204
 
1205
+ /**
1206
+ * Style object -> `style` attribute. Keys may be camelCase, as React's
1207
+ * DataPanel writes them: a raw `maxHeight:` declaration is invalid CSS, so
1208
+ * the desktop card silently lost its 95vh cap and its corner radius.
1209
+ */
1210
+ function toStyleAttribute(styles: Record<string, string>): string {
1211
+ return Object.entries(styles)
1212
+ .map(([key, value]) => `${key.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`)}:${value}`)
1213
+ .join(';');
1214
+ }
1215
+
1205
1216
  // Calculate panel styles
1206
1217
  const panelStyles = $derived.by(() => {
1207
1218
  if (variant === 'card') {
@@ -1388,9 +1399,7 @@
1388
1399
  animationClass,
1389
1400
  className
1390
1401
  )}
1391
- style={Object.entries(panelStyles)
1392
- .map(([k, v]) => `${k}:${v}`)
1393
- .join(';')}
1402
+ style={toStyleAttribute(panelStyles)}
1394
1403
  role={mode === 'detached' || variant === 'card' ? 'dialog' : 'complementary'}
1395
1404
  aria-modal={isDialog ? 'true' : undefined}
1396
1405
  aria-labelledby={title && !header ? titleId : undefined}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@classic-homes/theme-svelte",
3
- "version": "1.31.0",
3
+ "version": "1.31.1",
4
4
  "description": "Svelte components for the Classic theme system",
5
5
  "type": "module",
6
6
  "svelte": "./dist/lib/index.js",