@beweco/aurora-ui 0.1.59 → 0.1.61
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 +368 -9
- package/dist/index.esm.js +359 -10
- package/dist/types/components/input-password/InputPassword.d.ts +3 -0
- package/dist/types/components/input-password/InputPassword.d.ts.map +1 -0
- package/dist/types/components/input-password/InputPassword.types.d.ts +19 -0
- package/dist/types/components/input-password/InputPassword.types.d.ts.map +1 -0
- package/dist/types/components/input-password/index.d.ts +3 -0
- package/dist/types/components/input-password/index.d.ts.map +1 -0
- package/dist/types/components/menu/Menu.d.ts.map +1 -1
- package/dist/types/components/menu/Menu.types.d.ts +4 -0
- package/dist/types/components/menu/Menu.types.d.ts.map +1 -1
- package/dist/types/contexts/theme/theme-context.d.ts.map +1 -1
- package/dist/types/contexts/theme/theme-context.type.d.ts +2 -1
- package/dist/types/contexts/theme/theme-context.type.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/providers/theme/apply-custom-color.d.ts +4 -0
- package/dist/types/providers/theme/apply-custom-color.d.ts.map +1 -0
- package/dist/types/providers/theme/generate-color-scale.d.ts +10 -0
- package/dist/types/providers/theme/generate-color-scale.d.ts.map +1 -0
- package/dist/types/providers/theme/hex-to-theme-color.d.ts +6 -0
- package/dist/types/providers/theme/hex-to-theme-color.d.ts.map +1 -0
- package/dist/types/providers/theme/index.d.ts +3 -0
- package/dist/types/providers/theme/index.d.ts.map +1 -1
- package/dist/types/providers/theme/theme-provider.d.ts.map +1 -1
- package/dist/types/providers/theme/useThemeManager.d.ts +4 -2
- package/dist/types/providers/theme/useThemeManager.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -786,6 +786,7 @@ ColorPicker.displayName = "ColorPicker";
|
|
|
786
786
|
var ThemeContext = createContext({
|
|
787
787
|
mode: "light",
|
|
788
788
|
color: "blue",
|
|
789
|
+
customHex: null,
|
|
789
790
|
// biome-ignore lint/suspicious/noEmptyBlockStatements: <explanation>
|
|
790
791
|
setMode: function () { },
|
|
791
792
|
// biome-ignore lint/suspicious/noEmptyBlockStatements: <explanation>
|
|
@@ -2191,6 +2192,8 @@ var DEFAULT_TRANSLATIONS$3 = {
|
|
|
2191
2192
|
mobileNavAriaLabel: "Navegación móvil",
|
|
2192
2193
|
logoAlt: "Logo de",
|
|
2193
2194
|
notDefinedLabel: "no definido",
|
|
2195
|
+
scrollUpAriaLabel: "Subir menú",
|
|
2196
|
+
scrollDownAriaLabel: "Bajar menú",
|
|
2194
2197
|
};
|
|
2195
2198
|
/**
|
|
2196
2199
|
* Sidebar menu component for navigation and user actions.
|
|
@@ -2264,13 +2267,115 @@ var MenuComponent = React.memo(function Menu(_a) {
|
|
|
2264
2267
|
(_a = menuItems.onSelect) === null || _a === void 0 ? void 0 : _a.call(menuItems, key, href, "bottomBar");
|
|
2265
2268
|
}, [onOpenSidebarChange, menuItems.onSelect]);
|
|
2266
2269
|
var showBottomBar = (mobileBottomBarGroupKey && bottomBarItems.length > 0) || showNativeMenu;
|
|
2270
|
+
// Drag-to-scroll: clic sostenido + arrastre en el área de scroll del menú
|
|
2271
|
+
var scrollContainerRef = useRef(null);
|
|
2272
|
+
var dragStateRef = useRef({ startY: 0, startScrollTop: 0, isDragging: false, prevClientY: 0 });
|
|
2273
|
+
var _h = React.useState(false), isDraggingScroll = _h[0], setIsDraggingScroll = _h[1];
|
|
2274
|
+
var handleScrollAreaMouseMove = useCallback(function (e) {
|
|
2275
|
+
var el = scrollContainerRef.current;
|
|
2276
|
+
if (!el)
|
|
2277
|
+
return;
|
|
2278
|
+
var state = dragStateRef.current;
|
|
2279
|
+
var dy = e.clientY - state.startY;
|
|
2280
|
+
if (!state.isDragging && Math.abs(dy) > 5) {
|
|
2281
|
+
state.isDragging = true;
|
|
2282
|
+
state.prevClientY = e.clientY;
|
|
2283
|
+
setIsDraggingScroll(true);
|
|
2284
|
+
}
|
|
2285
|
+
if (state.isDragging) {
|
|
2286
|
+
el.scrollTop += state.prevClientY - e.clientY;
|
|
2287
|
+
state.prevClientY = e.clientY;
|
|
2288
|
+
}
|
|
2289
|
+
}, []);
|
|
2290
|
+
var handleScrollAreaMouseUp = useCallback(function () {
|
|
2291
|
+
var wasDragging = dragStateRef.current.isDragging;
|
|
2292
|
+
document.removeEventListener("mousemove", handleScrollAreaMouseMove);
|
|
2293
|
+
document.removeEventListener("mouseup", handleScrollAreaMouseUp);
|
|
2294
|
+
dragStateRef.current.isDragging = false;
|
|
2295
|
+
setIsDraggingScroll(false);
|
|
2296
|
+
if (wasDragging) {
|
|
2297
|
+
var preventClick_1 = function (e) {
|
|
2298
|
+
e.preventDefault();
|
|
2299
|
+
e.stopPropagation();
|
|
2300
|
+
document.removeEventListener("click", preventClick_1, true);
|
|
2301
|
+
};
|
|
2302
|
+
document.addEventListener("click", preventClick_1, true);
|
|
2303
|
+
setTimeout(function () { return document.removeEventListener("click", preventClick_1, true); }, 50);
|
|
2304
|
+
}
|
|
2305
|
+
}, [handleScrollAreaMouseMove]);
|
|
2306
|
+
var handleScrollAreaMouseDown = useCallback(function (e) {
|
|
2307
|
+
if (e.button !== 0)
|
|
2308
|
+
return;
|
|
2309
|
+
var el = scrollContainerRef.current;
|
|
2310
|
+
if (!el)
|
|
2311
|
+
return;
|
|
2312
|
+
dragStateRef.current = {
|
|
2313
|
+
startY: e.clientY,
|
|
2314
|
+
startScrollTop: el.scrollTop,
|
|
2315
|
+
isDragging: false,
|
|
2316
|
+
prevClientY: e.clientY,
|
|
2317
|
+
};
|
|
2318
|
+
document.addEventListener("mousemove", handleScrollAreaMouseMove);
|
|
2319
|
+
document.addEventListener("mouseup", handleScrollAreaMouseUp);
|
|
2320
|
+
}, [handleScrollAreaMouseMove, handleScrollAreaMouseUp]);
|
|
2321
|
+
useEffect(function () {
|
|
2322
|
+
return function () {
|
|
2323
|
+
document.removeEventListener("mousemove", handleScrollAreaMouseMove);
|
|
2324
|
+
document.removeEventListener("mouseup", handleScrollAreaMouseUp);
|
|
2325
|
+
};
|
|
2326
|
+
}, [handleScrollAreaMouseMove, handleScrollAreaMouseUp]);
|
|
2327
|
+
// Indicadores de scroll: flechas arriba/abajo cuando el contenido requiere scroll
|
|
2328
|
+
var _j = React.useState({
|
|
2329
|
+
canScrollUp: false,
|
|
2330
|
+
canScrollDown: false,
|
|
2331
|
+
}), scrollState = _j[0], setScrollState = _j[1];
|
|
2332
|
+
var SCROLL_STEP_PX = 120;
|
|
2333
|
+
var updateScrollIndicators = useCallback(function () {
|
|
2334
|
+
var el = scrollContainerRef.current;
|
|
2335
|
+
if (!el)
|
|
2336
|
+
return;
|
|
2337
|
+
var scrollTop = el.scrollTop, scrollHeight = el.scrollHeight, clientHeight = el.clientHeight;
|
|
2338
|
+
var canScrollUp = scrollTop > 2;
|
|
2339
|
+
var canScrollDown = scrollTop < scrollHeight - clientHeight - 2;
|
|
2340
|
+
setScrollState(function (prev) {
|
|
2341
|
+
return prev.canScrollUp !== canScrollUp || prev.canScrollDown !== canScrollDown
|
|
2342
|
+
? { canScrollUp: canScrollUp, canScrollDown: canScrollDown }
|
|
2343
|
+
: prev;
|
|
2344
|
+
});
|
|
2345
|
+
}, []);
|
|
2346
|
+
useEffect(function () {
|
|
2347
|
+
var el = scrollContainerRef.current;
|
|
2348
|
+
if (!el)
|
|
2349
|
+
return;
|
|
2350
|
+
updateScrollIndicators();
|
|
2351
|
+
var ro = new ResizeObserver(updateScrollIndicators);
|
|
2352
|
+
ro.observe(el);
|
|
2353
|
+
el.addEventListener("scroll", updateScrollIndicators);
|
|
2354
|
+
return function () {
|
|
2355
|
+
ro.disconnect();
|
|
2356
|
+
el.removeEventListener("scroll", updateScrollIndicators);
|
|
2357
|
+
};
|
|
2358
|
+
}, [updateScrollIndicators, menuItems.items, isCollapsed]);
|
|
2359
|
+
var handleScrollUp = useCallback(function () {
|
|
2360
|
+
var el = scrollContainerRef.current;
|
|
2361
|
+
if (!el)
|
|
2362
|
+
return;
|
|
2363
|
+
el.scrollBy({ top: -SCROLL_STEP_PX, behavior: "smooth" });
|
|
2364
|
+
}, []);
|
|
2365
|
+
var handleScrollDown = useCallback(function () {
|
|
2366
|
+
var el = scrollContainerRef.current;
|
|
2367
|
+
if (!el)
|
|
2368
|
+
return;
|
|
2369
|
+
el.scrollBy({ top: SCROLL_STEP_PX, behavior: "smooth" });
|
|
2370
|
+
}, []);
|
|
2371
|
+
var showScrollArrows = scrollState.canScrollUp || scrollState.canScrollDown;
|
|
2267
2372
|
return (jsxs(Fragment, { children: [showBottomBar && (jsx(MenuMobileBottomBar, { items: bottomBarItems, selectedKey: selectedKey, onSelect: handleBottomBarSelect, onMenuPress: handleSidebarOpen, menuLabel: t.menuLabel, navAriaLabel: t.mobileNavAriaLabel, forceVisible: showNativeMenu && bottomBarItems.length === 0 })), jsx("button", { type: "button", "aria-label": t.closeSidebarAriaLabel, className: "menu-overlay ".concat(isOpenSidebar ? "menu-overlay--open" : ""), onClick: handleSidebarClose, tabIndex: isOpenSidebar ? 0 : -1 }), jsx("div", { className: "container__menu ".concat(isCollapsed
|
|
2268
2373
|
? "container__menu--collapsed"
|
|
2269
2374
|
: "container__menu--expanded", " ").concat(isOpenSidebar ? "container__menu--mobile-open" : ""), "aria-hidden": !isOpenSidebar, children: jsxs("div", { className: "content__menu", children: [jsxs("div", { className: "content__menu--header", style: {
|
|
2270
2375
|
flexDirection: isCollapsed ? "column-reverse" : "row",
|
|
2271
2376
|
}, 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 shrink-0 items-center justify-center overflow-hidden rounded-full bg-foreground text-background", children: hasValidLogo ? (jsx("img", { src: commerceInfo.logo, alt: "".concat(t.logoAlt, " ").concat(commerceName), className: "h-full w-full object-cover", onError: function () { return setLogoError(true); } })) : (jsx(IconComponent, { icon: "solar:buildings-2-outline", size: "sm", className: "shrink-0", "aria-hidden": true })) }), jsx("span", { className: "collapsible-item text-small font-bold truncate min-w-0", children: commerceName })] }), 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
|
|
2272
2377
|
? "solar:alt-arrow-right-outline"
|
|
2273
|
-
: "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: ((_b = userInfo === null || userInfo === void 0 ? void 0 : userInfo.avatar) === null || _b === void 0 ? void 0 : _b.trim()) || undefined, color: !((_c = userInfo === null || userInfo === void 0 ? void 0 : userInfo.avatar) === null || _c === void 0 ? void 0 : _c.trim()) ? "warning" : "default", name: userName, className: "shrink-0" }), jsxs("div", { className: "collapsible-item flex min-w-0 flex-col overflow-hidden", children: [jsx("p", { className: "text-small font-medium text-default-900 truncate", children: userName }), jsx("p", { className: "text-tiny text-default-400 truncate", children: userRole })] })] }),
|
|
2378
|
+
: "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: ((_b = userInfo === null || userInfo === void 0 ? void 0 : userInfo.avatar) === null || _b === void 0 ? void 0 : _b.trim()) || undefined, color: !((_c = userInfo === null || userInfo === void 0 ? void 0 : userInfo.avatar) === null || _c === void 0 ? void 0 : _c.trim()) ? "warning" : "default", name: userName, className: "shrink-0" }), jsxs("div", { className: "collapsible-item flex min-w-0 flex-col overflow-hidden", children: [jsx("p", { className: "text-small font-medium text-default-900 truncate", children: userName }), jsx("p", { className: "text-tiny text-default-400 truncate", children: userRole })] })] }), jsxs("div", { className: "".concat(!isCollapsed ? "flex-1" : "h-full", " min-h-0 py-6 relative"), children: [!isCollapsed && showScrollArrows && (jsxs(Fragment, { children: [scrollState.canScrollUp && (jsx("button", { type: "button", "aria-label": t.scrollUpAriaLabel, className: "menu-scroll-arrow menu-scroll-arrow--up", onClick: handleScrollUp, children: jsx(IconComponent, { icon: "solar:alt-arrow-up-outline", size: "lg", "aria-hidden": true }) })), scrollState.canScrollDown && (jsx("button", { type: "button", "aria-label": t.scrollDownAriaLabel, className: "menu-scroll-arrow menu-scroll-arrow--down", onClick: handleScrollDown, children: jsx(IconComponent, { icon: "solar:alt-arrow-down-outline", size: "lg", "aria-hidden": true }) }))] })), jsx("div", { ref: scrollContainerRef, className: "h-full overflow-y-auto pr-6 -mr-6 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none] select-none ".concat(isDraggingScroll ? "cursor-grabbing" : ""), onMouseDown: handleScrollAreaMouseDown, children: jsx(MenuNavList, { defaultSelectedKey: selectedKey, items: menuItems.items, isCollapsed: isCollapsed, onSelect: handleMenuSelect }, selectedKey) })] }), 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 truncate", children: helpTitle })) }) })] }) })] }));
|
|
2274
2379
|
});
|
|
2275
2380
|
|
|
2276
2381
|
var StepIndicator = function (_a) {
|
|
@@ -3859,7 +3964,7 @@ var ORB_SIZES = {
|
|
|
3859
3964
|
xl: 192,
|
|
3860
3965
|
};
|
|
3861
3966
|
|
|
3862
|
-
var isHexColor = function (value) {
|
|
3967
|
+
var isHexColor$1 = function (value) {
|
|
3863
3968
|
var normalized = value.startsWith("#") ? value.slice(1) : value;
|
|
3864
3969
|
return /^[0-9A-Fa-f]{3}$|^[0-9A-Fa-f]{6}$/.test(normalized);
|
|
3865
3970
|
};
|
|
@@ -3877,7 +3982,7 @@ var hexToRgba = function (hexColor, alpha) {
|
|
|
3877
3982
|
return "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(alpha, ")");
|
|
3878
3983
|
};
|
|
3879
3984
|
var colorWithAlpha = function (color, alpha) {
|
|
3880
|
-
if (isHexColor(color)) {
|
|
3985
|
+
if (isHexColor$1(color)) {
|
|
3881
3986
|
var normalized = color.startsWith("#") ? color : "#".concat(color);
|
|
3882
3987
|
return hexToRgba(normalized, alpha);
|
|
3883
3988
|
}
|
|
@@ -5568,6 +5673,27 @@ var DrawerFilters = function (_a) {
|
|
|
5568
5673
|
};
|
|
5569
5674
|
DrawerFilters.displayName = "DrawerFilters";
|
|
5570
5675
|
|
|
5676
|
+
var InputPassword = function (_a) {
|
|
5677
|
+
var _b, _c;
|
|
5678
|
+
var translations = _a.translations, _d = _a.showCriteria, showCriteria = _d === void 0 ? false : _d, criteria = _a.criteria, _e = _a.isPristine, isPristine = _e === void 0 ? true : _e, renderCriterionLabel = _a.renderCriterionLabel, _f = _a.criteriaId, criteriaId = _f === void 0 ? "password-criteria" : _f, inputProps = __rest(_a, ["translations", "showCriteria", "criteria", "isPristine", "renderCriterionLabel", "criteriaId"]);
|
|
5679
|
+
var _g = useState(false), showPassword = _g[0], setShowPassword = _g[1];
|
|
5680
|
+
var togglePasswordVisibility = function () {
|
|
5681
|
+
setShowPassword(function (prev) { return !prev; });
|
|
5682
|
+
};
|
|
5683
|
+
var showLabel = (_b = translations === null || translations === void 0 ? void 0 : translations.showPassword) !== null && _b !== void 0 ? _b : "Show password";
|
|
5684
|
+
var hideLabel = (_c = translations === null || translations === void 0 ? void 0 : translations.hidePassword) !== null && _c !== void 0 ? _c : "Hide password";
|
|
5685
|
+
return (jsxs("div", { className: "flex flex-col w-full", children: [jsx(Input, __assign({}, inputProps, { type: showPassword ? "text" : "password", "aria-describedby": showCriteria ? criteriaId : inputProps["aria-describedby"], endContent: jsx("button", { type: "button", tabIndex: -1, onClick: togglePasswordVisibility, className: "focus:outline-none", "aria-label": showPassword ? hideLabel : showLabel, children: showPassword ? (jsx(IconComponent, { icon: "lucide:eye-off", color: "gray" })) : (jsx(IconComponent, { icon: "lucide:eye", color: "gray" })) }) })), showCriteria && criteria && criteria.length > 0 && (jsx("fieldset", { id: criteriaId, className: "mt-2", children: jsx("ul", { className: "flex flex-col gap-2 list-none", children: criteria.map(function (criterion, idx) {
|
|
5686
|
+
var colorClass = criterion.passed
|
|
5687
|
+
? "text-success"
|
|
5688
|
+
: isPristine
|
|
5689
|
+
? "text-default-500"
|
|
5690
|
+
: "text-danger-500";
|
|
5691
|
+
return (jsxs("li", { className: "flex items-center gap-2 text-tiny w-full text-left ".concat(colorClass), "aria-label": "".concat(criterion.label, ": ").concat(criterion.passed ? "met" : "not met"), children: [criterion.passed ? (jsx(IconComponent, { icon: "ic:round-check", className: "text-success", "aria-hidden": "true" })) : (jsx(IconComponent, { icon: "solar:close-circle-linear", className: colorClass, "aria-hidden": "true" })), renderCriterionLabel
|
|
5692
|
+
? renderCriterionLabel(criterion.label)
|
|
5693
|
+
: criterion.label] }, "".concat(criteriaId, "-").concat(idx)));
|
|
5694
|
+
}) }) }))] }));
|
|
5695
|
+
};
|
|
5696
|
+
|
|
5571
5697
|
var DEFAULT_TRANSLATIONS = {
|
|
5572
5698
|
placeholder: "Nombre de la etiqueta",
|
|
5573
5699
|
labelSelect: "Selecciona etiqueta",
|
|
@@ -5668,6 +5794,195 @@ var Card = function (_a) {
|
|
|
5668
5794
|
return (jsx(Card$1, __assign({ shadow: shadow, radius: radius, className: combinedClassName }, props, { children: children })));
|
|
5669
5795
|
};
|
|
5670
5796
|
|
|
5797
|
+
var THEME_COLOR_HEX_MAP = {
|
|
5798
|
+
blue: "#006fee",
|
|
5799
|
+
purple: "#7828c8",
|
|
5800
|
+
yellow: "#ffd505",
|
|
5801
|
+
green: "#16c964",
|
|
5802
|
+
coral: "#ff4f4f",
|
|
5803
|
+
};
|
|
5804
|
+
function hexToRgb$1(hex) {
|
|
5805
|
+
var clean = hex.replace("#", "");
|
|
5806
|
+
var normalized = clean.length === 3
|
|
5807
|
+
? clean
|
|
5808
|
+
.split("")
|
|
5809
|
+
.map(function (c) { return c + c; })
|
|
5810
|
+
.join("")
|
|
5811
|
+
: clean;
|
|
5812
|
+
return [
|
|
5813
|
+
Number.parseInt(normalized.slice(0, 2), 16),
|
|
5814
|
+
Number.parseInt(normalized.slice(2, 4), 16),
|
|
5815
|
+
Number.parseInt(normalized.slice(4, 6), 16),
|
|
5816
|
+
];
|
|
5817
|
+
}
|
|
5818
|
+
function colorDistance(a, b) {
|
|
5819
|
+
return Math.pow((a[0] - b[0]), 2) + Math.pow((a[1] - b[1]), 2) + Math.pow((a[2] - b[2]), 2);
|
|
5820
|
+
}
|
|
5821
|
+
var THEME_COLORS = Object.keys(THEME_COLOR_HEX_MAP);
|
|
5822
|
+
function isHexColor(value) {
|
|
5823
|
+
return /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(value);
|
|
5824
|
+
}
|
|
5825
|
+
function isExactThemeColor(hex) {
|
|
5826
|
+
var normalized = hex.toLowerCase();
|
|
5827
|
+
for (var _i = 0, THEME_COLORS_1 = THEME_COLORS; _i < THEME_COLORS_1.length; _i++) {
|
|
5828
|
+
var themeColor = THEME_COLORS_1[_i];
|
|
5829
|
+
if (THEME_COLOR_HEX_MAP[themeColor].toLowerCase() === normalized) {
|
|
5830
|
+
return themeColor;
|
|
5831
|
+
}
|
|
5832
|
+
}
|
|
5833
|
+
return null;
|
|
5834
|
+
}
|
|
5835
|
+
function hexToThemeColor(hex) {
|
|
5836
|
+
var targetRgb = hexToRgb$1(hex);
|
|
5837
|
+
var closest = "blue";
|
|
5838
|
+
var minDistance = Number.POSITIVE_INFINITY;
|
|
5839
|
+
for (var _i = 0, THEME_COLORS_2 = THEME_COLORS; _i < THEME_COLORS_2.length; _i++) {
|
|
5840
|
+
var themeColor = THEME_COLORS_2[_i];
|
|
5841
|
+
var themeRgb = hexToRgb$1(THEME_COLOR_HEX_MAP[themeColor]);
|
|
5842
|
+
var dist = colorDistance(targetRgb, themeRgb);
|
|
5843
|
+
if (dist < minDistance) {
|
|
5844
|
+
minDistance = dist;
|
|
5845
|
+
closest = themeColor;
|
|
5846
|
+
}
|
|
5847
|
+
}
|
|
5848
|
+
return closest;
|
|
5849
|
+
}
|
|
5850
|
+
|
|
5851
|
+
function hexToRgb(hex) {
|
|
5852
|
+
var clean = hex.replace("#", "");
|
|
5853
|
+
var normalized = clean.length === 3
|
|
5854
|
+
? clean
|
|
5855
|
+
.split("")
|
|
5856
|
+
.map(function (c) { return c + c; })
|
|
5857
|
+
.join("")
|
|
5858
|
+
: clean;
|
|
5859
|
+
return [
|
|
5860
|
+
Number.parseInt(normalized.slice(0, 2), 16),
|
|
5861
|
+
Number.parseInt(normalized.slice(2, 4), 16),
|
|
5862
|
+
Number.parseInt(normalized.slice(4, 6), 16),
|
|
5863
|
+
];
|
|
5864
|
+
}
|
|
5865
|
+
function rgbToHsl(r, g, b) {
|
|
5866
|
+
r /= 255;
|
|
5867
|
+
g /= 255;
|
|
5868
|
+
b /= 255;
|
|
5869
|
+
var max = Math.max(r, g, b);
|
|
5870
|
+
var min = Math.min(r, g, b);
|
|
5871
|
+
var l = (max + min) / 2;
|
|
5872
|
+
var h = 0;
|
|
5873
|
+
var s = 0;
|
|
5874
|
+
if (max !== min) {
|
|
5875
|
+
var d = max - min;
|
|
5876
|
+
s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
|
|
5877
|
+
switch (max) {
|
|
5878
|
+
case r:
|
|
5879
|
+
h = ((g - b) / d + (g < b ? 6 : 0)) / 6;
|
|
5880
|
+
break;
|
|
5881
|
+
case g:
|
|
5882
|
+
h = ((b - r) / d + 2) / 6;
|
|
5883
|
+
break;
|
|
5884
|
+
case b:
|
|
5885
|
+
h = ((r - g) / d + 4) / 6;
|
|
5886
|
+
break;
|
|
5887
|
+
}
|
|
5888
|
+
}
|
|
5889
|
+
return { h: h * 360, s: s * 100, l: l * 100 };
|
|
5890
|
+
}
|
|
5891
|
+
function hslToCssValue(h, s, l) {
|
|
5892
|
+
return "".concat(h, " ").concat(s, "% ").concat(l, "%");
|
|
5893
|
+
}
|
|
5894
|
+
function getContrastForeground(hex) {
|
|
5895
|
+
var _a = hexToRgb(hex), r = _a[0], g = _a[1], b = _a[2];
|
|
5896
|
+
var luminance = (0.2126 * r + 0.7152 * g + 0.0722 * b) / 255;
|
|
5897
|
+
return luminance > 0.5 ? "0 0% 0%" : "0 0% 100%";
|
|
5898
|
+
}
|
|
5899
|
+
var LIGHT_SHADE_LIGHTNESS = {
|
|
5900
|
+
"50": 95,
|
|
5901
|
+
"100": 90,
|
|
5902
|
+
"200": 82,
|
|
5903
|
+
"300": 72,
|
|
5904
|
+
"400": 60,
|
|
5905
|
+
};
|
|
5906
|
+
var DARK_SHADE_FACTORS = {
|
|
5907
|
+
"600": 0.83,
|
|
5908
|
+
"700": 0.67,
|
|
5909
|
+
"800": 0.50,
|
|
5910
|
+
"900": 0.33,
|
|
5911
|
+
};
|
|
5912
|
+
function generateLightScale(h, s, l) {
|
|
5913
|
+
var scale = {};
|
|
5914
|
+
for (var _i = 0, _a = Object.entries(LIGHT_SHADE_LIGHTNESS); _i < _a.length; _i++) {
|
|
5915
|
+
var _b = _a[_i], shade = _b[0], targetL = _b[1];
|
|
5916
|
+
var shadeL = l + (targetL - l) * ((targetL - l) / (95 - l));
|
|
5917
|
+
var clampedL = Math.min(Math.max(shadeL, 0), 100);
|
|
5918
|
+
var shadedS = Number(shade) <= 100 ? s * 0.92 : s;
|
|
5919
|
+
scale[shade] = hslToCssValue(h, Math.min(shadedS, 100), clampedL);
|
|
5920
|
+
}
|
|
5921
|
+
scale["500"] = hslToCssValue(h, s, l);
|
|
5922
|
+
for (var _c = 0, _d = Object.entries(DARK_SHADE_FACTORS); _c < _d.length; _c++) {
|
|
5923
|
+
var _e = _d[_c], shade = _e[0], factor = _e[1];
|
|
5924
|
+
var shadeL = l * factor;
|
|
5925
|
+
var shadedS = Number(shade) >= 800 ? s * 0.92 : s;
|
|
5926
|
+
scale[shade] = hslToCssValue(h, Math.min(shadedS, 100), Math.max(shadeL, 0));
|
|
5927
|
+
}
|
|
5928
|
+
return scale;
|
|
5929
|
+
}
|
|
5930
|
+
function reversScale(scale) {
|
|
5931
|
+
var shades = ["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"];
|
|
5932
|
+
var values = shades.map(function (s) { return scale[s]; });
|
|
5933
|
+
var reversed = {};
|
|
5934
|
+
for (var i = 0; i < shades.length; i++) {
|
|
5935
|
+
reversed[shades[i]] = values[shades.length - 1 - i];
|
|
5936
|
+
}
|
|
5937
|
+
return reversed;
|
|
5938
|
+
}
|
|
5939
|
+
function generateThemeColorScale(hex, mode) {
|
|
5940
|
+
var _a = hexToRgb(hex), r = _a[0], g = _a[1], b = _a[2];
|
|
5941
|
+
var _b = rgbToHsl(r, g, b), h = _b.h, s = _b.s, l = _b.l;
|
|
5942
|
+
var lightScale = generateLightScale(h, s, l);
|
|
5943
|
+
var shades = mode === "dark" ? reversScale(lightScale) : lightScale;
|
|
5944
|
+
var foreground = getContrastForeground(hex);
|
|
5945
|
+
var defaultValue = hslToCssValue(h, s, l);
|
|
5946
|
+
return { shades: shades, foreground: foreground, defaultValue: defaultValue };
|
|
5947
|
+
}
|
|
5948
|
+
|
|
5949
|
+
var PRIMARY_SHADES = [
|
|
5950
|
+
"50",
|
|
5951
|
+
"100",
|
|
5952
|
+
"200",
|
|
5953
|
+
"300",
|
|
5954
|
+
"400",
|
|
5955
|
+
"500",
|
|
5956
|
+
"600",
|
|
5957
|
+
"700",
|
|
5958
|
+
"800",
|
|
5959
|
+
"900",
|
|
5960
|
+
];
|
|
5961
|
+
var CUSTOM_PROPERTIES = __spreadArray(__spreadArray([
|
|
5962
|
+
"--heroui-primary"
|
|
5963
|
+
], PRIMARY_SHADES.map(function (s) { return "--heroui-primary-".concat(s); }), true), [
|
|
5964
|
+
"--heroui-primary-foreground",
|
|
5965
|
+
"--heroui-focus",
|
|
5966
|
+
], false);
|
|
5967
|
+
function applyCustomPrimaryColor(hex, mode) {
|
|
5968
|
+
var _a = generateThemeColorScale(hex, mode), shades = _a.shades, foreground = _a.foreground, defaultValue = _a.defaultValue;
|
|
5969
|
+
var style = document.documentElement.style;
|
|
5970
|
+
style.setProperty("--heroui-primary", defaultValue);
|
|
5971
|
+
for (var _i = 0, PRIMARY_SHADES_1 = PRIMARY_SHADES; _i < PRIMARY_SHADES_1.length; _i++) {
|
|
5972
|
+
var shade = PRIMARY_SHADES_1[_i];
|
|
5973
|
+
style.setProperty("--heroui-primary-".concat(shade), shades[shade]);
|
|
5974
|
+
}
|
|
5975
|
+
style.setProperty("--heroui-primary-foreground", foreground);
|
|
5976
|
+
style.setProperty("--heroui-focus", defaultValue);
|
|
5977
|
+
}
|
|
5978
|
+
function removeCustomPrimaryColor() {
|
|
5979
|
+
var style = document.documentElement.style;
|
|
5980
|
+
for (var _i = 0, CUSTOM_PROPERTIES_1 = CUSTOM_PROPERTIES; _i < CUSTOM_PROPERTIES_1.length; _i++) {
|
|
5981
|
+
var prop = CUSTOM_PROPERTIES_1[_i];
|
|
5982
|
+
style.removeProperty(prop);
|
|
5983
|
+
}
|
|
5984
|
+
}
|
|
5985
|
+
|
|
5671
5986
|
/**
|
|
5672
5987
|
* @file This file contains the theme configurations for the application.
|
|
5673
5988
|
*/
|
|
@@ -5675,10 +5990,12 @@ var ALL_THEMES = __spreadArray(["light", "dark"], Object.keys(themeColors), true
|
|
|
5675
5990
|
|
|
5676
5991
|
/**
|
|
5677
5992
|
* Custom hook to manage the theme state and side effects.
|
|
5678
|
-
*
|
|
5993
|
+
* Supports both named ThemeColor values and arbitrary hex colors.
|
|
5994
|
+
* @returns An object with the current mode, color, customHex, and functions to set them.
|
|
5679
5995
|
*/
|
|
5680
5996
|
var useThemeManager = function () {
|
|
5681
5997
|
var _a = useTheme(), rawTheme = _a.theme, setRawTheme = _a.setTheme;
|
|
5998
|
+
var _b = useState(null), customHex = _b[0], setCustomHex = _b[1];
|
|
5682
5999
|
var setTheme = useCallback(function (theme) {
|
|
5683
6000
|
var _a;
|
|
5684
6001
|
var html = document.documentElement;
|
|
@@ -5691,7 +6008,7 @@ var useThemeManager = function () {
|
|
|
5691
6008
|
(_a = html.classList).remove.apply(_a, ALL_THEMES);
|
|
5692
6009
|
html.classList.add(rawTheme);
|
|
5693
6010
|
}, [rawTheme]);
|
|
5694
|
-
var
|
|
6011
|
+
var _c = useMemo(function () {
|
|
5695
6012
|
var parts = rawTheme.split("-");
|
|
5696
6013
|
var parsedColor = "blue";
|
|
5697
6014
|
var parsedMode = "light";
|
|
@@ -5704,18 +6021,49 @@ var useThemeManager = function () {
|
|
|
5704
6021
|
parsedMode = rawTheme;
|
|
5705
6022
|
}
|
|
5706
6023
|
return { mode: parsedMode, color: parsedColor };
|
|
5707
|
-
}, [rawTheme]), mode =
|
|
6024
|
+
}, [rawTheme]), mode = _c.mode, color = _c.color;
|
|
6025
|
+
useEffect(function () {
|
|
6026
|
+
if (customHex) {
|
|
6027
|
+
applyCustomPrimaryColor(customHex, mode);
|
|
6028
|
+
}
|
|
6029
|
+
else {
|
|
6030
|
+
removeCustomPrimaryColor();
|
|
6031
|
+
}
|
|
6032
|
+
}, [customHex, mode]);
|
|
5708
6033
|
var setMode = useCallback(function (newMode) {
|
|
5709
6034
|
var newTheme = color === "blue" ? newMode : "".concat(color, "-").concat(newMode);
|
|
5710
6035
|
setTheme(newTheme);
|
|
5711
6036
|
}, [color, setTheme]);
|
|
5712
6037
|
var setColor = useCallback(function (newColor) {
|
|
5713
|
-
|
|
5714
|
-
|
|
6038
|
+
if (isHexColor(newColor)) {
|
|
6039
|
+
var exactMatch = isExactThemeColor(newColor);
|
|
6040
|
+
if (exactMatch) {
|
|
6041
|
+
setCustomHex(null);
|
|
6042
|
+
var newTheme = exactMatch === "blue" ? mode : "".concat(exactMatch, "-").concat(mode);
|
|
6043
|
+
setTheme(newTheme);
|
|
6044
|
+
}
|
|
6045
|
+
else {
|
|
6046
|
+
var closestColor = hexToThemeColor(newColor);
|
|
6047
|
+
setCustomHex(newColor);
|
|
6048
|
+
var newTheme = closestColor === "blue"
|
|
6049
|
+
? mode
|
|
6050
|
+
: "".concat(closestColor, "-").concat(mode);
|
|
6051
|
+
setTheme(newTheme);
|
|
6052
|
+
}
|
|
6053
|
+
}
|
|
6054
|
+
else {
|
|
6055
|
+
setCustomHex(null);
|
|
6056
|
+
var resolvedColor = newColor;
|
|
6057
|
+
var newTheme = resolvedColor === "blue"
|
|
6058
|
+
? mode
|
|
6059
|
+
: "".concat(resolvedColor, "-").concat(mode);
|
|
6060
|
+
setTheme(newTheme);
|
|
6061
|
+
}
|
|
5715
6062
|
}, [mode, setTheme]);
|
|
5716
6063
|
return {
|
|
5717
6064
|
mode: mode,
|
|
5718
6065
|
color: color,
|
|
6066
|
+
customHex: customHex,
|
|
5719
6067
|
setMode: setMode,
|
|
5720
6068
|
setColor: setColor,
|
|
5721
6069
|
};
|
|
@@ -5731,10 +6079,11 @@ var useThemeManager = function () {
|
|
|
5731
6079
|
*/
|
|
5732
6080
|
var ThemeProvider = function (_a) {
|
|
5733
6081
|
var children = _a.children;
|
|
5734
|
-
var _b = useThemeManager(), mode = _b.mode, color = _b.color, setMode = _b.setMode, setColor = _b.setColor;
|
|
6082
|
+
var _b = useThemeManager(), mode = _b.mode, color = _b.color, customHex = _b.customHex, setMode = _b.setMode, setColor = _b.setColor;
|
|
5735
6083
|
return (jsx(ThemeContext.Provider, { value: {
|
|
5736
6084
|
mode: mode,
|
|
5737
6085
|
color: color,
|
|
6086
|
+
customHex: customHex,
|
|
5738
6087
|
setMode: setMode,
|
|
5739
6088
|
setColor: setColor,
|
|
5740
6089
|
}, children: children }));
|
|
@@ -5805,4 +6154,4 @@ var NavigationLoadingProvider = function (_a) {
|
|
|
5805
6154
|
return (jsxs(NavigationLoadingContext.Provider, { value: value, children: [children, jsx(NavigationLoadingOverlay, { isVisible: isVisible })] }));
|
|
5806
6155
|
};
|
|
5807
6156
|
|
|
5808
|
-
export { AccordionList, AddHolidayForm, AnalyticsCard, AuraAutocomplete, AuraTable, AuraToastProvider, BreadcrumbsComponent, Button, Card, Chip, ColorPicker, ColorSelector, ContentCarousel, DEFAULT_PREDEFINED_COLORS, DatePicker, DateRangePicker, DateSelector, DrawerFilters, EnumMenuNavListItem, GlobalToast, H1, H2, H3, H4, HeaderComponent, HolidayType, IconComponent, ImagePreview, Input, Kanban, KanbanCard, KanbanColumn, MenuComponent, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, MultiStepWizard, NavigationLoadingContext, NavigationLoadingOverlay, NavigationLoadingProvider, P, Pagination, Phone, PromotionalBanner, RangeFilter, RowSteps, ScheduleRow, SearchInput, Select, SocialMediaBar, SocialMediaCarousel, SocialMediaPreview, StepIndicator, Switch as SwitchComponent, TagsFilter, Textarea, ThemeContext, ThemePicker, ThemeProvider, TimeInput as TimeInputComponent, ToastContext, TwoColumnLayoutAgent, UploadFile, VerticalSteps, WhatsAppPreview, Wizard, WizardNavigation, WizardSidebar, defaultTranslations$4 as defaultTranslations, getSelectedKeyFromPath, sizeMap, themeColors, useAuraToast, useMediaQuery, useNavigationLoading, useThemeContext };
|
|
6157
|
+
export { AccordionList, AddHolidayForm, AnalyticsCard, AuraAutocomplete, AuraTable, AuraToastProvider, BreadcrumbsComponent, Button, Card, Chip, ColorPicker, ColorSelector, ContentCarousel, DEFAULT_PREDEFINED_COLORS, DatePicker, DateRangePicker, DateSelector, DrawerFilters, EnumMenuNavListItem, GlobalToast, H1, H2, H3, H4, HeaderComponent, HolidayType, IconComponent, ImagePreview, Input, InputPassword, Kanban, KanbanCard, KanbanColumn, MenuComponent, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, MultiStepWizard, NavigationLoadingContext, NavigationLoadingOverlay, NavigationLoadingProvider, P, Pagination, Phone, PromotionalBanner, RangeFilter, RowSteps, ScheduleRow, SearchInput, Select, SocialMediaBar, SocialMediaCarousel, SocialMediaPreview, StepIndicator, Switch as SwitchComponent, THEME_COLOR_HEX_MAP, TagsFilter, Textarea, ThemeContext, ThemePicker, ThemeProvider, TimeInput as TimeInputComponent, ToastContext, TwoColumnLayoutAgent, UploadFile, VerticalSteps, WhatsAppPreview, Wizard, WizardNavigation, WizardSidebar, applyCustomPrimaryColor, defaultTranslations$4 as defaultTranslations, generateThemeColorScale, getContrastForeground, getSelectedKeyFromPath, hexToThemeColor, hslToCssValue, isExactThemeColor, isHexColor, removeCustomPrimaryColor, sizeMap, themeColors, useAuraToast, useMediaQuery, useNavigationLoading, useThemeContext };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { InputPasswordProps } from "./InputPassword.types";
|
|
2
|
+
export declare const InputPassword: ({ translations, showCriteria, criteria, isPristine, renderCriterionLabel, criteriaId, ...inputProps }: InputPasswordProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
//# sourceMappingURL=InputPassword.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputPassword.d.ts","sourceRoot":"","sources":["../../../../src/components/input-password/InputPassword.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,eAAO,MAAM,aAAa,GAAI,uGAQ3B,kBAAkB,4CA2EpB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { InputProps } from "../input";
|
|
3
|
+
export interface PasswordCriterionItem {
|
|
4
|
+
label: string;
|
|
5
|
+
passed: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface InputPasswordTranslations {
|
|
8
|
+
showPassword?: string;
|
|
9
|
+
hidePassword?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface InputPasswordProps extends InputProps {
|
|
12
|
+
translations?: InputPasswordTranslations;
|
|
13
|
+
showCriteria?: boolean;
|
|
14
|
+
criteria?: PasswordCriterionItem[];
|
|
15
|
+
isPristine?: boolean;
|
|
16
|
+
renderCriterionLabel?: (label: string) => ReactNode;
|
|
17
|
+
criteriaId?: string;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=InputPassword.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputPassword.types.d.ts","sourceRoot":"","sources":["../../../../src/components/input-password/InputPassword.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,MAAM,WAAW,qBAAqB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,yBAAyB;IACzC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,kBAAmB,SAAQ,UAAU;IACrD,YAAY,CAAC,EAAE,yBAAyB,CAAC;IACzC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,qBAAqB,EAAE,CAAC;IACnC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oBAAoB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,SAAS,CAAC;IACpD,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/input-password/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EACX,kBAAkB,EAClB,qBAAqB,EACrB,yBAAyB,GACzB,MAAM,uBAAuB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../../src/components/menu/Menu.tsx"],"names":[],"mappings":"AAKA,OAAO,
|
|
1
|
+
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../../src/components/menu/Menu.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAkD,MAAM,OAAO,CAAC;AACvE,OAAO,aAAa,CAAC;AAIrB,OAAO,KAAK,EACX,kBAAkB,EAElB,MAAM,cAAc,CAAC;AAgBtB;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA0YtD,CAAC"}
|
|
@@ -14,6 +14,10 @@ export type MenuComponentTranslations = {
|
|
|
14
14
|
logoAlt?: string;
|
|
15
15
|
/** Texto mostrado cuando nombre del comercio, usuario o título de ayuda no están definidos */
|
|
16
16
|
notDefinedLabel?: string;
|
|
17
|
+
/** Aria-label del botón para subir el contenido del menú (scroll arriba) */
|
|
18
|
+
scrollUpAriaLabel?: string;
|
|
19
|
+
/** Aria-label del botón para bajar el contenido del menú (scroll abajo) */
|
|
20
|
+
scrollDownAriaLabel?: string;
|
|
17
21
|
};
|
|
18
22
|
export interface MenuComponentProps {
|
|
19
23
|
commerceInfo: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.types.d.ts","sourceRoot":"","sources":["../../../../src/components/menu/Menu.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAEnF;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACvC,wEAAwE;IACxE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2DAA2D;IAC3D,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,6DAA6D;IAC7D,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,2EAA2E;IAC3E,OAAO,CAAC,EAAE,MAAM,CA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AAG,WAAW,KAAK,IAAI,CAAC;KAClF,CAAC;IACF,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9C;;;;OAIG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,YAAY,CAAC,EAAE,yBAAyB,CAAC;CACzC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-context.d.ts","sourceRoot":"","sources":["../../../../src/contexts/theme/theme-context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"theme-context.d.ts","sourceRoot":"","sources":["../../../../src/contexts/theme/theme-context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,eAAO,MAAM,YAAY,wCAQvB,CAAC;AAEH,eAAO,MAAM,eAAe,qBAQ3B,CAAC"}
|
|
@@ -3,7 +3,8 @@ export type ThemeColor = "purple" | "yellow" | "blue" | "green" | "coral";
|
|
|
3
3
|
export interface IThemeContext {
|
|
4
4
|
mode: ThemeMode;
|
|
5
5
|
color: ThemeColor;
|
|
6
|
+
customHex: string | null;
|
|
6
7
|
setMode: (mode: ThemeMode) => void;
|
|
7
|
-
setColor: (color: ThemeColor) => void;
|
|
8
|
+
setColor: (color: ThemeColor | string) => void;
|
|
8
9
|
}
|
|
9
10
|
//# sourceMappingURL=theme-context.type.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-context.type.d.ts","sourceRoot":"","sources":["../../../../src/contexts/theme/theme-context.type.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AACzC,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;AAE1E,MAAM,WAAW,aAAa;IAC7B,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,UAAU,CAAC;IAClB,OAAO,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IACnC,QAAQ,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"theme-context.type.d.ts","sourceRoot":"","sources":["../../../../src/contexts/theme/theme-context.type.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AACzC,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;AAE1E,MAAM,WAAW,aAAa;IAC7B,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,UAAU,CAAC;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IACnC,QAAQ,EAAE,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,KAAK,IAAI,CAAC;CAC/C"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -47,6 +47,7 @@ export * from "./components/wizard";
|
|
|
47
47
|
export * from "./components/breadcrumbs";
|
|
48
48
|
export * from "./components/navigation-loading-overlay";
|
|
49
49
|
export * from "./components/drawer-filters";
|
|
50
|
+
export * from "./components/input-password";
|
|
50
51
|
export * from "./components/range-filter";
|
|
51
52
|
export * from "./components/tags-filter";
|
|
52
53
|
export { Modal, ModalContent, ModalHeader, ModalBody, ModalFooter, type ModalProps, } from "./components/modal";
|
|
@@ -63,6 +64,7 @@ export { Pagination, type PaginationProps } from "./components/pagination";
|
|
|
63
64
|
export { Chip, type ChipProps } from "./components/chip";
|
|
64
65
|
export { RangeFilter, type RangeFilterProps, type RangeFilterTranslations, } from "./components/range-filter";
|
|
65
66
|
export { TagsFilter, type TagsFilterProps, type TagsFilterTranslations, type TagItem, } from "./components/tags-filter";
|
|
67
|
+
export { InputPassword, type InputPasswordProps, type PasswordCriterionItem, type InputPasswordTranslations, } from "./components/input-password";
|
|
66
68
|
export * from "./types/calendar.types";
|
|
67
69
|
export { themeColors } from "./styles/colors.default";
|
|
68
70
|
export * from "./providers/theme";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAU9B,cAAc,eAAe,CAAC;AAG9B,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAIvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mBAAmB,CAAC;AAClC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iCAAiC,CAAC;AAChD,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,c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E,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EACN,UAAU,EACV,KAAK,eAAe,GACpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACN,eAAe,EACf,KAAK,oBAAoB,GACzB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EACN,WAAW,EACX,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,GAC5B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACN,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAC3B,KAAK,OAAO,GACZ,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACN,aAAa,EACb,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,GAC9B,MAAM,6BAA6B,CAAC;AAGrC,cAAc,wBAAwB,CAAC;AAGvC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,SAAS,CAAC;AAGxB,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apply-custom-color.d.ts","sourceRoot":"","sources":["../../../../src/providers/theme/apply-custom-color.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAuBzE,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,GAAG,IAAI,CAY1E;AAED,wBAAgB,wBAAwB,IAAI,IAAI,CAK/C"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ThemeMode } from "../../contexts/theme/theme-context.type";
|
|
2
|
+
export declare function hslToCssValue(h: number, s: number, l: number): string;
|
|
3
|
+
export declare function getContrastForeground(hex: string): string;
|
|
4
|
+
export interface ThemeColorScale {
|
|
5
|
+
shades: Record<string, string>;
|
|
6
|
+
foreground: string;
|
|
7
|
+
defaultValue: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function generateThemeColorScale(hex: string, mode: ThemeMode): ThemeColorScale;
|
|
10
|
+
//# sourceMappingURL=generate-color-scale.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-color-scale.d.ts","sourceRoot":"","sources":["../../../../src/providers/theme/generate-color-scale.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAmDzE,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAErE;AAED,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAIzD;AAgDD,MAAM,WAAW,eAAe;IAC/B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,GAAG,eAAe,CAUrF"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ThemeColor } from "../../contexts/theme/theme-context.type";
|
|
2
|
+
export declare const THEME_COLOR_HEX_MAP: Record<ThemeColor, string>;
|
|
3
|
+
export declare function isHexColor(value: string): boolean;
|
|
4
|
+
export declare function isExactThemeColor(hex: string): ThemeColor | null;
|
|
5
|
+
export declare function hexToThemeColor(hex: string): ThemeColor;
|
|
6
|
+
//# sourceMappingURL=hex-to-theme-color.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hex-to-theme-color.d.ts","sourceRoot":"","sources":["../../../../src/providers/theme/hex-to-theme-color.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AAE1E,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAM1D,CAAC;AA2BF,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEjD;AAED,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAQhE;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAevD"}
|