aloha-ui-library 0.2.2 → 0.2.4

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.
Files changed (76) hide show
  1. package/dist/components/Avatar/Avatar.d.ts +9 -0
  2. package/dist/components/Avatar/index.d.ts +1 -0
  3. package/dist/components/Badge/Badge.d.ts +9 -0
  4. package/dist/components/Badge/index.d.ts +1 -0
  5. package/dist/components/Button/Button.d.ts +28 -0
  6. package/dist/components/Button/index.d.ts +1 -0
  7. package/dist/components/Card/Card.d.ts +43 -0
  8. package/dist/components/Card/index.d.ts +1 -0
  9. package/dist/components/ChatMessage/ChatMessage.d.ts +29 -0
  10. package/dist/components/ChatMessage/index.d.ts +1 -0
  11. package/dist/components/Checkbox/Checkbox.d.ts +6 -0
  12. package/dist/components/Checkbox/index.d.ts +1 -0
  13. package/dist/components/ColorPalette/ColorPalette.d.ts +18 -0
  14. package/dist/components/ColorPalette/index.d.ts +1 -0
  15. package/dist/components/Emoji/Emoji.d.ts +23 -0
  16. package/dist/components/Emoji/index.d.ts +1 -0
  17. package/dist/components/Error/Error.d.ts +11 -0
  18. package/dist/components/Error/index.d.ts +1 -0
  19. package/dist/components/ErrorFullScreen/ErrorFullScreen.d.ts +11 -0
  20. package/dist/components/ErrorFullScreen/index.d.ts +1 -0
  21. package/dist/components/FormError/FormError.d.ts +6 -0
  22. package/dist/components/FormError/index.d.ts +1 -0
  23. package/dist/components/FriendListItem/FriendListItem.d.ts +28 -0
  24. package/dist/components/FriendListItem/index.d.ts +1 -0
  25. package/dist/components/FullPage/FullPage.d.ts +8 -0
  26. package/dist/components/FullPage/index.d.ts +1 -0
  27. package/dist/components/Grid/Grid.d.ts +50 -0
  28. package/dist/components/Grid/index.d.ts +1 -0
  29. package/dist/components/Icon/Icon.d.ts +11 -0
  30. package/dist/components/Icon/index.d.ts +1 -0
  31. package/dist/components/Image/Image.d.ts +22 -0
  32. package/dist/components/Image/index.d.ts +1 -0
  33. package/dist/components/Input/Input.d.ts +8 -0
  34. package/dist/components/Input/index.d.ts +1 -0
  35. package/dist/components/Link/Link.d.ts +27 -0
  36. package/dist/components/Link/index.d.ts +1 -0
  37. package/dist/components/Loading/Loading.d.ts +8 -0
  38. package/dist/components/Loading/index.d.ts +1 -0
  39. package/dist/components/LoadingFullScreen/LoadingFullScreen.d.ts +8 -0
  40. package/dist/components/LoadingFullScreen/index.d.ts +1 -0
  41. package/dist/components/Logo/Logo.d.ts +11 -0
  42. package/dist/components/Logo/index.d.ts +1 -0
  43. package/dist/components/Navbar/Navbar.d.ts +62 -0
  44. package/dist/components/Navbar/index.d.ts +1 -0
  45. package/dist/components/Notification/Notification.d.ts +15 -0
  46. package/dist/components/Notification/index.d.ts +1 -0
  47. package/dist/components/Pattern/Pattern.d.ts +34 -0
  48. package/dist/components/Pattern/index.d.ts +1 -0
  49. package/dist/components/PatternFill/PatternFill.d.ts +31 -0
  50. package/dist/components/PatternFill/index.d.ts +1 -0
  51. package/dist/components/PatternGroup/PatternGroup.d.ts +35 -0
  52. package/dist/components/PatternGroup/index.d.ts +1 -0
  53. package/dist/components/Popup/Popup.d.ts +43 -0
  54. package/dist/components/Popup/index.d.ts +1 -0
  55. package/dist/components/QuestionCard/QuestionCard.d.ts +55 -0
  56. package/dist/components/QuestionCard/index.d.ts +1 -0
  57. package/dist/components/SearchInput/SearchInput.d.ts +6 -0
  58. package/dist/components/SearchInput/index.d.ts +1 -0
  59. package/dist/components/Streak/Streak.d.ts +13 -0
  60. package/dist/components/Streak/index.d.ts +1 -0
  61. package/dist/components/Switch/Switch.d.ts +10 -0
  62. package/dist/components/Switch/index.d.ts +1 -0
  63. package/dist/components/TextDivider/TextDivider.d.ts +30 -0
  64. package/dist/components/TextDivider/index.d.ts +1 -0
  65. package/dist/components/Toast/Toast.d.ts +11 -0
  66. package/dist/components/Toast/index.d.ts +1 -0
  67. package/dist/components/Typography/Typography.d.ts +34 -0
  68. package/dist/components/Typography/index.d.ts +1 -0
  69. package/dist/index.css +2 -2
  70. package/dist/index.d.ts +2 -0
  71. package/dist/index.esm.css +2 -2
  72. package/dist/index.esm.js +313 -95
  73. package/dist/index.esm.js.map +1 -1
  74. package/dist/index.js +312 -92
  75. package/dist/index.js.map +1 -1
  76. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2764,7 +2764,7 @@ var themeVars = {
2764
2764
  primary: 'var(--theme-primary)'
2765
2765
  };
2766
2766
 
