@beweco/aurora-ui 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/dist/assets/css/styles.css +1 -1
  2. package/dist/index.cjs.js +1096 -210
  3. package/dist/index.esm.js +1084 -216
  4. package/dist/types/components/add-holiday-form/AddHolidayForm.d.ts +10 -0
  5. package/dist/types/components/add-holiday-form/AddHolidayForm.d.ts.map +1 -0
  6. package/dist/types/components/add-holiday-form/AddHolidayForm.types.d.ts +56 -0
  7. package/dist/types/components/add-holiday-form/AddHolidayForm.types.d.ts.map +1 -0
  8. package/dist/types/components/add-holiday-form/index.d.ts +3 -0
  9. package/dist/types/components/add-holiday-form/index.d.ts.map +1 -0
  10. package/dist/types/components/button/Button.types.d.ts +1 -1
  11. package/dist/types/components/button/Button.types.d.ts.map +1 -1
  12. package/dist/types/components/datepicker/DatePicker.d.ts +4 -0
  13. package/dist/types/components/datepicker/DatePicker.d.ts.map +1 -0
  14. package/dist/types/components/datepicker/DatePicker.types.d.ts +5 -0
  15. package/dist/types/components/datepicker/DatePicker.types.d.ts.map +1 -0
  16. package/dist/types/components/datepicker/index.d.ts +3 -0
  17. package/dist/types/components/datepicker/index.d.ts.map +1 -0
  18. package/dist/types/components/daterangepicker/DateRangePicker.d.ts +5 -0
  19. package/dist/types/components/daterangepicker/DateRangePicker.d.ts.map +1 -0
  20. package/dist/types/components/daterangepicker/DateRangePicker.types.d.ts +5 -0
  21. package/dist/types/components/daterangepicker/DateRangePicker.types.d.ts.map +1 -0
  22. package/dist/types/components/daterangepicker/index.d.ts +3 -0
  23. package/dist/types/components/daterangepicker/index.d.ts.map +1 -0
  24. package/dist/types/components/input/Input.d.ts.map +1 -1
  25. package/dist/types/components/modal/Modal.d.ts +5 -0
  26. package/dist/types/components/modal/Modal.d.ts.map +1 -0
  27. package/dist/types/components/modal/Modal.types.d.ts +4 -0
  28. package/dist/types/components/modal/Modal.types.d.ts.map +1 -0
  29. package/dist/types/components/modal/_internal/ModalBody.d.ts +3 -0
  30. package/dist/types/components/modal/_internal/ModalBody.d.ts.map +1 -0
  31. package/dist/types/components/modal/_internal/ModalContent.d.ts +6 -0
  32. package/dist/types/components/modal/_internal/ModalContent.d.ts.map +1 -0
  33. package/dist/types/components/modal/_internal/ModalFooter.d.ts +3 -0
  34. package/dist/types/components/modal/_internal/ModalFooter.d.ts.map +1 -0
  35. package/dist/types/components/modal/_internal/ModalHeader.d.ts +3 -0
  36. package/dist/types/components/modal/_internal/ModalHeader.d.ts.map +1 -0
  37. package/dist/types/components/modal/_internal/index.d.ts +5 -0
  38. package/dist/types/components/modal/_internal/index.d.ts.map +1 -0
  39. package/dist/types/components/modal/index.d.ts +4 -0
  40. package/dist/types/components/modal/index.d.ts.map +1 -0
  41. package/dist/types/components/pagination/Pagination.d.ts +5 -0
  42. package/dist/types/components/pagination/Pagination.d.ts.map +1 -0
  43. package/dist/types/components/pagination/Pagination.types.d.ts +4 -0
  44. package/dist/types/components/pagination/Pagination.types.d.ts.map +1 -0
  45. package/dist/types/components/pagination/index.d.ts +3 -0
  46. package/dist/types/components/pagination/index.d.ts.map +1 -0
  47. package/dist/types/components/schedule-row/index.d.ts +3 -0
  48. package/dist/types/components/schedule-row/index.d.ts.map +1 -0
  49. package/dist/types/components/schedule-row/schedule-row.d.ts +14 -0
  50. package/dist/types/components/schedule-row/schedule-row.d.ts.map +1 -0
  51. package/dist/types/components/schedule-row/schedule-row.types.d.ts +68 -0
  52. package/dist/types/components/schedule-row/schedule-row.types.d.ts.map +1 -0
  53. package/dist/types/components/switch/Switch.d.ts +4 -0
  54. package/dist/types/components/switch/Switch.d.ts.map +1 -0
  55. package/dist/types/components/switch/Switch.types.d.ts +3 -0
  56. package/dist/types/components/switch/Switch.types.d.ts.map +1 -0
  57. package/dist/types/components/switch/index.d.ts +3 -0
  58. package/dist/types/components/switch/index.d.ts.map +1 -0
  59. package/dist/types/components/table/AuraTable.d.ts +9 -0
  60. package/dist/types/components/table/AuraTable.d.ts.map +1 -0
  61. package/dist/types/components/table/AuraTable.types.d.ts +15 -0
  62. package/dist/types/components/table/AuraTable.types.d.ts.map +1 -0
  63. package/dist/types/components/table/_internal/TableBody.d.ts +5 -0
  64. package/dist/types/components/table/_internal/TableBody.d.ts.map +1 -0
  65. package/dist/types/components/table/_internal/TableCell.d.ts +4 -0
  66. package/dist/types/components/table/_internal/TableCell.d.ts.map +1 -0
  67. package/dist/types/components/table/_internal/TableColumn.d.ts +5 -0
  68. package/dist/types/components/table/_internal/TableColumn.d.ts.map +1 -0
  69. package/dist/types/components/table/_internal/TableHeader.d.ts +5 -0
  70. package/dist/types/components/table/_internal/TableHeader.d.ts.map +1 -0
  71. package/dist/types/components/table/_internal/TableRow.d.ts +4 -0
  72. package/dist/types/components/table/_internal/TableRow.d.ts.map +1 -0
  73. package/dist/types/components/table/_internal/index.d.ts +7 -0
  74. package/dist/types/components/table/_internal/index.d.ts.map +1 -0
  75. package/dist/types/components/table/index.d.ts +3 -0
  76. package/dist/types/components/table/index.d.ts.map +1 -0
  77. package/dist/types/components/textarea/Textarea.d.ts +7 -0
  78. package/dist/types/components/textarea/Textarea.d.ts.map +1 -0
  79. package/dist/types/components/textarea/Textarea.types.d.ts +3 -0
  80. package/dist/types/components/textarea/Textarea.types.d.ts.map +1 -0
  81. package/dist/types/components/textarea/index.d.ts +3 -0
  82. package/dist/types/components/textarea/index.d.ts.map +1 -0
  83. package/dist/types/components/time-input/TimeInput.d.ts +7 -0
  84. package/dist/types/components/time-input/TimeInput.d.ts.map +1 -0
  85. package/dist/types/components/time-input/TimeInput.types.d.ts +5 -0
  86. package/dist/types/components/time-input/TimeInput.types.d.ts.map +1 -0
  87. package/dist/types/components/time-input/index.d.ts +3 -0
  88. package/dist/types/components/time-input/index.d.ts.map +1 -0
  89. package/dist/types/components/toast/GlobalToast.d.ts +2 -0
  90. package/dist/types/components/toast/GlobalToast.d.ts.map +1 -0
  91. package/dist/types/components/toast/index.d.ts +2 -0
  92. package/dist/types/components/toast/index.d.ts.map +1 -0
  93. package/dist/types/contexts/theme/index.d.ts +2 -2
  94. package/dist/types/contexts/theme/index.d.ts.map +1 -1
  95. package/dist/types/contexts/theme/theme-context.d.ts.map +1 -1
  96. package/dist/types/contexts/theme/theme-context.type.d.ts +6 -3
  97. package/dist/types/contexts/theme/theme-context.type.d.ts.map +1 -1
  98. package/dist/types/contexts/toast/index.d.ts +3 -0
  99. package/dist/types/contexts/toast/index.d.ts.map +1 -0
  100. package/dist/types/contexts/toast/toast.context.d.ts +4 -0
  101. package/dist/types/contexts/toast/toast.context.d.ts.map +1 -0
  102. package/dist/types/contexts/toast/toast.context.type.d.ts +15 -0
  103. package/dist/types/contexts/toast/toast.context.type.d.ts.map +1 -0
  104. package/dist/types/index.d.ts +20 -1
  105. package/dist/types/index.d.ts.map +1 -1
  106. package/dist/types/providers/theme/theme-provider.d.ts +10 -2
  107. package/dist/types/providers/theme/theme-provider.d.ts.map +1 -1
  108. package/dist/types/providers/theme/theme-provider.types.d.ts +8 -0
  109. package/dist/types/providers/theme/theme-provider.types.d.ts.map +1 -1
  110. package/dist/types/providers/theme/theme.utils.d.ts +5 -0
  111. package/dist/types/providers/theme/theme.utils.d.ts.map +1 -0
  112. package/dist/types/providers/theme/useThemeManager.d.ts +12 -0
  113. package/dist/types/providers/theme/useThemeManager.d.ts.map +1 -0
  114. package/dist/types/providers/toast/index.d.ts +2 -0
  115. package/dist/types/providers/toast/index.d.ts.map +1 -0
  116. package/dist/types/providers/toast/toast-provider.d.ts +7 -0
  117. package/dist/types/providers/toast/toast-provider.d.ts.map +1 -0
  118. package/dist/types/styles/colors.default.d.ts +385 -74
  119. package/dist/types/styles/colors.default.d.ts.map +1 -1
  120. package/dist/types/types/calendar.types.d.ts +12 -0
  121. package/dist/types/types/calendar.types.d.ts.map +1 -0
  122. package/package.json +11 -2
package/dist/index.cjs.js CHANGED
@@ -46,6 +46,16 @@ function __rest(s, e) {
46
46
  return t;
47
47
  }
48
48
 
49
+ function __spreadArray(to, from, pack) {
50
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
51
+ if (ar || !(i in from)) {
52
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
53
+ ar[i] = from[i];
54
+ }
55
+ }
56
+ return to.concat(ar || Array.prototype.slice.call(from));
57
+ }
58
+
49
59
  typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
50
60
  var e = new Error(message);
51
61
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
@@ -70,6 +80,48 @@ var AutoComplete = function (_a) {
70
80
  } }))] }));
71
81
  };
72
82
 
