@beweco/aurora-ui 0.1.22 → 0.1.23

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 (3) hide show
  1. package/dist/index.cjs.js +254 -1357
  2. package/dist/index.esm.js +264 -1367
  3. package/package.json +1 -1
package/dist/index.cjs.js CHANGED
@@ -26,18 +26,18 @@ PERFORMANCE OF THIS SOFTWARE.
26
26
  /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
27
27
 
28
28
 
29
- var __assign$1 = function() {
30
- __assign$1 = Object.assign || function __assign(t) {
29
+ var __assign = function() {
30
+ __assign = Object.assign || function __assign(t) {
31
31
  for (var s, i = 1, n = arguments.length; i < n; i++) {
32
32
  s = arguments[i];
33
33
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
34
34
  }
35
35
  return t;
36
36
  };
37
- return __assign$1.apply(this, arguments);
37
+ return __assign.apply(this, arguments);
38
38
  };
39
39
 
40
- function __rest$1(s, e) {
40
+ function __rest(s, e) {
41
41
  var t = {};
42
42
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
43
43
  t[p] = s[p];
@@ -87,7 +87,7 @@ function __generator(thisArg, body) {
87
87
  }
88
88
  }
89
89
 
90
- function __spreadArray$1(to, from, pack) {
90
+ function __spreadArray(to, from, pack) {
91
91
  if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
92
92
  if (ar || !(i in from)) {
93
93
  if (!ar) ar = Array.prototype.slice.call(from, 0, i);
@@ -119,42 +119,42 @@ exports.HolidayType = void 0;
119
119
  * - Radius: md (por defecto)
120
120
  * - isIconOnly: True, False
121
121
  */
122
- var Button$1 = function (_a) {
123
- var _b = _a.color, color = _b === void 0 ? "primary" : _b, _c = _a.size, size = _c === void 0 ? "md" : _c, _d = _a.variant, variant = _d === void 0 ? "solid" : _d, _e = _a.radius, radius = _e === void 0 ? "sm" : _e, startContent = _a.startContent, endContent = _a.endContent, _f = _a.isLoading, isLoading = _f === void 0 ? false : _f, _g = _a.isIconOnly, isIconOnly = _g === void 0 ? false : _g, props = __rest$1(_a, ["color", "size", "variant", "radius", "startContent", "endContent", "isLoading", "isIconOnly"]);
124
- return (jsxRuntime.jsx(react.Button, __assign$1({}, props, { color: color, size: size, variant: variant, radius: radius, startContent: startContent, endContent: endContent, isLoading: isLoading, isIconOnly: isIconOnly })));
122
+ var Button = function (_a) {
123
+ var _b = _a.color, color = _b === void 0 ? "primary" : _b, _c = _a.size, size = _c === void 0 ? "md" : _c, _d = _a.variant, variant = _d === void 0 ? "solid" : _d, _e = _a.radius, radius = _e === void 0 ? "sm" : _e, startContent = _a.startContent, endContent = _a.endContent, _f = _a.isLoading, isLoading = _f === void 0 ? false : _f, _g = _a.isIconOnly, isIconOnly = _g === void 0 ? false : _g, props = __rest(_a, ["color", "size", "variant", "radius", "startContent", "endContent", "isLoading", "isIconOnly"]);
124
+ return (jsxRuntime.jsx(react.Button, __assign({}, props, { color: color, size: size, variant: variant, radius: radius, startContent: startContent, endContent: endContent, isLoading: isLoading, isIconOnly: isIconOnly })));
125
125
  };
126
126
 
127
127
  var DatePicker = function (_a) {
128
- var label = _a.label, id = _a.id, _b = _a.size, size = _b === void 0 ? "md" : _b, props = __rest$1(_a, ["label", "id", "size"]);
128
+ var label = _a.label, id = _a.id, _b = _a.size, size = _b === void 0 ? "md" : _b, props = __rest(_a, ["label", "id", "size"]);
129
129
  var generatedId = React.useId();
130
130
  var autoId = id || generatedId;
131
- return (jsxRuntime.jsx(react.DatePicker, __assign$1({ label: label, size: size, labelPlacement: "outside", classNames: {
131
+ return (jsxRuntime.jsx(react.DatePicker, __assign({ label: label, size: size, labelPlacement: "outside", classNames: {
132
132
  label: "text-sm font-medium text-default-600",
133
133
  segment: "focus:bg-primary-50",
134
134
  }, id: autoId }, props)));
135
135
  };
136
136
 
137
137
  var DateRangePicker = function (_a) {
138
- var label = _a.label, id = _a.id, _b = _a.size, size = _b === void 0 ? "md" : _b, props = __rest$1(_a, ["label", "id", "size"]);
138
+ var label = _a.label, id = _a.id, _b = _a.size, size = _b === void 0 ? "md" : _b, props = __rest(_a, ["label", "id", "size"]);
139
139
  var generatedId = React.useId();
140
140
  var autoId = id || generatedId;
141
- return (jsxRuntime.jsx(react.DateRangePicker, __assign$1({ label: label, size: size, labelPlacement: "outside", classNames: {
141
+ return (jsxRuntime.jsx(react.DateRangePicker, __assign({ label: label, size: size, labelPlacement: "outside", classNames: {
142
142
  label: "text-sm font-medium text-default-600",
143
143
  segment: "focus:bg-primary-50",
144
144
  } }, props, { id: autoId })));
145
145
  };
146
146
 
147
- var sizeMap$1 = {
147
+ var sizeMap = {
148
148
  sm: "16px",
149
149
  md: "20px",
150
150
  lg: "24px",
151
151
  xl: "32px",
152
152
  };
153
- var IconComponent$1 = function (_a) {
153
+ var IconComponent = function (_a) {
154
154
  var _b;
155
- var icon = _a.icon, _c = _a.size, size = _c === void 0 ? "md" : _c, className = _a.className, style = _a.style, color = _a.color, hFlip = _a.hFlip, vFlip = _a.vFlip, flip = _a.flip, rotate = _a.rotate, nativeProps = __rest$1(_a, ["icon", "size", "className", "style", "color", "hFlip", "vFlip", "flip", "rotate"]);
156
- var iconSize = (_b = sizeMap$1[size]) !== null && _b !== void 0 ? _b : sizeMap$1.md;
157
- return (jsxRuntime.jsx("span", __assign$1({}, nativeProps, { children: jsxRuntime.jsx(react$1.Icon, { icon: icon, width: iconSize, height: iconSize, className: className, style: style, color: color, hFlip: hFlip, vFlip: vFlip, flip: flip, rotate: rotate }) })));
155
+ var icon = _a.icon, _c = _a.size, size = _c === void 0 ? "md" : _c, className = _a.className, style = _a.style, color = _a.color, hFlip = _a.hFlip, vFlip = _a.vFlip, flip = _a.flip, rotate = _a.rotate, nativeProps = __rest(_a, ["icon", "size", "className", "style", "color", "hFlip", "vFlip", "flip", "rotate"]);
156
+ var iconSize = (_b = sizeMap[size]) !== null && _b !== void 0 ? _b : sizeMap.md;
157
+ return (jsxRuntime.jsx("span", __assign({}, nativeProps, { children: jsxRuntime.jsx(react$1.Icon, { icon: icon, width: iconSize, height: iconSize, className: className, style: style, color: color, hFlip: hFlip, vFlip: vFlip, flip: flip, rotate: rotate }) })));
158
158
  };
159
159
 
160
160
  /**
@@ -167,10 +167,10 @@ var IconComponent$1 = function (_a) {
167
167
  * - Radius configurable
168
168
  */
169
169
  var Input = function (_a) {
170
- var label = _a.label, id = _a.id, _b = _a.size, size = _b === void 0 ? "md" : _b, _c = _a.variant, variant = _c === void 0 ? "bordered" : _c, _d = _a.radius, radius = _d === void 0 ? "md" : _d, placeholder = _a.placeholder, props = __rest$1(_a, ["label", "id", "size", "variant", "radius", "placeholder"]);
170
+ var label = _a.label, id = _a.id, _b = _a.size, size = _b === void 0 ? "md" : _b, _c = _a.variant, variant = _c === void 0 ? "bordered" : _c, _d = _a.radius, radius = _d === void 0 ? "md" : _d, placeholder = _a.placeholder, props = __rest(_a, ["label", "id", "size", "variant", "radius", "placeholder"]);
171
171
  var generatedId = React.useId();
172
172
  var inputId = id || generatedId;
173
- return (jsxRuntime.jsx(react.Input, __assign$1({}, props, { id: inputId, label: label, labelPlacement: "outside", placeholder: placeholder, variant: variant, size: size, radius: radius, classNames: {
173
+ return (jsxRuntime.jsx(react.Input, __assign({}, props, { id: inputId, label: label, labelPlacement: "outside", placeholder: placeholder, variant: variant, size: size, radius: radius, classNames: {
174
174
  label: "text-default-600 text-tiny group-data-[filled=true]:text-default-600",
175
175
  inputWrapper: "focus-within:!border-primary-500",
176
176
  errorMessage: "text-left",
@@ -201,7 +201,7 @@ var INITIAL_HOLIDAY_STATE = {
201
201
  */
202
202
  var AddHolidayForm = function (_a) {
203
203
  var onAddHoliday = _a.onAddHoliday, translations = _a.translations, className = _a.className, radioGroupProps = _a.radioGroupProps, dateRangePickerProps = _a.dateRangePickerProps, buttonProps = _a.buttonProps;
204
- var t = __assign$1(__assign$1({}, defaultTranslations$a), translations);
204
+ var t = __assign(__assign({}, defaultTranslations$a), translations);
205
205
  var _b = React.useState(INITIAL_HOLIDAY_STATE), newHoliday = _b[0], setNewHoliday = _b[1];
206
206
  /**
207
207
  * A boolean flag that determines if a date has been set.
@@ -222,7 +222,7 @@ var AddHolidayForm = function (_a) {
222
222
  * @param date The selected date.
223
223
  */
224
224
  var handleDateChange = React.useCallback(function (date) {
225
- setNewHoliday(function (prev) { return (__assign$1(__assign$1({}, prev), { startDate: date, endDate: null })); });
225
+ setNewHoliday(function (prev) { return (__assign(__assign({}, prev), { startDate: date, endDate: null })); });
226
226
  }, []);
227
227
  /**
228
228
  * Handles changes to the date range picker.
@@ -231,7 +231,7 @@ var AddHolidayForm = function (_a) {
231
231
  var handleDateRangeChange = React.useCallback(function (range) {
232
232
  setNewHoliday(function (prev) {
233
233
  var _a, _b;
234
- return (__assign$1(__assign$1({}, prev), { startDate: (_a = range === null || range === void 0 ? void 0 : range.start) !== null && _a !== void 0 ? _a : null, endDate: (_b = range === null || range === void 0 ? void 0 : range.end) !== null && _b !== void 0 ? _b : null }));
234
+ return (__assign(__assign({}, prev), { startDate: (_a = range === null || range === void 0 ? void 0 : range.start) !== null && _a !== void 0 ? _a : null, endDate: (_b = range === null || range === void 0 ? void 0 : range.end) !== null && _b !== void 0 ? _b : null }));
235
235
  });
236
236
  }, []);
237
237
  /**
@@ -252,23 +252,23 @@ var AddHolidayForm = function (_a) {
252
252
  });
253
253
  resetForm();
254
254
  }, [newHoliday, onAddHoliday, resetForm, isDateSet]);
255
- return (jsxRuntime.jsxs("div", { className: "flex flex-col gap-4 ".concat(className), children: [jsxRuntime.jsx("h3", { className: "font-semibold text-small text-foreground", children: t.addHolidayTitle }), jsxRuntime.jsxs("div", { className: "w-full flex flex-wrap xs:gap-5 justify-between items-center", children: [jsxRuntime.jsxs(react.RadioGroup, __assign$1({ color: "primary", orientation: "horizontal", size: "sm", value: newHoliday.type, onValueChange: function (value) {
256
- return setNewHoliday(__assign$1(__assign$1({}, INITIAL_HOLIDAY_STATE), { type: value }));
257
- } }, radioGroupProps, { children: [jsxRuntime.jsx(react.Radio, { value: exports.HolidayType.SingleDay, children: t.dayOption }), jsxRuntime.jsx(react.Radio, { value: exports.HolidayType.DateRange, children: t.dateRangeOption })] })), newHoliday.type === exports.HolidayType.DateRange ? (jsxRuntime.jsx(DateRangePicker, __assign$1({ className: "xs:w-full md:flex-1 md:max-w-xs", value: newHoliday.startDate && newHoliday.endDate
255
+ return (jsxRuntime.jsxs("div", { className: "flex flex-col gap-4 ".concat(className), children: [jsxRuntime.jsx("h3", { className: "font-semibold text-small text-foreground", children: t.addHolidayTitle }), jsxRuntime.jsxs("div", { className: "w-full flex flex-wrap xs:gap-5 justify-between items-center", children: [jsxRuntime.jsxs(react.RadioGroup, __assign({ color: "primary", orientation: "horizontal", size: "sm", value: newHoliday.type, onValueChange: function (value) {
256
+ return setNewHoliday(__assign(__assign({}, INITIAL_HOLIDAY_STATE), { type: value }));
257
+ } }, radioGroupProps, { children: [jsxRuntime.jsx(react.Radio, { value: exports.HolidayType.SingleDay, children: t.dayOption }), jsxRuntime.jsx(react.Radio, { value: exports.HolidayType.DateRange, children: t.dateRangeOption })] })), newHoliday.type === exports.HolidayType.DateRange ? (jsxRuntime.jsx(DateRangePicker, __assign({ className: "xs:w-full md:flex-1 md:max-w-xs", value: newHoliday.startDate && newHoliday.endDate
258
258
  ? { start: newHoliday.startDate, end: newHoliday.endDate }
259
- : null, onChange: handleDateRangeChange, "aria-label": t.selectDateRangeAriaLabel, endContent: jsxRuntime.jsx(IconComponent$1, { icon: "solar:calendar-outline" }) }, dateRangePickerProps))) : (jsxRuntime.jsx(DatePicker, { className: "xs:w-full md:flex-1 md:max-w-40", value: newHoliday.startDate, onChange: handleDateChange, endContent: jsxRuntime.jsx(IconComponent$1, { icon: "solar:calendar-outline" }), "aria-label": t.selectDateAriaLabel }))] }), jsxRuntime.jsx(Input, { label: t.optionalTitle, placeholder: t.titlePlaceholder, className: "w-full", value: newHoliday.title, onValueChange: function (value) {
260
- setNewHoliday(function (prev) { return (__assign$1(__assign$1({}, prev), { title: value })); });
261
- }, "aria-label": t.optionalTitle }), jsxRuntime.jsx("div", { className: "w-full", children: jsxRuntime.jsx(Button$1, __assign$1({ size: "sm", fullWidth: true, variant: "flat", startContent: jsxRuntime.jsx(IconComponent$1, { icon: "solar:add-circle-outline" }), onPress: handleAddHoliday, isDisabled: !isDateSet }, buttonProps, { children: t.addButton })) })] }));
259
+ : null, onChange: handleDateRangeChange, "aria-label": t.selectDateRangeAriaLabel, endContent: jsxRuntime.jsx(IconComponent, { icon: "solar:calendar-outline" }) }, dateRangePickerProps))) : (jsxRuntime.jsx(DatePicker, { className: "xs:w-full md:flex-1 md:max-w-40", value: newHoliday.startDate, onChange: handleDateChange, endContent: jsxRuntime.jsx(IconComponent, { icon: "solar:calendar-outline" }), "aria-label": t.selectDateAriaLabel }))] }), jsxRuntime.jsx(Input, { label: t.optionalTitle, placeholder: t.titlePlaceholder, className: "w-full", value: newHoliday.title, onValueChange: function (value) {
260
+ setNewHoliday(function (prev) { return (__assign(__assign({}, prev), { title: value })); });
261
+ }, "aria-label": t.optionalTitle }), jsxRuntime.jsx("div", { className: "w-full", children: jsxRuntime.jsx(Button, __assign({ size: "sm", fullWidth: true, variant: "flat", startContent: jsxRuntime.jsx(IconComponent, { icon: "solar:add-circle-outline" }), onPress: handleAddHoliday, isDisabled: !isDateSet }, buttonProps, { children: t.addButton })) })] }));
262
262
  };
263
263
 
264
264
  var H2 = function (_a) {
265
- var children = _a.children, className = _a.className, props = __rest$1(_a, ["children", "className"]);
266
- return (jsxRuntime.jsx("h2", __assign$1({ className: react.cn("text-lg font-semibold", className) }, props, { children: children })));
265
+ var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
266
+ return (jsxRuntime.jsx("h2", __assign({ className: react.cn("text-lg font-semibold", className) }, props, { children: children })));
267
267
  };
268
268
 
269
269
  var P = function (_a) {
270
- var children = _a.children, className = _a.className, props = __rest$1(_a, ["children", "className"]);
271
- return (jsxRuntime.jsx("p", __assign$1({ className: react.cn("text-tiny text-default-500 font-normal", className) }, props, { children: children })));
270
+ var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
271
+ return (jsxRuntime.jsx("p", __assign({ className: react.cn("text-tiny text-default-500 font-normal", className) }, props, { children: children })));
272
272
  };
273
273
 
274
274
  var defaultTranslations$9 = {
@@ -324,8 +324,8 @@ var formatMonth = function (month) {
324
324
  */
325
325
  var AnalyticsCard = function (_a) {
326
326
  var _b, _c;
327
- 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$1(_a, ["data", "showTimePeriods", "showDropdownMenu", "showMetricCards", "onChartChange", "onMenuAction", "onTimePeriodChange", "translations"]);
328
- var t = __assign$1(__assign$1({}, defaultTranslations$9), translations);
327
+ 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"]);
328
+ var t = __assign(__assign({}, defaultTranslations$9), translations);
329
329
  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];
330
330
  var activeChartData = React.useMemo(function () {
331
331
  var _a;
@@ -352,7 +352,7 @@ var AnalyticsCard = function (_a) {
352
352
  var handleTimePeriodChange = function (period) {
353
353
  onTimePeriodChange === null || onTimePeriodChange === void 0 ? void 0 : onTimePeriodChange(period);
354
354
  };
355
- return (jsxRuntime.jsx(react.Card, __assign$1({ as: "dl", className: "dark:border-default-100 border border-transparent" }, props, { children: jsxRuntime.jsxs("section", { className: "flex flex-col flex-nowrap", children: [jsxRuntime.jsx("div", { className: "flex flex-col justify-between gap-y-2 p-6", children: jsxRuntime.jsxs("div", { className: "flex flex-col gap-y-2", children: [jsxRuntime.jsxs("div", { className: "flex flex-col gap-y-0", children: [jsxRuntime.jsx(H2, { children: t.title }), jsxRuntime.jsx(P, { children: t.description })] }), jsxRuntime.jsx(react.Spacer, { y: 2 }), showTimePeriods && (jsxRuntime.jsxs(react.Tabs, { size: "md", className: " self-end", onSelectionChange: function (key) { return handleTimePeriodChange(String(key)); }, children: [jsxRuntime.jsx(react.Tab, { title: t.months6 }, "6-months"), jsxRuntime.jsx(react.Tab, { title: t.months3 }, "3-months"), jsxRuntime.jsx(react.Tab, { title: t.days30 }, "30-days"), jsxRuntime.jsx(react.Tab, { title: t.days7 }, "7-days"), jsxRuntime.jsx(react.Tab, { title: t.hours24 }, "24-hours")] })), showMetricCards && (jsxRuntime.jsx("div", { className: "mt-2 flex w-full items-center", children: jsxRuntime.jsx("div", { className: "-my-3 flex w-full max-w-[800px] items-center gap-x-3 overflow-x-auto py-3", children: data.map(function (_a) {
355
+ return (jsxRuntime.jsx(react.Card, __assign({ as: "dl", className: "dark:border-default-100 border border-transparent" }, props, { children: jsxRuntime.jsxs("section", { className: "flex flex-col flex-nowrap", children: [jsxRuntime.jsx("div", { className: "flex flex-col justify-between gap-y-2 p-6", children: jsxRuntime.jsxs("div", { className: "flex flex-col gap-y-2", children: [jsxRuntime.jsxs("div", { className: "flex flex-col gap-y-0", children: [jsxRuntime.jsx(H2, { children: t.title }), jsxRuntime.jsx(P, { children: t.description })] }), jsxRuntime.jsx(react.Spacer, { y: 2 }), showTimePeriods && (jsxRuntime.jsxs(react.Tabs, { size: "md", className: " self-end", onSelectionChange: function (key) { return handleTimePeriodChange(String(key)); }, children: [jsxRuntime.jsx(react.Tab, { title: t.months6 }, "6-months"), jsxRuntime.jsx(react.Tab, { title: t.months3 }, "3-months"), jsxRuntime.jsx(react.Tab, { title: t.days30 }, "30-days"), jsxRuntime.jsx(react.Tab, { title: t.days7 }, "7-days"), jsxRuntime.jsx(react.Tab, { title: t.hours24 }, "24-hours")] })), showMetricCards && (jsxRuntime.jsx("div", { className: "mt-2 flex w-full items-center", children: jsxRuntime.jsx("div", { className: "-my-3 flex w-full max-w-[800px] items-center gap-x-3 overflow-x-auto py-3", children: data.map(function (_a) {
356
356
  var key = _a.key, change = _a.change, changeType = _a.changeType, type = _a.type, value = _a.value, title = _a.title;
357
357
  return (jsxRuntime.jsxs("button", { type: "button", className: react.cn("rounded-medium flex w-full flex-col gap-2 p-3 transition-colors", {
358
358
  "bg-default-100": activeChart === key,
@@ -364,7 +364,7 @@ var AnalyticsCard = function (_a) {
364
364
  ? "success"
365
365
  : changeType === "negative"
366
366
  ? "danger"
367
- : "default", radius: "md", size: "sm", startContent: changeType === "positive" ? (jsxRuntime.jsx(IconComponent$1, { icon: "solar:arrow-right-up-linear", size: "sm" })) : changeType === "negative" ? (jsxRuntime.jsx(IconComponent$1, { icon: "solar:arrow-right-down-linear", size: "sm" })) : (jsxRuntime.jsx(IconComponent$1, { icon: "solar:arrow-right-linear", size: "sm" })), variant: "bordered", children: jsxRuntime.jsx("span", { children: change }) })] })] }, key));
367
+ : "default", radius: "md", size: "sm", startContent: changeType === "positive" ? (jsxRuntime.jsx(IconComponent, { icon: "solar:arrow-right-up-linear", size: "sm" })) : changeType === "negative" ? (jsxRuntime.jsx(IconComponent, { icon: "solar:arrow-right-down-linear", size: "sm" })) : (jsxRuntime.jsx(IconComponent, { icon: "solar:arrow-right-linear", size: "sm" })), variant: "bordered", children: jsxRuntime.jsx("span", { children: change }) })] })] }, key));
368
368
  }) }) }))] }) }), jsxRuntime.jsx(recharts.ResponsiveContainer, { className: "min-h-[300px] [&_.recharts-surface]:outline-hidden", height: "100%", width: "100%", children: jsxRuntime.jsxs(recharts.AreaChart, { accessibilityLayer: true, data: chartData, height: 300, margin: {
369
369
  left: 0,
370
370
  right: 0,
@@ -392,7 +392,7 @@ var AnalyticsCard = function (_a) {
392
392
  r: 4,
393
393
  }, animationDuration: 1000, animationEasing: "ease", dataKey: "value", fill: "url(#colorGradient)", stroke: "hsl(var(--heroui-".concat(color, "))"), strokeWidth: 2, type: "monotone" })] }) }), showDropdownMenu && (jsxRuntime.jsxs(react.Dropdown, { classNames: {
394
394
  content: "min-w-[120px]",
395
- }, placement: "bottom-end", children: [jsxRuntime.jsx(react.DropdownTrigger, { children: jsxRuntime.jsx(react.Button, { isIconOnly: true, className: "absolute top-2 right-2 w-auto rounded-full", size: "lg", variant: "bordered", children: jsxRuntime.jsx(IconComponent$1, { icon: "solar:menu-dots-bold", size: "sm" }) }) }), jsxRuntime.jsxs(react.DropdownMenu, { itemClasses: {
395
+ }, placement: "bottom-end", children: [jsxRuntime.jsx(react.DropdownTrigger, { children: jsxRuntime.jsx(react.Button, { isIconOnly: true, className: "absolute top-2 right-2 w-auto rounded-full", size: "lg", variant: "bordered", children: jsxRuntime.jsx(IconComponent, { icon: "solar:menu-dots-bold", size: "sm" }) }) }), jsxRuntime.jsxs(react.DropdownMenu, { itemClasses: {
396
396
  title: "text-tiny",
397
397
  }, variant: "bordered", onAction: function (key) { return handleMenuAction(String(key)); }, children: [jsxRuntime.jsx(react.DropdownItem, { children: t.viewDetails }, "view-details"), jsxRuntime.jsx(react.DropdownItem, { children: t.exportData }, "export-data"), jsxRuntime.jsx(react.DropdownItem, { children: t.setAlert }, "set-alert")] })] }))] }) })));
398
398
  };
@@ -407,10 +407,10 @@ var AnalyticsCard = function (_a) {
407
407
  * - Size: sm, md, lg (configurable)
408
408
  */
409
409
  var AuraAutocomplete = function (_a) {
410
- var label = _a.label, id = _a.id, _b = _a.size, size = _b === void 0 ? "md" : _b, _c = _a.variant, variant = _c === void 0 ? "bordered" : _c, _d = _a.radius, radius = _d === void 0 ? "md" : _d, props = __rest$1(_a, ["label", "id", "size", "variant", "radius"]);
410
+ var label = _a.label, id = _a.id, _b = _a.size, size = _b === void 0 ? "md" : _b, _c = _a.variant, variant = _c === void 0 ? "bordered" : _c, _d = _a.radius, radius = _d === void 0 ? "md" : _d, props = __rest(_a, ["label", "id", "size", "variant", "radius"]);
411
411
  var generatedId = React.useId();
412
412
  var autoId = id || generatedId;
413
- return (jsxRuntime.jsxs("div", { children: [label && (jsxRuntime.jsx("label", { htmlFor: autoId, className: "block mb-2 text-tiny text-default-600", children: label })), jsxRuntime.jsx(react.Autocomplete, __assign$1({}, props, { id: autoId, label: undefined, labelPlacement: "outside", variant: variant, size: size, radius: radius, classNames: {
413
+ return (jsxRuntime.jsxs("div", { children: [label && (jsxRuntime.jsx("label", { htmlFor: autoId, className: "block mb-2 text-tiny text-default-600", children: label })), jsxRuntime.jsx(react.Autocomplete, __assign({}, props, { id: autoId, label: undefined, labelPlacement: "outside", variant: variant, size: size, radius: radius, classNames: {
414
414
  base: "[&_[data-slot=input-wrapper][data-focus=true]]:!border-primary-500",
415
415
  popoverContent: "[&_li[data-hover=true]]:!bg-primary-50 [&_li[data-hover=true]]:!text-default-600 [&_li]:!text-default-500",
416
416
  } }))] }));
@@ -432,7 +432,7 @@ var useThemeContext = function () {
432
432
  return context;
433
433
  };
434
434
 
435
- var themeColors$1 = {
435
+ var themeColors = {
436
436
  "blue-light": {
437
437
  extend: "light",
438
438
  colors: {
@@ -932,7 +932,7 @@ var ColorSelector = function (_a) {
932
932
  * - label: the base color name (e.g., "blue")
933
933
  * - color: the primary color hex value
934
934
  */
935
- var colorOptions = Object.entries(themeColors$1)
935
+ var colorOptions = Object.entries(themeColors)
936
936
  .filter(function (_a) {
937
937
  var themeData = _a[1];
938
938
  var themeMode = themeData.extend;
@@ -963,7 +963,7 @@ var ColorSelector = function (_a) {
963
963
  * basado en HeroUI siguiendo las reglas de diseño BeweOS.
964
964
  */
965
965
  var Chip = function (_a) {
966
- var _b = _a.color, color = _b === void 0 ? "default" : _b, props = __rest$1(_a, ["color"]);
966
+ var _b = _a.color, color = _b === void 0 ? "default" : _b, props = __rest(_a, ["color"]);
967
967
  // Colores estándar de HeroUI
968
968
  var standardColors = [
969
969
  "default",
@@ -975,1248 +975,145 @@ var Chip = function (_a) {
975
975
  ];
976
976
  // Si es un color estándar, usar HeroUI normalmente
977
977
  if (standardColors.includes(color)) {
978
- return (jsxRuntime.jsx(react.Chip, __assign$1({}, props, { color: color, onClose: props.onClose })));
978
+ return (jsxRuntime.jsx(react.Chip, __assign({}, props, { color: color, onClose: props.onClose })));
979
979
  }
980
980
  // Si es un color personalizado, aplicar clases CSS específicas
981
981
  var customColorClasses = {
982
- red: "bg-red-100 text-red-500",
983
- purple: "bg-purple-100 text-purple-500",
984
- blue: "bg-blue-100 text-blue-500",
985
- green: "bg-green-100 text-green-500",
986
- orange: "bg-orange-100 text-orange-500",
987
- };
988
- var colorClasses = customColorClasses[color];
989
- return (jsxRuntime.jsx(react.Chip, __assign$1({}, props, { onClose: props.onClose, classNames: __assign$1({ base: colorClasses }, props.classNames) })));
990
- };
991
-
992
- // Traducciones por defecto en español
993
- var defaultTranslations$8 = {
994
- dayOption: "Día específico",
995
- dateRangeOption: "Rango de fechas",
996
- selectDateAriaLabel: "Seleccionar fecha",
997
- selectDateRangeAriaLabel: "Seleccionar rango de fechas",
998
- };
999
- /**
1000
- * DateSelector - Componente para seleccionar fechas individuales o rangos de fechas
1001
- * basado en HeroUI siguiendo las reglas de diseño BeweOS.
1002
- * Maneja su propio estado interno de manera autónoma.
1003
- */
1004
- var DateSelector = function (_a) {
1005
- 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;
1006
- // Estado interno del componente
1007
- var _e = React.useState(initialType), type = _e[0], setType = _e[1];
1008
- var _f = React.useState(initialDate || null), date = _f[0], setDate = _f[1];
1009
- var _g = React.useState(initialDateRange || null), dateRange = _g[0], setDateRange = _g[1];
1010
- // Combinar traducciones por defecto con las proporcionadas
1011
- var t = __assign$1(__assign$1({}, defaultTranslations$8), translations);
1012
- var handleTypeChange = function (value) {
1013
- var newType = value;
1014
- setType(newType);
1015
- // Limpiar valores cuando cambia el tipo
1016
- if (newType === exports.HolidayType.SingleDay) {
1017
- setDateRange(null);
1018
- }
1019
- else {
1020
- setDate(null);
1021
- }
1022
- // Notificar cambio
1023
- onChange === null || onChange === void 0 ? void 0 : onChange({
1024
- type: newType,
1025
- date: newType === exports.HolidayType.SingleDay ? date : null,
1026
- dateRange: newType === exports.HolidayType.DateRange ? dateRange : null,
1027
- });
1028
- };
1029
- var handleDateChange = function (selectedDate) {
1030
- setDate(selectedDate);
1031
- onChange === null || onChange === void 0 ? void 0 : onChange({
1032
- type: type,
1033
- date: selectedDate,
1034
- dateRange: null,
1035
- });
1036
- };
1037
- var handleDateRangeChange = function (range) {
1038
- setDateRange(range);
1039
- onChange === null || onChange === void 0 ? void 0 : onChange({
1040
- type: type,
1041
- date: null,
1042
- dateRange: range,
1043
- });
1044
- };
1045
- 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$1({ color: "primary", orientation: "horizontal", size: "sm", value: type, onValueChange: handleTypeChange }, radioGroupProps, { children: [jsxRuntime.jsx(react.Radio, __assign$1({ value: exports.HolidayType.SingleDay }, radioItemProps, { children: t.dayOption })), jsxRuntime.jsx(react.Radio, __assign$1({ value: exports.HolidayType.DateRange }, radioItemProps, { children: t.dateRangeOption }))] })), type === exports.HolidayType.DateRange ? (jsxRuntime.jsx(react.DateRangePicker, __assign$1({ className: "xs:w-full md:flex-1 md:max-w-xs", value: dateRange || null, onChange: handleDateRangeChange, "aria-label": t.selectDateRangeAriaLabel, endContent: jsxRuntime.jsx(IconComponent$1, { icon: "solar:calendar-outline" }) }, dateRangePickerProps))) : (jsxRuntime.jsx(react.DatePicker, __assign$1({ className: "xs:w-full md:flex-1 md:max-w-40", value: date || null, onChange: handleDateChange, endContent: jsxRuntime.jsx(IconComponent$1, { icon: "solar:calendar-outline" }), "aria-label": t.selectDateAriaLabel }, datePickerProps)))] }));
1046
- };
1047
-
1048
- var H1 = function (_a) {
1049
- var children = _a.children, className = _a.className, props = __rest$1(_a, ["children", "className"]);
1050
- return (jsxRuntime.jsx("h1", __assign$1({ className: react.cn("text-xl font-bold", className) }, props, { children: children })));
1051
- };
1052
-
1053
- var H3 = function (_a) {
1054
- var children = _a.children, className = _a.className, props = __rest$1(_a, ["children", "className"]);
1055
- return (jsxRuntime.jsx("h3", __assign$1({ className: react.cn("text-base font-medium", className) }, props, { children: children })));
1056
- };
1057
-
1058
- var H4 = function (_a) {
1059
- var children = _a.children, className = _a.className, props = __rest$1(_a, ["children", "className"]);
1060
- return (jsxRuntime.jsx("h4", __assign$1({ className: react.cn("text-sm font-medium ", className) }, props, { children: children })));
1061
- };
1062
-
1063
- /**
1064
- * Breadcrumbs - Wrapper simple del componente HeroUI Breadcrumbs
1065
- *
1066
- * Este componente es un wrapper directo del componente Breadcrumbs de HeroUI,
1067
- * proporcionando una interfaz simplificada y consistente con el resto de la librería.
1068
- *
1069
- * @example
1070
- * ```tsx
1071
- * // Uso básico
1072
- * <Breadcrumbs>
1073
- * <BreadcrumbItem href="/">Inicio</BreadcrumbItem>
1074
- * <BreadcrumbItem href="/products">Productos</BreadcrumbItem>
1075
- * <BreadcrumbItem>Detalle</BreadcrumbItem>
1076
- * </Breadcrumbs>
1077
- *
1078
- * // Con items como prop
1079
- * <Breadcrumbs
1080
- * items={[
1081
- * { label: "Inicio", href: "/" },
1082
- * { label: "Productos", href: "/products" },
1083
- * { label: "Detalle", isCurrent: true }
1084
- * ]}
1085
- * />
1086
- * ```
1087
- */
1088
- var BreadcrumbsComponent = function (_a) {
1089
- var items = _a.items, children = _a.children, heroUIProps = __rest$1(_a, ["items", "children"]);
1090
- return (jsxRuntime.jsx(react.Breadcrumbs, __assign$1({}, heroUIProps, { children: items
1091
- ? items.map(function (item, index) { return (jsxRuntime.jsx(react.BreadcrumbItem, { href: item.href, isCurrent: item.isCurrent, children: item.label }, "".concat(item.href || item.label, "-").concat(index))); })
1092
- : children })));
1093
- };
1094
-
1095
- var ConfigMenu = function (_a) {
1096
- var _b;
1097
- var options = _a.options, onLogout = _a.onLogout, translations = _a.translations;
1098
- return (jsxRuntime.jsxs(react.Dropdown, { className: "min-w-40", children: [jsxRuntime.jsx(react.DropdownTrigger, { children: jsxRuntime.jsx(react.Button, { isIconOnly: true, color: "default", startContent: jsxRuntime.jsx(IconComponent$1, { icon: "solar:settings-linear" }) }) }), jsxRuntime.jsxs(react.DropdownMenu, { "aria-label": "Configuration", children: [jsxRuntime.jsx(react.DropdownSection, { showDivider: true, className: "mb-0", children: options.map(function (item) { return (jsxRuntime.jsx(react.DropdownItem, { href: item.href, className: "data-[hover=true]:bg-primary-100 data-[hover=true]:text-default-700", classNames: {
1099
- base: "text-default-500",
1100
- }, startContent: item.icon ? jsxRuntime.jsx(IconComponent$1, { icon: item.icon }) : undefined, children: item.label }, item.label)); }) }), jsxRuntime.jsx(react.DropdownSection, { children: jsxRuntime.jsx(react.DropdownItem, { onPress: onLogout, className: "data-[hover=true]:bg-primary-100 data-[hover=true]:text-default-700", classNames: {
1101
- base: "text-default-500",
1102
- }, startContent: jsxRuntime.jsx(IconComponent$1, { icon: "solar:logout-2-linear" }), children: (_b = translations === null || translations === void 0 ? void 0 : translations.logout) !== null && _b !== void 0 ? _b : "Logout" }, "logout") })] })] }));
1103
- };
1104
- ConfigMenu.displayName = "ConfigMenu";
1105
-
1106
- var NotificationButton = function (_a) {
1107
- var _b = _a.notificationCount, notificationCount = _b === void 0 ? 0 : _b;
1108
- return (jsxRuntime.jsx(react.Button, { isIconOnly: true, color: "secondary", variant: "flat", startContent: jsxRuntime.jsx(IconComponent$1, { icon: "solar:bell-bing-linear" }), children: notificationCount > 0 && (jsxRuntime.jsx("span", { className: "notification__alert", children: notificationCount })) }));
1109
- };
1110
- NotificationButton.displayName = "NotificationButton";
1111
-
1112
- var HeaderComponent = function (_a) {
1113
- var notificationCount = _a.notificationCount, options = _a.options, onMenuClick = _a.onMenuClick, onLogout = _a.onLogout, translations = _a.translations, breadcrumbs = _a.breadcrumbs;
1114
- return (jsxRuntime.jsx("header", { className: "header__container", children: jsxRuntime.jsxs("div", { className: "flex items-center justify-between w-full", children: [jsxRuntime.jsxs("div", { className: "flex items-center gap-4", children: [jsxRuntime.jsx(react.Button, { className: "sm:hidden", isIconOnly: true, variant: "light", startContent: jsxRuntime.jsx(IconComponent$1, { icon: "solar:hamburger-menu-linear" }), onPress: onMenuClick }), breadcrumbs && breadcrumbs.length > 0 && (jsxRuntime.jsx(BreadcrumbsComponent, { items: breadcrumbs }))] }), jsxRuntime.jsxs("div", { className: "flex items-center gap-4", children: [jsxRuntime.jsx(NotificationButton, { notificationCount: notificationCount }), jsxRuntime.jsx(ConfigMenu, { options: options, onLogout: onLogout, translations: translations })] })] }) }));
1115
- };
1116
- HeaderComponent.displayName = "Header";
1117
-
1118
- /******************************************************************************
1119
- Copyright (c) Microsoft Corporation.
1120
-
1121
- Permission to use, copy, modify, and/or distribute this software for any
1122
- purpose with or without fee is hereby granted.
1123
-
1124
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
1125
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
1126
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
1127
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
1128
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
1129
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1130
- PERFORMANCE OF THIS SOFTWARE.
1131
- ***************************************************************************** */
1132
- /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
1133
-
1134
-
1135
- var __assign = function() {
1136
- __assign = Object.assign || function __assign(t) {
1137
- for (var s, i = 1, n = arguments.length; i < n; i++) {
1138
- s = arguments[i];
1139
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
1140
- }
1141
- return t;
1142
- };
1143
- return __assign.apply(this, arguments);
1144
- };
1145
-
1146
- function __rest(s, e) {
1147
- var t = {};
1148
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
1149
- t[p] = s[p];
1150
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
1151
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
1152
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
1153
- t[p[i]] = s[p[i]];
1154
- }
1155
- return t;
1156
- }
1157
-
1158
- function __spreadArray(to, from, pack) {
1159
- for (var i = 0, l = from.length, ar; i < l; i++) {
1160
- if (ar || !(i in from)) {
1161
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
1162
- ar[i] = from[i];
1163
- }
1164
- }
1165
- return to.concat(ar || Array.prototype.slice.call(from));
1166
- }
1167
-
1168
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
1169
- var e = new Error(message);
1170
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
1171
- };
1172
-
1173
- var HolidayType;
1174
- (function (HolidayType) {
1175
- HolidayType["SingleDay"] = "singleDay";
1176
- HolidayType["DateRange"] = "dateRange";
1177
- })(HolidayType || (HolidayType = {}));
1178
-
1179
- /**
1180
- * Botón genérico basado en HeroUI siguiendo las reglas de diseño BeweOS.
1181
- *
1182
- * Reglas aplicadas:
1183
- * - Variant: Solid, Bordered, Light, Flat, Faded
1184
- * - Size: sm, md, lg
1185
- * - StartContent: On, Off
1186
- * - isLoading: On, Off
1187
- * - Radius: md (por defecto)
1188
- * - isIconOnly: True, False
1189
- */
1190
- var Button = function (_a) {
1191
- var _b = _a.color, color = _b === void 0 ? "primary" : _b, _c = _a.size, size = _c === void 0 ? "md" : _c, _d = _a.variant, variant = _d === void 0 ? "solid" : _d, _e = _a.radius, radius = _e === void 0 ? "sm" : _e, startContent = _a.startContent, endContent = _a.endContent, _f = _a.isLoading, isLoading = _f === void 0 ? false : _f, _g = _a.isIconOnly, isIconOnly = _g === void 0 ? false : _g, props = __rest(_a, ["color", "size", "variant", "radius", "startContent", "endContent", "isLoading", "isIconOnly"]);
1192
- return (jsxRuntime.jsx(react.Button, __assign({}, props, { color: color, size: size, variant: variant, radius: radius, startContent: startContent, endContent: endContent, isLoading: isLoading, isIconOnly: isIconOnly })));
1193
- };
1194
-
1195
- var sizeMap = {
1196
- sm: "16px",
1197
- md: "20px",
1198
- lg: "24px",
1199
- xl: "32px",
1200
- };
1201
- var IconComponent = function (_a) {
1202
- var _b;
1203
- var icon = _a.icon, _c = _a.size, size = _c === void 0 ? "md" : _c, className = _a.className, style = _a.style, color = _a.color, hFlip = _a.hFlip, vFlip = _a.vFlip, flip = _a.flip, rotate = _a.rotate, nativeProps = __rest(_a, ["icon", "size", "className", "style", "color", "hFlip", "vFlip", "flip", "rotate"]);
1204
- var iconSize = (_b = sizeMap[size]) !== null && _b !== void 0 ? _b : sizeMap.md;
1205
- return (jsxRuntime.jsx("span", __assign({}, nativeProps, { children: jsxRuntime.jsx(react$1.Icon, { icon: icon, width: iconSize, height: iconSize, className: className, style: style, color: color, hFlip: hFlip, vFlip: vFlip, flip: flip, rotate: rotate }) })));
1206
- };
1207
- ({
1208
- type: HolidayType.SingleDay});
1209
-
1210
- React.createContext({
1211
- mode: "light",
1212
- color: "blue",
1213
- // biome-ignore lint/suspicious/noEmptyBlockStatements: <explanation>
1214
- setMode: function () { },
1215
- // biome-ignore lint/suspicious/noEmptyBlockStatements: <explanation>
1216
- setColor: function () { },
1217
- });
1218
-
1219
- var themeColors = {
1220
- "blue-light": {
1221
- extend: "light",
1222
- colors: {
1223
- primary: {
1224
- "50": "#dfedfd",
1225
- "100": "#b3d4fa",
1226
- "200": "#86bbf7",
1227
- "300": "#59a1f4",
1228
- "400": "#2d88f1",
1229
- "500": "#006fee",
1230
- "600": "#005cc4",
1231
- "700": "#00489b",
1232
- "800": "#003571",
1233
- "900": "#002147",
1234
- foreground: "#fff",
1235
- DEFAULT: "#006fee",
1236
- },
1237
- secondary: {
1238
- "50": "#eee4f8",
1239
- "100": "#d7bfef",
1240
- "200": "#bf99e5",
1241
- "300": "#a773db",
1242
- "400": "#904ed2",
1243
- "500": "#7828c8",
1244
- "600": "#6321a5",
1245
- "700": "#4e1a82",
1246
- "800": "#39135f",
1247
- "900": "#240c3c",
1248
- foreground: "#fff",
1249
- DEFAULT: "#7828c8",
1250
- },
1251
- success: {
1252
- "50": "#e2f8ec",
1253
- "100": "#b9efd1",
1254
- "200": "#91e5b5",
1255
- "300": "#68dc9a",
1256
- "400": "#40d27f",
1257
- "500": "#17c964",
1258
- "600": "#13a653",
1259
- "700": "#0f8341",
1260
- "800": "#0b5f30",
1261
- "900": "#073c1e",
1262
- foreground: "#000",
1263
- DEFAULT: "#17c964",
1264
- },
1265
- warning: {
1266
- "50": "#fef4e4",
1267
- "100": "#fce4bd",
1268
- "200": "#fad497",
1269
- "300": "#f9c571",
1270
- "400": "#f7b54a",
1271
- "500": "#f5a524",
1272
- "600": "#ca881e",
1273
- "700": "#9f6b17",
1274
- "800": "#744e11",
1275
- "900": "#4a320b",
1276
- foreground: "#000",
1277
- DEFAULT: "#f5a524",
1278
- },
1279
- danger: {
1280
- "50": "#fee1eb",
1281
- "100": "#fbb8cf",
1282
- "200": "#f98eb3",
1283
- "300": "#f76598",
1284
- "400": "#f53b7c",
1285
- "500": "#f31260",
1286
- "600": "#c80f4f",
1287
- "700": "#9e0c3e",
1288
- "800": "#73092e",
1289
- "900": "#49051d",
1290
- foreground: "#000",
1291
- DEFAULT: "#f31260",
1292
- },
1293
- focus: "#006FEE",
1294
- overlay: "#000000",
1295
- },
1296
- },
1297
- "blue-dark": {
1298
- extend: "dark",
1299
- colors: {
1300
- primary: {
1301
- "50": "#002147",
1302
- "100": "#003571",
1303
- "200": "#00489b",
1304
- "300": "#005cc4",
1305
- "400": "#006fee",
1306
- "500": "#2d88f1",
1307
- "600": "#59a1f4",
1308
- "700": "#86bbf7",
1309
- "800": "#b3d4fa",
1310
- "900": "#dfedfd",
1311
- foreground: "#fff",
1312
- DEFAULT: "#006fee",
1313
- },
1314
- secondary: {
1315
- "50": "#240c3c",
1316
- "100": "#39135f",
1317
- "200": "#4e1a82",
1318
- "300": "#6321a5",
1319
- "400": "#7828c8",
1320
- "500": "#904ed2",
1321
- "600": "#a773db",
1322
- "700": "#bf99e5",
1323
- "800": "#d7bfef",
1324
- "900": "#eee4f8",
1325
- foreground: "#fff",
1326
- DEFAULT: "#7828c8",
1327
- },
1328
- success: {
1329
- "50": "#073c1e",
1330
- "100": "#0b5f30",
1331
- "200": "#0f8341",
1332
- "300": "#13a653",
1333
- "400": "#17c964",
1334
- "500": "#40d27f",
1335
- "600": "#68dc9a",
1336
- "700": "#91e5b5",
1337
- "800": "#b9efd1",
1338
- "900": "#e2f8ec",
1339
- foreground: "#000",
1340
- DEFAULT: "#17c964",
1341
- },
1342
- warning: {
1343
- "50": "#4a320b",
1344
- "100": "#744e11",
1345
- "200": "#9f6b17",
1346
- "300": "#ca881e",
1347
- "400": "#f5a524",
1348
- "500": "#f7b54a",
1349
- "600": "#f9c571",
1350
- "700": "#fad497",
1351
- "800": "#fce4bd",
1352
- "900": "#fef4e4",
1353
- foreground: "#000",
1354
- DEFAULT: "#f5a524",
1355
- },
1356
- danger: {
1357
- "50": "#49051d",
1358
- "100": "#73092e",
1359
- "200": "#9e0c3e",
1360
- "300": "#c80f4f",
1361
- "400": "#f31260",
1362
- "500": "#f53b7c",
1363
- "600": "#f76598",
1364
- "700": "#f98eb3",
1365
- "800": "#fbb8cf",
1366
- "900": "#fee1eb",
1367
- foreground: "#000",
1368
- DEFAULT: "#f31260",
1369
- },
1370
- focus: "#006FEE",
1371
- overlay: "#ffffff",
1372
- },
1373
- },
1374
- "purple-light": {
1375
- extend: "light",
1376
- colors: {
1377
- primary: {
1378
- "50": "#eee4f8",
1379
- "100": "#d7bfef",
1380
- "200": "#bf99e5",
1381
- "300": "#a773db",
1382
- "400": "#904ed2",
1383
- "500": "#7828c8",
1384
- "600": "#6321a5",
1385
- "700": "#4e1a82",
1386
- "800": "#39135f",
1387
- "900": "#240c3c",
1388
- foreground: "#fff",
1389
- DEFAULT: "#7828c8",
1390
- },
1391
- secondary: {
1392
- "50": "#dfedfd",
1393
- "100": "#b3d4fa",
1394
- "200": "#86bbf7",
1395
- "300": "#59a1f4",
1396
- "400": "#2d88f1",
1397
- "500": "#006fee",
1398
- "600": "#005cc4",
1399
- "700": "#00489b",
1400
- "800": "#003571",
1401
- "900": "#002147",
1402
- foreground: "#fff",
1403
- DEFAULT: "#006fee",
1404
- },
1405
- focus: "#7828c8",
1406
- overlay: "#000000",
1407
- },
1408
- },
1409
- "purple-dark": {
1410
- extend: "dark",
1411
- colors: {
1412
- primary: {
1413
- "50": "#2c193f",
1414
- "100": "#462764",
1415
- "200": "#603689",
1416
- "300": "#7944ae",
1417
- "400": "#9353d3",
1418
- "500": "#a671db",
1419
- "600": "#b98fe2",
1420
- "700": "#ccadea",
1421
- "800": "#dfcbf2",
1422
- "900": "#f2eafa",
1423
- foreground: "#fff",
1424
- DEFAULT: "#9353d3",
1425
- },
1426
- secondary: {
1427
- "50": "#1e254d",
1428
- "100": "#2f3a79",
1429
- "200": "#404fa6",
1430
- "300": "#5265d2",
1431
- "400": "#637aff",
1432
- "500": "#7e91ff",
1433
- "600": "#9aa9ff",
1434
- "700": "#b5c0ff",
1435
- "800": "#d0d7ff",
1436
- "900": "#eceeff",
1437
- foreground: "#000",
1438
- DEFAULT: "#637aff",
1439
- },
1440
- focus: "#9353d3",
1441
- },
1442
- },
1443
- "yellow-light": {
1444
- extend: "light",
1445
- colors: {
1446
- primary: {
1447
- "50": "#fffbe6",
1448
- "100": "#FFFACD",
1449
- "200": "#FFF39B",
1450
- "300": "#FFEB69",
1451
- "400": "#FFE243",
1452
- "500": "#FFD505",
1453
- "600": "#DBB303",
1454
- "700": "#B79202",
1455
- "800": "#937301",
1456
- "900": "#7A5D00",
1457
- foreground: "#000",
1458
- DEFAULT: "#FFD505",
1459
- },
1460
- secondary: {
1461
- "50": "#F3F7FD",
1462
- "100": "#D1DFFB",
1463
- "200": "#A5BEF7",
1464
- "300": "#7494E7",
1465
- "400": "#4E6FCF",
1466
- "500": "#1E40AF",
1467
- "600": "#153096",
1468
- "700": "#0F237D",
1469
- "800": "#091865",
1470
- "900": "#051053",
1471
- foreground: "#fff",
1472
- DEFAULT: "#1E40AF",
1473
- },
1474
- focus: "#FFD505",
1475
- overlay: "#000000",
1476
- },
1477
- },
1478
- "yellow-dark": {
1479
- extend: "dark",
1480
- colors: {
1481
- primary: {
1482
- "50": "#7A5D00",
1483
- "100": "#937301",
1484
- "200": "#B79202",
1485
- "300": "#DBB303",
1486
- "400": "#FFD505",
1487
- "500": "#FFE243",
1488
- "600": "#FFEB69",
1489
- "700": "#FFF39B",
1490
- "800": "#FFFACD",
1491
- "900": "#fffbe6",
1492
- foreground: "#000",
1493
- DEFAULT: "#FFD505",
1494
- },
1495
- secondary: {
1496
- 50: "#e1efff",
1497
- 100: "#b2d0ff",
1498
- 200: "#83b1fc",
1499
- 300: "#5292f8",
1500
- 400: "#2473f5",
1501
- 500: "#0a5adb",
1502
- 600: "#0246ac",
1503
- 700: "#00327c",
1504
- 800: "#001e4d",
1505
- 900: "#000a1f",
1506
- foreground: "#fff",
1507
- DEFAULT: "#0a5adb",
1508
- },
1509
- focus: "#FFD505",
1510
- overlay: "#ffffff",
1511
- },
1512
- },
1513
- "coral-light": {
1514
- extend: "light",
1515
- colors: {
1516
- primary: {
1517
- "50": "#ffe9e9",
1518
- "100": "#ffcaca",
1519
- "200": "#ffabab",
1520
- "300": "#ff8d8d",
1521
- "400": "#ff6e6e",
1522
- "500": "#ff4f4f",
1523
- "600": "#d24141",
1524
- "700": "#a63333",
1525
- "800": "#792626",
1526
- "900": "#4d1818",
1527
- foreground: "#000",
1528
- DEFAULT: "#ff4f4f",
1529
- },
1530
- focus: "#ff4f4f",
1531
- },
1532
- },
1533
- "coral-dark": {
1534
- extend: "dark",
1535
- colors: {
1536
- primary: {
1537
- "50": "#4d1818",
1538
- "100": "#792626",
1539
- "200": "#a63333",
1540
- "300": "#d24141",
1541
- "400": "#ff4f4f",
1542
- "500": "#ff6e6e",
1543
- "600": "#ff8d8d",
1544
- "700": "#ffabab",
1545
- "800": "#ffcaca",
1546
- "900": "#ffe9e9",
1547
- foreground: "#000",
1548
- DEFAULT: "#ff4f4f",
1549
- },
1550
- focus: "#ff4f4f",
1551
- },
1552
- },
1553
- "green-light": {
1554
- extend: "light",
1555
- colors: {
1556
- primary: {
1557
- 50: "#EFFFEF",
1558
- 100: "#CFFCD1",
1559
- 200: "#A0F9AC",
1560
- 300: "#6FEE8D",
1561
- 400: "#49DE7B",
1562
- 500: "#16C964",
1563
- 600: "#10AC64",
1564
- 700: "#0B905F",
1565
- 800: "#077457",
1566
- 900: "#046051",
1567
- foreground: "#000",
1568
- DEFAULT: "#16C964",
1569
- },
1570
- secondary: {
1571
- "50": "#e3eaff",
1572
- "100": "#D7DFFE",
1573
- "200": "#AFBFFE",
1574
- "300": "#889DFD",
1575
- "400": "#6A82FB",
1576
- "500": "#3956F9",
1577
- "600": "#2941D6",
1578
- "700": "#1C2EB3",
1579
- "800": "#121F90",
1580
- "900": "#0A1477",
1581
- foreground: "#fff",
1582
- DEFAULT: "#3956F9",
1583
- },
1584
- success: {
1585
- "50": "#e7fde3",
1586
- "100": "#E8FCD3",
1587
- "200": "#CBFAA8",
1588
- "300": "#A4F17B",
1589
- "400": "#7EE358",
1590
- "500": "#49D127",
1591
- "600": "#2FB31C",
1592
- "700": "#1A9613",
1593
- "800": "#0C790E",
1594
- "900": "#076410",
1595
- foreground: "#000",
1596
- DEFAULT: "#49D127",
1597
- },
1598
- warning: {
1599
- "50": "#fff9da",
1600
- "100": "#FFF7CC",
1601
- "200": "#FFEE99",
1602
- "300": "#FFE266",
1603
- "400": "#FFD63F",
1604
- "500": "#FFC300",
1605
- "600": "#DBA200",
1606
- "700": "#B78300",
1607
- "800": "#936600",
1608
- "900": "#7A5100",
1609
- foreground: "#000",
1610
- DEFAULT: "#FFC300",
1611
- },
1612
- danger: {
1613
- "50": "#ffe2e5",
1614
- "100": "#FFE3D8",
1615
- "200": "#FFC1B2",
1616
- "300": "#FF988B",
1617
- "400": "#FF726F",
1618
- "500": "#FF3F4C",
1619
- "600": "#DB2E49",
1620
- "700": "#B71F45",
1621
- "800": "#93143F",
1622
- "900": "#7A0C3B",
1623
- foreground: "#000",
1624
- DEFAULT: "#FF3F4C",
1625
- },
1626
- focus: "#66cc8a",
1627
- overlay: "#000000",
1628
- },
1629
- },
1630
- "green-dark": {
1631
- extend: "dark",
1632
- colors: {
1633
- primary: {
1634
- 50: "#EFFFEF",
1635
- 100: "#CFFCD1",
1636
- 200: "#A0F9AC",
1637
- 300: "#6FEE8D",
1638
- 400: "#49DE7B",
1639
- 500: "#16C964",
1640
- 600: "#10AC64",
1641
- 700: "#0B905F",
1642
- 800: "#077457",
1643
- 900: "#046051",
1644
- foreground: "#000",
1645
- DEFAULT: "#16C964",
1646
- },
1647
- secondary: {
1648
- "50": "#e3eaff",
1649
- "100": "#D7DFFE",
1650
- "200": "#AFBFFE",
1651
- "300": "#889DFD",
1652
- "400": "#6A82FB",
1653
- "500": "#3956F9",
1654
- "600": "#2941D6",
1655
- "700": "#1C2EB3",
1656
- "800": "#121F90",
1657
- "900": "#0A1477",
1658
- foreground: "#fff",
1659
- DEFAULT: "#3956F9",
1660
- },
1661
- success: {
1662
- "50": "#e7fde3",
1663
- "100": "#E8FCD3",
1664
- "200": "#CBFAA8",
1665
- "300": "#A4F17B",
1666
- "400": "#7EE358",
1667
- "500": "#49D127",
1668
- "600": "#2FB31C",
1669
- "700": "#1A9613",
1670
- "800": "#0C790E",
1671
- "900": "#076410",
1672
- foreground: "#000",
1673
- DEFAULT: "#49D127",
1674
- },
1675
- warning: {
1676
- "50": "#fff9da",
1677
- "100": "#FFF7CC",
1678
- "200": "#FFEE99",
1679
- "300": "#FFE266",
1680
- "400": "#FFD63F",
1681
- "500": "#FFC300",
1682
- "600": "#DBA200",
1683
- "700": "#B78300",
1684
- "800": "#936600",
1685
- "900": "#7A5100",
1686
- foreground: "#000",
1687
- DEFAULT: "#FFC300",
1688
- },
1689
- danger: {
1690
- "50": "#ffe2e5",
1691
- "100": "#FFE3D8",
1692
- "200": "#FFC1B2",
1693
- "300": "#FF988B",
1694
- "400": "#FF726F",
1695
- "500": "#FF3F4C",
1696
- "600": "#DB2E49",
1697
- "700": "#B71F45",
1698
- "800": "#93143F",
1699
- "900": "#7A0C3B",
1700
- foreground: "#fff",
1701
- DEFAULT: "#FF3F4C",
1702
- },
1703
- focus: "#66cc8a",
1704
- overlay: "#ffffff",
1705
- },
1706
- },
1707
- };
1708
-
1709
- function normalizeClass$1(value) {
1710
- if (typeof value === "string") {
1711
- return value || undefined;
1712
- }
1713
- if (Array.isArray(value)) {
1714
- return value.filter(Boolean).join(" ") || undefined;
1715
- }
1716
- return undefined;
1717
- }
1718
- var getSectionClasses$1 = function (isCollapsed, sectionClassesProp) {
1719
- if (sectionClassesProp === void 0) { sectionClassesProp = {}; }
1720
- return (__assign(__assign({}, Object.fromEntries(Object.entries(sectionClassesProp).map(function (_a) {
1721
- var k = _a[0], v = _a[1];
1722
- return [k, normalizeClass$1(v)];
1723
- }))), { base: normalizeClass$1(react.cn(sectionClassesProp === null || sectionClassesProp === void 0 ? void 0 : sectionClassesProp.base, "w-full", {
1724
- "p-0 max-w-[44px]": isCollapsed,
1725
- })), group: normalizeClass$1(react.cn(sectionClassesProp === null || sectionClassesProp === void 0 ? void 0 : sectionClassesProp.group, {
1726
- "flex flex-col gap-1": isCollapsed,
1727
- })), heading: normalizeClass$1(react.cn(sectionClassesProp === null || sectionClassesProp === void 0 ? void 0 : sectionClassesProp.heading, {
1728
- hidden: isCollapsed,
1729
- })) }));
1730
- };
1731
- var getItemClasses$1 = function (isCollapsed, itemClassesProp) {
1732
- if (itemClassesProp === void 0) { itemClassesProp = {}; }
1733
- return (__assign(__assign({}, Object.fromEntries(Object.entries(itemClassesProp).map(function (_a) {
1734
- var k = _a[0], v = _a[1];
1735
- return [k, normalizeClass$1(v)];
1736
- }))), { base: normalizeClass$1(react.cn(itemClassesProp === null || itemClassesProp === void 0 ? void 0 : itemClassesProp.base, {
1737
- "w-11 h-11 gap-0 p-0": isCollapsed,
1738
- })) }));
1739
- };
1740
-
1741
- var EnumMenuNavListItem$1;
1742
- (function (EnumMenuNavListItem) {
1743
- EnumMenuNavListItem["Nest"] = "nest";
1744
- })(EnumMenuNavListItem$1 || (EnumMenuNavListItem$1 = {}));
1745
-
1746
- /**
1747
- * @component MenuNavList
1748
- * @description A versatile navigation list component that can be displayed in an expanded or collapsed state.
1749
- * It supports nested items, sections, and tooltips for items in the collapsed state.
1750
- *
1751
- * @param {MenuNavListProps} props - Props for configuring the component.
1752
- * @param {MenuNavListItem[]} props.items - Array of items to display in the list.
1753
- * @param {boolean} [props.isCollapsed] - If `true`, the menu is displayed in its collapsed state (icons only).
1754
- * @param {React.Key} [props.defaultSelectedKey] - The key of the default selected item.
1755
- * @param {(key: React.Key) => void} [props.onSelect] - Callback executed when an item is selected.
1756
- * @param {boolean} [props.hideEndContent] - If `true`, hides the end content of the items.
1757
- * @param {object} [props.sectionClasses] - CSS classes to customize the sections.
1758
- * @param {object} [props.itemClasses] - CSS classes to customize the items.
1759
- * @param {string} [props.iconClassName] - CSS class for the icons.
1760
- * @param {object} [props.classNames] - CSS classes to customize the Listbox component.
1761
- * @param {string} [props.className] - CSS class for the main container.
1762
- *
1763
- * @forwardRef
1764
- */
1765
- var MenuNavList$1 = React.forwardRef(function (_a, ref) {
1766
- var items = _a.items, isCollapsed = _a.isCollapsed, defaultSelectedKey = _a.defaultSelectedKey; _a.onSelect; var hideEndContent = _a.hideEndContent, _b = _a.sectionClasses, sectionClassesProp = _b === void 0 ? {} : _b, _c = _a.itemClasses, itemClassesProp = _c === void 0 ? {} : _c, iconClassName = _a.iconClassName, classNames = _a.classNames, className = _a.className, props = __rest(_a, ["items", "isCollapsed", "defaultSelectedKey", "onSelect", "hideEndContent", "sectionClasses", "itemClasses", "iconClassName", "classNames", "className"]);
1767
- var _d = React.useState(defaultSelectedKey), selected = _d[0], setSelected = _d[1];
1768
- // Component styles
1769
- var sectionClasses = getSectionClasses$1(isCollapsed, sectionClassesProp);
1770
- var itemClasses = getItemClasses$1(isCollapsed, itemClassesProp);
1771
- // Handles the click event on an item, updating the selection state.
1772
- // biome-ignore lint/correctness/useExhaustiveDependencies: <explanation>
1773
- var handleItemPress = React.useCallback(function (item, parentKey) {
1774
- var keySelected = typeof parentKey === "string" ? parentKey : item.key;
1775
- setSelected(keySelected);
1776
- // Force blur to remove hover state after click.
1777
- if (document.activeElement instanceof HTMLElement) {
1778
- document.activeElement.blur();
1779
- }
1780
- }, [setSelected]);
1781
- // Renders the item displayed inside the Popover when the menu is collapsed.
1782
- var renderCompactItem = React.useCallback(function (item, parentKey) {
1783
- var _a, _b;
1784
- return (React.createElement(react.ListboxItem, __assign({}, item, { key: item.key, endContent: (_a = item.endContent) !== null && _a !== void 0 ? _a : null, startContent: item.icon ? (jsxRuntime.jsx(IconComponent, { className: react.cn("text-default-500", "group-data-[selected=true]:text-default-600", iconClassName), icon: item.icon, size: "lg" })) : (((_b = item.startContent) !== null && _b !== void 0 ? _b : null)), textValue: item.title, title: item.title, className: "data-[hover=true]:text-default-600", onPress: function () { return handleItemPress(item, parentKey); } })));
1785
- }, [handleItemPress, iconClassName]);
1786
- // Renders a nested item, i.e., an item that has sub-items.
1787
- // biome-ignore lint/correctness/useExhaustiveDependencies: <explanation>
1788
- var renderNestItem = React.useCallback(function (item) {
1789
- var _a, _b, _c, _d, _e, _f, _g;
1790
- var isNestType = item.items &&
1791
- ((_a = item.items) === null || _a === void 0 ? void 0 : _a.length) > 0 &&
1792
- (item === null || item === void 0 ? void 0 : item.type) === EnumMenuNavListItem$1.Nest;
1793
- if (isNestType) {
1794
- item.href = undefined;
1795
- }
1796
- return (React.createElement(react.ListboxItem, __assign({}, item, { key: item.key, classNames: {
1797
- base: react.cn({
1798
- "h-auto p-0": !isCollapsed && isNestType,
1799
- }, {
1800
- "inline-block w-11": isCollapsed && isNestType,
1801
- }, {
1802
- "data-[selected=true]:bg-primary-100 h-11 justify-center items-center flex": isCollapsed && isNestType,
1803
- }, "rounded-large"),
1804
- }, endContent: isCollapsed || isNestType || hideEndContent
1805
- ? null
1806
- : ((_b = item.endContent) !== null && _b !== void 0 ? _b : null), startContent: isCollapsed || isNestType ? null : item.icon ? (jsxRuntime.jsx(IconComponent, { className: react.cn("text-default-500 group-data-[selected=true]:text-foreground", iconClassName), icon: item.icon, size: "lg" })) : (((_c = item.startContent) !== null && _c !== void 0 ? _c : null)), title: isCollapsed || isNestType ? null : item.title }),
1807
- isCollapsed && isNestType ? (jsxRuntime.jsxs(react.Popover, { placement: "right", offset: 10, children: [jsxRuntime.jsx(react.PopoverTrigger, { children: jsxRuntime.jsx("div", { className: "flex w-full items-center justify-center", children: jsxRuntime.jsx(react.Tooltip, { content: item.title, placement: "right", classNames: {
1808
- base: "text-default-500",
1809
- }, children: jsxRuntime.jsx("div", { className: "flex w-full items-center justify-center", children: item.icon ? (jsxRuntime.jsx(IconComponent, { className: react.cn("text-default-500 group-data-[selected=true]:text-default-600", iconClassName), icon: item.icon, size: "lg" })) : (((_d = item.startContent) !== null && _d !== void 0 ? _d : null)) }) }) }) }), jsxRuntime.jsx(react.PopoverContent, { className: "p-0", children: jsxRuntime.jsxs("div", { className: "min-w-[200px] rounded-large p-2", children: [jsxRuntime.jsx("div", { className: "p-2 text-small font-semibold text-default-500", children: item.title }), jsxRuntime.jsx(react.Listbox, { className: "mt-0.5 text-default-500", "aria-label": "Nested menu items", items: item.items, variant: "flat", children: item.items && ((_e = item.items) === null || _e === void 0 ? void 0 : _e.length) > 0
1810
- ? item.items.map(function (child) {
1811
- return renderCompactItem(child, item.key);
1812
- })
1813
- : renderCompactItem(item) })] }) })] })) : null,
1814
- !isCollapsed && isNestType ? (jsxRuntime.jsx(react.Accordion, { className: "p-0", children: jsxRuntime.jsx(react.AccordionItem, { "aria-label": item.title, classNames: {
1815
- heading: "pr-3 group-data-[selected=true]:bg-primary-100 rounded-large",
1816
- trigger: "p-0",
1817
- content: "py-0 pl-4",
1818
- }, title: item.icon ? (jsxRuntime.jsxs("div", { className: "flex h-11 items-center gap-2 px-3 py-1.5", children: [jsxRuntime.jsx(IconComponent, { className: react.cn("text-default-500 group-data-[selected=true]:text-default-600", iconClassName), icon: item.icon, size: "lg" }), jsxRuntime.jsx("span", { className: "text-small font-medium text-default-500 group-data-[selected=true]:text-default-600", children: item.title })] })) : (((_f = item.startContent) !== null && _f !== void 0 ? _f : null)), children: item.items && ((_g = item.items) === null || _g === void 0 ? void 0 : _g.length) > 0 ? (jsxRuntime.jsx(react.Listbox, { className: "mt-0.5 text-default-500", classNames: {
1819
- list: react.cn("border-l border-default-200 pl-4"),
1820
- }, items: item.items, variant: "flat", children: item.items.map(function (child) { return renderItem(child, item.key); }) })) : (renderItem(item)) }, item.key) })) : null));
1821
- }, [isCollapsed, hideEndContent, iconClassName, items, selected]);
1822
- // Renders a simple item (without children) in the navigation list.
1823
- // biome-ignore lint/correctness/useExhaustiveDependencies: <explanation>
1824
- var renderItem = React.useCallback(function (item, parentKey) {
1825
- var _a, _b, _c, _d;
1826
- var isNestType = item.items &&
1827
- ((_a = item.items) === null || _a === void 0 ? void 0 : _a.length) > 0 &&
1828
- (item === null || item === void 0 ? void 0 : item.type) === EnumMenuNavListItem$1.Nest;
1829
- if (isNestType) {
1830
- return renderNestItem(item);
1831
- }
1832
- var isItemSelected = selected === item.key;
1833
- return (React.createElement(react.ListboxItem, __assign({}, item, { key: item.key, endContent: isCollapsed || hideEndContent ? null : ((_b = item.endContent) !== null && _b !== void 0 ? _b : null), startContent: isCollapsed ? null : item.icon ? (jsxRuntime.jsx(IconComponent, { className: react.cn("text-default-500", "group-data-[selected=true]:text-default-600", iconClassName), icon: item.icon, size: "lg" })) : (((_c = item.startContent) !== null && _c !== void 0 ? _c : null)), textValue: item.title, title: isCollapsed ? null : item.title, onPress: function () { return handleItemPress(item, parentKey); }, "aria-selected": isItemSelected, "aria-label": item.title || "Menu item ".concat(item.key) }), isCollapsed ? (jsxRuntime.jsx(react.Tooltip, { content: item.title, placement: "right", closeDelay: 200, shouldCloseOnBlur: false, classNames: {
1834
- base: "text-default-500",
1835
- }, children: jsxRuntime.jsx("div", { className: "flex w-full items-center justify-center", "aria-hidden": "true", children: item.icon ? (jsxRuntime.jsx(IconComponent, { className: react.cn("text-default-500", "group-data-[selected=true]:text-default-600", iconClassName), icon: item.icon, size: "lg" })) : (((_d = item.startContent) !== null && _d !== void 0 ? _d : null)) }) })) : null));
1836
- },
1837
- // eslint-disable-next-line react-hooks/exhaustive-deps
1838
- [isCollapsed, hideEndContent, iconClassName, itemClasses === null || itemClasses === void 0 ? void 0 : itemClasses.base]);
1839
- return (jsxRuntime.jsx(react.Listbox, __assign({ ref: ref, hideSelectedIcon: true, as: "nav", className: react.cn("list-none", className), classNames: __assign(__assign({}, classNames), { list: react.cn("items-center", classNames === null || classNames === void 0 ? void 0 : classNames.list) }), color: "default", itemClasses: __assign(__assign({}, itemClasses), { base: react.cn("px-3 min-h-11 rounded-large h-[44px] data-[selected=true]:bg-primary-100", itemClasses === null || itemClasses === void 0 ? void 0 : itemClasses.base), title: react.cn("text-small font-medium text-default-500 group-data-[selected=true]:text-default-600 ", itemClasses === null || itemClasses === void 0 ? void 0 : itemClasses.title) }), items: items, selectedKeys: [selected], selectionMode: "single", variant: "flat" }, props, { children: function (item) {
1840
- var _a, _b;
1841
- return item.items &&
1842
- ((_a = item.items) === null || _a === void 0 ? void 0 : _a.length) > 0 &&
1843
- (item === null || item === void 0 ? void 0 : item.type) === EnumMenuNavListItem$1.Nest ? (renderNestItem(item)) : item.items && ((_b = item.items) === null || _b === void 0 ? void 0 : _b.length) > 0 ? (jsxRuntime.jsx(react.ListboxSection, { classNames: sectionClasses, showDivider: isCollapsed, title: item.title, children: item.items.map(renderItem) }, item.key)) : (renderItem(item));
1844
- } }), isCollapsed ? "compact" : "default"));
1845
- });
1846
- MenuNavList$1.displayName = "MenuNavList";
1847
-
1848
- /**
1849
- * Sidebar menu component for navigation and user actions.
1850
- * @param commerceInfo - Object with logo and name of the company.
1851
- * @param userInfo - Object with user avatar, name, and email.
1852
- * @param helpButton - Help button configuration.
1853
- * @param upgradeCard - Optional upgrade card configuration.
1854
- * @param isOpenSidebar - Controls sidebar visibility.
1855
- * @param onOpenSidebarChange - Callback to open/close sidebar.
1856
- */
1857
- React.memo(function Menu(_a) {
1858
- var commerceInfo = _a.commerceInfo, userInfo = _a.userInfo, helpButton = _a.helpButton, upgradeCard = _a.upgradeCard, isOpenSidebar = _a.isOpenSidebar, onOpenSidebarChange = _a.onOpenSidebarChange, menuItems = _a.menuItems;
1859
- // State to control menu collapse on desktop devices
1860
- var _b = React.useState(false), isCollapsed = _b[0], setIsCollapsed = _b[1];
1861
- // Memoized handlers for performance
1862
- var handleSidebarClose = React.useCallback(function () {
1863
- onOpenSidebarChange === null || onOpenSidebarChange === void 0 ? void 0 : onOpenSidebarChange(false);
1864
- }, [onOpenSidebarChange]);
1865
- var handleCollapseToggle = React.useCallback(function () {
1866
- setIsCollapsed(function (prev) { return !prev; });
1867
- }, []);
1868
- var handleUpgradeClick = React.useCallback(function () {
1869
- if (upgradeCard) {
1870
- window.open(upgradeCard.buttonLink, "_blank");
1871
- }
1872
- }, [upgradeCard]);
1873
- var handleHelpClick = React.useCallback(function () {
1874
- window.open(helpButton.redirect, "_blank");
1875
- }, [helpButton]);
1876
- if (!isOpenSidebar) {
1877
- return null;
1878
- }
1879
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("button", { type: "button", "aria-label": "Close sidebar", className: "fixed inset-0 bg-black bg-opacity-40 z-40 xs:block sm:hidden", onClick: handleSidebarClose, style: { border: "none", padding: 0, margin: 0 } }), jsxRuntime.jsx("div", { className: "container__menu ".concat(isCollapsed
1880
- ? "container__menu--collapsed"
1881
- : "container__menu--expanded"), children: jsxRuntime.jsxs("div", { className: "content__menu", children: [jsxRuntime.jsxs("div", { className: "content__menu--header", style: { flexDirection: isCollapsed ? "column-reverse" : "row" }, children: [jsxRuntime.jsxs("div", { className: "flex flex-row items-center justify-center ".concat(isCollapsed ? "gap-0" : "gap-2"), children: [jsxRuntime.jsx("div", { className: "flex h-8 w-8 items-center justify-center rounded-full bg-foreground", children: jsxRuntime.jsx("img", { src: commerceInfo.logo, alt: "Logo of ".concat(commerceInfo.name) }) }), jsxRuntime.jsx("span", { className: "collapsible-item text-small font-bold ", children: commerceInfo.name })] }), jsxRuntime.jsxs("div", { className: "flex items-center", children: [jsxRuntime.jsx(IconComponent, { icon: "material-symbols-light:close", size: "lg", className: "cursor-pointer block sm:hidden", onClick: handleSidebarClose }), jsxRuntime.jsx(IconComponent, { icon: isCollapsed
1882
- ? "solar:alt-arrow-right-outline"
1883
- : "solar:alt-arrow-left-outline", size: "lg", className: "hidden sm:block cursor-pointer", onClick: handleCollapseToggle })] })] }), jsxRuntime.jsx(react.Spacer, { y: 6 }), jsxRuntime.jsxs("div", { className: "content__menu--user ".concat(isCollapsed ? "gap-0" : "gap-3"), children: [jsxRuntime.jsx(react.Avatar, { size: "md", src: userInfo.avatar, color: userInfo.avatar === "" ? "warning" : "default", name: userInfo.name }), jsxRuntime.jsxs("div", { className: "collapsible-item flex flex-col", children: [jsxRuntime.jsx("p", { className: "text-small font-medium text-default-900", children: userInfo.name }), jsxRuntime.jsx("p", { className: "text-tiny text-default-400", children: userInfo.role })] })] }), jsxRuntime.jsx("div", { className: "".concat(!isCollapsed ? "flex-1" : "h-full", " min-h-0 py-6"), children: jsxRuntime.jsx("div", { className: "h-full overflow-y-auto pr-6 -mr-6 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]", children: jsxRuntime.jsx(MenuNavList$1, { defaultSelectedKey: menuItems.selectedKey, items: menuItems.items, isCollapsed: isCollapsed }) }) }), upgradeCard && (jsxRuntime.jsxs("div", { className: "collapsible-item relative", children: [jsxRuntime.jsxs(react.Card, { className: "border-none overflow-visible shadow-none", shadow: "sm", children: [jsxRuntime.jsxs(react.CardBody, { className: "items-center py-5 text-center gap-1", children: [jsxRuntime.jsx("h3", { className: "text-medium font-medium text-default-900", children: upgradeCard.title }), jsxRuntime.jsx("p", { className: "text-small text-default-500 pb-3 whitespace-normal", children: upgradeCard.description })] }), jsxRuntime.jsx(react.CardFooter, { className: "absolute justify-center", style: { bottom: "-30px" }, children: jsxRuntime.jsx(react.Button, { className: "px-10 shadow-md", color: "primary", radius: "full", variant: "shadow", onPress: handleUpgradeClick, children: upgradeCard.buttonText }) })] }), jsxRuntime.jsx(react.Spacer, { y: 9 })] })), jsxRuntime.jsx("div", { className: "mt-auto flex flex-col justify-center items-center", children: jsxRuntime.jsx(react.Button, { fullWidth: true, className: " text-default-500 data-[hover=true]:text-default-600", startContent: jsxRuntime.jsx(IconComponent, { className: "text-default-500", icon: "solar:info-circle-line-duotone", size: "md" }), variant: "light", onPress: handleHelpClick, isIconOnly: isCollapsed, children: !isCollapsed && (jsxRuntime.jsx("span", { className: "collapsible-item", children: helpButton.title })) }) })] }) })] }));
1884
- });
1885
-
1886
- var StepIndicator$1 = function (_a) {
1887
- var currentStep = _a.currentStep, totalSteps = _a.totalSteps, _b = _a.color, color = _b === void 0 ? "primary" : _b, _c = _a.showStepText, showStepText = _c === void 0 ? true : _c, stepTextFormatter = _a.stepTextFormatter, className = _a.className, props = __rest(_a, ["currentStep", "totalSteps", "color", "showStepText", "stepTextFormatter", "className"]);
1888
- var progressPercentage = Math.min((currentStep / totalSteps) * 100, 100);
1889
- var colorClasses = {
1890
- primary: "bg-primary",
1891
- secondary: "bg-secondary",
1892
- success: "bg-success",
1893
- warning: "bg-warning",
1894
- danger: "bg-danger",
1895
- };
1896
- var defaultStepText = function (current, total) {
1897
- return "Step ".concat(current, " of ").concat(total);
1898
- };
1899
- var stepText = stepTextFormatter
1900
- ? stepTextFormatter(currentStep, totalSteps)
1901
- : defaultStepText(currentStep, totalSteps);
1902
- return (jsxRuntime.jsxs("div", __assign({ className: react.cn("w-full", className) }, props, { children: [showStepText && (jsxRuntime.jsx("div", { className: "text-center text-sm font-medium text-default-400 mb-3", children: stepText })), jsxRuntime.jsx("div", { className: "w-full bg-content2 rounded-full h-2 overflow-hidden", children: jsxRuntime.jsx("div", { className: react.cn("h-full transition-all duration-300 ease-out rounded-full", colorClasses[color]), style: { width: "".concat(progressPercentage, "%") } }) })] })));
1903
- };
1904
-
1905
- /*
1906
- * Copyright 2020 Adobe. All rights reserved.
1907
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
1908
- * you may not use this file except in compliance with the License. You may obtain a copy
1909
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
1910
- *
1911
- * Unless required by applicable law or agreed to in writing, software distributed under
1912
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
1913
- * OF ANY KIND, either express or implied. See the License for the specific language
1914
- * governing permissions and limitations under the License.
1915
- */
1916
- function $458b0a5536c1a7cf$export$40bfa8c7b0832715$1(value, defaultValue, onChange) {
1917
- let [stateValue, setStateValue] = (React.useState)(value || defaultValue);
1918
- let isControlledRef = (React.useRef)(value !== undefined);
1919
- let isControlled = value !== undefined;
1920
- (React.useEffect)(()=>{
1921
- let wasControlled = isControlledRef.current;
1922
- if (wasControlled !== isControlled && process.env.NODE_ENV !== 'production') console.warn(`WARN: A component changed from ${wasControlled ? 'controlled' : 'uncontrolled'} to ${isControlled ? 'controlled' : 'uncontrolled'}.`);
1923
- isControlledRef.current = isControlled;
1924
- }, [
1925
- isControlled
1926
- ]);
1927
- let currentValue = isControlled ? value : stateValue;
1928
- let setValue = (React.useCallback)((value, ...args)=>{
1929
- let onChangeCaller = (value, ...onChangeArgs)=>{
1930
- if (onChange) {
1931
- if (!Object.is(currentValue, value)) onChange(value, ...onChangeArgs);
1932
- }
1933
- if (!isControlled) // If uncontrolled, mutate the currentValue local variable so that
1934
- // calling setState multiple times with the same value only emits onChange once.
1935
- // We do not use a ref for this because we specifically _do_ want the value to
1936
- // reset every render, and assigning to a ref in render breaks aborted suspended renders.
1937
- // eslint-disable-next-line react-hooks/exhaustive-deps
1938
- currentValue = value;
1939
- };
1940
- if (typeof value === 'function') {
1941
- if (process.env.NODE_ENV !== 'production') console.warn('We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320');
1942
- // this supports functional updates https://reactjs.org/docs/hooks-reference.html#functional-updates
1943
- // when someone using useControlledState calls setControlledState(myFunc)
1944
- // this will call our useState setState with a function as well which invokes myFunc and calls onChange with the value from myFunc
1945
- // if we're in an uncontrolled state, then we also return the value of myFunc which to setState looks as though it was just called with myFunc from the beginning
1946
- // otherwise we just return the controlled value, which won't cause a rerender because React knows to bail out when the value is the same
1947
- let updateFunction = (oldValue, ...functionArgs)=>{
1948
- let interceptedValue = value(isControlled ? currentValue : oldValue, ...functionArgs);
1949
- onChangeCaller(interceptedValue, ...args);
1950
- if (!isControlled) return interceptedValue;
1951
- return oldValue;
1952
- };
1953
- setStateValue(updateFunction);
1954
- } else {
1955
- if (!isControlled) setStateValue(value);
1956
- onChangeCaller(value, ...args);
1957
- }
1958
- }, [
1959
- isControlled,
1960
- currentValue,
1961
- onChange
1962
- ]);
1963
- return [
1964
- currentValue,
1965
- setValue
1966
- ];
1967
- }
1968
-
1969
- var defaultTranslations$6$1 = {
1970
- checkIconTitle: "Check",
1971
- };
1972
- var VerticalSteps$1 = React.forwardRef(function (_a, ref) {
1973
- var _b = _a.color, color = _b === void 0 ? "primary" : _b, _c = _a.steps, stepsProp = _c === void 0 ? [] : _c, _d = _a.defaultStep, defaultStep = _d === void 0 ? 0 : _d, onStepChange = _a.onStepChange, currentStepProp = _a.currentStep, _e = _a.hideProgressBars, hideProgressBars = _e === void 0 ? false : _e, stepClassName = _a.stepClassName, className = _a.className, translations = _a.translations, props = __rest(_a, ["color", "steps", "defaultStep", "onStepChange", "currentStep", "hideProgressBars", "stepClassName", "className", "translations"]);
1974
- var _f = $458b0a5536c1a7cf$export$40bfa8c7b0832715$1(currentStepProp, defaultStep, onStepChange), currentStep = _f[0], setCurrentStep = _f[1];
1975
- var t = __assign(__assign({}, defaultTranslations$6$1), translations);
1976
- var steps = React.useMemo(function () {
1977
- if (typeof stepsProp === "number") {
1978
- return Array.from({ length: stepsProp }, function () { return ({}); });
1979
- }
1980
- return stepsProp;
1981
- }, [stepsProp]);
1982
- var colors = React.useMemo(function () {
1983
- var _a;
1984
- var colorMappings = {
1985
- primary: [
1986
- "[--step-color:hsl(var(--heroui-primary))]",
1987
- "[--step-fg-color:hsl(var(--heroui-primary-foreground))]",
1988
- ],
1989
- secondary: [
1990
- "[--step-color:hsl(var(--heroui-secondary))]",
1991
- "[--step-fg-color:hsl(var(--heroui-secondary-foreground))]",
1992
- ],
1993
- success: [
1994
- "[--step-color:hsl(var(--heroui-success))]",
1995
- "[--step-fg-color:hsl(var(--heroui-success-foreground))]",
1996
- ],
1997
- warning: [
1998
- "[--step-color:hsl(var(--heroui-warning))]",
1999
- "[--step-fg-color:hsl(var(--heroui-warning-foreground))]",
2000
- ],
2001
- danger: [
2002
- "[--step-color:hsl(var(--heroui-danger))]",
2003
- "[--step-fg-color:hsl(var(--heroui-danger-foreground))]",
2004
- ],
2005
- default: [
2006
- "[--step-color:hsl(var(--heroui-default))]",
2007
- "[--step-fg-color:hsl(var(--heroui-default-foreground))]",
2008
- ],
2009
- };
2010
- var _b = (_a = colorMappings[color]) !== null && _a !== void 0 ? _a : colorMappings.primary, userColor = _b[0], fgColor = _b[1];
2011
- var colorsVars = [
2012
- "[--active-fg-color:var(--step-fg-color)]",
2013
- "[--active-border-color:var(--step-color)]",
2014
- "[--active-color:var(--step-color)]",
2015
- "[--complete-background-color:var(--step-color)]",
2016
- "[--complete-border-color:var(--step-color)]",
2017
- "[--inactive-border-color:hsl(var(--heroui-default-300))]",
2018
- "[--inactive-color:hsl(var(--heroui-default-300))]",
2019
- ];
2020
- if (!(className === null || className === void 0 ? void 0 : className.includes("--step-fg-color"))) {
2021
- colorsVars.unshift(fgColor);
2022
- }
2023
- if (!(className === null || className === void 0 ? void 0 : className.includes("--step-color"))) {
2024
- colorsVars.unshift(userColor);
2025
- }
2026
- if (!(className === null || className === void 0 ? void 0 : className.includes("--inactive-bar-color"))) {
2027
- colorsVars.push("[--inactive-bar-color:hsl(var(--heroui-default-300))]");
2028
- }
2029
- return colorsVars;
2030
- }, [color, className]);
2031
- return (jsxRuntime.jsx("nav", { "aria-label": "Progress", className: "max-w-fit", children: jsxRuntime.jsx("ol", { className: react.cn("flex flex-col gap-y-3", colors, className), children: steps === null || steps === void 0 ? void 0 : steps.map(function (step, stepIdx) {
2032
- var status = currentStep === stepIdx
2033
- ? "active"
2034
- : step.isCompleted
2035
- ? "complete"
2036
- : "inactive";
2037
- var isDisabled = status === "inactive";
2038
- return (
2039
- // biome-ignore lint/suspicious/noArrayIndexKey: <explanation>
2040
- jsxRuntime.jsxs("li", { className: "relative", children: [jsxRuntime.jsx("div", { className: "flex w-full max-w-full items-center", children: jsxRuntime.jsxs("button", __assign({ type: "button", ref: ref, "aria-current": status === "active" ? "step" : undefined, className: react.cn("group rounded-large flex w-full cursor-pointer items-center justify-center gap-4 px-3 py-2.5", stepClassName, {
2041
- "cursor-not-allowed": isDisabled,
2042
- }), onClick: function () { return setCurrentStep(stepIdx); }, disabled: isDisabled }, props, { children: [jsxRuntime.jsx("div", { className: "flex h-full items-center", children: jsxRuntime.jsx(framerMotion.LazyMotion, { features: framerMotion.domAnimation, children: jsxRuntime.jsx("div", { className: "relative", children: jsxRuntime.jsx(framerMotion.m.div, { animate: status, className: react.cn("border-medium text-large text-default-600 relative flex h-[34px] w-[34px] items-center justify-center rounded-full font-semibold", {
2043
- "shadow-lg": status === "complete",
2044
- }), "data-status": status, initial: false, transition: { duration: 0.25 }, variants: {
2045
- inactive: {
2046
- backgroundColor: "transparent",
2047
- borderColor: "var(--inactive-border-color)",
2048
- color: "var(--inactive-color)",
2049
- },
2050
- active: {
2051
- backgroundColor: "transparent",
2052
- borderColor: "var(--active-border-color)",
2053
- color: "var(--active-color)",
2054
- },
2055
- complete: {
2056
- backgroundColor: "var(--complete-background-color)",
2057
- borderColor: "var(--complete-border-color)",
2058
- },
2059
- }, children: jsxRuntime.jsx("div", { className: "flex items-center justify-center", children: status === "complete" ? (jsxRuntime.jsx(IconComponent, { className: " text-[var(--active-fg-color)] font-bold", icon: "material-symbols:check-rounded", title: t.checkIconTitle })) : (jsxRuntime.jsx("span", { children: stepIdx + 1 })) }) }) }) }) }), jsxRuntime.jsx("div", { className: "flex-1 text-left", children: jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("div", { className: react.cn("text-medium text-default-600 font-medium transition-[color,opacity] duration-300 group-active:opacity-70", {
2060
- "text-default-300": status === "inactive",
2061
- }), children: step.title }), jsxRuntime.jsx("div", { className: react.cn("text-tiny text-default-600 lg:text-small transition-[color,opacity] duration-300 group-active:opacity-70", {
2062
- "text-default-300": status === "inactive",
2063
- }), children: step.description })] }) })] }), stepIdx) }), stepIdx < steps.length - 1 && !hideProgressBars && (jsxRuntime.jsx("div", { "aria-hidden": "true", className: react.cn("pointer-events-none absolute top-[calc(64px*var(--idx)+1)] left-3 flex h-1/2 -translate-y-1/3 items-center px-4"), style: {
2064
- // @ts-ignore
2065
- "--idx": stepIdx,
2066
- }, children: jsxRuntime.jsx("div", { className: react.cn("relative h-full w-0.5 bg-[var(--inactive-bar-color)] transition-colors duration-300", "after:absolute after:block after:h-0 after:w-full after:bg-[var(--active-border-color)] after:transition-[height] after:duration-300 after:content-['']", {
2067
- "after:h-full": stepIdx < currentStep,
2068
- }) }) }))] }, stepIdx));
2069
- }) }) }));
2070
- });
2071
- VerticalSteps$1.displayName = "VerticalSteps";
982
+ red: "bg-red-100 text-red-500",
983
+ purple: "bg-purple-100 text-purple-500",
984
+ blue: "bg-blue-100 text-blue-500",
985
+ green: "bg-green-100 text-green-500",
986
+ orange: "bg-orange-100 text-orange-500",
987
+ };
988
+ var colorClasses = customColorClasses[color];
989
+ return (jsxRuntime.jsx(react.Chip, __assign({}, props, { onClose: props.onClose, classNames: __assign({ base: colorClasses }, props.classNames) })));
990
+ };
2072
991
 
2073
- var stepperClasses$1 = react.cn(
2074
- // light
2075
- "[--step-color:hsl(var(--heroui-primary-400))]", "[--active-color:hsl(var(--heroui-primary-400))]", "[--inactive-border-color:hsl(var(--heroui-primary-200))]", "[--inactive-bar-color:hsl(var(--heroui-primary-200))]", "[--inactive-color:hsl(var(--heroui-primary-300))]",
2076
- // dark
2077
- "dark:[--step-color:rgba(255,255,255,0.1)]", "dark:[--active-color:hsl(var(--heroui-foreground-600))]", "dark:[--active-border-color:rgba(255,255,255,0.5)]", "dark:[--inactive-border-color:rgba(255,255,255,0.1)]", "dark:[--inactive-bar-color:rgba(255,255,255,0.1)]", "dark:[--inactive-color:rgba(255,255,255,0.2)]");
2078
- var MultiStepSidebar$1 = React.forwardRef(function (_a, ref) {
2079
- var children = _a.children, className = _a.className, currentPage = _a.currentPage; _a.onBack; _a.onNext; var onChangePage = _a.onChangePage, steps = _a.steps; _a.goBackTranslation; var onClose = _a.onClose, props = __rest(_a, ["children", "className", "currentPage", "onBack", "onNext", "onChangePage", "steps", "goBackTranslation", "onClose"]);
2080
- var handleOverlayClick = function (e) {
2081
- if (e.target === e.currentTarget) {
2082
- onClose === null || onClose === void 0 ? void 0 : onClose();
992
+ // Traducciones por defecto en español
993
+ var defaultTranslations$8 = {
994
+ dayOption: "Día específico",
995
+ dateRangeOption: "Rango de fechas",
996
+ selectDateAriaLabel: "Seleccionar fecha",
997
+ selectDateRangeAriaLabel: "Seleccionar rango de fechas",
998
+ };
999
+ /**
1000
+ * DateSelector - Componente para seleccionar fechas individuales o rangos de fechas
1001
+ * basado en HeroUI siguiendo las reglas de diseño BeweOS.
1002
+ * Maneja su propio estado interno de manera autónoma.
1003
+ */
1004
+ var DateSelector = function (_a) {
1005
+ 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;
1006
+ // Estado interno del componente
1007
+ var _e = React.useState(initialType), type = _e[0], setType = _e[1];
1008
+ var _f = React.useState(initialDate || null), date = _f[0], setDate = _f[1];
1009
+ var _g = React.useState(initialDateRange || null), dateRange = _g[0], setDateRange = _g[1];
1010
+ // Combinar traducciones por defecto con las proporcionadas
1011
+ var t = __assign(__assign({}, defaultTranslations$8), translations);
1012
+ var handleTypeChange = function (value) {
1013
+ var newType = value;
1014
+ setType(newType);
1015
+ // Limpiar valores cuando cambia el tipo
1016
+ if (newType === exports.HolidayType.SingleDay) {
1017
+ setDateRange(null);
1018
+ }
1019
+ else {
1020
+ setDate(null);
2083
1021
  }
1022
+ // Notificar cambio
1023
+ onChange === null || onChange === void 0 ? void 0 : onChange({
1024
+ type: newType,
1025
+ date: newType === exports.HolidayType.SingleDay ? date : null,
1026
+ dateRange: newType === exports.HolidayType.DateRange ? dateRange : null,
1027
+ });
2084
1028
  };
2085
- 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$1, { className: stepperClasses$1, 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$1, { className: react.cn(stepperClasses$1), 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 })] })] })) }));
2086
- });
2087
- MultiStepSidebar$1.displayName = "MultiStepSidebar";
1029
+ var handleDateChange = function (selectedDate) {
1030
+ setDate(selectedDate);
1031
+ onChange === null || onChange === void 0 ? void 0 : onChange({
1032
+ type: type,
1033
+ date: selectedDate,
1034
+ dateRange: null,
1035
+ });
1036
+ };
1037
+ var handleDateRangeChange = function (range) {
1038
+ setDateRange(range);
1039
+ onChange === null || onChange === void 0 ? void 0 : onChange({
1040
+ type: type,
1041
+ date: null,
1042
+ dateRange: range,
1043
+ });
1044
+ };
1045
+ 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)))] }));
1046
+ };
2088
1047
 
2089
- // Lista de países con código telefónico y código ISO
2090
- var countries$1 = [
2091
- { code: "+57", name: "Colombia", country: "CO" },
2092
- { code: "+54", name: "Argentina", country: "AR" },
2093
- { code: "+55", name: "Brazil", country: "BR" },
2094
- { code: "+52", name: "Mexico", country: "MX" },
2095
- { code: "+503", name: "El Salvador", country: "SV" },
2096
- { code: "+51", name: "Peru", country: "PE" },
2097
- { code: "+56", name: "Chile", country: "CL" },
2098
- { code: "+1", name: "United States", country: "US" },
2099
- { code: "+7", name: "Russia", country: "RU" },
2100
- { code: "+20", name: "Egypt", country: "EG" },
2101
- { code: "+27", name: "South Africa", country: "ZA" },
2102
- { code: "+33", name: "France", country: "FR" },
2103
- { code: "+34", name: "Spain", country: "ES" },
2104
- { code: "+39", name: "Italy", country: "IT" },
2105
- { code: "+44", name: "United Kingdom", country: "GB" },
2106
- { code: "+49", name: "Germany", country: "DE" },
2107
- { code: "+61", name: "Australia", country: "AU" },
2108
- { code: "+62", name: "Indonesia", country: "ID" },
2109
- { code: "+64", name: "New Zealand", country: "NZ" },
2110
- { code: "+65", name: "Singapore", country: "SG" },
2111
- { code: "+81", name: "Japan", country: "JP" },
2112
- { code: "+86", name: "China", country: "CN" },
2113
- { code: "+91", name: "India", country: "IN" },
2114
- { code: "+351", name: "Portugal", country: "PT" },
2115
- { code: "+971", name: "UAE", country: "AE" },
2116
- ];
2117
- Array.from(new Map(countries$1.map(function (item) { return [item.code + item.name, item]; })).values());
1048
+ var H1 = function (_a) {
1049
+ var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
1050
+ return (jsxRuntime.jsx("h1", __assign({ className: react.cn("text-xl font-bold", className) }, props, { children: children })));
1051
+ };
2118
1052
 
2119
- var RowSteps$1 = React.forwardRef(function (_a, ref) {
2120
- var _b = _a.color, color = _b === void 0 ? "primary" : _b, _c = _a.steps, stepsProp = _c === void 0 ? [] : _c, _d = _a.defaultStep, defaultStep = _d === void 0 ? 0 : _d, onStepChange = _a.onStepChange, currentStepProp = _a.currentStep, _e = _a.hideProgressBars, hideProgressBars = _e === void 0 ? false : _e, stepClassName = _a.stepClassName, className = _a.className; _a.translations; var props = __rest(_a, ["color", "steps", "defaultStep", "onStepChange", "currentStep", "hideProgressBars", "stepClassName", "className", "translations"]);
2121
- var _f = $458b0a5536c1a7cf$export$40bfa8c7b0832715$1(currentStepProp, defaultStep, onStepChange), currentStep = _f[0], setCurrentStep = _f[1];
2122
- var steps = React.useMemo(function () {
2123
- if (typeof stepsProp === "number") {
2124
- return Array.from({ length: stepsProp }, function () { return ({}); });
2125
- }
2126
- return stepsProp;
2127
- }, [stepsProp]);
2128
- var colors = React.useMemo(function () {
2129
- var _a;
2130
- var colorMappings = {
2131
- primary: [
2132
- "[--step-color:hsl(var(--heroui-primary))]",
2133
- "[--step-fg-color:hsl(var(--heroui-primary-foreground))]",
2134
- ],
2135
- secondary: [
2136
- "[--step-color:hsl(var(--heroui-secondary))]",
2137
- "[--step-fg-color:hsl(var(--heroui-secondary-foreground))]",
2138
- ],
2139
- success: [
2140
- "[--step-color:hsl(var(--heroui-success))]",
2141
- "[--step-fg-color:hsl(var(--heroui-success-foreground))]",
2142
- ],
2143
- warning: [
2144
- "[--step-color:hsl(var(--heroui-warning))]",
2145
- "[--step-fg-color:hsl(var(--heroui-warning-foreground))]",
2146
- ],
2147
- danger: [
2148
- "[--step-color:hsl(var(--heroui-danger))]",
2149
- "[--step-fg-color:hsl(var(--heroui-danger-foreground))]",
2150
- ],
2151
- default: [
2152
- "[--step-color:hsl(var(--heroui-default))]",
2153
- "[--step-fg-color:hsl(var(--heroui-default-foreground))]",
2154
- ],
2155
- };
2156
- var _b = (_a = colorMappings[color]) !== null && _a !== void 0 ? _a : colorMappings.primary, userColor = _b[0], fgColor = _b[1];
2157
- var colorsVars = [
2158
- "[--active-fg-color:var(--step-fg-color)]",
2159
- "[--active-border-color:var(--step-color)]",
2160
- "[--active-color:var(--step-color)]",
2161
- "[--complete-background-color:var(--step-color)]",
2162
- "[--complete-border-color:var(--step-color)]",
2163
- "[--inactive-border-color:hsl(var(--heroui-default-300))]",
2164
- "[--inactive-color:hsl(var(--heroui-default-300))]",
2165
- ];
2166
- if (!(className === null || className === void 0 ? void 0 : className.includes("--step-fg-color"))) {
2167
- colorsVars.unshift(fgColor);
2168
- }
2169
- if (!(className === null || className === void 0 ? void 0 : className.includes("--step-color"))) {
2170
- colorsVars.unshift(userColor);
2171
- }
2172
- if (!(className === null || className === void 0 ? void 0 : className.includes("--inactive-bar-color"))) {
2173
- colorsVars.push("[--inactive-bar-color:hsl(var(--heroui-default-300))]");
2174
- }
2175
- return colorsVars;
2176
- }, [color, className]);
2177
- return (jsxRuntime.jsx("nav", { "aria-label": "Progress", className: "-my-4 max-w-fit overflow-x-auto py-4", children: jsxRuntime.jsx("ol", { className: react.cn("flex flex-row flex-nowrap gap-x-3", colors, className), children: steps === null || steps === void 0 ? void 0 : steps.map(function (step, stepIdx) {
2178
- var status = currentStep === stepIdx
2179
- ? "active"
2180
- : currentStep < stepIdx
2181
- ? "inactive"
2182
- : "complete";
2183
- return (jsxRuntime.jsx("li", { className: "relative flex w-full items-center pr-12 last:pr-0", children: jsxRuntime.jsxs("button", __assign({ type: "button", ref: ref, "aria-current": status === "active" ? "step" : undefined, className: react.cn("group rounded-large flex w-full cursor-pointer flex-row items-center justify-center gap-x-3 py-2.5", stepClassName), onClick: function () { return setCurrentStep(stepIdx); } }, props, { children: [jsxRuntime.jsx("div", { className: "h-ful relative flex items-center", children: jsxRuntime.jsx(framerMotion.LazyMotion, { features: framerMotion.domAnimation, children: jsxRuntime.jsx(framerMotion.m.div, { animate: status, className: "relative", children: jsxRuntime.jsx(framerMotion.m.div, { className: react.cn("border-medium text-large text-default-600 relative flex h-[34px] w-[34px] items-center justify-center rounded-full font-semibold", {
2184
- "shadow-lg": status === "complete",
2185
- }), initial: false, transition: { duration: 0.25 }, variants: {
2186
- inactive: {
2187
- backgroundColor: "transparent",
2188
- borderColor: "var(--inactive-border-color)",
2189
- color: "var(--inactive-color)",
2190
- },
2191
- active: {
2192
- backgroundColor: "transparent",
2193
- borderColor: "var(--active-border-color)",
2194
- color: "var(--active-color)",
2195
- },
2196
- complete: {
2197
- backgroundColor: "var(--complete-background-color)",
2198
- borderColor: "var(--complete-border-color)",
2199
- },
2200
- }, children: jsxRuntime.jsx("div", { className: "flex items-center justify-center", children: status === "complete" ? (jsxRuntime.jsx(IconComponent, { className: " text-[var(--active-fg-color)] font-bold", icon: "material-symbols:check-rounded" })) : (jsxRuntime.jsx("span", { children: stepIdx + 1 })) }) }) }) }) }), step.title && (jsxRuntime.jsx("div", { className: "max-w-full flex-1 text-start", children: jsxRuntime.jsx("div", { className: react.cn("text-small text-default-600 lg:text-medium font-medium transition-[color,opacity] duration-300 group-active:opacity-80", {
2201
- "text-default-300": status === "inactive",
2202
- }), children: step.title }) })), stepIdx < steps.length - 1 && !hideProgressBars && (jsxRuntime.jsx("div", { "aria-hidden": "true", className: "pointer-events-none absolute right-0 w-10 flex-none items-center", style: {
2203
- // @ts-ignore
2204
- "--idx": stepIdx,
2205
- }, children: jsxRuntime.jsx("div", { className: react.cn("relative h-0.5 w-full bg-[var(--inactive-bar-color)] transition-colors duration-300", "after:absolute after:block after:h-full after:w-0 after:bg-[var(--active-border-color)] after:transition-[width] after:duration-300 after:content-['']", {
2206
- "after:w-full": stepIdx < currentStep,
2207
- }) }) }))] }), stepIdx) }, stepIdx));
2208
- }) }) }));
2209
- });
2210
- RowSteps$1.displayName = "RowSteps";
1053
+ var H3 = function (_a) {
1054
+ var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
1055
+ return (jsxRuntime.jsx("h3", __assign({ className: react.cn("text-base font-medium", className) }, props, { children: children })));
1056
+ };
2211
1057
 
2212
- React.createContext(undefined);
1058
+ var H4 = function (_a) {
1059
+ var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
1060
+ return (jsxRuntime.jsx("h4", __assign({ className: react.cn("text-sm font-medium ", className) }, props, { children: children })));
1061
+ };
2213
1062
 
2214
1063
  /**
2215
- * @file This file contains the theme configurations for the application.
1064
+ * Breadcrumbs - Wrapper simple del componente HeroUI Breadcrumbs
1065
+ *
1066
+ * Este componente es un wrapper directo del componente Breadcrumbs de HeroUI,
1067
+ * proporcionando una interfaz simplificada y consistente con el resto de la librería.
1068
+ *
1069
+ * @example
1070
+ * ```tsx
1071
+ * // Uso básico
1072
+ * <Breadcrumbs>
1073
+ * <BreadcrumbItem href="/">Inicio</BreadcrumbItem>
1074
+ * <BreadcrumbItem href="/products">Productos</BreadcrumbItem>
1075
+ * <BreadcrumbItem>Detalle</BreadcrumbItem>
1076
+ * </Breadcrumbs>
1077
+ *
1078
+ * // Con items como prop
1079
+ * <Breadcrumbs
1080
+ * items={[
1081
+ * { label: "Inicio", href: "/" },
1082
+ * { label: "Productos", href: "/products" },
1083
+ * { label: "Detalle", isCurrent: true }
1084
+ * ]}
1085
+ * />
1086
+ * ```
2216
1087
  */
2217
- __spreadArray(["light", "dark"], Object.keys(themeColors));
1088
+ var BreadcrumbsComponent = function (_a) {
1089
+ var items = _a.items, children = _a.children, heroUIProps = __rest(_a, ["items", "children"]);
1090
+ return (jsxRuntime.jsx(react.Breadcrumbs, __assign({}, heroUIProps, { children: items
1091
+ ? items.map(function (item, index) { return (jsxRuntime.jsx(react.BreadcrumbItem, { href: item.href, isCurrent: item.isCurrent, children: item.label }, "".concat(item.href || item.label, "-").concat(index))); })
1092
+ : children })));
1093
+ };
1094
+
1095
+ var ConfigMenu = function (_a) {
1096
+ var _b;
1097
+ var options = _a.options, onLogout = _a.onLogout, translations = _a.translations;
1098
+ return (jsxRuntime.jsxs(react.Dropdown, { className: "min-w-40", children: [jsxRuntime.jsx(react.DropdownTrigger, { children: jsxRuntime.jsx(react.Button, { isIconOnly: true, color: "default", startContent: jsxRuntime.jsx(IconComponent, { icon: "solar:settings-linear" }) }) }), jsxRuntime.jsxs(react.DropdownMenu, { "aria-label": "Configuration", children: [jsxRuntime.jsx(react.DropdownSection, { showDivider: true, className: "mb-0", children: options.map(function (item) { return (jsxRuntime.jsx(react.DropdownItem, { href: item.href, className: "data-[hover=true]:bg-primary-100 data-[hover=true]:text-default-700", classNames: {
1099
+ base: "text-default-500",
1100
+ }, startContent: item.icon ? jsxRuntime.jsx(IconComponent, { icon: item.icon }) : undefined, children: item.label }, item.label)); }) }), jsxRuntime.jsx(react.DropdownSection, { children: jsxRuntime.jsx(react.DropdownItem, { onPress: onLogout, className: "data-[hover=true]:bg-primary-100 data-[hover=true]:text-default-700", classNames: {
1101
+ base: "text-default-500",
1102
+ }, startContent: jsxRuntime.jsx(IconComponent, { icon: "solar:logout-2-linear" }), children: (_b = translations === null || translations === void 0 ? void 0 : translations.logout) !== null && _b !== void 0 ? _b : "Logout" }, "logout") })] })] }));
1103
+ };
1104
+ ConfigMenu.displayName = "ConfigMenu";
1105
+
1106
+ var NotificationButton = function (_a) {
1107
+ var _b = _a.notificationCount, notificationCount = _b === void 0 ? 0 : _b;
1108
+ return (jsxRuntime.jsx(react.Button, { isIconOnly: true, color: "secondary", variant: "flat", startContent: jsxRuntime.jsx(IconComponent, { icon: "solar:bell-bing-linear" }), children: notificationCount > 0 && (jsxRuntime.jsx("span", { className: "notification__alert", children: notificationCount })) }));
1109
+ };
1110
+ NotificationButton.displayName = "NotificationButton";
2218
1111
 
2219
- React.createContext(undefined);
1112
+ var HeaderComponent = function (_a) {
1113
+ var notificationCount = _a.notificationCount, options = _a.options, onMenuClick = _a.onMenuClick, onLogout = _a.onLogout, translations = _a.translations, breadcrumbs = _a.breadcrumbs;
1114
+ return (jsxRuntime.jsx("header", { className: "header__container", children: jsxRuntime.jsxs("div", { className: "flex items-center justify-between w-full", children: [jsxRuntime.jsxs("div", { className: "flex items-center gap-4", children: [jsxRuntime.jsx(react.Button, { className: "sm:hidden", isIconOnly: true, variant: "light", startContent: jsxRuntime.jsx(IconComponent, { icon: "solar:hamburger-menu-linear" }), onPress: onMenuClick }), breadcrumbs && breadcrumbs.length > 0 && (jsxRuntime.jsx(BreadcrumbsComponent, { items: breadcrumbs }))] }), jsxRuntime.jsxs("div", { className: "flex items-center gap-4", children: [jsxRuntime.jsx(NotificationButton, { notificationCount: notificationCount }), jsxRuntime.jsx(ConfigMenu, { options: options, onLogout: onLogout, translations: translations })] })] }) }));
1115
+ };
1116
+ HeaderComponent.displayName = "Header";
2220
1117
 
2221
1118
  var defaultTranslations$7 = {
2222
1119
  previewAlt: "Vista previa de imagen",
@@ -2246,12 +1143,12 @@ var normalizeImages = function (images) {
2246
1143
  if (typeof img === "string") {
2247
1144
  return { src: img, id: "img-".concat(index) };
2248
1145
  }
2249
- return __assign$1(__assign$1({}, img), { id: img.id || "img-".concat(index) });
1146
+ return __assign(__assign({}, img), { id: img.id || "img-".concat(index) });
2250
1147
  });
2251
1148
  };
2252
1149
  var ImagePreview = function (_a) {
2253
1150
  var images = _a.images, _b = _a.size, size = _b === void 0 ? "small" : _b, onRemove = _a.onRemove, _c = _a.showRemoveButton, showRemoveButton = _c === void 0 ? true : _c, _d = _a.className, className = _d === void 0 ? "" : _d, _e = _a.translations, translations = _e === void 0 ? {} : _e, _f = _a.backgroundColor, backgroundColor = _f === void 0 ? "bg-white dark:bg-gray-800" : _f, _g = _a.radius, radius = _g === void 0 ? "lg" : _g, _h = _a.showBorder, showBorder = _h === void 0 ? true : _h, onImageClick = _a.onImageClick;
2254
- var t = __assign$1(__assign$1({}, defaultTranslations$7), translations);
1151
+ var t = __assign(__assign({}, defaultTranslations$7), translations);
2255
1152
  var normalizedImages = normalizeImages(images);
2256
1153
  var sizeClass = sizeClasses[size];
2257
1154
  var radiusClass = radiusClasses[radius];
@@ -2290,7 +1187,7 @@ function normalizeClass(value) {
2290
1187
  }
2291
1188
  var getSectionClasses = function (isCollapsed, sectionClassesProp) {
2292
1189
  if (sectionClassesProp === void 0) { sectionClassesProp = {}; }
2293
- return (__assign$1(__assign$1({}, Object.fromEntries(Object.entries(sectionClassesProp).map(function (_a) {
1190
+ return (__assign(__assign({}, Object.fromEntries(Object.entries(sectionClassesProp).map(function (_a) {
2294
1191
  var k = _a[0], v = _a[1];
2295
1192
  return [k, normalizeClass(v)];
2296
1193
  }))), { base: normalizeClass(react.cn(sectionClassesProp === null || sectionClassesProp === void 0 ? void 0 : sectionClassesProp.base, "w-full", {
@@ -2303,7 +1200,7 @@ var getSectionClasses = function (isCollapsed, sectionClassesProp) {
2303
1200
  };
2304
1201
  var getItemClasses = function (isCollapsed, itemClassesProp) {
2305
1202
  if (itemClassesProp === void 0) { itemClassesProp = {}; }
2306
- return (__assign$1(__assign$1({}, Object.fromEntries(Object.entries(itemClassesProp).map(function (_a) {
1203
+ return (__assign(__assign({}, Object.fromEntries(Object.entries(itemClassesProp).map(function (_a) {
2307
1204
  var k = _a[0], v = _a[1];
2308
1205
  return [k, normalizeClass(v)];
2309
1206
  }))), { base: normalizeClass(react.cn(itemClassesProp === null || itemClassesProp === void 0 ? void 0 : itemClassesProp.base, {
@@ -2336,7 +1233,7 @@ var EnumMenuNavListItem;
2336
1233
  * @forwardRef
2337
1234
  */
2338
1235
  var MenuNavList = React.forwardRef(function (_a, ref) {
2339
- var items = _a.items, isCollapsed = _a.isCollapsed, defaultSelectedKey = _a.defaultSelectedKey; _a.onSelect; var hideEndContent = _a.hideEndContent, _b = _a.sectionClasses, sectionClassesProp = _b === void 0 ? {} : _b, _c = _a.itemClasses, itemClassesProp = _c === void 0 ? {} : _c, iconClassName = _a.iconClassName, classNames = _a.classNames, className = _a.className, props = __rest$1(_a, ["items", "isCollapsed", "defaultSelectedKey", "onSelect", "hideEndContent", "sectionClasses", "itemClasses", "iconClassName", "classNames", "className"]);
1236
+ var items = _a.items, isCollapsed = _a.isCollapsed, defaultSelectedKey = _a.defaultSelectedKey; _a.onSelect; var hideEndContent = _a.hideEndContent, _b = _a.sectionClasses, sectionClassesProp = _b === void 0 ? {} : _b, _c = _a.itemClasses, itemClassesProp = _c === void 0 ? {} : _c, iconClassName = _a.iconClassName, classNames = _a.classNames, className = _a.className, props = __rest(_a, ["items", "isCollapsed", "defaultSelectedKey", "onSelect", "hideEndContent", "sectionClasses", "itemClasses", "iconClassName", "classNames", "className"]);
2340
1237
  var _d = React.useState(defaultSelectedKey), selected = _d[0], setSelected = _d[1];
2341
1238
  // Component styles
2342
1239
  var sectionClasses = getSectionClasses(isCollapsed, sectionClassesProp);
@@ -2354,7 +1251,7 @@ var MenuNavList = React.forwardRef(function (_a, ref) {
2354
1251
  // Renders the item displayed inside the Popover when the menu is collapsed.
2355
1252
  var renderCompactItem = React.useCallback(function (item, parentKey) {
2356
1253
  var _a, _b;
2357
- return (React.createElement(react.ListboxItem, __assign$1({}, item, { key: item.key, endContent: (_a = item.endContent) !== null && _a !== void 0 ? _a : null, startContent: item.icon ? (jsxRuntime.jsx(IconComponent$1, { className: react.cn("text-default-500", "group-data-[selected=true]:text-default-600", iconClassName), icon: item.icon, size: "lg" })) : (((_b = item.startContent) !== null && _b !== void 0 ? _b : null)), textValue: item.title, title: item.title, className: "data-[hover=true]:text-default-600", onPress: function () { return handleItemPress(item, parentKey); } })));
1254
+ return (React.createElement(react.ListboxItem, __assign({}, item, { key: item.key, endContent: (_a = item.endContent) !== null && _a !== void 0 ? _a : null, startContent: item.icon ? (jsxRuntime.jsx(IconComponent, { className: react.cn("text-default-500", "group-data-[selected=true]:text-default-600", iconClassName), icon: item.icon, size: "lg" })) : (((_b = item.startContent) !== null && _b !== void 0 ? _b : null)), textValue: item.title, title: item.title, className: "data-[hover=true]:text-default-600", onPress: function () { return handleItemPress(item, parentKey); } })));
2358
1255
  }, [handleItemPress, iconClassName]);
2359
1256
  // Renders a nested item, i.e., an item that has sub-items.
2360
1257
  // biome-ignore lint/correctness/useExhaustiveDependencies: <explanation>
@@ -2366,7 +1263,7 @@ var MenuNavList = React.forwardRef(function (_a, ref) {
2366
1263
  if (isNestType) {
2367
1264
  item.href = undefined;
2368
1265
  }
2369
- return (React.createElement(react.ListboxItem, __assign$1({}, item, { key: item.key, classNames: {
1266
+ return (React.createElement(react.ListboxItem, __assign({}, item, { key: item.key, classNames: {
2370
1267
  base: react.cn({
2371
1268
  "h-auto p-0": !isCollapsed && isNestType,
2372
1269
  }, {
@@ -2376,10 +1273,10 @@ var MenuNavList = React.forwardRef(function (_a, ref) {
2376
1273
  }, "rounded-large"),
2377
1274
  }, endContent: isCollapsed || isNestType || hideEndContent
2378
1275
  ? null
2379
- : ((_b = item.endContent) !== null && _b !== void 0 ? _b : null), startContent: isCollapsed || isNestType ? null : item.icon ? (jsxRuntime.jsx(IconComponent$1, { className: react.cn("text-default-500 group-data-[selected=true]:text-foreground", iconClassName), icon: item.icon, size: "lg" })) : (((_c = item.startContent) !== null && _c !== void 0 ? _c : null)), title: isCollapsed || isNestType ? null : item.title }),
1276
+ : ((_b = item.endContent) !== null && _b !== void 0 ? _b : null), startContent: isCollapsed || isNestType ? null : item.icon ? (jsxRuntime.jsx(IconComponent, { className: react.cn("text-default-500 group-data-[selected=true]:text-foreground", iconClassName), icon: item.icon, size: "lg" })) : (((_c = item.startContent) !== null && _c !== void 0 ? _c : null)), title: isCollapsed || isNestType ? null : item.title }),
2380
1277
  isCollapsed && isNestType ? (jsxRuntime.jsxs(react.Popover, { placement: "right", offset: 10, children: [jsxRuntime.jsx(react.PopoverTrigger, { children: jsxRuntime.jsx("div", { className: "flex w-full items-center justify-center", children: jsxRuntime.jsx(react.Tooltip, { content: item.title, placement: "right", classNames: {
2381
1278
  base: "text-default-500",
2382
- }, children: jsxRuntime.jsx("div", { className: "flex w-full items-center justify-center", children: item.icon ? (jsxRuntime.jsx(IconComponent$1, { className: react.cn("text-default-500 group-data-[selected=true]:text-default-600", iconClassName), icon: item.icon, size: "lg" })) : (((_d = item.startContent) !== null && _d !== void 0 ? _d : null)) }) }) }) }), jsxRuntime.jsx(react.PopoverContent, { className: "p-0", children: jsxRuntime.jsxs("div", { className: "min-w-[200px] rounded-large p-2", children: [jsxRuntime.jsx("div", { className: "p-2 text-small font-semibold text-default-500", children: item.title }), jsxRuntime.jsx(react.Listbox, { className: "mt-0.5 text-default-500", "aria-label": "Nested menu items", items: item.items, variant: "flat", children: item.items && ((_e = item.items) === null || _e === void 0 ? void 0 : _e.length) > 0
1279
+ }, children: jsxRuntime.jsx("div", { className: "flex w-full items-center justify-center", children: item.icon ? (jsxRuntime.jsx(IconComponent, { className: react.cn("text-default-500 group-data-[selected=true]:text-default-600", iconClassName), icon: item.icon, size: "lg" })) : (((_d = item.startContent) !== null && _d !== void 0 ? _d : null)) }) }) }) }), jsxRuntime.jsx(react.PopoverContent, { className: "p-0", children: jsxRuntime.jsxs("div", { className: "min-w-[200px] rounded-large p-2", children: [jsxRuntime.jsx("div", { className: "p-2 text-small font-semibold text-default-500", children: item.title }), jsxRuntime.jsx(react.Listbox, { className: "mt-0.5 text-default-500", "aria-label": "Nested menu items", items: item.items, variant: "flat", children: item.items && ((_e = item.items) === null || _e === void 0 ? void 0 : _e.length) > 0
2383
1280
  ? item.items.map(function (child) {
2384
1281
  return renderCompactItem(child, item.key);
2385
1282
  })
@@ -2388,7 +1285,7 @@ var MenuNavList = React.forwardRef(function (_a, ref) {
2388
1285
  heading: "pr-3 group-data-[selected=true]:bg-primary-100 rounded-large",
2389
1286
  trigger: "p-0",
2390
1287
  content: "py-0 pl-4",
2391
- }, title: item.icon ? (jsxRuntime.jsxs("div", { className: "flex h-11 items-center gap-2 px-3 py-1.5", children: [jsxRuntime.jsx(IconComponent$1, { className: react.cn("text-default-500 group-data-[selected=true]:text-default-600", iconClassName), icon: item.icon, size: "lg" }), jsxRuntime.jsx("span", { className: "text-small font-medium text-default-500 group-data-[selected=true]:text-default-600", children: item.title })] })) : (((_f = item.startContent) !== null && _f !== void 0 ? _f : null)), children: item.items && ((_g = item.items) === null || _g === void 0 ? void 0 : _g.length) > 0 ? (jsxRuntime.jsx(react.Listbox, { className: "mt-0.5 text-default-500", classNames: {
1288
+ }, title: item.icon ? (jsxRuntime.jsxs("div", { className: "flex h-11 items-center gap-2 px-3 py-1.5", children: [jsxRuntime.jsx(IconComponent, { className: react.cn("text-default-500 group-data-[selected=true]:text-default-600", iconClassName), icon: item.icon, size: "lg" }), jsxRuntime.jsx("span", { className: "text-small font-medium text-default-500 group-data-[selected=true]:text-default-600", children: item.title })] })) : (((_f = item.startContent) !== null && _f !== void 0 ? _f : null)), children: item.items && ((_g = item.items) === null || _g === void 0 ? void 0 : _g.length) > 0 ? (jsxRuntime.jsx(react.Listbox, { className: "mt-0.5 text-default-500", classNames: {
2392
1289
  list: react.cn("border-l border-default-200 pl-4"),
2393
1290
  }, items: item.items, variant: "flat", children: item.items.map(function (child) { return renderItem(child, item.key); }) })) : (renderItem(item)) }, item.key) })) : null));
2394
1291
  }, [isCollapsed, hideEndContent, iconClassName, items, selected]);
@@ -2403,13 +1300,13 @@ var MenuNavList = React.forwardRef(function (_a, ref) {
2403
1300
  return renderNestItem(item);
2404
1301
  }
2405
1302
  var isItemSelected = selected === item.key;
2406
- return (React.createElement(react.ListboxItem, __assign$1({}, item, { key: item.key, endContent: isCollapsed || hideEndContent ? null : ((_b = item.endContent) !== null && _b !== void 0 ? _b : null), startContent: isCollapsed ? null : item.icon ? (jsxRuntime.jsx(IconComponent$1, { className: react.cn("text-default-500", "group-data-[selected=true]:text-default-600", iconClassName), icon: item.icon, size: "lg" })) : (((_c = item.startContent) !== null && _c !== void 0 ? _c : null)), textValue: item.title, title: isCollapsed ? null : item.title, onPress: function () { return handleItemPress(item, parentKey); }, "aria-selected": isItemSelected, "aria-label": item.title || "Menu item ".concat(item.key) }), isCollapsed ? (jsxRuntime.jsx(react.Tooltip, { content: item.title, placement: "right", closeDelay: 200, shouldCloseOnBlur: false, classNames: {
1303
+ return (React.createElement(react.ListboxItem, __assign({}, item, { key: item.key, endContent: isCollapsed || hideEndContent ? null : ((_b = item.endContent) !== null && _b !== void 0 ? _b : null), startContent: isCollapsed ? null : item.icon ? (jsxRuntime.jsx(IconComponent, { className: react.cn("text-default-500", "group-data-[selected=true]:text-default-600", iconClassName), icon: item.icon, size: "lg" })) : (((_c = item.startContent) !== null && _c !== void 0 ? _c : null)), textValue: item.title, title: isCollapsed ? null : item.title, onPress: function () { return handleItemPress(item, parentKey); }, "aria-selected": isItemSelected, "aria-label": item.title || "Menu item ".concat(item.key) }), isCollapsed ? (jsxRuntime.jsx(react.Tooltip, { content: item.title, placement: "right", closeDelay: 200, shouldCloseOnBlur: false, classNames: {
2407
1304
  base: "text-default-500",
2408
- }, children: jsxRuntime.jsx("div", { className: "flex w-full items-center justify-center", "aria-hidden": "true", children: item.icon ? (jsxRuntime.jsx(IconComponent$1, { className: react.cn("text-default-500", "group-data-[selected=true]:text-default-600", iconClassName), icon: item.icon, size: "lg" })) : (((_d = item.startContent) !== null && _d !== void 0 ? _d : null)) }) })) : null));
1305
+ }, children: jsxRuntime.jsx("div", { className: "flex w-full items-center justify-center", "aria-hidden": "true", children: item.icon ? (jsxRuntime.jsx(IconComponent, { className: react.cn("text-default-500", "group-data-[selected=true]:text-default-600", iconClassName), icon: item.icon, size: "lg" })) : (((_d = item.startContent) !== null && _d !== void 0 ? _d : null)) }) })) : null));
2409
1306
  },
2410
1307
  // eslint-disable-next-line react-hooks/exhaustive-deps
2411
1308
  [isCollapsed, hideEndContent, iconClassName, itemClasses === null || itemClasses === void 0 ? void 0 : itemClasses.base]);
2412
- return (jsxRuntime.jsx(react.Listbox, __assign$1({ ref: ref, hideSelectedIcon: true, as: "nav", className: react.cn("list-none", className), classNames: __assign$1(__assign$1({}, classNames), { list: react.cn("items-center", classNames === null || classNames === void 0 ? void 0 : classNames.list) }), color: "default", itemClasses: __assign$1(__assign$1({}, itemClasses), { base: react.cn("px-3 min-h-11 rounded-large h-[44px] data-[selected=true]:bg-primary-100", itemClasses === null || itemClasses === void 0 ? void 0 : itemClasses.base), title: react.cn("text-small font-medium text-default-500 group-data-[selected=true]:text-default-600 ", itemClasses === null || itemClasses === void 0 ? void 0 : itemClasses.title) }), items: items, selectedKeys: [selected], selectionMode: "single", variant: "flat" }, props, { children: function (item) {
1309
+ return (jsxRuntime.jsx(react.Listbox, __assign({ ref: ref, hideSelectedIcon: true, as: "nav", className: react.cn("list-none", className), classNames: __assign(__assign({}, classNames), { list: react.cn("items-center", classNames === null || classNames === void 0 ? void 0 : classNames.list) }), color: "default", itemClasses: __assign(__assign({}, itemClasses), { base: react.cn("px-3 min-h-11 rounded-large h-[44px] data-[selected=true]:bg-primary-100", itemClasses === null || itemClasses === void 0 ? void 0 : itemClasses.base), title: react.cn("text-small font-medium text-default-500 group-data-[selected=true]:text-default-600 ", itemClasses === null || itemClasses === void 0 ? void 0 : itemClasses.title) }), items: items, selectedKeys: [selected], selectionMode: "single", variant: "flat" }, props, { children: function (item) {
2413
1310
  var _a, _b;
2414
1311
  return item.items &&
2415
1312
  ((_a = item.items) === null || _a === void 0 ? void 0 : _a.length) > 0 &&
@@ -2451,13 +1348,13 @@ var MenuComponent = React.memo(function Menu(_a) {
2451
1348
  }
2452
1349
  return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("button", { type: "button", "aria-label": "Close sidebar", className: "fixed inset-0 bg-black bg-opacity-40 z-40 xs:block sm:hidden", onClick: handleSidebarClose, style: { border: "none", padding: 0, margin: 0 } }), jsxRuntime.jsx("div", { className: "container__menu ".concat(isCollapsed
2453
1350
  ? "container__menu--collapsed"
2454
- : "container__menu--expanded"), children: jsxRuntime.jsxs("div", { className: "content__menu", children: [jsxRuntime.jsxs("div", { className: "content__menu--header", style: { flexDirection: isCollapsed ? "column-reverse" : "row" }, children: [jsxRuntime.jsxs("div", { className: "flex flex-row items-center justify-center ".concat(isCollapsed ? "gap-0" : "gap-2"), children: [jsxRuntime.jsx("div", { className: "flex h-8 w-8 items-center justify-center rounded-full bg-foreground", children: jsxRuntime.jsx("img", { src: commerceInfo.logo, alt: "Logo of ".concat(commerceInfo.name) }) }), jsxRuntime.jsx("span", { className: "collapsible-item text-small font-bold ", children: commerceInfo.name })] }), jsxRuntime.jsxs("div", { className: "flex items-center", children: [jsxRuntime.jsx(IconComponent$1, { icon: "material-symbols-light:close", size: "lg", className: "cursor-pointer block sm:hidden", onClick: handleSidebarClose }), jsxRuntime.jsx(IconComponent$1, { icon: isCollapsed
1351
+ : "container__menu--expanded"), children: jsxRuntime.jsxs("div", { className: "content__menu", children: [jsxRuntime.jsxs("div", { className: "content__menu--header", style: { flexDirection: isCollapsed ? "column-reverse" : "row" }, children: [jsxRuntime.jsxs("div", { className: "flex flex-row items-center justify-center ".concat(isCollapsed ? "gap-0" : "gap-2"), children: [jsxRuntime.jsx("div", { className: "flex h-8 w-8 items-center justify-center rounded-full bg-foreground", children: jsxRuntime.jsx("img", { src: commerceInfo.logo, alt: "Logo of ".concat(commerceInfo.name) }) }), jsxRuntime.jsx("span", { className: "collapsible-item text-small font-bold ", children: commerceInfo.name })] }), jsxRuntime.jsxs("div", { className: "flex items-center", children: [jsxRuntime.jsx(IconComponent, { icon: "material-symbols-light:close", size: "lg", className: "cursor-pointer block sm:hidden", onClick: handleSidebarClose }), jsxRuntime.jsx(IconComponent, { icon: isCollapsed
2455
1352
  ? "solar:alt-arrow-right-outline"
2456
- : "solar:alt-arrow-left-outline", size: "lg", className: "hidden sm:block cursor-pointer", onClick: handleCollapseToggle })] })] }), jsxRuntime.jsx(react.Spacer, { y: 6 }), jsxRuntime.jsxs("div", { className: "content__menu--user ".concat(isCollapsed ? "gap-0" : "gap-3"), children: [jsxRuntime.jsx(react.Avatar, { size: "md", src: userInfo.avatar, color: userInfo.avatar === "" ? "warning" : "default", name: userInfo.name }), jsxRuntime.jsxs("div", { className: "collapsible-item flex flex-col", children: [jsxRuntime.jsx("p", { className: "text-small font-medium text-default-900", children: userInfo.name }), jsxRuntime.jsx("p", { className: "text-tiny text-default-400", children: userInfo.role })] })] }), jsxRuntime.jsx("div", { className: "".concat(!isCollapsed ? "flex-1" : "h-full", " min-h-0 py-6"), children: jsxRuntime.jsx("div", { className: "h-full overflow-y-auto pr-6 -mr-6 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]", children: jsxRuntime.jsx(MenuNavList, { defaultSelectedKey: menuItems.selectedKey, items: menuItems.items, isCollapsed: isCollapsed }) }) }), upgradeCard && (jsxRuntime.jsxs("div", { className: "collapsible-item relative", children: [jsxRuntime.jsxs(react.Card, { className: "border-none overflow-visible shadow-none", shadow: "sm", children: [jsxRuntime.jsxs(react.CardBody, { className: "items-center py-5 text-center gap-1", children: [jsxRuntime.jsx("h3", { className: "text-medium font-medium text-default-900", children: upgradeCard.title }), jsxRuntime.jsx("p", { className: "text-small text-default-500 pb-3 whitespace-normal", children: upgradeCard.description })] }), jsxRuntime.jsx(react.CardFooter, { className: "absolute justify-center", style: { bottom: "-30px" }, children: jsxRuntime.jsx(react.Button, { className: "px-10 shadow-md", color: "primary", radius: "full", variant: "shadow", onPress: handleUpgradeClick, children: upgradeCard.buttonText }) })] }), jsxRuntime.jsx(react.Spacer, { y: 9 })] })), jsxRuntime.jsx("div", { className: "mt-auto flex flex-col justify-center items-center", children: jsxRuntime.jsx(react.Button, { fullWidth: true, className: " text-default-500 data-[hover=true]:text-default-600", startContent: jsxRuntime.jsx(IconComponent$1, { className: "text-default-500", icon: "solar:info-circle-line-duotone", size: "md" }), variant: "light", onPress: handleHelpClick, isIconOnly: isCollapsed, children: !isCollapsed && (jsxRuntime.jsx("span", { className: "collapsible-item", children: helpButton.title })) }) })] }) })] }));
1353
+ : "solar:alt-arrow-left-outline", size: "lg", className: "hidden sm:block cursor-pointer", onClick: handleCollapseToggle })] })] }), jsxRuntime.jsx(react.Spacer, { y: 6 }), jsxRuntime.jsxs("div", { className: "content__menu--user ".concat(isCollapsed ? "gap-0" : "gap-3"), children: [jsxRuntime.jsx(react.Avatar, { size: "md", src: userInfo.avatar, color: userInfo.avatar === "" ? "warning" : "default", name: userInfo.name }), jsxRuntime.jsxs("div", { className: "collapsible-item flex flex-col", children: [jsxRuntime.jsx("p", { className: "text-small font-medium text-default-900", children: userInfo.name }), jsxRuntime.jsx("p", { className: "text-tiny text-default-400", children: userInfo.role })] })] }), jsxRuntime.jsx("div", { className: "".concat(!isCollapsed ? "flex-1" : "h-full", " min-h-0 py-6"), children: jsxRuntime.jsx("div", { className: "h-full overflow-y-auto pr-6 -mr-6 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]", children: jsxRuntime.jsx(MenuNavList, { defaultSelectedKey: menuItems.selectedKey, items: menuItems.items, isCollapsed: isCollapsed }) }) }), upgradeCard && (jsxRuntime.jsxs("div", { className: "collapsible-item relative", children: [jsxRuntime.jsxs(react.Card, { className: "border-none overflow-visible shadow-none", shadow: "sm", children: [jsxRuntime.jsxs(react.CardBody, { className: "items-center py-5 text-center gap-1", children: [jsxRuntime.jsx("h3", { className: "text-medium font-medium text-default-900", children: upgradeCard.title }), jsxRuntime.jsx("p", { className: "text-small text-default-500 pb-3 whitespace-normal", children: upgradeCard.description })] }), jsxRuntime.jsx(react.CardFooter, { className: "absolute justify-center", style: { bottom: "-30px" }, children: jsxRuntime.jsx(react.Button, { className: "px-10 shadow-md", color: "primary", radius: "full", variant: "shadow", onPress: handleUpgradeClick, children: upgradeCard.buttonText }) })] }), jsxRuntime.jsx(react.Spacer, { y: 9 })] })), jsxRuntime.jsx("div", { className: "mt-auto flex flex-col justify-center items-center", children: jsxRuntime.jsx(react.Button, { fullWidth: true, className: " text-default-500 data-[hover=true]:text-default-600", startContent: jsxRuntime.jsx(IconComponent, { className: "text-default-500", icon: "solar:info-circle-line-duotone", size: "md" }), variant: "light", onPress: handleHelpClick, isIconOnly: isCollapsed, children: !isCollapsed && (jsxRuntime.jsx("span", { className: "collapsible-item", children: helpButton.title })) }) })] }) })] }));
2457
1354
  });
2458
1355
 
2459
1356
  var StepIndicator = function (_a) {
2460
- var currentStep = _a.currentStep, totalSteps = _a.totalSteps, _b = _a.color, color = _b === void 0 ? "primary" : _b, _c = _a.showStepText, showStepText = _c === void 0 ? true : _c, stepTextFormatter = _a.stepTextFormatter, className = _a.className, props = __rest$1(_a, ["currentStep", "totalSteps", "color", "showStepText", "stepTextFormatter", "className"]);
1357
+ var currentStep = _a.currentStep, totalSteps = _a.totalSteps, _b = _a.color, color = _b === void 0 ? "primary" : _b, _c = _a.showStepText, showStepText = _c === void 0 ? true : _c, stepTextFormatter = _a.stepTextFormatter, className = _a.className, props = __rest(_a, ["currentStep", "totalSteps", "color", "showStepText", "stepTextFormatter", "className"]);
2461
1358
  var progressPercentage = Math.min((currentStep / totalSteps) * 100, 100);
2462
1359
  var colorClasses = {
2463
1360
  primary: "bg-primary",
@@ -2472,7 +1369,7 @@ var StepIndicator = function (_a) {
2472
1369
  var stepText = stepTextFormatter
2473
1370
  ? stepTextFormatter(currentStep, totalSteps)
2474
1371
  : defaultStepText(currentStep, totalSteps);
2475
- return (jsxRuntime.jsxs("div", __assign$1({ className: react.cn("w-full", className) }, props, { children: [showStepText && (jsxRuntime.jsx("div", { className: "text-center text-sm font-medium text-default-400 mb-3", children: stepText })), jsxRuntime.jsx("div", { className: "w-full bg-content2 rounded-full h-2 overflow-hidden", children: jsxRuntime.jsx("div", { className: react.cn("h-full transition-all duration-300 ease-out rounded-full", colorClasses[color]), style: { width: "".concat(progressPercentage, "%") } }) })] })));
1372
+ return (jsxRuntime.jsxs("div", __assign({ className: react.cn("w-full", className) }, props, { children: [showStepText && (jsxRuntime.jsx("div", { className: "text-center text-sm font-medium text-default-400 mb-3", children: stepText })), jsxRuntime.jsx("div", { className: "w-full bg-content2 rounded-full h-2 overflow-hidden", children: jsxRuntime.jsx("div", { className: react.cn("h-full transition-all duration-300 ease-out rounded-full", colorClasses[color]), style: { width: "".concat(progressPercentage, "%") } }) })] })));
2476
1373
  };
2477
1374
 
2478
1375
  /*
@@ -2543,9 +1440,9 @@ var defaultTranslations$6 = {
2543
1440
  checkIconTitle: "Check",
2544
1441
  };
2545
1442
  var VerticalSteps = React.forwardRef(function (_a, ref) {
2546
- var _b = _a.color, color = _b === void 0 ? "primary" : _b, _c = _a.steps, stepsProp = _c === void 0 ? [] : _c, _d = _a.defaultStep, defaultStep = _d === void 0 ? 0 : _d, onStepChange = _a.onStepChange, currentStepProp = _a.currentStep, _e = _a.hideProgressBars, hideProgressBars = _e === void 0 ? false : _e, stepClassName = _a.stepClassName, className = _a.className, translations = _a.translations, props = __rest$1(_a, ["color", "steps", "defaultStep", "onStepChange", "currentStep", "hideProgressBars", "stepClassName", "className", "translations"]);
1443
+ var _b = _a.color, color = _b === void 0 ? "primary" : _b, _c = _a.steps, stepsProp = _c === void 0 ? [] : _c, _d = _a.defaultStep, defaultStep = _d === void 0 ? 0 : _d, onStepChange = _a.onStepChange, currentStepProp = _a.currentStep, _e = _a.hideProgressBars, hideProgressBars = _e === void 0 ? false : _e, stepClassName = _a.stepClassName, className = _a.className, translations = _a.translations, props = __rest(_a, ["color", "steps", "defaultStep", "onStepChange", "currentStep", "hideProgressBars", "stepClassName", "className", "translations"]);
2547
1444
  var _f = $458b0a5536c1a7cf$export$40bfa8c7b0832715(currentStepProp, defaultStep, onStepChange), currentStep = _f[0], setCurrentStep = _f[1];
2548
- var t = __assign$1(__assign$1({}, defaultTranslations$6), translations);
1445
+ var t = __assign(__assign({}, defaultTranslations$6), translations);
2549
1446
  var steps = React.useMemo(function () {
2550
1447
  if (typeof stepsProp === "number") {
2551
1448
  return Array.from({ length: stepsProp }, function () { return ({}); });
@@ -2610,7 +1507,7 @@ var VerticalSteps = React.forwardRef(function (_a, ref) {
2610
1507
  var isDisabled = status === "inactive";
2611
1508
  return (
2612
1509
  // biome-ignore lint/suspicious/noArrayIndexKey: <explanation>
2613
- jsxRuntime.jsxs("li", { className: "relative", children: [jsxRuntime.jsx("div", { className: "flex w-full max-w-full items-center", children: jsxRuntime.jsxs("button", __assign$1({ type: "button", ref: ref, "aria-current": status === "active" ? "step" : undefined, className: react.cn("group rounded-large flex w-full cursor-pointer items-center justify-center gap-4 px-3 py-2.5", stepClassName, {
1510
+ jsxRuntime.jsxs("li", { className: "relative", children: [jsxRuntime.jsx("div", { className: "flex w-full max-w-full items-center", children: jsxRuntime.jsxs("button", __assign({ type: "button", ref: ref, "aria-current": status === "active" ? "step" : undefined, className: react.cn("group rounded-large flex w-full cursor-pointer items-center justify-center gap-4 px-3 py-2.5", stepClassName, {
2614
1511
  "cursor-not-allowed": isDisabled,
2615
1512
  }), onClick: function () { return setCurrentStep(stepIdx); }, disabled: isDisabled }, props, { children: [jsxRuntime.jsx("div", { className: "flex h-full items-center", children: jsxRuntime.jsx(framerMotion.LazyMotion, { features: framerMotion.domAnimation, children: jsxRuntime.jsx("div", { className: "relative", children: jsxRuntime.jsx(framerMotion.m.div, { animate: status, className: react.cn("border-medium text-large text-default-600 relative flex h-[34px] w-[34px] items-center justify-center rounded-full font-semibold", {
2616
1513
  "shadow-lg": status === "complete",
@@ -2629,7 +1526,7 @@ var VerticalSteps = React.forwardRef(function (_a, ref) {
2629
1526
  backgroundColor: "var(--complete-background-color)",
2630
1527
  borderColor: "var(--complete-border-color)",
2631
1528
  },
2632
- }, children: jsxRuntime.jsx("div", { className: "flex items-center justify-center", children: status === "complete" ? (jsxRuntime.jsx(IconComponent$1, { className: " text-[var(--active-fg-color)] font-bold", icon: "material-symbols:check-rounded", title: t.checkIconTitle })) : (jsxRuntime.jsx("span", { children: stepIdx + 1 })) }) }) }) }) }), jsxRuntime.jsx("div", { className: "flex-1 text-left", children: jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("div", { className: react.cn("text-medium text-default-600 font-medium transition-[color,opacity] duration-300 group-active:opacity-70", {
1529
+ }, children: jsxRuntime.jsx("div", { className: "flex items-center justify-center", children: status === "complete" ? (jsxRuntime.jsx(IconComponent, { className: " text-[var(--active-fg-color)] font-bold", icon: "material-symbols:check-rounded", title: t.checkIconTitle })) : (jsxRuntime.jsx("span", { children: stepIdx + 1 })) }) }) }) }) }), jsxRuntime.jsx("div", { className: "flex-1 text-left", children: jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("div", { className: react.cn("text-medium text-default-600 font-medium transition-[color,opacity] duration-300 group-active:opacity-70", {
2633
1530
  "text-default-300": status === "inactive",
2634
1531
  }), children: step.title }), jsxRuntime.jsx("div", { className: react.cn("text-tiny text-default-600 lg:text-small transition-[color,opacity] duration-300 group-active:opacity-70", {
2635
1532
  "text-default-300": status === "inactive",
@@ -2649,13 +1546,13 @@ var stepperClasses = react.cn(
2649
1546
  // dark
2650
1547
  "dark:[--step-color:rgba(255,255,255,0.1)]", "dark:[--active-color:hsl(var(--heroui-foreground-600))]", "dark:[--active-border-color:rgba(255,255,255,0.5)]", "dark:[--inactive-border-color:rgba(255,255,255,0.1)]", "dark:[--inactive-bar-color:rgba(255,255,255,0.1)]", "dark:[--inactive-color:rgba(255,255,255,0.2)]");
2651
1548
  var MultiStepSidebar = React.forwardRef(function (_a, ref) {
2652
- var children = _a.children, className = _a.className, currentPage = _a.currentPage; _a.onBack; _a.onNext; var onChangePage = _a.onChangePage, steps = _a.steps; _a.goBackTranslation; var onClose = _a.onClose, props = __rest$1(_a, ["children", "className", "currentPage", "onBack", "onNext", "onChangePage", "steps", "goBackTranslation", "onClose"]);
1549
+ var children = _a.children, className = _a.className, currentPage = _a.currentPage; _a.onBack; _a.onNext; var onChangePage = _a.onChangePage, steps = _a.steps; _a.goBackTranslation; var onClose = _a.onClose, props = __rest(_a, ["children", "className", "currentPage", "onBack", "onNext", "onChangePage", "steps", "goBackTranslation", "onClose"]);
2653
1550
  var handleOverlayClick = function (e) {
2654
1551
  if (e.target === e.currentTarget) {
2655
1552
  onClose === null || onClose === void 0 ? void 0 : onClose();
2656
1553
  }
2657
1554
  };
2658
- 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$1({ 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$1, { isIconOnly: true, className: "absolute right-4 top-4", size: "sm", variant: "light", color: "default", onPress: onClose, startContent: jsxRuntime.jsx(IconComponent$1, { 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 })] })] })) }));
1555
+ 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 })] })] })) }));
2659
1556
  });
2660
1557
  MultiStepSidebar.displayName = "MultiStepSidebar";
2661
1558
 
@@ -2663,9 +1560,9 @@ var MultistepNavigationButtons = function (_a) {
2663
1560
  var nextButtonProps = _a.nextButtonProps, cancelButtonProps = _a.cancelButtonProps, className = _a.className;
2664
1561
  // const { children: backButtonChildren, ...restBackButtonProps } =
2665
1562
  // backButtonProps || {};
2666
- var _b = nextButtonProps || {}, nextButtonChildren = _b.children, restNextButtonProps = __rest$1(_b, ["children"]);
2667
- var _c = cancelButtonProps || {}, cancelButtonChildren = _c.children, restCancelButtonProps = __rest$1(_c, ["children"]);
2668
- 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$1({ className: "w-full md:w-auto", color: "default", variant: "flat" }, restCancelButtonProps, { children: cancelButtonChildren || "Cancel" })), jsxRuntime.jsx(react.Button, __assign$1({ className: "w-full md:w-auto", color: "primary" }, restNextButtonProps, { children: nextButtonChildren || "Next" }))] }) }));
1563
+ var _b = nextButtonProps || {}, nextButtonChildren = _b.children, restNextButtonProps = __rest(_b, ["children"]);
1564
+ var _c = cancelButtonProps || {}, cancelButtonChildren = _c.children, restCancelButtonProps = __rest(_c, ["children"]);
1565
+ 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" }))] }) }));
2669
1566
  };
2670
1567
 
2671
1568
  var MultiStepWizard = function (_a) {
@@ -2676,7 +1573,7 @@ var MultiStepWizard = function (_a) {
2676
1573
  setPage(0);
2677
1574
  }
2678
1575
  }, [isOpen]);
2679
- var t = __assign$1({
1576
+ var t = __assign({
2680
1577
  continue: "Continue",
2681
1578
  goBack: "Back",
2682
1579
  cancel: "Cancel",
@@ -2733,7 +1630,7 @@ var MultiStepWizard = function (_a) {
2733
1630
  if (!isOpen) {
2734
1631
  return null;
2735
1632
  }
2736
- 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$1, { className: "w-fit text-default-600 mb-6", color: "default", variant: "light", onPress: onBack, isDisabled: page === 0, startContent: jsxRuntime.jsx(IconComponent$1, { 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: {
1633
+ 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: {
2737
1634
  isDisabled: page === 0,
2738
1635
  onPress: onBack,
2739
1636
  children: t.goBack,
@@ -2748,8 +1645,8 @@ var MultiStepWizard = function (_a) {
2748
1645
  };
2749
1646
 
2750
1647
  var Pagination = function (_a) {
2751
- _a.size; var props = __rest$1(_a, ["size"]);
2752
- return jsxRuntime.jsx(react.Pagination, __assign$1({ showControls: true, isCompact: true }, props));
1648
+ _a.size; var props = __rest(_a, ["size"]);
1649
+ return jsxRuntime.jsx(react.Pagination, __assign({ showControls: true, isCompact: true }, props));
2753
1650
  };
2754
1651
 
2755
1652
  var Andorra = function () {
@@ -3202,7 +2099,7 @@ var Phone = function (_a) {
3202
2099
  var portalDropdownRef = React.useRef(null);
3203
2100
  var _l = React.useState({}), dropdownPosition = _l[0], setDropdownPosition = _l[1];
3204
2101
  var _m = React.useState(uniqueCountries), filteredCountries = _m[0], setFilteredCountries = _m[1];
3205
- var t = __assign$1(__assign$1({}, defaultTranslations$5), translations);
2102
+ var t = __assign(__assign({}, defaultTranslations$5), translations);
3206
2103
  var finalLabel = label || t.label;
3207
2104
  React.useEffect(function () {
3208
2105
  if (value) {
@@ -3291,7 +2188,7 @@ var defaultTranslations$4 = {
3291
2188
  */
3292
2189
  var PromotionalBanner = function (_a) {
3293
2190
  var message = _a.message, buttonText = _a.buttonText, _b = _a.messageHref, messageHref = _b === void 0 ? "#" : _b, _c = _a.buttonHref, buttonHref = _c === void 0 ? "#" : _c, _d = _a.showCloseButton, showCloseButton = _d === void 0 ? true : _d, _e = _a.isVisible, isVisible = _e === void 0 ? true : _e, _f = _a.gradientColors, gradientColors = _f === void 0 ? ["default-100", "danger-100", "secondary-100"] : _f, _g = _a.buttonGradientColors, buttonGradientColors = _g === void 0 ? ["#F871A0", "#9353D3"] : _g, onClose = _a.onClose, onMessageClick = _a.onMessageClick, onButtonClick = _a.onButtonClick, _h = _a.messageLinkProps, messageLinkProps = _h === void 0 ? {} : _h, _j = _a.buttonProps, buttonProps = _j === void 0 ? {} : _j, _k = _a.translations, translations = _k === void 0 ? {} : _k;
3294
- var t = __assign$1(__assign$1({}, defaultTranslations$4), translations);
2191
+ var t = __assign(__assign({}, defaultTranslations$4), translations);
3295
2192
  var finalMessage = message || t.message;
3296
2193
  var finalButtonText = buttonText || t.buttonText;
3297
2194
  var handleClose = function () {
@@ -3308,16 +2205,16 @@ var PromotionalBanner = function (_a) {
3308
2205
  }
3309
2206
  var fromColor = gradientColors[0], viaColor = gradientColors[1], toColor = gradientColors[2];
3310
2207
  var buttonGradient1 = buttonGradientColors[0], buttonGradient2 = buttonGradientColors[1];
3311
- return (jsxRuntime.jsxs("div", { className: "border-divider flex w-full items-center gap-x-3 border-b-1 bg-gradient-to-r from-".concat(fromColor, " via-").concat(viaColor, " to-").concat(toColor, " px-6 py-2 sm:px-3.5 sm:before:flex-1"), children: [jsxRuntime.jsx("p", { className: "text-small text-foreground", children: jsxRuntime.jsxs(react.Link, __assign$1({ className: "text-inherit", href: messageHref, onClick: handleMessageClick }, messageLinkProps, { children: [finalMessage, "\u00A0"] })) }), jsxRuntime.jsx(react.Button, __assign$1({ as: react.Link, className: "group text-small relative h-9 overflow-hidden bg-transparent font-normal", color: "default", endContent: jsxRuntime.jsx(IconComponent$1, { className: "flex-none transition-transform outline-hidden group-data-[hover=true]:translate-x-0.5 [&>path]:stroke-2", icon: "solar:arrow-right-linear", size: "sm" }), href: buttonHref, style: {
2208
+ return (jsxRuntime.jsxs("div", { className: "border-divider flex w-full items-center gap-x-3 border-b-1 bg-gradient-to-r from-".concat(fromColor, " via-").concat(viaColor, " to-").concat(toColor, " px-6 py-2 sm:px-3.5 sm:before:flex-1"), children: [jsxRuntime.jsx("p", { className: "text-small text-foreground", children: jsxRuntime.jsxs(react.Link, __assign({ className: "text-inherit", href: messageHref, onClick: handleMessageClick }, messageLinkProps, { children: [finalMessage, "\u00A0"] })) }), jsxRuntime.jsx(react.Button, __assign({ as: react.Link, className: "group text-small relative h-9 overflow-hidden bg-transparent font-normal", color: "default", endContent: jsxRuntime.jsx(IconComponent, { className: "flex-none transition-transform outline-hidden group-data-[hover=true]:translate-x-0.5 [&>path]:stroke-2", icon: "solar:arrow-right-linear", size: "sm" }), href: buttonHref, style: {
3312
2209
  border: "solid 2px transparent",
3313
2210
  backgroundImage: "linear-gradient(hsl(var(--heroui-danger-50)), hsl(var(--heroui-danger-50))), linear-gradient(to right, ".concat(buttonGradient1, ", ").concat(buttonGradient2, ")"),
3314
2211
  backgroundOrigin: "border-box",
3315
2212
  backgroundClip: "padding-box, border-box",
3316
- }, variant: "bordered", onClick: handleButtonClick }, buttonProps, { children: finalButtonText })), showCloseButton && (jsxRuntime.jsx("div", { className: "flex flex-1 justify-end", children: jsxRuntime.jsx(react.Button, { isIconOnly: true, "aria-label": t.closeButtonLabel, className: "-m-1", size: "lg", variant: "bordered", onClick: handleClose, children: jsxRuntime.jsx(IconComponent$1, { "aria-hidden": "true", className: "text-default-500", icon: "lucide:x", size: "md" }) }) }))] }));
2213
+ }, variant: "bordered", onClick: handleButtonClick }, buttonProps, { children: finalButtonText })), showCloseButton && (jsxRuntime.jsx("div", { className: "flex flex-1 justify-end", children: jsxRuntime.jsx(react.Button, { isIconOnly: true, "aria-label": t.closeButtonLabel, className: "-m-1", size: "lg", variant: "bordered", onClick: handleClose, children: jsxRuntime.jsx(IconComponent, { "aria-hidden": "true", className: "text-default-500", icon: "lucide:x", size: "md" }) }) }))] }));
3317
2214
  };
3318
2215
 
3319
2216
  var RowSteps = React.forwardRef(function (_a, ref) {
3320
- var _b = _a.color, color = _b === void 0 ? "primary" : _b, _c = _a.steps, stepsProp = _c === void 0 ? [] : _c, _d = _a.defaultStep, defaultStep = _d === void 0 ? 0 : _d, onStepChange = _a.onStepChange, currentStepProp = _a.currentStep, _e = _a.hideProgressBars, hideProgressBars = _e === void 0 ? false : _e, stepClassName = _a.stepClassName, className = _a.className; _a.translations; var props = __rest$1(_a, ["color", "steps", "defaultStep", "onStepChange", "currentStep", "hideProgressBars", "stepClassName", "className", "translations"]);
2217
+ var _b = _a.color, color = _b === void 0 ? "primary" : _b, _c = _a.steps, stepsProp = _c === void 0 ? [] : _c, _d = _a.defaultStep, defaultStep = _d === void 0 ? 0 : _d, onStepChange = _a.onStepChange, currentStepProp = _a.currentStep, _e = _a.hideProgressBars, hideProgressBars = _e === void 0 ? false : _e, stepClassName = _a.stepClassName, className = _a.className; _a.translations; var props = __rest(_a, ["color", "steps", "defaultStep", "onStepChange", "currentStep", "hideProgressBars", "stepClassName", "className", "translations"]);
3321
2218
  var _f = $458b0a5536c1a7cf$export$40bfa8c7b0832715(currentStepProp, defaultStep, onStepChange), currentStep = _f[0], setCurrentStep = _f[1];
3322
2219
  var steps = React.useMemo(function () {
3323
2220
  if (typeof stepsProp === "number") {
@@ -3380,7 +2277,7 @@ var RowSteps = React.forwardRef(function (_a, ref) {
3380
2277
  : currentStep < stepIdx
3381
2278
  ? "inactive"
3382
2279
  : "complete";
3383
- return (jsxRuntime.jsx("li", { className: "relative flex w-full items-center pr-12 last:pr-0", children: jsxRuntime.jsxs("button", __assign$1({ type: "button", ref: ref, "aria-current": status === "active" ? "step" : undefined, className: react.cn("group rounded-large flex w-full cursor-pointer flex-row items-center justify-center gap-x-3 py-2.5", stepClassName), onClick: function () { return setCurrentStep(stepIdx); } }, props, { children: [jsxRuntime.jsx("div", { className: "h-ful relative flex items-center", children: jsxRuntime.jsx(framerMotion.LazyMotion, { features: framerMotion.domAnimation, children: jsxRuntime.jsx(framerMotion.m.div, { animate: status, className: "relative", children: jsxRuntime.jsx(framerMotion.m.div, { className: react.cn("border-medium text-large text-default-600 relative flex h-[34px] w-[34px] items-center justify-center rounded-full font-semibold", {
2280
+ return (jsxRuntime.jsx("li", { className: "relative flex w-full items-center pr-12 last:pr-0", children: jsxRuntime.jsxs("button", __assign({ type: "button", ref: ref, "aria-current": status === "active" ? "step" : undefined, className: react.cn("group rounded-large flex w-full cursor-pointer flex-row items-center justify-center gap-x-3 py-2.5", stepClassName), onClick: function () { return setCurrentStep(stepIdx); } }, props, { children: [jsxRuntime.jsx("div", { className: "h-ful relative flex items-center", children: jsxRuntime.jsx(framerMotion.LazyMotion, { features: framerMotion.domAnimation, children: jsxRuntime.jsx(framerMotion.m.div, { animate: status, className: "relative", children: jsxRuntime.jsx(framerMotion.m.div, { className: react.cn("border-medium text-large text-default-600 relative flex h-[34px] w-[34px] items-center justify-center rounded-full font-semibold", {
3384
2281
  "shadow-lg": status === "complete",
3385
2282
  }), initial: false, transition: { duration: 0.25 }, variants: {
3386
2283
  inactive: {
@@ -3397,7 +2294,7 @@ var RowSteps = React.forwardRef(function (_a, ref) {
3397
2294
  backgroundColor: "var(--complete-background-color)",
3398
2295
  borderColor: "var(--complete-border-color)",
3399
2296
  },
3400
- }, children: jsxRuntime.jsx("div", { className: "flex items-center justify-center", children: status === "complete" ? (jsxRuntime.jsx(IconComponent$1, { className: " text-[var(--active-fg-color)] font-bold", icon: "material-symbols:check-rounded" })) : (jsxRuntime.jsx("span", { children: stepIdx + 1 })) }) }) }) }) }), step.title && (jsxRuntime.jsx("div", { className: "max-w-full flex-1 text-start", children: jsxRuntime.jsx("div", { className: react.cn("text-small text-default-600 lg:text-medium font-medium transition-[color,opacity] duration-300 group-active:opacity-80", {
2297
+ }, children: jsxRuntime.jsx("div", { className: "flex items-center justify-center", children: status === "complete" ? (jsxRuntime.jsx(IconComponent, { className: " text-[var(--active-fg-color)] font-bold", icon: "material-symbols:check-rounded" })) : (jsxRuntime.jsx("span", { children: stepIdx + 1 })) }) }) }) }) }), step.title && (jsxRuntime.jsx("div", { className: "max-w-full flex-1 text-start", children: jsxRuntime.jsx("div", { className: react.cn("text-small text-default-600 lg:text-medium font-medium transition-[color,opacity] duration-300 group-active:opacity-80", {
3401
2298
  "text-default-300": status === "inactive",
3402
2299
  }), children: step.title }) })), stepIdx < steps.length - 1 && !hideProgressBars && (jsxRuntime.jsx("div", { "aria-hidden": "true", className: "pointer-events-none absolute right-0 w-10 flex-none items-center", style: {
3403
2300
  // @ts-ignore
@@ -3570,20 +2467,20 @@ class $35ea8db9cb2ccb90$export$680ea196effce5f {
3570
2467
  }
3571
2468
 
3572
2469
  var Switch = function (_a) {
3573
- var id = _a.id, props = __rest$1(_a, ["id"]);
2470
+ var id = _a.id, props = __rest(_a, ["id"]);
3574
2471
  var generatedId = React.useId();
3575
2472
  var autoId = id || generatedId;
3576
- return jsxRuntime.jsx(react.Switch, __assign$1({}, props, { id: autoId }));
2473
+ return jsxRuntime.jsx(react.Switch, __assign({}, props, { id: autoId }));
3577
2474
  };
3578
2475
 
3579
2476
  /**
3580
2477
  * TimeInput genérico reutilizable basado en HeroUI siguiendo las reglas de diseño BeweOS.
3581
2478
  */
3582
2479
  var TimeInput = function (_a) {
3583
- var label = _a.label, id = _a.id, _b = _a.size, size = _b === void 0 ? "md" : _b, _c = _a.radius, radius = _c === void 0 ? "md" : _c, _d = _a.variant, variant = _d === void 0 ? "bordered" : _d, props = __rest$1(_a, ["label", "id", "size", "radius", "variant"]);
2480
+ var label = _a.label, id = _a.id, _b = _a.size, size = _b === void 0 ? "md" : _b, _c = _a.radius, radius = _c === void 0 ? "md" : _c, _d = _a.variant, variant = _d === void 0 ? "bordered" : _d, props = __rest(_a, ["label", "id", "size", "radius", "variant"]);
3584
2481
  var generatedId = React.useId();
3585
2482
  var autoId = id || generatedId;
3586
- return (jsxRuntime.jsx(react.TimeInput, __assign$1({}, props, { id: autoId, size: size, radius: radius, variant: variant, label: label, labelPlacement: "outside-left", classNames: {
2483
+ return (jsxRuntime.jsx(react.TimeInput, __assign({}, props, { id: autoId, size: size, radius: radius, variant: variant, label: label, labelPlacement: "outside-left", classNames: {
3587
2484
  label: "text-default-600 text-tiny group-data-[filled=true]:text-default-600",
3588
2485
  inputWrapper: "focus-within:!border-primary-500",
3589
2486
  } })));
@@ -3678,7 +2575,7 @@ var defaultTranslations$3 = {
3678
2575
  */
3679
2576
  var ScheduleRow = function (_a) {
3680
2577
  var day = _a.day, daySchedule = _a.daySchedule, _b = _a.translations, translations = _b === void 0 ? {} : _b, _c = _a.showCopyToAll, showCopyToAll = _c === void 0 ? false : _c, onChange = _a.onChange, onCopyToAll = _a.onCopyToAll;
3681
- var t = __assign$1(__assign$1({}, defaultTranslations$3), translations);
2578
+ var t = __assign(__assign({}, defaultTranslations$3), translations);
3682
2579
  /**
3683
2580
  * @function validateTimeSlots
3684
2581
  * @description Validates all time slots to ensure the "from" time is not after the "to" time.
@@ -3688,13 +2585,13 @@ var ScheduleRow = function (_a) {
3688
2585
  var validateTimeSlots = function (timeSlots) {
3689
2586
  return timeSlots.map(function (slot) {
3690
2587
  if (slot.from && slot.to) {
3691
- var fromTime = new ($35ea8db9cb2ccb90$export$680ea196effce5f.bind.apply($35ea8db9cb2ccb90$export$680ea196effce5f, __spreadArray$1([void 0], slot.from.split(":").map(Number), false)))();
3692
- var toTime = new ($35ea8db9cb2ccb90$export$680ea196effce5f.bind.apply($35ea8db9cb2ccb90$export$680ea196effce5f, __spreadArray$1([void 0], slot.to.split(":").map(Number), false)))();
2588
+ var fromTime = new ($35ea8db9cb2ccb90$export$680ea196effce5f.bind.apply($35ea8db9cb2ccb90$export$680ea196effce5f, __spreadArray([void 0], slot.from.split(":").map(Number), false)))();
2589
+ var toTime = new ($35ea8db9cb2ccb90$export$680ea196effce5f.bind.apply($35ea8db9cb2ccb90$export$680ea196effce5f, __spreadArray([void 0], slot.to.split(":").map(Number), false)))();
3693
2590
  if (fromTime.compare(toTime) > 0) {
3694
- return __assign$1(__assign$1({}, slot), { error: "From time cannot be after to time" });
2591
+ return __assign(__assign({}, slot), { error: "From time cannot be after to time" });
3695
2592
  }
3696
2593
  }
3697
- return __assign$1(__assign$1({}, slot), { error: null });
2594
+ return __assign(__assign({}, slot), { error: null });
3698
2595
  });
3699
2596
  };
3700
2597
  /**
@@ -3728,7 +2625,7 @@ var ScheduleRow = function (_a) {
3728
2625
  * @description Toggles the `isOpen` status of the schedule for the day.
3729
2626
  */
3730
2627
  var handleToggleDay = function () {
3731
- onChange(__assign$1(__assign$1({}, daySchedule), { isOpen: !daySchedule.isOpen }));
2628
+ onChange(__assign(__assign({}, daySchedule), { isOpen: !daySchedule.isOpen }));
3732
2629
  };
3733
2630
  /**
3734
2631
  * @function handleTimeChange
@@ -3739,11 +2636,11 @@ var ScheduleRow = function (_a) {
3739
2636
  */
3740
2637
  var handleTimeChange = function (index, field, value) {
3741
2638
  var _a;
3742
- var newTimeSlots = __spreadArray$1([], daySchedule.timeSlots, true);
2639
+ var newTimeSlots = __spreadArray([], daySchedule.timeSlots, true);
3743
2640
  // Update the specific field
3744
- newTimeSlots[index] = __assign$1(__assign$1({}, newTimeSlots[index]), (_a = {}, _a[field] = fromTimeValue(value), _a));
2641
+ newTimeSlots[index] = __assign(__assign({}, newTimeSlots[index]), (_a = {}, _a[field] = fromTimeValue(value), _a));
3745
2642
  var validatedSlots = validateTimeSlots(newTimeSlots);
3746
- onChange(__assign$1(__assign$1({}, daySchedule), { timeSlots: validatedSlots }));
2643
+ onChange(__assign(__assign({}, daySchedule), { timeSlots: validatedSlots }));
3747
2644
  };
3748
2645
  /**
3749
2646
  * @function handleAddTimeSlot
@@ -3752,9 +2649,9 @@ var ScheduleRow = function (_a) {
3752
2649
  */
3753
2650
  var handleAddTimeSlot = function () {
3754
2651
  // Add a new empty slot
3755
- var newTimeSlots = __spreadArray$1(__spreadArray$1([], daySchedule.timeSlots, true), [{ from: "", to: "" }], false);
2652
+ var newTimeSlots = __spreadArray(__spreadArray([], daySchedule.timeSlots, true), [{ from: "", to: "" }], false);
3756
2653
  var validatedSlots = validateTimeSlots(newTimeSlots);
3757
- onChange(__assign$1(__assign$1({}, daySchedule), { timeSlots: validatedSlots }));
2654
+ onChange(__assign(__assign({}, daySchedule), { timeSlots: validatedSlots }));
3758
2655
  };
3759
2656
  /**
3760
2657
  * @function handleRemoveTimeSlot
@@ -3768,7 +2665,7 @@ var ScheduleRow = function (_a) {
3768
2665
  if (newTimeSlots.length === 0) {
3769
2666
  newTimeSlots = [{ from: "", to: "" }];
3770
2667
  }
3771
- onChange(__assign$1(__assign$1({}, daySchedule), { timeSlots: newTimeSlots }));
2668
+ onChange(__assign(__assign({}, daySchedule), { timeSlots: newTimeSlots }));
3772
2669
  };
3773
2670
  /**
3774
2671
  * @function getSlotsToDisplay
@@ -3785,12 +2682,12 @@ var ScheduleRow = function (_a) {
3785
2682
  // Return slots exactly as they are - no automatic additions
3786
2683
  return slots;
3787
2684
  };
3788
- return (jsxRuntime.jsxs("div", { className: "flex flex-col w-full gap-y-4 last:border-b-0 last:mb-0 last:pb-0 border-b border-default-200 xs:py-4 xl:p-4 first:pt-0", children: [jsxRuntime.jsxs("div", { className: "flex w-full items-center justify-between", children: [jsxRuntime.jsxs("div", { className: "flex xs:space-x-2 sm:space-x-4", children: [jsxRuntime.jsx("h3", { className: "text-small font-semibold text-default-900 capitalize", children: day }), jsxRuntime.jsx(react.Chip, { size: "sm", color: daySchedule.isOpen ? "primary" : "default", className: "text-background", children: daySchedule.isOpen ? t.open : t.closed })] }), jsxRuntime.jsxs("div", { className: "flex xs:gap-2 sm:gap-5", children: [jsxRuntime.jsx(Switch, { size: "sm", color: "primary", isSelected: daySchedule.isOpen, onValueChange: handleToggleDay }), showCopyToAll && onCopyToAll && (jsxRuntime.jsx(Button$1, { size: "sm", variant: "bordered", onPress: function () { return onCopyToAll(day); }, children: t.copyToAll }))] })] }), daySchedule.isOpen && (jsxRuntime.jsx("div", { className: "flex flex-col justify-around gap-y-3 ", children: getSlotsToDisplay().map(function (slot, index) {
2685
+ return (jsxRuntime.jsxs("div", { className: "flex flex-col w-full gap-y-4 last:border-b-0 last:mb-0 last:pb-0 border-b border-default-200 xs:py-4 xl:p-4 first:pt-0", children: [jsxRuntime.jsxs("div", { className: "flex w-full items-center justify-between", children: [jsxRuntime.jsxs("div", { className: "flex xs:space-x-2 sm:space-x-4", children: [jsxRuntime.jsx("h3", { className: "text-small font-semibold text-default-900 capitalize", children: day }), jsxRuntime.jsx(react.Chip, { size: "sm", color: daySchedule.isOpen ? "primary" : "default", className: "text-background", children: daySchedule.isOpen ? t.open : t.closed })] }), jsxRuntime.jsxs("div", { className: "flex xs:gap-2 sm:gap-5", children: [jsxRuntime.jsx(Switch, { size: "sm", color: "primary", isSelected: daySchedule.isOpen, onValueChange: handleToggleDay }), showCopyToAll && onCopyToAll && (jsxRuntime.jsx(Button, { size: "sm", variant: "bordered", onPress: function () { return onCopyToAll(day); }, children: t.copyToAll }))] })] }), daySchedule.isOpen && (jsxRuntime.jsx("div", { className: "flex flex-col justify-around gap-y-3 ", children: getSlotsToDisplay().map(function (slot, index) {
3789
2686
  var slotsToDisplay = getSlotsToDisplay();
3790
2687
  var isLastSlot = index === slotsToDisplay.length - 1;
3791
2688
  var isSlotFilled = slot.from && slot.to;
3792
2689
  var canDelete = slotsToDisplay.length > 1;
3793
- return (jsxRuntime.jsxs("div", { className: "flex items-center gap-1 w-full justify-between", children: [jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-1", children: [jsxRuntime.jsx(TimeInput, { label: t.from, className: "w-full", value: toTimeValue(slot.from), onChange: function (value) { return handleTimeChange(index, "from", value); }, isInvalid: !!slot.error }), jsxRuntime.jsx("span", { className: "text-default-900 xs:hidden xl:block", children: "-" }), jsxRuntime.jsx(TimeInput, { label: t.to, className: "w-full", value: toTimeValue(slot.to), onChange: function (value) { return handleTimeChange(index, "to", value); }, isInvalid: !!slot.error, errorMessage: slot.error })] }), isLastSlot ? (jsxRuntime.jsx(Button$1, { isIconOnly: true, size: "sm", color: "primary", variant: "light", onPress: handleAddTimeSlot, isDisabled: !isSlotFilled, startContent: jsxRuntime.jsx(IconComponent$1, { icon: "solar:add-circle-bold" }) })) : (jsxRuntime.jsx(Button$1, { isIconOnly: true, size: "sm", color: "danger", variant: "light", onPress: function () { return handleRemoveTimeSlot(index); }, isDisabled: !canDelete, startContent: jsxRuntime.jsx(IconComponent$1, { icon: "solar:trash-bin-minimalistic-outline" }) }))] }, "".concat(day, "-timeslot-").concat(index)));
2690
+ return (jsxRuntime.jsxs("div", { className: "flex items-center gap-1 w-full justify-between", children: [jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-1", children: [jsxRuntime.jsx(TimeInput, { label: t.from, className: "w-full", value: toTimeValue(slot.from), onChange: function (value) { return handleTimeChange(index, "from", value); }, isInvalid: !!slot.error }), jsxRuntime.jsx("span", { className: "text-default-900 xs:hidden xl:block", children: "-" }), jsxRuntime.jsx(TimeInput, { label: t.to, className: "w-full", value: toTimeValue(slot.to), onChange: function (value) { return handleTimeChange(index, "to", value); }, isInvalid: !!slot.error, errorMessage: slot.error })] }), isLastSlot ? (jsxRuntime.jsx(Button, { isIconOnly: true, size: "sm", color: "primary", variant: "light", onPress: handleAddTimeSlot, isDisabled: !isSlotFilled, startContent: jsxRuntime.jsx(IconComponent, { icon: "solar:add-circle-bold" }) })) : (jsxRuntime.jsx(Button, { isIconOnly: true, size: "sm", color: "danger", variant: "light", onPress: function () { return handleRemoveTimeSlot(index); }, isDisabled: !canDelete, startContent: jsxRuntime.jsx(IconComponent, { icon: "solar:trash-bin-minimalistic-outline" }) }))] }, "".concat(day, "-timeslot-").concat(index)));
3794
2691
  }) }))] }, day));
3795
2692
  };
3796
2693
 
@@ -3804,11 +2701,11 @@ var ScheduleRow = function (_a) {
3804
2701
  * - Follows BeweOS design guidelines
3805
2702
  */
3806
2703
  var SearchInput = function (_a) {
3807
- var _b = _a.searchPlaceholder, searchPlaceholder = _b === void 0 ? "Buscar..." : _b, _c = _a.searchIcon, searchIcon = _c === void 0 ? "solar:magnifer-outline" : _c, iconProps = _a.iconProps, onSearchChange = _a.onSearchChange, searchValue = _a.searchValue, value = _a.value, onValueChange = _a.onValueChange, placeholder = _a.placeholder, _d = _a.size, size = _d === void 0 ? "sm" : _d, _e = _a.className, className = _e === void 0 ? "flex-1 max-w-xs min-w-52" : _e, props = __rest$1(_a, ["searchPlaceholder", "searchIcon", "iconProps", "onSearchChange", "searchValue", "value", "onValueChange", "placeholder", "size", "className"]);
2704
+ var _b = _a.searchPlaceholder, searchPlaceholder = _b === void 0 ? "Buscar..." : _b, _c = _a.searchIcon, searchIcon = _c === void 0 ? "solar:magnifer-outline" : _c, iconProps = _a.iconProps, onSearchChange = _a.onSearchChange, searchValue = _a.searchValue, value = _a.value, onValueChange = _a.onValueChange, placeholder = _a.placeholder, _d = _a.size, size = _d === void 0 ? "sm" : _d, _e = _a.className, className = _e === void 0 ? "flex-1 max-w-xs min-w-52" : _e, props = __rest(_a, ["searchPlaceholder", "searchIcon", "iconProps", "onSearchChange", "searchValue", "value", "onValueChange", "placeholder", "size", "className"]);
3808
2705
  // Use searchValue/onSearchChange if provided, otherwise fall back to value/onValueChange
3809
2706
  var inputValue = searchValue !== null && searchValue !== void 0 ? searchValue : value;
3810
2707
  var handleValueChange = onSearchChange !== null && onSearchChange !== void 0 ? onSearchChange : onValueChange;
3811
- return (jsxRuntime.jsx(Input, __assign$1({}, props, { className: className, size: size, placeholder: placeholder || searchPlaceholder, value: inputValue, onValueChange: handleValueChange, endContent: jsxRuntime.jsx(IconComponent$1, __assign$1({ icon: searchIcon, className: "text-default-400", size: "sm" }, iconProps)) })));
2708
+ return (jsxRuntime.jsx(Input, __assign({}, props, { className: className, size: size, placeholder: placeholder || searchPlaceholder, value: inputValue, onValueChange: handleValueChange, endContent: jsxRuntime.jsx(IconComponent, __assign({ icon: searchIcon, className: "text-default-400", size: "sm" }, iconProps)) })));
3812
2709
  };
3813
2710
 
3814
2711
  /**
@@ -3821,10 +2718,10 @@ var SearchInput = function (_a) {
3821
2718
  * - Size: sm, md, lg (configurable)
3822
2719
  */
3823
2720
  var Select = function (_a) {
3824
- var label = _a.label, id = _a.id, _b = _a.size, size = _b === void 0 ? "md" : _b, _c = _a.variant, variant = _c === void 0 ? "bordered" : _c, _d = _a.radius, radius = _d === void 0 ? "md" : _d, placeholder = _a.placeholder, props = __rest$1(_a, ["label", "id", "size", "variant", "radius", "placeholder"]);
2721
+ var label = _a.label, id = _a.id, _b = _a.size, size = _b === void 0 ? "md" : _b, _c = _a.variant, variant = _c === void 0 ? "bordered" : _c, _d = _a.radius, radius = _d === void 0 ? "md" : _d, placeholder = _a.placeholder, props = __rest(_a, ["label", "id", "size", "variant", "radius", "placeholder"]);
3825
2722
  var generatedId = React.useId();
3826
2723
  var selectId = id || generatedId;
3827
- return (jsxRuntime.jsx("div", { className: "group", children: jsxRuntime.jsx(react.Select, __assign$1({}, props, { id: selectId, label: label, labelPlacement: "outside", placeholder: placeholder, variant: variant, size: size, radius: radius, classNames: {
2724
+ return (jsxRuntime.jsx("div", { className: "group", children: jsxRuntime.jsx(react.Select, __assign({}, props, { id: selectId, label: label, labelPlacement: "outside", placeholder: placeholder, variant: variant, size: size, radius: radius, classNames: {
3828
2725
  label: "text-default-600 text-tiny group-data-[filled=true]:text-default-600",
3829
2726
  trigger: "data-[open=true]:!border-primary-500 data-[focus=true]:!border-primary-500 data-[disabled=true]:bg-default-100",
3830
2727
  popoverContent: "[&_[data-focus-visible=true]]:!outline-none [&_[data-selectable=true]:focus]:!bg-primary-50 [&_li]:!text-default-500 [&_li[data-hover=true]]:!text-default-600",
@@ -3832,18 +2729,18 @@ var Select = function (_a) {
3832
2729
  };
3833
2730
 
3834
2731
  function AuraTable(_a) {
3835
- var columns = _a.columns, items = _a.items, renderCell = _a.renderCell, children = _a.children, props = __rest$1(_a, ["columns", "items", "renderCell", "children"]);
3836
- return (jsxRuntime.jsxs(react.Table, __assign$1({ removeWrapper: true, radius: "none" }, props, { children: [jsxRuntime.jsx(react.TableHeader, { columns: columns, children: function (column) { return jsxRuntime.jsx(react.TableColumn, { children: column.label }, column.key); } }), jsxRuntime.jsx(react.TableBody, { items: items, children: function (item) { return (jsxRuntime.jsx(react.TableRow, { children: function (columnKey) { return (jsxRuntime.jsx(react.TableCell, { children: renderCell ? renderCell(item, columnKey) : children })); } }, item.id)); } })] })));
2732
+ var columns = _a.columns, items = _a.items, renderCell = _a.renderCell, children = _a.children, props = __rest(_a, ["columns", "items", "renderCell", "children"]);
2733
+ return (jsxRuntime.jsxs(react.Table, __assign({ removeWrapper: true, radius: "none" }, props, { children: [jsxRuntime.jsx(react.TableHeader, { columns: columns, children: function (column) { return jsxRuntime.jsx(react.TableColumn, { children: column.label }, column.key); } }), jsxRuntime.jsx(react.TableBody, { items: items, children: function (item) { return (jsxRuntime.jsx(react.TableRow, { children: function (columnKey) { return (jsxRuntime.jsx(react.TableCell, { children: renderCell ? renderCell(item, columnKey) : children })); } }, item.id)); } })] })));
3837
2734
  }
3838
2735
 
3839
2736
  /**
3840
2737
  * Textarea component that wraps the HeroUI TextArea component.
3841
2738
  */
3842
2739
  var Textarea = function (_a) {
3843
- var id = _a.id, label = _a.label, placeholder = _a.placeholder, description = _a.description, errorMessage = _a.errorMessage, _b = _a.variant, variant = _b === void 0 ? "bordered" : _b, _c = _a.radius, radius = _c === void 0 ? "md" : _c, _d = _a.size, size = _d === void 0 ? "md" : _d; _a.labelPlacement; var props = __rest$1(_a, ["id", "label", "placeholder", "description", "errorMessage", "variant", "radius", "size", "labelPlacement"]);
2740
+ var id = _a.id, label = _a.label, placeholder = _a.placeholder, description = _a.description, errorMessage = _a.errorMessage, _b = _a.variant, variant = _b === void 0 ? "bordered" : _b, _c = _a.radius, radius = _c === void 0 ? "md" : _c, _d = _a.size, size = _d === void 0 ? "md" : _d; _a.labelPlacement; var props = __rest(_a, ["id", "label", "placeholder", "description", "errorMessage", "variant", "radius", "size", "labelPlacement"]);
3844
2741
  var generatedId = React.useId();
3845
2742
  var autoId = id || generatedId;
3846
- return (jsxRuntime.jsx(react.Textarea, __assign$1({}, props, { id: autoId, label: label, variant: variant, radius: radius, size: size, labelPlacement: "outside", placeholder: placeholder, description: description, errorMessage: errorMessage, classNames: {
2743
+ return (jsxRuntime.jsx(react.Textarea, __assign({}, props, { id: autoId, label: label, variant: variant, radius: radius, size: size, labelPlacement: "outside", placeholder: placeholder, description: description, errorMessage: errorMessage, classNames: {
3847
2744
  label: "text-default-600 text-tiny group-data-[filled=true]:text-default-600",
3848
2745
  inputWrapper: "data-[focus=true]:!border-primary-500 data-[focus=true]:!border-primary-500",
3849
2746
  } })));
@@ -3866,7 +2763,7 @@ var defaultTranslations$2 = {
3866
2763
  var ThemePicker = function (_a) {
3867
2764
  var value = _a.value, onChange = _a.onChange, className = _a.className, _b = _a.translations, translations = _b === void 0 ? {} : _b;
3868
2765
  // Combinar traducciones por defecto con las proporcionadas
3869
- var t = __assign$1(__assign$1({}, defaultTranslations$2), translations);
2766
+ var t = __assign(__assign({}, defaultTranslations$2), translations);
3870
2767
  var themes = [
3871
2768
  {
3872
2769
  key: "light",
@@ -4219,7 +3116,7 @@ var FilePreview = function (_a) {
4219
3116
  if (!(file === null || file === void 0 ? void 0 : file.type.startsWith("image/"))) {
4220
3117
  return null;
4221
3118
  }
4222
- return (jsxRuntime.jsxs("div", { className: "absolute inset-0 overflow-hidden z-10", children: [jsxRuntime.jsx("img", { src: previewUrl, alt: file.name, className: "w-full h-full object-cover" }), jsxRuntime.jsx(react.Button, { isIconOnly: true, size: "sm", color: "danger", variant: "solid", className: "absolute top-2 right-2 sm:top-3 sm:right-3 z-20 bg-red-100 hover:bg-red-200 text-red-600 min-w-8 h-8 sm:min-w-10 sm:h-10", onPress: onRemove, "aria-label": removeAriaLabel, children: jsxRuntime.jsx(IconComponent$1, { icon: "heroicons:trash", size: "sm" }) })] }));
3119
+ return (jsxRuntime.jsxs("div", { className: "absolute inset-0 overflow-hidden z-10", children: [jsxRuntime.jsx("img", { src: previewUrl, alt: file.name, className: "w-full h-full object-cover" }), jsxRuntime.jsx(react.Button, { isIconOnly: true, size: "sm", color: "danger", variant: "solid", className: "absolute top-2 right-2 sm:top-3 sm:right-3 z-20 bg-red-100 hover:bg-red-200 text-red-600 min-w-8 h-8 sm:min-w-10 sm:h-10", onPress: onRemove, "aria-label": removeAriaLabel, children: jsxRuntime.jsx(IconComponent, { icon: "heroicons:trash", size: "sm" }) })] }));
4223
3120
  };
4224
3121
  /**
4225
3122
  * Componente UploadDocument basado en Hero UI con funcionalidad mejorada
@@ -4258,7 +3155,7 @@ var UploadFile = function (_a) {
4258
3155
  var _q = React.useState(""), selectedImageUrl = _q[0], setSelectedImageUrl = _q[1];
4259
3156
  var _r = React.useState(null); _r[0]; var setOriginalFile = _r[1];
4260
3157
  // Combinar traducciones por defecto con las proporcionadas
4261
- var t = React.useMemo(function () { return (__assign$1(__assign$1({}, defaultTranslations$1), translations)); }, [translations]);
3158
+ var t = React.useMemo(function () { return (__assign(__assign({}, defaultTranslations$1), translations)); }, [translations]);
4262
3159
  // Actualizar texto si se pasa como prop (retrocompatibilidad)
4263
3160
  var finalText = text || t.uploadText;
4264
3161
  var finalSubText = subText || t.subText;
@@ -4430,7 +3327,7 @@ var UploadFile = function (_a) {
4430
3327
  var subTextClasses = "\n\t\ttext-tiny text-center\n\t\t".concat(disabled ? "text-default-400" : "text-default-500 dark:text-default-400", "\n\t");
4431
3328
  return (jsxRuntime.jsxs("div", { className: "relative", children: [jsxRuntime.jsx(react.Card, { className: containerClasses, style: containerStyle, isPressable: !(disabled || uploadImageRef.current), onPress: handleClick, children: jsxRuntime.jsxs(react.CardBody, { className: "flex flex-col items-center justify-center relative overflow-hidden ".concat(size === "micro" ? "gap-1" : size === "small" ? "gap-1.5" : "gap-3 sm:gap-4"), onDragEnter: handleDragEnter, onDragOver: handleDragOver, onDragLeave: handleDragLeave, onDrop: handleDrop, children: [uploadImageRef.current && (jsxRuntime.jsx(FilePreview, { file: uploadImageRef.current, onRemove: handleRemoveImage, removeAriaLabel: t.removeFileAriaLabel })), jsxRuntime.jsx("div", { className: uploadImageRef.current
4432
3329
  ? "opacity-0"
4433
- : "opacity-100 transition-opacity", children: jsxRuntime.jsxs("div", { className: "flex flex-col items-center ".concat(size === "micro" ? "gap-1" : size === "small" ? "gap-1.5" : "gap-3 sm:gap-4"), children: [jsxRuntime.jsx(IconComponent$1, { icon: icon, size: size === "micro" ? "sm" : size === "small" ? "md" : "xl", className: "".concat(size === "micro" ? "text-lg"
3330
+ : "opacity-100 transition-opacity", children: jsxRuntime.jsxs("div", { className: "flex flex-col items-center ".concat(size === "micro" ? "gap-1" : size === "small" ? "gap-1.5" : "gap-3 sm:gap-4"), children: [jsxRuntime.jsx(IconComponent, { icon: icon, size: size === "micro" ? "sm" : size === "small" ? "md" : "xl", className: "".concat(size === "micro" ? "text-lg"
4434
3331
  : size === "small" ? "text-xl sm:text-2xl"
4435
3332
  : "sm:text-4xl lg:text-5xl", " ").concat(disabled ? "text-gray-400" : iconColor || "text-primary") }), shouldShowText && (jsxRuntime.jsxs("div", { className: "text-center ".concat(size === "micro" ? "px-0.5"
4436
3333
  : size === "small" ? "px-1"
@@ -4485,7 +3382,7 @@ function WizardSidebar(_a) {
4485
3382
  ? "bg-primary-600 text-white shadow-lg scale-110 border-2 border-primary-600"
4486
3383
  : isCompleted
4487
3384
  ? "border-2 border-primary-600 dark:border-primary-400 text-primary-600 dark:text-primary-400 bg-transparent"
4488
- : "border-2 border-primary-300 dark:border-primary-700 text-primary-400 dark:text-primary-500 bg-transparent"), children: step.icon ? (jsxRuntime.jsx(IconComponent$1, { icon: step.icon, className: "text-base" })) : isCompleted ? (jsxRuntime.jsx(IconComponent$1, { icon: "solar:check-circle-bold", className: "text-base" })) : (step.number) }), jsxRuntime.jsx("div", { className: "flex-1 min-w-0", children: jsxRuntime.jsx("p", { className: "text-xs font-medium transition-colors leading-tight ".concat(isActive
3385
+ : "border-2 border-primary-300 dark:border-primary-700 text-primary-400 dark:text-primary-500 bg-transparent"), children: step.icon ? (jsxRuntime.jsx(IconComponent, { icon: step.icon, className: "text-base" })) : isCompleted ? (jsxRuntime.jsx(IconComponent, { icon: "solar:check-circle-bold", className: "text-base" })) : (step.number) }), jsxRuntime.jsx("div", { className: "flex-1 min-w-0", children: jsxRuntime.jsx("p", { className: "text-xs font-medium transition-colors leading-tight ".concat(isActive
4489
3386
  ? "text-primary-600 dark:text-primary-400"
4490
3387
  : isCompleted
4491
3388
  ? "text-primary-600 dark:text-primary-400"
@@ -4515,8 +3412,8 @@ function WizardNavigation(_a) {
4515
3412
  onNext();
4516
3413
  }
4517
3414
  };
4518
- return (jsxRuntime.jsxs("div", { className: "flex justify-between items-center ".concat(className), children: [showBack && !isFirstStep ? (jsxRuntime.jsx(react.Button, { variant: "light", size: "md", onPress: onBack, isDisabled: isBackDisabled || isLoading, startContent: jsxRuntime.jsx(IconComponent$1, { icon: "solar:alt-arrow-left-bold", className: "text-base" }), children: effectiveBackText })) : (jsxRuntime.jsx("div", {}) // Spacer para mantener el botón "Siguiente" a la derecha
4519
- ), jsxRuntime.jsx(react.Button, { color: "primary", variant: "solid", size: "md", onPress: handleNext, isDisabled: isNextDisabled || isLoading, isLoading: isLoading, endContent: isLastStep ? (jsxRuntime.jsx(IconComponent$1, { icon: "solar:check-circle-bold", className: "text-base" })) : (jsxRuntime.jsx(IconComponent$1, { icon: "solar:alt-arrow-right-bold", className: "text-base" })), children: isLastStep ? effectiveFinishText : effectiveNextText })] }));
3415
+ return (jsxRuntime.jsxs("div", { className: "flex justify-between items-center ".concat(className), children: [showBack && !isFirstStep ? (jsxRuntime.jsx(react.Button, { variant: "light", size: "md", onPress: onBack, isDisabled: isBackDisabled || isLoading, startContent: jsxRuntime.jsx(IconComponent, { icon: "solar:alt-arrow-left-bold", className: "text-base" }), children: effectiveBackText })) : (jsxRuntime.jsx("div", {}) // Spacer para mantener el botón "Siguiente" a la derecha
3416
+ ), jsxRuntime.jsx(react.Button, { color: "primary", variant: "solid", size: "md", onPress: handleNext, isDisabled: isNextDisabled || isLoading, isLoading: isLoading, endContent: isLastStep ? (jsxRuntime.jsx(IconComponent, { icon: "solar:check-circle-bold", className: "text-base" })) : (jsxRuntime.jsx(IconComponent, { icon: "solar:alt-arrow-right-bold", className: "text-base" })), children: isLastStep ? effectiveFinishText : effectiveNextText })] }));
4520
3417
  }
4521
3418
 
4522
3419
  /**
@@ -4570,7 +3467,7 @@ function Wizard(_a) {
4570
3467
  var steps = _a.steps, currentStep = _a.currentStep, onStepChange = _a.onStepChange, renderStep = _a.renderStep, _b = _a.navigationConfig, navigationConfig = _b === void 0 ? {} : _b, _c = _a.validations, validations = _c === void 0 ? [] : _c, onComplete = _a.onComplete, onBeforeStepChange = _a.onBeforeStepChange, onAfterStepChange = _a.onAfterStepChange, _d = _a.showSidebar, showSidebar = _d === void 0 ? true : _d, _e = _a.sidebarPosition, sidebarPosition = _e === void 0 ? "left" : _e, _f = _a.minHeight, minHeight = _f === void 0 ? "600px" : _f, _g = _a.className, className = _g === void 0 ? "" : _g, _h = _a.isLoading, isLoading = _h === void 0 ? false : _h, loadingText = _a.loadingText, _j = _a.isDisabled, isDisabled = _j === void 0 ? false : _j, _k = _a.translations, translations = _k === void 0 ? {} : _k;
4571
3468
  var _l = React.useState(false), isTransitioning = _l[0], setIsTransitioning = _l[1];
4572
3469
  // Merge default translations with provided ones
4573
- var t = React.useMemo(function () { return (__assign$1(__assign$1({}, defaultTranslations), translations)); }, [translations]);
3470
+ var t = React.useMemo(function () { return (__assign(__assign({}, defaultTranslations), translations)); }, [translations]);
4574
3471
  // Use loadingText prop for backward compatibility, but prefer translations
4575
3472
  var effectiveLoadingText = loadingText !== null && loadingText !== void 0 ? loadingText : t.loadingText;
4576
3473
  // Configuración de navegación con valores por defecto
@@ -4808,7 +3705,7 @@ var NavigationLoadingOverlay = function (_a) {
4808
3705
  var DrawerFiltersFooter = function (_a) {
4809
3706
  var onClearFilters = _a.onClearFilters, onCancel = _a.onCancel, onApplyFilters = _a.onApplyFilters, _b = _a.translations, translations = _b === void 0 ? {} : _b;
4810
3707
  var _c = translations.clearFilters, clearFilters = _c === void 0 ? "Limpiar filtro" : _c, _d = translations.cancel, cancel = _d === void 0 ? "Cancelar" : _d, _e = translations.applyFilters, applyFilters = _e === void 0 ? "Aplicar filtro" : _e;
4811
- return (jsxRuntime.jsxs("div", { className: "flex items-center justify-between px-6 py-10 bg-content1", children: [jsxRuntime.jsx(Button$1, { variant: "light", color: "primary", onPress: onClearFilters, className: "text-primary", children: clearFilters }), jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [jsxRuntime.jsx(Button$1, { variant: "bordered", color: "primary", onPress: onCancel, children: cancel }), jsxRuntime.jsx(Button$1, { variant: "solid", color: "primary", onPress: onApplyFilters, children: applyFilters })] })] }));
3708
+ return (jsxRuntime.jsxs("div", { className: "flex items-center justify-between px-6 py-10 bg-content1", children: [jsxRuntime.jsx(Button, { variant: "light", color: "primary", onPress: onClearFilters, className: "text-primary", children: clearFilters }), jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [jsxRuntime.jsx(Button, { variant: "bordered", color: "primary", onPress: onCancel, children: cancel }), jsxRuntime.jsx(Button, { variant: "solid", color: "primary", onPress: onApplyFilters, children: applyFilters })] })] }));
4812
3709
  };
4813
3710
 
4814
3711
  /**
@@ -4843,7 +3740,7 @@ var RangeFilter = function (_a) {
4843
3740
  tooltipProducts: "productos",
4844
3741
  tooltipProduct: "producto",
4845
3742
  };
4846
- var t = __assign$1(__assign$1({}, defaultTranslations), translations);
3743
+ var t = __assign(__assign({}, defaultTranslations), translations);
4847
3744
  // Function to check if a bar is in the selected range
4848
3745
  var isBarInRange = function (barStart, barEnd) {
4849
3746
  return barStart >= currentValue[0] && barEnd <= currentValue[1];
@@ -4885,7 +3782,7 @@ var RangeFilter = function (_a) {
4885
3782
  alignSelf: "flex-end",
4886
3783
  opacity: inRange ? 1 : 0.4,
4887
3784
  }, title: "".concat(bar.priceRange, ": ").concat(bar.count, " ").concat(bar.count !== 1 ? t.tooltipProducts : t.tooltipProduct), children: jsxRuntime.jsx("div", { className: "absolute bottom-full left-1/2 transform -translate-x-1/2 mb-1 px-2 py-1 bg-default-900 text-white text-xs rounded opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none whitespace-nowrap z-10", children: jsxRuntime.jsxs("div", { className: "text-center", children: [jsxRuntime.jsx("div", { className: "font-medium", children: formatValue(bar.midPrice) }), jsxRuntime.jsxs("div", { className: "text-xs opacity-75", children: [bar.count, " ", bar.count !== 1 ? t.tooltipProducts : t.tooltipProduct] })] }) }) }, "".concat(bar.binStart, "-").concat(bar.binEnd)));
4888
- }) }) }), jsxRuntime.jsx("div", { className: "px-2", children: jsxRuntime.jsx(react.Slider, __assign$1({ step: step, minValue: minValue, maxValue: maxValue, defaultValue: [minValue, maxValue], value: currentValue, onChange: function (newValue) {
3785
+ }) }) }), jsxRuntime.jsx("div", { className: "px-2", children: jsxRuntime.jsx(react.Slider, __assign({ step: step, minValue: minValue, maxValue: maxValue, defaultValue: [minValue, maxValue], value: currentValue, onChange: function (newValue) {
4889
3786
  var _a = newValue, min = _a[0], max = _a[1];
4890
3787
  setCurrentValue([min, max]);
4891
3788
  onChange([min, max]);
@@ -4999,7 +3896,7 @@ var FilterSection = function (_a) {
4999
3896
  "--tw-shadow-colored": "var(--heroui-box-shadow-medium)",
5000
3897
  }, children: [jsxRuntime.jsxs("button", { type: "button", className: "flex items-center justify-between w-full text-left p-4", onClick: handleToggleExpanded, children: [jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [jsxRuntime.jsx(H2, { className: "text-base font-normal text-foreground", children: filter.title }), hasActiveFilter() && (jsxRuntime.jsx("span", { className: "text-xs px-2 py-1 rounded-full text-black dark:text-white", style: {
5001
3898
  backgroundColor: "hsl(var(--heroui-default) / var(--heroui-default-opacity, var(--tw-bg-opacity)))",
5002
- }, children: getActiveFilterCount() }))] }), jsxRuntime.jsx(IconComponent$1, { icon: internalExpanded
3899
+ }, children: getActiveFilterCount() }))] }), jsxRuntime.jsx(IconComponent, { icon: internalExpanded
5003
3900
  ? "solar:alt-arrow-down-outline"
5004
3901
  : "solar:alt-arrow-right-outline", size: "sm", className: "text-default-500" })] }), internalExpanded && (jsxRuntime.jsxs("div", { className: "px-4 pb-4", onClick: function (e) { return e.stopPropagation(); }, children: [filter.description && (jsxRuntime.jsx(P, { className: "text-default-500 mb-4", children: filter.description })), renderFilterContent()] }))] }));
5005
3902
  };
@@ -5122,7 +4019,7 @@ var DrawerFilters = function (_a) {
5122
4019
  var handleFilterChange = React.useCallback(function (filterKey, value) {
5123
4020
  setFilterValues(function (prev) {
5124
4021
  var _a;
5125
- return (__assign$1(__assign$1({}, prev), (_a = {}, _a[filterKey] = value, _a)));
4022
+ return (__assign(__assign({}, prev), (_a = {}, _a[filterKey] = value, _a)));
5126
4023
  });
5127
4024
  }, []);
5128
4025
  // Clear all filters
@@ -5212,7 +4109,7 @@ var DrawerFilters = function (_a) {
5212
4109
  DrawerFilters.displayName = "DrawerFilters";
5213
4110
 
5214
4111
  var Modal = function (props) {
5215
- return (jsxRuntime.jsx(react.Modal, __assign$1({ shouldBlockScroll: true, radius: "lg", className: "py-9 px-6" }, props)));
4112
+ return (jsxRuntime.jsx(react.Modal, __assign({ shouldBlockScroll: true, radius: "lg", className: "py-9 px-6" }, props)));
5216
4113
  };
5217
4114
 
5218
4115
  var ModalContent = react.ModalContent;
@@ -5239,16 +4136,16 @@ var paddingClasses = {
5239
4136
  * - Hereda de HeroUI Card con personalización BeweOS
5240
4137
  */
5241
4138
  var Card = function (_a) {
5242
- var children = _a.children, _b = _a.className, className = _b === void 0 ? "" : _b, _c = _a.shadow, shadow = _c === void 0 ? "sm" : _c, _d = _a.radius, radius = _d === void 0 ? "sm" : _d, _e = _a.padding, padding = _e === void 0 ? "md" : _e, props = __rest$1(_a, ["children", "className", "shadow", "radius", "padding"]);
4139
+ var children = _a.children, _b = _a.className, className = _b === void 0 ? "" : _b, _c = _a.shadow, shadow = _c === void 0 ? "sm" : _c, _d = _a.radius, radius = _d === void 0 ? "sm" : _d, _e = _a.padding, padding = _e === void 0 ? "md" : _e, props = __rest(_a, ["children", "className", "shadow", "radius", "padding"]);
5243
4140
  var paddingClass = paddingClasses[padding];
5244
4141
  var combinedClassName = [paddingClass, className].filter(Boolean).join(" ");
5245
- return (jsxRuntime.jsx(react.Card, __assign$1({ shadow: shadow, radius: radius, className: combinedClassName }, props, { children: children })));
4142
+ return (jsxRuntime.jsx(react.Card, __assign({ shadow: shadow, radius: radius, className: combinedClassName }, props, { children: children })));
5246
4143
  };
5247
4144
 
5248
4145
  /**
5249
4146
  * @file This file contains the theme configurations for the application.
5250
4147
  */
5251
- var ALL_THEMES = __spreadArray$1(["light", "dark"], Object.keys(themeColors$1), true);
4148
+ var ALL_THEMES = __spreadArray(["light", "dark"], Object.keys(themeColors), true);
5252
4149
 
5253
4150
  /**
5254
4151
  * Custom hook to manage the theme state and side effects.
@@ -5332,13 +4229,13 @@ var AuraToastProvider = function (_a) {
5332
4229
  clearTimeout(timerRef.current);
5333
4230
  timerRef.current = null;
5334
4231
  }
5335
- setToast(function (currentToast) { return (__assign$1(__assign$1({}, currentToast), { isVisible: false })); });
4232
+ setToast(function (currentToast) { return (__assign(__assign({}, currentToast), { isVisible: false })); });
5336
4233
  }, []);
5337
4234
  var showToast = React.useCallback(function (options) {
5338
4235
  if (timerRef.current) {
5339
4236
  clearTimeout(timerRef.current);
5340
4237
  }
5341
- setToast(__assign$1({ isVisible: true }, options));
4238
+ setToast(__assign({ isVisible: true }, options));
5342
4239
  var duration = options.duration === undefined ? 3000 : options.duration;
5343
4240
  if (duration > 0) {
5344
4241
  timerRef.current = setTimeout(function () {
@@ -5396,7 +4293,7 @@ exports.AuraAutocomplete = AuraAutocomplete;
5396
4293
  exports.AuraTable = AuraTable;
5397
4294
  exports.AuraToastProvider = AuraToastProvider;
5398
4295
  exports.BreadcrumbsComponent = BreadcrumbsComponent;
5399
- exports.Button = Button$1;
4296
+ exports.Button = Button;
5400
4297
  exports.Card = Card;
5401
4298
  exports.Chip = Chip;
5402
4299
  exports.ColorSelector = ColorSelector;
@@ -5410,7 +4307,7 @@ exports.H2 = H2;
5410
4307
  exports.H3 = H3;
5411
4308
  exports.H4 = H4;
5412
4309
  exports.HeaderComponent = HeaderComponent;
5413
- exports.IconComponent = IconComponent$1;
4310
+ exports.IconComponent = IconComponent;
5414
4311
  exports.ImagePreview = ImagePreview;
5415
4312
  exports.Input = Input;
5416
4313
  exports.MenuComponent = MenuComponent;
@@ -5446,8 +4343,8 @@ exports.Wizard = Wizard;
5446
4343
  exports.WizardNavigation = WizardNavigation;
5447
4344
  exports.WizardSidebar = WizardSidebar;
5448
4345
  exports.defaultTranslations = defaultTranslations$3;
5449
- exports.sizeMap = sizeMap$1;
5450
- exports.themeColors = themeColors$1;
4346
+ exports.sizeMap = sizeMap;
4347
+ exports.themeColors = themeColors;
5451
4348
  exports.useAuraToast = useAuraToast;
5452
4349
  exports.useNavigationLoading = useNavigationLoading;
5453
4350
  exports.useThemeContext = useThemeContext;