2767
- var _excluded$o = ["className", "variant", "size", "loading", "disabled", "color", "textColor", "borderColor", "icon", "children", "style", "borderWidth"];
2767
+ var _excluded$q = ["className", "variant", "size", "loading", "disabled", "color", "textColor", "borderColor", "icon", "children", "style", "borderWidth"];
2768
2768
  var buttonVariants = cva('inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50', {
2769
2769
  variants: {
2770
2770
  variant: {
@@ -2801,7 +2801,7 @@ var Button = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
2801
2801
  style = _ref.style,
2802
2802
  _ref$borderWidth = _ref.borderWidth,
2803
2803
  borderWidth = _ref$borderWidth === void 0 ? 1 : _ref$borderWidth,
2804
- props = _objectWithoutProperties(_ref, _excluded$o);
2804
+ props = _objectWithoutProperties(_ref, _excluded$q);
2805
2805
  var customStyle = {};
2806
2806
  // Aplicar color de fondo si se especifica
2807
2807
  if (color) {
@@ -2860,7 +2860,7 @@ var Button = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
2860
2860
  });
2861
2861
  Button.displayName = 'Button';
2862
2862
 
2863
- var _excluded$n = ["className", "children", "font", "weight", "color", "style"],
2863
+ var _excluded$p = ["className", "children", "font", "weight", "color", "style"],
2864
2864
  _excluded2$3 = ["className", "children", "font", "weight", "color", "style"],
2865
2865
  _excluded3$2 = ["className", "children", "font", "weight", "color", "style"],
2866
2866
  _excluded4$1 = ["className", "children", "font", "weight", "color", "style"],
@@ -2899,7 +2899,7 @@ var H1 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
2899
2899
  weight = _ref.weight,
2900
2900
  color = _ref.color,
2901
2901
  style = _ref.style,
2902
- props = _objectWithoutProperties(_ref, _excluded$n);
2902
+ props = _objectWithoutProperties(_ref, _excluded$p);
2903
2903
  return jsxRuntime.jsx("h1", _objectSpread2(_objectSpread2({
2904
2904
  ref: ref,
2905
2905
  className: cn('scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl', fontFamilyClasses[font], weight && fontWeightClasses[weight], className),
@@ -2920,7 +2920,7 @@ var H2 = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
2920
2920
  props = _objectWithoutProperties(_ref2, _excluded2$3);
2921
2921
  return jsxRuntime.jsx("h2", _objectSpread2(_objectSpread2({
2922
2922
  ref: ref,
2923
- className: cn('scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight first:mt-0', fontFamilyClasses[font], weight && fontWeightClasses[weight], className),
2923
+ className: cn('scroll-m-20 text-3xl font-semibold tracking-tight first:mt-0', fontFamilyClasses[font], weight && fontWeightClasses[weight], className),
2924
2924
  style: _objectSpread2(_objectSpread2({}, getColorStyle(color)), style)
2925
2925
  }, props), {}, {
2926
2926
  children: children
@@ -3054,17 +3054,37 @@ var Muted = /*#__PURE__*/React.forwardRef(function (_ref9, ref) {
3054
3054
  });
3055
3055
  Muted.displayName = 'Muted';
3056
3056
 
3057
- var _excluded$m = ["className", "size", "borderRadius", "showBorder", "backgroundColor", "borderColor", "shadow"],
3058
- _excluded2$2 = ["className"],
3057
+ var _excluded$o = ["className", "size", "borderRadius", "showBorder", "backgroundColor", "borderColor", "shadow", "padding", "margin", "style"],
3058
+ _excluded2$2 = ["className", "padding", "margin", "style"],
3059
3059
  _excluded3$1 = ["className", "font", "weight", "descriptionColor", "small", "children"],
3060
3060
  _excluded4 = ["color"],
3061
- _excluded5 = ["className"],
3062
- _excluded6 = ["className"];
3061
+ _excluded5 = ["className", "padding", "margin", "style"],
3062
+ _excluded6 = ["className", "padding", "margin", "style"];
3063
3063
  var sizeClasses$2 = {
3064
3064
  full: 'w-full',
3065
3065
  constrained: 'max-w-md',
3066
3066
  auto: 'w-auto'
3067
3067
  };
3068
+ var spacingValues$1 = {
3069
+ none: '0',
3070
+ xs: '0.25rem',
3071
+ sm: '0.5rem',
3072
+ md: '1rem',
3073
+ lg: '1.5rem',
3074
+ xl: '2rem'
3075
+ };
3076
+ var buildSpacingStyle = function buildSpacingStyle(padding, margin) {
3077
+ var style = {};
3078
+ if (padding !== undefined) {
3079
+ var _spacingValues$paddin;
3080
+ style.padding = (_spacingValues$paddin = spacingValues$1[padding]) !== null && _spacingValues$paddin !== void 0 ? _spacingValues$paddin : padding;
3081
+ }
3082
+ if (margin !== undefined) {
3083
+ var _spacingValues$margin;
3084
+ style.margin = (_spacingValues$margin = spacingValues$1[margin]) !== null && _spacingValues$margin !== void 0 ? _spacingValues$margin : margin;
3085
+ }
3086
+ return style;
3087
+ };
3068
3088
  var borderRadiusClasses = {
3069
3089
  none: 'rounded-none',
3070
3090
  sm: 'rounded-sm',
@@ -3130,20 +3150,27 @@ var Card = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
3130
3150
  borderColor = _ref$borderColor === void 0 ? 'default' : _ref$borderColor,
3131
3151
  _ref$shadow = _ref.shadow,
3132
3152
  shadow = _ref$shadow === void 0 ? true : _ref$shadow,
3133
- props = _objectWithoutProperties(_ref, _excluded$m);
3153
+ padding = _ref.padding,
3154
+ margin = _ref.margin,
3155
+ style = _ref.style,
3156
+ props = _objectWithoutProperties(_ref, _excluded$o);
3134
3157
  return jsxRuntime.jsx("div", _objectSpread2({
3135
3158
  ref: ref,
3136
- className: cn('text-card-foreground', sizeClasses$2[size], borderRadiusClasses[borderRadius], showBorder ? 'border' : '', showBorder ? getBorderColor(borderColor) : '', getBackgroundColor(backgroundColor), shadow ? 'shadow-sm' : '', className)
3159
+ className: cn('text-card-foreground', sizeClasses$2[size], borderRadiusClasses[borderRadius], showBorder ? 'border' : '', showBorder ? getBorderColor(borderColor) : '', getBackgroundColor(backgroundColor), shadow ? 'shadow-sm' : '', className),
3160
+ style: _objectSpread2(_objectSpread2({}, buildSpacingStyle(padding, margin)), style)
3137
3161
  }, props));
3138
3162
  });
3139
3163
  Card.displayName = 'Card';
3140
- // Subcomponentes flexibles
3141
3164
  var CardHeader = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
3142
3165
  var className = _ref2.className,
3166
+ padding = _ref2.padding,
3167
+ margin = _ref2.margin,
3168
+ style = _ref2.style,
3143
3169
  props = _objectWithoutProperties(_ref2, _excluded2$2);
3144
3170
  return jsxRuntime.jsx("div", _objectSpread2({
3145
3171
  ref: ref,
3146
- className: cn('flex flex-col space-y-1.5 p-6', className)
3172
+ className: cn('flex flex-col space-y-1.5', padding === undefined ? 'p-6' : '', className),
3173
+ style: _objectSpread2(_objectSpread2({}, buildSpacingStyle(padding, margin)), style)
3147
3174
  }, props));
3148
3175
  });
3149
3176
  CardHeader.displayName = 'CardHeader';
@@ -3214,24 +3241,32 @@ var CardDescription = /*#__PURE__*/React.forwardRef(function (_ref4, ref) {
3214
3241
  CardDescription.displayName = 'CardDescription';
3215
3242
  var CardContent = /*#__PURE__*/React.forwardRef(function (_ref5, ref) {
3216
3243
  var className = _ref5.className,
3244
+ padding = _ref5.padding,
3245
+ margin = _ref5.margin,
3246
+ style = _ref5.style,
3217
3247
  props = _objectWithoutProperties(_ref5, _excluded5);
3218
3248
  return jsxRuntime.jsx("div", _objectSpread2({
3219
3249
  ref: ref,
3220
- className: cn('p-6 pt-0', className)
3250
+ className: cn(padding === undefined ? 'p-6 pt-0' : '', className),
3251
+ style: _objectSpread2(_objectSpread2({}, buildSpacingStyle(padding, margin)), style)
3221
3252
  }, props));
3222
3253
  });
3223
3254
  CardContent.displayName = 'CardContent';
3224
3255
  var CardFooter = /*#__PURE__*/React.forwardRef(function (_ref6, ref) {
3225
3256
  var className = _ref6.className,
3257
+ padding = _ref6.padding,
3258
+ margin = _ref6.margin,
3259
+ style = _ref6.style,
3226
3260
  props = _objectWithoutProperties(_ref6, _excluded6);
3227
3261
  return jsxRuntime.jsx("div", _objectSpread2({
3228
3262
  ref: ref,
3229
- className: cn('flex items-center p-6 pt-0', className)
3263
+ className: cn('flex items-center', padding === undefined ? 'p-6 pt-0' : '', className),
3264
+ style: _objectSpread2(_objectSpread2({}, buildSpacingStyle(padding, margin)), style)
3230
3265
  }, props));
3231
3266
  });
3232
3267
  CardFooter.displayName = 'CardFooter';
3233
3268
 
3234
- var _excluded$l = ["className", "src", "alt", "fallback", "size"];
3269
+ var _excluded$n = ["className", "src", "alt", "fallback", "size"];
3235
3270
  var Avatar = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
3236
3271
  var _alt$charAt;
3237
3272
  var className = _ref.className,
@@ -3240,7 +3275,7 @@ var Avatar = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
3240
3275
  fallback = _ref.fallback,
3241
3276
  _ref$size = _ref.size,
3242
3277
  size = _ref$size === void 0 ? 'md' : _ref$size,
3243
- props = _objectWithoutProperties(_ref, _excluded$l);
3278
+ props = _objectWithoutProperties(_ref, _excluded$n);
3244
3279
  var _React$useState = React.useState(false),
3245
3280
  _React$useState2 = _slicedToArray(_React$useState, 2),
3246
3281
  imageFailed = _React$useState2[0],
@@ -3273,7 +3308,7 @@ var Avatar = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
3273
3308
  });
3274
3309
  Avatar.displayName = 'Avatar';
3275
3310
 
3276
- var _excluded$k = ["className", "variant"];
3311
+ var _excluded$m = ["className", "variant"];
3277
3312
  var badgeVariants = cva('inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2', {
3278
3313
  variants: {
3279
3314
  variant: {
@@ -3290,7 +3325,7 @@ var badgeVariants = cva('inline-flex items-center rounded-full border px-2.5 py-
3290
3325
  function Badge(_ref) {
3291
3326
  var className = _ref.className,
3292
3327
  variant = _ref.variant,
3293
- props = _objectWithoutProperties(_ref, _excluded$k);
3328
+ props = _objectWithoutProperties(_ref, _excluded$m);
3294
3329
  return jsxRuntime.jsx("div", _objectSpread2({
3295
3330
  className: cn(badgeVariants({
3296
3331
  variant: variant
@@ -3298,7 +3333,33 @@ function Badge(_ref) {
3298
3333
  }, props));
3299
3334
  }
3300
3335
 
3301
- var _excluded$j = ["className", "type", "label", "helperText", "required", "id"];
3336
+ var _excluded$l = ["className", "error"];
3337
+ var FormError = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
3338
+ var className = _ref.className,
3339
+ error = _ref.error,
3340
+ props = _objectWithoutProperties(_ref, _excluded$l);
3341
+ if (!error) return null;
3342
+ return jsxRuntime.jsxs("div", _objectSpread2(_objectSpread2({
3343
+ ref: ref,
3344
+ className: cn('flex items-center gap-1.5 mt-1.5', className)
3345
+ }, props), {}, {
3346
+ children: [jsxRuntime.jsx(lucideReact.AlertCircle, {
3347
+ className: "w-4 h-4",
3348
+ style: {
3349
+ color: colors.coral
3350
+ }
3351
+ }), jsxRuntime.jsx(P, {
3352
+ className: "text-sm m-0 font-medium",
3353
+ style: {
3354
+ color: colors.coral
3355
+ },
3356
+ children: error
3357
+ })]
3358
+ }));
3359
+ });
3360
+ FormError.displayName = 'FormError';
3361
+
3362
+ var _excluded$k = ["className", "type", "label", "helperText", "required", "id", "error"];
3302
3363
  var Input = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
3303
3364
  var className = _ref.className,
3304
3365
  type = _ref.type,
@@ -3306,7 +3367,18 @@ var Input = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
3306
3367
  helperText = _ref.helperText,
3307
3368
  required = _ref.required,
3308
3369
  id = _ref.id,
3309
- props = _objectWithoutProperties(_ref, _excluded$j);
3370
+ error = _ref.error,
3371
+ props = _objectWithoutProperties(_ref, _excluded$k);
3372
+ var _useState = React.useState(false),
3373
+ _useState2 = _slicedToArray(_useState, 2),
3374
+ showPassword = _useState2[0],
3375
+ setShowPassword = _useState2[1];
3376
+ var isPassword = type === 'password';
3377
+ var inputType = isPassword ? showPassword ? 'text' : 'password' : type;
3378
+ // Determine if type was explicitly set to text by parent but it's meant to be a password
3379
+ // Wait, the parent might already be doing `type={showPassword ? 'text' : 'password'}`
3380
+ // If we handle it internally, we check if `type === 'password'`. If the parent does that, our internal toggle wouldn't work when parent overrides.
3381
+ // However, since we now handle it internally, parents won't need to control the toggle.
3310
3382
  var inputId = id || "input-".concat(Math.random().toString(36).substr(2, 9));
3311
3383
  return jsxRuntime.jsxs("div", {
3312
3384
  className: "w-full",
@@ -3324,27 +3396,47 @@ var Input = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
3324
3396
  className: "text-xs text-gray-500 m-0 mt-1 [&:not(:first-child)]:mt-1",
3325
3397
  children: helperText
3326
3398
  })]
3327
- }), jsxRuntime.jsx("input", _objectSpread2({
3328
- type: type,
3329
- id: inputId,
3330
- className: cn('flex h-10 w-full rounded-lg border-2 px-3 py-2 text-sm transition-all', 'placeholder:text-gray-500', 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2', 'disabled:cursor-not-allowed disabled:opacity-50', className),
3331
- style: {
3332
- borderColor: colors.piedra,
3333
- backgroundColor: colors.koala
3334
- },
3335
- ref: ref,
3336
- required: required
3337
- }, props))]
3399
+ }), jsxRuntime.jsxs("div", {
3400
+ className: "relative",
3401
+ children: [jsxRuntime.jsx("input", _objectSpread2({
3402
+ type: inputType,
3403
+ id: inputId,
3404
+ className: cn('flex h-10 w-full rounded-lg border-2 px-3 py-2 text-sm transition-all', 'placeholder:text-gray-500', 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2', 'disabled:cursor-not-allowed disabled:opacity-50', isPassword ? 'pr-10' : '',
3405
+ // make room for the eye icon
3406
+ error ? 'border-coral/50' : '',
3407
+ // simple error indication on border
3408
+ className),
3409
+ style: {
3410
+ borderColor: error ? colors.coral : colors.piedra,
3411
+ backgroundColor: colors.koala
3412
+ },
3413
+ ref: ref,
3414
+ required: required
3415
+ }, props)), isPassword && jsxRuntime.jsx("button", {
3416
+ type: "button",
3417
+ className: "absolute right-3 top-1/2 -translate-y-1/2 text-gray-500 hover:text-gray-700 focus:outline-none",
3418
+ onClick: function onClick() {
3419
+ return setShowPassword(!showPassword);
3420
+ },
3421
+ children: showPassword ? jsxRuntime.jsx(lucideReact.EyeOff, {
3422
+ size: 18
3423
+ }) : jsxRuntime.jsx(lucideReact.Eye, {
3424
+ size: 18
3425
+ })
3426
+ })]
3427
+ }), error && typeof error === 'string' && jsxRuntime.jsx(FormError, {
3428
+ error: error
3429
+ })]
3338
3430
  });
3339
3431
  });
3340
3432
  Input.displayName = 'Input';
3341
3433
 
3342
- var _excluded$i = ["className", "label", "id"];
3434
+ var _excluded$j = ["className", "label", "id"];
3343
3435
  var Checkbox = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
3344
3436
  var className = _ref.className,
3345
3437
  label = _ref.label,
3346
3438
  id = _ref.id,
3347
- props = _objectWithoutProperties(_ref, _excluded$i);
3439
+ props = _objectWithoutProperties(_ref, _excluded$j);
3348
3440
  var checkboxId = id || "checkbox-".concat(Math.random().toString(36).substr(2, 9));
3349
3441
  var _React$useState = React.useState(false),
3350
3442
  _React$useState2 = _slicedToArray(_React$useState, 2),
@@ -3404,7 +3496,7 @@ var Checkbox = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
3404
3496
  });
3405
3497
  Checkbox.displayName = 'Checkbox';
3406
3498
 
3407
- var _excluded$h = ["className", "label", "font", "weight", "labelColor", "id"];
3499
+ var _excluded$i = ["className", "label", "font", "weight", "labelColor", "id"];
3408
3500
  var Switch = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
3409
3501
  var className = _ref.className,
3410
3502
  label = _ref.label,
@@ -3412,7 +3504,7 @@ var Switch = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
3412
3504
  weight = _ref.weight,
3413
3505
  labelColor = _ref.labelColor,
3414
3506
  id = _ref.id,
3415
- props = _objectWithoutProperties(_ref, _excluded$h);
3507
+ props = _objectWithoutProperties(_ref, _excluded$i);
3416
3508
  var switchId = id || "switch-".concat(Math.random().toString(36).substr(2, 9));
3417
3509
  return jsxRuntime.jsxs("div", {
3418
3510
  className: "flex items-center space-x-3",
@@ -3438,11 +3530,11 @@ var Switch = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
3438
3530
  });
3439
3531
  Switch.displayName = 'Switch';
3440
3532
 
3441
- var _excluded$g = ["className", "onSearch"];
3533
+ var _excluded$h = ["className", "onSearch"];
3442
3534
  var SearchInput = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
3443
3535
  var className = _ref.className,
3444
3536
  onSearch = _ref.onSearch,
3445
- props = _objectWithoutProperties(_ref, _excluded$g);
3537
+ props = _objectWithoutProperties(_ref, _excluded$h);
3446
3538
  var handleKeyDown = function handleKeyDown(e) {
3447
3539
  if (e.key === 'Enter' && onSearch) {
3448
3540
  onSearch(e.currentTarget.value);
@@ -3462,7 +3554,7 @@ var SearchInput = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
3462
3554
  });
3463
3555
  SearchInput.displayName = 'SearchInput';
3464
3556
 
3465
- var _excluded$f = ["type", "title", "message", "timestamp", "avatar", "read", "onClose", "onClick", "className"];
3557
+ var _excluded$g = ["type", "title", "message", "timestamp", "avatar", "read", "onClose", "onClick", "className"];
3466
3558
  var Notification = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
3467
3559
  var type = _ref.type,
3468
3560
  title = _ref.title,
@@ -3474,7 +3566,7 @@ var Notification = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
3474
3566
  onClose = _ref.onClose,
3475
3567
  onClick = _ref.onClick,
3476
3568
  className = _ref.className,
3477
- props = _objectWithoutProperties(_ref, _excluded$f);
3569
+ props = _objectWithoutProperties(_ref, _excluded$g);
3478
3570
  var typeColors = {
3479
3571
  like: 'text-red-500',
3480
3572
  comment: 'text-blue-500',
@@ -3525,7 +3617,7 @@ var Notification = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
3525
3617
  });
3526
3618
  Notification.displayName = 'Notification';
3527
3619
 
3528
- var _excluded$e = ["className", "text", "component", "font", "weight", "textColor", "lineColor", "lineThickness", "avatars", "avatarRingColor", "rightSlot"];
3620
+ var _excluded$f = ["className", "text", "component", "font", "weight", "textColor", "lineColor", "lineThickness", "avatars", "avatarRingColor", "rightSlot"];
3529
3621
  // ── Color de la línea (herencia del original) ─────────────────────
3530
3622
  var getLineColorClass = function getLineColorClass(color) {
3531
3623
  if (!color || color === 'default') return 'bg-gray-300';
@@ -3564,7 +3656,7 @@ var TextDivider = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
3564
3656
  avatars = _ref.avatars,
3565
3657
  avatarRingColor = _ref.avatarRingColor,
3566
3658
  rightSlot = _ref.rightSlot,
3567
- props = _objectWithoutProperties(_ref, _excluded$e);
3659
+ props = _objectWithoutProperties(_ref, _excluded$f);
3568
3660
  var renderText = function renderText() {
3569
3661
  var commonProps = {
3570
3662
  font: font,
@@ -3638,7 +3730,7 @@ var TextDivider = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
3638
3730
  });
3639
3731
  TextDivider.displayName = 'TextDivider';
3640
3732
 
3641
- var _excluded$d = ["className", "children", "color", "hoverColor", "underline", "external"],
3733
+ var _excluded$e = ["className", "children", "color", "hoverColor", "underline", "external"],
3642
3734
  _excluded2$1 = ["to"],
3643
3735
  _excluded3 = ["href", "target", "rel"];
3644
3736
  var getColorClass = function getColorClass(color) {
@@ -3702,7 +3794,7 @@ var Link = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
3702
3794
  underline = _ref$underline === void 0 ? 'hover' : _ref$underline,
3703
3795
  _ref$external = _ref.external,
3704
3796
  external = _ref$external === void 0 ? false : _ref$external,
3705
- props = _objectWithoutProperties(_ref, _excluded$d);
3797
+ props = _objectWithoutProperties(_ref, _excluded$e);
3706
3798
  var linkClasses = cn('inline-flex items-center font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2', getColorClass(color), hoverColor ? '' : getHoverColorClass(color), getUnderlineClass(underline), className);
3707
3799
  // Si tiene la prop "to", usar React Router Link
3708
3800
  if ('to' in props && props.to) {
@@ -3743,7 +3835,7 @@ var Link = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
3743
3835
  });
3744
3836
  Link.displayName = 'Link';
3745
3837
 
3746
- var _excluded$c = ["src", "alt", "width", "height", "objectFit", "loading", "fallbackSrc", "onError", "className"];
3838
+ var _excluded$d = ["src", "alt", "width", "height", "objectFit", "loading", "fallbackSrc", "onError", "className"];
3747
3839
  var Image = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
3748
3840
  var src = _ref.src,
3749
3841
  alt = _ref.alt,
@@ -3756,7 +3848,7 @@ var Image = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
3756
3848
  fallbackSrc = _ref.fallbackSrc,
3757
3849
  onError = _ref.onError,
3758
3850
  className = _ref.className,
3759
- props = _objectWithoutProperties(_ref, _excluded$c);
3851
+ props = _objectWithoutProperties(_ref, _excluded$d);
3760
3852
  var _React$useState = React.useState(src),
3761
3853
  _React$useState2 = _slicedToArray(_React$useState, 2),
3762
3854
  imgSrc = _React$useState2[0],
@@ -3820,82 +3912,133 @@ var Image = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
3820
3912
  });
