@beweco/aurora-ui 1.0.1-beta.161 → 1.0.2
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 +3 -1
- package/dist/assets/css/styles.css +1 -1
- package/dist/index.cjs.js +6 -21
- package/dist/index.esm.js +6 -21
- package/dist/types/components/menu-claw/MenuClaw.d.ts.map +1 -1
- package/dist/types/components/menu-claw/MenuClaw.types.d.ts +0 -17
- package/dist/types/components/menu-claw/MenuClaw.types.d.ts.map +1 -1
- package/dist/types/components/menu-claw/_internal/menu-claw-history/MenuClawHistoryPanel.d.ts.map +1 -1
- package/dist/types/components/menu-claw/_internal/menu-claw-history/MenuClawHistoryPanel.types.d.ts +0 -4
- package/dist/types/components/menu-claw/_internal/menu-claw-history/MenuClawHistoryPanel.types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -8155,23 +8155,10 @@ function pressLoadMore({ isLoadingMore, onLoadMore, expand, }) {
|
|
|
8155
8155
|
* gana a sus `--button-*` porque las utilidades van en una capa posterior a la de
|
|
8156
8156
|
* `.button`.
|
|
8157
8157
|
*/
|
|
8158
|
-
const MenuClawHistoryPanel = $8WNJc$react.memo(function MenuClawHistoryPanel({ items, initialVisibleCount, onNewConversation, hasMore, onLoadMore, isLoadingMore, loadMoreLabel, isCollapsed, title, newLabel, showMoreLabel, showLessLabel,
|
|
8158
|
+
const MenuClawHistoryPanel = $8WNJc$react.memo(function MenuClawHistoryPanel({ items, initialVisibleCount, onNewConversation, hasMore, onLoadMore, isLoadingMore, loadMoreLabel, isCollapsed, title, newLabel, showMoreLabel, showLessLabel, onBeforeSelect, }) {
|
|
8159
8159
|
const [isExpanded, setIsExpanded] = $8WNJc$react.useState(false);
|
|
8160
8160
|
const visibleItems = $8WNJc$react.useMemo(() => (isExpanded ? items : items.slice(0, initialVisibleCount)), [isExpanded, items, initialVisibleCount]);
|
|
8161
8161
|
const hasHiddenItems = items.length > initialVisibleCount;
|
|
8162
|
-
// Punto agregado del lateral comprimido: cuenta TODOS los ítems recibidos, también
|
|
8163
|
-
// los plegados tras «Ver más» (comprimido no hay lista que desplegar).
|
|
8164
|
-
const hasAnyNews = $8WNJc$react.useMemo(() => items.some((item) => item.hasNews === true), [items]);
|
|
8165
|
-
// Expandido pero plegado: una novedad detrás de «Ver más» se señala en el botón, para
|
|
8166
|
-
// que no quede a la vista solo en el agregado del lateral comprimido.
|
|
8167
|
-
const hasHiddenNews = $8WNJc$react.useMemo(() => !isExpanded &&
|
|
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
8162
|
const handleToggleExpand = $8WNJc$react.useCallback(() => {
|
|
8176
8163
|
setIsExpanded((prev) => !prev);
|
|
8177
8164
|
}, []);
|
|
@@ -8189,13 +8176,13 @@ const MenuClawHistoryPanel = $8WNJc$react.memo(function MenuClawHistoryPanel({ i
|
|
|
8189
8176
|
if (isCollapsed && !onNewConversation) {
|
|
8190
8177
|
return null;
|
|
8191
8178
|
}
|
|
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 ?
|
|
8179
|
+
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
8180
|
? "w-9 min-w-9 self-center"
|
|
8194
|
-
: "justify-start gap-3 px-2"), children: [jsxRuntime.
|
|
8181
|
+
: "justify-start gap-3 px-2"), children: [jsxRuntime.jsx("span", { className: "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 ? (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
8182
|
? "cursor-not-allowed opacity-50"
|
|
8196
|
-
: "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-
|
|
8183
|
+
: "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-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.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
8184
|
? "solar:alt-arrow-up-linear"
|
|
8198
|
-
: "solar:alt-arrow-down-linear", size: "sm", "aria-hidden": true }), isExpanded ? showLessLabel : showMoreLabel
|
|
8185
|
+
: "solar:alt-arrow-down-linear", size: "sm", "aria-hidden": true }), isExpanded ? showLessLabel : showMoreLabel] })) : null, onLoadMore &&
|
|
8199
8186
|
isLoadMoreVisible({
|
|
8200
8187
|
hasMore,
|
|
8201
8188
|
hasOnLoadMore: true,
|
|
@@ -8270,8 +8257,6 @@ const DEFAULT_TRANSLATIONS$a = {
|
|
|
8270
8257
|
historyShowMoreLabel: "Ver más",
|
|
8271
8258
|
historyShowLessLabel: "Ver menos",
|
|
8272
8259
|
historyLoadMoreLabel: "Cargar más",
|
|
8273
|
-
historyNewsLabel: "Con novedades",
|
|
8274
|
-
historyCollapsedNewsLabel: "Hay conversaciones con novedades",
|
|
8275
8260
|
};
|
|
8276
8261
|
/** Ítems del historial visibles antes de pulsar "ver más". */
|
|
8277
8262
|
const DEFAULT_HISTORY_VISIBLE_COUNT = 5;
|
|
@@ -8380,7 +8365,7 @@ const MenuClaw = $8WNJc$react.memo(function MenuClaw({ userInfo, helpButton, men
|
|
|
8380
8365
|
? "solar:alt-arrow-right-linear"
|
|
8381
8366
|
: "solar:alt-arrow-left-linear", size: "md", "aria-hidden": true }) })] }), jsxRuntime.jsxs("div", { className: cn("flex items-center py-3", collapsed ? "justify-center gap-0" : "gap-3"), children: [jsxRuntime.jsxs(react.Avatar, { size: "sm", className: "shrink-0", children: [userInfo?.avatar?.trim() ? (jsxRuntime.jsx(react.Avatar.Image, { src: userInfo.avatar, alt: userName })) : null, jsxRuntime.jsx(react.Avatar.Fallback, { className: userInfo?.avatar?.trim()
|
|
8382
8367
|
? undefined
|
|
8383
|
-
: "bg-warning text-warning-foreground", children: getUserInitials(userName) })] }), !collapsed ? (jsxRuntime.jsxs("div", { className: "menu-claw-collapsible flex min-w-0 flex-col overflow-hidden", children: [jsxRuntime.jsx("p", { className: "truncate text-sm font-semibold text-foreground", children: userName }), jsxRuntime.jsx("p", { className: "truncate text-xs text-default-400", children: userRole })] })) : null] }), jsxRuntime.jsx(MenuClawHistoryPanel, { items: historyConfig.items, initialVisibleCount: historyConfig.initialVisibleCount, onNewConversation: history?.onNewConversation, hasMore: historyConfig.hasMore, onLoadMore: history?.onLoadMore, isLoadingMore: historyConfig.isLoadingMore, isCollapsed: collapsed, title: t.historyTitle, newLabel: t.historyNewLabel, showMoreLabel: t.historyShowMoreLabel, showLessLabel: t.historyShowLessLabel, loadMoreLabel: t.historyLoadMoreLabel,
|
|
8368
|
+
: "bg-warning text-warning-foreground", children: getUserInitials(userName) })] }), !collapsed ? (jsxRuntime.jsxs("div", { className: "menu-claw-collapsible flex min-w-0 flex-col overflow-hidden", children: [jsxRuntime.jsx("p", { className: "truncate text-sm font-semibold text-foreground", children: userName }), jsxRuntime.jsx("p", { className: "truncate text-xs text-default-400", children: userRole })] })) : null] }), jsxRuntime.jsx(MenuClawHistoryPanel, { items: historyConfig.items, initialVisibleCount: historyConfig.initialVisibleCount, onNewConversation: history?.onNewConversation, hasMore: historyConfig.hasMore, onLoadMore: history?.onLoadMore, isLoadingMore: historyConfig.isLoadingMore, isCollapsed: collapsed, title: t.historyTitle, newLabel: t.historyNewLabel, showMoreLabel: t.historyShowMoreLabel, showLessLabel: t.historyShowLessLabel, loadMoreLabel: t.historyLoadMoreLabel, onBeforeSelect: handleSidebarClose }), jsxRuntime.jsx("nav", { className: "flex min-h-0 flex-1 flex-col overflow-y-auto [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]", children: menuItems.items.map((group) => (jsxRuntime.jsxs("div", { className: "mb-2", children: [group.title && !collapsed ? (jsxRuntime.jsx("p", { className: "px-2 pb-1 pt-2 text-xs font-medium uppercase tracking-wide text-default-400", children: group.title })) : null, jsxRuntime.jsx("ul", { className: "flex flex-col gap-0.5", children: (group.items ?? []).map((item) => (jsxRuntime.jsx(MenuClawNavItem, { item: item, selectedKey: selectedKey, isCollapsed: collapsed, onSelect: handleMenuSelect }, item.key))) })] }, group.key))) }), helpSection ? (jsxRuntime.jsx("div", { className: "mt-auto flex flex-col items-center justify-center", children: jsxRuntime.jsx(Button, { fullWidth: true,
|
|
8384
8369
|
// TECH-2459 · G2 — la fachada propia de `Button` (D-G4-1) pinta
|
|
8385
8370
|
// `color="primary"` por defecto; el crudo de v2 pintaba "default"
|
|
8386
8371
|
// (gris). Se fija explícito para no teñir de azul un botón neutro.
|
package/dist/index.esm.js
CHANGED
|
@@ -8155,23 +8155,10 @@ function pressLoadMore({ isLoadingMore, onLoadMore, expand, }) {
|
|
|
8155
8155
|
* gana a sus `--button-*` porque las utilidades van en una capa posterior a la de
|
|
8156
8156
|
* `.button`.
|
|
8157
8157
|
*/
|
|
8158
|
-
const MenuClawHistoryPanel = $8WNJc$react.memo(function MenuClawHistoryPanel({ items, initialVisibleCount, onNewConversation, hasMore, onLoadMore, isLoadingMore, loadMoreLabel, isCollapsed, title, newLabel, showMoreLabel, showLessLabel,
|
|
8158
|
+
const MenuClawHistoryPanel = $8WNJc$react.memo(function MenuClawHistoryPanel({ items, initialVisibleCount, onNewConversation, hasMore, onLoadMore, isLoadingMore, loadMoreLabel, isCollapsed, title, newLabel, showMoreLabel, showLessLabel, onBeforeSelect, }) {
|
|
8159
8159
|
const [isExpanded, setIsExpanded] = $8WNJc$react.useState(false);
|
|
8160
8160
|
const visibleItems = useMemo(() => (isExpanded ? items : items.slice(0, initialVisibleCount)), [isExpanded, items, initialVisibleCount]);
|
|
8161
8161
|
const hasHiddenItems = items.length > initialVisibleCount;
|
|
8162
|
-
// Punto agregado del lateral comprimido: cuenta TODOS los ítems recibidos, también
|
|
8163
|
-
// los plegados tras «Ver más» (comprimido no hay lista que desplegar).
|
|
8164
|
-
const hasAnyNews = useMemo(() => items.some((item) => item.hasNews === true), [items]);
|
|
8165
|
-
// Expandido pero plegado: una novedad detrás de «Ver más» se señala en el botón, para
|
|
8166
|
-
// que no quede a la vista solo en el agregado del lateral comprimido.
|
|
8167
|
-
const hasHiddenNews = useMemo(() => !isExpanded &&
|
|
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
8162
|
const handleToggleExpand = useCallback(() => {
|
|
8176
8163
|
setIsExpanded((prev) => !prev);
|
|
8177
8164
|
}, []);
|
|
@@ -8189,13 +8176,13 @@ const MenuClawHistoryPanel = $8WNJc$react.memo(function MenuClawHistoryPanel({ i
|
|
|
8189
8176
|
if (isCollapsed && !onNewConversation) {
|
|
8190
8177
|
return null;
|
|
8191
8178
|
}
|
|
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 ?
|
|
8179
|
+
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
8180
|
? "w-9 min-w-9 self-center"
|
|
8194
|
-
: "justify-start gap-3 px-2"), children: [
|
|
8181
|
+
: "justify-start gap-3 px-2"), children: [jsx("span", { className: "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 ? (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
8182
|
? "cursor-not-allowed opacity-50"
|
|
8196
|
-
: "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-
|
|
8183
|
+
: "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-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.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
8184
|
? "solar:alt-arrow-up-linear"
|
|
8198
|
-
: "solar:alt-arrow-down-linear", size: "sm", "aria-hidden": true }), isExpanded ? showLessLabel : showMoreLabel
|
|
8185
|
+
: "solar:alt-arrow-down-linear", size: "sm", "aria-hidden": true }), isExpanded ? showLessLabel : showMoreLabel] })) : null, onLoadMore &&
|
|
8199
8186
|
isLoadMoreVisible({
|
|
8200
8187
|
hasMore,
|
|
8201
8188
|
hasOnLoadMore: true,
|
|
@@ -8270,8 +8257,6 @@ const DEFAULT_TRANSLATIONS$a = {
|
|
|
8270
8257
|
historyShowMoreLabel: "Ver más",
|
|
8271
8258
|
historyShowLessLabel: "Ver menos",
|
|
8272
8259
|
historyLoadMoreLabel: "Cargar más",
|
|
8273
|
-
historyNewsLabel: "Con novedades",
|
|
8274
|
-
historyCollapsedNewsLabel: "Hay conversaciones con novedades",
|
|
8275
8260
|
};
|
|
8276
8261
|
/** Ítems del historial visibles antes de pulsar "ver más". */
|
|
8277
8262
|
const DEFAULT_HISTORY_VISIBLE_COUNT = 5;
|
|
@@ -8380,7 +8365,7 @@ const MenuClaw = $8WNJc$react.memo(function MenuClaw({ userInfo, helpButton, men
|
|
|
8380
8365
|
? "solar:alt-arrow-right-linear"
|
|
8381
8366
|
: "solar:alt-arrow-left-linear", size: "md", "aria-hidden": true }) })] }), jsxs("div", { className: cn("flex items-center py-3", collapsed ? "justify-center gap-0" : "gap-3"), children: [jsxs(Avatar, { size: "sm", className: "shrink-0", children: [userInfo?.avatar?.trim() ? (jsx(Avatar.Image, { src: userInfo.avatar, alt: userName })) : null, jsx(Avatar.Fallback, { className: userInfo?.avatar?.trim()
|
|
8382
8367
|
? undefined
|
|
8383
|
-
: "bg-warning text-warning-foreground", children: getUserInitials(userName) })] }), !collapsed ? (jsxs("div", { className: "menu-claw-collapsible flex min-w-0 flex-col overflow-hidden", children: [jsx("p", { className: "truncate text-sm font-semibold text-foreground", children: userName }), jsx("p", { className: "truncate text-xs text-default-400", children: userRole })] })) : null] }), jsx(MenuClawHistoryPanel, { items: historyConfig.items, initialVisibleCount: historyConfig.initialVisibleCount, onNewConversation: history?.onNewConversation, hasMore: historyConfig.hasMore, onLoadMore: history?.onLoadMore, isLoadingMore: historyConfig.isLoadingMore, isCollapsed: collapsed, title: t.historyTitle, newLabel: t.historyNewLabel, showMoreLabel: t.historyShowMoreLabel, showLessLabel: t.historyShowLessLabel, loadMoreLabel: t.historyLoadMoreLabel,
|
|
8368
|
+
: "bg-warning text-warning-foreground", children: getUserInitials(userName) })] }), !collapsed ? (jsxs("div", { className: "menu-claw-collapsible flex min-w-0 flex-col overflow-hidden", children: [jsx("p", { className: "truncate text-sm font-semibold text-foreground", children: userName }), jsx("p", { className: "truncate text-xs text-default-400", children: userRole })] })) : null] }), jsx(MenuClawHistoryPanel, { items: historyConfig.items, initialVisibleCount: historyConfig.initialVisibleCount, onNewConversation: history?.onNewConversation, hasMore: historyConfig.hasMore, onLoadMore: history?.onLoadMore, isLoadingMore: historyConfig.isLoadingMore, isCollapsed: collapsed, title: t.historyTitle, newLabel: t.historyNewLabel, showMoreLabel: t.historyShowMoreLabel, showLessLabel: t.historyShowLessLabel, loadMoreLabel: t.historyLoadMoreLabel, onBeforeSelect: handleSidebarClose }), jsx("nav", { className: "flex min-h-0 flex-1 flex-col overflow-y-auto [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]", children: menuItems.items.map((group) => (jsxs("div", { className: "mb-2", children: [group.title && !collapsed ? (jsx("p", { className: "px-2 pb-1 pt-2 text-xs font-medium uppercase tracking-wide text-default-400", children: group.title })) : null, jsx("ul", { className: "flex flex-col gap-0.5", children: (group.items ?? []).map((item) => (jsx(MenuClawNavItem, { item: item, selectedKey: selectedKey, isCollapsed: collapsed, onSelect: handleMenuSelect }, item.key))) })] }, group.key))) }), helpSection ? (jsx("div", { className: "mt-auto flex flex-col items-center justify-center", children: jsx(Button, { fullWidth: true,
|
|
8384
8369
|
// TECH-2459 · G2 — la fachada propia de `Button` (D-G4-1) pinta
|
|
8385
8370
|
// `color="primary"` por defecto; el crudo de v2 pintaba "default"
|
|
8386
8371
|
// (gris). Se fija explícito para no teñir de azul un botón neutro.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuClaw.d.ts","sourceRoot":"","sources":["../../../../src/components/menu-claw/MenuClaw.tsx"],"names":[],"mappings":"AACA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAEpD,OAAO,iBAAiB,CAAC;AAMzB,OAAO,KAAK,EAAE,aAAa,EAAwB,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"MenuClaw.d.ts","sourceRoot":"","sources":["../../../../src/components/menu-claw/MenuClaw.tsx"],"names":[],"mappings":"AACA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAEpD,OAAO,iBAAiB,CAAC;AAMzB,OAAO,KAAK,EAAE,aAAa,EAAwB,MAAM,kBAAkB,CAAC;AAoB5E;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAwU3C,CAAC"}
|
|
@@ -19,16 +19,6 @@ export interface MenuClawHistoryItem {
|
|
|
19
19
|
disabled?: boolean;
|
|
20
20
|
/** Se invoca al activar el ítem. No se llama si `disabled` es `true`. */
|
|
21
21
|
onSelect?: () => void;
|
|
22
|
-
/**
|
|
23
|
-
* La conversación tiene una novedad que el usuario aún no ha visto (p. ej. una
|
|
24
|
-
* tarea terminada). Con `true`, la fila pinta un punto con el color primario
|
|
25
|
-
* (`--color-primary`, el primary del pack activo: el de la agencia) y un texto solo para lectores de pantalla
|
|
26
|
-
* (`translations.historyNewsLabel`). Con el lateral comprimido, si algún ítem lo
|
|
27
|
-
* trae, el icono de la sección lleva un punto agregado
|
|
28
|
-
* (`translations.historyCollapsedNewsLabel`). Ausente = sin punto.
|
|
29
|
-
* @default false
|
|
30
|
-
*/
|
|
31
|
-
hasNews?: boolean;
|
|
32
22
|
}
|
|
33
23
|
/**
|
|
34
24
|
* Sección de historial. Va integrada de serie en `MenuClaw` (no es opt-in),
|
|
@@ -90,13 +80,6 @@ export type MenuClawTranslations = {
|
|
|
90
80
|
historyShowLessLabel?: string;
|
|
91
81
|
/** Etiqueta del botón que pide la página siguiente del historial */
|
|
92
82
|
historyLoadMoreLabel?: string;
|
|
93
|
-
/** Texto para lectores de pantalla de una conversación con novedad (`hasNews`) */
|
|
94
|
-
historyNewsLabel?: string;
|
|
95
|
-
/**
|
|
96
|
-
* Texto para lectores de pantalla del punto agregado del lateral comprimido,
|
|
97
|
-
* cuando alguna conversación tiene novedad
|
|
98
|
-
*/
|
|
99
|
-
historyCollapsedNewsLabel?: string;
|
|
100
83
|
};
|
|
101
84
|
export interface MenuClawProps {
|
|
102
85
|
userInfo: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuClaw.types.d.ts","sourceRoot":"","sources":["../../../../src/components/menu-claw/MenuClaw.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mDAAmD,CAAC;AAEzF,YAAY,EAAE,eAAe,EAAE,CAAC;AAEhC;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IACnC,wEAAwE;IACxE,EAAE,EAAE,MAAM,CAAC;IACX,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAC;IACd,2EAA2E;IAC3E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"MenuClaw.types.d.ts","sourceRoot":"","sources":["../../../../src/components/menu-claw/MenuClaw.types.ts"],"names":[],"mappings":"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"}
|
package/dist/types/components/menu-claw/_internal/menu-claw-history/MenuClawHistoryPanel.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuClawHistoryPanel.d.ts","sourceRoot":"","sources":["../../../../../../src/components/menu-claw/_internal/menu-claw-history/MenuClawHistoryPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAKpD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AAG9E;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,
|
|
1
|
+
{"version":3,"file":"MenuClawHistoryPanel.d.ts","sourceRoot":"","sources":["../../../../../../src/components/menu-claw/_internal/menu-claw-history/MenuClawHistoryPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAKpD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AAG9E;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAmLlE,CAAC"}
|
package/dist/types/components/menu-claw/_internal/menu-claw-history/MenuClawHistoryPanel.types.d.ts
CHANGED
|
@@ -24,10 +24,6 @@ export type MenuClawHistoryPanelProps = {
|
|
|
24
24
|
showMoreLabel: string;
|
|
25
25
|
/** Etiqueta del botón que vuelve a plegar la lista. */
|
|
26
26
|
showLessLabel: string;
|
|
27
|
-
/** Texto para lectores de pantalla de una fila con novedad (`hasNews`). */
|
|
28
|
-
newsLabel: string;
|
|
29
|
-
/** Texto para lectores de pantalla del punto agregado del lateral comprimido. */
|
|
30
|
-
collapsedNewsLabel: string;
|
|
31
27
|
/**
|
|
32
28
|
* Se invoca antes del `onSelect` del ítem, para que el menú cierre el lateral
|
|
33
29
|
* en móvil igual que hace con los ítems de navegación.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuClawHistoryPanel.types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/menu-claw/_internal/menu-claw-history/MenuClawHistoryPanel.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,MAAM,yBAAyB,GAAG;IACvC,yDAAyD;IACzD,KAAK,EAAE,mBAAmB,EAAE,CAAC;IAC7B,sDAAsD;IACtD,mBAAmB,EAAE,MAAM,CAAC;IAC5B,mFAAmF;IACnF,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,sEAAsE;IACtE,OAAO,EAAE,OAAO,CAAC;IACjB,mEAAmE;IACnE,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,kEAAkE;IAClE,aAAa,EAAE,OAAO,CAAC;IACvB,uDAAuD;IACvD,aAAa,EAAE,MAAM,CAAC;IACtB,8EAA8E;IAC9E,WAAW,EAAE,OAAO,CAAC;IACrB,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,gDAAgD;IAChD,QAAQ,EAAE,MAAM,CAAC;IACjB,0DAA0D;IAC1D,aAAa,EAAE,MAAM,CAAC;IACtB,uDAAuD;IACvD,aAAa,EAAE,MAAM,CAAC;IACtB
|
|
1
|
+
{"version":3,"file":"MenuClawHistoryPanel.types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/menu-claw/_internal/menu-claw-history/MenuClawHistoryPanel.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEhE,MAAM,MAAM,yBAAyB,GAAG;IACvC,yDAAyD;IACzD,KAAK,EAAE,mBAAmB,EAAE,CAAC;IAC7B,sDAAsD;IACtD,mBAAmB,EAAE,MAAM,CAAC;IAC5B,mFAAmF;IACnF,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,sEAAsE;IACtE,OAAO,EAAE,OAAO,CAAC;IACjB,mEAAmE;IACnE,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,kEAAkE;IAClE,aAAa,EAAE,OAAO,CAAC;IACvB,uDAAuD;IACvD,aAAa,EAAE,MAAM,CAAC;IACtB,8EAA8E;IAC9E,WAAW,EAAE,OAAO,CAAC;IACrB,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,gDAAgD;IAChD,QAAQ,EAAE,MAAM,CAAC;IACjB,0DAA0D;IAC1D,aAAa,EAAE,MAAM,CAAC;IACtB,uDAAuD;IACvD,aAAa,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;CAC5B,CAAC"}
|