83
+ exports.HolidayType = void 0;
84
+ (function (HolidayType) {
85
+ HolidayType["SingleDay"] = "singleDay";
86
+ HolidayType["DateRange"] = "dateRange";
87
+ })(exports.HolidayType || (exports.HolidayType = {}));
88
+
89
+ /**
90
+ * Botón genérico basado en HeroUI siguiendo las reglas de diseño BeweOS.
91
+ *
92
+ * Reglas aplicadas:
93
+ * - Variant: Solid, Bordered, Light, Flat, Faded
94
+ * - Size: sm, md, lg
95
+ * - StartContent: On, Off
96
+ * - isLoading: On, Off
97
+ * - Radius: md (por defecto)
98
+ * - isIconOnly: True, False
99
+ */
100
+ var Button = function (_a) {
101
+ 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"]);
102
+ return (jsxRuntime.jsx(react.Button, __assign({}, props, { color: color, size: size, variant: variant, radius: radius, startContent: startContent, endContent: endContent, isLoading: isLoading, isIconOnly: isIconOnly })));
103
+ };
104
+
105
+ var DatePicker = function (_a) {
106
+ var label = _a.label, id = _a.id, _b = _a.size, size = _b === void 0 ? "md" : _b, props = __rest(_a, ["label", "id", "size"]);
107
+ var generatedId = React.useId();
108
+ var autoId = id || generatedId;
109
+ return (jsxRuntime.jsx(react.DatePicker, __assign({ label: label, size: size, labelPlacement: "outside", classNames: {
110
+ label: "text-sm font-medium text-default-600",
111
+ segment: "focus:bg-primary-50",
112
+ }, id: autoId }, props)));
113
+ };
114
+
115
+ var DateRangePicker = function (_a) {
116
+ var label = _a.label, id = _a.id, _b = _a.size, size = _b === void 0 ? "md" : _b, props = __rest(_a, ["label", "id", "size"]);
117
+ var generatedId = React.useId();
118
+ var autoId = id || generatedId;
119
+ return (jsxRuntime.jsx(react.DateRangePicker, __assign({ label: label, size: size, labelPlacement: "outside", classNames: {
120
+ label: "text-sm font-medium text-default-600",
121
+ segment: "focus:bg-primary-50",
122
+ } }, props, { id: autoId })));
123
+ };
124
+
73
125
  var sizeMap = {
74
126
  sm: "16px",
75
127
  md: "20px",
@@ -83,6 +135,109 @@ var IconComponent = function (_a) {
83
135
  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 }) })));
84
136
  };
85
137
 
138
+ /**
139
+ * Input genérico reutilizable basado en HeroUI siguiendo las reglas de diseño BeweOS.
140
+ *
141
+ * Reglas aplicadas:
142
+ * - Variant: Bordered (por defecto)
143
+ * - labelPlacement: Outside
144
+ * - Size: sm, md, lg (configurable)
145
+ * - Radius configurable
146
+ */
147
+ var Input = function (_a) {
148
+ 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"]);
149
+ var generatedId = React.useId();
150
+ var inputId = id || generatedId;
151
+ return (jsxRuntime.jsx(react.Input, __assign({}, props, { id: inputId, label: label, labelPlacement: "outside", placeholder: placeholder, variant: variant, size: size, radius: radius, classNames: {
152
+ label: "text-default-600 text-tiny group-data-[filled=true]:text-default-600",
153
+ inputWrapper: "focus-within:!border-primary-500",
154
+ } })));
155
+ };
156
+
157
+ var defaultTranslations$3 = {
158
+ addHolidayTitle: "Add holiday",
159
+ dayOption: "Day",
160
+ dateRangeOption: "Date range",
161
+ selectDateRangeAriaLabel: "Select date range",
162
+ selectDateAriaLabel: "Select date",
163
+ optionalTitle: "Title (optional)",
164
+ titlePlaceholder: "e.g., Summer vacation",
165
+ addButton: "Add",
166
+ };
167
+ var INITIAL_HOLIDAY_STATE = {
168
+ type: exports.HolidayType.SingleDay,
169
+ startDate: null,
170
+ endDate: null,
171
+ title: "",
172
+ };
173
+ /**
174
+ * A form component for adding single or date-range holidays.
175
+ * It includes options for setting a date or a date range, an optional title,
176
+ * and handles form submission and state reset.
177
+ * The 'Add' button is disabled until a date is selected.
178
+ */
179
+ var AddHolidayForm = function (_a) {
180
+ var onAddHoliday = _a.onAddHoliday, translations = _a.translations, className = _a.className, radioGroupProps = _a.radioGroupProps, dateRangePickerProps = _a.dateRangePickerProps, buttonProps = _a.buttonProps;
181
+ var t = __assign(__assign({}, defaultTranslations$3), translations);
182
+ var _b = React.useState(INITIAL_HOLIDAY_STATE), newHoliday = _b[0], setNewHoliday = _b[1];
183
+ /**
184
+ * A boolean flag that determines if a date has been set.
185
+ * For a single day, it checks if `startDate` is not null.
186
+ * For a date range, it checks if both `startDate` and `endDate` are not null.
187
+ */
188
+ var isDateSet = newHoliday.type === exports.HolidayType.SingleDay
189
+ ? newHoliday.startDate !== null
190
+ : newHoliday.startDate !== null && newHoliday.endDate !== null;
191
+ /**
192
+ * Resets the form to its initial state.
193
+ */
194
+ var resetForm = React.useCallback(function () {
195
+ setNewHoliday(INITIAL_HOLIDAY_STATE);
196
+ }, []);
197
+ /**
198
+ * Handles changes to the single date picker.
199
+ * @param date The selected date.
200
+ */
201
+ var handleDateChange = React.useCallback(function (date) {
202
+ setNewHoliday(function (prev) { return (__assign(__assign({}, prev), { startDate: date, endDate: null })); });
203
+ }, []);
204
+ /**
205
+ * Handles changes to the date range picker.
206
+ * @param range The selected date range.
207
+ */
208
+ var handleDateRangeChange = React.useCallback(function (range) {
209
+ setNewHoliday(function (prev) {
210
+ var _a, _b;
211
+ 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 }));
212
+ });
213
+ }, []);
214
+ /**
215
+ * Handles the submission of the form.
216
+ * If a date is set, it calls the `onAddHoliday` callback and resets the form.
217
+ */
218
+ var handleAddHoliday = React.useCallback(function () {
219
+ var _a;
220
+ // biome-ignore lint/complexity/useSimplifiedLogicExpression: <explanation>
221
+ if (!isDateSet || !newHoliday.startDate) {
222
+ return;
223
+ }
224
+ onAddHoliday({
225
+ type: newHoliday.type,
226
+ title: newHoliday.title,
227
+ startDate: newHoliday.startDate.toDate("UTC"),
228
+ endDate: (_a = newHoliday.endDate) === null || _a === void 0 ? void 0 : _a.toDate("UTC"),
229
+ });
230
+ resetForm();
231
+ }, [newHoliday, onAddHoliday, resetForm, isDateSet]);
232
+ 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) {
233
+ return setNewHoliday(__assign(__assign({}, INITIAL_HOLIDAY_STATE), { type: value }));
234
+ } }, 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
235
+ ? { start: newHoliday.startDate, end: newHoliday.endDate }
236
+ : 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) {
237
+ setNewHoliday(function (prev) { return (__assign(__assign({}, prev), { title: value })); });
238
+ }, "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 })) })] }));
239
+ };
240
+
86
241
  function normalizeClass(value) {
87
242
  if (typeof value === "string") {
88
243
  return value || undefined;
@@ -371,7 +526,7 @@ var Phone = function (_a) {
371
526
  onChange(selectedCountry.code + val);
372
527
  }
373
528
  };
374
- return (jsxRuntime.jsxs("div", { className: "flex flex-col gap-1 w-full relative", children: [finalLabel && (jsxRuntime.jsxs("label", { htmlFor: "phone-input-".concat(name), className: "text-sm font-medium text-gray-700 dark:text-gray-200 mb-1", children: [finalLabel, " ", required && jsxRuntime.jsx("span", { className: "text-pink-600", children: "*" })] })), jsxRuntime.jsxs("div", { className: "flex items-center w-full min-h-[56px] bg-white dark:bg-gray-900 transition-colors shadow-sm border border-[#E4E4E7] dark:border-gray-700 rounded-2xl focus-within:border-blue-500 dark:focus-within:border-blue-400 ".concat(error
529
+ return (jsxRuntime.jsxs("div", { className: "flex flex-col gap-1 w-full relative", children: [finalLabel && (jsxRuntime.jsxs("label", { htmlFor: "phone-input-".concat(name), className: "text-tiny text-default-600 mb-1", children: [finalLabel, " ", required && jsxRuntime.jsx("span", { className: "text-pink-600", children: "*" })] })), jsxRuntime.jsxs("div", { className: "flex items-center w-full min-h-[56px] bg-white dark:bg-gray-900 transition-colors shadow-sm border border-[#E4E4E7] dark:border-gray-700 rounded-2xl focus-within:border-blue-500 dark:focus-within:border-blue-400 ".concat(error
375
530
  ? "border-pink-500 dark:border-pink-600"
376
531
  : "border-[#E4E4E7] dark:border-gray-700").concat(disabled ? " bg-gray-100 dark:bg-gray-800 opacity-60" : ""), children: [jsxRuntime.jsxs("div", { className: "relative ml-2", ref: dropdownRef, children: [jsxRuntime.jsxs("button", { type: "button",
377
532
  ///bg-gray-100
@@ -387,6 +542,321 @@ var Phone = function (_a) {
387
542
  : ""), onClick: function () { return handleCountrySelect(country); }, children: [jsxRuntime.jsx("span", { className: "mr-3 text-lg", children: country.flag }), jsxRuntime.jsx("span", { className: "flex-1 text-left dark:text-gray-100", children: country.name }), jsxRuntime.jsx("span", { className: "text-xs text-gray-500 dark:text-gray-400", children: country.code })] }, country.code)); })) : (jsxRuntime.jsx("div", { className: "px-4 py-2 text-sm text-gray-500 dark:text-gray-400", children: t.noCountriesFound })) })] }))] }), jsxRuntime.jsx(react.Input, { type: "tel", className: "flex-1 border-none bg-transparent text-gray-900 dark:text-gray-100 placeholder-gray-400 dark:placeholder-gray-500 h-10 px-2", placeholder: t.placeholder, value: inputValue, onChange: handleInputChange, onBlur: onBlur, disabled: disabled, name: name, autoComplete: "tel", id: "phone-input-".concat(name) })] }), error && errorText && (jsxRuntime.jsx("span", { className: "text-xs text-pink-600 dark:text-pink-400 mt-1", children: errorText }))] }));
388
543
  };
389
544
 