3821
3913
  Image.displayName = 'Image';
3822
3914
 
3915
+ // ─── helpers ────────────────────────────────────────────────────────────────
3916
+ var spacingValues = {
3917
+ none: '0',
3918
+ xs: '0.25rem',
3919
+ sm: '0.5rem',
3920
+ md: '1rem',
3921
+ lg: '1.5rem',
3922
+ xl: '2rem'
3923
+ };
3924
+ var resolveSpacing = function resolveSpacing(val) {
3925
+ var _spacingValues$val;
3926
+ return (_spacingValues$val = spacingValues[val]) !== null && _spacingValues$val !== void 0 ? _spacingValues$val : val;
3927
+ };
3928
+ /** Width cap for non-fullscreen variants */
3929
+ var panelMaxWidth = {
3930
+ sm: '24rem',
3931
+ // 384px
3932
+ md: '32rem',
3933
+ // 512px
3934
+ lg: '48rem',
3935
+ // 768px
3936
+ xl: '64rem',
3937
+ // 1024px
3938
+ full: '100%'
3939
+ };
3940
+ // ─── component ───────────────────────────────────────────────────────────────
3823
3941
  var Popup = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
3824
3942
  var open = _ref.open,
3825
3943
  onClose = _ref.onClose,
3826
- title = _ref.title,
3827
- children = _ref.children,
3828
3944
  _ref$size = _ref.size,
