@beweco/aurora-ui 0.0.10 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/css/styles.css +1 -1
- package/dist/index.cjs.js +175 -14
- package/dist/index.esm.js +170 -20
- package/dist/types/components/autocomplete/AutoComplete.d.ts +13 -0
- package/dist/types/components/autocomplete/AutoComplete.d.ts.map +1 -0
- package/dist/types/components/autocomplete/AutoComplete.types.d.ts +8 -0
- package/dist/types/components/autocomplete/AutoComplete.types.d.ts.map +1 -0
- package/dist/types/components/autocomplete/index.d.ts +3 -0
- package/dist/types/components/autocomplete/index.d.ts.map +1 -0
- package/dist/types/components/button/Button.d.ts +12 -5
- package/dist/types/components/button/Button.d.ts.map +1 -1
- package/dist/types/components/button/Button.types.d.ts +10 -20
- package/dist/types/components/button/Button.types.d.ts.map +1 -1
- package/dist/types/components/button/index.d.ts +2 -2
- package/dist/types/components/button/index.d.ts.map +1 -1
- package/dist/types/components/card/Card.d.ts +13 -0
- package/dist/types/components/card/Card.d.ts.map +1 -0
- package/dist/types/components/card/Card.types.d.ts +15 -0
- package/dist/types/components/card/Card.types.d.ts.map +1 -0
- package/dist/types/components/card/index.d.ts +3 -0
- package/dist/types/components/card/index.d.ts.map +1 -0
- package/dist/types/components/header/Header.d.ts +5 -0
- package/dist/types/components/header/Header.d.ts.map +1 -0
- package/dist/types/components/header/Header.types.d.ts +27 -0
- package/dist/types/components/header/Header.types.d.ts.map +1 -0
- package/dist/types/components/header/_internal/config-menu/ConfigMenu.d.ts +4 -0
- package/dist/types/components/header/_internal/config-menu/ConfigMenu.d.ts.map +1 -0
- package/dist/types/components/header/_internal/config-menu/ConfigMenu.types.d.ts +9 -0
- package/dist/types/components/header/_internal/config-menu/ConfigMenu.types.d.ts.map +1 -0
- package/dist/types/components/header/_internal/notification-button/NotificationButton.d.ts +7 -0
- package/dist/types/components/header/_internal/notification-button/NotificationButton.d.ts.map +1 -0
- package/dist/types/components/header/index.d.ts +3 -0
- package/dist/types/components/header/index.d.ts.map +1 -0
- package/dist/types/components/input/Input.d.ts +14 -0
- package/dist/types/components/input/Input.d.ts.map +1 -0
- package/dist/types/components/input/Input.types.d.ts +8 -0
- package/dist/types/components/input/Input.types.d.ts.map +1 -0
- package/dist/types/components/input/index.d.ts +3 -0
- package/dist/types/components/input/index.d.ts.map +1 -0
- package/dist/types/components/{Menu → menu}/Menu.d.ts.map +1 -1
- package/dist/types/components/{Menu → menu}/Menu.types.d.ts +1 -1
- package/dist/types/components/{Menu → menu}/Menu.types.d.ts.map +1 -1
- package/dist/types/components/{menu-nav-list → menu/_internal/menu-nav-list}/MenuNavList.d.ts +1 -2
- package/dist/types/components/menu/_internal/menu-nav-list/MenuNavList.d.ts.map +1 -0
- package/dist/types/components/menu/_internal/menu-nav-list/MenuNavList.styles.d.ts.map +1 -0
- package/dist/types/components/menu/_internal/menu-nav-list/MenuNavList.types.d.ts.map +1 -0
- package/dist/types/components/{menu-nav-list → menu/_internal/menu-nav-list}/index.d.ts +1 -0
- package/dist/types/components/menu/_internal/menu-nav-list/index.d.ts.map +1 -0
- package/dist/types/components/menu/sidebar-items.d.ts +3 -0
- package/dist/types/components/{Menu → menu}/sidebar-items.d.ts.map +1 -1
- package/dist/types/components/phone/Phone.d.ts +1 -20
- package/dist/types/components/phone/Phone.d.ts.map +1 -1
- package/dist/types/components/phone/Phone.types.d.ts +21 -0
- package/dist/types/components/phone/Phone.types.d.ts.map +1 -0
- package/dist/types/components/phone/index.d.ts +1 -0
- package/dist/types/components/phone/index.d.ts.map +1 -1
- package/dist/types/components/select/Select.d.ts +14 -0
- package/dist/types/components/select/Select.d.ts.map +1 -0
- package/dist/types/components/select/Select.types.d.ts +8 -0
- package/dist/types/components/select/Select.types.d.ts.map +1 -0
- package/dist/types/components/select/index.d.ts +3 -0
- package/dist/types/components/select/index.d.ts.map +1 -0
- package/dist/types/components/theme-picker/ThemePicker.d.ts +14 -0
- package/dist/types/components/theme-picker/ThemePicker.d.ts.map +1 -0
- package/dist/types/components/theme-picker/ThemePicker.types.d.ts +21 -0
- package/dist/types/components/theme-picker/ThemePicker.types.d.ts.map +1 -0
- package/dist/types/components/theme-picker/index.d.ts +3 -0
- package/dist/types/components/theme-picker/index.d.ts.map +1 -0
- package/dist/types/components/upload-file/UploadFile.d.ts.map +1 -0
- package/dist/types/components/upload-file/UploadFile.types.d.ts.map +1 -0
- package/dist/types/components/upload-file/index.d.ts.map +1 -0
- package/dist/types/index.d.ts +9 -2
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/assets/output-Ck0ffzyL.css +0 -73
- package/dist/types/components/Menu/sidebar-items.d.ts +0 -3
- package/dist/types/components/UploadFile/UploadFile.d.ts.map +0 -1
- package/dist/types/components/UploadFile/UploadFile.types.d.ts.map +0 -1
- package/dist/types/components/UploadFile/index.d.ts.map +0 -1
- package/dist/types/components/index.d.ts +0 -4
- package/dist/types/components/index.d.ts.map +0 -1
- package/dist/types/components/menu-nav-list/MenuNavList.d.ts.map +0 -1
- package/dist/types/components/menu-nav-list/MenuNavList.styles.d.ts.map +0 -1
- package/dist/types/components/menu-nav-list/MenuNavList.types.d.ts.map +0 -1
- package/dist/types/components/menu-nav-list/index.d.ts.map +0 -1
- package/dist/types/components/menuprueba/MenuPrueba.d.ts +0 -4
- package/dist/types/components/menuprueba/MenuPrueba.d.ts.map +0 -1
- package/dist/types/components/menuprueba/MenuPrueba.types.d.ts +0 -23
- package/dist/types/components/menuprueba/MenuPrueba.types.d.ts.map +0 -1
- package/dist/types/components/menuprueba/index.d.ts +0 -3
- package/dist/types/components/menuprueba/index.d.ts.map +0 -1
- /package/dist/types/components/{Menu → menu}/Menu.d.ts +0 -0
- /package/dist/types/components/{menu-nav-list → menu/_internal/menu-nav-list}/MenuNavList.styles.d.ts +0 -0
- /package/dist/types/components/{menu-nav-list → menu/_internal/menu-nav-list}/MenuNavList.types.d.ts +0 -0
- /package/dist/types/components/{Menu → menu}/index.d.ts +0 -0
- /package/dist/types/components/{Menu → menu}/index.d.ts.map +0 -0
- /package/dist/types/components/{UploadFile → upload-file}/UploadFile.d.ts +0 -0
- /package/dist/types/components/{UploadFile → upload-file}/UploadFile.types.d.ts +0 -0
- /package/dist/types/components/{UploadFile → upload-file}/index.d.ts +0 -0
package/dist/index.cjs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
4
3
|
var react = require('@heroui/react');
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var react$1 = require('@iconify/react');
|
|
7
7
|
var useTheme = require('@heroui/use-theme');
|
|
@@ -52,15 +52,22 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
52
52
|
};
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
|
-
*
|
|
56
|
-
*
|
|
55
|
+
* AutoComplete genérico reutilizable basado en HeroUI siguiendo las reglas de diseño BeweOS.
|
|
56
|
+
*
|
|
57
|
+
* Reglas aplicadas:
|
|
58
|
+
* - Variant: Bordered (por defecto)
|
|
59
|
+
* - Radius: md (por defecto)
|
|
60
|
+
* - labelPlacement: Outside
|
|
61
|
+
* - Size: sm, md, lg (configurable)
|
|
57
62
|
*/
|
|
58
|
-
var
|
|
59
|
-
var
|
|
60
|
-
React.
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
63
|
+
var AutoComplete = function (_a) {
|
|
64
|
+
var label = _a.label, id = _a.id, _b = _a.size, size = _b === void 0 ? "md" : _b, _c = _a.variant, variant = _c === void 0 ? "bordered" : _c, _d = _a.radius, radius = _d === void 0 ? "md" : _d, props = __rest(_a, ["label", "id", "size", "variant", "radius"]);
|
|
65
|
+
var generatedId = React.useId();
|
|
66
|
+
var autoId = id || generatedId;
|
|
67
|
+
return (jsxRuntime.jsxs("div", { children: [label && (jsxRuntime.jsx("label", { htmlFor: autoId, className: "block mb-2 text-tiny text-default-600", children: label })), jsxRuntime.jsx(react.Autocomplete, __assign({}, props, { id: autoId, label: undefined, labelPlacement: "outside", variant: variant, size: size, radius: radius, classNames: {
|
|
68
|
+
base: "[&_[data-slot=input-wrapper][data-focus=true]]:!border-primary-500",
|
|
69
|
+
popoverContent: "[&_li[data-hover=true]]:!bg-primary-50 [&_li[data-hover=true]]:!text-default-600 [&_li]:!text-default-500",
|
|
70
|
+
} }))] }));
|
|
64
71
|
};
|
|
65
72
|
|
|
66
73
|
var sizeMap = {
|
|
@@ -248,9 +255,9 @@ var MenuComponent = React.memo(function Menu(_a) {
|
|
|
248
255
|
}
|
|
249
256
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("button", { type: "button", "aria-label": "Close sidebar", className: "fixed inset-0 bg-black bg-opacity-40 z-40 xs:block sm:hidden", onClick: handleSidebarClose, style: { border: "none", padding: 0, margin: 0 } }), jsxRuntime.jsx("div", { className: "container__menu ".concat(isCollapsed
|
|
250
257
|
? "container__menu--collapsed"
|
|
251
|
-
: "container__menu--expanded"), children: jsxRuntime.jsxs("div", { className: "content__menu", children: [jsxRuntime.jsxs("div", { className: "content__menu--header", style: { flexDirection: isCollapsed ? "column-reverse" : "row" }, children: [jsxRuntime.jsxs("div", { className: "flex flex-row items-center justify-center ".concat(isCollapsed ? "gap-0" : "gap-2"), children: [jsxRuntime.jsx("div", { className: "flex h-8 w-8 items-center justify-center rounded-full bg-foreground", children: jsxRuntime.jsx("img", { src: commerceInfo.logo, alt: "Logo of ".concat(commerceInfo.name) }) }), jsxRuntime.jsx("span", { className: "collapsible-item text-small font-bold
|
|
258
|
+
: "container__menu--expanded"), children: jsxRuntime.jsxs("div", { className: "content__menu", children: [jsxRuntime.jsxs("div", { className: "content__menu--header", style: { flexDirection: isCollapsed ? "column-reverse" : "row" }, children: [jsxRuntime.jsxs("div", { className: "flex flex-row items-center justify-center ".concat(isCollapsed ? "gap-0" : "gap-2"), children: [jsxRuntime.jsx("div", { className: "flex h-8 w-8 items-center justify-center rounded-full bg-foreground", children: jsxRuntime.jsx("img", { src: commerceInfo.logo, alt: "Logo of ".concat(commerceInfo.name) }) }), jsxRuntime.jsx("span", { className: "collapsible-item text-small font-bold ", children: commerceInfo.name })] }), jsxRuntime.jsxs("div", { className: "flex items-center", children: [jsxRuntime.jsx(IconComponent, { icon: "material-symbols-light:close", size: "lg", className: "cursor-pointer block sm:hidden", onClick: handleSidebarClose }), jsxRuntime.jsx(IconComponent, { icon: isCollapsed
|
|
252
259
|
? "solar:alt-arrow-right-outline"
|
|
253
|
-
: "solar:alt-arrow-left-outline", size: "lg", className: "hidden sm:block cursor-pointer", onClick: handleCollapseToggle })] })] }), jsxRuntime.jsx(react.Spacer, { y: 6 }), jsxRuntime.jsxs("div", { className: "content__menu--user ".concat(isCollapsed ? "gap-0" : "gap-3"), children: [jsxRuntime.jsx(react.Avatar, { size: "md", src: userInfo.avatar, color: userInfo.avatar === "" ? "warning" : "default", name: userInfo.name }), jsxRuntime.jsxs("div", { className: "collapsible-item flex flex-col", children: [jsxRuntime.jsx("p", { className: "text-small font-medium text-default-900", children: userInfo.name }), jsxRuntime.jsx("p", { className: "text-tiny text-default-400", children: userInfo.role })] })] }), jsxRuntime.jsx("div", { className: "".concat(!isCollapsed ? "flex-1" : "h-full", " min-h-0 py-6"), children: jsxRuntime.jsx("div", { className: "h-full overflow-y-auto pr-6 -mr-6 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]", children: jsxRuntime.jsx(MenuNavList, { defaultSelectedKey: menuItems.selectedKey, items: menuItems.items, isCollapsed: isCollapsed }) }) }), upgradeCard && (jsxRuntime.jsxs("div", { className: "collapsible-item relative", children: [jsxRuntime.jsxs(react.Card, { className: "border-none overflow-visible shadow-none", shadow: "sm", children: [jsxRuntime.jsxs(react.CardBody, { className: "items-center py-5 text-center gap-1", children: [jsxRuntime.jsx("h3", { className: "text-medium font-medium text-default-900", children: upgradeCard.title }), jsxRuntime.jsx("p", { className: "text-small text-default-500 pb-3 whitespace-normal", children: upgradeCard.description })] }), jsxRuntime.jsx(react.CardFooter, { className: "absolute justify-center", style: { bottom: "-30px" }, children: jsxRuntime.jsx(react.Button, { className: "px-10 shadow-md", color: "primary", radius: "full", variant: "shadow", onPress: handleUpgradeClick, children: upgradeCard.buttonText }) })] }), jsxRuntime.jsx(react.Spacer, { y: 9 })] })), jsxRuntime.jsx("div", { className: "mt-auto flex flex-col justify-center items-center", children: jsxRuntime.jsx(react.Button, { fullWidth: true, className: " text-default-
|
|
260
|
+
: "solar:alt-arrow-left-outline", size: "lg", className: "hidden sm:block cursor-pointer", onClick: handleCollapseToggle })] })] }), jsxRuntime.jsx(react.Spacer, { y: 6 }), jsxRuntime.jsxs("div", { className: "content__menu--user ".concat(isCollapsed ? "gap-0" : "gap-3"), children: [jsxRuntime.jsx(react.Avatar, { size: "md", src: userInfo.avatar, color: userInfo.avatar === "" ? "warning" : "default", name: userInfo.name }), jsxRuntime.jsxs("div", { className: "collapsible-item flex flex-col", children: [jsxRuntime.jsx("p", { className: "text-small font-medium text-default-900", children: userInfo.name }), jsxRuntime.jsx("p", { className: "text-tiny text-default-400", children: userInfo.role })] })] }), jsxRuntime.jsx("div", { className: "".concat(!isCollapsed ? "flex-1" : "h-full", " min-h-0 py-6"), children: jsxRuntime.jsx("div", { className: "h-full overflow-y-auto pr-6 -mr-6 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]", children: jsxRuntime.jsx(MenuNavList, { defaultSelectedKey: menuItems.selectedKey, items: menuItems.items, isCollapsed: isCollapsed }) }) }), upgradeCard && (jsxRuntime.jsxs("div", { className: "collapsible-item relative", children: [jsxRuntime.jsxs(react.Card, { className: "border-none overflow-visible shadow-none", shadow: "sm", children: [jsxRuntime.jsxs(react.CardBody, { className: "items-center py-5 text-center gap-1", children: [jsxRuntime.jsx("h3", { className: "text-medium font-medium text-default-900", children: upgradeCard.title }), jsxRuntime.jsx("p", { className: "text-small text-default-500 pb-3 whitespace-normal", children: upgradeCard.description })] }), jsxRuntime.jsx(react.CardFooter, { className: "absolute justify-center", style: { bottom: "-30px" }, children: jsxRuntime.jsx(react.Button, { className: "px-10 shadow-md", color: "primary", radius: "full", variant: "shadow", onPress: handleUpgradeClick, children: upgradeCard.buttonText }) })] }), jsxRuntime.jsx(react.Spacer, { y: 9 })] })), jsxRuntime.jsx("div", { className: "mt-auto flex flex-col justify-center items-center", children: jsxRuntime.jsx(react.Button, { fullWidth: true, className: " text-default-500 data-[hover=true]:text-default-600", startContent: jsxRuntime.jsx(IconComponent, { className: "text-default-500", icon: "solar:info-circle-line-duotone", size: "md" }), variant: "light", onPress: handleHelpClick, isIconOnly: isCollapsed, children: !isCollapsed && (jsxRuntime.jsx("span", { className: "collapsible-item", children: helpButton.title })) }) })] }) })] }));
|
|
254
261
|
});
|
|
255
262
|
|
|
256
263
|
// Lista simple de países con bandera emoji y código
|
|
@@ -294,7 +301,8 @@ var countries = [
|
|
|
294
301
|
{ code: "+971", name: "UAE", flag: "🇦🇪" },
|
|
295
302
|
];
|
|
296
303
|
var uniqueCountries = Array.from(new Map(countries.map(function (item) { return [item.code + item.name, item]; })).values());
|
|
297
|
-
|
|
304
|
+
// Traducciones por defecto
|
|
305
|
+
var defaultTranslations$2 = {
|
|
298
306
|
label: "Teléfono",
|
|
299
307
|
placeholder: "Número de teléfono",
|
|
300
308
|
searchPlaceholder: "Buscar país...",
|
|
@@ -310,7 +318,7 @@ var Phone = function (_a) {
|
|
|
310
318
|
var dropdownRef = React.useRef(null);
|
|
311
319
|
var _m = React.useState(uniqueCountries), filteredCountries = _m[0], setFilteredCountries = _m[1];
|
|
312
320
|
// Combinar traducciones por defecto con las proporcionadas
|
|
313
|
-
var t = __assign(__assign({}, defaultTranslations$
|
|
321
|
+
var t = __assign(__assign({}, defaultTranslations$2), translations);
|
|
314
322
|
// Usar la etiqueta de las traducciones si no se proporciona label explícitamente
|
|
315
323
|
var finalLabel = label || t.label;
|
|
316
324
|
// Sincroniza valor externo
|
|
@@ -379,6 +387,47 @@ var Phone = function (_a) {
|
|
|
379
387
|
: ""), 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 }))] }));
|
|
380
388
|
};
|
|
381
389
|
|
|
390
|
+
// Traducciones por defecto en español según las reglas de diseño
|
|
391
|
+
var defaultTranslations$1 = {
|
|
392
|
+
lightTheme: "Claro",
|
|
393
|
+
darkTheme: "Oscuro",
|
|
394
|
+
};
|
|
395
|
+
/**
|
|
396
|
+
* Selector de tema visual con preview interactivo siguiendo las reglas de diseño BeweOS.
|
|
397
|
+
*
|
|
398
|
+
* Reglas aplicadas:
|
|
399
|
+
* - Soporte completo de traducciones mediante props
|
|
400
|
+
* - Sin dependencias de sistemas i18n específicos
|
|
401
|
+
* - Dark mode compatible
|
|
402
|
+
* - Uso exclusivo de Tailwind CSS
|
|
403
|
+
*/
|
|
404
|
+
var ThemePicker = function (_a) {
|
|
405
|
+
var value = _a.value, onChange = _a.onChange, className = _a.className, _b = _a.translations, translations = _b === void 0 ? {} : _b;
|
|
406
|
+
// Combinar traducciones por defecto con las proporcionadas
|
|
407
|
+
var t = __assign(__assign({}, defaultTranslations$1), translations);
|
|
408
|
+
var themes = [
|
|
409
|
+
{
|
|
410
|
+
key: "light",
|
|
411
|
+
label: t.lightTheme,
|
|
412
|
+
cardClass: "bg-white border border-[#E4E4E7] text-zinc-900",
|
|
413
|
+
previewClass: "bg-[#F4F4F5] border border-[#E4E4E7]",
|
|
414
|
+
labelClass: "font-medium text-[14px] leading-[20px] text-zinc-900",
|
|
415
|
+
radioColor: "primary",
|
|
416
|
+
previewContent: (jsxRuntime.jsxs("div", { className: "rounded-lg border border-[#E4E4E7] p-3 mt-4 flex flex-col gap-2", children: [jsxRuntime.jsx("div", { className: "h-3 w-1/2 bg-[#E4E4E7] rounded mb-2" }), jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [jsxRuntime.jsx("div", { className: "h-3 w-3 rounded-full bg-[#E4E4E7]" }), jsxRuntime.jsx("div", { className: "h-3 w-1/3 rounded bg-[#E4E4E7]" })] }), jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [jsxRuntime.jsx("div", { className: "h-3 w-3 rounded-full bg-[#E4E4E7]" }), jsxRuntime.jsx("div", { className: "h-3 w-1/4 rounded bg-[#E4E4E7]" })] })] }), jsxRuntime.jsx("div", { className: "h-8 w-2/3 bg-[#F4F4F5] rounded-lg mt-2" })] })),
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
key: "dark",
|
|
420
|
+
label: t.darkTheme,
|
|
421
|
+
cardClass: "bg-black border border-[#3F3F46] text-white",
|
|
422
|
+
previewClass: "bg-[#27272A] border border-[#3F3F46]",
|
|
423
|
+
labelClass: "font-medium text-[14px] leading-[20px] text-white",
|
|
424
|
+
radioColor: "primary",
|
|
425
|
+
previewContent: (jsxRuntime.jsxs("div", { className: "rounded-lg border border-[#3F3F46] p-3 mt-4 flex flex-col gap-2", children: [jsxRuntime.jsx("div", { className: "h-3 w-1/2 bg-[#3F3F46] rounded mb-2" }), jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [jsxRuntime.jsx("div", { className: "h-3 w-3 rounded-full bg-[#3F3F46]" }), jsxRuntime.jsx("div", { className: "h-3 w-1/3 rounded bg-[#3F3F46]" })] }), jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [jsxRuntime.jsx("div", { className: "h-3 w-3 rounded-full bg-[#3F3F46]" }), jsxRuntime.jsx("div", { className: "h-3 w-1/4 rounded bg-[#3F3F46]" })] })] }), jsxRuntime.jsx("div", { className: "h-8 w-2/3 bg-[#27272A] rounded-lg mt-2" })] })),
|
|
426
|
+
},
|
|
427
|
+
];
|
|
428
|
+
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
|
+
};
|
|
430
|
+
|
|
382
431
|
// Traducciones por defecto en español
|
|
383
432
|
var defaultTranslations = {
|
|
384
433
|
uploadText: "Da clic y selecciona tus archivos",
|
|
@@ -876,6 +925,106 @@ var UploadFile = function (_a) {
|
|
|
876
925
|
};
|
|
877
926
|
UploadFile.displayName = "UploadFile";
|
|
878
927
|
|
|
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 })] })] }));
|
|
948
|
+
};
|
|
949
|
+
HeaderComponent.displayName = "Header";
|
|
950
|
+
|
|
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
|
+
};
|
|
966
|
+
|
|
967
|
+
var paddingClasses = {
|
|
968
|
+
sm: "p-4",
|
|
969
|
+
md: "p-6",
|
|
970
|
+
lg: "p-8",
|
|
971
|
+
};
|
|
972
|
+
|
|
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 })));
|
|
987
|
+
};
|
|
988
|
+
|
|
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
|
+
|
|
879
1028
|
var themeColors = {
|
|
880
1029
|
"purple-light": {
|
|
881
1030
|
extend: "light",
|
|
@@ -1074,13 +1223,25 @@ var ThemeProvider = function (_a) {
|
|
|
1074
1223
|
return (jsxRuntime.jsx(ThemeContext.Provider, { value: { theme: theme, setTheme: setTheme }, children: jsxRuntime.jsx("main", { className: "".concat(theme, " bg-background text-foreground "), children: children }) }));
|
|
1075
1224
|
};
|
|
1076
1225
|
|
|
1077
|
-
exports.
|
|
1226
|
+
exports.AutoComplete = AutoComplete;
|
|
1227
|
+
exports.Button = Button;
|
|
1228
|
+
exports.Card = Card;
|
|
1229
|
+
exports.HeaderComponent = HeaderComponent;
|
|
1078
1230
|
exports.IconComponent = IconComponent;
|
|
1231
|
+
exports.Input = Input;
|
|
1079
1232
|
exports.MenuComponent = MenuComponent;
|
|
1080
1233
|
exports.Phone = Phone;
|
|
1234
|
+
exports.Select = Select;
|
|
1081
1235
|
exports.ThemeContext = ThemeContext;
|
|
1236
|
+
exports.ThemePicker = ThemePicker;
|
|
1082
1237
|
exports.ThemeProvider = ThemeProvider;
|
|
1083
1238
|
exports.UploadFile = UploadFile;
|
|
1084
1239
|
exports.sizeMap = sizeMap;
|
|
1085
1240
|
exports.themeColors = themeColors;
|
|
1086
1241
|
exports.useThemeContext = useThemeContext;
|
|
1242
|
+
Object.keys(react).forEach(function (k) {
|
|
1243
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
1244
|
+
enumerable: true,
|
|
1245
|
+
get: function () { return react[k]; }
|
|
1246
|
+
});
|
|
1247
|
+
});
|
package/dist/index.esm.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import
|
|
1
|
+
import { Autocomplete, cn, ListboxItem, Popover, PopoverTrigger, Tooltip, PopoverContent, Listbox, Accordion, AccordionItem, ListboxSection, Spacer, Avatar, Card as Card$1, CardBody, CardFooter, Button as Button$1, Input as Input$1, RadioGroup, Radio, Modal, ModalContent, ModalHeader, ModalBody, Slider, ModalFooter, Dropdown, DropdownTrigger, DropdownMenu, DropdownSection, DropdownItem, Select as Select$1 } from '@heroui/react';
|
|
2
|
+
export * from '@heroui/react';
|
|
3
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
4
|
+
import React, { useId, useState, createElement, useCallback, useRef, useEffect, useMemo, createContext, useContext } from 'react';
|
|
4
5
|
import { Icon } from '@iconify/react';
|
|
5
6
|
import { useTheme } from '@heroui/use-theme';
|
|
6
7
|
|
|
@@ -50,15 +51,22 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
50
51
|
};
|
|
51
52
|
|
|
52
53
|
/**
|
|
53
|
-
*
|
|
54
|
-
*
|
|
54
|
+
* AutoComplete genérico reutilizable basado en HeroUI siguiendo las reglas de diseño BeweOS.
|
|
55
|
+
*
|
|
56
|
+
* Reglas aplicadas:
|
|
57
|
+
* - Variant: Bordered (por defecto)
|
|
58
|
+
* - Radius: md (por defecto)
|
|
59
|
+
* - labelPlacement: Outside
|
|
60
|
+
* - Size: sm, md, lg (configurable)
|
|
55
61
|
*/
|
|
56
|
-
var
|
|
57
|
-
var
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
+
var AutoComplete = function (_a) {
|
|
63
|
+
var label = _a.label, id = _a.id, _b = _a.size, size = _b === void 0 ? "md" : _b, _c = _a.variant, variant = _c === void 0 ? "bordered" : _c, _d = _a.radius, radius = _d === void 0 ? "md" : _d, props = __rest(_a, ["label", "id", "size", "variant", "radius"]);
|
|
64
|
+
var generatedId = useId();
|
|
65
|
+
var autoId = id || generatedId;
|
|
66
|
+
return (jsxs("div", { children: [label && (jsx("label", { htmlFor: autoId, className: "block mb-2 text-tiny text-default-600", children: label })), jsx(Autocomplete, __assign({}, props, { id: autoId, label: undefined, labelPlacement: "outside", variant: variant, size: size, radius: radius, classNames: {
|
|
67
|
+
base: "[&_[data-slot=input-wrapper][data-focus=true]]:!border-primary-500",
|
|
68
|
+
popoverContent: "[&_li[data-hover=true]]:!bg-primary-50 [&_li[data-hover=true]]:!text-default-600 [&_li]:!text-default-500",
|
|
69
|
+
} }))] }));
|
|
62
70
|
};
|
|
63
71
|
|
|
64
72
|
var sizeMap = {
|
|
@@ -246,9 +254,9 @@ var MenuComponent = React.memo(function Menu(_a) {
|
|
|
246
254
|
}
|
|
247
255
|
return (jsxs(Fragment, { children: [jsx("button", { type: "button", "aria-label": "Close sidebar", className: "fixed inset-0 bg-black bg-opacity-40 z-40 xs:block sm:hidden", onClick: handleSidebarClose, style: { border: "none", padding: 0, margin: 0 } }), jsx("div", { className: "container__menu ".concat(isCollapsed
|
|
248
256
|
? "container__menu--collapsed"
|
|
249
|
-
: "container__menu--expanded"), children: jsxs("div", { className: "content__menu", children: [jsxs("div", { className: "content__menu--header", style: { flexDirection: isCollapsed ? "column-reverse" : "row" }, children: [jsxs("div", { className: "flex flex-row items-center justify-center ".concat(isCollapsed ? "gap-0" : "gap-2"), children: [jsx("div", { className: "flex h-8 w-8 items-center justify-center rounded-full bg-foreground", children: jsx("img", { src: commerceInfo.logo, alt: "Logo of ".concat(commerceInfo.name) }) }), jsx("span", { className: "collapsible-item text-small font-bold
|
|
257
|
+
: "container__menu--expanded"), children: jsxs("div", { className: "content__menu", children: [jsxs("div", { className: "content__menu--header", style: { flexDirection: isCollapsed ? "column-reverse" : "row" }, children: [jsxs("div", { className: "flex flex-row items-center justify-center ".concat(isCollapsed ? "gap-0" : "gap-2"), children: [jsx("div", { className: "flex h-8 w-8 items-center justify-center rounded-full bg-foreground", children: jsx("img", { src: commerceInfo.logo, alt: "Logo of ".concat(commerceInfo.name) }) }), jsx("span", { className: "collapsible-item text-small font-bold ", children: commerceInfo.name })] }), jsxs("div", { className: "flex items-center", children: [jsx(IconComponent, { icon: "material-symbols-light:close", size: "lg", className: "cursor-pointer block sm:hidden", onClick: handleSidebarClose }), jsx(IconComponent, { icon: isCollapsed
|
|
250
258
|
? "solar:alt-arrow-right-outline"
|
|
251
|
-
: "solar:alt-arrow-left-outline", size: "lg", className: "hidden sm:block cursor-pointer", onClick: handleCollapseToggle })] })] }), jsx(Spacer, { y: 6 }), jsxs("div", { className: "content__menu--user ".concat(isCollapsed ? "gap-0" : "gap-3"), children: [jsx(Avatar, { size: "md", src: userInfo.avatar, color: userInfo.avatar === "" ? "warning" : "default", name: userInfo.name }), jsxs("div", { className: "collapsible-item flex flex-col", children: [jsx("p", { className: "text-small font-medium text-default-900", children: userInfo.name }), jsx("p", { className: "text-tiny text-default-400", children: userInfo.role })] })] }), jsx("div", { className: "".concat(!isCollapsed ? "flex-1" : "h-full", " min-h-0 py-6"), children: jsx("div", { className: "h-full overflow-y-auto pr-6 -mr-6 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]", children: jsx(MenuNavList, { defaultSelectedKey: menuItems.selectedKey, items: menuItems.items, isCollapsed: isCollapsed }) }) }), upgradeCard && (jsxs("div", { className: "collapsible-item relative", children: [jsxs(Card, { className: "border-none overflow-visible shadow-none", shadow: "sm", children: [jsxs(CardBody, { className: "items-center py-5 text-center gap-1", children: [jsx("h3", { className: "text-medium font-medium text-default-900", children: upgradeCard.title }), jsx("p", { className: "text-small text-default-500 pb-3 whitespace-normal", children: upgradeCard.description })] }), jsx(CardFooter, { className: "absolute justify-center", style: { bottom: "-30px" }, children: jsx(Button, { className: "px-10 shadow-md", color: "primary", radius: "full", variant: "shadow", onPress: handleUpgradeClick, children: upgradeCard.buttonText }) })] }), jsx(Spacer, { y: 9 })] })), jsx("div", { className: "mt-auto flex flex-col justify-center items-center", children: jsx(Button, { fullWidth: true, className: " text-default-
|
|
259
|
+
: "solar:alt-arrow-left-outline", size: "lg", className: "hidden sm:block cursor-pointer", onClick: handleCollapseToggle })] })] }), jsx(Spacer, { y: 6 }), jsxs("div", { className: "content__menu--user ".concat(isCollapsed ? "gap-0" : "gap-3"), children: [jsx(Avatar, { size: "md", src: userInfo.avatar, color: userInfo.avatar === "" ? "warning" : "default", name: userInfo.name }), jsxs("div", { className: "collapsible-item flex flex-col", children: [jsx("p", { className: "text-small font-medium text-default-900", children: userInfo.name }), jsx("p", { className: "text-tiny text-default-400", children: userInfo.role })] })] }), jsx("div", { className: "".concat(!isCollapsed ? "flex-1" : "h-full", " min-h-0 py-6"), children: jsx("div", { className: "h-full overflow-y-auto pr-6 -mr-6 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]", children: jsx(MenuNavList, { defaultSelectedKey: menuItems.selectedKey, items: menuItems.items, isCollapsed: isCollapsed }) }) }), upgradeCard && (jsxs("div", { className: "collapsible-item relative", children: [jsxs(Card$1, { className: "border-none overflow-visible shadow-none", shadow: "sm", children: [jsxs(CardBody, { className: "items-center py-5 text-center gap-1", children: [jsx("h3", { className: "text-medium font-medium text-default-900", children: upgradeCard.title }), jsx("p", { className: "text-small text-default-500 pb-3 whitespace-normal", children: upgradeCard.description })] }), jsx(CardFooter, { className: "absolute justify-center", style: { bottom: "-30px" }, children: jsx(Button$1, { className: "px-10 shadow-md", color: "primary", radius: "full", variant: "shadow", onPress: handleUpgradeClick, children: upgradeCard.buttonText }) })] }), jsx(Spacer, { y: 9 })] })), jsx("div", { className: "mt-auto flex flex-col justify-center items-center", children: jsx(Button$1, { fullWidth: true, className: " text-default-500 data-[hover=true]:text-default-600", startContent: jsx(IconComponent, { className: "text-default-500", icon: "solar:info-circle-line-duotone", size: "md" }), variant: "light", onPress: handleHelpClick, isIconOnly: isCollapsed, children: !isCollapsed && (jsx("span", { className: "collapsible-item", children: helpButton.title })) }) })] }) })] }));
|
|
252
260
|
});
|
|
253
261
|
|
|
254
262
|
// Lista simple de países con bandera emoji y código
|
|
@@ -292,7 +300,8 @@ var countries = [
|
|
|
292
300
|
{ code: "+971", name: "UAE", flag: "🇦🇪" },
|
|
293
301
|
];
|
|
294
302
|
var uniqueCountries = Array.from(new Map(countries.map(function (item) { return [item.code + item.name, item]; })).values());
|
|
295
|
-
|
|
303
|
+
// Traducciones por defecto
|
|
304
|
+
var defaultTranslations$2 = {
|
|
296
305
|
label: "Teléfono",
|
|
297
306
|
placeholder: "Número de teléfono",
|
|
298
307
|
searchPlaceholder: "Buscar país...",
|
|
@@ -308,7 +317,7 @@ var Phone = function (_a) {
|
|
|
308
317
|
var dropdownRef = useRef(null);
|
|
309
318
|
var _m = useState(uniqueCountries), filteredCountries = _m[0], setFilteredCountries = _m[1];
|
|
310
319
|
// Combinar traducciones por defecto con las proporcionadas
|
|
311
|
-
var t = __assign(__assign({}, defaultTranslations$
|
|
320
|
+
var t = __assign(__assign({}, defaultTranslations$2), translations);
|
|
312
321
|
// Usar la etiqueta de las traducciones si no se proporciona label explícitamente
|
|
313
322
|
var finalLabel = label || t.label;
|
|
314
323
|
// Sincroniza valor externo
|
|
@@ -374,7 +383,48 @@ var Phone = function (_a) {
|
|
|
374
383
|
setFilteredCountries(filtered);
|
|
375
384
|
} }) }), jsx("div", { className: "max-h-60 overflow-y-auto", children: filteredCountries.length > 0 ? (filteredCountries.map(function (country) { return (jsxs("button", { type: "button", className: "flex items-center w-full px-4 py-2.5 text-sm hover:bg-gray-50 dark:hover:bg-gray-800 ".concat(country.code === selectedCountry.code
|
|
376
385
|
? "bg-blue-50 dark:bg-blue-900"
|
|
377
|
-
: ""), onClick: function () { return handleCountrySelect(country); }, children: [jsx("span", { className: "mr-3 text-lg", children: country.flag }), jsx("span", { className: "flex-1 text-left dark:text-gray-100", children: country.name }), jsx("span", { className: "text-xs text-gray-500 dark:text-gray-400", children: country.code })] }, country.code)); })) : (jsx("div", { className: "px-4 py-2 text-sm text-gray-500 dark:text-gray-400", children: t.noCountriesFound })) })] }))] }), jsx(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 && (jsx("span", { className: "text-xs text-pink-600 dark:text-pink-400 mt-1", children: errorText }))] }));
|
|
386
|
+
: ""), onClick: function () { return handleCountrySelect(country); }, children: [jsx("span", { className: "mr-3 text-lg", children: country.flag }), jsx("span", { className: "flex-1 text-left dark:text-gray-100", children: country.name }), jsx("span", { className: "text-xs text-gray-500 dark:text-gray-400", children: country.code })] }, country.code)); })) : (jsx("div", { className: "px-4 py-2 text-sm text-gray-500 dark:text-gray-400", children: t.noCountriesFound })) })] }))] }), jsx(Input$1, { 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 && (jsx("span", { className: "text-xs text-pink-600 dark:text-pink-400 mt-1", children: errorText }))] }));
|
|
387
|
+
};
|
|
388
|
+
|
|
389
|
+
// Traducciones por defecto en español según las reglas de diseño
|
|
390
|
+
var defaultTranslations$1 = {
|
|
391
|
+
lightTheme: "Claro",
|
|
392
|
+
darkTheme: "Oscuro",
|
|
393
|
+
};
|
|
394
|
+
/**
|
|
395
|
+
* Selector de tema visual con preview interactivo siguiendo las reglas de diseño BeweOS.
|
|
396
|
+
*
|
|
397
|
+
* Reglas aplicadas:
|
|
398
|
+
* - Soporte completo de traducciones mediante props
|
|
399
|
+
* - Sin dependencias de sistemas i18n específicos
|
|
400
|
+
* - Dark mode compatible
|
|
401
|
+
* - Uso exclusivo de Tailwind CSS
|
|
402
|
+
*/
|
|
403
|
+
var ThemePicker = function (_a) {
|
|
404
|
+
var value = _a.value, onChange = _a.onChange, className = _a.className, _b = _a.translations, translations = _b === void 0 ? {} : _b;
|
|
405
|
+
// Combinar traducciones por defecto con las proporcionadas
|
|
406
|
+
var t = __assign(__assign({}, defaultTranslations$1), translations);
|
|
407
|
+
var themes = [
|
|
408
|
+
{
|
|
409
|
+
key: "light",
|
|
410
|
+
label: t.lightTheme,
|
|
411
|
+
cardClass: "bg-white border border-[#E4E4E7] text-zinc-900",
|
|
412
|
+
previewClass: "bg-[#F4F4F5] border border-[#E4E4E7]",
|
|
413
|
+
labelClass: "font-medium text-[14px] leading-[20px] text-zinc-900",
|
|
414
|
+
radioColor: "primary",
|
|
415
|
+
previewContent: (jsxs("div", { className: "rounded-lg border border-[#E4E4E7] p-3 mt-4 flex flex-col gap-2", children: [jsx("div", { className: "h-3 w-1/2 bg-[#E4E4E7] rounded mb-2" }), jsxs("div", { className: "flex flex-col gap-1", children: [jsxs("div", { className: "flex items-center gap-2", children: [jsx("div", { className: "h-3 w-3 rounded-full bg-[#E4E4E7]" }), jsx("div", { className: "h-3 w-1/3 rounded bg-[#E4E4E7]" })] }), jsxs("div", { className: "flex items-center gap-2", children: [jsx("div", { className: "h-3 w-3 rounded-full bg-[#E4E4E7]" }), jsx("div", { className: "h-3 w-1/4 rounded bg-[#E4E4E7]" })] })] }), jsx("div", { className: "h-8 w-2/3 bg-[#F4F4F5] rounded-lg mt-2" })] })),
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
key: "dark",
|
|
419
|
+
label: t.darkTheme,
|
|
420
|
+
cardClass: "bg-black border border-[#3F3F46] text-white",
|
|
421
|
+
previewClass: "bg-[#27272A] border border-[#3F3F46]",
|
|
422
|
+
labelClass: "font-medium text-[14px] leading-[20px] text-white",
|
|
423
|
+
radioColor: "primary",
|
|
424
|
+
previewContent: (jsxs("div", { className: "rounded-lg border border-[#3F3F46] p-3 mt-4 flex flex-col gap-2", children: [jsx("div", { className: "h-3 w-1/2 bg-[#3F3F46] rounded mb-2" }), jsxs("div", { className: "flex flex-col gap-1", children: [jsxs("div", { className: "flex items-center gap-2", children: [jsx("div", { className: "h-3 w-3 rounded-full bg-[#3F3F46]" }), jsx("div", { className: "h-3 w-1/3 rounded bg-[#3F3F46]" })] }), jsxs("div", { className: "flex items-center gap-2", children: [jsx("div", { className: "h-3 w-3 rounded-full bg-[#3F3F46]" }), jsx("div", { className: "h-3 w-1/4 rounded bg-[#3F3F46]" })] })] }), jsx("div", { className: "h-8 w-2/3 bg-[#27272A] rounded-lg mt-2" })] })),
|
|
425
|
+
},
|
|
426
|
+
];
|
|
427
|
+
return (jsx(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 (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: [jsx("div", { className: "absolute top-6 right-6", children: jsx(Radio, { "aria-label": theme.label, color: theme.radioColor, size: "sm", value: theme.key }) }), jsx("span", { className: theme.labelClass, children: theme.label }), theme.previewContent] }, theme.key)); }) }));
|
|
378
428
|
};
|
|
379
429
|
|
|
380
430
|
// Traducciones por defecto en español
|
|
@@ -669,7 +719,7 @@ var ImageCropModal = function (_a) {
|
|
|
669
719
|
backgroundImage: "linear-gradient(45deg, #ccc 25%, transparent 25%), linear-gradient(-45deg, #ccc 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ccc 75%), linear-gradient(-45deg, transparent 75%, #ccc 75%)",
|
|
670
720
|
backgroundSize: "8px 8px",
|
|
671
721
|
backgroundPosition: "0 0, 0 4px, 4px -4px, -4px 0px",
|
|
672
|
-
} }), jsx("span", { className: "text-sm", children: translations.cropBackgroundTransparent })] })] })] })] }) }), jsxs(ModalFooter, { className: "flex flex-col-reverse sm:flex-row gap-2 px-4 sm:px-6", children: [jsx(Button, { color: "danger", variant: "light", onPress: onCancel, className: "w-full sm:w-auto", children: translations.cropCancelButton }), jsx(Button, { color: "primary", onPress: handleSave, className: "w-full sm:w-auto", children: translations.cropSaveButton })] })] }) }));
|
|
722
|
+
} }), jsx("span", { className: "text-sm", children: translations.cropBackgroundTransparent })] })] })] })] }) }), jsxs(ModalFooter, { className: "flex flex-col-reverse sm:flex-row gap-2 px-4 sm:px-6", children: [jsx(Button$1, { color: "danger", variant: "light", onPress: onCancel, className: "w-full sm:w-auto", children: translations.cropCancelButton }), jsx(Button$1, { color: "primary", onPress: handleSave, className: "w-full sm:w-auto", children: translations.cropSaveButton })] })] }) }));
|
|
673
723
|
};
|
|
674
724
|
/**
|
|
675
725
|
* Componente de previsualización de archivo
|
|
@@ -687,7 +737,7 @@ var FilePreview = function (_a) {
|
|
|
687
737
|
if (!(file === null || file === void 0 ? void 0 : file.type.startsWith("image/"))) {
|
|
688
738
|
return null;
|
|
689
739
|
}
|
|
690
|
-
return (jsxs("div", { className: "absolute inset-0 overflow-hidden z-10", children: [jsx("img", { src: previewUrl, alt: file.name, className: "w-full h-full object-cover" }), jsx(Button, { isIconOnly: true, size: "sm", color: "danger", variant: "solid", className: "absolute top-2 right-2 sm:top-3 sm:right-3 z-20 bg-red-100 hover:bg-red-200 text-red-600 min-w-8 h-8 sm:min-w-10 sm:h-10", onPress: onRemove, "aria-label": removeAriaLabel, children: jsx(IconComponent, { icon: "heroicons:trash", size: "sm" }) })] }));
|
|
740
|
+
return (jsxs("div", { className: "absolute inset-0 overflow-hidden z-10", children: [jsx("img", { src: previewUrl, alt: file.name, className: "w-full h-full object-cover" }), jsx(Button$1, { isIconOnly: true, size: "sm", color: "danger", variant: "solid", className: "absolute top-2 right-2 sm:top-3 sm:right-3 z-20 bg-red-100 hover:bg-red-200 text-red-600 min-w-8 h-8 sm:min-w-10 sm:h-10", onPress: onRemove, "aria-label": removeAriaLabel, children: jsx(IconComponent, { icon: "heroicons:trash", size: "sm" }) })] }));
|
|
691
741
|
};
|
|
692
742
|
/**
|
|
693
743
|
* Componente UploadDocument basado en Hero UI con funcionalidad mejorada
|
|
@@ -866,7 +916,7 @@ var UploadFile = function (_a) {
|
|
|
866
916
|
.replace(/\s+/g, " ");
|
|
867
917
|
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");
|
|
868
918
|
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");
|
|
869
|
-
return (jsxs("div", { className: "relative", children: [jsx(Card, { className: containerClasses, isPressable: !(disabled || uploadImageRef.current), onPress: handleClick, children: jsxs(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 && (jsx(FilePreview, { file: uploadImageRef.current, onRemove: handleRemoveImage, removeAriaLabel: t.removeFileAriaLabel })), jsx("div", { className: uploadImageRef.current
|
|
919
|
+
return (jsxs("div", { className: "relative", children: [jsx(Card$1, { className: containerClasses, isPressable: !(disabled || uploadImageRef.current), onPress: handleClick, children: jsxs(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 && (jsx(FilePreview, { file: uploadImageRef.current, onRemove: handleRemoveImage, removeAriaLabel: t.removeFileAriaLabel })), jsx("div", { className: uploadImageRef.current
|
|
870
920
|
? "opacity-0"
|
|
871
921
|
: "opacity-100 transition-opacity", children: jsxs("div", { className: "flex flex-col items-center gap-3 sm:gap-4", children: [jsx(IconComponent, { icon: icon, size: "xl", className: "sm:text-4xl lg:text-5xl ".concat(disabled ? "text-gray-400" : iconColor || "text-primary") }), jsxs("div", { className: "space-y-1 sm:space-y-2 text-center px-2", children: [jsx("p", { className: textClasses, children: isDragging ? t.dragText : finalText }), finalSubText && !isDragging && (jsx("p", { className: subTextClasses, children: finalSubText }))] })] }) }), jsx("input", { ref: inputRef, type: "file", className: "hidden", multiple: multiple, accept: Array.isArray(acceptedFiles)
|
|
872
922
|
? acceptedFiles.join(",")
|
|
@@ -874,6 +924,106 @@ var UploadFile = function (_a) {
|
|
|
874
924
|
};
|
|
875
925
|
UploadFile.displayName = "UploadFile";
|
|
876
926
|
|
|
927
|
+
var ConfigMenu = function (_a) {
|
|
928
|
+
var _b;
|
|
929
|
+
var options = _a.options, onLogout = _a.onLogout, translations = _a.translations;
|
|
930
|
+
return (jsxs(Dropdown, { className: "min-w-40", children: [jsx(DropdownTrigger, { children: jsx(Button$1, { isIconOnly: true, color: "default", startContent: jsx(IconComponent, { icon: "solar:settings-linear" }) }) }), jsxs(DropdownMenu, { "aria-label": "Configuration", children: [jsx(DropdownSection, { showDivider: true, className: "mb-0", children: options.map(function (item) { return (jsx(DropdownItem, { href: item.href, className: "data-[hover=true]:bg-primary-50 data-[hover=true]:text-default-700", classNames: {
|
|
931
|
+
base: "text-default-500",
|
|
932
|
+
}, startContent: item.icon ? jsx(IconComponent, { icon: item.icon }) : undefined, children: item.label }, item.label)); }) }), jsx(DropdownSection, { children: jsx(DropdownItem, { onPress: onLogout, className: "data-[hover=true]:bg-primary-50 data-[hover=true]:text-default-700", classNames: {
|
|
933
|
+
base: "text-default-500",
|
|
934
|
+
}, startContent: 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") })] })] }));
|
|
935
|
+
};
|
|
936
|
+
ConfigMenu.displayName = "ConfigMenu";
|
|
937
|
+
|
|
938
|
+
var NotificationButton = function (_a) {
|
|
939
|
+
var _b = _a.notificationCount, notificationCount = _b === void 0 ? 0 : _b;
|
|
940
|
+
return (jsx(Button$1, { isIconOnly: true, color: "secondary", variant: "flat", startContent: jsx(IconComponent, { icon: "solar:bell-bing-linear" }), children: notificationCount > 0 && (jsx("span", { className: "notification__alert", children: notificationCount })) }));
|
|
941
|
+
};
|
|
942
|
+
NotificationButton.displayName = "NotificationButton";
|
|
943
|
+
|
|
944
|
+
var HeaderComponent = function (_a) {
|
|
945
|
+
var notificationCount = _a.notificationCount, options = _a.options, onMenuClick = _a.onMenuClick, onLogout = _a.onLogout, translations = _a.translations;
|
|
946
|
+
return (jsxs("header", { className: "header__container", children: [jsx(Button$1, { className: "sm:hidden", isIconOnly: true, variant: "light", startContent: jsx(IconComponent, { icon: "solar:hamburger-menu-linear" }), onPress: onMenuClick }), jsxs("div", { className: "flex items-center gap-4", children: [jsx(NotificationButton, { notificationCount: notificationCount }), jsx(ConfigMenu, { options: options, onLogout: onLogout, translations: translations })] })] }));
|
|
947
|
+
};
|
|
948
|
+
HeaderComponent.displayName = "Header";
|
|
949
|
+
|
|
950
|
+
/**
|
|
951
|
+
* Botón genérico basado en HeroUI siguiendo las reglas de diseño BeweOS.
|
|
952
|
+
*
|
|
953
|
+
* Reglas aplicadas:
|
|
954
|
+
* - Variant: Solid, Bordered, Light, Flat, Faded
|
|
955
|
+
* - Size: sm, md, lg
|
|
956
|
+
* - StartContent: On, Off
|
|
957
|
+
* - isLoading: On, Off
|
|
958
|
+
* - Radius: md (por defecto)
|
|
959
|
+
* - isIconOnly: True, False
|
|
960
|
+
*/
|
|
961
|
+
var Button = function (_a) {
|
|
962
|
+
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"]);
|
|
963
|
+
return (jsx(Button$1, __assign({}, props, { color: color, size: size, variant: variant, radius: radius, startContent: startContent, endContent: endContent, isLoading: isLoading, isIconOnly: isIconOnly })));
|
|
964
|
+
};
|
|
965
|
+
|
|
966
|
+
var paddingClasses = {
|
|
967
|
+
sm: "p-4",
|
|
968
|
+
md: "p-6",
|
|
969
|
+
lg: "p-8",
|
|
970
|
+
};
|
|
971
|
+
|
|
972
|
+
/**
|
|
973
|
+
* Card genérica siguiendo las reglas de diseño BeweOS basada en HeroUI.
|
|
974
|
+
*
|
|
975
|
+
* Reglas aplicadas:
|
|
976
|
+
* - Shadow: none, sm, md, lg (configurable)
|
|
977
|
+
* - Radius: sm (por defecto, configurable)
|
|
978
|
+
* - Padding configurable (sm, md, lg)
|
|
979
|
+
* - Hereda de HeroUI Card con personalización BeweOS
|
|
980
|
+
*/
|
|
981
|
+
var Card = function (_a) {
|
|
982
|
+
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"]);
|
|
983
|
+
var paddingClass = paddingClasses[padding];
|
|
984
|
+
var combinedClassName = [paddingClass, className].filter(Boolean).join(" ");
|
|
985
|
+
return (jsx(Card$1, __assign({ shadow: shadow, radius: radius, className: combinedClassName }, props, { children: children })));
|
|
986
|
+
};
|
|
987
|
+
|
|
988
|
+
/**
|
|
989
|
+
* Input genérico reutilizable basado en HeroUI siguiendo las reglas de diseño BeweOS.
|
|
990
|
+
*
|
|
991
|
+
* Reglas aplicadas:
|
|
992
|
+
* - Variant: Bordered (por defecto)
|
|
993
|
+
* - labelPlacement: Outside
|
|
994
|
+
* - Size: sm, md, lg (configurable)
|
|
995
|
+
* - Radius configurable
|
|
996
|
+
*/
|
|
997
|
+
var Input = function (_a) {
|
|
998
|
+
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"]);
|
|
999
|
+
var generatedId = useId();
|
|
1000
|
+
var inputId = id || generatedId;
|
|
1001
|
+
return (jsx(Input$1, __assign({}, props, { id: inputId, label: label, labelPlacement: "outside", placeholder: placeholder, variant: variant, size: size, radius: radius, classNames: {
|
|
1002
|
+
label: "text-default-600 text-tiny",
|
|
1003
|
+
inputWrapper: "focus-within:!border-primary-500",
|
|
1004
|
+
} })));
|
|
1005
|
+
};
|
|
1006
|
+
|
|
1007
|
+
/**
|
|
1008
|
+
* Select genérico reutilizable basado en HeroUI siguiendo las reglas de diseño BeweOS.
|
|
1009
|
+
*
|
|
1010
|
+
* Reglas aplicadas:
|
|
1011
|
+
* - Variant: Bordered (por defecto)
|
|
1012
|
+
* - Radius: md (por defecto)
|
|
1013
|
+
* - labelPlacement: Outside
|
|
1014
|
+
* - Size: sm, md, lg (configurable)
|
|
1015
|
+
*/
|
|
1016
|
+
var Select = function (_a) {
|
|
1017
|
+
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"]);
|
|
1018
|
+
var generatedId = useId();
|
|
1019
|
+
var selectId = id || generatedId;
|
|
1020
|
+
return (jsx("div", { className: "group", children: jsx(Select$1, __assign({}, props, { id: selectId, label: label, labelPlacement: "outside", placeholder: placeholder, variant: variant, size: size, radius: radius, classNames: {
|
|
1021
|
+
label: "text-default-600 text-tiny group-data-[filled=true]:text-default-600",
|
|
1022
|
+
trigger: "data-[open=true]:!border-primary-500 data-[focus=true]:!border-primary-500",
|
|
1023
|
+
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",
|
|
1024
|
+
} })) }));
|
|
1025
|
+
};
|
|
1026
|
+
|
|
877
1027
|
var themeColors = {
|
|
878
1028
|
"purple-light": {
|
|
879
1029
|
extend: "light",
|
|
@@ -1072,4 +1222,4 @@ var ThemeProvider = function (_a) {
|
|
|
1072
1222
|
return (jsx(ThemeContext.Provider, { value: { theme: theme, setTheme: setTheme }, children: jsx("main", { className: "".concat(theme, " bg-background text-foreground "), children: children }) }));
|
|
1073
1223
|
};
|
|
1074
1224
|
|
|
1075
|
-
export {
|
|
1225
|
+
export { AutoComplete, Button, Card, HeaderComponent, IconComponent, Input, MenuComponent, Phone, Select, ThemeContext, ThemePicker, ThemeProvider, UploadFile, sizeMap, themeColors, useThemeContext };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { AutoCompleteProps } from "./AutoComplete.types";
|
|
3
|
+
/**
|
|
4
|
+
* AutoComplete genérico reutilizable basado en HeroUI siguiendo las reglas de diseño BeweOS.
|
|
5
|
+
*
|
|
6
|
+
* Reglas aplicadas:
|
|
7
|
+
* - Variant: Bordered (por defecto)
|
|
8
|
+
* - Radius: md (por defecto)
|
|
9
|
+
* - labelPlacement: Outside
|
|
10
|
+
* - Size: sm, md, lg (configurable)
|
|
11
|
+
*/
|
|
12
|
+
export declare const AutoComplete: React.FC<AutoCompleteProps>;
|
|
13
|
+
//# sourceMappingURL=AutoComplete.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutoComplete.d.ts","sourceRoot":"","sources":["../../../../src/components/autocomplete/AutoComplete.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAsCpD,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AutocompleteProps as HeroUIAutocompleteProps } from "@heroui/react";
|
|
2
|
+
export type AutoCompleteProps = Omit<HeroUIAutocompleteProps, "size" | "variant" | "radius"> & {
|
|
3
|
+
label?: string;
|
|
4
|
+
size?: "sm" | "md" | "lg";
|
|
5
|
+
variant?: "flat" | "bordered" | "faded" | "underlined";
|
|
6
|
+
radius?: "none" | "sm" | "md" | "lg" | "full";
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=AutoComplete.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutoComplete.types.d.ts","sourceRoot":"","sources":["../../../../src/components/autocomplete/AutoComplete.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,IAAI,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAElF,MAAM,MAAM,iBAAiB,GAAG,IAAI,CACnC,uBAAuB,EACvB,MAAM,GAAG,SAAS,GAAG,QAAQ,CAC7B,GAAG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,OAAO,GAAG,YAAY,CAAC;IACvD,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;CAC9C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/autocomplete/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,YAAY,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC"}
|