545
+ /**
546
+ * Select genérico reutilizable basado en HeroUI siguiendo las reglas de diseño BeweOS.
547
+ *
548
+ * Reglas aplicadas:
549
+ * - Variant: Bordered (por defecto)
550
+ * - Radius: md (por defecto)
551
+ * - labelPlacement: Outside
552
+ * - Size: sm, md, lg (configurable)
553
+ */
554
+ var Select = function (_a) {
555
+ 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"]);
556
+ var generatedId = React.useId();
557
+ var selectId = id || generatedId;
558
+ 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: {
559
+ label: "text-default-600 text-tiny group-data-[filled=true]:text-default-600",
560
+ trigger: "data-[open=true]:!border-primary-500 data-[focus=true]:!border-primary-500 data-[disabled=true]:bg-default-100",
561
+ 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",
562
+ } })) }));
563
+ };
564
+
565
+ function $14e0f24ef4ac5c92$export$c19a80a9721b80f6(a, b) {
566
+ return $14e0f24ef4ac5c92$var$timeToMs(a) - $14e0f24ef4ac5c92$var$timeToMs(b);
567
+ }
568
+ function $14e0f24ef4ac5c92$var$timeToMs(a) {
569
+ return a.hour * 3600000 + a.minute * 60000 + a.second * 1000 + a.millisecond;
570
+ }
571
+
572
+ function $735220c2d4774dd3$export$3e2544e88a25bff8(duration) {
573
+ let inverseDuration = {};
574
+ for(let key in duration)if (typeof duration[key] === 'number') inverseDuration[key] = -duration[key];
575
+ return inverseDuration;
576
+ }
577
+ function $735220c2d4774dd3$export$e5d5e1c1822b6e56(value, fields) {
578
+ let mutableValue = value.copy();
579
+ if (fields.hour != null) mutableValue.hour = fields.hour;
580
+ if (fields.minute != null) mutableValue.minute = fields.minute;
581
+ if (fields.second != null) mutableValue.second = fields.second;
582
+ if (fields.millisecond != null) mutableValue.millisecond = fields.millisecond;
583
+ $735220c2d4774dd3$export$7555de1e070510cb(mutableValue);
584
+ return mutableValue;
585
+ }
586
+ function $735220c2d4774dd3$var$balanceTime(time) {
587
+ time.second += Math.floor(time.millisecond / 1000);
588
+ time.millisecond = $735220c2d4774dd3$var$nonNegativeMod(time.millisecond, 1000);
589
+ time.minute += Math.floor(time.second / 60);
590
+ time.second = $735220c2d4774dd3$var$nonNegativeMod(time.second, 60);
591
+ time.hour += Math.floor(time.minute / 60);
592
+ time.minute = $735220c2d4774dd3$var$nonNegativeMod(time.minute, 60);
593
+ let days = Math.floor(time.hour / 24);
594
+ time.hour = $735220c2d4774dd3$var$nonNegativeMod(time.hour, 24);
595
+ return days;
596
+ }
597
+ function $735220c2d4774dd3$export$7555de1e070510cb(time) {
598
+ time.millisecond = Math.max(0, Math.min(time.millisecond, 1000));
599
+ time.second = Math.max(0, Math.min(time.second, 59));
600
+ time.minute = Math.max(0, Math.min(time.minute, 59));
601
+ time.hour = Math.max(0, Math.min(time.hour, 23));
602
+ }
603
+ function $735220c2d4774dd3$var$nonNegativeMod(a, b) {
604
+ let result = a % b;
605
+ if (result < 0) result += b;
606
+ return result;
607
+ }
608
+ function $735220c2d4774dd3$var$addTimeFields(time, duration) {
609
+ time.hour += duration.hours || 0;
610
+ time.minute += duration.minutes || 0;
611
+ time.second += duration.seconds || 0;
612
+ time.millisecond += duration.milliseconds || 0;
613
+ return $735220c2d4774dd3$var$balanceTime(time);
614
+ }
615
+ function $735220c2d4774dd3$export$7ed87b6bc2506470(time, duration) {
616
+ let res = time.copy();
617
+ $735220c2d4774dd3$var$addTimeFields(res, duration);
618
+ return res;
619
+ }
620
+ function $735220c2d4774dd3$export$fe34d3a381cd7501(time, duration) {
621
+ return $735220c2d4774dd3$export$7ed87b6bc2506470(time, $735220c2d4774dd3$export$3e2544e88a25bff8(duration));
622
+ }
623
+ function $735220c2d4774dd3$export$dd02b3e0007dfe28(value, field, amount, options) {
624
+ let mutable = value.copy();
625
+ switch(field){
626
+ case 'hour':
627
+ {
628
+ let hours = value.hour;
629
+ let min = 0;
630
+ let max = 23;
631
+ if ((options === null || options === void 0 ? void 0 : options.hourCycle) === 12) {
632
+ let isPM = hours >= 12;
633
+ min = isPM ? 12 : 0;
634
+ max = isPM ? 23 : 11;
635
+ }
636
+ mutable.hour = $735220c2d4774dd3$var$cycleValue(hours, amount, min, max, options === null || options === void 0 ? void 0 : options.round);
637
+ break;
638
+ }
639
+ case 'minute':
640
+ mutable.minute = $735220c2d4774dd3$var$cycleValue(value.minute, amount, 0, 59, options === null || options === void 0 ? void 0 : options.round);
641
+ break;
642
+ case 'second':
643
+ mutable.second = $735220c2d4774dd3$var$cycleValue(value.second, amount, 0, 59, options === null || options === void 0 ? void 0 : options.round);
644
+ break;
645
+ case 'millisecond':
646
+ mutable.millisecond = $735220c2d4774dd3$var$cycleValue(value.millisecond, amount, 0, 999, options === null || options === void 0 ? void 0 : options.round);
647
+ break;
648
+ default:
649
+ throw new Error('Unsupported field ' + field);
650
+ }
651
+ return mutable;
652
+ }
653
+ function $735220c2d4774dd3$var$cycleValue(value, amount, min, max, round = false) {
654
+ if (round) {
655
+ value += Math.sign(amount);
656
+ if (value < min) value = max;
657
+ let div = Math.abs(amount);
658
+ if (amount > 0) value = Math.ceil(value / div) * div;
659
+ else value = Math.floor(value / div) * div;
660
+ if (value > max) value = min;
661
+ } else {
662
+ value += amount;
663
+ if (value < min) value = max - (min - value - 1);
664
+ else if (value > max) value = min + (value - max - 1);
665
+ }
666
+ return value;
667
+ }
668
+
669
+ function $fae977aafc393c5c$export$f59dee82248f5ad4(time) {
670
+ return `${String(time.hour).padStart(2, '0')}:${String(time.minute).padStart(2, '0')}:${String(time.second).padStart(2, '0')}${time.millisecond ? String(time.millisecond / 1000).slice(1) : ''}`;
671
+ }
672
+
673
+ function _check_private_redeclaration(obj, privateCollection) {
674
+ if (privateCollection.has(obj)) {
675
+ throw new TypeError("Cannot initialize the same private elements twice on an object");
676
+ }
677
+ }
678
+
679
+ function _class_private_field_init(obj, privateMap, value) {
680
+ _check_private_redeclaration(obj, privateMap);
681
+ privateMap.set(obj, value);
682
+ }
683
+
684
+ var // This prevents TypeScript from allowing other types with the same fields to match.
685
+ // @ts-ignore
686
+ $35ea8db9cb2ccb90$var$_type1 = /*#__PURE__*/ new WeakMap();
687
+ class $35ea8db9cb2ccb90$export$680ea196effce5f {
688
+ /** Returns a copy of this time. */ copy() {
689
+ return new $35ea8db9cb2ccb90$export$680ea196effce5f(this.hour, this.minute, this.second, this.millisecond);
690
+ }
691
+ /** Returns a new `Time` with the given duration added to it. */ add(duration) {
692
+ return ($735220c2d4774dd3$export$7ed87b6bc2506470)(this, duration);
693
+ }
694
+ /** Returns a new `Time` with the given duration subtracted from it. */ subtract(duration) {
695
+ return ($735220c2d4774dd3$export$fe34d3a381cd7501)(this, duration);
696
+ }
697
+ /** Returns a new `Time` with the given fields set to the provided values. Other fields will be constrained accordingly. */ set(fields) {
698
+ return ($735220c2d4774dd3$export$e5d5e1c1822b6e56)(this, fields);
699
+ }
700
+ /**
701
+ * Returns a new `Time` with the given field adjusted by a specified amount.
702
+ * When the resulting value reaches the limits of the field, it wraps around.
703
+ */ cycle(field, amount, options) {
704
+ return ($735220c2d4774dd3$export$dd02b3e0007dfe28)(this, field, amount, options);
705
+ }
706
+ /** Converts the time to an ISO 8601 formatted string. */ toString() {
707
+ return ($fae977aafc393c5c$export$f59dee82248f5ad4)(this);
708
+ }
709
+ /** Compares this time with another. A negative result indicates that this time is before the given one, and a positive time indicates that it is after. */ compare(b) {
710
+ return ($14e0f24ef4ac5c92$export$c19a80a9721b80f6)(this, b);
711
+ }
712
+ constructor(hour = 0, minute = 0, second = 0, millisecond = 0){
713
+ (_class_private_field_init)(this, $35ea8db9cb2ccb90$var$_type1, {
714
+ writable: true,
715
+ value: void 0
716
+ });
717
+ this.hour = hour;
718
+ this.minute = minute;
719
+ this.second = second;
720
+ this.millisecond = millisecond;
721
+ ($735220c2d4774dd3$export$7555de1e070510cb)(this);
722
+ }
723
+ }
724
+
725
+ var Switch = function (_a) {
726
+ var id = _a.id, props = __rest(_a, ["id"]);
727
+ var generatedId = React.useId();
728
+ var autoId = id || generatedId;
729
+ return jsxRuntime.jsx(react.Switch, __assign({}, props, { id: autoId }));
730
+ };
731
+
732
+ /**
733
+ * TimeInput genérico reutilizable basado en HeroUI siguiendo las reglas de diseño BeweOS.
734
+ */
735
+ var TimeInput = function (_a) {
736
+ 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"]);
737
+ var generatedId = React.useId();
738
+ var autoId = id || generatedId;
739
+ return (jsxRuntime.jsx(react.TimeInput, __assign({}, props, { id: autoId, size: size, radius: radius, variant: variant, label: label, labelPlacement: "outside-left", classNames: {
740
+ label: "text-default-600 text-tiny group-data-[filled=true]:text-default-600",
741
+ inputWrapper: "focus-within:!border-primary-500",
742
+ } })));
743
+ };
744
+
745
+ /**
746
+ * @component ScheduleRow
747
+ * @description A React component for managing the schedule of a single day.
748
+ * It allows users to open or close the schedule, add or remove time slots,
749
+ * and modify the start and end times of each slot. The component is fully
750
+ * controlled and reports changes to the parent via the `onChange` callback.
751
+ *
752
+ * @param {ScheduleRowProps} props - The props for the component.
753
+ * @returns {React.ReactElement} The rendered ScheduleRow component.
754
+ */
755
+ var ScheduleRow = function (_a) {
756
+ var day = _a.day, daySchedule = _a.daySchedule, translations = _a.translations, onChange = _a.onChange, onCopyToAll = _a.onCopyToAll;
757
+ /**
758
+ * @function validateTimeSlots
759
+ * @description Validates all time slots to ensure the "from" time is not after the "to" time.
760
+ * @param {TimeSlot[]} timeSlots - The array of time slots to validate.
761
+ * @returns {TimeSlot[]} The updated array of time slots with error messages if any.
762
+ */
763
+ var validateTimeSlots = function (timeSlots) {
764
+ return timeSlots.map(function (slot) {
765
+ if (slot.from && slot.to) {
766
+ var fromTime = new ($35ea8db9cb2ccb90$export$680ea196effce5f.bind.apply($35ea8db9cb2ccb90$export$680ea196effce5f, __spreadArray([void 0], slot.from.split(":").map(Number), false)))();
767
+ var toTime = new ($35ea8db9cb2ccb90$export$680ea196effce5f.bind.apply($35ea8db9cb2ccb90$export$680ea196effce5f, __spreadArray([void 0], slot.to.split(":").map(Number), false)))();
768
+ if (fromTime.compare(toTime) > 0) {
769
+ return __assign(__assign({}, slot), { error: "From time cannot be after to time" });
770
+ }
771
+ }
772
+ return __assign(__assign({}, slot), { error: null });
773
+ });
774
+ };
775
+ /**
776
+ * @function toTimeValue
777
+ * @description Converts a time string (e.g., "09:00") to a `TimeValue` object
778
+ * required by the `TimeInput` component.
779
+ * @param {string} time - The time string to convert.
780
+ * @returns {TimeValue | null} The corresponding `TimeValue` object, or `null` if the input is empty.
781
+ */
782
+ var toTimeValue = function (time) {
783
+ if (!time) {
784
+ return null;
785
+ }
786
+ var _a = time.split(":").map(Number), hour = _a[0], minute = _a[1];
787
+ return new $35ea8db9cb2ccb90$export$680ea196effce5f(hour, minute);
788
+ };
789
+ /**
790
+ * @function fromTimeValue
791
+ * @description Converts a `TimeValue` object back to a formatted time string (e.g., "09:00").
792
+ * @param {TimeValue | null} time - The `TimeValue` object to convert.
793
+ * @returns {string} The formatted time string.
794
+ */
795
+ var fromTimeValue = function (time) {
796
+ if (!time) {
797
+ return "";
798
+ }
799
+ return "".concat(String(time.hour).padStart(2, "0"), ":").concat(String(time.minute).padStart(2, "0"));
800
+ };
801
+ /**
802
+ * @function handleToggleDay
803
+ * @description Toggles the `isOpen` status of the schedule for the day.
804
+ */
805
+ var handleToggleDay = function () {
806
+ onChange(__assign(__assign({}, daySchedule), { isOpen: !daySchedule.isOpen }));
807
+ };
808
+ /**
809
+ * @function handleTimeChange
810
+ * @description Updates the time for a specific time slot.
811
+ * @param {number} index - The index of the time slot to modify.
812
+ * @param {"from" | "to"} field - The field to update ("from" or "to").
813
+ * @param {TimeValue | null} value - The new time value from the `TimeInput` component.
814
+ */
815
+ var handleTimeChange = function (index, field, value) {
816
+ var _a;
817
+ var newTimeSlots = __spreadArray([], daySchedule.timeSlots, true);
818
+ newTimeSlots[index] = __assign(__assign({}, newTimeSlots[index]), (_a = {}, _a[field] = fromTimeValue(value), _a));
819
+ var validatedSlots = validateTimeSlots(newTimeSlots);
820
+ onChange(__assign(__assign({}, daySchedule), { timeSlots: validatedSlots }));
821
+ };
822
+ /**
823
+ * @function handleAddTimeSlot
824
+ * @description Adds a new, empty time slot to the schedule.
825
+ */
826
+ var handleAddTimeSlot = function () {
827
+ var newTimeSlots = __spreadArray(__spreadArray([], daySchedule.timeSlots, true), [{ from: "", to: "" }], false);
828
+ onChange(__assign(__assign({}, daySchedule), { timeSlots: newTimeSlots }));
829
+ };
830
+ /**
831
+ * @function handleRemoveTimeSlot
832
+ * @description Removes a time slot from the schedule at the specified index.
833
+ * @param {number} index - The index of the time slot to remove.
834
+ */
835
+ var handleRemoveTimeSlot = function (index) {
836
+ var newTimeSlots = daySchedule.timeSlots.filter(function (_, i) { return i !== index; });
837
+ onChange(__assign(__assign({}, daySchedule), { timeSlots: newTimeSlots }));
838
+ };
839
+ 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 ? translations.open : translations.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 }), jsxRuntime.jsx(Button, { size: "sm", variant: "bordered", onPress: function () { return onCopyToAll(day); }, children: translations.copyToAll })] })] }), daySchedule.isOpen && (jsxRuntime.jsxs("div", { className: "flex flex-col justify-around gap-y-3 ", children: [daySchedule.timeSlots.map(function (slot, index) { 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: translations.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: translations.to, className: "w-full", value: toTimeValue(slot.to), onChange: function (value) { return handleTimeChange(index, "to", value); }, isInvalid: !!slot.error, errorMessage: slot.error })] }), jsxRuntime.jsx(Button, { isIconOnly: true, size: "sm", color: "danger", variant: "light", onPress: function () { return handleRemoveTimeSlot(index); }, isDisabled: daySchedule.timeSlots.length === 1, startContent: jsxRuntime.jsx(IconComponent, { icon: "solar:trash-bin-minimalistic-outline" }) })] }, "".concat(day, "-timeslot-").concat(slot.from, "-").concat(slot.to, "-").concat(index))); }), daySchedule.timeSlots.length < 2 && (jsxRuntime.jsx(Button, { size: "sm", variant: "flat", onPress: function () { return handleAddTimeSlot(); }, startContent: jsxRuntime.jsx(IconComponent, { icon: "solar:add-circle-outline" }), children: translations.addTimeSlot }))] }))] }, day));
840
+ };
841
+
842
+ function AuraTable(_a) {
843
+ var columns = _a.columns, items = _a.items, renderCell = _a.renderCell, children = _a.children, props = __rest(_a, ["columns", "items", "renderCell", "children"]);
844
+ 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)); } })] })));
845
+ }
846
+
847
+ /**
848
+ * Textarea component that wraps the HeroUI TextArea component.
849
+ */
850
+ var Textarea = function (_a) {
851
+ 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"]);
852
+ var generatedId = React.useId();
853
+ var autoId = id || generatedId;
854
+ 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: {
855
+ label: "text-default-600 text-tiny group-data-[filled=true]:text-default-600",
856
+ inputWrapper: "data-[focus=true]:!border-primary-500 data-[focus=true]:!border-primary-500",
857
+ } })));
858
+ };
859
+
390
860
  // Traducciones por defecto en español según las reglas de diseño
