@metropolle/design-system 1.0.0-beta.2025.10.24.1740.ba2b09b → 1.0.0-beta.2025.12.11.1425.3d956d0

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.
@@ -1370,12 +1370,35 @@ function cn(...classes) {
1370
1370
  /**
1371
1371
  * Glass Card Component
1372
1372
  *
1373
- * Componente de cartão com efeito glassmorphism baseado na identidade Metropolle.
1374
- * Migrado dos componentes Angular existentes com melhorias.
1373
+ * Componente de cartão com efeito glassmorphism ou Liquid Glass (iOS 26 style).
1374
+ *
1375
+ * @example
1376
+ * ```tsx
1377
+ * // Liquid Glass (novo padrão)
1378
+ * <GlassCard glassStyle="liquid" intensity="md">
1379
+ * Content here
1380
+ * </GlassCard>
1381
+ *
1382
+ * // Glassmorphism tradicional (retrocompatível)
1383
+ * <GlassCard glassStyle="glass" variant="dark">
1384
+ * Content here
1385
+ * </GlassCard>
1386
+ * ```
1375
1387
  */
1376
- const GlassCard = forwardRef(({ variant = 'light', blur = 20, opacity, children, className, enableHover = true, style, ...props }, ref) => {
1388
+ const GlassCard = forwardRef(({ glassStyle = 'liquid', intensity = 'md', theme, variant = 'light', blur, opacity, children, className, enableHover = true, style, ...props }, ref) => {
1389
+ // Resolve theme from new prop or deprecated variant
1390
+ const resolvedTheme = theme ?? variant;
1391
+ // =====================
1392
+ // LIQUID GLASS MODE
1393
+ // =====================
1394
+ if (glassStyle === 'liquid') {
1395
+ return (jsxRuntimeExports.jsx("div", { ref: ref, className: cn('mds-liquid-glass', `mds-liquid-glass--${intensity}`, !enableHover && 'mds-liquid-glass--no-hover', className), style: style, ...props, children: children }));
1396
+ }
1397
+ // =====================
1398
+ // GLASS MODE (legacy)
1399
+ // =====================
1377
1400
  // Default opacities baseadas no design existente
1378
- const defaultOpacity = variant === 'light' ? 0.15 : 0.8;
1401
+ const defaultOpacity = resolvedTheme === 'light' ? 0.15 : 0.8;
1379
1402
  const finalOpacity = opacity ?? defaultOpacity;
1380
1403
  // Use CSS classes for base styles to avoid hydration mismatches
1381
1404
  const baseStyles = {
@@ -1383,12 +1406,16 @@ const GlassCard = forwardRef(({ variant = 'light', blur = 20, opacity, children,
1383
1406
  };
1384
1407
  // Only apply custom styles for non-default values
1385
1408
  const customStyles = {};
1386
- if (blur !== 20) {
1387
- customStyles.backdropFilter = `blur(${blur}px)`;
1388
- customStyles.WebkitBackdropFilter = `blur(${blur}px)`;
1409
+ // Support legacy blur prop or convert from intensity
1410
+ const resolvedBlur = blur ?? (intensity ? {
1411
+ xs: 2, sm: 4, md: 6, lg: 8, xl: 12
1412
+ }[intensity] : 20);
1413
+ if (resolvedBlur !== 20) {
1414
+ customStyles.backdropFilter = `blur(${resolvedBlur}px)`;
1415
+ customStyles.WebkitBackdropFilter = `blur(${resolvedBlur}px)`;
1389
1416
  }
1390
1417
  if (opacity !== undefined) {
1391
- customStyles.background = variant === 'light'
1418
+ customStyles.background = resolvedTheme === 'light'
1392
1419
  ? `rgba(255, 255, 255, ${finalOpacity})`
1393
1420
  : `rgba(60, 60, 60, ${finalOpacity})`;
1394
1421
  }
@@ -1403,7 +1430,7 @@ const GlassCard = forwardRef(({ variant = 'light', blur = 20, opacity, children,
1403
1430
  borderColor: 'rgba(255, 255, 255, 0.2)',
1404
1431
  background: opacity !== undefined ? `rgba(70, 70, 70, ${finalOpacity})` : undefined,
1405
1432
  }
1406
- }[variant] : {};
1433
+ }[resolvedTheme] : {};
1407
1434
  const handleMouseEnter = (e) => {
1408
1435
  if (!enableHover)
1409
1436
  return;
@@ -1421,7 +1448,7 @@ const GlassCard = forwardRef(({ variant = 'light', blur = 20, opacity, children,
1421
1448
  });
1422
1449
  props.onMouseLeave?.(e);
1423
1450
  };
1424
- return (jsxRuntimeExports.jsx("div", { ref: ref, className: cn('mds-glass-card', `mds-glass-card--${variant}`, !enableHover && 'mds-glass-card--no-hover', className), style: {
1451
+ return (jsxRuntimeExports.jsx("div", { ref: ref, className: cn('mds-glass-card', `mds-glass-card--${resolvedTheme}`, !enableHover && 'mds-glass-card--no-hover', className), style: {
1425
1452
  ...baseStyles,
1426
1453
  ...customStyles,
1427
1454
  ...style