@beweco/aurora-ui 0.1.7 → 0.1.8

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.
package/dist/index.cjs.js CHANGED
@@ -135,10 +135,11 @@ var Input = function (_a) {
135
135
  return (jsxRuntime.jsx(react.Input, __assign({}, props, { id: inputId, label: label, labelPlacement: "outside", placeholder: placeholder, variant: variant, size: size, radius: radius, classNames: {
136
136
  label: "text-default-600 text-tiny group-data-[filled=true]:text-default-600",
137
137
  inputWrapper: "focus-within:!border-primary-500",
138
+ errorMessage: "text-left",
138
139
  } })));
139
140
  };
140
141
 
141
- var defaultTranslations$6 = {
142
+ var defaultTranslations$7 = {
142
143
  addHolidayTitle: "Add holiday",
143
144
  dayOption: "Day",
144
145
  dateRangeOption: "Date range",
@@ -162,7 +163,7 @@ var INITIAL_HOLIDAY_STATE = {
162
163
  */
163
164
  var AddHolidayForm = function (_a) {
164
165
  var onAddHoliday = _a.onAddHoliday, translations = _a.translations, className = _a.className, radioGroupProps = _a.radioGroupProps, dateRangePickerProps = _a.dateRangePickerProps, buttonProps = _a.buttonProps;
165
- var t = __assign(__assign({}, defaultTranslations$6), translations);
166
+ var t = __assign(__assign({}, defaultTranslations$7), translations);
166
167
  var _b = React.useState(INITIAL_HOLIDAY_STATE), newHoliday = _b[0], setNewHoliday = _b[1];
167
168
  /**
168
169
  * A boolean flag that determines if a date has been set.
@@ -224,15 +225,15 @@ var AddHolidayForm = function (_a) {
224
225
 
225
226
  var H2 = function (_a) {
226
227
  var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
227
- return (jsxRuntime.jsx("h2", __assign({ className: react.cn("text-lg font-medium", className) }, props, { children: children })));
228
+ return (jsxRuntime.jsx("h2", __assign({ className: react.cn("text-lg font-semibold", className) }, props, { children: children })));
228
229
  };
229
230
 
230
231
  var P = function (_a) {
231
232
  var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
232
- return (jsxRuntime.jsx("p", __assign({ className: react.cn("text-sm text-default-500", className) }, props, { children: children })));
233
+ return (jsxRuntime.jsx("p", __assign({ className: react.cn("text-sm text-default-500 font-normal", className) }, props, { children: children })));
233
234
  };
234
235
 
235
- var defaultTranslations$5 = {
236
+ var defaultTranslations$6 = {
236
237
  title: "Analytics",
237
238
  description: "Monthly growth of your metrics during the selected period",
238
239
  viewDetails: "View Details",
@@ -286,7 +287,7 @@ var formatMonth = function (month) {
286
287
  var AnalyticsCard = function (_a) {
287
288
  var _b, _c;
288
289
  var data = _a.data, _d = _a.showTimePeriods, showTimePeriods = _d === void 0 ? true : _d, _e = _a.showDropdownMenu, showDropdownMenu = _e === void 0 ? true : _e, _f = _a.showMetricCards, showMetricCards = _f === void 0 ? true : _f, onChartChange = _a.onChartChange, onMenuAction = _a.onMenuAction, onTimePeriodChange = _a.onTimePeriodChange, _g = _a.translations, translations = _g === void 0 ? {} : _g, props = __rest(_a, ["data", "showTimePeriods", "showDropdownMenu", "showMetricCards", "onChartChange", "onMenuAction", "onTimePeriodChange", "translations"]);
289
- var t = __assign(__assign({}, defaultTranslations$5), translations);
290
+ var t = __assign(__assign({}, defaultTranslations$6), translations);
290
291
  var _h = React.useState((_c = (_b = data[0]) === null || _b === void 0 ? void 0 : _b.key) !== null && _c !== void 0 ? _c : ""), activeChart = _h[0], setActiveChart = _h[1];
291
292
  var activeChartData = React.useMemo(function () {
292
293
  var _a;
@@ -919,6 +920,62 @@ var ColorSelector = function (_a) {
919
920
  : "border-gray-200 hover:scale-105"), style: { backgroundColor: color.color }, title: color.label }) }, color.value)); }) }));
920
921
  };
921
922
 
923
+ // Traducciones por defecto en español
924
+ var defaultTranslations$5 = {
925
+ dayOption: "Día específico",
926
+ dateRangeOption: "Rango de fechas",
927
+ selectDateAriaLabel: "Seleccionar fecha",
928
+ selectDateRangeAriaLabel: "Seleccionar rango de fechas",
929
+ };
930
+ /**
931
+ * DateSelector - Componente para seleccionar fechas individuales o rangos de fechas
932
+ * basado en HeroUI siguiendo las reglas de diseño BeweOS.
933
+ * Maneja su propio estado interno de manera autónoma.
934
+ */
935
+ var DateSelector = function (_a) {
936
+ var _b = _a.initialType, initialType = _b === void 0 ? exports.HolidayType.SingleDay : _b, initialDate = _a.initialDate, initialDateRange = _a.initialDateRange, onChange = _a.onChange, _c = _a.translations, translations = _c === void 0 ? {} : _c, radioGroupProps = _a.radioGroupProps, radioItemProps = _a.radioItemProps, datePickerProps = _a.datePickerProps, dateRangePickerProps = _a.dateRangePickerProps, _d = _a.className, className = _d === void 0 ? "" : _d;
937
+ // Estado interno del componente
938
+ var _e = React.useState(initialType), type = _e[0], setType = _e[1];
939
+ var _f = React.useState(initialDate || null), date = _f[0], setDate = _f[1];
940
+ var _g = React.useState(initialDateRange || null), dateRange = _g[0], setDateRange = _g[1];
941
+ // Combinar traducciones por defecto con las proporcionadas
942
+ var t = __assign(__assign({}, defaultTranslations$5), translations);
943
+ var handleTypeChange = function (value) {
944
+ var newType = value;
945
+ setType(newType);
946
+ // Limpiar valores cuando cambia el tipo
947
+ if (newType === exports.HolidayType.SingleDay) {
948
+ setDateRange(null);
949
+ }
950
+ else {
951
+ setDate(null);
952
+ }
953
+ // Notificar cambio
954
+ onChange === null || onChange === void 0 ? void 0 : onChange({
955
+ type: newType,
956
+ date: newType === exports.HolidayType.SingleDay ? date : null,
957
+ dateRange: newType === exports.HolidayType.DateRange ? dateRange : null,
958
+ });
959
+ };
960
+ var handleDateChange = function (selectedDate) {
961
+ setDate(selectedDate);
962
+ onChange === null || onChange === void 0 ? void 0 : onChange({
963
+ type: type,
964
+ date: selectedDate,
965
+ dateRange: null,
966
+ });
967
+ };
968
+ var handleDateRangeChange = function (range) {
969
+ setDateRange(range);
970
+ onChange === null || onChange === void 0 ? void 0 : onChange({
971
+ type: type,
972
+ date: null,
973
+ dateRange: range,
974
+ });
975
+ };
976
+ return (jsxRuntime.jsxs("div", { className: "w-full flex flex-wrap xs:gap-5 justify-between items-center ".concat(className), children: [jsxRuntime.jsxs(react.RadioGroup, __assign({ color: "primary", orientation: "horizontal", size: "sm", value: type, onValueChange: handleTypeChange }, radioGroupProps, { children: [jsxRuntime.jsx(react.Radio, __assign({ value: exports.HolidayType.SingleDay }, radioItemProps, { children: t.dayOption })), jsxRuntime.jsx(react.Radio, __assign({ value: exports.HolidayType.DateRange }, radioItemProps, { children: t.dateRangeOption }))] })), type === exports.HolidayType.DateRange ? (jsxRuntime.jsx(react.DateRangePicker, __assign({ className: "xs:w-full md:flex-1 md:max-w-xs", value: dateRange || null, onChange: handleDateRangeChange, "aria-label": t.selectDateRangeAriaLabel, endContent: jsxRuntime.jsx(IconComponent, { icon: "solar:calendar-outline" }) }, dateRangePickerProps))) : (jsxRuntime.jsx(react.DatePicker, __assign({ className: "xs:w-full md:flex-1 md:max-w-40", value: date || null, onChange: handleDateChange, endContent: jsxRuntime.jsx(IconComponent, { icon: "solar:calendar-outline" }), "aria-label": t.selectDateAriaLabel }, datePickerProps)))] }));
977
+ };
978
+
922
979
  var H1 = function (_a) {
923
980
  var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
924
981
  return (jsxRuntime.jsx("h1", __assign({ className: react.cn("text-xl font-bold", className) }, props, { children: children })));
@@ -926,12 +983,12 @@ var H1 = function (_a) {
926
983
 
927
984
  var H3 = function (_a) {
928
985
  var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
929
- return (jsxRuntime.jsx("h3", __assign({ className: react.cn("text-base font-medium mb-1", className) }, props, { children: children })));
986
+ return (jsxRuntime.jsx("h3", __assign({ className: react.cn("text-base font-medium", className) }, props, { children: children })));
930
987
  };
931
988
 
932
989
  var H4 = function (_a) {
933
990
  var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
934
- return (jsxRuntime.jsx("h4", __assign({ className: react.cn("text-sm font-medium mb-1", className) }, props, { children: children })));
991
+ return (jsxRuntime.jsx("h4", __assign({ className: react.cn("text-sm font-medium ", className) }, props, { children: children })));
935
992
  };
936
993
 
937
994
  var ConfigMenu = function (_a) {
@@ -1330,7 +1387,7 @@ var MultiStepSidebar = React.forwardRef(function (_a, ref) {
1330
1387
  onClose === null || onClose === void 0 ? void 0 : onClose();
1331
1388
  }
1332
1389
  };
1333
- return (jsxRuntime.jsx("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-content3/50 backdrop-blur-sm", onClick: handleOverlayClick, children: jsxRuntime.jsxs("div", __assign({ ref: ref, className: react.cn("flex h-full w-full max-w-4xl rounded-lg bg-background shadow-lg lg:h-auto", className) }, props, { children: [jsxRuntime.jsx("div", { className: "hidden w-1/3 flex-col items-center gap-y-8 p-8 lg:flex", children: jsxRuntime.jsx(VerticalSteps, { className: stepperClasses, color: "primary", currentStep: currentPage, steps: steps, onStepChange: onChangePage }) }), jsxRuntime.jsxs("div", { className: "relative flex h-auto w-full flex-col items-center gap-4 md:p-4 lg:w-2/3", children: [jsxRuntime.jsx(Button, { isIconOnly: true, className: "absolute right-4 top-4", size: "sm", variant: "light", color: "default", onPress: onClose, startContent: jsxRuntime.jsx(IconComponent, { className: "text-foreground", icon: "material-symbols:close-rounded", size: "lg" }) }), jsxRuntime.jsx("div", { className: "pt-9 w-10/12 lg:hidden", children: jsxRuntime.jsx("div", { className: "flex justify-center", children: jsxRuntime.jsx(StepIndicator, { className: react.cn(stepperClasses), currentStep: currentPage + 1, totalSteps: steps.length }) }) }), jsxRuntime.jsx("div", { className: "h-full w-full p-4 sm:max-w-md md:max-w-lg", children: children })] })] })) }));
1390
+ return (jsxRuntime.jsx("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-content3/50 backdrop-blur-sm", onClick: handleOverlayClick, children: jsxRuntime.jsxs("div", __assign({ ref: ref, className: react.cn("flex h-full w-full max-w-4xl rounded-lg bg-background shadow-lg lg:h-auto", className) }, props, { children: [jsxRuntime.jsx("div", { className: "hidden w-1/3 flex-col items-center justify-center gap-y-8 p-8 md:flex", children: jsxRuntime.jsx(VerticalSteps, { className: stepperClasses, color: "primary", currentStep: currentPage, steps: steps, onStepChange: onChangePage }) }), jsxRuntime.jsxs("div", { className: "relative flex h-auto justify-between w-full flex-col items-center gap-4 md:p-4 lg:w-2/3", children: [jsxRuntime.jsx(Button, { isIconOnly: true, className: "absolute right-4 top-4", size: "sm", variant: "light", color: "default", onPress: onClose, startContent: jsxRuntime.jsx(IconComponent, { className: "text-foreground", icon: "material-symbols:close-rounded", size: "lg" }) }), jsxRuntime.jsx("div", { className: "pt-9 w-10/12 md:hidden", children: jsxRuntime.jsx("div", { className: "flex w-full justify-center", children: jsxRuntime.jsx(StepIndicator, { className: react.cn(stepperClasses), currentStep: currentPage + 1, totalSteps: steps.length }) }) }), jsxRuntime.jsx("div", { className: " flex flex-col h-full w-full justify-between p-4 sm:max-w-md md:max-w-lg", children: children })] })] })) }));
1334
1391
  });
1335
1392
  MultiStepSidebar.displayName = "MultiStepSidebar";
1336
1393
 
@@ -1340,7 +1397,7 @@ var MultistepNavigationButtons = function (_a) {
1340
1397
  // backButtonProps || {};
1341
1398
  var _b = nextButtonProps || {}, nextButtonChildren = _b.children, restNextButtonProps = __rest(_b, ["children"]);
1342
1399
  var _c = cancelButtonProps || {}, cancelButtonChildren = _c.children, restCancelButtonProps = __rest(_c, ["children"]);
1343
- return (jsxRuntime.jsx("div", { className: react.cn("flex w-full flex-col-reverse gap-2 pt-4 sm:flex-row sm:justify-between md:justify-end", className), children: jsxRuntime.jsxs("div", { className: "flex w-full flex-col-reverse gap-2 sm:w-auto sm:flex-row", children: [jsxRuntime.jsx(react.Button, __assign({ className: "w-full sm:w-auto", color: "primary", variant: "flat" }, restCancelButtonProps, { children: cancelButtonChildren || "Cancel" })), jsxRuntime.jsx(react.Button, __assign({ className: "w-full sm:w-auto", color: "primary" }, restNextButtonProps, { children: nextButtonChildren || "Next" }))] }) }));
1400
+ return (jsxRuntime.jsx("div", { className: react.cn("flex w-full flex-col-reverse gap-2 pt-4 sm:flex-row sm:justify-between md:justify-end", className), children: jsxRuntime.jsxs("div", { className: "flex w-full flex-col-reverse gap-2 md:w-auto md:flex-row", children: [jsxRuntime.jsx(react.Button, __assign({ className: "w-full md:w-auto", color: "default", variant: "flat" }, restCancelButtonProps, { children: cancelButtonChildren || "Cancel" })), jsxRuntime.jsx(react.Button, __assign({ className: "w-full md:w-auto", color: "primary" }, restNextButtonProps, { children: nextButtonChildren || "Next" }))] }) }));
1344
1401
  };
1345
1402
 
1346
1403
  var variants = {
@@ -1360,7 +1417,7 @@ var variants = {
1360
1417
  }); },
1361
1418
  };
1362
1419
  var MultiStepWizard = function (_a) {
1363
- var isOpen = _a.isOpen, steps = _a.steps, translations = _a.translations, onClose = _a.onClose;
1420
+ var isOpen = _a.isOpen, steps = _a.steps, translations = _a.translations, onClose = _a.onClose, onComplete = _a.onComplete, completeButtonText = _a.completeButtonText;
1364
1421
  var _b = React.useState([0, 0]), _c = _b[0], page = _c[0], direction = _c[1], setPage = _b[1];
1365
1422
  React.useEffect(function () {
1366
1423
  if (isOpen) {
@@ -1371,8 +1428,8 @@ var MultiStepWizard = function (_a) {
1371
1428
  continue: "Continue",
1372
1429
  goBack: "Back",
1373
1430
  cancel: "Cancel",
1374
- signUp: "Sign Up for Free",
1375
- goToPayment: "Go to Payment",
1431
+ next: "Next",
1432
+ complete: "Complete",
1376
1433
  }, translations);
1377
1434
  var paginate = React.useCallback(function (newDirection) {
1378
1435
  setPage(function (prev) {
@@ -1398,6 +1455,27 @@ var MultiStepWizard = function (_a) {
1398
1455
  var onNext = React.useCallback(function () {
1399
1456
  paginate(1);
1400
1457
  }, [paginate]);
1458
+ // Determinar el texto del botón según el paso
1459
+ var getButtonText = function () {
1460
+ if (page === 0) {
1461
+ return t.next;
1462
+ }
1463
+ if (page === steps.length - 1) {
1464
+ return completeButtonText || t.complete;
1465
+ }
1466
+ return t.continue;
1467
+ };
1468
+ // Determinar la acción del botón según el paso
1469
+ var handleNextAction = function () {
1470
+ if (page === steps.length - 1) {
1471
+ // Último paso: ejecutar acción de completado
1472
+ onComplete === null || onComplete === void 0 ? void 0 : onComplete();
1473
+ }
1474
+ else {
1475
+ // Otros pasos: continuar al siguiente
1476
+ onNext();
1477
+ }
1478
+ };
1401
1479
  var content = React.useMemo(function () {
1402
1480
  return (jsxRuntime.jsx(framerMotion.LazyMotion, { features: framerMotion.domAnimation, children: jsxRuntime.jsx(framerMotion.m.div, { animate: "center", className: "col-span-12", custom: direction, exit: "exit", initial: "exit", transition: {
1403
1481
  y: {
@@ -1410,21 +1488,18 @@ var MultiStepWizard = function (_a) {
1410
1488
  if (!isOpen) {
1411
1489
  return null;
1412
1490
  }
1413
- return (jsxRuntime.jsxs(MultiStepSidebar, { currentPage: page, goBackTranslation: t.goBack, steps: steps, onBack: onBack, onChangePage: onChangePage, onClose: onClose, onNext: onNext, children: [jsxRuntime.jsx(Button, { className: "w-fit text-default-600 mb-6", color: "default", variant: "light", onPress: onBack, isDisabled: page === 0, startContent: jsxRuntime.jsx(IconComponent, { className: "text-default-500", icon: "material-symbols:arrow-back-rounded", size: "sm" }), children: t.goBack || "Back" }), jsxRuntime.jsxs("div", { className: "relative flex h-fit w-full flex-col pt-6 text-center lg:h-full lg:justify-center lg:pt-0", children: [content, jsxRuntime.jsx(MultistepNavigationButtons, { backButtonProps: {
1414
- isDisabled: page === 0,
1415
- onPress: onBack,
1416
- children: t.goBack,
1417
- }, cancelButtonProps: {
1418
- onPress: onClose,
1419
- children: t.cancel,
1420
- }, nextButtonProps: {
1421
- children: page === 0
1422
- ? t.signUp
1423
- : page === steps.length - 1
1424
- ? t.goToPayment
1425
- : t.continue,
1426
- onPress: onNext,
1427
- } })] })] }));
1491
+ return (jsxRuntime.jsxs(MultiStepSidebar, { currentPage: page, goBackTranslation: t.goBack, steps: steps, onBack: onBack, onChangePage: onChangePage, onClose: onClose, onNext: onNext, children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx(Button, { className: "w-fit text-default-600 mb-6", color: "default", variant: "light", onPress: onBack, isDisabled: page === 0, startContent: jsxRuntime.jsx(IconComponent, { className: "text-default-500", icon: "material-symbols:arrow-back-rounded", size: "sm" }), children: t.goBack || "Back" }), jsxRuntime.jsx("div", { className: "relative flex h-fit w-full flex-col text-center lg:justify-center lg:pt-0", children: content })] }), jsxRuntime.jsx(MultistepNavigationButtons, { backButtonProps: {
1492
+ isDisabled: page === 0,
1493
+ onPress: onBack,
1494
+ children: t.goBack,
1495
+ }, cancelButtonProps: {
1496
+ onPress: onClose,
1497
+ children: t.cancel,
1498
+ }, nextButtonProps: {
1499
+ children: getButtonText(),
1500
+ onPress: handleNextAction,
1501
+ isDisabled: steps[page].isStepValid === false,
1502
+ } })] }));
1428
1503
  };
1429
1504
 
1430
1505
  var Pagination = function (_a) {
@@ -1550,7 +1625,7 @@ var Phone = function (_a) {
1550
1625
  onChange({ countryCode: selectedCountry.code, phoneNumber: val });
1551
1626
  }
1552
1627
  };
1553
- return (jsxRuntime.jsxs("div", { className: "flex flex-col gap-1 w-full relative", id: id, children: [finalLabel && (jsxRuntime.jsxs("label", { htmlFor: "phone-input-".concat(name), className: "text-tiny text-default-500 mb-1", children: [finalLabel, " ", required && jsxRuntime.jsx("span", { className: "text-danger-500", children: "*" })] })), jsxRuntime.jsxs("div", { className: "flex items-center w-full min-h-[56px] transition-colors shadow-sm border-medium border-default-200 rounded-xl focus-within:border-primary-500 dark:focus-within:border-primary-500 ".concat(error ? "border-danger-500 " : "border-default-200").concat(disabled ? "opacity-60" : ""), children: [jsxRuntime.jsx("div", { className: "relative ml-2", ref: dropdownRef, children: jsxRuntime.jsxs("button", { type: "button", className: "flex items-center gap-1 px-4 h-10 rounded-xl bg-default-100 focus:outline-none transition-colors", onClick: function () { return setIsDropdownOpen(function (v) { return !v; }); }, disabled: disabled, tabIndex: 0, "aria-label": t.selectCountryAriaLabel, children: [jsxRuntime.jsx("span", { className: "text-lg", children: selectedCountry.flag }), jsxRuntime.jsx("span", { className: "text-xs text-default-500", children: selectedCountry.code }), jsxRuntime.jsxs("svg", { className: "w-4 h-4 text-default-500 ml-1", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", role: "img", "aria-label": t.expandListAriaLabel, children: [jsxRuntime.jsx("title", { children: t.expandListAriaLabel }), jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" })] })] }) }), jsxRuntime.jsx(react.Input, { type: "tel", className: "flex-1 border-none bg-transparent text-default-500 placeholder-default-500 px-2", placeholder: t.placeholder, value: inputValue, onChange: handleInputChange, onBlur: onBlur, disabled: disabled, name: name, autoComplete: "tel", id: "phone-input-".concat(name) })] }), error && errorText && (jsxRuntime.jsx("span", { className: "text-xs text-danger-500 mt-1", children: errorText })), isDropdownOpen &&
1628
+ return (jsxRuntime.jsxs("div", { className: "flex flex-col gap-1 w-full relative", id: id, children: [finalLabel && (jsxRuntime.jsxs("label", { htmlFor: "phone-input-".concat(name), className: "text-tiny text-default-500 mb-1 text-left", children: [finalLabel, " ", required && jsxRuntime.jsx("span", { className: "text-danger-500", children: "*" })] })), jsxRuntime.jsxs("div", { className: "flex items-center w-full min-h-[56px] transition-colors shadow-sm border-medium border-default-200 rounded-xl focus-within:border-primary-500 ".concat(error ? "!border-danger-500 " : "border-default-200").concat(disabled ? "opacity-60" : ""), children: [jsxRuntime.jsx("div", { className: "relative ml-2", ref: dropdownRef, children: jsxRuntime.jsxs("button", { type: "button", className: "flex items-center gap-1 px-4 h-10 rounded-xl bg-default-100 focus:outline-none transition-colors", onClick: function () { return setIsDropdownOpen(function (v) { return !v; }); }, disabled: disabled, tabIndex: 0, "aria-label": t.selectCountryAriaLabel, children: [jsxRuntime.jsx("span", { className: "text-lg", children: selectedCountry.flag }), jsxRuntime.jsx("span", { className: "text-xs text-default-500", children: selectedCountry.code }), jsxRuntime.jsxs("svg", { className: "w-4 h-4 text-default-500 ml-1", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", role: "img", "aria-label": t.expandListAriaLabel, children: [jsxRuntime.jsx("title", { children: t.expandListAriaLabel }), jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" })] })] }) }), jsxRuntime.jsx(react.Input, { type: "tel", className: "flex-1 border-none bg-transparent text-default-500 placeholder-default-500 px-2", placeholder: t.placeholder, value: inputValue, onChange: handleInputChange, onBlur: onBlur, disabled: disabled, name: name, autoComplete: "tel", id: "phone-input-".concat(name) })] }), error && errorText && (jsxRuntime.jsx("span", { className: " text-left text-xs text-danger-500 mt-1", children: errorText })), isDropdownOpen &&
1554
1629
  reactDom.createPortal(jsxRuntime.jsxs("div", { ref: portalDropdownRef, style: dropdownPosition, className: "bg-content1 border border-default-200 rounded-lg shadow-lg z-50", children: [jsxRuntime.jsx("div", { className: "p-2", children: jsxRuntime.jsx("input", { type: "text", className: "w-full px-3 py-2 text-sm bg-default-100 border-medium border-default-200 text-default-500 rounded-lg focus:outline-none focus:border-primary-500", placeholder: t.searchPlaceholder, onChange: function (e) {
1555
1630
  var searchTerm = e.target.value.toLowerCase();
1556
1631
  var filtered = uniqueCountries.filter(function (country) {
@@ -2718,6 +2793,7 @@ exports.Card = Card;
2718
2793
  exports.ColorSelector = ColorSelector;
2719
2794
  exports.DatePicker = DatePicker;
2720
2795
  exports.DateRangePicker = DateRangePicker;
2796
+ exports.DateSelector = DateSelector;
2721
2797
  exports.GlobalToast = GlobalToast;
2722
2798
  exports.H1 = H1;
2723
2799
  exports.H2 = H2;
package/dist/index.esm.js CHANGED
@@ -134,10 +134,11 @@ var Input = function (_a) {
134
134
  return (jsx(Input$1, __assign({}, props, { id: inputId, label: label, labelPlacement: "outside", placeholder: placeholder, variant: variant, size: size, radius: radius, classNames: {
135
135
  label: "text-default-600 text-tiny group-data-[filled=true]:text-default-600",
136
136
  inputWrapper: "focus-within:!border-primary-500",
137
+ errorMessage: "text-left",
137
138
  } })));
138
139
  };
139
140
 
140
- var defaultTranslations$6 = {
141
+ var defaultTranslations$7 = {
141
142
  addHolidayTitle: "Add holiday",
142
143
  dayOption: "Day",
143
144
  dateRangeOption: "Date range",
@@ -161,7 +162,7 @@ var INITIAL_HOLIDAY_STATE = {
161
162
  */
162
163
  var AddHolidayForm = function (_a) {
163
164
  var onAddHoliday = _a.onAddHoliday, translations = _a.translations, className = _a.className, radioGroupProps = _a.radioGroupProps, dateRangePickerProps = _a.dateRangePickerProps, buttonProps = _a.buttonProps;
164
- var t = __assign(__assign({}, defaultTranslations$6), translations);
165
+ var t = __assign(__assign({}, defaultTranslations$7), translations);
165
166
  var _b = useState(INITIAL_HOLIDAY_STATE), newHoliday = _b[0], setNewHoliday = _b[1];
166
167
  /**
167
168
  * A boolean flag that determines if a date has been set.
@@ -223,15 +224,15 @@ var AddHolidayForm = function (_a) {
223
224
 
224
225
  var H2 = function (_a) {
225
226
  var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
226
- return (jsx("h2", __assign({ className: cn("text-lg font-medium", className) }, props, { children: children })));
227
+ return (jsx("h2", __assign({ className: cn("text-lg font-semibold", className) }, props, { children: children })));
227
228
  };
228
229
 
229
230
  var P = function (_a) {
230
231
  var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
231
- return (jsx("p", __assign({ className: cn("text-sm text-default-500", className) }, props, { children: children })));
232
+ return (jsx("p", __assign({ className: cn("text-sm text-default-500 font-normal", className) }, props, { children: children })));
232
233
  };
233
234
 
234
- var defaultTranslations$5 = {
235
+ var defaultTranslations$6 = {
235
236
  title: "Analytics",
236
237
  description: "Monthly growth of your metrics during the selected period",
237
238
  viewDetails: "View Details",
@@ -285,7 +286,7 @@ var formatMonth = function (month) {
285
286
  var AnalyticsCard = function (_a) {
286
287
  var _b, _c;
287
288
  var data = _a.data, _d = _a.showTimePeriods, showTimePeriods = _d === void 0 ? true : _d, _e = _a.showDropdownMenu, showDropdownMenu = _e === void 0 ? true : _e, _f = _a.showMetricCards, showMetricCards = _f === void 0 ? true : _f, onChartChange = _a.onChartChange, onMenuAction = _a.onMenuAction, onTimePeriodChange = _a.onTimePeriodChange, _g = _a.translations, translations = _g === void 0 ? {} : _g, props = __rest(_a, ["data", "showTimePeriods", "showDropdownMenu", "showMetricCards", "onChartChange", "onMenuAction", "onTimePeriodChange", "translations"]);
288
- var t = __assign(__assign({}, defaultTranslations$5), translations);
289
+ var t = __assign(__assign({}, defaultTranslations$6), translations);
289
290
  var _h = useState((_c = (_b = data[0]) === null || _b === void 0 ? void 0 : _b.key) !== null && _c !== void 0 ? _c : ""), activeChart = _h[0], setActiveChart = _h[1];
290
291
  var activeChartData = useMemo(function () {
291
292
  var _a;
@@ -918,6 +919,62 @@ var ColorSelector = function (_a) {
918
919
  : "border-gray-200 hover:scale-105"), style: { backgroundColor: color.color }, title: color.label }) }, color.value)); }) }));
919
920
  };
920
921
 
922
+ // Traducciones por defecto en español
923
+ var defaultTranslations$5 = {
924
+ dayOption: "Día específico",
925
+ dateRangeOption: "Rango de fechas",
926
+ selectDateAriaLabel: "Seleccionar fecha",
927
+ selectDateRangeAriaLabel: "Seleccionar rango de fechas",
928
+ };
929
+ /**
930
+ * DateSelector - Componente para seleccionar fechas individuales o rangos de fechas
931
+ * basado en HeroUI siguiendo las reglas de diseño BeweOS.
932
+ * Maneja su propio estado interno de manera autónoma.
933
+ */
934
+ var DateSelector = function (_a) {
935
+ var _b = _a.initialType, initialType = _b === void 0 ? HolidayType.SingleDay : _b, initialDate = _a.initialDate, initialDateRange = _a.initialDateRange, onChange = _a.onChange, _c = _a.translations, translations = _c === void 0 ? {} : _c, radioGroupProps = _a.radioGroupProps, radioItemProps = _a.radioItemProps, datePickerProps = _a.datePickerProps, dateRangePickerProps = _a.dateRangePickerProps, _d = _a.className, className = _d === void 0 ? "" : _d;
936
+ // Estado interno del componente
937
+ var _e = React.useState(initialType), type = _e[0], setType = _e[1];
938
+ var _f = React.useState(initialDate || null), date = _f[0], setDate = _f[1];
939
+ var _g = React.useState(initialDateRange || null), dateRange = _g[0], setDateRange = _g[1];
940
+ // Combinar traducciones por defecto con las proporcionadas
941
+ var t = __assign(__assign({}, defaultTranslations$5), translations);
942
+ var handleTypeChange = function (value) {
943
+ var newType = value;
944
+ setType(newType);
945
+ // Limpiar valores cuando cambia el tipo
946
+ if (newType === HolidayType.SingleDay) {
947
+ setDateRange(null);
948
+ }
949
+ else {
950
+ setDate(null);
951
+ }
952
+ // Notificar cambio
953
+ onChange === null || onChange === void 0 ? void 0 : onChange({
954
+ type: newType,
955
+ date: newType === HolidayType.SingleDay ? date : null,
956
+ dateRange: newType === HolidayType.DateRange ? dateRange : null,
957
+ });
958
+ };
959
+ var handleDateChange = function (selectedDate) {
960
+ setDate(selectedDate);
961
+ onChange === null || onChange === void 0 ? void 0 : onChange({
962
+ type: type,
963
+ date: selectedDate,
964
+ dateRange: null,
965
+ });
966
+ };
967
+ var handleDateRangeChange = function (range) {
968
+ setDateRange(range);
969
+ onChange === null || onChange === void 0 ? void 0 : onChange({
970
+ type: type,
971
+ date: null,
972
+ dateRange: range,
973
+ });
974
+ };
975
+ return (jsxs("div", { className: "w-full flex flex-wrap xs:gap-5 justify-between items-center ".concat(className), children: [jsxs(RadioGroup, __assign({ color: "primary", orientation: "horizontal", size: "sm", value: type, onValueChange: handleTypeChange }, radioGroupProps, { children: [jsx(Radio, __assign({ value: HolidayType.SingleDay }, radioItemProps, { children: t.dayOption })), jsx(Radio, __assign({ value: HolidayType.DateRange }, radioItemProps, { children: t.dateRangeOption }))] })), type === HolidayType.DateRange ? (jsx(DateRangePicker$1, __assign({ className: "xs:w-full md:flex-1 md:max-w-xs", value: dateRange || null, onChange: handleDateRangeChange, "aria-label": t.selectDateRangeAriaLabel, endContent: jsx(IconComponent, { icon: "solar:calendar-outline" }) }, dateRangePickerProps))) : (jsx(DatePicker$1, __assign({ className: "xs:w-full md:flex-1 md:max-w-40", value: date || null, onChange: handleDateChange, endContent: jsx(IconComponent, { icon: "solar:calendar-outline" }), "aria-label": t.selectDateAriaLabel }, datePickerProps)))] }));
976
+ };
977
+
921
978
  var H1 = function (_a) {
922
979
  var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
923
980
  return (jsx("h1", __assign({ className: cn("text-xl font-bold", className) }, props, { children: children })));
@@ -925,12 +982,12 @@ var H1 = function (_a) {
925
982
 
926
983
  var H3 = function (_a) {
927
984
  var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
928
- return (jsx("h3", __assign({ className: cn("text-base font-medium mb-1", className) }, props, { children: children })));
985
+ return (jsx("h3", __assign({ className: cn("text-base font-medium", className) }, props, { children: children })));
929
986
  };
930
987
 
931
988
  var H4 = function (_a) {
932
989
  var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
933
- return (jsx("h4", __assign({ className: cn("text-sm font-medium mb-1", className) }, props, { children: children })));
990
+ return (jsx("h4", __assign({ className: cn("text-sm font-medium ", className) }, props, { children: children })));
934
991
  };
935
992
 
936
993
  var ConfigMenu = function (_a) {
@@ -1329,7 +1386,7 @@ var MultiStepSidebar = React.forwardRef(function (_a, ref) {
1329
1386
  onClose === null || onClose === void 0 ? void 0 : onClose();
1330
1387
  }
1331
1388
  };
1332
- return (jsx("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-content3/50 backdrop-blur-sm", onClick: handleOverlayClick, children: jsxs("div", __assign({ ref: ref, className: cn("flex h-full w-full max-w-4xl rounded-lg bg-background shadow-lg lg:h-auto", className) }, props, { children: [jsx("div", { className: "hidden w-1/3 flex-col items-center gap-y-8 p-8 lg:flex", children: jsx(VerticalSteps, { className: stepperClasses, color: "primary", currentStep: currentPage, steps: steps, onStepChange: onChangePage }) }), jsxs("div", { className: "relative flex h-auto w-full flex-col items-center gap-4 md:p-4 lg:w-2/3", children: [jsx(Button, { isIconOnly: true, className: "absolute right-4 top-4", size: "sm", variant: "light", color: "default", onPress: onClose, startContent: jsx(IconComponent, { className: "text-foreground", icon: "material-symbols:close-rounded", size: "lg" }) }), jsx("div", { className: "pt-9 w-10/12 lg:hidden", children: jsx("div", { className: "flex justify-center", children: jsx(StepIndicator, { className: cn(stepperClasses), currentStep: currentPage + 1, totalSteps: steps.length }) }) }), jsx("div", { className: "h-full w-full p-4 sm:max-w-md md:max-w-lg", children: children })] })] })) }));
1389
+ return (jsx("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-content3/50 backdrop-blur-sm", onClick: handleOverlayClick, children: jsxs("div", __assign({ ref: ref, className: cn("flex h-full w-full max-w-4xl rounded-lg bg-background shadow-lg lg:h-auto", className) }, props, { children: [jsx("div", { className: "hidden w-1/3 flex-col items-center justify-center gap-y-8 p-8 md:flex", children: jsx(VerticalSteps, { className: stepperClasses, color: "primary", currentStep: currentPage, steps: steps, onStepChange: onChangePage }) }), jsxs("div", { className: "relative flex h-auto justify-between w-full flex-col items-center gap-4 md:p-4 lg:w-2/3", children: [jsx(Button, { isIconOnly: true, className: "absolute right-4 top-4", size: "sm", variant: "light", color: "default", onPress: onClose, startContent: jsx(IconComponent, { className: "text-foreground", icon: "material-symbols:close-rounded", size: "lg" }) }), jsx("div", { className: "pt-9 w-10/12 md:hidden", children: jsx("div", { className: "flex w-full justify-center", children: jsx(StepIndicator, { className: cn(stepperClasses), currentStep: currentPage + 1, totalSteps: steps.length }) }) }), jsx("div", { className: " flex flex-col h-full w-full justify-between p-4 sm:max-w-md md:max-w-lg", children: children })] })] })) }));
1333
1390
  });
1334
1391
  MultiStepSidebar.displayName = "MultiStepSidebar";
1335
1392
 
@@ -1339,7 +1396,7 @@ var MultistepNavigationButtons = function (_a) {
1339
1396
  // backButtonProps || {};
1340
1397
  var _b = nextButtonProps || {}, nextButtonChildren = _b.children, restNextButtonProps = __rest(_b, ["children"]);
1341
1398
  var _c = cancelButtonProps || {}, cancelButtonChildren = _c.children, restCancelButtonProps = __rest(_c, ["children"]);
1342
- return (jsx("div", { className: cn("flex w-full flex-col-reverse gap-2 pt-4 sm:flex-row sm:justify-between md:justify-end", className), children: jsxs("div", { className: "flex w-full flex-col-reverse gap-2 sm:w-auto sm:flex-row", children: [jsx(Button$1, __assign({ className: "w-full sm:w-auto", color: "primary", variant: "flat" }, restCancelButtonProps, { children: cancelButtonChildren || "Cancel" })), jsx(Button$1, __assign({ className: "w-full sm:w-auto", color: "primary" }, restNextButtonProps, { children: nextButtonChildren || "Next" }))] }) }));
1399
+ return (jsx("div", { className: cn("flex w-full flex-col-reverse gap-2 pt-4 sm:flex-row sm:justify-between md:justify-end", className), children: jsxs("div", { className: "flex w-full flex-col-reverse gap-2 md:w-auto md:flex-row", children: [jsx(Button$1, __assign({ className: "w-full md:w-auto", color: "default", variant: "flat" }, restCancelButtonProps, { children: cancelButtonChildren || "Cancel" })), jsx(Button$1, __assign({ className: "w-full md:w-auto", color: "primary" }, restNextButtonProps, { children: nextButtonChildren || "Next" }))] }) }));
1343
1400
  };
1344
1401
 
1345
1402
  var variants = {
@@ -1359,7 +1416,7 @@ var variants = {
1359
1416
  }); },
1360
1417
  };
1361
1418
  var MultiStepWizard = function (_a) {
1362
- var isOpen = _a.isOpen, steps = _a.steps, translations = _a.translations, onClose = _a.onClose;
1419
+ var isOpen = _a.isOpen, steps = _a.steps, translations = _a.translations, onClose = _a.onClose, onComplete = _a.onComplete, completeButtonText = _a.completeButtonText;
1363
1420
  var _b = React.useState([0, 0]), _c = _b[0], page = _c[0], direction = _c[1], setPage = _b[1];
1364
1421
  React.useEffect(function () {
1365
1422
  if (isOpen) {
@@ -1370,8 +1427,8 @@ var MultiStepWizard = function (_a) {
1370
1427
  continue: "Continue",
1371
1428
  goBack: "Back",
1372
1429
  cancel: "Cancel",
1373
- signUp: "Sign Up for Free",
1374
- goToPayment: "Go to Payment",
1430
+ next: "Next",
1431
+ complete: "Complete",
1375
1432
  }, translations);
1376
1433
  var paginate = React.useCallback(function (newDirection) {
1377
1434
  setPage(function (prev) {
@@ -1397,6 +1454,27 @@ var MultiStepWizard = function (_a) {
1397
1454
  var onNext = React.useCallback(function () {
1398
1455
  paginate(1);
1399
1456
  }, [paginate]);
1457
+ // Determinar el texto del botón según el paso
1458
+ var getButtonText = function () {
1459
+ if (page === 0) {
1460
+ return t.next;
1461
+ }
1462
+ if (page === steps.length - 1) {
1463
+ return completeButtonText || t.complete;
1464
+ }
1465
+ return t.continue;
1466
+ };
1467
+ // Determinar la acción del botón según el paso
1468
+ var handleNextAction = function () {
1469
+ if (page === steps.length - 1) {
1470
+ // Último paso: ejecutar acción de completado
1471
+ onComplete === null || onComplete === void 0 ? void 0 : onComplete();
1472
+ }
1473
+ else {
1474
+ // Otros pasos: continuar al siguiente
1475
+ onNext();
1476
+ }
1477
+ };
1400
1478
  var content = React.useMemo(function () {
1401
1479
  return (jsx(LazyMotion, { features: domAnimation, children: jsx(m.div, { animate: "center", className: "col-span-12", custom: direction, exit: "exit", initial: "exit", transition: {
1402
1480
  y: {
@@ -1409,21 +1487,18 @@ var MultiStepWizard = function (_a) {
1409
1487
  if (!isOpen) {
1410
1488
  return null;
1411
1489
  }
1412
- return (jsxs(MultiStepSidebar, { currentPage: page, goBackTranslation: t.goBack, steps: steps, onBack: onBack, onChangePage: onChangePage, onClose: onClose, onNext: onNext, children: [jsx(Button, { className: "w-fit text-default-600 mb-6", color: "default", variant: "light", onPress: onBack, isDisabled: page === 0, startContent: jsx(IconComponent, { className: "text-default-500", icon: "material-symbols:arrow-back-rounded", size: "sm" }), children: t.goBack || "Back" }), jsxs("div", { className: "relative flex h-fit w-full flex-col pt-6 text-center lg:h-full lg:justify-center lg:pt-0", children: [content, jsx(MultistepNavigationButtons, { backButtonProps: {
1413
- isDisabled: page === 0,
1414
- onPress: onBack,
1415
- children: t.goBack,
1416
- }, cancelButtonProps: {
1417
- onPress: onClose,
1418
- children: t.cancel,
1419
- }, nextButtonProps: {
1420
- children: page === 0
1421
- ? t.signUp
1422
- : page === steps.length - 1
1423
- ? t.goToPayment
1424
- : t.continue,
1425
- onPress: onNext,
1426
- } })] })] }));
1490
+ return (jsxs(MultiStepSidebar, { currentPage: page, goBackTranslation: t.goBack, steps: steps, onBack: onBack, onChangePage: onChangePage, onClose: onClose, onNext: onNext, children: [jsxs("div", { children: [jsx(Button, { className: "w-fit text-default-600 mb-6", color: "default", variant: "light", onPress: onBack, isDisabled: page === 0, startContent: jsx(IconComponent, { className: "text-default-500", icon: "material-symbols:arrow-back-rounded", size: "sm" }), children: t.goBack || "Back" }), jsx("div", { className: "relative flex h-fit w-full flex-col text-center lg:justify-center lg:pt-0", children: content })] }), jsx(MultistepNavigationButtons, { backButtonProps: {
1491
+ isDisabled: page === 0,
1492
+ onPress: onBack,
1493
+ children: t.goBack,
1494
+ }, cancelButtonProps: {
1495
+ onPress: onClose,
1496
+ children: t.cancel,
1497
+ }, nextButtonProps: {
1498
+ children: getButtonText(),
1499
+ onPress: handleNextAction,
1500
+ isDisabled: steps[page].isStepValid === false,
1501
+ } })] }));
1427
1502
  };
1428
1503
 
1429
1504
  var Pagination = function (_a) {
@@ -1549,7 +1624,7 @@ var Phone = function (_a) {
1549
1624
  onChange({ countryCode: selectedCountry.code, phoneNumber: val });
1550
1625
  }
1551
1626
  };
1552
- return (jsxs("div", { className: "flex flex-col gap-1 w-full relative", id: id, children: [finalLabel && (jsxs("label", { htmlFor: "phone-input-".concat(name), className: "text-tiny text-default-500 mb-1", children: [finalLabel, " ", required && jsx("span", { className: "text-danger-500", children: "*" })] })), jsxs("div", { className: "flex items-center w-full min-h-[56px] transition-colors shadow-sm border-medium border-default-200 rounded-xl focus-within:border-primary-500 dark:focus-within:border-primary-500 ".concat(error ? "border-danger-500 " : "border-default-200").concat(disabled ? "opacity-60" : ""), children: [jsx("div", { className: "relative ml-2", ref: dropdownRef, children: jsxs("button", { type: "button", className: "flex items-center gap-1 px-4 h-10 rounded-xl bg-default-100 focus:outline-none transition-colors", onClick: function () { return setIsDropdownOpen(function (v) { return !v; }); }, disabled: disabled, tabIndex: 0, "aria-label": t.selectCountryAriaLabel, children: [jsx("span", { className: "text-lg", children: selectedCountry.flag }), jsx("span", { className: "text-xs text-default-500", children: selectedCountry.code }), jsxs("svg", { className: "w-4 h-4 text-default-500 ml-1", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", role: "img", "aria-label": t.expandListAriaLabel, children: [jsx("title", { children: t.expandListAriaLabel }), jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" })] })] }) }), jsx(Input$1, { type: "tel", className: "flex-1 border-none bg-transparent text-default-500 placeholder-default-500 px-2", placeholder: t.placeholder, value: inputValue, onChange: handleInputChange, onBlur: onBlur, disabled: disabled, name: name, autoComplete: "tel", id: "phone-input-".concat(name) })] }), error && errorText && (jsx("span", { className: "text-xs text-danger-500 mt-1", children: errorText })), isDropdownOpen &&
1627
+ return (jsxs("div", { className: "flex flex-col gap-1 w-full relative", id: id, children: [finalLabel && (jsxs("label", { htmlFor: "phone-input-".concat(name), className: "text-tiny text-default-500 mb-1 text-left", children: [finalLabel, " ", required && jsx("span", { className: "text-danger-500", children: "*" })] })), jsxs("div", { className: "flex items-center w-full min-h-[56px] transition-colors shadow-sm border-medium border-default-200 rounded-xl focus-within:border-primary-500 ".concat(error ? "!border-danger-500 " : "border-default-200").concat(disabled ? "opacity-60" : ""), children: [jsx("div", { className: "relative ml-2", ref: dropdownRef, children: jsxs("button", { type: "button", className: "flex items-center gap-1 px-4 h-10 rounded-xl bg-default-100 focus:outline-none transition-colors", onClick: function () { return setIsDropdownOpen(function (v) { return !v; }); }, disabled: disabled, tabIndex: 0, "aria-label": t.selectCountryAriaLabel, children: [jsx("span", { className: "text-lg", children: selectedCountry.flag }), jsx("span", { className: "text-xs text-default-500", children: selectedCountry.code }), jsxs("svg", { className: "w-4 h-4 text-default-500 ml-1", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", role: "img", "aria-label": t.expandListAriaLabel, children: [jsx("title", { children: t.expandListAriaLabel }), jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" })] })] }) }), jsx(Input$1, { type: "tel", className: "flex-1 border-none bg-transparent text-default-500 placeholder-default-500 px-2", placeholder: t.placeholder, value: inputValue, onChange: handleInputChange, onBlur: onBlur, disabled: disabled, name: name, autoComplete: "tel", id: "phone-input-".concat(name) })] }), error && errorText && (jsx("span", { className: " text-left text-xs text-danger-500 mt-1", children: errorText })), isDropdownOpen &&
1553
1628
  createPortal(jsxs("div", { ref: portalDropdownRef, style: dropdownPosition, className: "bg-content1 border border-default-200 rounded-lg shadow-lg z-50", children: [jsx("div", { className: "p-2", children: jsx("input", { type: "text", className: "w-full px-3 py-2 text-sm bg-default-100 border-medium border-default-200 text-default-500 rounded-lg focus:outline-none focus:border-primary-500", placeholder: t.searchPlaceholder, onChange: function (e) {
1554
1629
  var searchTerm = e.target.value.toLowerCase();
1555
1630
  var filtered = uniqueCountries.filter(function (country) {
@@ -2707,4 +2782,4 @@ var AuraToastProvider = function (_a) {
2707
2782
  return (jsx(ToastContext.Provider, { value: { toast: toast, showToast: showToast, hideToast: hideToast }, children: children }));
2708
2783
  };
2709
2784
 
2710
- export { AddHolidayForm, AnalyticsCard, AuraTable, AuraToastProvider, AutoComplete, Button, Card, ColorSelector, DatePicker, DateRangePicker, GlobalToast, H1, H2, H3, H4, HeaderComponent, HolidayType, IconComponent, Input, MenuComponent, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, MultiStepWizard, P, Pagination, Phone, PromotionalBanner, RowSteps, ScheduleRow, Select, StepIndicator, Switch as SwitchComponent, Textarea, ThemeContext, ThemePicker, ThemeProvider, TimeInput as TimeInputComponent, ToastContext, UploadFile, VerticalSteps, sizeMap, themeColors, useAuraToast, useThemeContext };
2785
+ export { AddHolidayForm, AnalyticsCard, AuraTable, AuraToastProvider, AutoComplete, Button, Card, ColorSelector, DatePicker, DateRangePicker, DateSelector, GlobalToast, H1, H2, H3, H4, HeaderComponent, HolidayType, IconComponent, Input, MenuComponent, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, MultiStepWizard, P, Pagination, Phone, PromotionalBanner, RowSteps, ScheduleRow, Select, StepIndicator, Switch as SwitchComponent, Textarea, ThemeContext, ThemePicker, ThemeProvider, TimeInput as TimeInputComponent, ToastContext, UploadFile, VerticalSteps, sizeMap, themeColors, useAuraToast, useThemeContext };
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import type { DateSelectorProps } from "./DateSelector.types";
3
+ /**
4
+ * DateSelector - Componente para seleccionar fechas individuales o rangos de fechas
5
+ * basado en HeroUI siguiendo las reglas de diseño BeweOS.
6
+ * Maneja su propio estado interno de manera autónoma.
7
+ */
8
+ export declare const DateSelector: React.FC<DateSelectorProps>;
9
+ //# sourceMappingURL=DateSelector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DateSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/date-selector/DateSelector.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAU9D;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAmGpD,CAAC"}
@@ -0,0 +1,37 @@
1
+ import type { HolidayType } from "@/types/calendar.types";
2
+ import type { DatePickerProps, DateValue, RadioProps } from "@heroui/react";
3
+ import type { DateRangePickerProps, RangeValue } from "@heroui/react";
4
+ import type { RadioGroupProps } from "@heroui/react";
5
+ export interface DateSelectorTranslations {
6
+ dayOption?: string;
7
+ dateRangeOption?: string;
8
+ selectDateAriaLabel?: string;
9
+ selectDateRangeAriaLabel?: string;
10
+ }
11
+ export interface DateSelectorProps {
12
+ /** Tipo de selección de fecha inicial */
13
+ initialType?: HolidayType;
14
+ /** Fecha única inicial */
15
+ initialDate?: DateValue;
16
+ /** Rango de fechas inicial */
17
+ initialDateRange?: RangeValue<DateValue>;
18
+ /** Callback cuando cambia cualquier valor (tipo, fecha o rango) */
19
+ onChange?: (value: {
20
+ type: HolidayType;
21
+ date: DateValue | null;
22
+ dateRange: RangeValue<DateValue> | null;
23
+ }) => void;
24
+ /** Traducciones para los textos del componente */
25
+ translations?: DateSelectorTranslations;
26
+ /** Props adicionales para el RadioGroup */
27
+ radioGroupProps?: Partial<RadioGroupProps>;
28
+ /** Props adicionales para el Radio */
29
+ radioItemProps?: Partial<RadioProps>;
30
+ /** Props adicionales para el DatePicker */
31
+ datePickerProps?: Partial<DatePickerProps>;
32
+ /** Props adicionales para el DateRangePicker */
33
+ dateRangePickerProps?: Partial<DateRangePickerProps>;
34
+ /** Clase CSS adicional */
35
+ className?: string;
36
+ }
37
+ //# sourceMappingURL=DateSelector.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DateSelector.types.d.ts","sourceRoot":"","sources":["../../../../src/components/date-selector/DateSelector.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC5E,OAAO,KAAK,EAAE,oBAAoB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD,MAAM,WAAW,wBAAwB;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,wBAAwB,CAAC,EAAE,MAAM,CAAC;CAClC;AAED,MAAM,WAAW,iBAAiB;IACjC,yCAAyC;IACzC,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,0BAA0B;IAC1B,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,8BAA8B;IAC9B,gBAAgB,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;IACzC,mEAAmE;IACnE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE;QAClB,IAAI,EAAE,WAAW,CAAC;QAClB,IAAI,EAAE,SAAS,GAAG,IAAI,CAAC;QACvB,SAAS,EAAE,UAAU,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC;KACxC,KAAK,IAAI,CAAC;IACX,kDAAkD;IAClD,YAAY,CAAC,EAAE,wBAAwB,CAAC;IACxC,2CAA2C;IAC3C,eAAe,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IAC3C,sCAAsC;IACtC,cAAc,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IACrC,2CAA2C;IAC3C,eAAe,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IAC3C,gDAAgD;IAChD,oBAAoB,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACrD,0BAA0B;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,3 @@
1
+ export { DateSelector } from "./DateSelector";
2
+ export * from "./DateSelector.types";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/date-selector/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,cAAc,sBAAsB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../../src/components/input/Input.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD;;;;;;;;GAQG;AACH,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CA6BtC,CAAC;AAEF,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../../src/components/input/Input.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD;;;;;;;;GAQG;AACH,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CA8BtC,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -1,3 +1,3 @@
1
1
  import type { MultiStepWizardProps } from "./MultiStepWizard.types";
2
- export declare const MultiStepWizard: ({ isOpen, steps, translations, onClose, }: MultiStepWizardProps) => import("react/jsx-runtime").JSX.Element | null;
2
+ export declare const MultiStepWizard: ({ isOpen, steps, translations, onClose, onComplete, completeButtonText, }: MultiStepWizardProps) => import("react/jsx-runtime").JSX.Element | null;
3
3
  //# sourceMappingURL=MultiStepWizard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MultiStepWizard.d.ts","sourceRoot":"","sources":["../../../../src/components/multi-step-wizard/MultiStepWizard.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAqBpE,eAAO,MAAM,eAAe,GAAI,2CAK7B,oBAAoB,mDAyItB,CAAC"}
1
+ {"version":3,"file":"MultiStepWizard.d.ts","sourceRoot":"","sources":["../../../../src/components/multi-step-wizard/MultiStepWizard.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAqBpE,eAAO,MAAM,eAAe,GAAI,2EAO7B,oBAAoB,mDA6JtB,CAAC"}