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