@beweco/aurora-ui 0.1.3 → 0.1.5

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 (152) hide show
  1. package/dist/assets/css/styles.css +1 -1
  2. package/dist/index.cjs.js +1182 -235
  3. package/dist/index.esm.js +1165 -241
  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/color-selector/ColorSelector.d.ts +5 -0
  13. package/dist/types/components/color-selector/ColorSelector.d.ts.map +1 -0
  14. package/dist/types/components/color-selector/ColorSelector.types.d.ts +5 -0
  15. package/dist/types/components/color-selector/ColorSelector.types.d.ts.map +1 -0
  16. package/dist/types/components/color-selector/index.d.ts +3 -0
  17. package/dist/types/components/color-selector/index.d.ts.map +1 -0
  18. package/dist/types/components/datepicker/DatePicker.d.ts +4 -0
  19. package/dist/types/components/datepicker/DatePicker.d.ts.map +1 -0
  20. package/dist/types/components/datepicker/DatePicker.types.d.ts +5 -0
  21. package/dist/types/components/datepicker/DatePicker.types.d.ts.map +1 -0
  22. package/dist/types/components/datepicker/index.d.ts +3 -0
  23. package/dist/types/components/datepicker/index.d.ts.map +1 -0
  24. package/dist/types/components/daterangepicker/DateRangePicker.d.ts +5 -0
  25. package/dist/types/components/daterangepicker/DateRangePicker.d.ts.map +1 -0
  26. package/dist/types/components/daterangepicker/DateRangePicker.types.d.ts +5 -0
  27. package/dist/types/components/daterangepicker/DateRangePicker.types.d.ts.map +1 -0
  28. package/dist/types/components/daterangepicker/index.d.ts +3 -0
  29. package/dist/types/components/daterangepicker/index.d.ts.map +1 -0
  30. package/dist/types/components/h2/H2.d.ts +4 -0
  31. package/dist/types/components/h2/H2.d.ts.map +1 -0
  32. package/dist/types/components/h2/H2.types.d.ts +4 -0
  33. package/dist/types/components/h2/H2.types.d.ts.map +1 -0
  34. package/dist/types/components/h2/index.d.ts +3 -0
  35. package/dist/types/components/h2/index.d.ts.map +1 -0
  36. package/dist/types/components/h3/H3.d.ts +4 -0
  37. package/dist/types/components/h3/H3.d.ts.map +1 -0
  38. package/dist/types/components/h3/H3.types.d.ts +4 -0
  39. package/dist/types/components/h3/H3.types.d.ts.map +1 -0
  40. package/dist/types/components/h3/index.d.ts +3 -0
  41. package/dist/types/components/h3/index.d.ts.map +1 -0
  42. package/dist/types/components/h4/H4.d.ts +4 -0
  43. package/dist/types/components/h4/H4.d.ts.map +1 -0
  44. package/dist/types/components/h4/H4.types.d.ts +4 -0
  45. package/dist/types/components/h4/H4.types.d.ts.map +1 -0
  46. package/dist/types/components/h4/index.d.ts +3 -0
  47. package/dist/types/components/h4/index.d.ts.map +1 -0
  48. package/dist/types/components/input/Input.d.ts.map +1 -1
  49. package/dist/types/components/modal/Modal.d.ts +5 -0
  50. package/dist/types/components/modal/Modal.d.ts.map +1 -0
  51. package/dist/types/components/modal/Modal.types.d.ts +4 -0
  52. package/dist/types/components/modal/Modal.types.d.ts.map +1 -0
  53. package/dist/types/components/modal/_internal/ModalBody.d.ts +3 -0
  54. package/dist/types/components/modal/_internal/ModalBody.d.ts.map +1 -0
  55. package/dist/types/components/modal/_internal/ModalContent.d.ts +6 -0
  56. package/dist/types/components/modal/_internal/ModalContent.d.ts.map +1 -0
  57. package/dist/types/components/modal/_internal/ModalFooter.d.ts +3 -0
  58. package/dist/types/components/modal/_internal/ModalFooter.d.ts.map +1 -0
  59. package/dist/types/components/modal/_internal/ModalHeader.d.ts +3 -0
  60. package/dist/types/components/modal/_internal/ModalHeader.d.ts.map +1 -0
  61. package/dist/types/components/modal/_internal/index.d.ts +5 -0
  62. package/dist/types/components/modal/_internal/index.d.ts.map +1 -0
  63. package/dist/types/components/modal/index.d.ts +4 -0
  64. package/dist/types/components/modal/index.d.ts.map +1 -0
  65. package/dist/types/components/p/P.d.ts +4 -0
  66. package/dist/types/components/p/P.d.ts.map +1 -0
  67. package/dist/types/components/p/P.types.d.ts +4 -0
  68. package/dist/types/components/p/P.types.d.ts.map +1 -0
  69. package/dist/types/components/p/index.d.ts +3 -0
  70. package/dist/types/components/p/index.d.ts.map +1 -0
  71. package/dist/types/components/pagination/Pagination.d.ts +5 -0
  72. package/dist/types/components/pagination/Pagination.d.ts.map +1 -0
  73. package/dist/types/components/pagination/Pagination.types.d.ts +4 -0
  74. package/dist/types/components/pagination/Pagination.types.d.ts.map +1 -0
  75. package/dist/types/components/pagination/index.d.ts +3 -0
  76. package/dist/types/components/pagination/index.d.ts.map +1 -0
  77. package/dist/types/components/schedule-row/index.d.ts +3 -0
  78. package/dist/types/components/schedule-row/index.d.ts.map +1 -0
  79. package/dist/types/components/schedule-row/schedule-row.d.ts +14 -0
  80. package/dist/types/components/schedule-row/schedule-row.d.ts.map +1 -0
  81. package/dist/types/components/schedule-row/schedule-row.types.d.ts +68 -0
  82. package/dist/types/components/schedule-row/schedule-row.types.d.ts.map +1 -0
  83. package/dist/types/components/switch/Switch.d.ts +4 -0
  84. package/dist/types/components/switch/Switch.d.ts.map +1 -0
  85. package/dist/types/components/switch/Switch.types.d.ts +3 -0
  86. package/dist/types/components/switch/Switch.types.d.ts.map +1 -0
  87. package/dist/types/components/switch/index.d.ts +3 -0
  88. package/dist/types/components/switch/index.d.ts.map +1 -0
  89. package/dist/types/components/table/AuraTable.d.ts +9 -0
  90. package/dist/types/components/table/AuraTable.d.ts.map +1 -0
  91. package/dist/types/components/table/AuraTable.types.d.ts +15 -0
  92. package/dist/types/components/table/AuraTable.types.d.ts.map +1 -0
  93. package/dist/types/components/table/_internal/TableBody.d.ts +5 -0
  94. package/dist/types/components/table/_internal/TableBody.d.ts.map +1 -0
  95. package/dist/types/components/table/_internal/TableCell.d.ts +4 -0
  96. package/dist/types/components/table/_internal/TableCell.d.ts.map +1 -0
  97. package/dist/types/components/table/_internal/TableColumn.d.ts +5 -0
  98. package/dist/types/components/table/_internal/TableColumn.d.ts.map +1 -0
  99. package/dist/types/components/table/_internal/TableHeader.d.ts +5 -0
  100. package/dist/types/components/table/_internal/TableHeader.d.ts.map +1 -0
  101. package/dist/types/components/table/_internal/TableRow.d.ts +4 -0
  102. package/dist/types/components/table/_internal/TableRow.d.ts.map +1 -0
  103. package/dist/types/components/table/_internal/index.d.ts +7 -0
  104. package/dist/types/components/table/_internal/index.d.ts.map +1 -0
  105. package/dist/types/components/table/index.d.ts +3 -0
  106. package/dist/types/components/table/index.d.ts.map +1 -0
  107. package/dist/types/components/textarea/Textarea.d.ts +7 -0
  108. package/dist/types/components/textarea/Textarea.d.ts.map +1 -0
  109. package/dist/types/components/textarea/Textarea.types.d.ts +3 -0
  110. package/dist/types/components/textarea/Textarea.types.d.ts.map +1 -0
  111. package/dist/types/components/textarea/index.d.ts +3 -0
  112. package/dist/types/components/textarea/index.d.ts.map +1 -0
  113. package/dist/types/components/time-input/TimeInput.d.ts +7 -0
  114. package/dist/types/components/time-input/TimeInput.d.ts.map +1 -0
  115. package/dist/types/components/time-input/TimeInput.types.d.ts +5 -0
  116. package/dist/types/components/time-input/TimeInput.types.d.ts.map +1 -0
  117. package/dist/types/components/time-input/index.d.ts +3 -0
  118. package/dist/types/components/time-input/index.d.ts.map +1 -0
  119. package/dist/types/components/toast/GlobalToast.d.ts +2 -0
  120. package/dist/types/components/toast/GlobalToast.d.ts.map +1 -0
  121. package/dist/types/components/toast/index.d.ts +2 -0
  122. package/dist/types/components/toast/index.d.ts.map +1 -0
  123. package/dist/types/contexts/theme/index.d.ts +2 -2
  124. package/dist/types/contexts/theme/index.d.ts.map +1 -1
  125. package/dist/types/contexts/theme/theme-context.d.ts.map +1 -1
  126. package/dist/types/contexts/theme/theme-context.type.d.ts +6 -3
  127. package/dist/types/contexts/theme/theme-context.type.d.ts.map +1 -1
  128. package/dist/types/contexts/toast/index.d.ts +3 -0
  129. package/dist/types/contexts/toast/index.d.ts.map +1 -0
  130. package/dist/types/contexts/toast/toast.context.d.ts +4 -0
  131. package/dist/types/contexts/toast/toast.context.d.ts.map +1 -0
  132. package/dist/types/contexts/toast/toast.context.type.d.ts +15 -0
  133. package/dist/types/contexts/toast/toast.context.type.d.ts.map +1 -0
  134. package/dist/types/index.d.ts +25 -1
  135. package/dist/types/index.d.ts.map +1 -1
  136. package/dist/types/providers/theme/theme-provider.d.ts +10 -2
  137. package/dist/types/providers/theme/theme-provider.d.ts.map +1 -1
  138. package/dist/types/providers/theme/theme-provider.types.d.ts +8 -0
  139. package/dist/types/providers/theme/theme-provider.types.d.ts.map +1 -1
  140. package/dist/types/providers/theme/theme.utils.d.ts +5 -0
  141. package/dist/types/providers/theme/theme.utils.d.ts.map +1 -0
  142. package/dist/types/providers/theme/useThemeManager.d.ts +12 -0
  143. package/dist/types/providers/theme/useThemeManager.d.ts.map +1 -0
  144. package/dist/types/providers/toast/index.d.ts +2 -0
  145. package/dist/types/providers/toast/index.d.ts.map +1 -0
  146. package/dist/types/providers/toast/toast-provider.d.ts +7 -0
  147. package/dist/types/providers/toast/toast-provider.d.ts.map +1 -0
  148. package/dist/types/styles/colors.default.d.ts +385 -74
  149. package/dist/types/styles/colors.default.d.ts.map +1 -1
  150. package/dist/types/types/calendar.types.d.ts +12 -0
  151. package/dist/types/types/calendar.types.d.ts.map +1 -0
  152. package/package.json +3 -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,340 +1414,777 @@ 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") })] })] }));
