@beweco/aurora-ui 0.1.4 → 0.1.6
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 +142 -74
- package/dist/index.esm.js +139 -76
- package/dist/types/components/color-selector/ColorSelector.d.ts +5 -0
- package/dist/types/components/color-selector/ColorSelector.d.ts.map +1 -0
- package/dist/types/components/color-selector/ColorSelector.types.d.ts +5 -0
- package/dist/types/components/color-selector/ColorSelector.types.d.ts.map +1 -0
- package/dist/types/components/color-selector/index.d.ts +3 -0
- package/dist/types/components/color-selector/index.d.ts.map +1 -0
- package/dist/types/components/daterangepicker/DateRangePicker.d.ts +0 -1
- package/dist/types/components/daterangepicker/DateRangePicker.d.ts.map +1 -1
- package/dist/types/components/h2/H2.d.ts +4 -0
- package/dist/types/components/h2/H2.d.ts.map +1 -0
- package/dist/types/components/h2/H2.types.d.ts +4 -0
- package/dist/types/components/h2/H2.types.d.ts.map +1 -0
- package/dist/types/components/h2/index.d.ts +3 -0
- package/dist/types/components/h2/index.d.ts.map +1 -0
- package/dist/types/components/h3/H3.d.ts +4 -0
- package/dist/types/components/h3/H3.d.ts.map +1 -0
- package/dist/types/components/h3/H3.types.d.ts +4 -0
- package/dist/types/components/h3/H3.types.d.ts.map +1 -0
- package/dist/types/components/h3/index.d.ts +3 -0
- package/dist/types/components/h3/index.d.ts.map +1 -0
- package/dist/types/components/h4/H4.d.ts +4 -0
- package/dist/types/components/h4/H4.d.ts.map +1 -0
- package/dist/types/components/h4/H4.types.d.ts +4 -0
- package/dist/types/components/h4/H4.types.d.ts.map +1 -0
- package/dist/types/components/h4/index.d.ts +3 -0
- package/dist/types/components/h4/index.d.ts.map +1 -0
- package/dist/types/components/p/P.d.ts +4 -0
- package/dist/types/components/p/P.d.ts.map +1 -0
- package/dist/types/components/p/P.types.d.ts +4 -0
- package/dist/types/components/p/P.types.d.ts.map +1 -0
- package/dist/types/components/p/index.d.ts +3 -0
- package/dist/types/components/p/index.d.ts.map +1 -0
- package/dist/types/components/phone/Phone.d.ts.map +1 -1
- package/dist/types/components/phone/Phone.types.d.ts +13 -2
- package/dist/types/components/phone/Phone.types.d.ts.map +1 -1
- package/dist/types/components/phone/phone.constants.d.ts +13 -0
- package/dist/types/components/phone/phone.constants.d.ts.map +1 -0
- package/dist/types/components/theme-picker/ThemePicker.d.ts.map +1 -1
- package/dist/types/index.d.ts +5 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -4,6 +4,7 @@ var react = require('@heroui/react');
|
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var react$1 = require('@iconify/react');
|
|
7
|
+
var reactDom = require('react-dom');
|
|
7
8
|
var useTheme = require('@heroui/use-theme');
|
|
8
9
|
|
|
9
10
|
/******************************************************************************
|
|
@@ -465,42 +466,50 @@ var defaultTranslations$2 = {
|
|
|
465
466
|
expandListAriaLabel: "Desplegar lista de países",
|
|
466
467
|
noCountriesFound: "No se encontraron países",
|
|
467
468
|
};
|
|
469
|
+
|
|
468
470
|
var Phone = function (_a) {
|
|
469
|
-
var label = _a.label, _b = _a.required, required = _b === void 0 ? false : _b, _c = _a.error, error = _c === void 0 ? false : _c, _d = _a.errorText, errorText = _d === void 0 ? "" : _d,
|
|
470
|
-
var
|
|
471
|
-
var
|
|
472
|
-
var
|
|
471
|
+
var id = _a.id, label = _a.label, _b = _a.required, required = _b === void 0 ? false : _b, _c = _a.error, error = _c === void 0 ? false : _c, _d = _a.errorText, errorText = _d === void 0 ? "" : _d, value = _a.value, onChange = _a.onChange, onBlur = _a.onBlur, _e = _a.disabled, disabled = _e === void 0 ? false : _e, _f = _a.name, name = _f === void 0 ? "phone" : _f, _g = _a.translations, translations = _g === void 0 ? {} : _g;
|
|
472
|
+
var _h = React.useState(false), isDropdownOpen = _h[0], setIsDropdownOpen = _h[1];
|
|
473
|
+
var _j = React.useState(uniqueCountries[0]), selectedCountry = _j[0], setSelectedCountry = _j[1];
|
|
474
|
+
var _k = React.useState(""), inputValue = _k[0], setInputValue = _k[1];
|
|
473
475
|
var dropdownRef = React.useRef(null);
|
|
476
|
+
var portalDropdownRef = React.useRef(null);
|
|
477
|
+
var _l = React.useState({}), dropdownPosition = _l[0], setDropdownPosition = _l[1];
|
|
474
478
|
var _m = React.useState(uniqueCountries), filteredCountries = _m[0], setFilteredCountries = _m[1];
|
|
475
|
-
// Combinar traducciones por defecto con las proporcionadas
|
|
476
479
|
var t = __assign(__assign({}, defaultTranslations$2), translations);
|
|
477
|
-
// Usar la etiqueta de las traducciones si no se proporciona label explícitamente
|
|
478
480
|
var finalLabel = label || t.label;
|
|
479
|
-
// Sincroniza valor externo
|
|
480
481
|
React.useEffect(function () {
|
|
481
482
|
if (value) {
|
|
482
|
-
|
|
483
|
-
var found = uniqueCountries.find(function (c) { return value.startsWith(c.code); });
|
|
483
|
+
var found = uniqueCountries.find(function (c) { return c.code === value.countryCode; });
|
|
484
484
|
if (found) {
|
|
485
485
|
setSelectedCountry(found);
|
|
486
|
-
setInputValue(value.replace(found.code, "").trim());
|
|
487
|
-
}
|
|
488
|
-
else {
|
|
489
|
-
setInputValue(value);
|
|
490
486
|
}
|
|
487
|
+
setInputValue(value.phoneNumber);
|
|
491
488
|
}
|
|
492
489
|
}, [value]);
|
|
493
|
-
// Open dropdown: reset filteredCountries
|
|
494
490
|
React.useEffect(function () {
|
|
495
491
|
if (isDropdownOpen) {
|
|
496
492
|
setFilteredCountries(uniqueCountries);
|
|
497
493
|
}
|
|
498
494
|
}, [isDropdownOpen]);
|
|
499
|
-
|
|
495
|
+
React.useLayoutEffect(function () {
|
|
496
|
+
if (isDropdownOpen && dropdownRef.current) {
|
|
497
|
+
var rect = dropdownRef.current.getBoundingClientRect();
|
|
498
|
+
setDropdownPosition({
|
|
499
|
+
position: "absolute",
|
|
500
|
+
top: "".concat(rect.bottom + window.scrollY + 4, "px"),
|
|
501
|
+
left: "".concat(rect.left + window.scrollX, "px"),
|
|
502
|
+
width: "15rem",
|
|
503
|
+
zIndex: 50,
|
|
504
|
+
});
|
|
505
|
+
}
|
|
506
|
+
}, [isDropdownOpen]);
|
|
500
507
|
React.useEffect(function () {
|
|
501
508
|
var handleClickOutside = function (event) {
|
|
502
509
|
if (dropdownRef.current &&
|
|
503
|
-
!dropdownRef.current.contains(event.target)
|
|
510
|
+
!dropdownRef.current.contains(event.target) &&
|
|
511
|
+
portalDropdownRef.current &&
|
|
512
|
+
!portalDropdownRef.current.contains(event.target)) {
|
|
504
513
|
setIsDropdownOpen(false);
|
|
505
514
|
}
|
|
506
515
|
};
|
|
@@ -515,31 +524,27 @@ var Phone = function (_a) {
|
|
|
515
524
|
setSelectedCountry(country);
|
|
516
525
|
setIsDropdownOpen(false);
|
|
517
526
|
if (onChange) {
|
|
518
|
-
onChange(country.code
|
|
527
|
+
onChange({ countryCode: country.code, phoneNumber: inputValue });
|
|
519
528
|
}
|
|
520
529
|
};
|
|
521
530
|
var handleInputChange = function (e) {
|
|
522
|
-
// Solo números
|
|
523
531
|
var val = e.target.value.replace(/\D/g, "");
|
|
524
532
|
setInputValue(val);
|
|
525
533
|
if (onChange) {
|
|
526
|
-
onChange(selectedCountry.code
|
|
534
|
+
onChange({ countryCode: selectedCountry.code, phoneNumber: val });
|
|
527
535
|
}
|
|
528
536
|
};
|
|
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-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
} }) }), jsxRuntime.jsx("div", { className: "max-h-60 overflow-y-auto", children: filteredCountries.length > 0 ? (filteredCountries.map(function (country) { return (jsxRuntime.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
|
|
541
|
-
? "bg-blue-50 dark:bg-blue-900"
|
|
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 }))] }));
|
|
537
|
+
return (jsxRuntime.jsxs("div", { className: "flex flex-col gap-1 w-full relative", id: id, children: [finalLabel && (jsxRuntime.jsxs("label", { htmlFor: "phone-input-".concat(name), className: "text-tiny text-default-500 mb-1", children: [finalLabel, " ", required && jsxRuntime.jsx("span", { className: "text-danger-500", children: "*" })] })), jsxRuntime.jsxs("div", { className: "flex items-center w-full min-h-[56px] transition-colors shadow-sm border-medium border-default-200 rounded-xl focus-within:border-primary-500 dark:focus-within:border-primary-500 ".concat(error ? "border-danger-500 " : "border-default-200").concat(disabled ? "opacity-60" : ""), children: [jsxRuntime.jsx("div", { className: "relative ml-2", ref: dropdownRef, children: jsxRuntime.jsxs("button", { type: "button", className: "flex items-center gap-1 px-4 h-10 rounded-xl bg-default-100 focus:outline-none transition-colors", onClick: function () { return setIsDropdownOpen(function (v) { return !v; }); }, disabled: disabled, tabIndex: 0, "aria-label": t.selectCountryAriaLabel, children: [jsxRuntime.jsx("span", { className: "text-lg", children: selectedCountry.flag }), jsxRuntime.jsx("span", { className: "text-xs text-default-500", children: selectedCountry.code }), jsxRuntime.jsxs("svg", { className: "w-4 h-4 text-default-500 ml-1", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", role: "img", "aria-label": t.expandListAriaLabel, children: [jsxRuntime.jsx("title", { children: t.expandListAriaLabel }), jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" })] })] }) }), jsxRuntime.jsx(react.Input, { type: "tel", className: "flex-1 border-none bg-transparent text-default-500 placeholder-default-500 px-2", placeholder: t.placeholder, value: inputValue, onChange: handleInputChange, onBlur: onBlur, disabled: disabled, name: name, autoComplete: "tel", id: "phone-input-".concat(name) })] }), error && errorText && (jsxRuntime.jsx("span", { className: "text-xs text-danger-500 mt-1", children: errorText })), isDropdownOpen &&
|
|
538
|
+
reactDom.createPortal(jsxRuntime.jsxs("div", { ref: portalDropdownRef, style: dropdownPosition, className: "bg-content1 border border-default-200 rounded-lg shadow-lg z-50", children: [jsxRuntime.jsx("div", { className: "p-2", children: jsxRuntime.jsx("input", { type: "text", className: "w-full px-3 py-2 text-sm bg-default-100 border-medium border-default-200 text-default-500 rounded-lg focus:outline-none focus:border-primary-500", placeholder: t.searchPlaceholder, onChange: function (e) {
|
|
539
|
+
var searchTerm = e.target.value.toLowerCase();
|
|
540
|
+
var filtered = uniqueCountries.filter(function (country) {
|
|
541
|
+
return country.name.toLowerCase().includes(searchTerm) ||
|
|
542
|
+
country.code.toLowerCase().includes(searchTerm);
|
|
543
|
+
});
|
|
544
|
+
setFilteredCountries(filtered);
|
|
545
|
+
} }) }), jsxRuntime.jsx("div", { className: "max-h-60 overflow-y-auto", children: filteredCountries.length > 0 ? (filteredCountries.map(function (country) { return (jsxRuntime.jsxs("button", { type: "button", className: "flex items-center w-full px-4 py-2.5 text-sm hover:bg-default-200 ".concat(country.code === selectedCountry.code
|
|
546
|
+
? "bg-primary-50"
|
|
547
|
+
: ""), 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 text-default-500", children: country.name }), jsxRuntime.jsx("span", { className: "text-xs text-default-500", children: country.code })] }, country.code)); })) : (jsxRuntime.jsx("div", { className: "px-4 py-2 text-sm text-default-500", children: t.noCountriesFound })) })] }), document.body)] }));
|
|
543
548
|
};
|
|
544
549
|
|
|
545
550
|
/**
|
|
@@ -895,7 +900,9 @@ var ThemePicker = function (_a) {
|
|
|
895
900
|
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" })] })),
|
|
896
901
|
},
|
|
897
902
|
];
|
|
898
|
-
return (jsxRuntime.jsx(react.RadioGroup, { value: value, onChange: function (e) { return onChange(e.target.value); }, className: "flex
|
|
903
|
+
return (jsxRuntime.jsx(react.RadioGroup, { value: value, onChange: function (e) { return onChange(e.target.value); }, className: "flex justify-center ".concat(className || ""), orientation: "horizontal", classNames: {
|
|
904
|
+
wrapper: "gap-3",
|
|
905
|
+
}, children: themes.map(function (theme) { return (jsxRuntime.jsxs("div", { className: "relative rounded-2xl ".concat(theme.cardClass, " p-4 flex-1 transition-all duration-200 flex flex-col justify-start"), children: [jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [jsxRuntime.jsx("span", { className: theme.labelClass, children: theme.label }), jsxRuntime.jsx(react.Radio, { "aria-label": theme.label, color: theme.radioColor, size: "sm", value: theme.key })] }), theme.previewContent] }, theme.key)); }) }));
|
|
899
906
|
};
|
|
900
907
|
|
|
901
908
|
var ConfigMenu = function (_a) {
|
|
@@ -1440,38 +1447,40 @@ var Pagination = function (_a) {
|
|
|
1440
1447
|
return jsxRuntime.jsx(react.Pagination, __assign({ showControls: true, isCompact: true }, props));
|
|
1441
1448
|
};
|
|
1442
1449
|
|
|
1443
|
-
var
|
|
1444
|
-
|
|
1450
|
+
var H2 = function (_a) {
|
|
1451
|
+
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
|
1452
|
+
return (jsxRuntime.jsx("h2", __assign({ className: react.cn("text-lg font-medium", className) }, props, { children: children })));
|
|
1445
1453
|
};
|
|
1446
1454
|
|
|
1447
|
-
var
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
var ModalBody = react.ModalBody;
|
|
1455
|
+
var H3 = function (_a) {
|
|
1456
|
+
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
|
1457
|
+
return (jsxRuntime.jsx("h3", __assign({ className: react.cn("text-base font-medium mb-1", className) }, props, { children: children })));
|
|
1458
|
+
};
|
|
1452
1459
|
|
|
1453
|
-
var
|
|
1460
|
+
var H4 = function (_a) {
|
|
1461
|
+
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
|
1462
|
+
return (jsxRuntime.jsx("h4", __assign({ className: react.cn("text-sm font-medium mb-1", className) }, props, { children: children })));
|
|
1463
|
+
};
|
|
1454
1464
|
|
|
1455
|
-
var
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
lg: "p-8",
|
|
1465
|
+
var P = function (_a) {
|
|
1466
|
+
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
|
1467
|
+
return (jsxRuntime.jsx("p", __assign({ className: react.cn("text-sm text-default-500", className) }, props, { children: children })));
|
|
1459
1468
|
};
|
|
1460
1469
|
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
var
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
return
|
|
1470
|
+
var ThemeContext = React.createContext({
|
|
1471
|
+
mode: "light",
|
|
1472
|
+
color: "blue",
|
|
1473
|
+
// biome-ignore lint/suspicious/noEmptyBlockStatements: <explanation>
|
|
1474
|
+
setMode: function () { },
|
|
1475
|
+
// biome-ignore lint/suspicious/noEmptyBlockStatements: <explanation>
|
|
1476
|
+
setColor: function () { },
|
|
1477
|
+
});
|
|
1478
|
+
var useThemeContext = function () {
|
|
1479
|
+
var context = React.useContext(ThemeContext);
|
|
1480
|
+
if (!context) {
|
|
1481
|
+
throw new Error("useThemeContext debe ser usado dentro de un ThemeProvider");
|
|
1482
|
+
}
|
|
1483
|
+
return context;
|
|
1475
1484
|
};
|
|
1476
1485
|
|
|
1477
1486
|
var themeColors = {
|
|
@@ -1964,20 +1973,74 @@ var themeColors = {
|
|
|
1964
1973
|
},
|
|
1965
1974
|
};
|
|
1966
1975
|
|
|
1967
|
-
var
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1976
|
+
var ColorSelector = function (_a) {
|
|
1977
|
+
var selectedColor = _a.selectedColor, onColorChange = _a.onColorChange;
|
|
1978
|
+
var mode = useThemeContext().mode;
|
|
1979
|
+
/**
|
|
1980
|
+
* Filters and maps the available theme colors to the current theme mode (light/dark).
|
|
1981
|
+
* Each color option contains:
|
|
1982
|
+
* - value: the theme name (e.g., "blue-light")
|
|
1983
|
+
* - label: the base color name (e.g., "blue")
|
|
1984
|
+
* - color: the primary color hex value
|
|
1985
|
+
*/
|
|
1986
|
+
var colorOptions = Object.entries(themeColors)
|
|
1987
|
+
.filter(function (_a) {
|
|
1988
|
+
var themeData = _a[1];
|
|
1989
|
+
var themeMode = themeData.extend;
|
|
1990
|
+
return mode === "light" ? themeMode === "light" : themeMode === "dark";
|
|
1991
|
+
})
|
|
1992
|
+
.map(function (_a) {
|
|
1993
|
+
var themeName = _a[0], theme = _a[1];
|
|
1994
|
+
return ({
|
|
1995
|
+
value: themeName,
|
|
1996
|
+
label: themeName.split("-")[0],
|
|
1997
|
+
color: theme.colors.primary.DEFAULT,
|
|
1998
|
+
});
|
|
1999
|
+
});
|
|
2000
|
+
return (jsxRuntime.jsx(react.RadioGroup, { value: selectedColor, onValueChange: onColorChange, orientation: "horizontal", className: "flex flex-wrap !gap-2", classNames: {
|
|
2001
|
+
base: "flex flex-wrap !gap-2",
|
|
2002
|
+
wrapper: "flex flex-wrap !gap-2",
|
|
2003
|
+
}, children: colorOptions.map(function (color) { return (jsxRuntime.jsx(react.Radio, { value: color.label, className: "p-0 m-0", classNames: {
|
|
2004
|
+
base: "p-0 m-0",
|
|
2005
|
+
wrapper: "hidden",
|
|
2006
|
+
labelWrapper: "p-0 m-0",
|
|
2007
|
+
}, children: jsxRuntime.jsx("div", { className: "w-8 h-8 rounded-full border-2 cursor-pointer transition-all ".concat(selectedColor === color.label
|
|
2008
|
+
? "border-black border-opacity-20 scale-110"
|
|
2009
|
+
: "border-gray-200 hover:scale-105"), style: { backgroundColor: color.color }, title: color.label }) }, color.value)); }) }));
|
|
2010
|
+
};
|
|
2011
|
+
|
|
2012
|
+
var Modal = function (props) {
|
|
2013
|
+
return (jsxRuntime.jsx(react.Modal, __assign({ shouldBlockScroll: true, radius: "lg", className: "py-9 px-6" }, props)));
|
|
2014
|
+
};
|
|
2015
|
+
|
|
2016
|
+
var ModalContent = react.ModalContent;
|
|
2017
|
+
|
|
2018
|
+
var ModalHeader = react.ModalHeader;
|
|
2019
|
+
|
|
2020
|
+
var ModalBody = react.ModalBody;
|
|
2021
|
+
|
|
2022
|
+
var ModalFooter = react.ModalFooter;
|
|
2023
|
+
|
|
2024
|
+
var paddingClasses = {
|
|
2025
|
+
sm: "p-4",
|
|
2026
|
+
md: "p-6",
|
|
2027
|
+
lg: "p-8",
|
|
2028
|
+
};
|
|
2029
|
+
|
|
2030
|
+
/**
|
|
2031
|
+
* Card genérica siguiendo las reglas de diseño BeweOS basada en HeroUI.
|
|
2032
|
+
*
|
|
2033
|
+
* Reglas aplicadas:
|
|
2034
|
+
* - Shadow: none, sm, md, lg (configurable)
|
|
2035
|
+
* - Radius: sm (por defecto, configurable)
|
|
2036
|
+
* - Padding configurable (sm, md, lg)
|
|
2037
|
+
* - Hereda de HeroUI Card con personalización BeweOS
|
|
2038
|
+
*/
|
|
2039
|
+
var Card = function (_a) {
|
|
2040
|
+
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"]);
|
|
2041
|
+
var paddingClass = paddingClasses[padding];
|
|
2042
|
+
var combinedClassName = [paddingClass, className].filter(Boolean).join(" ");
|
|
2043
|
+
return (jsxRuntime.jsx(react.Card, __assign({ shadow: shadow, radius: radius, className: combinedClassName }, props, { children: children })));
|
|
1981
2044
|
};
|
|
1982
2045
|
|
|
1983
2046
|
/**
|
|
@@ -2097,9 +2160,13 @@ exports.AuraToastProvider = AuraToastProvider;
|
|
|
2097
2160
|
exports.AutoComplete = AutoComplete;
|
|
2098
2161
|
exports.Button = Button;
|
|
2099
2162
|
exports.Card = Card;
|
|
2163
|
+
exports.ColorSelector = ColorSelector;
|
|
2100
2164
|
exports.DatePicker = DatePicker;
|
|
2101
2165
|
exports.DateRangePicker = DateRangePicker;
|
|
2102
2166
|
exports.GlobalToast = GlobalToast;
|
|
2167
|
+
exports.H2 = H2;
|
|
2168
|
+
exports.H3 = H3;
|
|
2169
|
+
exports.H4 = H4;
|
|
2103
2170
|
exports.HeaderComponent = HeaderComponent;
|
|
2104
2171
|
exports.IconComponent = IconComponent;
|
|
2105
2172
|
exports.Input = Input;
|
|
@@ -2109,6 +2176,7 @@ exports.ModalBody = ModalBody;
|
|
|
2109
2176
|
exports.ModalContent = ModalContent;
|
|
2110
2177
|
exports.ModalFooter = ModalFooter;
|
|
2111
2178
|
exports.ModalHeader = ModalHeader;
|
|
2179
|
+
exports.P = P;
|
|
2112
2180
|
exports.Pagination = Pagination;
|
|
2113
2181
|
exports.Phone = Phone;
|
|
2114
2182
|
exports.ScheduleRow = ScheduleRow;
|