391
861
  var defaultTranslations$1 = {
392
862
  lightTheme: "Claro",
@@ -428,6 +898,46 @@ var ThemePicker = function (_a) {
428
898
  return (jsxRuntime.jsx(react.RadioGroup, { value: value, onChange: function (e) { return onChange(e.target.value); }, className: "flex gap-6 w-full ".concat(className || ""), style: { gap: 16 }, children: themes.map(function (theme) { return (jsxRuntime.jsxs("div", { className: "relative rounded-[14px] ".concat(theme.cardClass, " p-6 w-1/2 min-h-[180px] transition-all duration-200 flex flex-col justify-start"), children: [jsxRuntime.jsx("div", { className: "absolute top-6 right-6", children: jsxRuntime.jsx(react.Radio, { "aria-label": theme.label, color: theme.radioColor, size: "sm", value: theme.key }) }), jsxRuntime.jsx("span", { className: theme.labelClass, children: theme.label }), theme.previewContent] }, theme.key)); }) }));
429
899
  };
430
900
 
901
+ var ConfigMenu = function (_a) {
902
+ var _b;
903
+ var options = _a.options, onLogout = _a.onLogout, translations = _a.translations;
904
+ 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: {
905
+ base: "text-default-500",
906
+ }, 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: {
907
+ base: "text-default-500",
908
+ }, 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") })] })] }));
909
+ };
910
+ ConfigMenu.displayName = "ConfigMenu";
911
+
912
+ var NotificationButton = function (_a) {
913
+ var _b = _a.notificationCount, notificationCount = _b === void 0 ? 0 : _b;
914
+ 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 })) }));
915
+ };
916
+ NotificationButton.displayName = "NotificationButton";
917
+
918
+ var HeaderComponent = function (_a) {
919
+ var notificationCount = _a.notificationCount, options = _a.options, onMenuClick = _a.onMenuClick, onLogout = _a.onLogout, translations = _a.translations;
920
+ return (jsxRuntime.jsxs("header", { className: "header__container", children: [jsxRuntime.jsx(react.Button, { className: "sm:hidden", isIconOnly: true, variant: "light", startContent: jsxRuntime.jsx(IconComponent, { icon: "solar:hamburger-menu-linear" }), onPress: onMenuClick }), jsxRuntime.jsxs("div", { className: "flex items-center gap-4", children: [jsxRuntime.jsx(NotificationButton, { notificationCount: notificationCount }), jsxRuntime.jsx(ConfigMenu, { options: options, onLogout: onLogout, translations: translations })] })] }));
921
+ };
922
+ HeaderComponent.displayName = "Header";
923
+
924
+ var ToastContext = React.createContext(undefined);
925
+ var useAuraToast = function () {
926
+ var context = React.useContext(ToastContext);
927
+ if (!context) {
928
+ throw new Error("useAuraToast must be used within a AuraToastProvider");
929
+ }
930
+ return context;
931
+ };
932
+
933
+ function GlobalToast() {
934
+ var _a = useAuraToast(), toast = _a.toast, hideToast = _a.hideToast;
935
+ if (!toast.isVisible) {
936
+ return null;
937
+ }
938
+ return (jsxRuntime.jsx("div", { className: "fixed top-4 right-4 z-50 w-full max-w-sm", children: jsxRuntime.jsx(react.Alert, { hideIconWrapper: true, color: toast.color, variant: "flat", title: toast.title, description: toast.description, isClosable: true, onClose: hideToast }) }));
939
+ }
940
+
431
941
  // Traducciones por defecto en español