936
- };
937
- ConfigMenu.displayName = "ConfigMenu";
938
-
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 })) }));
942
- };
943
- NotificationButton.displayName = "NotificationButton";
944
-
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 })] })] }));
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));
948
1441
  };
949
- HeaderComponent.displayName = "Header";
950
1442
 
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 })));
1443
+ var H2 = function (_a) {
1444
+ var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
1445
+ return (jsxRuntime.jsx("h2", __assign({ className: react.cn("text-lg font-medium", className) }, props, { children: children })));
965
1446
  };
966
1447
 
967
- var paddingClasses = {
968
- sm: "p-4",
969
- md: "p-6",
970
- lg: "p-8",
1448
+ var H3 = function (_a) {
1449
+ var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
1450
+ return (jsxRuntime.jsx("h3", __assign({ className: react.cn("text-base font-medium mb-1", className) }, props, { children: children })));
971
1451
  };
972
1452
 
973
- /**
974
- * Card genérica siguiendo las reglas de diseño BeweOS basada en HeroUI.
975
- *
976
- * Reglas aplicadas:
977
- * - Shadow: none, sm, md, lg (configurable)
978
- * - Radius: sm (por defecto, configurable)
979
- * - Padding configurable (sm, md, lg)
980
- * - Hereda de HeroUI Card con personalización BeweOS
981
- */
982
- var Card = function (_a) {
983
- 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"]);
984
- var paddingClass = paddingClasses[padding];
985
- var combinedClassName = [paddingClass, className].filter(Boolean).join(" ");
986
- return (jsxRuntime.jsx(react.Card, __assign({ shadow: shadow, radius: radius, className: combinedClassName }, props, { children: children })));
1453
+ var H4 = function (_a) {
1454
+ var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
1455
+ return (jsxRuntime.jsx("h4", __assign({ className: react.cn("text-sm font-medium mb-1", className) }, props, { children: children })));
987
1456
  };
988
1457
 
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
- } })));
1458
+ var P = function (_a) {
1459
+ var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
1460
+ return (jsxRuntime.jsx("p", __assign({ className: react.cn("text-sm text-default-500", className) }, props, { children: children })));
1006
1461
  };