3829
3945
  size = _ref$size === void 0 ? 'md' : _ref$size,
3946
+ _ref$backgroundColor = _ref.backgroundColor,
3947
+ backgroundColor = _ref$backgroundColor === void 0 ? 'ice' : _ref$backgroundColor,
3948
+ overlayColor = _ref.overlayColor,
3949
+ borderRadius = _ref.borderRadius,
3950
+ className = _ref.className,
3951
+ title = _ref.title,
3952
+ _ref$titleComponent = _ref.titleComponent,
3953
+ titleComponent = _ref$titleComponent === void 0 ? 'h3' : _ref$titleComponent,
3954
+ titleFont = _ref.titleFont,
3955
+ _ref$titleWeight = _ref.titleWeight,
3956
+ titleWeight = _ref$titleWeight === void 0 ? 'bold' : _ref$titleWeight,
3957
+ _ref$titleColor = _ref.titleColor,
3958
+ titleColor = _ref$titleColor === void 0 ? 'corteza' : _ref$titleColor,
3959
+ _ref$showHeaderDivide = _ref.showHeaderDivider,
3960
+ showHeaderDivider = _ref$showHeaderDivide === void 0 ? true : _ref$showHeaderDivide,
3830
3961
  _ref$showCloseButton = _ref.showCloseButton,