432
942
  var defaultTranslations = {
433
943
  uploadText: "Da clic y selecciona tus archivos",
@@ -904,65 +1414,43 @@ var UploadFile = function (_a) {
904
1414
  onUpload([]);
905
1415
  };
906
1416
  // Clases CSS dinámicas usando Tailwind
907
- var containerClasses = "\n\t\trelative w-full border-2 border-dashed rounded-2xl p-2 sm:p-4 lg:p-4 transition-all duration-300\n\t\t".concat(width !== "100%" ? "w-[".concat(width, "]") : "w-full", "\n\t\t").concat(height !== "auto" ? "h-[".concat(height, "]") : "min-h-[150px] sm:min-h-[180px] lg:min-h-[200px]", "\n\t\t").concat(isDragging
908
- ? "border-blue-500 bg-blue-50 dark:bg-blue-950"
1417
+ var containerClasses = "\n\t\trelative w-full border-2 border-dashed rounded-2xl p-3 transition-all duration-300 bg-red-500\n\t\t".concat(width !== "100%" ? "w-[".concat(width, "]") : "w-full", "\n\t\t").concat(height !== "auto" ? "h-[".concat(height, "]") : "min-h-28", "\n\t\t").concat(isDragging
1418
+ ? "border-primary-500 bg-primary-50 dark:bg-primary-900"
909
1419
  : error
910
- ? "border-red-500 bg-red-50 dark:bg-red-950"
1420
+ ? "border-danger-500 bg-danger-50 dark:bg-danger-950"
911
1421
  : success
912
- ? "border-green-500 bg-green-50 dark:bg-green-950"
1422
+ ? "border-success-500 bg-success-50 dark:bg-success-950"
913
1423
  : disabled
914
1424
  ? "border-gray-300 bg-gray-100 dark:bg-gray-800"
915
- : "border-gray-300 hover:border-gray-400 bg-gray-50 dark:bg-gray-900", "\n\t\t").concat(!(disabled || uploadImageRef.current) ? "cursor-pointer" : "cursor-default", "\n\t\t").concat(className, "\n\t")
1425
+ : "border-gray-300 hover:border-gray-400 bg-primary-50 dark:bg-gray-900", "\n\t\t").concat(!(disabled || uploadImageRef.current) ? "cursor-pointer" : "cursor-default", "\n\t\t").concat(className, "\n\t")
916
1426
  .trim()
917
1427
  .replace(/\s+/g, " ");
918
- var textClasses = "\n\t\ttext-center mb-1 sm:mb-2 text-sm sm:text-base lg:text-lg font-medium\n\t\t".concat(disabled ? "text-gray-400" : textColor || "text-gray-700 dark:text-gray-200", "\n\t");
919
- var subTextClasses = "\n\t\ttext-xs sm:text-sm text-center\n\t\t".concat(disabled ? "text-gray-400" : "text-gray-500 dark:text-gray-400", "\n\t");
920
- return (jsxRuntime.jsxs("div", { className: "relative", children: [jsxRuntime.jsx(react.Card, { className: containerClasses, isPressable: !(disabled || uploadImageRef.current), onPress: handleClick, children: jsxRuntime.jsxs(react.CardBody, { className: "flex flex-col items-center justify-center gap-3 sm:gap-4 relative", 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
1428
+ var textClasses = "\n\t\ttext-centertext-base ont-medium\n\t\t".concat(disabled ? "text-default-400" : textColor || "text-default-700 dark:text-default-200", "\n\t");
1429
+ 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");
1430
+ return (jsxRuntime.jsxs("div", { className: "relative", children: [jsxRuntime.jsx(react.Card, { className: containerClasses, isPressable: !(disabled || uploadImageRef.current), onPress: handleClick, children: jsxRuntime.jsxs(react.CardBody, { className: "flex flex-col items-center justify-center gap-3 sm:gap-4 relative overflow-hidden", 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
921
1431
  ? "opacity-0"
922
- : "opacity-100 transition-opacity", children: jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-3 sm:gap-4", children: [jsxRuntime.jsx(IconComponent, { icon: icon, size: "xl", className: "sm:text-4xl lg:text-5xl ".concat(disabled ? "text-gray-400" : iconColor || "text-primary") }), jsxRuntime.jsxs("div", { className: "space-y-1 sm:space-y-2 text-center px-2", children: [jsxRuntime.jsx("p", { className: textClasses, children: isDragging ? t.dragText : finalText }), finalSubText && !isDragging && (jsxRuntime.jsx("p", { className: subTextClasses, children: finalSubText }))] })] }) }), jsxRuntime.jsx("input", { ref: inputRef, type: "file", className: "hidden", multiple: multiple, accept: Array.isArray(acceptedFiles)
1432
+ : "opacity-100 transition-opacity", children: jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-3 sm:gap-4", children: [jsxRuntime.jsx(IconComponent, { icon: icon, size: "xl", className: "sm:text-4xl lg:text-5xl ".concat(disabled ? "text-gray-400" : iconColor || "text-primary") }), jsxRuntime.jsxs("div", { className: "text-center px-2", children: [jsxRuntime.jsx("p", { className: textClasses, children: isDragging ? t.dragText : finalText }), finalSubText && !isDragging && (jsxRuntime.jsx("p", { className: subTextClasses, children: finalSubText }))] })] }) }), jsxRuntime.jsx("input", { ref: inputRef, type: "file", className: "hidden", multiple: multiple, accept: Array.isArray(acceptedFiles)
923
1433
  ? acceptedFiles.join(",")
924
1434
  : acceptedFiles, onChange: handleChange, disabled: disabled, "aria-label": t.uploadAreaAriaLabel })] }) }), error && errorText && (jsxRuntime.jsx("p", { className: "text-red-500 text-sm mt-2", role: "alert", children: errorText })), showCropModal && selectedImageUrl && cropConfig && (jsxRuntime.jsx(ImageCropModal, { isOpen: showCropModal, imageUrl: selectedImageUrl, targetWidth: cropConfig.targetWidth, targetHeight: cropConfig.targetHeight, onSave: handleCropSave, onCancel: handleCropCancel, translations: t }))] }));
925
1435
  };
926
1436
  UploadFile.displayName = "UploadFile";
927
1437
 
928
- var ConfigMenu = function (_a) {
929
- var _b;
930
- var options = _a.options, onLogout = _a.onLogout, translations = _a.translations;
931
- 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-50 data-[hover=true]:text-default-700", classNames: {
932
- base: "text-default-500",
933
- }, 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-50 data-[hover=true]:text-default-700", classNames: {
934
- base: "text-default-500",
935
- }, 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") })] })] }));
1438
+ var Pagination = function (_a) {
1439
+ _a.size; var props = __rest(_a, ["size"]);
1440
+ return jsxRuntime.jsx(react.Pagination, __assign({ showControls: true, isCompact: true }, props));
936
1441
  };
937
- ConfigMenu.displayName = "ConfigMenu";
938
1442
 
939
- var NotificationButton = function (_a) {
940
- var _b = _a.notificationCount, notificationCount = _b === void 0 ? 0 : _b;
941
- 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 })) }));
1443
+ var Modal = function (props) {
1444
+ return (jsxRuntime.jsx(react.Modal, __assign({ shouldBlockScroll: true, radius: "lg", className: "py-9 px-6" }, props)));
942
1445
  };
943
- NotificationButton.displayName = "NotificationButton";
944
1446
 
945
- var HeaderComponent = function (_a) {
946
- var notificationCount = _a.notificationCount, options = _a.options, onMenuClick = _a.onMenuClick, onLogout = _a.onLogout, translations = _a.translations;
947
- return (jsxRuntime.jsxs("header", { className: "header__container", children: [jsxRuntime.jsx(react.Button, { className: "sm:hidden", isIconOnly: true, variant: "light", startContent: jsxRuntime.jsx(IconComponent, { icon: "solar:hamburger-menu-linear" }), onPress: onMenuClick }), jsxRuntime.jsxs("div", { className: "flex items-center gap-4", children: [jsxRuntime.jsx(NotificationButton, { notificationCount: notificationCount }), jsxRuntime.jsx(ConfigMenu, { options: options, onLogout: onLogout, translations: translations })] })] }));
948
- };
949
- HeaderComponent.displayName = "Header";
1447
+ var ModalContent = react.ModalContent;
950
1448
 
951
- /**
952
- * Botón genérico basado en HeroUI siguiendo las reglas de diseño BeweOS.
953
- *
954
- * Reglas aplicadas:
955
- * - Variant: Solid, Bordered, Light, Flat, Faded
956
- * - Size: sm, md, lg
957
- * - StartContent: On, Off
958
- * - isLoading: On, Off
959
- * - Radius: md (por defecto)
960
- * - isIconOnly: True, False
961
- */
962
- var Button = function (_a) {
963
- 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"]);
964
- return (jsxRuntime.jsx(react.Button, __assign({}, props, { color: color, size: size, variant: variant, radius: radius, startContent: startContent, endContent: endContent, isLoading: isLoading, isIconOnly: isIconOnly })));
965
- };
1449
+ var ModalHeader = react.ModalHeader;
1450
+
1451
+ var ModalBody = react.ModalBody;
1452
+
1453
+ var ModalFooter = react.ModalFooter;
966
1454
 