1007
1462
 
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
- } })) }));
1463
+ var ThemeContext = React.createContext({
1464
+ mode: "light",
1465
+ color: "blue",
1466
+ // biome-ignore lint/suspicious/noEmptyBlockStatements: <explanation>
1467
+ setMode: function () { },
1468
+ // biome-ignore lint/suspicious/noEmptyBlockStatements: <explanation>
1469
+ setColor: function () { },
1470
+ });
1471
+ var useThemeContext = function () {
1472
+ var context = React.useContext(ThemeContext);
1473
+ if (!context) {
1474
+ throw new Error("useThemeContext debe ser usado dentro de un ThemeProvider");
1475
+ }
1476
+ return context;
1026
1477
  };
1027
1478
 
1028
1479
  var themeColors = {
1480
+ "blue-light": {
1481
+ extend: "light",
1482
+ colors: {
1483
+ primary: {
1484
+ "50": "#dfedfd",
1485
+ "100": "#b3d4fa",
1486
+ "200": "#86bbf7",
1487
+ "300": "#59a1f4",
1488
+ "400": "#2d88f1",
1489
+ "500": "#006fee",
1490
+ "600": "#005cc4",
1491
+ "700": "#00489b",
1492
+ "800": "#003571",
1493
+ "900": "#002147",
1494
+ foreground: "#fff",
1495
+ DEFAULT: "#006fee",
1496
+ },
1497
+ secondary: {
1498
+ "50": "#eee4f8",
1499
+ "100": "#d7bfef",
1500
+ "200": "#bf99e5",
1501
+ "300": "#a773db",
1502
+ "400": "#904ed2",
1503
+ "500": "#7828c8",
1504
+ "600": "#6321a5",
1505
+ "700": "#4e1a82",
1506
+ "800": "#39135f",
1507
+ "900": "#240c3c",
1508
+ foreground: "#fff",
1509
+ DEFAULT: "#7828c8",
1510
+ },
1511
+ success: {
1512
+ "50": "#e2f8ec",
1513
+ "100": "#b9efd1",
1514
+ "200": "#91e5b5",
1515
+ "300": "#68dc9a",
1516
+ "400": "#40d27f",
1517
+ "500": "#17c964",
1518
+ "600": "#13a653",
1519
+ "700": "#0f8341",
1520
+ "800": "#0b5f30",
1521
+ "900": "#073c1e",
1522
+ foreground: "#000",
1523
+ DEFAULT: "#17c964",
1524
+ },
1525
+ warning: {
1526
+ "50": "#fef4e4",
1527
+ "100": "#fce4bd",
1528
+ "200": "#fad497",
1529
+ "300": "#f9c571",
1530
+ "400": "#f7b54a",
1531
+ "500": "#f5a524",
1532
+ "600": "#ca881e",
1533
+ "700": "#9f6b17",
1534
+ "800": "#744e11",
1535
+ "900": "#4a320b",
1536
+ foreground: "#000",
1537
+ DEFAULT: "#f5a524",
1538
+ },
1539
+ danger: {
1540
+ "50": "#fee1eb",
1541
+ "100": "#fbb8cf",
1542
+ "200": "#f98eb3",
1543
+ "300": "#f76598",
1544
+ "400": "#f53b7c",
1545
+ "500": "#f31260",
1546
+ "600": "#c80f4f",
1547
+ "700": "#9e0c3e",
1548
+ "800": "#73092e",
1549
+ "900": "#49051d",
1550
+ foreground: "#000",
1551
+ DEFAULT: "#f31260",
1552
+ },
1553
+ focus: "#006FEE",
1554
+ overlay: "#000000",
1555
+ },
1556
+ },
1557
+ "blue-dark": {
1558
+ extend: "dark",
1559
+ colors: {
1560
+ primary: {
1561
+ "50": "#002147",
1562
+ "100": "#003571",
1563
+ "200": "#00489b",
1564
+ "300": "#005cc4",
1565
+ "400": "#006fee",
1566
+ "500": "#2d88f1",
1567
+ "600": "#59a1f4",
1568
+ "700": "#86bbf7",
1569
+ "800": "#b3d4fa",
1570
+ "900": "#dfedfd",
1571
+ foreground: "#fff",
1572
+ DEFAULT: "#006fee",
1573
+ },
1574
+ secondary: {
1575
+ "50": "#240c3c",
1576
+ "100": "#39135f",
1577
+ "200": "#4e1a82",
1578
+ "300": "#6321a5",
1579
+ "400": "#7828c8",
1580
+ "500": "#904ed2",
1581
+ "600": "#a773db",
1582
+ "700": "#bf99e5",
1583
+ "800": "#d7bfef",
1584
+ "900": "#eee4f8",
1585
+ foreground: "#fff",
1586
+ DEFAULT: "#7828c8",
1587
+ },
1588
+ success: {
1589
+ "50": "#073c1e",
1590
+ "100": "#0b5f30",
1591
+ "200": "#0f8341",
1592
+ "300": "#13a653",
1593
+ "400": "#17c964",
1594
+ "500": "#40d27f",
1595
+ "600": "#68dc9a",
1596
+ "700": "#91e5b5",
1597
+ "800": "#b9efd1",
1598
+ "900": "#e2f8ec",
1599
+ foreground: "#000",
1600
+ DEFAULT: "#17c964",
1601
+ },
1602
+ warning: {
1603
+ "50": "#4a320b",
1604
+ "100": "#744e11",
1605
+ "200": "#9f6b17",
1606
+ "300": "#ca881e",
1607
+ "400": "#f5a524",
1608
+ "500": "#f7b54a",
1609
+ "600": "#f9c571",
1610
+ "700": "#fad497",
1611
+ "800": "#fce4bd",
1612
+ "900": "#fef4e4",
1613
+ foreground: "#000",
1614
+ DEFAULT: "#f5a524",
1615
+ },
1616
+ danger: {
1617
+ "50": "#49051d",
1618
+ "100": "#73092e",
1619
+ "200": "#9e0c3e",
1620
+ "300": "#c80f4f",
1621
+ "400": "#f31260",
1622
+ "500": "#f53b7c",
1623
+ "600": "#f76598",
1624
+ "700": "#f98eb3",
1625
+ "800": "#fbb8cf",
1626
+ "900": "#fee1eb",
1627
+ foreground: "#000",
1628
+ DEFAULT: "#f31260",
1629
+ },
1630
+ focus: "#006FEE",
1631
+ overlay: "#ffffff",
1632
+ },
1633
+ },
1029
1634
  "purple-light": {
1030
1635
  extend: "light",
1031
1636
  colors: {
1032
- background: "#ffffff",
1033
- foreground: "#111827",
1034
1637
  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",
1638
+ "50": "#eee4f8",
1639
+ "100": "#d7bfef",
1640
+ "200": "#bf99e5",
1641
+ "300": "#a773db",
1642
+ "400": "#904ed2",
1643
+ "500": "#7828c8",
1644
+ "600": "#6321a5",
1645
+ "700": "#4e1a82",
1646
+ "800": "#39135f",
1647
+ "900": "#240c3c",
1648
+ foreground: "#fff",
1045
1649
  DEFAULT: "#7828c8",
1046
- foreground: "#ffffff",
1047
1650
  },
1048
- focus: "#904ed2",
1651
+ secondary: {
1652
+ "50": "#dfedfd",
1653
+ "100": "#b3d4fa",
1654
+ "200": "#86bbf7",
1655
+ "300": "#59a1f4",
1656
+ "400": "#2d88f1",
1657
+ "500": "#006fee",
1658
+ "600": "#005cc4",
1659
+ "700": "#00489b",
1660
+ "800": "#003571",
1661
+ "900": "#002147",
1662
+ foreground: "#fff",
1663
+ DEFAULT: "#006fee",
1664
+ },
1665
+ focus: "#7828c8",
1666
+ overlay: "#000000",
1049
1667
  },
1050
1668
  },