3831
3962
  showCloseButton = _ref$showCloseButton === void 0 ? true : _ref$showCloseButton,
3832
3963
  _ref$closeOnOverlayCl = _ref.closeOnOverlayClick,
3833
3964
  closeOnOverlayClick = _ref$closeOnOverlayCl === void 0 ? true : _ref$closeOnOverlayCl,
3834
- className = _ref.className,
3835
- footer = _ref.footer;
3965
+ _ref$contentPadding = _ref.contentPadding,
3966
+ contentPadding = _ref$contentPadding === void 0 ? 'lg' : _ref$contentPadding,
3967
+ children = _ref.children,
3968
+ footer = _ref.footer,
3969
+ _ref$showFooterDivide = _ref.showFooterDivider,
3970
+ showFooterDivider = _ref$showFooterDivide === void 0 ? true : _ref$showFooterDivide;
3971
+ // ── side effects ──────────────────────────────────────────────────────
3836
3972
  React.useEffect(function () {
3837
- if (open) {
3838
- document.body.style.overflow = 'hidden';
3839
- } else {
3840
- document.body.style.overflow = 'unset';
3841
- }
3973
+ document.body.style.overflow = open ? 'hidden' : 'unset';
3842
3974
  return function () {
3843
3975
  document.body.style.overflow = 'unset';
3844
3976
  };
3845
3977
  }, [open]);
