@imj_media/ui 1.10.5 → 1.10.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/CHANGELOG.md +11 -0
- package/README.md +1 -1
- package/catalog/design-index.json +114 -9
- package/dist/index.css +1 -1
- package/dist/index.esm.js +129 -156
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/modules/Alert/components/atoms/AlertHeader.d.ts.map +1 -1
- package/dist/modules/Button/components/organisms/Button.d.ts.map +1 -1
- package/dist/modules/Button/stories/Button.stories.d.ts.map +1 -1
- package/dist/modules/Dropdown/components/Dropdown.d.ts.map +1 -1
- package/dist/modules/FileUploader/components/organisms/FileUploader.d.ts.map +1 -1
- package/dist/modules/Ghantt/Ghantt.d.ts.map +1 -1
- package/dist/modules/Ghantt/GhanttTimelineHeader.d.ts.map +1 -1
- package/dist/modules/InnerButton/InnerButton.d.ts.map +1 -1
- package/dist/modules/InnerButton/stories/InnerButton.stories.d.ts.map +1 -1
- package/dist/modules/LegacyButton/InnerLegacyButton.d.ts.map +1 -1
- package/dist/modules/Message/Message.api.d.ts +1 -1
- package/dist/modules/Message/Message.api.d.ts.map +1 -1
- package/dist/modules/Message/Message.types.d.ts +1 -1
- package/dist/modules/Message/Message.types.d.ts.map +1 -1
- package/dist/modules/Message/components/molecules/NotificationItemStackDeck.d.ts.map +1 -1
- package/dist/modules/Message/components/molecules/NotificationPositions.d.ts.map +1 -1
- package/dist/modules/Message/components/molecules/notificationItemCardMapping.d.ts.map +1 -1
- package/dist/modules/Message/components/molecules/notificationItemStackLayout.d.ts.map +1 -1
- package/dist/modules/Message/hooks/useNotificationItemDeck.d.ts.map +1 -1
- package/dist/modules/Message/services/notificationServiceNormalizeOptions.d.ts.map +1 -1
- package/dist/modules/Message/stories/message.stories.d.ts.map +1 -1
- package/dist/modules/Message/stories/notification-storycode.stories.d.ts.map +1 -1
- package/dist/modules/Message/stories/notification.stories.d.ts.map +1 -1
- package/dist/modules/Notification/components/molecules/NotificationContentBody.d.ts.map +1 -1
- package/dist/modules/Notification/index.d.ts.map +1 -1
- package/dist/modules/Notification/stories/notification.stories.d.ts.map +1 -1
- package/dist/modules/Switch/stories/switch.stories.d.ts.map +1 -1
- package/dist/modules/Table/Table.d.ts.map +1 -1
- package/dist/modules/Table/components/atoms/GanttCell.d.ts.map +1 -1
- package/dist/modules/Table/components/molecules/CellRenderer.d.ts.map +1 -1
- package/dist/modules/Table/components/organisms/TableContent.d.ts.map +1 -1
- package/dist/modules/Table/components/organisms/TableToolbar.d.ts.map +1 -1
- package/dist/modules/Table/hooks/useTableColumns.d.ts.map +1 -1
- package/dist/modules/Table/hooks/useTableSelection.d.ts.map +1 -1
- package/dist/modules/Table/stories/Table.stories.d.ts.map +1 -1
- package/dist/modules/Table/utils/columnLockable.d.ts.map +1 -1
- package/dist/modules/Tabs/components/index.d.ts +2 -0
- package/dist/modules/Tabs/components/index.d.ts.map +1 -0
- package/dist/modules/Tabs/components/organisms/Tabs.d.ts +23 -0
- package/dist/modules/Tabs/components/organisms/Tabs.d.ts.map +1 -0
- package/dist/modules/Tabs/components/organisms/index.d.ts +2 -0
- package/dist/modules/Tabs/components/organisms/index.d.ts.map +1 -0
- package/dist/modules/Tabs/hooks/index.d.ts +2 -0
- package/dist/modules/Tabs/hooks/index.d.ts.map +1 -0
- package/dist/modules/Tabs/hooks/useTabs.d.ts +24 -0
- package/dist/modules/Tabs/hooks/useTabs.d.ts.map +1 -0
- package/dist/modules/Tabs/index.d.ts +4 -0
- package/dist/modules/Tabs/index.d.ts.map +1 -0
- package/dist/modules/Tabs/stories/tabs.stories.d.ts +20 -0
- package/dist/modules/Tabs/stories/tabs.stories.d.ts.map +1 -0
- package/dist/modules/Tabs/types/index.d.ts +73 -0
- package/dist/modules/Tabs/types/index.d.ts.map +1 -0
- package/dist/modules/TextListWithData/components/organisms/TextListWithData.d.ts.map +1 -1
- package/dist/shared/ghantt/GhanttSlotStrip.d.ts.map +1 -1
- package/package.json +6 -5
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,17 @@ y este proyecto adhiere a [Semantic Versioning](https://semver.org/lang/es/).
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.10.6] - 2026-05-25
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **`Tabs`:** nuevo módulo composable con componente `Tabs`, hook `useTabs`, tipos y stories.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- **ESLint / Prettier:** reglas de formato (comillas, semicolons, trailing commas, indentación, espaciado) delegadas a Prettier vía `eslint-config-prettier`; ESLint ya no reporta conflictos de formato.
|
|
19
|
+
- **Formato global:** Prettier aplicado en todos los módulos (trailing commas en args, indentación, orden de clases Tailwind vía `prettier-plugin-tailwindcss`).
|
|
20
|
+
|
|
10
21
|
## [1.10.5] - 2026-05-25
|
|
11
22
|
|
|
12
23
|
### Fixed
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Biblioteca de componentes UI moderna y accesible para React, construida con TypeScript y Tailwind CSS.
|
|
6
6
|
|
|
7
|
-
> **Versión publicada:** `1.10.
|
|
7
|
+
> **Versión publicada:** `1.10.6` — actualizar este número y `CHANGELOG.md` antes de cada release (orden y scripts: regla **`imj-ui-obligations-release`**; atajo `npm run publish:patch|minor|major` o pasos `bump:*` → `release:git` → `release:publish`).
|
|
8
8
|
|
|
9
9
|
## 📦 Instalación
|
|
10
10
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
3
|
"package": "@imj_media/ui",
|
|
4
|
-
"version": "1.10.
|
|
5
|
-
"indexedAt": "2026-05-
|
|
4
|
+
"version": "1.10.6",
|
|
5
|
+
"indexedAt": "2026-05-25T23:17:58.142Z",
|
|
6
6
|
"orbitTokensVersion": "1.3.1",
|
|
7
7
|
"modules": [
|
|
8
8
|
{
|
|
@@ -396,7 +396,7 @@
|
|
|
396
396
|
"description": {
|
|
397
397
|
"primary": "storybook",
|
|
398
398
|
"storybook": "El componente Drawer permite mostrar contenido en un panel lateral deslizable con diferentes tamaños, posiciones y configuraciones de botones.",
|
|
399
|
-
"jsdoc": "DrawerFooter - Subcomponente de footer para Drawer\n@internal\n/\nconst DrawerFooter = ({ children, className }: DrawerFooterProps) => {\n return (\n <Card.Footer\n className={cn('ui-flex ui-items-center ui-justify-end ui-gap-x-16 ui-p-16', className)}\n >\n {children}\n </Card.Footer>\n );\n};\n\n// Nombre para identificar el componente\nDrawerFooter.displayName = 'DrawerFooter';\n\n// Función auxiliar para extraer el footer de los children\nconst extractFooterFromChildren = (\n children: ReactNode
|
|
399
|
+
"jsdoc": "DrawerFooter - Subcomponente de footer para Drawer\n@internal\n/\nconst DrawerFooter = ({ children, className }: DrawerFooterProps) => {\n return (\n <Card.Footer\n className={cn('ui-flex ui-items-center ui-justify-end ui-gap-x-16 ui-p-16', className)}\n >\n {children}\n </Card.Footer>\n );\n};\n\n// Nombre para identificar el componente\nDrawerFooter.displayName = 'DrawerFooter';\n\n// Función auxiliar para extraer el footer de los children\nconst extractFooterFromChildren = (\n children: ReactNode\n): { content: ReactNode[]; footer: ReactElement | null } => {\n const content: ReactNode[] = [];\n let footer: ReactElement | null = null;\n\n Children.forEach(children, (child) => {\n if (\n isValidElement(child) &&\n (child.type as { displayName?: string })?.displayName === 'Draw",
|
|
400
400
|
"confidence": "high"
|
|
401
401
|
},
|
|
402
402
|
"examples": [
|
|
@@ -821,7 +821,7 @@
|
|
|
821
821
|
"description": {
|
|
822
822
|
"primary": "storybook",
|
|
823
823
|
"storybook": "Tabla estándar con una columna Gantt. La API voluminosa va en el objeto",
|
|
824
|
-
"jsdoc": "X del puntero respecto al borde izquierdo del **mismo** elemento cuyo `scrollLeft` define el desplazamiento\n(viewport de cabecera). Si se mide con el padre del track del cuerpo, thead/tbody pueden desalinearse\n(p. ej. scrollbar vertical solo en el cuerpo) y `scrollLeft + x` cae en el inicio del contenido → anclas en ~2015.\n/\nfunction ghanttWheelTimelineViewportClientX(\n scrollViewportEl: HTMLElement | null,\n clientX: number
|
|
824
|
+
"jsdoc": "X del puntero respecto al borde izquierdo del **mismo** elemento cuyo `scrollLeft` define el desplazamiento\n(viewport de cabecera). Si se mide con el padre del track del cuerpo, thead/tbody pueden desalinearse\n(p. ej. scrollbar vertical solo en el cuerpo) y `scrollLeft + x` cae en el inicio del contenido → anclas en ~2015.\n/\nfunction ghanttWheelTimelineViewportClientX(\n scrollViewportEl: HTMLElement | null,\n clientX: number\n): number {\n const el = scrollViewportEl;\n if (!el) return 0;\n const r = el.getBoundingClientRect();\n const w = el.clientWidth > 0 ? el.clientWidth : r.width;\n return Math.max(0, Math.min(w, clientX - r.left));\n}\n\nconst DEFAULT_APPEARANCE = {\n trackMinHeightPx: 44,\n} as const;\n\nconst DEFAULT_EVENTS = {} as const;\n\n/**\nTabla estándar {@link Table} con **una colum",
|
|
825
825
|
"confidence": "high"
|
|
826
826
|
},
|
|
827
827
|
"examples": [
|
|
@@ -1659,7 +1659,7 @@
|
|
|
1659
1659
|
"kind": "component",
|
|
1660
1660
|
"description": {
|
|
1661
1661
|
"primary": "jsdoc",
|
|
1662
|
-
"jsdoc": "Acota el puntero al rectángulo del trigger en coordenadas de viewport.\nDevuelve la esquina superior izquierda de un ancla 1×1 lógica dentro del trigger\n(recorrido píxel a píxel cuando el trigger tiene tamaño entero en CSS px).\n/\nexport function clampClientPointForPopupAnchor(\n triggerRect: DOMRectReadOnly,\n clientX: number,\n clientY: number
|
|
1662
|
+
"jsdoc": "Acota el puntero al rectángulo del trigger en coordenadas de viewport.\nDevuelve la esquina superior izquierda de un ancla 1×1 lógica dentro del trigger\n(recorrido píxel a píxel cuando el trigger tiene tamaño entero en CSS px).\n/\nexport function clampClientPointForPopupAnchor(\n triggerRect: DOMRectReadOnly,\n clientX: number,\n clientY: number\n): { x: number; y: number } {\n const rw = Math.max(triggerRect.width, 0);\n const rh = Math.max(triggerRect.height, 0);\n const insetX = rw > 0 ? Math.min(1, rw) : 0;\n const insetY = rh > 0 ? Math.min(1, rh) : 0;\n const maxX = rw > 0 ? triggerRect.right - insetX : triggerRect.left;\n const maxY = rh > 0 ? triggerRect.bottom - insetY : triggerRect.top;\n const x = Math.min(Math.max(clientX, triggerRect.left), maxX);\n const y = Math.min(Math.max(cl",
|
|
1663
1663
|
"readme": "# Popup Component\n\nComponente de popup/dropdown posicionable y configurable que se posiciona relativamente a un trigger, con soporte para múltiples posiciones, cierre automático, tooltips e iconos.\n\n## Estructura\n\n```\nPopup/\n├── components/\n│ └── organisms/\n│ └── Popup.tsx # Componente principal\n├── hooks/ # Hooks personalizados\n├── stories/\n│ └── Popup.stories.tsx # Storybook stories\n└── index.ts # Export del módulo\n```\n\n## Uso Básico\n\n```tsx\nimport { Popup } from '@imj_media/ui';\nimport { useRef } from 'react';\n\n// Popup simple\nconst popupRef = useRef<PopupRef>(null);\n\n<Popup ref={popupRef} label=\"Abrir popup\" position=\"bottom-right\">\n <div>Contenido del popup</div>\n</Popup>;\n```\n\n## Props Principales\n\n### Control del Popup\n\n- `label?: string` - Texto del botón trigger\n- `position?: PopupPosition` - Posición del popup relativa al trigger (default: `'bottom-right'`)\n- `offset?: number` - Distancia en píxeles entre el trigger y el popup (default: `6`)\n- `popupId?: string` - ID único del popup (auto-generado si no se proporciona)\n\n### Comportamiento\n\n- `closeOnClickOutside?: boolean` - Cerrar al hacer clic fuera (default: `true`)\n- `closeOnEscape?: boolean` - Cerrar con tecla Escape (default: `true`)\n- `closeOnClick?: boolean` - Cerrar al hacer clic en el trigger (default: `true`)\n- `disabled?: boolean` - Deshabilitar el popup (default: `false`)\n\n### Estilo del Trigger\n\n- `theme?: 'solid' | 'outlined' | 'text' | 'ghost'` - Tema del botón trigger (default: `'solid'`)\n- `color?: ButtonColors` - Color del botón trigger (default: `'tertiary'`)\n- `size?: 'xs' | 'sm' | 'md' | 'lg'` - Tamaño del botón trigger (default: `'xs'`)\n- `rounded?: boolean` - Bordes redondeados (default: `false`)\n- `pill?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'full'` - Radio de borde (default: `'xs'`)\n- `borderRadius?: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl'` - Radio de borde del popup (default: `'sm'`)\n\n### Slots e Iconos\n\n- `icon?: I",
|
|
1664
1664
|
"confidence": "medium"
|
|
1665
1665
|
},
|
|
@@ -1676,7 +1676,7 @@
|
|
|
1676
1676
|
"kind": "component",
|
|
1677
1677
|
"description": {
|
|
1678
1678
|
"primary": "jsdoc",
|
|
1679
|
-
"jsdoc": "Acota el puntero al rectángulo del trigger en coordenadas de viewport.\nDevuelve la esquina superior izquierda de un ancla 1×1 lógica dentro del trigger\n(recorrido píxel a píxel cuando el trigger tiene tamaño entero en CSS px).\n/\nexport function clampClientPointForPopupAnchor(\n triggerRect: DOMRectReadOnly,\n clientX: number,\n clientY: number
|
|
1679
|
+
"jsdoc": "Acota el puntero al rectángulo del trigger en coordenadas de viewport.\nDevuelve la esquina superior izquierda de un ancla 1×1 lógica dentro del trigger\n(recorrido píxel a píxel cuando el trigger tiene tamaño entero en CSS px).\n/\nexport function clampClientPointForPopupAnchor(\n triggerRect: DOMRectReadOnly,\n clientX: number,\n clientY: number\n): { x: number; y: number } {\n const rw = Math.max(triggerRect.width, 0);\n const rh = Math.max(triggerRect.height, 0);\n const insetX = rw > 0 ? Math.min(1, rw) : 0;\n const insetY = rh > 0 ? Math.min(1, rh) : 0;\n const maxX = rw > 0 ? triggerRect.right - insetX : triggerRect.left;\n const maxY = rh > 0 ? triggerRect.bottom - insetY : triggerRect.top;\n const x = Math.min(Math.max(clientX, triggerRect.left), maxX);\n const y = Math.min(Math.max(cl",
|
|
1680
1680
|
"readme": "# Popup Component\n\nComponente de popup/dropdown posicionable y configurable que se posiciona relativamente a un trigger, con soporte para múltiples posiciones, cierre automático, tooltips e iconos.\n\n## Estructura\n\n```\nPopup/\n├── components/\n│ └── organisms/\n│ └── Popup.tsx # Componente principal\n├── hooks/ # Hooks personalizados\n├── stories/\n│ └── Popup.stories.tsx # Storybook stories\n└── index.ts # Export del módulo\n```\n\n## Uso Básico\n\n```tsx\nimport { Popup } from '@imj_media/ui';\nimport { useRef } from 'react';\n\n// Popup simple\nconst popupRef = useRef<PopupRef>(null);\n\n<Popup ref={popupRef} label=\"Abrir popup\" position=\"bottom-right\">\n <div>Contenido del popup</div>\n</Popup>;\n```\n\n## Props Principales\n\n### Control del Popup\n\n- `label?: string` - Texto del botón trigger\n- `position?: PopupPosition` - Posición del popup relativa al trigger (default: `'bottom-right'`)\n- `offset?: number` - Distancia en píxeles entre el trigger y el popup (default: `6`)\n- `popupId?: string` - ID único del popup (auto-generado si no se proporciona)\n\n### Comportamiento\n\n- `closeOnClickOutside?: boolean` - Cerrar al hacer clic fuera (default: `true`)\n- `closeOnEscape?: boolean` - Cerrar con tecla Escape (default: `true`)\n- `closeOnClick?: boolean` - Cerrar al hacer clic en el trigger (default: `true`)\n- `disabled?: boolean` - Deshabilitar el popup (default: `false`)\n\n### Estilo del Trigger\n\n- `theme?: 'solid' | 'outlined' | 'text' | 'ghost'` - Tema del botón trigger (default: `'solid'`)\n- `color?: ButtonColors` - Color del botón trigger (default: `'tertiary'`)\n- `size?: 'xs' | 'sm' | 'md' | 'lg'` - Tamaño del botón trigger (default: `'xs'`)\n- `rounded?: boolean` - Bordes redondeados (default: `false`)\n- `pill?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'full'` - Radio de borde (default: `'xs'`)\n- `borderRadius?: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl'` - Radio de borde del popup (default: `'sm'`)\n\n### Slots e Iconos\n\n- `icon?: I",
|
|
1681
1681
|
"confidence": "medium"
|
|
1682
1682
|
},
|
|
@@ -1693,7 +1693,7 @@
|
|
|
1693
1693
|
"kind": "component",
|
|
1694
1694
|
"description": {
|
|
1695
1695
|
"primary": "jsdoc",
|
|
1696
|
-
"jsdoc": "Acota el puntero al rectángulo del trigger en coordenadas de viewport.\nDevuelve la esquina superior izquierda de un ancla 1×1 lógica dentro del trigger\n(recorrido píxel a píxel cuando el trigger tiene tamaño entero en CSS px).\n/\nexport function clampClientPointForPopupAnchor(\n triggerRect: DOMRectReadOnly,\n clientX: number,\n clientY: number
|
|
1696
|
+
"jsdoc": "Acota el puntero al rectángulo del trigger en coordenadas de viewport.\nDevuelve la esquina superior izquierda de un ancla 1×1 lógica dentro del trigger\n(recorrido píxel a píxel cuando el trigger tiene tamaño entero en CSS px).\n/\nexport function clampClientPointForPopupAnchor(\n triggerRect: DOMRectReadOnly,\n clientX: number,\n clientY: number\n): { x: number; y: number } {\n const rw = Math.max(triggerRect.width, 0);\n const rh = Math.max(triggerRect.height, 0);\n const insetX = rw > 0 ? Math.min(1, rw) : 0;\n const insetY = rh > 0 ? Math.min(1, rh) : 0;\n const maxX = rw > 0 ? triggerRect.right - insetX : triggerRect.left;\n const maxY = rh > 0 ? triggerRect.bottom - insetY : triggerRect.top;\n const x = Math.min(Math.max(clientX, triggerRect.left), maxX);\n const y = Math.min(Math.max(cl",
|
|
1697
1697
|
"readme": "# Popup Component\n\nComponente de popup/dropdown posicionable y configurable que se posiciona relativamente a un trigger, con soporte para múltiples posiciones, cierre automático, tooltips e iconos.\n\n## Estructura\n\n```\nPopup/\n├── components/\n│ └── organisms/\n│ └── Popup.tsx # Componente principal\n├── hooks/ # Hooks personalizados\n├── stories/\n│ └── Popup.stories.tsx # Storybook stories\n└── index.ts # Export del módulo\n```\n\n## Uso Básico\n\n```tsx\nimport { Popup } from '@imj_media/ui';\nimport { useRef } from 'react';\n\n// Popup simple\nconst popupRef = useRef<PopupRef>(null);\n\n<Popup ref={popupRef} label=\"Abrir popup\" position=\"bottom-right\">\n <div>Contenido del popup</div>\n</Popup>;\n```\n\n## Props Principales\n\n### Control del Popup\n\n- `label?: string` - Texto del botón trigger\n- `position?: PopupPosition` - Posición del popup relativa al trigger (default: `'bottom-right'`)\n- `offset?: number` - Distancia en píxeles entre el trigger y el popup (default: `6`)\n- `popupId?: string` - ID único del popup (auto-generado si no se proporciona)\n\n### Comportamiento\n\n- `closeOnClickOutside?: boolean` - Cerrar al hacer clic fuera (default: `true`)\n- `closeOnEscape?: boolean` - Cerrar con tecla Escape (default: `true`)\n- `closeOnClick?: boolean` - Cerrar al hacer clic en el trigger (default: `true`)\n- `disabled?: boolean` - Deshabilitar el popup (default: `false`)\n\n### Estilo del Trigger\n\n- `theme?: 'solid' | 'outlined' | 'text' | 'ghost'` - Tema del botón trigger (default: `'solid'`)\n- `color?: ButtonColors` - Color del botón trigger (default: `'tertiary'`)\n- `size?: 'xs' | 'sm' | 'md' | 'lg'` - Tamaño del botón trigger (default: `'xs'`)\n- `rounded?: boolean` - Bordes redondeados (default: `false`)\n- `pill?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'full'` - Radio de borde (default: `'xs'`)\n- `borderRadius?: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl'` - Radio de borde del popup (default: `'sm'`)\n\n### Slots e Iconos\n\n- `icon?: I",
|
|
1698
1698
|
"confidence": "medium"
|
|
1699
1699
|
},
|
|
@@ -1718,7 +1718,7 @@
|
|
|
1718
1718
|
"kind": "component",
|
|
1719
1719
|
"description": {
|
|
1720
1720
|
"primary": "jsdoc",
|
|
1721
|
-
"jsdoc": "Tamaños válidos para ProgressBar */\nconst VALID_SIZES: ProgressBarSize[] = ['xxs', 'xs', 'sm', 'md', 'lg'];\n\n/**\nHook interno para manejar la cuenta regresiva del ProgressBar.\nAnima el progreso desde un valor inicial hasta 0 en un tiempo determinado.\n/\nconst useCountdown = (\n initialProgress: number,\n countdownSeconds: number | undefined,\n onComplete?: () => void
|
|
1721
|
+
"jsdoc": "Tamaños válidos para ProgressBar */\nconst VALID_SIZES: ProgressBarSize[] = ['xxs', 'xs', 'sm', 'md', 'lg'];\n\n/**\nHook interno para manejar la cuenta regresiva del ProgressBar.\nAnima el progreso desde un valor inicial hasta 0 en un tiempo determinado.\n/\nconst useCountdown = (\n initialProgress: number,\n countdownSeconds: number | undefined,\n onComplete?: () => void\n) => {\n const [currentProgress, setCurrentProgress] = useState(initialProgress);\n const intervalRef = useRef<NodeJS.Timeout | null>(null);\n const startTimeRef = useRef<number>(0);\n const hasCompletedRef = useRef(false);\n // Guardar el callback en una ref para evitar que esté en las dependencias del useEffect\n const onCompleteRef = useRef(onComplete);\n\n const INTERVAL_MS = 16; // ~60fps\n\n // Mantener la ref actualizada",
|
|
1722
1722
|
"confidence": "medium"
|
|
1723
1723
|
},
|
|
1724
1724
|
"examples": [
|
|
@@ -2014,7 +2014,7 @@
|
|
|
2014
2014
|
"kind": "component",
|
|
2015
2015
|
"description": {
|
|
2016
2016
|
"primary": "jsdoc",
|
|
2017
|
-
"jsdoc": "Tipografía del label en control `md`: tamaño/interlineado/tracking Regular + peso Bold (spec Type/Body/SM). */\nconst SWITCH_MD_LABEL_TYPOGRAPHY =\n 'ui-text-body-sm-regular ui-font-body-sm-bold ui-leading-body-sm-regular ui-tracking-body-sm';\n\nfunction optionSlotToButtonSlotConfig(\n icon: SwitchOption['leftSlot'],\n colorIcon: IconFontColor | undefined,\n duotone: Pick<\n ButtonSlotConfig,\n | 'iconDuotonePrimary'\n | 'iconDuotoneSecondary'\n | 'iconDuotoneOpacityPrimary'\n | 'iconDuotoneOpacitySecondary'\n >,\n defaultIconFontSize: IconFontSize,\n optionIconFontSize?: IconFontSize
|
|
2017
|
+
"jsdoc": "Tipografía del label en control `md`: tamaño/interlineado/tracking Regular + peso Bold (spec Type/Body/SM). */\nconst SWITCH_MD_LABEL_TYPOGRAPHY =\n 'ui-text-body-sm-regular ui-font-body-sm-bold ui-leading-body-sm-regular ui-tracking-body-sm';\n\nfunction optionSlotToButtonSlotConfig(\n icon: SwitchOption['leftSlot'],\n colorIcon: IconFontColor | undefined,\n duotone: Pick<\n ButtonSlotConfig,\n | 'iconDuotonePrimary'\n | 'iconDuotoneSecondary'\n | 'iconDuotoneOpacityPrimary'\n | 'iconDuotoneOpacitySecondary'\n >,\n defaultIconFontSize: IconFontSize,\n optionIconFontSize?: IconFontSize\n): ButtonSlotConfig | undefined {\n if (icon === null || icon === undefined) {\n return undefined;\n }\n return {\n icon,\n ...(colorIcon !== undefined ? { colorIcon } : {}),\n ...duotone,",
|
|
2018
2018
|
"confidence": "medium"
|
|
2019
2019
|
},
|
|
2020
2020
|
"examples": [
|
|
@@ -2067,6 +2067,111 @@
|
|
|
2067
2067
|
}
|
|
2068
2068
|
]
|
|
2069
2069
|
},
|
|
2070
|
+
{
|
|
2071
|
+
"id": "Tabs",
|
|
2072
|
+
"path": "src/modules/Tabs",
|
|
2073
|
+
"legacy": false,
|
|
2074
|
+
"compositionType": 1,
|
|
2075
|
+
"exports": [
|
|
2076
|
+
{
|
|
2077
|
+
"name": "Tabs",
|
|
2078
|
+
"kind": "component",
|
|
2079
|
+
"description": {
|
|
2080
|
+
"primary": "storybook",
|
|
2081
|
+
"storybook": "Componente de navegación con pestañas. Soporta modos controlado (",
|
|
2082
|
+
"jsdoc": "Tabs — navigation component with size and pill variants.\nRenders a tablist with selectable tabs, optional icons, optional add button,\nand accessible keyboard navigation (ArrowLeft/Right, Home, End).",
|
|
2083
|
+
"confidence": "high"
|
|
2084
|
+
},
|
|
2085
|
+
"examples": [
|
|
2086
|
+
"import { Tabs } from '@imj_media/ui';\nimport { useState } from 'react';\nimport { faShapes, faCode, faEye, faGear } from '@fortawesome/pro-regular-svg-icons';\n\nconst items = [\n { id: 'design', label: 'Design', icon: faShapes },\n { id: 'code', label: 'Code', icon: faCode },\n { id: 'preview', label: 'Preview', icon: faEye },\n { id: 'settings', label: 'Settings', icon: faGear },\n];\n\nexport default function EditorTabs() {\n const [active, setActive] = useState('design');\n\n return (\n <Tabs\n items={items}\n appearance={{ size: 'md', pill: true }}\n selection={{ activeTab: active, onTabChange: setActive }}\n addButton={{ show: true, onClick: () => addNewTab() }}\n />\n );\n}",
|
|
2087
|
+
"<Tabs\n items={items}\n appearance={{ size: 'lg', pill: true }}\n selection={{ defaultActiveTab: 'code' }}\n addButton={{ show: true }}\n/>",
|
|
2088
|
+
"<Tabs\n items={items}\n appearance={{ size: 'md', pill: true }}\n selection={{ defaultActiveTab: 'design' }}\n addButton={{ show: true }}\n/>",
|
|
2089
|
+
"<Tabs\n items={items}\n appearance={{ size: 'sm', pill: true }}\n selection={{ defaultActiveTab: 'design' }}\n addButton={{ show: true }}\n/>",
|
|
2090
|
+
"<Tabs\n items={items}\n appearance={{ size: 'xs', pill: true }}\n selection={{ defaultActiveTab: 'design' }}\n addButton={{ show: true }}\n/>"
|
|
2091
|
+
],
|
|
2092
|
+
"props": {
|
|
2093
|
+
"groups": {
|
|
2094
|
+
"tabsAddButton": {
|
|
2095
|
+
"props": {
|
|
2096
|
+
"show": {
|
|
2097
|
+
"name": "show",
|
|
2098
|
+
"type": "boolean",
|
|
2099
|
+
"required": false
|
|
2100
|
+
},
|
|
2101
|
+
"onClick": {
|
|
2102
|
+
"name": "onClick",
|
|
2103
|
+
"type": "() => void",
|
|
2104
|
+
"required": false
|
|
2105
|
+
}
|
|
2106
|
+
}
|
|
2107
|
+
},
|
|
2108
|
+
"tabs": {
|
|
2109
|
+
"props": {
|
|
2110
|
+
"items": {
|
|
2111
|
+
"name": "items",
|
|
2112
|
+
"type": "TabItem[]",
|
|
2113
|
+
"required": true
|
|
2114
|
+
},
|
|
2115
|
+
"className": {
|
|
2116
|
+
"name": "className",
|
|
2117
|
+
"type": "string",
|
|
2118
|
+
"required": false
|
|
2119
|
+
},
|
|
2120
|
+
"appearance": {
|
|
2121
|
+
"name": "appearance",
|
|
2122
|
+
"type": "TabsAppearanceProps",
|
|
2123
|
+
"required": false
|
|
2124
|
+
},
|
|
2125
|
+
"selection": {
|
|
2126
|
+
"name": "selection",
|
|
2127
|
+
"type": "TabsSelectionProps",
|
|
2128
|
+
"required": false
|
|
2129
|
+
},
|
|
2130
|
+
"addButton": {
|
|
2131
|
+
"name": "addButton",
|
|
2132
|
+
"type": "TabsAddButtonProps",
|
|
2133
|
+
"required": false
|
|
2134
|
+
}
|
|
2135
|
+
}
|
|
2136
|
+
}
|
|
2137
|
+
},
|
|
2138
|
+
"deprecatedRoot": [],
|
|
2139
|
+
"flat": {
|
|
2140
|
+
"items": {
|
|
2141
|
+
"name": "items",
|
|
2142
|
+
"type": "TabItem[]",
|
|
2143
|
+
"required": true,
|
|
2144
|
+
"description": "Array of tab items to render."
|
|
2145
|
+
},
|
|
2146
|
+
"className": {
|
|
2147
|
+
"name": "className",
|
|
2148
|
+
"type": "string",
|
|
2149
|
+
"required": false,
|
|
2150
|
+
"description": "Additional CSS classes for the root container."
|
|
2151
|
+
},
|
|
2152
|
+
"appearance": {
|
|
2153
|
+
"name": "appearance",
|
|
2154
|
+
"type": "TabsAppearanceProps",
|
|
2155
|
+
"required": false,
|
|
2156
|
+
"description": "Appearance configuration (size and pill shape)."
|
|
2157
|
+
},
|
|
2158
|
+
"selection": {
|
|
2159
|
+
"name": "selection",
|
|
2160
|
+
"type": "TabsSelectionProps",
|
|
2161
|
+
"required": false,
|
|
2162
|
+
"description": "Selection/state control."
|
|
2163
|
+
},
|
|
2164
|
+
"addButton": {
|
|
2165
|
+
"name": "addButton",
|
|
2166
|
+
"type": "TabsAddButtonProps",
|
|
2167
|
+
"required": false,
|
|
2168
|
+
"description": "Add button configuration."
|
|
2169
|
+
}
|
|
2170
|
+
}
|
|
2171
|
+
}
|
|
2172
|
+
}
|
|
2173
|
+
]
|
|
2174
|
+
},
|
|
2070
2175
|
{
|
|
2071
2176
|
"id": "Tag",
|
|
2072
2177
|
"path": "src/modules/Tag",
|