1051
1669
  "purple-dark": {
1052
1670
  extend: "dark",
1053
1671
  colors: {
1054
- background: "#1A1023",
1055
- foreground: "#ffffff",
1056
1672
  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",
1673
+ "50": "#2c193f",
1674
+ "100": "#462764",
1675
+ "200": "#603689",
1676
+ "300": "#7944ae",
1677
+ "400": "#9353d3",
1678
+ "500": "#a671db",
1679
+ "600": "#b98fe2",
1680
+ "700": "#ccadea",
1681
+ "800": "#dfcbf2",
1682
+ "900": "#f2eafa",
1683
+ foreground: "#fff",
1067
1684
  DEFAULT: "#9353d3",
1068
- foreground: "#ffffff",
1069
1685
  },
1070
- focus: "#a671db",
1686
+ secondary: {
1687
+ "50": "#1e254d",
1688
+ "100": "#2f3a79",
1689
+ "200": "#404fa6",
1690
+ "300": "#5265d2",
1691
+ "400": "#637aff",
1692
+ "500": "#7e91ff",
1693
+ "600": "#9aa9ff",
1694
+ "700": "#b5c0ff",
1695
+ "800": "#d0d7ff",
1696
+ "900": "#eceeff",
1697
+ foreground: "#000",
1698
+ DEFAULT: "#637aff",
1699
+ },
1700
+ focus: "#9353d3",
1071
1701
  },