967
1455
  var paddingClasses = {
968
1456
  sm: "p-4",
@@ -986,228 +1474,503 @@ var Card = function (_a) {
986
1474
  return (jsxRuntime.jsx(react.Card, __assign({ shadow: shadow, radius: radius, className: combinedClassName }, props, { children: children })));
987
1475
  };
988
1476
 
989
- /**
990
- * Input genérico reutilizable basado en HeroUI siguiendo las reglas de diseño BeweOS.
991
- *
992
- * Reglas aplicadas:
993
- * - Variant: Bordered (por defecto)
994
- * - labelPlacement: Outside
995
- * - Size: sm, md, lg (configurable)
996
- * - Radius configurable
997
- */
998
- var Input = function (_a) {
999
- 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"]);
1000
- var generatedId = React.useId();
1001
- var inputId = id || generatedId;
1002
- return (jsxRuntime.jsx(react.Input, __assign({}, props, { id: inputId, label: label, labelPlacement: "outside", placeholder: placeholder, variant: variant, size: size, radius: radius, classNames: {
1003
- label: "text-default-600 text-tiny",
1004
- inputWrapper: "focus-within:!border-primary-500",
1005
- } })));
1006
- };
1007
-
1008
- /**
1009
- * Select genérico reutilizable basado en HeroUI siguiendo las reglas de diseño BeweOS.
1010
- *
1011
- * Reglas aplicadas:
1012
- * - Variant: Bordered (por defecto)
1013
- * - Radius: md (por defecto)
1014
- * - labelPlacement: Outside
1015
- * - Size: sm, md, lg (configurable)
1016
- */
1017
- var Select = function (_a) {
1018
- 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"]);
1019
- var generatedId = React.useId();
1020
- var selectId = id || generatedId;
1021
- 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: {
1022
- label: "text-default-600 text-tiny group-data-[filled=true]:text-default-600",
1023
- trigger: "data-[open=true]:!border-primary-500 data-[focus=true]:!border-primary-500",
1024
- 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",
1025
- } })) }));
1026
- };
1027
-
1028
1477
  var themeColors = {
1478
+ "blue-light": {
1479
+ extend: "light",
1480
+ colors: {
1481
+ primary: {
1482
+ "50": "#dfedfd",
1483
+ "100": "#b3d4fa",
1484
+ "200": "#86bbf7",
1485
+ "300": "#59a1f4",
1486
+ "400": "#2d88f1",
1487
+ "500": "#006fee",
1488
+ "600": "#005cc4",
1489
+ "700": "#00489b",
1490
+ "800": "#003571",
1491
+ "900": "#002147",
1492
+ foreground: "#fff",
1493
+ DEFAULT: "#006fee",
1494
+ },
1495
+ secondary: {
1496
+ "50": "#eee4f8",
1497
+ "100": "#d7bfef",
1498
+ "200": "#bf99e5",
1499
+ "300": "#a773db",
1500
+ "400": "#904ed2",
1501
+ "500": "#7828c8",
1502
+ "600": "#6321a5",
1503
+ "700": "#4e1a82",
1504
+ "800": "#39135f",
1505
+ "900": "#240c3c",
1506
+ foreground: "#fff",
1507
+ DEFAULT: "#7828c8",
1508
+ },
1509
+ success: {
1510
+ "50": "#e2f8ec",
1511
+ "100": "#b9efd1",
1512
+ "200": "#91e5b5",
1513
+ "300": "#68dc9a",
1514
+ "400": "#40d27f",
1515
+ "500": "#17c964",
1516
+ "600": "#13a653",
1517
+ "700": "#0f8341",
1518
+ "800": "#0b5f30",
1519
+ "900": "#073c1e",
1520
+ foreground: "#000",
1521
+ DEFAULT: "#17c964",
1522
+ },
1523
+ warning: {
1524
+ "50": "#fef4e4",
1525
+ "100": "#fce4bd",
1526
+ "200": "#fad497",
1527
+ "300": "#f9c571",
1528
+ "400": "#f7b54a",
1529
+ "500": "#f5a524",
1530
+ "600": "#ca881e",
1531
+ "700": "#9f6b17",
1532
+ "800": "#744e11",
1533
+ "900": "#4a320b",
1534
+ foreground: "#000",
1535
+ DEFAULT: "#f5a524",
1536
+ },
1537
+ danger: {
1538
+ "50": "#fee1eb",
1539
+ "100": "#fbb8cf",
1540
+ "200": "#f98eb3",
1541
+ "300": "#f76598",
1542
+ "400": "#f53b7c",
1543
+ "500": "#f31260",
1544
+ "600": "#c80f4f",
1545
+ "700": "#9e0c3e",
1546
+ "800": "#73092e",
1547
+ "900": "#49051d",
1548
+ foreground: "#000",
1549
+ DEFAULT: "#f31260",
1550
+ },
1551
+ focus: "#006FEE",
1552
+ overlay: "#000000",
1553
+ },
1554
+ },
1555
+ "blue-dark": {
1556
+ extend: "dark",
1557
+ colors: {
1558
+ primary: {
1559
+ "50": "#002147",
1560
+ "100": "#003571",
1561
+ "200": "#00489b",
1562
+ "300": "#005cc4",
1563
+ "400": "#006fee",
1564
+ "500": "#2d88f1",
1565
+ "600": "#59a1f4",
1566
+ "700": "#86bbf7",
1567
+ "800": "#b3d4fa",
1568
+ "900": "#dfedfd",
1569
+ foreground: "#fff",
1570
+ DEFAULT: "#006fee",
1571
+ },
1572
+ secondary: {
1573
+ "50": "#240c3c",
1574
+ "100": "#39135f",
1575
+ "200": "#4e1a82",
1576
+ "300": "#6321a5",
1577
+ "400": "#7828c8",
1578
+ "500": "#904ed2",
1579
+ "600": "#a773db",
1580
+ "700": "#bf99e5",
1581
+ "800": "#d7bfef",
1582
+ "900": "#eee4f8",
1583
+ foreground: "#fff",
1584
+ DEFAULT: "#7828c8",
1585
+ },
1586
+ success: {
1587
+ "50": "#073c1e",
1588
+ "100": "#0b5f30",
1589
+ "200": "#0f8341",
1590
+ "300": "#13a653",
1591
+ "400": "#17c964",
1592
+ "500": "#40d27f",
1593
+ "600": "#68dc9a",
1594
+ "700": "#91e5b5",
1595
+ "800": "#b9efd1",
1596
+ "900": "#e2f8ec",
1597
+ foreground: "#000",
1598
+ DEFAULT: "#17c964",
1599
+ },
1600
+ warning: {
1601
+ "50": "#4a320b",
1602
+ "100": "#744e11",
1603
+ "200": "#9f6b17",
1604
+ "300": "#ca881e",
1605
+ "400": "#f5a524",
1606
+ "500": "#f7b54a",
1607
+ "600": "#f9c571",
1608
+ "700": "#fad497",
1609
+ "800": "#fce4bd",
1610
+ "900": "#fef4e4",
1611
+ foreground: "#000",
1612
+ DEFAULT: "#f5a524",
1613
+ },
1614
+ danger: {
1615
+ "50": "#49051d",
1616
+ "100": "#73092e",
1617
+ "200": "#9e0c3e",
1618
+ "300": "#c80f4f",
1619
+ "400": "#f31260",
1620
+ "500": "#f53b7c",
1621
+ "600": "#f76598",
1622
+ "700": "#f98eb3",
1623
+ "800": "#fbb8cf",
1624
+ "900": "#fee1eb",
1625
+ foreground: "#000",
1626
+ DEFAULT: "#f31260",
1627
+ },
1628
+ focus: "#006FEE",
1629
+ overlay: "#ffffff",
1630
+ },
1631
+ },
1029
1632
  "purple-light": {
1030
1633
  extend: "light",
1031
1634
  colors: {
1032
- background: "#ffffff",
1033
- foreground: "#111827",
1034
1635
  primary: {
1035
- 50: "#eee4f8",
1036
- 100: "#d7bfef",
1037
- 200: "#bf99e5",
1038
- 300: "#a773db",
1039
- 400: "#904ed2",
1040
- 500: "#7828c8",
1041
- 600: "#6321a5",
1042
- 700: "#4e1a82",
1043
- 800: "#39135f",
1044
- 900: "#240c3c",
1636
+ "50": "#eee4f8",
1637
+ "100": "#d7bfef",
1638
+ "200": "#bf99e5",
1639
+ "300": "#a773db",
1640
+ "400": "#904ed2",
1641
+ "500": "#7828c8",
1642
+ "600": "#6321a5",
1643
+ "700": "#4e1a82",
1644
+ "800": "#39135f",
1645
+ "900": "#240c3c",
1646
+ foreground: "#fff",
1045
1647
  DEFAULT: "#7828c8",
1046
- foreground: "#ffffff",
1047
1648
  },
1048
- focus: "#904ed2",
1649
+ secondary: {
1650
+ "50": "#dfedfd",
1651
+ "100": "#b3d4fa",
1652
+ "200": "#86bbf7",
1653
+ "300": "#59a1f4",
1654
+ "400": "#2d88f1",
1655
+ "500": "#006fee",
1656
+ "600": "#005cc4",
1657
+ "700": "#00489b",
1658
+ "800": "#003571",
1659
+ "900": "#002147",
1660
+ foreground: "#fff",
1661
+ DEFAULT: "#006fee",
1662
+ },
1663
+ focus: "#7828c8",
1664
+ overlay: "#000000",
1049
1665
  },
1050
1666
  },
1051
1667
  "purple-dark": {
1052
1668
  extend: "dark",
1053
1669
  colors: {
1054
- background: "#1A1023",
1055
- foreground: "#ffffff",
1056
1670
  primary: {
1057
- 50: "#2c193f",
1058
- 100: "#462764",
1059
- 200: "#603689",
1060
- 300: "#7944ae",
1061
- 400: "#9353d3",
1062
- 500: "#a671db",
1063
- 600: "#b98fe2",
1064
- 700: "#ccadee",
1065
- 800: "#dfcbf2",
1066
- 900: "#f2eafa",
1671
+ "50": "#2c193f",
1672
+ "100": "#462764",
1673
+ "200": "#603689",
1674
+ "300": "#7944ae",
1675
+ "400": "#9353d3",
1676
+ "500": "#a671db",
1677
+ "600": "#b98fe2",
1678
+ "700": "#ccadea",
1679
+ "800": "#dfcbf2",
1680
+ "900": "#f2eafa",
1681
+ foreground: "#fff",
1067
1682
  DEFAULT: "#9353d3",
1068
- foreground: "#ffffff",
1069
1683
  },
1070
- focus: "#a671db",
1684
+ secondary: {
1685
+ "50": "#1e254d",
1686
+ "100": "#2f3a79",
1687
+ "200": "#404fa6",
1688
+ "300": "#5265d2",
1689
+ "400": "#637aff",
1690
+ "500": "#7e91ff",
1691
+ "600": "#9aa9ff",
1692
+ "700": "#b5c0ff",
1693
+ "800": "#d0d7ff",
1694
+ "900": "#eceeff",
1695
+ foreground: "#000",
1696
+ DEFAULT: "#637aff",
1697
+ },
1698
+ focus: "#9353d3",
1071
1699
  },
1072
1700
  },
1073
- "green-light": {
1701
+ "yellow-light": {
1074
1702
  extend: "light",
1075
1703
  colors: {
1076
- background: "#ffffff",
1077
- foreground: "#111827",
1078
1704
  primary: {
1079
- 50: "#ecf9f0",
1080
- 100: "#d1f0dc",
1081
- 200: "#b6e7c7",
1082
- 300: "#9cdeb3",
1083
- 400: "#81d59e",
1084
- 500: "#66cc8a",
1085
- 600: "#54a872",
1086
- 700: "#42855a",
1087
- 800: "#306142",
1088
- 900: "#1f3d29",
1089
- DEFAULT: "#66cc8a",
1090
- foreground: "#000000",
1705
+ "50": "#fffbe6",
1706
+ "100": "#FFFACD",
1707
+ "200": "#FFF39B",
1708
+ "300": "#FFEB69",
1709
+ "400": "#FFE243",
1710
+ "500": "#FFD505",
1711
+ "600": "#DBB303",
1712
+ "700": "#B79202",
1713
+ "800": "#937301",
1714
+ "900": "#7A5D00",
1715
+ foreground: "#000",
1716
+ DEFAULT: "#FFD505",
1717
+ },
1718
+ secondary: {
1719
+ "50": "#F3F7FD",
1720
+ "100": "#D1DFFB",
1721
+ "200": "#A5BEF7",
1722
+ "300": "#7494E7",
1723
+ "400": "#4E6FCF",
1724
+ "500": "#1E40AF",
1725
+ "600": "#153096",
1726
+ "700": "#0F237D",
1727
+ "800": "#091865",
1728
+ "900": "#051053",
1729
+ foreground: "#fff",
1730
+ DEFAULT: "#1E40AF",
1091
1731
  },
1092
- focus: "#81d59e",
1732
+ focus: "#FFD505",
1733
+ overlay: "#000000",
1093
1734
  },
1094
1735
  },
1095
- "green-dark": {
1736
+ "yellow-dark": {
1096
1737
  extend: "dark",
1097
1738
  colors: {
1098
- background: "#0F1D15",
1099
- foreground: "#ffffff",
1100
1739
  primary: {
1101
- 50: "#1f3d29",
1102
- 100: "#306142",
1103
- 200: "#42855a",
1104
- 300: "#54a872",
1105
- 400: "#66cc8a",
1106
- 500: "#81d59e",
1107
- 600: "#9cdeb3",
1108
- 700: "#b6e7c7",
1109
- 800: "#d1f0dc",
1110
- 900: "#ecf9f0",
1111
- DEFAULT: "#66cc8a",
1112
- foreground: "#000000",
1740
+ "50": "#7A5D00",
1741
+ "100": "#937301",
1742
+ "200": "#B79202",
1743
+ "300": "#DBB303",
1744
+ "400": "#FFD505",
1745
+ "500": "#FFE243",
1746
+ "600": "#FFEB69",
1747
+ "700": "#FFF39B",
1748
+ "800": "#FFFACD",
1749
+ "900": "#fffbe6",
1750
+ foreground: "#000",
1751
+ DEFAULT: "#FFD505",
1752
+ },
1753
+ secondary: {
1754
+ 50: "#e1efff",
1755
+ 100: "#b2d0ff",
1756
+ 200: "#83b1fc",
1757
+ 300: "#5292f8",
1758
+ 400: "#2473f5",
1759
+ 500: "#0a5adb",
1760
+ 600: "#0246ac",
1761
+ 700: "#00327c",
1762
+ 800: "#001e4d",
1763
+ 900: "#000a1f",
1764
+ foreground: "#fff",
1765
+ DEFAULT: "#0a5adb",
1113
1766
  },
1114
- focus: "#81d59e",
1767
+ focus: "#FFD505",
1768
+ overlay: "#ffffff",
1115
1769
  },
1116
1770
  },
1117
- "blue-light": {
1771
+ "coral-light": {
1118
1772
  extend: "light",
1119
1773
  colors: {
1120
- background: "#ffffff",
1121
- foreground: "#111827",
1122
1774
  primary: {
1123
- 50: "#eff6ff",
1124
- 100: "#dbeafe",
1125
- 200: "#bfdbfe",
1126
- 300: "#93c5fd",
1127
- 400: "#60a5fa",
1128
- 500: "#3b82f6",
1129
- 600: "#2563eb",
1130
- 700: "#1d4ed8",
1131
- 800: "#1e40af",
1132
- 900: "#1e3a8a",
1133
- DEFAULT: "#3b82f6",
1134
- foreground: "#ffffff",
1775
+ "50": "#ffe9e9",
1776
+ "100": "#ffcaca",
1777
+ "200": "#ffabab",
1778
+ "300": "#ff8d8d",
1779
+ "400": "#ff6e6e",
1780
+ "500": "#ff4f4f",
1781
+ "600": "#d24141",
1782
+ "700": "#a63333",
1783
+ "800": "#792626",
1784
+ "900": "#4d1818",
1785
+ foreground: "#000",
1786
+ DEFAULT: "#ff4f4f",
1135
1787
  },
1136
- focus: "#60a5fa",
1788
+ focus: "#ff4f4f",
1137
1789
  },
1138
1790
  },
1139
- "blue-dark": {
1791
+ "coral-dark": {
1140
1792
  extend: "dark",
1141
1793
  colors: {
1142
- background: "#101d3a",
1143
- foreground: "#ffffff",
1144
1794
  primary: {
1145
- 50: "#1e3a8a",
1146
- 100: "#1e40af",
1147
- 200: "#1d4ed8",
1148
- 300: "#2563eb",
1149
- 400: "#3b82f6",
1150
- 500: "#60a5fa",
1151
- 600: "#93c5fd",
1152
- 700: "#bfdbfe",
1153
- 800: "#dbeafe",
1154
- 900: "#eff6ff",
1155
- DEFAULT: "#3b82f6",
1156
- foreground: "#ffffff",
1795
+ "50": "#4d1818",
1796
+ "100": "#792626",
1797
+ "200": "#a63333",
1798
+ "300": "#d24141",
1799
+ "400": "#ff4f4f",
1800
+ "500": "#ff6e6e",
1801
+ "600": "#ff8d8d",
1802
+ "700": "#ffabab",
1803
+ "800": "#ffcaca",
1804
+ "900": "#ffe9e9",
1805
+ foreground: "#000",
1806
+ DEFAULT: "#ff4f4f",
1157
1807
  },
1158
- focus: "#60a5fa",
1808
+ focus: "#ff4f4f",
1159
1809
  },
1160
1810
  },
1161
- "yellow-light": {
1811
+ "green-light": {
1162
1812
  extend: "light",
1163
1813
  colors: {
1164
- background: "#ffffff",
1165
- foreground: "#111827",
1166
1814
  primary: {
1167
- 50: "#fefce8",
1168
- 100: "#fef9c3",
1169
- 200: "#fef08a",
1170
- 300: "#fde047",
1171
- 400: "#facc15",
1172
- 500: "#eab308",
1173
- 600: "#ca8a04",
1174
- 700: "#a16207",
1175
- 800: "#854d0e",
1176
- 900: "#713f12",
1177
- DEFAULT: "#eab308",
1178
- foreground: "#111827",
1815
+ 50: "#EFFFEF",
1816
+ 100: "#CFFCD1",
1817
+ 200: "#A0F9AC",
1818
+ 300: "#6FEE8D",
1819
+ 400: "#49DE7B",
1820
+ 500: "#16C964",
1821
+ 600: "#10AC64",
1822
+ 700: "#0B905F",
1823
+ 800: "#077457",
1824
+ 900: "#046051",
1825
+ foreground: "#000",
1826
+ DEFAULT: "#16C964",
1827
+ },
1828
+ secondary: {
1829
+ "50": "#e3eaff",
1830
+ "100": "#D7DFFE",
1831
+ "200": "#AFBFFE",
1832
+ "300": "#889DFD",
1833
+ "400": "#6A82FB",
1834
+ "500": "#3956F9",
1835
+ "600": "#2941D6",
1836
+ "700": "#1C2EB3",
1837
+ "800": "#121F90",
1838
+ "900": "#0A1477",
1839
+ foreground: "#fff",
1840
+ DEFAULT: "#3956F9",
1841
+ },
1842
+ success: {
1843
+ "50": "#e7fde3",
1844
+ "100": "#E8FCD3",
1845
+ "200": "#CBFAA8",
1846
+ "300": "#A4F17B",
1847
+ "400": "#7EE358",
1848
+ "500": "#49D127",
1849
+ "600": "#2FB31C",
1850
+ "700": "#1A9613",
1851
+ "800": "#0C790E",
1852
+ "900": "#076410",
1853
+ foreground: "#000",
1854
+ DEFAULT: "#49D127",
1855
+ },
1856
+ warning: {
1857
+ "50": "#fff9da",
1858
+ "100": "#FFF7CC",
1859
+ "200": "#FFEE99",
1860
+ "300": "#FFE266",
1861
+ "400": "#FFD63F",
1862
+ "500": "#FFC300",
1863
+ "600": "#DBA200",
1864
+ "700": "#B78300",
1865
+ "800": "#936600",
1866
+ "900": "#7A5100",
1867
+ foreground: "#000",
1868
+ DEFAULT: "#FFC300",
1869
+ },
1870
+ danger: {
1871
+ "50": "#ffe2e5",
1872
+ "100": "#FFE3D8",
1873
+ "200": "#FFC1B2",
1874
+ "300": "#FF988B",
1875
+ "400": "#FF726F",
1876
+ "500": "#FF3F4C",
1877
+ "600": "#DB2E49",
1878
+ "700": "#B71F45",
1879
+ "800": "#93143F",
1880
+ "900": "#7A0C3B",
1881
+ foreground: "#000",
1882
+ DEFAULT: "#FF3F4C",
1179
1883
  },
1180
- focus: "#facc15",
1884
+ focus: "#66cc8a",
1885
+ overlay: "#000000",
1181
1886
  },
1182
1887
  },
1183
- "yellow-dark": {
1888
+ "green-dark": {
1184
1889
  extend: "dark",
1185
1890
  colors: {
1186
- background: "#18181b",
1187
- foreground: "#ffffff",
1188
1891
  primary: {
1189
- 50: "#713f12",
1190
- 100: "#854d0e",
1191
- 200: "#a16207",
1192
- 300: "#ca8a04",
1193
- 400: "#eab308",
1194
- 500: "#facc15",
1195
- 600: "#fde047",
1196
- 700: "#fef08a",
1197
- 800: "#fef9c3",
1198
- 900: "#fefce8",
1199
- DEFAULT: "#facc15",
1200
- foreground: "#18181b",
1892
+ 50: "#EFFFEF",
1893
+ 100: "#CFFCD1",
1894
+ 200: "#A0F9AC",
1895
+ 300: "#6FEE8D",
1896
+ 400: "#49DE7B",
1897
+ 500: "#16C964",
1898
+ 600: "#10AC64",
1899
+ 700: "#0B905F",
1900
+ 800: "#077457",
1901
+ 900: "#046051",
1902
+ foreground: "#000",
1903
+ DEFAULT: "#16C964",
1904
+ },
1905
+ secondary: {
1906
+ "50": "#e3eaff",
1907
+ "100": "#D7DFFE",
1908
+ "200": "#AFBFFE",
1909
+ "300": "#889DFD",
1910
+ "400": "#6A82FB",
1911
+ "500": "#3956F9",
1912
+ "600": "#2941D6",
1913
+ "700": "#1C2EB3",
1914
+ "800": "#121F90",
1915
+ "900": "#0A1477",
1916
+ foreground: "#fff",
1917
+ DEFAULT: "#3956F9",
1918
+ },
1919
+ success: {
1920
+ "50": "#e7fde3",
1921
+ "100": "#E8FCD3",
1922
+ "200": "#CBFAA8",
1923
+ "300": "#A4F17B",
1924
+ "400": "#7EE358",
1925
+ "500": "#49D127",
1926
+ "600": "#2FB31C",
1927
+ "700": "#1A9613",
1928
+ "800": "#0C790E",
1929
+ "900": "#076410",
1930
+ foreground: "#000",
1931
+ DEFAULT: "#49D127",
1932
+ },
1933
+ warning: {
1934
+ "50": "#fff9da",
1935
+ "100": "#FFF7CC",
1936
+ "200": "#FFEE99",
1937
+ "300": "#FFE266",
1938
+ "400": "#FFD63F",
1939
+ "500": "#FFC300",
1940
+ "600": "#DBA200",
1941
+ "700": "#B78300",
1942
+ "800": "#936600",
1943
+ "900": "#7A5100",
1944
+ foreground: "#000",
1945
+ DEFAULT: "#FFC300",
1201
1946
  },
1202
- focus: "#eab308",
1947
+ danger: {
1948
+ "50": "#ffe2e5",
1949
+ "100": "#FFE3D8",
1950
+ "200": "#FFC1B2",
1951
+ "300": "#FF988B",
1952
+ "400": "#FF726F",
1953
+ "500": "#FF3F4C",
1954
+ "600": "#DB2E49",
1955
+ "700": "#B71F45",
1956
+ "800": "#93143F",
1957
+ "900": "#7A0C3B",
1958
+ foreground: "#fff",
1959
+ DEFAULT: "#FF3F4C",
1960
+ },
1961
+ focus: "#66cc8a",
1962
+ overlay: "#ffffff",
1203
1963
  },
1204
1964
  },
1205
1965
  };
1206
1966
 
1207
1967
  var ThemeContext = React.createContext({
1208
- theme: "light",
1968
+ mode: "light",
1969
+ color: "blue",
1970
+ // biome-ignore lint/suspicious/noEmptyBlockStatements: <explanation>
1971
+ setMode: function () { },
1209
1972
  // biome-ignore lint/suspicious/noEmptyBlockStatements: <explanation>
1210
- setTheme: function () { },
1973
+ setColor: function () { },
1211
1974
  });
1212
1975
  var useThemeContext = function () {
1213
1976
  var context = React.useContext(ThemeContext);
@@ -1217,27 +1980,150 @@ var useThemeContext = function () {
1217
1980
  return context;
1218
1981
  };
1219
1982
 
1983
+ /**
1984
+ * @file This file contains the theme configurations for the application.
1985
+ */
1986
+ var ALL_THEMES = __spreadArray(["light", "dark"], Object.keys(themeColors), true);
1987
+
1988
+ /**
1989
+ * Custom hook to manage the theme state and side effects.
1990
+ * @returns An object with the current mode, color, and functions to set them.
1991
+ */
1992
+ var useThemeManager = function () {
1993
+ var _a = useTheme.useTheme(), rawTheme = _a.theme, setRawTheme = _a.setTheme;
1994
+ var setTheme = React.useCallback(function (theme) {
1995
+ var _a;
1996
+ var html = document.documentElement;
1997
+ (_a = html.classList).remove.apply(_a, ALL_THEMES);
1998
+ setRawTheme(theme);
1999
+ }, [setRawTheme]);
2000
+ React.useEffect(function () {
2001
+ var _a;
2002
+ var html = document.documentElement;
2003
+ (_a = html.classList).remove.apply(_a, ALL_THEMES);
2004
+ html.classList.add(rawTheme);
2005
+ }, [rawTheme]);
2006
+ var _b = React.useMemo(function () {
2007
+ var parts = rawTheme.split("-");
2008
+ var parsedColor = "blue";
2009
+ var parsedMode = "light";
2010
+ if (parts.length === 2) {
2011
+ var colorPart = parts[0], modePart = parts[1];
2012
+ parsedColor = colorPart;
2013
+ parsedMode = modePart;
2014
+ }
2015
+ else if (rawTheme === "light" || rawTheme === "dark") {
2016
+ parsedMode = rawTheme;
2017
+ }
2018
+ return { mode: parsedMode, color: parsedColor };
2019
+ }, [rawTheme]), mode = _b.mode, color = _b.color;
2020
+ var setMode = React.useCallback(function (newMode) {
2021
+ var newTheme = color === "blue" ? newMode : "".concat(color, "-").concat(newMode);
2022
+ setTheme(newTheme);
2023
+ }, [color, setTheme]);
2024
+ var setColor = React.useCallback(function (newColor) {
2025
+ var newTheme = newColor === "blue" ? mode : "".concat(newColor, "-").concat(mode);
2026
+ setTheme(newTheme);
2027
+ }, [mode, setTheme]);
2028
+ return {
2029
+ mode: mode,
2030
+ color: color,
2031
+ setMode: setMode,
2032
+ setColor: setColor,
2033
+ };
2034
+ };
2035
+
2036
+ /**
2037
+ * The ThemeProvider component is a wrapper that provides theme context to its children.
2038
+ * It uses the useThemeManager hook to manage the theme state and provides the current
2039
+ * theme mode and color, along with functions to update them, to its children.
2040
+ *
2041
+ * @param {IThemeProvider} { children }
2042
+ * @returns {JSX.Element}
2043
+ */
1220
2044
  var ThemeProvider = function (_a) {
1221
2045
  var children = _a.children;
1222
- var _b = useTheme.useTheme(), theme = _b.theme, setTheme = _b.setTheme;
1223
- return (jsxRuntime.jsx(ThemeContext.Provider, { value: { theme: theme, setTheme: setTheme }, children: jsxRuntime.jsx("main", { className: "".concat(theme, " bg-background text-foreground "), children: children }) }));
2046
+ var _b = useThemeManager(), mode = _b.mode, color = _b.color, setMode = _b.setMode, setColor = _b.setColor;
2047
+ return (jsxRuntime.jsx(ThemeContext.Provider, { value: {
2048
+ mode: mode,
2049
+ color: color,
2050
+ setMode: setMode,
2051
+ setColor: setColor,
2052
+ }, children: children }));
2053
+ };
2054
+
2055
+ var AuraToastProvider = function (_a) {
2056
+ var children = _a.children;
2057
+ var _b = React.useState({
2058
+ isVisible: false,
2059
+ title: "",
2060
+ description: "",
2061
+ color: "primary",
2062
+ duration: 3000,
2063
+ }), toast = _b[0], setToast = _b[1];
2064
+ var timerRef = React.useRef(null);
2065
+ var hideToast = React.useCallback(function () {
2066
+ if (timerRef.current) {
2067
+ clearTimeout(timerRef.current);
2068
+ timerRef.current = null;
2069
+ }
2070
+ setToast(function (currentToast) { return (__assign(__assign({}, currentToast), { isVisible: false })); });
2071
+ }, []);
2072
+ var showToast = React.useCallback(function (options) {
2073
+ if (timerRef.current) {
2074
+ clearTimeout(timerRef.current);
2075
+ }
2076
+ setToast(__assign({ isVisible: true }, options));
2077
+ var duration = options.duration === undefined ? 3000 : options.duration;
2078
+ if (duration > 0) {
2079
+ timerRef.current = setTimeout(function () {
2080
+ hideToast();
2081
+ }, duration);
2082
+ }
2083
+ }, [hideToast]);
2084
+ React.useEffect(function () {
2085
+ return function () {
2086
+ if (timerRef.current) {
2087
+ clearTimeout(timerRef.current);
2088
+ }
2089
+ };
2090
+ }, []);
2091
+ return (jsxRuntime.jsx(ToastContext.Provider, { value: { toast: toast, showToast: showToast, hideToast: hideToast }, children: children }));
1224
2092
  };
1225
2093
 
2094
+ exports.AddHolidayForm = AddHolidayForm;
2095
+ exports.AuraTable = AuraTable;
2096
+ exports.AuraToastProvider = AuraToastProvider;
1226
2097
  exports.AutoComplete = AutoComplete;
1227
2098
  exports.Button = Button;
1228
2099
  exports.Card = Card;
2100
+ exports.DatePicker = DatePicker;
2101
+ exports.DateRangePicker = DateRangePicker;
2102
+ exports.GlobalToast = GlobalToast;
1229
2103
  exports.HeaderComponent = HeaderComponent;
1230
2104
  exports.IconComponent = IconComponent;
1231
2105
  exports.Input = Input;
1232
2106
  exports.MenuComponent = MenuComponent;
2107
+ exports.Modal = Modal;
2108
+ exports.ModalBody = ModalBody;
2109
+ exports.ModalContent = ModalContent;
2110
+ exports.ModalFooter = ModalFooter;
2111
+ exports.ModalHeader = ModalHeader;
2112
+ exports.Pagination = Pagination;
1233
2113
  exports.Phone = Phone;
2114
+ exports.ScheduleRow = ScheduleRow;
1234
2115
  exports.Select = Select;
2116
+ exports.SwitchComponent = Switch;
2117
+ exports.Textarea = Textarea;
1235
2118
  exports.ThemeContext = ThemeContext;
1236
2119
  exports.ThemePicker = ThemePicker;
1237
2120
  exports.ThemeProvider = ThemeProvider;
2121
+ exports.TimeInputComponent = TimeInput;
2122
+ exports.ToastContext = ToastContext;
1238
2123
  exports.UploadFile = UploadFile;
1239
2124
  exports.sizeMap = sizeMap;
1240
2125
  exports.themeColors = themeColors;
2126
+ exports.useAuraToast = useAuraToast;
1241
2127
  exports.useThemeContext = useThemeContext;
1242
2128
  Object.keys(react).forEach(function (k) {
1243
2129
  if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {