@beweco/aurora-ui 1.0.1-beta.161 → 1.0.1-qa.164
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/README.md
CHANGED
package/dist/index.cjs.js
CHANGED
|
@@ -8166,12 +8166,6 @@ const MenuClawHistoryPanel = $8WNJc$react.memo(function MenuClawHistoryPanel({ i
|
|
|
8166
8166
|
// que no quede a la vista solo en el agregado del lateral comprimido.
|
|
8167
8167
|
const hasHiddenNews = $8WNJc$react.useMemo(() => !isExpanded &&
|
|
8168
8168
|
items.slice(initialVisibleCount).some((item) => item.hasNews === true), [isExpanded, items, initialVisibleCount]);
|
|
8169
|
-
// Plegado el botón es solo un icono y su nombre accesible es `aria-label` (que tapa
|
|
8170
|
-
// cualquier `sr-only` hijo): con novedades lleva primero la acción y luego el aviso,
|
|
8171
|
-
// para que el lector no anuncie solo «hay novedades» y pierda «Nueva conversación».
|
|
8172
|
-
const collapsedAriaLabel = hasAnyNews
|
|
8173
|
-
? `${newLabel}, ${collapsedNewsLabel}`
|
|
8174
|
-
: newLabel;
|
|
8175
8169
|
const handleToggleExpand = $8WNJc$react.useCallback(() => {
|
|
8176
8170
|
setIsExpanded((prev) => !prev);
|
|
8177
8171
|
}, []);
|
|
@@ -8189,9 +8183,9 @@ const MenuClawHistoryPanel = $8WNJc$react.memo(function MenuClawHistoryPanel({ i
|
|
|
8189
8183
|
if (isCollapsed && !onNewConversation) {
|
|
8190
8184
|
return null;
|
|
8191
8185
|
}
|
|
8192
|
-
return (jsxRuntime.jsxs("div", { className: "flex max-h-[40%] min-h-0 flex-col gap-2 pb-3", children: [onNewConversation ? (jsxRuntime.jsxs(Button, { title: newLabel, "aria-label": isCollapsed ?
|
|
8186
|
+
return (jsxRuntime.jsxs("div", { className: "flex max-h-[40%] min-h-0 flex-col gap-2 pb-3", children: [onNewConversation ? (jsxRuntime.jsxs(Button, { title: newLabel, "aria-label": isCollapsed ? newLabel : undefined, isIconOnly: isCollapsed, fullWidth: !isCollapsed, onPress: () => onNewConversation(), className: cn("h-9 shrink-0 bg-foreground text-sm font-medium text-background", isCollapsed
|
|
8193
8187
|
? "w-9 min-w-9 self-center"
|
|
8194
|
-
: "justify-start gap-3 px-2"), children: [jsxRuntime.jsxs("span", { className: "relative flex h-5 w-5 shrink-0 items-center justify-center", children: [jsxRuntime.jsx(IconComponent, { icon: "solar:pen-new-square-linear", size: "md", "aria-hidden": true }), isCollapsed && hasAnyNews ? (jsxRuntime.jsx("span", { "data-history-news-aggregate": "", "aria-hidden": "true", className: "absolute -right-1 -top-1 h-2.5 w-2.5 rounded-full bg-primary ring-2 ring-background" })) : null] }), !isCollapsed ? (jsxRuntime.jsx("span", { className: "menu-claw-collapsible truncate", children: newLabel })) : null] })) : null, !isCollapsed && items.length > 0 ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("p", { className: "shrink-0 px-2 pb-1 pt-2 text-xs font-medium uppercase tracking-wide text-default-400", children: title }), jsxRuntime.jsx("ul", { "aria-label": title, className: "flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]", children: visibleItems.map((item) => (jsxRuntime.jsx("li", { children: jsxRuntime.jsxs("button", { type: "button", disabled: item.disabled, "aria-disabled": item.disabled, title: item.title, onClick: () => handleItemPress(item), className: cn("flex min-h-9 w-full items-center gap-3 rounded-lg px-2 py-1.5 text-left text-sm text-default-600 transition-colors", "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus", item.disabled
|
|
8188
|
+
: "justify-start gap-3 px-2"), children: [jsxRuntime.jsxs("span", { className: "relative flex h-5 w-5 shrink-0 items-center justify-center", children: [jsxRuntime.jsx(IconComponent, { icon: "solar:pen-new-square-linear", size: "md", "aria-hidden": true }), isCollapsed && hasAnyNews ? (jsxRuntime.jsx("span", { "data-history-news-aggregate": "", "aria-hidden": "true", className: "absolute -right-1 -top-1 h-2.5 w-2.5 rounded-full bg-primary ring-2 ring-background" })) : null] }), isCollapsed && hasAnyNews ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("span", { className: "sr-only", children: newLabel }), jsxRuntime.jsx("span", { className: "sr-only", children: collapsedNewsLabel })] })) : null, !isCollapsed ? (jsxRuntime.jsx("span", { className: "menu-claw-collapsible truncate", children: newLabel })) : null] })) : null, !isCollapsed && items.length > 0 ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("p", { className: "shrink-0 px-2 pb-1 pt-2 text-xs font-medium uppercase tracking-wide text-default-400", children: title }), jsxRuntime.jsx("ul", { "aria-label": title, className: "flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]", children: visibleItems.map((item) => (jsxRuntime.jsx("li", { children: jsxRuntime.jsxs("button", { type: "button", disabled: item.disabled, "aria-disabled": item.disabled, title: item.title, onClick: () => handleItemPress(item), className: cn("flex min-h-9 w-full items-center gap-3 rounded-lg px-2 py-1.5 text-left text-sm text-default-600 transition-colors", "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus", item.disabled
|
|
8195
8189
|
? "cursor-not-allowed opacity-50"
|
|
8196
8190
|
: "hover:bg-default-100"), children: [jsxRuntime.jsx("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center text-default-400", children: jsxRuntime.jsx(IconComponent, { icon: "solar:chat-round-dots-linear", size: "md", "aria-hidden": true }) }), jsxRuntime.jsxs("span", { className: "flex min-w-0 flex-1 flex-col", children: [jsxRuntime.jsx("span", { className: "truncate", children: item.title }), item.meta ? (jsxRuntime.jsx("span", { className: "truncate text-xs text-default-400", children: item.meta })) : null] }), item.hasNews === true ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("span", { "data-history-news-dot": "", "aria-hidden": "true", className: "h-2 w-2 shrink-0 rounded-full bg-primary" }), jsxRuntime.jsx("span", { className: "sr-only", children: newsLabel })] })) : null] }) }, item.id))) }), hasHiddenItems ? (jsxRuntime.jsxs("button", { type: "button", onClick: handleToggleExpand, "aria-expanded": isExpanded, className: "flex w-full shrink-0 items-center gap-1.5 rounded-lg px-2 py-2 text-xs font-medium text-default-500 transition-colors hover:bg-default-100 hover:text-default-700 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus", children: [jsxRuntime.jsx(IconComponent, { icon: isExpanded
|
|
8197
8191
|
? "solar:alt-arrow-up-linear"
|
package/dist/index.esm.js
CHANGED
|
@@ -8166,12 +8166,6 @@ const MenuClawHistoryPanel = $8WNJc$react.memo(function MenuClawHistoryPanel({ i
|
|
|
8166
8166
|
// que no quede a la vista solo en el agregado del lateral comprimido.
|
|
8167
8167
|
const hasHiddenNews = useMemo(() => !isExpanded &&
|
|
8168
8168
|
items.slice(initialVisibleCount).some((item) => item.hasNews === true), [isExpanded, items, initialVisibleCount]);
|
|
8169
|
-
// Plegado el botón es solo un icono y su nombre accesible es `aria-label` (que tapa
|
|
8170
|
-
// cualquier `sr-only` hijo): con novedades lleva primero la acción y luego el aviso,
|
|
8171
|
-
// para que el lector no anuncie solo «hay novedades» y pierda «Nueva conversación».
|
|
8172
|
-
const collapsedAriaLabel = hasAnyNews
|
|
8173
|
-
? `${newLabel}, ${collapsedNewsLabel}`
|
|
8174
|
-
: newLabel;
|
|
8175
8169
|
const handleToggleExpand = useCallback(() => {
|
|
8176
8170
|
setIsExpanded((prev) => !prev);
|
|
8177
8171
|
}, []);
|
|
@@ -8189,9 +8183,9 @@ const MenuClawHistoryPanel = $8WNJc$react.memo(function MenuClawHistoryPanel({ i
|
|
|
8189
8183
|
if (isCollapsed && !onNewConversation) {
|
|
8190
8184
|
return null;
|
|
8191
8185
|
}
|
|
8192
|
-
return (jsxs("div", { className: "flex max-h-[40%] min-h-0 flex-col gap-2 pb-3", children: [onNewConversation ? (jsxs(Button, { title: newLabel, "aria-label": isCollapsed ?
|
|
8186
|
+
return (jsxs("div", { className: "flex max-h-[40%] min-h-0 flex-col gap-2 pb-3", children: [onNewConversation ? (jsxs(Button, { title: newLabel, "aria-label": isCollapsed ? newLabel : undefined, isIconOnly: isCollapsed, fullWidth: !isCollapsed, onPress: () => onNewConversation(), className: cn("h-9 shrink-0 bg-foreground text-sm font-medium text-background", isCollapsed
|
|
8193
8187
|
? "w-9 min-w-9 self-center"
|
|
8194
|
-
: "justify-start gap-3 px-2"), children: [jsxs("span", { className: "relative flex h-5 w-5 shrink-0 items-center justify-center", children: [jsx(IconComponent, { icon: "solar:pen-new-square-linear", size: "md", "aria-hidden": true }), isCollapsed && hasAnyNews ? (jsx("span", { "data-history-news-aggregate": "", "aria-hidden": "true", className: "absolute -right-1 -top-1 h-2.5 w-2.5 rounded-full bg-primary ring-2 ring-background" })) : null] }), !isCollapsed ? (jsx("span", { className: "menu-claw-collapsible truncate", children: newLabel })) : null] })) : null, !isCollapsed && items.length > 0 ? (jsxs(Fragment$1, { children: [jsx("p", { className: "shrink-0 px-2 pb-1 pt-2 text-xs font-medium uppercase tracking-wide text-default-400", children: title }), jsx("ul", { "aria-label": title, className: "flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]", children: visibleItems.map((item) => (jsx("li", { children: jsxs("button", { type: "button", disabled: item.disabled, "aria-disabled": item.disabled, title: item.title, onClick: () => handleItemPress(item), className: cn("flex min-h-9 w-full items-center gap-3 rounded-lg px-2 py-1.5 text-left text-sm text-default-600 transition-colors", "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus", item.disabled
|
|
8188
|
+
: "justify-start gap-3 px-2"), children: [jsxs("span", { className: "relative flex h-5 w-5 shrink-0 items-center justify-center", children: [jsx(IconComponent, { icon: "solar:pen-new-square-linear", size: "md", "aria-hidden": true }), isCollapsed && hasAnyNews ? (jsx("span", { "data-history-news-aggregate": "", "aria-hidden": "true", className: "absolute -right-1 -top-1 h-2.5 w-2.5 rounded-full bg-primary ring-2 ring-background" })) : null] }), isCollapsed && hasAnyNews ? (jsxs(Fragment$1, { children: [jsx("span", { className: "sr-only", children: newLabel }), jsx("span", { className: "sr-only", children: collapsedNewsLabel })] })) : null, !isCollapsed ? (jsx("span", { className: "menu-claw-collapsible truncate", children: newLabel })) : null] })) : null, !isCollapsed && items.length > 0 ? (jsxs(Fragment$1, { children: [jsx("p", { className: "shrink-0 px-2 pb-1 pt-2 text-xs font-medium uppercase tracking-wide text-default-400", children: title }), jsx("ul", { "aria-label": title, className: "flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]", children: visibleItems.map((item) => (jsx("li", { children: jsxs("button", { type: "button", disabled: item.disabled, "aria-disabled": item.disabled, title: item.title, onClick: () => handleItemPress(item), className: cn("flex min-h-9 w-full items-center gap-3 rounded-lg px-2 py-1.5 text-left text-sm text-default-600 transition-colors", "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus", item.disabled
|
|
8195
8189
|
? "cursor-not-allowed opacity-50"
|
|
8196
8190
|
: "hover:bg-default-100"), children: [jsx("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center text-default-400", children: jsx(IconComponent, { icon: "solar:chat-round-dots-linear", size: "md", "aria-hidden": true }) }), jsxs("span", { className: "flex min-w-0 flex-1 flex-col", children: [jsx("span", { className: "truncate", children: item.title }), item.meta ? (jsx("span", { className: "truncate text-xs text-default-400", children: item.meta })) : null] }), item.hasNews === true ? (jsxs(Fragment$1, { children: [jsx("span", { "data-history-news-dot": "", "aria-hidden": "true", className: "h-2 w-2 shrink-0 rounded-full bg-primary" }), jsx("span", { className: "sr-only", children: newsLabel })] })) : null] }) }, item.id))) }), hasHiddenItems ? (jsxs("button", { type: "button", onClick: handleToggleExpand, "aria-expanded": isExpanded, className: "flex w-full shrink-0 items-center gap-1.5 rounded-lg px-2 py-2 text-xs font-medium text-default-500 transition-colors hover:bg-default-100 hover:text-default-700 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus", children: [jsx(IconComponent, { icon: isExpanded
|
|
8197
8191
|
? "solar:alt-arrow-up-linear"
|
|
@@ -22,7 +22,7 @@ export interface MenuClawHistoryItem {
|
|
|
22
22
|
/**
|
|
23
23
|
* La conversación tiene una novedad que el usuario aún no ha visto (p. ej. una
|
|
24
24
|
* tarea terminada). Con `true`, la fila pinta un punto con el color primario
|
|
25
|
-
* (`--
|
|
25
|
+
* (`--heroui-primary`, el de la agencia) y un texto solo para lectores de pantalla
|
|
26
26
|
* (`translations.historyNewsLabel`). Con el lateral comprimido, si algún ítem lo
|
|
27
27
|
* trae, el icono de la sección lleva un punto agregado
|
|
28
28
|
* (`translations.historyCollapsedNewsLabel`). Ausente = sin punto.
|