1072
1702
  },
1073
- "green-light": {
1703
+ "yellow-light": {
1074
1704
  extend: "light",
1075
1705
  colors: {
1076
- background: "#ffffff",
1077
- foreground: "#111827",
1078
1706
  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",
1707
+ "50": "#fffbe6",
1708
+ "100": "#FFFACD",
1709
+ "200": "#FFF39B",
1710
+ "300": "#FFEB69",
1711
+ "400": "#FFE243",
1712
+ "500": "#FFD505",
1713
+ "600": "#DBB303",
1714
+ "700": "#B79202",
1715
+ "800": "#937301",
1716
+ "900": "#7A5D00",
1717
+ foreground: "#000",
1718
+ DEFAULT: "#FFD505",
1719
+ },
1720
+ secondary: {
1721
+ "50": "#F3F7FD",
1722
+ "100": "#D1DFFB",
1723
+ "200": "#A5BEF7",
1724
+ "300": "#7494E7",
1725
+ "400": "#4E6FCF",
1726
+ "500": "#1E40AF",
1727
+ "600": "#153096",
1728
+ "700": "#0F237D",
1729
+ "800": "#091865",
1730
+ "900": "#051053",
1731
+ foreground: "#fff",
1732
+ DEFAULT: "#1E40AF",
1091
1733
  },
1092
- focus: "#81d59e",
1734
+ focus: "#FFD505",
1735
+ overlay: "#000000",
1093
1736
  },
1094
1737
  },
1095
- "green-dark": {
1738
+ "yellow-dark": {
1096
1739
  extend: "dark",
1097
1740
  colors: {
1098
- background: "#0F1D15",
1099
- foreground: "#ffffff",
1100
1741
  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",
1742
+ "50": "#7A5D00",
1743
+ "100": "#937301",
1744
+ "200": "#B79202",
1745
+ "300": "#DBB303",
1746
+ "400": "#FFD505",
1747
+ "500": "#FFE243",
1748
+ "600": "#FFEB69",
1749
+ "700": "#FFF39B",
1750
+ "800": "#FFFACD",
1751
+ "900": "#fffbe6",
1752
+ foreground: "#000",
1753
+ DEFAULT: "#FFD505",
1754
+ },
1755
+ secondary: {
1756
+ 50: "#e1efff",
1757
+ 100: "#b2d0ff",
1758
+ 200: "#83b1fc",
1759
+ 300: "#5292f8",
1760
+ 400: "#2473f5",
1761
+ 500: "#0a5adb",
1762
+ 600: "#0246ac",
1763
+ 700: "#00327c",
1764
+ 800: "#001e4d",
1765
+ 900: "#000a1f",
1766
+ foreground: "#fff",
1767
+ DEFAULT: "#0a5adb",
1113
1768
  },
1114
- focus: "#81d59e",
1769
+ focus: "#FFD505",
1770
+ overlay: "#ffffff",
1115
1771
  },
1116
1772
  },
1117
- "blue-light": {
1773
+ "coral-light": {
1118
1774
  extend: "light",
1119
1775
  colors: {
1120
- background: "#ffffff",
1121
- foreground: "#111827",
1122
1776
  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",
1777
+ "50": "#ffe9e9",
1778
+ "100": "#ffcaca",
1779
+ "200": "#ffabab",
1780
+ "300": "#ff8d8d",
1781
+ "400": "#ff6e6e",
1782
+ "500": "#ff4f4f",
1783
+ "600": "#d24141",
1784
+ "700": "#a63333",
1785
+ "800": "#792626",
1786
+ "900": "#4d1818",
1787
+ foreground: "#000",
1788
+ DEFAULT: "#ff4f4f",
1135
1789
  },
1136
- focus: "#60a5fa",
1790
+ focus: "#ff4f4f",
1137
1791
  },
1138
1792
  },
1139
- "blue-dark": {
1793
+ "coral-dark": {
1140
1794
  extend: "dark",
1141
1795
  colors: {
1142
- background: "#101d3a",
1143
- foreground: "#ffffff",
1144
1796
  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",
1797
+ "50": "#4d1818",
1798
+ "100": "#792626",
1799
+ "200": "#a63333",
1800
+ "300": "#d24141",
1801
+ "400": "#ff4f4f",
1802
+ "500": "#ff6e6e",
1803
+ "600": "#ff8d8d",
1804
+ "700": "#ffabab",
1805
+ "800": "#ffcaca",
1806
+ "900": "#ffe9e9",
1807
+ foreground: "#000",
1808
+ DEFAULT: "#ff4f4f",
1157
1809
  },
1158
- focus: "#60a5fa",
1810
+ focus: "#ff4f4f",
1159
1811
  },
1160
1812
  },
