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