@rubenpazch/empty-state 0.0.0-stage → 0.1.1
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 +31 -2
- package/dist/EmptyState.d.ts +20 -0
- package/dist/EmptyState.d.ts.map +1 -0
- package/dist/index.cjs.js +2 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.esm.js +2 -0
- package/dist/index.esm.js.map +1 -0
- package/package.json +75 -3
package/README.md
CHANGED
|
@@ -1,3 +1,32 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @rubenpazch/empty-state
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<!-- catalogo:inicio (generado por pnpm catalogo, no editar) -->
|
|
4
|
+
|
|
5
|
+
Estado vacío con icono, título, descripción y acciones ("No hay convocatorias · Crear").
|
|
6
|
+
|
|
7
|
+
- **Usar cuando:** Listas, tablas o búsquedas sin resultados; primera vez que se usa una sección.
|
|
8
|
+
- **Evitar cuando:** Errores de carga: usa Alert variant="danger".
|
|
9
|
+
|
|
10
|
+
Se recomienda instalar el paquete completo `@rubenpazch/ui` (incluye este). Por separado:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install @rubenpazch/empty-state
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## EmptyState
|
|
17
|
+
|
|
18
|
+
Estado vacío: lo que se muestra cuando una lista o búsqueda no tiene resultados.
|
|
19
|
+
|
|
20
|
+
| Prop | Tipo | Req. | Por defecto | Descripción |
|
|
21
|
+
| ----------------- | -------------- | ---- | ----------- | ----------------------------------------------------------------------- |
|
|
22
|
+
| `title` | `ReactNode` | sí | | Título: "No hay convocatorias". |
|
|
23
|
+
| `action` | `ReactNode` | | | Acción principal: normalmente un Button "Crear…". |
|
|
24
|
+
| `className` | `string` | | | Clase extra. |
|
|
25
|
+
| `description` | `ReactNode` | | | Explicación o siguiente paso. |
|
|
26
|
+
| `icon` | `ReactNode` | | | Icono o ilustración (por defecto una bandeja vacía). `false` lo oculta. |
|
|
27
|
+
| `secondaryAction` | `ReactNode` | | | Acción secundaria (enlace o botón de texto). |
|
|
28
|
+
| `size` | `"sm" \| "md"` | | `md` | sm para dentro de tablas o tarjetas; md (por defecto) para una página. |
|
|
29
|
+
|
|
30
|
+
Tipos: `EmptyStateProps`.
|
|
31
|
+
|
|
32
|
+
<!-- catalogo:fin -->
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface EmptyStateProps {
|
|
3
|
+
/** Título: "No hay convocatorias". */
|
|
4
|
+
title: React.ReactNode;
|
|
5
|
+
/** Explicación o siguiente paso. */
|
|
6
|
+
description?: React.ReactNode;
|
|
7
|
+
/** Icono o ilustración (por defecto una bandeja vacía). `false` lo oculta. */
|
|
8
|
+
icon?: React.ReactNode | false;
|
|
9
|
+
/** Acción principal: normalmente un Button "Crear…". */
|
|
10
|
+
action?: React.ReactNode;
|
|
11
|
+
/** Acción secundaria (enlace o botón de texto). */
|
|
12
|
+
secondaryAction?: React.ReactNode;
|
|
13
|
+
/** sm para dentro de tablas o tarjetas; md (por defecto) para una página. */
|
|
14
|
+
size?: "sm" | "md";
|
|
15
|
+
/** Clase extra. */
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
/** Estado vacío: lo que se muestra cuando una lista o búsqueda no tiene resultados. */
|
|
19
|
+
export default function EmptyState({ title, description, icon, action, secondaryAction, size, className, }: EmptyStateProps): React.JSX.Element;
|
|
20
|
+
//# sourceMappingURL=EmptyState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../src/EmptyState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,eAAe;IAC9B,sCAAsC;IACtC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,oCAAoC;IACpC,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,8EAA8E;IAC9E,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC;IAC/B,wDAAwD;IACxD,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,mDAAmD;IACnD,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAClC,6EAA6E;IAC7E,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,mBAAmB;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAKD,uFAAuF;AACvF,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,KAAK,EACL,WAAW,EACX,IAAI,EACJ,MAAM,EACN,eAAe,EACf,IAAW,EACX,SAAS,GACV,EAAE,eAAe,qBAiCjB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime");var t={empty:"EmptyState-module_empty__PklWO",md:"EmptyState-module_md__ctmVT",sm:"EmptyState-module_sm__DKz2P",icon:"EmptyState-module_icon__pV4Uq",title:"EmptyState-module_title__lGnoi",description:"EmptyState-module_description__wVUrR",actions:"EmptyState-module_actions__pqhrX"};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&a.firstChild?a.insertBefore(o,a.firstChild):a.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(".EmptyState-module_empty__PklWO {\n display: flex;\n flex-direction: column;\n align-items: center;\n text-align: center;\n font-family: var(--lb-font-sans);\n color: var(--lb-color-foreground);\n}\n\n.EmptyState-module_md__ctmVT { padding: var(--lb-space-12) var(--lb-space-6); gap: var(--lb-space-2); }\n.EmptyState-module_sm__DKz2P { padding: var(--lb-space-6) var(--lb-space-4); gap: var(--lb-space-1); }\n\n.EmptyState-module_icon__pV4Uq {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 4rem;\n height: 4rem;\n margin-bottom: var(--lb-space-2);\n border-radius: var(--lb-radius-full);\n background: var(--lb-color-muted);\n color: var(--lb-color-muted-foreground);\n}\n\n.EmptyState-module_sm__DKz2P .EmptyState-module_icon__pV4Uq {\n width: 3rem;\n height: 3rem;\n}\n\n.EmptyState-module_sm__DKz2P .EmptyState-module_icon__pV4Uq svg {\n width: 28px;\n height: 28px;\n}\n\n.EmptyState-module_title__lGnoi {\n margin: 0;\n font-size: var(--lb-font-size-md);\n font-weight: var(--lb-font-weight-semibold);\n}\n\n.EmptyState-module_sm__DKz2P .EmptyState-module_title__lGnoi {\n font-size: var(--lb-font-size-sm);\n}\n\n.EmptyState-module_description__wVUrR {\n margin: 0;\n max-width: 28rem;\n font-size: var(--lb-font-size-sm);\n color: var(--lb-color-muted-foreground);\n}\n\n.EmptyState-module_actions__pqhrX {\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n gap: var(--lb-space-2);\n margin-top: var(--lb-space-3);\n}\n");const n=(...e)=>e.filter(Boolean).join(" ");module.exports=function({title:a,description:o,icon:i,action:l,secondaryAction:r,size:m="md",className:s}){return e.jsxs("div",{className:n(t.empty,t[m],s),role:"status",children:[!1!==i&&e.jsx("div",{className:t.icon,"aria-hidden":"true",children:i??e.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,width:"40",height:"40",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 13.5h3.86a2.25 2.25 0 0 1 2.012 1.244l.256.512a2.25 2.25 0 0 0 2.013 1.244h3.218a2.25 2.25 0 0 0 2.013-1.244l.256-.512a2.25 2.25 0 0 1 2.013-1.244h3.859M2.25 13.5V18a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18v-4.5M2.25 13.5l2.4-7.2A2.25 2.25 0 0 1 6.784 4.75h10.432a2.25 2.25 0 0 1 2.134 1.55l2.4 7.2"})})}),e.jsx("p",{className:t.title,children:a}),o&&e.jsx("p",{className:t.description,children:o}),(l||r)&&e.jsxs("div",{className:t.actions,children:[l,r]})]})};
|
|
2
|
+
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../src/EmptyState.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import React from \"react\";\nimport styles from \"./EmptyState.module.css\";\n\nexport interface EmptyStateProps {\n /** Título: \"No hay convocatorias\". */\n title: React.ReactNode;\n /** Explicación o siguiente paso. */\n description?: React.ReactNode;\n /** Icono o ilustración (por defecto una bandeja vacía). `false` lo oculta. */\n icon?: React.ReactNode | false;\n /** Acción principal: normalmente un Button \"Crear…\". */\n action?: React.ReactNode;\n /** Acción secundaria (enlace o botón de texto). */\n secondaryAction?: React.ReactNode;\n /** sm para dentro de tablas o tarjetas; md (por defecto) para una página. */\n size?: \"sm\" | \"md\";\n /** Clase extra. */\n className?: string;\n}\n\nconst cx = (...c: Array<string | false | undefined>) =>\n c.filter(Boolean).join(\" \");\n\n/** Estado vacío: lo que se muestra cuando una lista o búsqueda no tiene resultados. */\nexport default function EmptyState({\n title,\n description,\n icon,\n action,\n secondaryAction,\n size = \"md\",\n className,\n}: EmptyStateProps) {\n return (\n <div className={cx(styles.empty, styles[size], className)} role=\"status\">\n {icon !== false && (\n <div className={styles.icon} aria-hidden=\"true\">\n {icon ?? (\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={1.5}\n width=\"40\"\n height=\"40\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M2.25 13.5h3.86a2.25 2.25 0 0 1 2.012 1.244l.256.512a2.25 2.25 0 0 0 2.013 1.244h3.218a2.25 2.25 0 0 0 2.013-1.244l.256-.512a2.25 2.25 0 0 1 2.013-1.244h3.859M2.25 13.5V18a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18v-4.5M2.25 13.5l2.4-7.2A2.25 2.25 0 0 1 6.784 4.75h10.432a2.25 2.25 0 0 1 2.134 1.55l2.4 7.2\"\n />\n </svg>\n )}\n </div>\n )}\n <p className={styles.title}>{title}</p>\n {description && <p className={styles.description}>{description}</p>}\n {(action || secondaryAction) && (\n <div className={styles.actions}>\n {action}\n {secondaryAction}\n </div>\n )}\n </div>\n );\n}\n"],"names":["css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","cx","c","filter","Boolean","join","title","description","icon","action","secondaryAction","size","className","_jsxs","styles","empty","role","children","_jsx","viewBox","fill","stroke","strokeWidth","width","height","strokeLinecap","strokeLinejoin","d","actions"],"mappings":"4UAAA,SAAqBA,EAAKC,YACnBA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAgC,oBAAbC,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAAMM,WACRN,EAAMM,WAAWC,QAAUb,EAE3BM,EAAMK,YAAYR,SAASW,eAAed,GAnBW,CAqBzD,4+CCLA,MAAMe,EAAK,IAAIC,IACbA,EAAEC,OAAOC,SAASC,KAAK,oBAGX,UAAqBC,MACjCA,EAAKC,YACLA,EAAWC,KACXA,EAAIC,OACJA,EAAMC,gBACNA,EAAeC,KACfA,EAAO,KAAIC,UACXA,IAEA,OACEC,EAAAA,KAAA,MAAA,CAAKD,UAAWX,EAAGa,EAAOC,MAAOD,EAAOH,GAAOC,GAAYI,KAAK,SAAQC,SAAA,EAC5D,IAATT,GACCU,MAAA,MAAA,CAAKN,UAAWE,EAAON,KAAI,cAAc,OAAMS,SAC5CT,GACCU,EAAAA,IAAA,MAAA,CACEC,QAAQ,YACRC,KAAK,OACLC,OAAO,eACPC,YAAa,IACbC,MAAM,KACNC,OAAO,KAAIP,SAEXC,MAAA,OAAA,CACEO,cAAc,QACdC,eAAe,QACfC,EAAE,sUAMZT,EAAAA,IAAA,IAAA,CAAGN,UAAWE,EAAOR,MAAKW,SAAGX,IAC5BC,GAAeW,MAAA,IAAA,CAAGN,UAAWE,EAAOP,YAAWU,SAAGV,KACjDE,GAAUC,IACVG,OAAA,MAAA,CAAKD,UAAWE,EAAOc,QAAOX,SAAA,CAC3BR,EACAC,OAKX","x_google_ignoreList":[0]}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
interface EmptyStateProps {
|
|
4
|
+
/** Título: "No hay convocatorias". */
|
|
5
|
+
title: React.ReactNode;
|
|
6
|
+
/** Explicación o siguiente paso. */
|
|
7
|
+
description?: React.ReactNode;
|
|
8
|
+
/** Icono o ilustración (por defecto una bandeja vacía). `false` lo oculta. */
|
|
9
|
+
icon?: React.ReactNode | false;
|
|
10
|
+
/** Acción principal: normalmente un Button "Crear…". */
|
|
11
|
+
action?: React.ReactNode;
|
|
12
|
+
/** Acción secundaria (enlace o botón de texto). */
|
|
13
|
+
secondaryAction?: React.ReactNode;
|
|
14
|
+
/** sm para dentro de tablas o tarjetas; md (por defecto) para una página. */
|
|
15
|
+
size?: "sm" | "md";
|
|
16
|
+
/** Clase extra. */
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
/** Estado vacío: lo que se muestra cuando una lista o búsqueda no tiene resultados. */
|
|
20
|
+
declare function EmptyState({ title, description, icon, action, secondaryAction, size, className, }: EmptyStateProps): React.JSX.Element;
|
|
21
|
+
|
|
22
|
+
export { EmptyState as default };
|
|
23
|
+
export type { EmptyStateProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";var n={empty:"EmptyState-module_empty__PklWO",md:"EmptyState-module_md__ctmVT",sm:"EmptyState-module_sm__DKz2P",icon:"EmptyState-module_icon__pV4Uq",title:"EmptyState-module_title__lGnoi",description:"EmptyState-module_description__wVUrR",actions:"EmptyState-module_actions__pqhrX"};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&a.firstChild?a.insertBefore(o,a.firstChild):a.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(".EmptyState-module_empty__PklWO {\n display: flex;\n flex-direction: column;\n align-items: center;\n text-align: center;\n font-family: var(--lb-font-sans);\n color: var(--lb-color-foreground);\n}\n\n.EmptyState-module_md__ctmVT { padding: var(--lb-space-12) var(--lb-space-6); gap: var(--lb-space-2); }\n.EmptyState-module_sm__DKz2P { padding: var(--lb-space-6) var(--lb-space-4); gap: var(--lb-space-1); }\n\n.EmptyState-module_icon__pV4Uq {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 4rem;\n height: 4rem;\n margin-bottom: var(--lb-space-2);\n border-radius: var(--lb-radius-full);\n background: var(--lb-color-muted);\n color: var(--lb-color-muted-foreground);\n}\n\n.EmptyState-module_sm__DKz2P .EmptyState-module_icon__pV4Uq {\n width: 3rem;\n height: 3rem;\n}\n\n.EmptyState-module_sm__DKz2P .EmptyState-module_icon__pV4Uq svg {\n width: 28px;\n height: 28px;\n}\n\n.EmptyState-module_title__lGnoi {\n margin: 0;\n font-size: var(--lb-font-size-md);\n font-weight: var(--lb-font-weight-semibold);\n}\n\n.EmptyState-module_sm__DKz2P .EmptyState-module_title__lGnoi {\n font-size: var(--lb-font-size-sm);\n}\n\n.EmptyState-module_description__wVUrR {\n margin: 0;\n max-width: 28rem;\n font-size: var(--lb-font-size-sm);\n color: var(--lb-color-muted-foreground);\n}\n\n.EmptyState-module_actions__pqhrX {\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n gap: var(--lb-space-2);\n margin-top: var(--lb-space-3);\n}\n");const a=(...e)=>e.filter(Boolean).join(" ");function o({title:o,description:i,icon:l,action:r,secondaryAction:m,size:d="md",className:s}){return e("div",{className:a(n.empty,n[d],s),role:"status",children:[!1!==l&&t("div",{className:n.icon,"aria-hidden":"true",children:l??t("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,width:"40",height:"40",children:t("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 13.5h3.86a2.25 2.25 0 0 1 2.012 1.244l.256.512a2.25 2.25 0 0 0 2.013 1.244h3.218a2.25 2.25 0 0 0 2.013-1.244l.256-.512a2.25 2.25 0 0 1 2.013-1.244h3.859M2.25 13.5V18a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18v-4.5M2.25 13.5l2.4-7.2A2.25 2.25 0 0 1 6.784 4.75h10.432a2.25 2.25 0 0 1 2.134 1.55l2.4 7.2"})})}),t("p",{className:n.title,children:o}),i&&t("p",{className:n.description,children:i}),(r||m)&&e("div",{className:n.actions,children:[r,m]})]})}export{o as default};
|
|
2
|
+
//# sourceMappingURL=index.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../src/EmptyState.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import React from \"react\";\nimport styles from \"./EmptyState.module.css\";\n\nexport interface EmptyStateProps {\n /** Título: \"No hay convocatorias\". */\n title: React.ReactNode;\n /** Explicación o siguiente paso. */\n description?: React.ReactNode;\n /** Icono o ilustración (por defecto una bandeja vacía). `false` lo oculta. */\n icon?: React.ReactNode | false;\n /** Acción principal: normalmente un Button \"Crear…\". */\n action?: React.ReactNode;\n /** Acción secundaria (enlace o botón de texto). */\n secondaryAction?: React.ReactNode;\n /** sm para dentro de tablas o tarjetas; md (por defecto) para una página. */\n size?: \"sm\" | \"md\";\n /** Clase extra. */\n className?: string;\n}\n\nconst cx = (...c: Array<string | false | undefined>) =>\n c.filter(Boolean).join(\" \");\n\n/** Estado vacío: lo que se muestra cuando una lista o búsqueda no tiene resultados. */\nexport default function EmptyState({\n title,\n description,\n icon,\n action,\n secondaryAction,\n size = \"md\",\n className,\n}: EmptyStateProps) {\n return (\n <div className={cx(styles.empty, styles[size], className)} role=\"status\">\n {icon !== false && (\n <div className={styles.icon} aria-hidden=\"true\">\n {icon ?? (\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={1.5}\n width=\"40\"\n height=\"40\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M2.25 13.5h3.86a2.25 2.25 0 0 1 2.012 1.244l.256.512a2.25 2.25 0 0 0 2.013 1.244h3.218a2.25 2.25 0 0 0 2.013-1.244l.256-.512a2.25 2.25 0 0 1 2.013-1.244h3.859M2.25 13.5V18a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18v-4.5M2.25 13.5l2.4-7.2A2.25 2.25 0 0 1 6.784 4.75h10.432a2.25 2.25 0 0 1 2.134 1.55l2.4 7.2\"\n />\n </svg>\n )}\n </div>\n )}\n <p className={styles.title}>{title}</p>\n {description && <p className={styles.description}>{description}</p>}\n {(action || secondaryAction) && (\n <div className={styles.actions}>\n {action}\n {secondaryAction}\n </div>\n )}\n </div>\n );\n}\n"],"names":["css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","cx","c","filter","Boolean","join","EmptyState","title","description","icon","action","secondaryAction","size","className","_jsxs","styles","empty","role","children","_jsx","viewBox","fill","stroke","strokeWidth","width","height","strokeLinecap","strokeLinejoin","d","actions"],"mappings":"8UAAA,SAAqBA,EAAKC,YACnBA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAgC,oBAAbC,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAAMM,WACRN,EAAMM,WAAWC,QAAUb,EAE3BM,EAAMK,YAAYR,SAASW,eAAed,GAnBW,CAqBzD,4+CCLA,MAAMe,EAAK,IAAIC,IACbA,EAAEC,OAAOC,SAASC,KAAK,KAGX,SAAUC,GAAWC,MACjCA,EAAKC,YACLA,EAAWC,KACXA,EAAIC,OACJA,EAAMC,gBACNA,EAAeC,KACfA,EAAO,KAAIC,UACXA,IAEA,OACEC,EAAA,MAAA,CAAKD,UAAWZ,EAAGc,EAAOC,MAAOD,EAAOH,GAAOC,GAAYI,KAAK,SAAQC,SAAA,EAC5D,IAATT,GACCU,EAAA,MAAA,CAAKN,UAAWE,EAAON,KAAI,cAAc,OAAMS,SAC5CT,GACCU,EAAA,MAAA,CACEC,QAAQ,YACRC,KAAK,OACLC,OAAO,eACPC,YAAa,IACbC,MAAM,KACNC,OAAO,KAAIP,SAEXC,EAAA,OAAA,CACEO,cAAc,QACdC,eAAe,QACfC,EAAE,sUAMZT,EAAA,IAAA,CAAGN,UAAWE,EAAOR,MAAKW,SAAGX,IAC5BC,GAAeW,EAAA,IAAA,CAAGN,UAAWE,EAAOP,YAAWU,SAAGV,KACjDE,GAAUC,IACVG,EAAA,MAAA,CAAKD,UAAWE,EAAOc,QAAOX,SAAA,CAC3BR,EACAC,OAKX","x_google_ignoreList":[0]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,78 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rubenpazch/empty-state",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Estado vacío de listas y búsquedas",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/rubenpazch/lbyte-ui-library.git",
|
|
8
|
+
"directory": "packages/empty-state"
|
|
9
|
+
},
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"main": "dist/index.cjs.js",
|
|
12
|
+
"module": "dist/index.esm.js",
|
|
13
|
+
"types": "dist/index.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"import": "./dist/index.esm.js",
|
|
18
|
+
"require": "./dist/index.cjs.js"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"dist"
|
|
23
|
+
],
|
|
24
|
+
"sideEffects": [
|
|
25
|
+
"**/*.css"
|
|
26
|
+
],
|
|
27
|
+
"peerDependencies": {
|
|
28
|
+
"react": "^19.2.3",
|
|
29
|
+
"react-dom": "^19.2.3",
|
|
30
|
+
"@rubenpazch/tokens": "0.5.0"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@rubenpazch/shared": "5.2.0"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@rollup/plugin-commonjs": "^29.0.3",
|
|
37
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
38
|
+
"@rollup/plugin-terser": "^1.0.0",
|
|
39
|
+
"@rollup/plugin-typescript": "^12.3.0",
|
|
40
|
+
"@testing-library/react": "^16.3.3",
|
|
41
|
+
"@types/jest": "^30.0.0",
|
|
42
|
+
"@types/react": "^19.2.18",
|
|
43
|
+
"@types/react-dom": "^19.2.5",
|
|
44
|
+
"autoprefixer": "^10.5.4",
|
|
45
|
+
"eslint": "^9.39.5",
|
|
46
|
+
"identity-obj-proxy": "^3.0.0",
|
|
47
|
+
"jest": "^30.5.0",
|
|
48
|
+
"jest-environment-jsdom": "^30.5.0",
|
|
49
|
+
"postcss": "^8.5.26",
|
|
50
|
+
"prettier": "^3.9.6",
|
|
51
|
+
"react": "^19.2.8",
|
|
52
|
+
"react-dom": "^19.2.8",
|
|
53
|
+
"rollup": "^4.63.1",
|
|
54
|
+
"rollup-plugin-dts": "^6.5.1",
|
|
55
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
56
|
+
"rollup-plugin-typescript2": "^0.37.0",
|
|
57
|
+
"tslib": "^2.8.1",
|
|
58
|
+
"typescript": "^6.0.3",
|
|
59
|
+
"@rubenpazch/eslint-config": "4.0.0",
|
|
60
|
+
"@rubenpazch/typescript-config": "3.0.0"
|
|
61
|
+
},
|
|
62
|
+
"publishConfig": {
|
|
63
|
+
"access": "public"
|
|
64
|
+
},
|
|
65
|
+
"lbyte": {
|
|
66
|
+
"categoria": "retroalimentacion",
|
|
67
|
+
"resumen": "Estado vacío con icono, título, descripción y acciones (\"No hay convocatorias · Crear\").",
|
|
68
|
+
"usarCuando": "Listas, tablas o búsquedas sin resultados; primera vez que se usa una sección.",
|
|
69
|
+
"evitarCuando": "Errores de carga: usa Alert variant=\"danger\"."
|
|
70
|
+
},
|
|
71
|
+
"scripts": {
|
|
72
|
+
"build": "rollup -c",
|
|
73
|
+
"test": "jest --passWithNoTests",
|
|
74
|
+
"test:watch": "jest --watch",
|
|
75
|
+
"lint": "eslint src",
|
|
76
|
+
"clean": "rm -rf dist"
|
|
77
|
+
}
|
|
6
78
|
}
|