1161
- "yellow-light": {
1813
+ "green-light": {
1162
1814
  extend: "light",
1163
1815
  colors: {
1164
- background: "#ffffff",
1165
- foreground: "#111827",
1166
1816
  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",
1817
+ 50: "#EFFFEF",
1818
+ 100: "#CFFCD1",
1819
+ 200: "#A0F9AC",
1820
+ 300: "#6FEE8D",
1821
+ 400: "#49DE7B",
1822
+ 500: "#16C964",
1823
+ 600: "#10AC64",
1824
+ 700: "#0B905F",
1825
+ 800: "#077457",
1826
+ 900: "#046051",
1827
+ foreground: "#000",
1828
+ DEFAULT: "#16C964",
1829
+ },
1830
+ secondary: {
1831
+ "50": "#e3eaff",
1832
+ "100": "#D7DFFE",
1833
+ "200": "#AFBFFE",
1834
+ "300": "#889DFD",
1835
+ "400": "#6A82FB",
1836
+ "500": "#3956F9",
1837
+ "600": "#2941D6",
1838
+ "700": "#1C2EB3",
1839
+ "800": "#121F90",
1840
+ "900": "#0A1477",
1841
+ foreground: "#fff",
1842
+ DEFAULT: "#3956F9",
1843
+ },
1844
+ success: {
1845
+ "50": "#e7fde3",
1846
+ "100": "#E8FCD3",
1847
+ "200": "#CBFAA8",
1848
+ "300": "#A4F17B",
1849
+ "400": "#7EE358",
1850
+ "500": "#49D127",
1851
+ "600": "#2FB31C",
1852
+ "700": "#1A9613",
1853
+ "800": "#0C790E",
1854
+ "900": "#076410",
1855
+ foreground: "#000",
1856
+ DEFAULT: "#49D127",
1179
1857
  },
1180
- focus: "#facc15",
1858
+ warning: {
1859
+ "50": "#fff9da",
1860
+ "100": "#FFF7CC",
1861
+ "200": "#FFEE99",
1862
+ "300": "#FFE266",
1863
+ "400": "#FFD63F",
1864
+ "500": "#FFC300",
1865
+ "600": "#DBA200",
1866
+ "700": "#B78300",
1867
+ "800": "#936600",
1868
+ "900": "#7A5100",
1869
+ foreground: "#000",
1870
+ DEFAULT: "#FFC300",
1871
+ },
1872
+ danger: {
1873
+ "50": "#ffe2e5",
1874
+ "100": "#FFE3D8",
1875
+ "200": "#FFC1B2",
1876
+ "300": "#FF988B",
1877
+ "400": "#FF726F",
1878
+ "500": "#FF3F4C",
1879
+ "600": "#DB2E49",
1880
+ "700": "#B71F45",
1881
+ "800": "#93143F",
1882
+ "900": "#7A0C3B",
1883
+ foreground: "#000",
1884
+ DEFAULT: "#FF3F4C",
1885
+ },
1886
+ focus: "#66cc8a",
1887
+ overlay: "#000000",
1181
1888
  },
1182
1889
  },
1183
- "yellow-dark": {
1890
+ "green-dark": {
1184
1891
  extend: "dark",
1185
1892
  colors: {
1186
- background: "#18181b",
1187
- foreground: "#ffffff",
1188
1893
  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",
1894
+ 50: "#EFFFEF",
1895
+ 100: "#CFFCD1",
1896
+ 200: "#A0F9AC",
1897
+ 300: "#6FEE8D",
1898
+ 400: "#49DE7B",
1899
+ 500: "#16C964",
1900
+ 600: "#10AC64",
1901
+ 700: "#0B905F",
1902
+ 800: "#077457",
1903
+ 900: "#046051",
1904
+ foreground: "#000",
1905
+ DEFAULT: "#16C964",
1906
+ },
1907
+ secondary: {
1908
+ "50": "#e3eaff",
1909
+ "100": "#D7DFFE",
1910
+ "200": "#AFBFFE",
1911
+ "300": "#889DFD",
1912
+ "400": "#6A82FB",
1913
+ "500": "#3956F9",
1914
+ "600": "#2941D6",
1915
+ "700": "#1C2EB3",
1916
+ "800": "#121F90",
1917
+ "900": "#0A1477",
1918
+ foreground: "#fff",
1919
+ DEFAULT: "#3956F9",
1920
+ },
1921
+ success: {
1922
+ "50": "#e7fde3",
1923
+ "100": "#E8FCD3",
1924
+ "200": "#CBFAA8",
1925
+ "300": "#A4F17B",
1926
+ "400": "#7EE358",
1927
+ "500": "#49D127",
1928
+ "600": "#2FB31C",
1929
+ "700": "#1A9613",
1930
+ "800": "#0C790E",
1931
+ "900": "#076410",
1932
+ foreground: "#000",
1933
+ DEFAULT: "#49D127",
1201
1934
  },
1202
- focus: "#eab308",
1935
+ warning: {
1936
+ "50": "#fff9da",
1937
+ "100": "#FFF7CC",
1938
+ "200": "#FFEE99",
1939
+ "300": "#FFE266",
1940
+ "400": "#FFD63F",
1941
+ "500": "#FFC300",
1942
+ "600": "#DBA200",
1943
+ "700": "#B78300",
1944
+ "800": "#936600",
1945
+ "900": "#7A5100",
1946
+ foreground: "#000",
1947
+ DEFAULT: "#FFC300",
1948
+ },
1949
+ danger: {
1950
+ "50": "#ffe2e5",
1951
+ "100": "#FFE3D8",
1952
+ "200": "#FFC1B2",
1953
+ "300": "#FF988B",
1954
+ "400": "#FF726F",
1955
+ "500": "#FF3F4C",
1956
+ "600": "#DB2E49",
1957
+ "700": "#B71F45",
1958
+ "800": "#93143F",
1959
+ "900": "#7A0C3B",
1960
+ foreground: "#fff",
1961
+ DEFAULT: "#FF3F4C",
1962
+ },
1963
+ focus: "#66cc8a",
1964
+ overlay: "#ffffff",
1203
1965
  },
1204
1966
  },
1205
1967
  };
1206
1968
 
