@rubenpazch/overlay-loader 1.1.0 → 1.1.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.
Files changed (2) hide show
  1. package/README.md +49 -0
  2. package/package.json +13 -2
package/README.md ADDED
@@ -0,0 +1,49 @@
1
+ # @rubenpazch/overlay-loader
2
+
3
+ <!-- catalogo:inicio (generado por pnpm catalogo, no editar) -->
4
+
5
+ OverlayLoader (pantalla completa, controlado por visible) e InlineLoader (dentro de un contenedor).
6
+
7
+ - **Usar cuando:** Carga inicial de la app, inicio/cierre de sesión u operaciones que bloquean la pantalla.
8
+ - **Evitar cuando:** Esperas pequeñas dentro de un elemento: usa LoadingSpinner.
9
+
10
+ Se recomienda instalar el paquete completo `@rubenpazch/ui` (incluye este). Por separado:
11
+
12
+ ```bash
13
+ npm install @rubenpazch/overlay-loader
14
+ ```
15
+
16
+ ## OverlayLoader
17
+
18
+ Presentational full-screen loading overlay. It is fully controlled: the
19
+ consumer decides when it is `visible` and which `message` it shows, so the
20
+ same component can express every loading state (boot, sign-in, sign-out,…).
21
+ It keeps no state and performs no side effects — the fade in/out is CSS only.
22
+
23
+ | Prop | Tipo | Req. | Por defecto | Descripción |
24
+ | -------------- | ------------------------------------ | ---- | ----------- | ----------------------------------------------------------------------------------------- |
25
+ | `visible` | `boolean` | sí | | Whether the overlay is shown. When false it fades out and stops capturing pointer events. |
26
+ | `className` | `string` | | | Extra class applied to the root overlay element. |
27
+ | `message` | `string` | | | Primary line describing what is happening (e.g. "Estamos cargando la aplicación"). |
28
+ | `spinnerLabel` | `string` | | | Accessible label for the spinner (screen readers). Defaults to the message or "Cargando". |
29
+ | `title` | `string` | | | Optional emphasized heading rendered above the message. |
30
+ | `variant` | `"default" \| "success" \| "danger"` | | `default` | Tone for the spinner accent. |
31
+
32
+ ## InlineLoader
33
+
34
+ Contained, non-blocking loading indicator. Unlike `OverlayLoader` it flows
35
+ inside its parent (no fixed positioning), so it can fill just a content
36
+ region — e.g. the microfrontend slot while its bundle mounts — without
37
+ covering the rest of the shell (the sidebar stays interactive).
38
+
39
+ | Prop | Tipo | Req. | Por defecto | Descripción |
40
+ | -------------- | ------------------------------------ | ---- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
41
+ | `className` | `string` | | | Extra class applied to the root element. |
42
+ | `fill` | `boolean` | | `false` | Stretch to fill the available width and height of the parent and center its content, instead of rendering as a compact inline card. Use it when the loader owns a whole region (e.g. a route's content slot). |
43
+ | `message` | `string` | | | Optional line describing what is loading (e.g. "Cargando módulo…"). |
44
+ | `spinnerLabel` | `string` | | | Accessible label for the spinner. Defaults to the message or "Cargando". |
45
+ | `variant` | `"default" \| "success" \| "danger"` | | `default` | Tone for the spinner accent. |
46
+
47
+ Tipos: `OverlayLoaderProps`, `OverlayLoaderVariant`, `InlineLoaderProps`, `InlineLoaderVariant`.
48
+
49
+ <!-- catalogo:fin -->
package/package.json CHANGED
@@ -1,7 +1,12 @@
1
1
  {
2
2
  "name": "@rubenpazch/overlay-loader",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "Loading indicators for Lbyte UI library: a full-screen OverlayLoader and a contained InlineLoader",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/rubenpazch/lbyte-ui-library.git",
8
+ "directory": "packages/overlay-loader"
9
+ },
5
10
  "main": "dist/index.cjs.js",
6
11
  "module": "dist/index.esm.js",
7
12
  "types": "dist/index.d.ts",
@@ -21,7 +26,7 @@
21
26
  "peerDependencies": {
22
27
  "react": "^19.2.3",
23
28
  "react-dom": "^19.2.3",
24
- "@rubenpazch/tokens": "0.2.0"
29
+ "@rubenpazch/tokens": "0.4.0"
25
30
  },
26
31
  "devDependencies": {
27
32
  "@rollup/plugin-commonjs": "^29.0.3",
@@ -52,6 +57,12 @@
52
57
  "publishConfig": {
53
58
  "access": "public"
54
59
  },
60
+ "lbyte": {
61
+ "categoria": "retroalimentacion",
62
+ "resumen": "OverlayLoader (pantalla completa, controlado por visible) e InlineLoader (dentro de un contenedor).",
63
+ "usarCuando": "Carga inicial de la app, inicio/cierre de sesión u operaciones que bloquean la pantalla.",
64
+ "evitarCuando": "Esperas pequeñas dentro de un elemento: usa LoadingSpinner."
65
+ },
55
66
  "scripts": {
56
67
  "build": "rollup -c",
57
68
  "test": "jest --passWithNoTests",