3846
3978
  React.useEffect(function () {
3847
- var handleEscape = function handleEscape(e) {
3848
- if (e.key === 'Escape' && open) {
3849
- onClose();
3850
- }
3979
+ var handler = function handler(e) {
3980
+ if (e.key === 'Escape' && open) onClose();
3851
3981
  };
3852
- document.addEventListener('keydown', handleEscape);
3982
+ document.addEventListener('keydown', handler);
3853
3983
  return function () {
3854
- return document.removeEventListener('keydown', handleEscape);
3984
+ return document.removeEventListener('keydown', handler);
3855
3985
  };
3856
3986
  }, [open, onClose]);
3857
3987
  if (!open) return null;
3858
- var sizeClasses = {
3859
- sm: 'max-w-sm',
3860
- md: 'max-w-md',
3861
- lg: 'max-w-lg',
3862
- xl: 'max-w-xl',
3863
- full: 'max-w-full mx-4'
3864
- };
3865
- var handleOverlayClick = function handleOverlayClick(e) {
3866
- if (e.target === e.currentTarget && closeOnOverlayClick) {
3867
- onClose();
3868
- }
3988
+ // ── derived values ────────────────────────────────────────────────────
3989
+ var isFull = size === 'full';
3990
+ var maxW = panelMaxWidth[size];
3991
+ var padding = resolveSpacing(contentPadding);
3992
+ var TitleTag = titleComponent === 'h4' ? H4 : H3;
3993
+ var handleOverlay = function handleOverlay(e) {
3994
+ if (e.target === e.currentTarget && closeOnOverlayClick) onClose();
3869
3995
  };
3870
- return jsxRuntime.jsx("div", {
3871
- className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
3872
- onClick: handleOverlayClick,
3996
+ // ── render ────────────────────────────────────────────────────────────
3997
+ return /* ── Overlay ── */jsxRuntime.jsx("div", {
3998
+ className: "fixed inset-0 z-50 flex items-center justify-center",
3999
+ style: {
4000
+ backgroundColor: overlayColor !== null && overlayColor !== void 0 ? overlayColor : 'rgba(0,0,0,0.45)'
4001
+ },
4002
+ onClick: handleOverlay,
3873
4003
  children: jsxRuntime.jsxs("div", {
3874
4004
  ref: ref,
3875
- className: cn('relative w-full animate-in fade-in-0 zoom-in-95 rounded-lg bg-background shadow-lg', sizeClasses[size], className),
4005
+ role: "dialog",
4006
+ "aria-modal": "true",
4007
+ className: cn(/* always fills the full height so the content can scroll inside */
4008
+ 'relative flex flex-col w-full overflow-hidden shadow-2xl', /* full-screen: no margin, no rounding; others: centered with padding */
4009
+ isFull ? 'inset-0 rounded-none h-screen' : 'max-h-[90vh] mx-4 my-auto', className),
4010
+ style: {
4011
+ maxWidth: isFull ? '100vw' : maxW,
4012
+ backgroundColor: colors[backgroundColor],
4013
+ borderRadius: isFull ? 0 : borderRadius !== null && borderRadius !== void 0 ? borderRadius : '0.75rem'
4014
+ },
3876
4015
  onClick: function onClick(e) {
3877
4016
  return e.stopPropagation();
3878
4017
  },
3879
4018
  children: [(title || showCloseButton) && jsxRuntime.jsxs("div", {
3880
- className: "flex items-center justify-between border-b p-4",
3881
- children: [title && jsxRuntime.jsx("h2", {
3882
- className: "text-lg font-semibold",
4019
+ className: cn('flex-shrink-0 flex items-center justify-between px-5 py-4', showHeaderDivider ? 'border-b border-black/10' : ''),
4020
+ children: [title ? jsxRuntime.jsx(TitleTag, {
4021
+ font: titleFont,
4022
+ weight: titleWeight,
4023
+ color: titleColor,
4024
+ className: "leading-none m-0 p-0",
3883
4025
  children: title
3884
- }), showCloseButton && jsxRuntime.jsxs("button", {
4026
+ }) : jsxRuntime.jsx("span", {}) /* spacer so X stays right */, showCloseButton && jsxRuntime.jsx("button", {
3885
4027
  onClick: onClose,
3886
- className: "rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",
3887
- children: [jsxRuntime.jsx(lucideReact.X, {
3888
- className: "h-4 w-4"
3889
- }), jsxRuntime.jsx("span", {
3890
- className: "sr-only",
3891
- children: "Close"
3892
- })]
4028
+ "aria-label": "Cerrar",
4029
+ className: cn('ml-auto rounded-lg p-1.5 transition-all', 'opacity-60 hover:opacity-100 hover:bg-black/8', 'focus:outline-none focus:ring-2 focus:ring-black/20'),
4030
+ children: jsxRuntime.jsx(lucideReact.X, {
4031
+ className: "h-5 w-5"
4032
+ })
3893
4033
  })]
3894
4034
  }), jsxRuntime.jsx("div", {
3895
- className: "p-6",
4035
+ className: "flex-1 overflow-y-auto",
4036
+ style: {
4037
+ padding: padding
4038
+ },
3896
4039
  children: children
3897
4040
  }), footer && jsxRuntime.jsx("div", {
3898
- className: "border-t p-4",
4041
+ className: cn('flex-shrink-0 px-5 py-4', showFooterDivider ? 'border-t border-black/10' : ''),
3899
4042
  children: footer
3900
4043
  })]
3901
4044
  })
@@ -3944,6 +4087,80 @@ var Error = function Error(_ref) {
3944
4087
  });
3945
4088
  };
3946
4089
 
4090
+ var _excluded$c = ["message", "type", "onClose", "duration", "className", "position"];
4091
+ var Toast = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
4092
+ var message = _ref.message,
4093
+ _ref$type = _ref.type,
4094
+ type = _ref$type === void 0 ? 'error' : _ref$type,
4095
+ onClose = _ref.onClose,
4096
+ _ref$duration = _ref.duration,
4097
+ duration = _ref$duration === void 0 ? 3000 : _ref$duration,
4098
+ className = _ref.className,
4099
+ _ref$position = _ref.position,
4100
+ position = _ref$position === void 0 ? 'bottom-center' : _ref$position,
4101
+ props = _objectWithoutProperties(_ref, _excluded$c);
4102
+ React.useEffect(function () {
4103
+ if (duration > 0) {
4104
+ var timer = setTimeout(onClose, duration);
4105
+ return function () {
4106
+ return clearTimeout(timer);
4107
+ };
4108
+ }
4109
+ }, [duration, onClose]);
4110
+ var typeConfig = {
4111
+ error: {
4112
+ icon: jsxRuntime.jsx(lucideReact.AlertCircle, {
4113
+ className: "w-5 h-5 text-white"
4114
+ }),
4115
+ bgColor: colors.coral
4116
+ },
4117
+ success: {
4118
+ icon: jsxRuntime.jsx(lucideReact.CheckCircle, {
4119
+ className: "w-5 h-5 text-white"
4120
+ }),
4121
+ bgColor: colors.lima
4122
+ },
4123
+ info: {
4124
+ icon: jsxRuntime.jsx(lucideReact.Info, {
4125
+ className: "w-5 h-5 text-white"
4126
+ }),
4127
+ bgColor: colors.electrico
4128
+ }
4129
+ };
4130
+ var config = typeConfig[type];
4131
+ var positionClasses = {
4132
+ 'top-left': 'top-4 left-4',
4133
+ 'top-center': 'top-4 left-1/2 -translate-x-1/2',
4134
+ 'top-right': 'top-4 right-4',
4135
+ 'bottom-left': 'bottom-4 left-4',
4136
+ 'bottom-center': 'bottom-4 left-1/2 -translate-x-1/2',
4137
+ 'bottom-right': 'bottom-4 right-4'
4138
+ };
4139
+ return jsxRuntime.jsxs("div", _objectSpread2(_objectSpread2({
4140
+ ref: ref,
4141
+ className: cn('fixed z-50 flex items-center gap-3 px-4 py-3 rounded-lg shadow-lg min-w-[300px] animate-in fade-in slide-in-from-bottom-5', positionClasses[position], className),
4142
+ style: {
4143
+ backgroundColor: config.bgColor
4144
+ },
4145
+ role: "alert"
4146
+ }, props), {}, {
4147
+ children: [jsxRuntime.jsx("div", {
4148
+ className: "flex-shrink-0",
4149
+ children: config.icon
4150
+ }), jsxRuntime.jsx(P, {
4151
+ className: "text-white m-0 font-medium flex-1 text-sm",
4152
+ children: message
4153
+ }), jsxRuntime.jsx("button", {
4154
+ onClick: onClose,
4155
+ className: "flex-shrink-0 text-white opacity-70 hover:opacity-100 transition-opacity focus:outline-none",
4156
+ children: jsxRuntime.jsx(lucideReact.X, {
4157
+ className: "w-4 h-4"
4158
+ })
4159
+ })]
4160
+ }));
4161
+ });
4162
+ Toast.displayName = 'Toast';
4163
+
3947
4164
  var Loading = function Loading(_ref) {
3948
4165
  var message = _ref.message,
3949
4166
  className = _ref.className,
@@ -4837,7 +5054,7 @@ var PatternFill = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
4837
5054
  });
4838
5055
  PatternFill.displayName = 'PatternFill';
4839
5056
 
4840
- var _excluded$1 = ["className", "variant", "logoVariant", "logoSize", "logoColor", "backgroundColor", "textColor", "activeColor", "navItemsBgColor", "buttonColor", "buttonTextColor", "buttonBorderColor", "currentLanguage", "onLanguageClick", "onActionClick", "customLogo", "isRegister", "buttonText", "navItems", "navigate"];
5057
+ var _excluded$1 = ["className", "variant", "logoVariant", "logoSize", "logoColor", "backgroundColor", "textColor", "activeColor", "activeIconColor", "navItemsBgColor", "buttonColor", "buttonTextColor", "buttonBorderColor", "currentLanguage", "onLanguageClick", "onActionClick", "customLogo", "isRegister", "buttonText", "navItems", "navigate"];
4841
5058
  var Navbar = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
4842
5059
  var className = _ref.className,
4843
5060
  _ref$variant = _ref.variant,
@@ -4854,6 +5071,7 @@ var Navbar = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
4854
5071
  textColor = _ref$textColor === void 0 ? 'piedra' : _ref$textColor,
4855
5072
  _ref$activeColor = _ref.activeColor,
4856
5073
  activeColor = _ref$activeColor === void 0 ? 'bosque' : _ref$activeColor,
5074
+ activeIconColor = _ref.activeIconColor,
4857
5075
  _ref$navItemsBgColor = _ref.navItemsBgColor,
4858
5076
  navItemsBgColor = _ref$navItemsBgColor === void 0 ? 'hueso' : _ref$navItemsBgColor,
4859
5077
  buttonColor = _ref.buttonColor,
@@ -4887,7 +5105,7 @@ var Navbar = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
4887
5105
  };
4888
5106
  return jsxRuntime.jsxs("nav", _objectSpread2(_objectSpread2({
4889
5107
  ref: ref,
4890
- className: cn('w-full px-6 py-3 flex items-center justify-between', 'border-b border-black/10', className),
5108
+ className: cn('px-6 py-3 flex items-center justify-between', 'rounded-xl m-3', className),
4891
5109
  style: {
4892
5110
  backgroundColor: variant === 'nologin' ? colors[backgroundColor] : 'transparent'
4893
5111
  }
@@ -4951,7 +5169,7 @@ var Navbar = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
4951
5169
  children: jsxRuntime.jsx(Icon, {
4952
5170
  name: item.icon,
4953
5171
  size: "sm",
4954
- color: item.active ? 'ice' : textColor
5172
+ color: item.active ? activeIconColor !== null && activeIconColor !== void 0 ? activeIconColor : 'ice' : textColor
4955
5173
  })
4956
5174
  }), jsxRuntime.jsx("span", {
4957
5175
  children: item.label
@@ -5324,6 +5542,7 @@ exports.ColorSwatch = ColorSwatch;
5324
5542
  exports.Emoji = Emoji;
5325
5543
  exports.Error = Error;
5326
5544
  exports.ErrorFullScreen = ErrorFullScreen;
5545
+ exports.FormError = FormError;
5327
5546
  exports.FriendListItem = FriendListItem;
5328
5547
  exports.FullPage = FullPage;
5329
5548
  exports.Grid = Grid;
@@ -5355,6 +5574,7 @@ exports.Streak = Streak;
5355
5574
  exports.Subtitle = Subtitle;
5356
5575
  exports.Switch = Switch;
5357
5576
  exports.TextDivider = TextDivider;
5577
+ exports.Toast = Toast;
5358
5578
  exports.badgeVariants = badgeVariants;
5359
5579
  exports.buttonVariants = buttonVariants;
5360
5580
  exports.cn = cn;