1207
- var ThemeContext = React.createContext({
1208
- theme: "light",
1209
- // biome-ignore lint/suspicious/noEmptyBlockStatements: <explanation>
1210
- setTheme: function () { },
1211
- });
1212
- var useThemeContext = function () {
1213
- var context = React.useContext(ThemeContext);
1214
- if (!context) {
1215
- throw new Error("useThemeContext debe ser usado dentro de un ThemeProvider");
1216
- }
1217
- return context;
1969
+ var ColorSelector = function (_a) {
1970
+ var selectedColor = _a.selectedColor, onColorChange = _a.onColorChange;
1971
+ var mode = useThemeContext().mode;
1972
+ /**
1973
+ * Filters and maps the available theme colors to the current theme mode (light/dark).
1974
+ * Each color option contains:
1975
+ * - value: the theme name (e.g., "blue-light")
1976
+ * - label: the base color name (e.g., "blue")
1977
+ * - color: the primary color hex value
1978
+ */
1979
+ var colorOptions = Object.entries(themeColors)
1980
+ .filter(function (_a) {
1981
+ var themeData = _a[1];
1982
+ var themeMode = themeData.extend;
1983
+ return mode === "light" ? themeMode === "light" : themeMode === "dark";
1984
+ })
1985
+ .map(function (_a) {
1986
+ var themeName = _a[0], theme = _a[1];
1987
+ return ({
1988
+ value: themeName,
1989
+ label: themeName.split("-")[0],
1990
+ color: theme.colors.primary.DEFAULT,
1991
+ });
1992
+ });
1993
+ return (jsxRuntime.jsx(react.RadioGroup, { value: selectedColor, onValueChange: onColorChange, orientation: "horizontal", className: "flex flex-wrap !gap-2", classNames: {
1994
+ base: "flex flex-wrap !gap-2",
1995
+ wrapper: "flex flex-wrap !gap-2",
1996
+ }, children: colorOptions.map(function (color) { return (jsxRuntime.jsx(react.Radio, { value: color.label, className: "p-0 m-0", classNames: {
1997
+ base: "p-0 m-0",
1998
+ wrapper: "hidden",
1999
+ labelWrapper: "p-0 m-0",
2000
+ }, children: jsxRuntime.jsx("div", { className: "w-8 h-8 rounded-full border-2 cursor-pointer transition-all ".concat(selectedColor === color.label
2001
+ ? "border-black border-opacity-20 scale-110"
2002
+ : "border-gray-200 hover:scale-105"), style: { backgroundColor: color.color }, title: color.label }) }, color.value)); }) }));
2003
+ };
2004
+
2005
+ var Modal = function (props) {
2006
+ return (jsxRuntime.jsx(react.Modal, __assign({ shouldBlockScroll: true, radius: "lg", className: "py-9 px-6" }, props)));
1218
2007
  };
1219
2008
 
2009
+ var ModalContent = react.ModalContent;
2010
+
2011
+ var ModalHeader = react.ModalHeader;
2012
+
2013
+ var ModalBody = react.ModalBody;
2014
+
2015
+ var ModalFooter = react.ModalFooter;
2016
+
2017
+ var paddingClasses = {
2018
+ sm: "p-4",
2019
+ md: "p-6",
2020
+ lg: "p-8",
2021
+ };
2022
+
2023
+ /**
2024
+ * Card genérica siguiendo las reglas de diseño BeweOS basada en HeroUI.
2025
+ *
2026
+ * Reglas aplicadas:
2027
+ * - Shadow: none, sm, md, lg (configurable)
2028
+ * - Radius: sm (por defecto, configurable)
2029
+ * - Padding configurable (sm, md, lg)
2030
+ * - Hereda de HeroUI Card con personalización BeweOS
2031
+ */
2032
+ var Card = function (_a) {
2033
+ 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"]);
2034
+ var paddingClass = paddingClasses[padding];
2035
+ var combinedClassName = [paddingClass, className].filter(Boolean).join(" ");
2036
+ return (jsxRuntime.jsx(react.Card, __assign({ shadow: shadow, radius: radius, className: combinedClassName }, props, { children: children })));
2037
+ };
2038
+
2039
+ /**
2040
+ * @file This file contains the theme configurations for the application.
2041
+ */
2042
+ var ALL_THEMES = __spreadArray(["light", "dark"], Object.keys(themeColors), true);
2043
+
2044
+ /**
2045
+ * Custom hook to manage the theme state and side effects.
2046
+ * @returns An object with the current mode, color, and functions to set them.
2047
+ */
2048
+ var useThemeManager = function () {
2049
+ var _a = useTheme.useTheme(), rawTheme = _a.theme, setRawTheme = _a.setTheme;
2050
+ var setTheme = React.useCallback(function (theme) {
2051
+ var _a;
2052
+ var html = document.documentElement;
2053
+ (_a = html.classList).remove.apply(_a, ALL_THEMES);
2054
+ setRawTheme(theme);
2055
+ }, [setRawTheme]);
2056
+ React.useEffect(function () {
2057
+ var _a;
2058
+ var html = document.documentElement;
2059
+ (_a = html.classList).remove.apply(_a, ALL_THEMES);
2060
+ html.classList.add(rawTheme);
2061
+ }, [rawTheme]);
2062
+ var _b = React.useMemo(function () {
2063
+ var parts = rawTheme.split("-");
2064
+ var parsedColor = "blue";
2065
+ var parsedMode = "light";
2066
+ if (parts.length === 2) {
2067
+ var colorPart = parts[0], modePart = parts[1];
2068
+ parsedColor = colorPart;
2069
+ parsedMode = modePart;
2070
+ }
2071
+ else if (rawTheme === "light" || rawTheme === "dark") {
2072
+ parsedMode = rawTheme;
2073
+ }
2074
+ return { mode: parsedMode, color: parsedColor };
2075
+ }, [rawTheme]), mode = _b.mode, color = _b.color;
2076
+ var setMode = React.useCallback(function (newMode) {
2077
+ var newTheme = color === "blue" ? newMode : "".concat(color, "-").concat(newMode);
2078
+ setTheme(newTheme);
2079
+ }, [color, setTheme]);
2080
+ var setColor = React.useCallback(function (newColor) {
2081
+ var newTheme = newColor === "blue" ? mode : "".concat(newColor, "-").concat(mode);
2082
+ setTheme(newTheme);
2083
+ }, [mode, setTheme]);
2084
+ return {
2085
+ mode: mode,
2086
+ color: color,
2087
+ setMode: setMode,
2088
+ setColor: setColor,
2089
+ };
2090
+ };
2091
+
2092
+ /**
2093
+ * The ThemeProvider component is a wrapper that provides theme context to its children.
2094
+ * It uses the useThemeManager hook to manage the theme state and provides the current
2095
+ * theme mode and color, along with functions to update them, to its children.
2096
+ *
2097
+ * @param {IThemeProvider} { children }
2098
+ * @returns {JSX.Element}
2099
+ */
1220
2100
  var ThemeProvider = function (_a) {
1221
2101
  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 }) }));
2102
+ var _b = useThemeManager(), mode = _b.mode, color = _b.color, setMode = _b.setMode, setColor = _b.setColor;
2103
+ return (jsxRuntime.jsx(ThemeContext.Provider, { value: {
2104
+ mode: mode,
2105
+ color: color,
2106
+ setMode: setMode,
2107
+ setColor: setColor,
2108
+ }, children: children }));
2109
+ };
2110
+
2111
+ var AuraToastProvider = function (_a) {
2112
+ var children = _a.children;
2113
+ var _b = React.useState({
2114
+ isVisible: false,
2115
+ title: "",
2116
+ description: "",
2117
+ color: "primary",
2118
+ duration: 3000,
2119
+ }), toast = _b[0], setToast = _b[1];
2120
+ var timerRef = React.useRef(null);
2121
+ var hideToast = React.useCallback(function () {
2122
+ if (timerRef.current) {
2123
+ clearTimeout(timerRef.current);
2124
+ timerRef.current = null;
2125
+ }
2126
+ setToast(function (currentToast) { return (__assign(__assign({}, currentToast), { isVisible: false })); });
2127
+ }, []);
2128
+ var showToast = React.useCallback(function (options) {
2129
+ if (timerRef.current) {
2130
+ clearTimeout(timerRef.current);
2131
+ }
2132
+ setToast(__assign({ isVisible: true }, options));
2133
+ var duration = options.duration === undefined ? 3000 : options.duration;
2134
+ if (duration > 0) {
2135
+ timerRef.current = setTimeout(function () {
2136
+ hideToast();
2137
+ }, duration);
2138
+ }
2139
+ }, [hideToast]);
2140
+ React.useEffect(function () {
2141
+ return function () {
2142
+ if (timerRef.current) {
2143
+ clearTimeout(timerRef.current);
2144
+ }
2145
+ };
2146
+ }, []);
2147
+ return (jsxRuntime.jsx(ToastContext.Provider, { value: { toast: toast, showToast: showToast, hideToast: hideToast }, children: children }));
1224
2148
  };
1225
2149
 
2150
+ exports.AddHolidayForm = AddHolidayForm;
2151
+ exports.AuraTable = AuraTable;
2152
+ exports.AuraToastProvider = AuraToastProvider;
1226
2153
  exports.AutoComplete = AutoComplete;
1227
2154
  exports.Button = Button;
1228
2155
  exports.Card = Card;
2156
+ exports.ColorSelector = ColorSelector;
2157
+ exports.DatePicker = DatePicker;
2158
+ exports.DateRangePicker = DateRangePicker;
2159
+ exports.GlobalToast = GlobalToast;
2160
+ exports.H2 = H2;
2161
+ exports.H3 = H3;
2162
+ exports.H4 = H4;
1229
2163
  exports.HeaderComponent = HeaderComponent;
1230
2164
  exports.IconComponent = IconComponent;
1231
2165
  exports.Input = Input;
1232
2166
  exports.MenuComponent = MenuComponent;
2167
+ exports.Modal = Modal;
2168
+ exports.ModalBody = ModalBody;
2169
+ exports.ModalContent = ModalContent;
2170
+ exports.ModalFooter = ModalFooter;
2171
+ exports.ModalHeader = ModalHeader;
2172
+ exports.P = P;
2173
+ exports.Pagination = Pagination;
1233
2174
  exports.Phone = Phone;
2175
+ exports.ScheduleRow = ScheduleRow;
1234
2176
  exports.Select = Select;
2177
+ exports.SwitchComponent = Switch;
2178
+ exports.Textarea = Textarea;
1235
2179
  exports.ThemeContext = ThemeContext;
1236
2180
  exports.ThemePicker = ThemePicker;
1237
2181
  exports.ThemeProvider = ThemeProvider;
2182
+ exports.TimeInputComponent = TimeInput;
2183
+ exports.ToastContext = ToastContext;
1238
2184
  exports.UploadFile = UploadFile;
1239
2185
  exports.sizeMap = sizeMap;
1240
2186
  exports.themeColors = themeColors;
2187
+ exports.useAuraToast = useAuraToast;
1241
2188
  exports.useThemeContext = useThemeContext;
1242
2189
  Object.keys(react).forEach(function (k) {
1243
2190
  if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {