orbital-ds 0.40.0 → 0.44.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/AGENTS.md +29 -10
- package/components.manifest.json +6469 -3349
- package/dist/auth-form-B1hgbXkI.d.ts +144 -0
- package/dist/hooks/use-ds-messages.d.ts +89 -0
- package/dist/lib/a2ui-catalog.d.ts +42 -0
- package/dist/lib/a2ui-catalog.js +558 -0
- package/dist/lib/a2ui.d.ts +289 -0
- package/dist/lib/a2ui.js +215 -0
- package/dist/lib/ai-events.d.ts +15 -0
- package/dist/lib/ai-events.js +202 -0
- package/dist/lib/auth-flow.d.ts +3 -1
- package/dist/lib/auth-flow.js +24 -3
- package/dist/lib/format.d.ts +57 -0
- package/dist/lib/format.js +177 -0
- package/dist/lib/i18n.d.ts +96 -2
- package/dist/lib/i18n.js +278 -2
- package/dist/lib/locales/de.d.ts +7 -0
- package/dist/lib/locales/de.js +535 -0
- package/dist/lib/locales/fr.d.ts +7 -0
- package/dist/lib/locales/fr.js +535 -0
- package/dist/lib/locales/he.d.ts +7 -0
- package/dist/lib/locales/he.js +535 -0
- package/dist/lib/locales/it.d.ts +7 -0
- package/dist/lib/locales/it.js +535 -0
- package/dist/styles.css +62 -2
- package/dist/ui/a2ui-renderer.d.ts +44 -0
- package/dist/ui/a2ui-renderer.js +793 -0
- package/dist/ui/agent-events.d.ts +49 -0
- package/dist/ui/agent-events.js +108 -0
- package/dist/ui/ai-tag.d.ts +16 -0
- package/dist/ui/alert-dialog.d.ts +37 -0
- package/dist/ui/alert.d.ts +1 -1
- package/dist/ui/animated-number.d.ts +11 -0
- package/dist/ui/app-bar.d.ts +22 -0
- package/dist/ui/attachment.d.ts +1 -1
- package/dist/ui/auth-backdrop.d.ts +17 -0
- package/dist/ui/auth-form.d.ts +3 -110
- package/dist/ui/auth-form.js +46 -11
- package/dist/ui/auth-layout.d.ts +38 -0
- package/dist/ui/avatar.d.ts +27 -0
- package/dist/ui/ayuda.d.ts +1 -1
- package/dist/ui/ayuda.js +4 -1
- package/dist/ui/badge.d.ts +1 -1
- package/dist/ui/banner.d.ts +1 -1
- package/dist/ui/bottom-nav.d.ts +22 -0
- package/dist/ui/breadcrumb.d.ts +22 -0
- package/dist/ui/breadcrumb.js +1 -1
- package/dist/ui/bubble.d.ts +1 -1
- package/dist/ui/button.d.ts +2 -2
- package/dist/ui/calendar.d.ts +13 -0
- package/dist/ui/calendar.js +3 -0
- package/dist/ui/card-stack.d.ts +27 -0
- package/dist/ui/card.d.ts +33 -0
- package/dist/ui/carousel.d.ts +35 -0
- package/dist/ui/carousel.js +10 -5
- package/dist/ui/chain-of-thought.d.ts +34 -0
- package/dist/ui/chain-of-thought.js +90 -0
- package/dist/ui/chart-card.d.ts +19 -0
- package/dist/ui/chart.d.ts +19 -0
- package/dist/ui/chat-composer.d.ts +58 -0
- package/dist/ui/chat-composer.js +192 -0
- package/dist/ui/choice-card.d.ts +33 -0
- package/dist/ui/code-block.d.ts +15 -0
- package/dist/ui/combobox.d.ts +48 -0
- package/dist/ui/command-palette.d.ts +18 -0
- package/dist/ui/command.d.ts +34 -0
- package/dist/ui/confirm-action.d.ts +30 -0
- package/dist/ui/confirm-dialog.d.ts +23 -0
- package/dist/ui/content-card.d.ts +14 -0
- package/dist/ui/context-menu.d.ts +35 -0
- package/dist/ui/context-menu.js +1 -1
- package/dist/ui/conversation-list.d.ts +44 -0
- package/dist/ui/conversation-list.js +141 -0
- package/dist/ui/copy-button.d.ts +11 -0
- package/dist/ui/date-time.d.ts +40 -0
- package/dist/ui/date-time.js +55 -0
- package/dist/ui/description-list.d.ts +49 -0
- package/dist/ui/description-list.js +86 -0
- package/dist/ui/detail-panel.d.ts +22 -0
- package/dist/ui/dialog.d.ts +35 -0
- package/dist/ui/dock.d.ts +17 -0
- package/dist/ui/drawer.d.ts +41 -0
- package/dist/ui/dropdown-menu.d.ts +32 -0
- package/dist/ui/dropdown-menu.js +1 -1
- package/dist/ui/echart.d.ts +15 -0
- package/dist/ui/empty.d.ts +1 -1
- package/dist/ui/entity-list.d.ts +32 -0
- package/dist/ui/form-layout.d.ts +24 -0
- package/dist/ui/gauge.d.ts +26 -0
- package/dist/ui/generated-image.d.ts +33 -0
- package/dist/ui/generated-image.js +65 -0
- package/dist/ui/generated-table.d.ts +29 -0
- package/dist/ui/generated-table.js +59 -0
- package/dist/ui/heatmap-grid.d.ts +20 -0
- package/dist/ui/hero.d.ts +58 -0
- package/dist/ui/hero.js +145 -0
- package/dist/ui/i18n-provider.d.ts +16 -0
- package/dist/ui/icon-tile.d.ts +2 -2
- package/dist/ui/input-group.d.ts +1 -1
- package/dist/ui/input-otp.d.ts +23 -0
- package/dist/ui/input.d.ts +16 -0
- package/dist/ui/instruction-editor.d.ts +17 -0
- package/dist/ui/item.d.ts +3 -3
- package/dist/ui/label.d.ts +17 -0
- package/dist/ui/legend.d.ts +25 -0
- package/dist/ui/level-meter.d.ts +12 -0
- package/dist/ui/load-more.d.ts +17 -0
- package/dist/ui/loading-state.d.ts +12 -0
- package/dist/ui/markdown.d.ts +29 -0
- package/dist/ui/markdown.js +123 -0
- package/dist/ui/media-card.d.ts +16 -0
- package/dist/ui/menubar.d.ts +39 -0
- package/dist/ui/message-actions.d.ts +21 -0
- package/dist/ui/message-actions.js +79 -0
- package/dist/ui/message-scroller.d.ts +30 -0
- package/dist/ui/message.d.ts +33 -0
- package/dist/ui/mfa-challenge.d.ts +3 -32
- package/dist/ui/mfa-challenge.js +1 -1
- package/dist/ui/mfa-setup.d.ts +1 -1
- package/dist/ui/mosaic.d.ts +23 -0
- package/dist/ui/motion-provider.d.ts +17 -0
- package/dist/ui/native-select.d.ts +22 -0
- package/dist/ui/next-step-card.d.ts +55 -0
- package/dist/ui/next-step-card.js +92 -0
- package/dist/ui/notice-review.d.ts +32 -0
- package/dist/ui/oauth-consent.d.ts +1 -1
- package/dist/ui/page-header.d.ts +46 -4
- package/dist/ui/page-header.js +20 -11
- package/dist/ui/page-loader.d.ts +17 -0
- package/dist/ui/page-shell.d.ts +17 -0
- package/dist/ui/pagination.d.ts +20 -0
- package/dist/ui/pagination.js +2 -2
- package/dist/ui/panel.d.ts +1 -1
- package/dist/ui/password-strength.d.ts +14 -0
- package/dist/ui/popover.d.ts +32 -0
- package/dist/ui/proportion-bar.d.ts +25 -0
- package/dist/ui/quantity.d.ts +25 -0
- package/dist/ui/quantity.js +27 -0
- package/dist/ui/questionnaire.d.ts +38 -0
- package/dist/ui/reasoning.d.ts +24 -0
- package/dist/ui/reasoning.js +62 -0
- package/dist/ui/reveal.d.ts +17 -0
- package/dist/ui/sheet.d.ts +39 -2
- package/dist/ui/sheet.js +6 -2
- package/dist/ui/shield.d.ts +14 -0
- package/dist/ui/show-more.d.ts +14 -0
- package/dist/ui/sidebar.d.ts +4 -2
- package/dist/ui/sidebar.js +7 -3
- package/dist/ui/sparkline.d.ts +1 -1
- package/dist/ui/stat-group.d.ts +32 -0
- package/dist/ui/stat.d.ts +1 -1
- package/dist/ui/status-badge.d.ts +3 -3
- package/dist/ui/status-hero.d.ts +18 -0
- package/dist/ui/step-dots.d.ts +12 -0
- package/dist/ui/step-ring.d.ts +14 -0
- package/dist/ui/suggestions.d.ts +17 -0
- package/dist/ui/suggestions.js +39 -0
- package/dist/ui/table.d.ts +26 -0
- package/dist/ui/tag-input.d.ts +21 -0
- package/dist/ui/tag-input.js +169 -0
- package/dist/ui/task-loader.d.ts +15 -0
- package/dist/ui/task-progress.d.ts +14 -0
- package/dist/ui/textarea.d.ts +22 -1
- package/dist/ui/textarea.js +7 -1
- package/dist/ui/timeline.d.ts +26 -0
- package/dist/ui/toggle-group.d.ts +24 -0
- package/dist/ui/tool-call.d.ts +27 -0
- package/dist/ui/tool-call.js +74 -0
- package/dist/ui/usage-meter.d.ts +42 -0
- package/dist/ui/usage-meter.js +116 -0
- package/dist/ui/week-strip.d.ts +11 -0
- package/dist/ui/week-strip.js +2 -2
- package/dist/ui/workflow-run.d.ts +51 -0
- package/dist/ui/workflow-run.js +185 -0
- package/docs/adr/0001-rtl-clases-logicas.md +14 -1
- package/docs/designer/criterio.md +87 -87
- package/docs/designer/flujo.md +1 -1
- package/docs/designer/patrones.md +43 -2
- package/manifest/actions.json +364 -0
- package/manifest/agents.json +399 -0
- package/manifest/ai.json +128 -0
- package/manifest/auth.json +1547 -0
- package/manifest/chat.json +612 -0
- package/manifest/content.json +2298 -0
- package/manifest/data.json +2904 -0
- package/manifest/feedback.json +1005 -0
- package/manifest/forms.json +1954 -0
- package/manifest/motion.json +196 -0
- package/manifest/navigation.json +1792 -0
- package/manifest/overlays.json +931 -0
- package/package.json +35 -21
- package/scripts/cli.mjs +105 -8
- package/scripts/doctor.mjs +126 -1
- package/scripts/eslint-plugin.mjs +93 -0
- package/scripts/i18n.mjs +1 -1
- package/scripts/manifest.mjs +159 -7
- package/skill/SKILL.md +8 -3
|
@@ -0,0 +1,2904 @@
|
|
|
1
|
+
{
|
|
2
|
+
"package": "orbital-ds",
|
|
3
|
+
"version": "0.44.1",
|
|
4
|
+
"group": "data",
|
|
5
|
+
"about": "Tablas, gráficos, métricas, listas de entidades y estados de carga.",
|
|
6
|
+
"components": {
|
|
7
|
+
"animated-number": {
|
|
8
|
+
"import": "orbital-ds/ui/animated-number",
|
|
9
|
+
"group": "data",
|
|
10
|
+
"summary": "Cifra que rueda como un cuentakilómetros al aparecer o cambiar, para la cifra principal de un resumen. Dentro de un KPI basta con StatValue animate.",
|
|
11
|
+
"see": [
|
|
12
|
+
{
|
|
13
|
+
"component": "stat",
|
|
14
|
+
"when": "KPI con etiqueta, variación y tono (StatValue animate ya anima la cifra)"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"component": "quantity",
|
|
18
|
+
"when": "cifra con unidad que no necesita animarse (tablas, textos, fichas)"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"exports": [
|
|
22
|
+
"AnimatedNumber"
|
|
23
|
+
],
|
|
24
|
+
"slots": [
|
|
25
|
+
"animated-number",
|
|
26
|
+
"animated-number-symbol",
|
|
27
|
+
"animated-number-wheel"
|
|
28
|
+
],
|
|
29
|
+
"optionalPeers": [],
|
|
30
|
+
"props": {
|
|
31
|
+
"AnimatedNumber": {
|
|
32
|
+
"value": {
|
|
33
|
+
"type": "number",
|
|
34
|
+
"required": true
|
|
35
|
+
},
|
|
36
|
+
"format": {
|
|
37
|
+
"type": "(value: number) => string",
|
|
38
|
+
"doc": "Cómo escribir el número. Por defecto, `Intl.NumberFormat` del idioma activo."
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"notes": [
|
|
43
|
+
"Para cifras grandes de un resumen (KPI, totales); no para texto que cambia a cada segundo.",
|
|
44
|
+
"Pasa siempre `format` si el número lleva unidad (horas, %, moneda): la unidad no rueda."
|
|
45
|
+
],
|
|
46
|
+
"examples": [
|
|
47
|
+
{
|
|
48
|
+
"title": "Cifra principal de un resumen",
|
|
49
|
+
"code": "<AnimatedNumber value={1284} />"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"title": "Con unidad fija (la unidad no rueda)",
|
|
53
|
+
"code": "<AnimatedNumber value={12.5} format={(n) => `${n.toFixed(1)} h`} />"
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
"chart-card": {
|
|
58
|
+
"import": "orbital-ds/ui/chart-card",
|
|
59
|
+
"group": "data",
|
|
60
|
+
"summary": "Gráfico de ECharts dentro de una tarjeta con título, cargando, error, vacío y descarga resueltos: la forma por defecto de poner un gráfico en un panel o en un mosaico.",
|
|
61
|
+
"see": [
|
|
62
|
+
{
|
|
63
|
+
"component": "echart",
|
|
64
|
+
"when": "solo el lienzo del gráfico, sin tarjeta ni estados, dentro de tu propia maqueta"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"component": "chart",
|
|
68
|
+
"when": "gráficos Recharts heredados: solo compatibilidad, nunca para pantallas nuevas"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"component": "stat",
|
|
72
|
+
"when": "una cifra clave con su tendencia mínima (Sparkline), no un gráfico completo"
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
"exports": [
|
|
76
|
+
"ChartCard",
|
|
77
|
+
"type ChartCardPreset"
|
|
78
|
+
],
|
|
79
|
+
"slots": [
|
|
80
|
+
"chart-card"
|
|
81
|
+
],
|
|
82
|
+
"optionalPeers": [],
|
|
83
|
+
"props": {
|
|
84
|
+
"ChartCard": {
|
|
85
|
+
"option": {
|
|
86
|
+
"type": "DsEChartOption",
|
|
87
|
+
"required": true
|
|
88
|
+
},
|
|
89
|
+
"preset": {
|
|
90
|
+
"type": "ChartCardPreset",
|
|
91
|
+
"values": [
|
|
92
|
+
"glance",
|
|
93
|
+
"standard",
|
|
94
|
+
"focus",
|
|
95
|
+
"dense"
|
|
96
|
+
]
|
|
97
|
+
},
|
|
98
|
+
"title": {
|
|
99
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…"
|
|
100
|
+
},
|
|
101
|
+
"description": {
|
|
102
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…"
|
|
103
|
+
},
|
|
104
|
+
"action": {
|
|
105
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
106
|
+
"doc": "Acciones de la cabecera (selector de periodo, menú…)."
|
|
107
|
+
},
|
|
108
|
+
"footer": {
|
|
109
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
110
|
+
"doc": "Pie: nota de la fuente, leyenda propia, enlace «Ver detalle»."
|
|
111
|
+
},
|
|
112
|
+
"loading": {
|
|
113
|
+
"type": "boolean"
|
|
114
|
+
},
|
|
115
|
+
"error": {
|
|
116
|
+
"type": "{}"
|
|
117
|
+
},
|
|
118
|
+
"onRetry": {
|
|
119
|
+
"type": "() => void"
|
|
120
|
+
},
|
|
121
|
+
"empty": {
|
|
122
|
+
"type": "boolean",
|
|
123
|
+
"doc": "Sin datos: muestra el texto de «sin datos» en lugar del gráfico."
|
|
124
|
+
},
|
|
125
|
+
"height": {
|
|
126
|
+
"type": "string | number"
|
|
127
|
+
},
|
|
128
|
+
"renderer": {
|
|
129
|
+
"type": "\"canvas\" | \"svg\"",
|
|
130
|
+
"values": [
|
|
131
|
+
"canvas",
|
|
132
|
+
"svg"
|
|
133
|
+
]
|
|
134
|
+
},
|
|
135
|
+
"exportable": {
|
|
136
|
+
"type": "boolean"
|
|
137
|
+
},
|
|
138
|
+
"fileName": {
|
|
139
|
+
"type": "string"
|
|
140
|
+
},
|
|
141
|
+
"onEvents": {
|
|
142
|
+
"type": "Record<string, (params: unknown) => void>"
|
|
143
|
+
},
|
|
144
|
+
"className": {
|
|
145
|
+
"type": "string"
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
"presets": {
|
|
150
|
+
"values": [
|
|
151
|
+
"glance",
|
|
152
|
+
"standard",
|
|
153
|
+
"focus",
|
|
154
|
+
"dense"
|
|
155
|
+
],
|
|
156
|
+
"default": "standard",
|
|
157
|
+
"intent": {
|
|
158
|
+
"glance": "vistazo: pequeño, sin descarga (un KPI con tendencia)",
|
|
159
|
+
"standard": "gráfico normal de un panel",
|
|
160
|
+
"focus": "protagonista de la vista: grande y con descarga SVG/PNG",
|
|
161
|
+
"dense": "muchos puntos: pinta en canvas y deja el alto medio"
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"notes": [
|
|
165
|
+
"Gráfico en una tarjeta con cargando/error/vacío resueltos: `glance` para un vistazo, `standard` en un panel, `focus` para el gráfico principal (descargable), `dense` para muchos puntos (canvas). El option sale de orbital-ds/lib/echarts-presets y nunca lleva colores.",
|
|
166
|
+
"Varios gráficos juntos: dentro de Mosaic (bento: el principal primero y en `focus`). Para informes en servidor usa renderEChartToSvg con el mismo option."
|
|
167
|
+
],
|
|
168
|
+
"examples": [
|
|
169
|
+
{
|
|
170
|
+
"title": "Preset standard con un option de echarts-presets (sin colores)",
|
|
171
|
+
"code": "<ChartCard\n preset=\"standard\"\n title=\"Llamadas\"\n description=\"Última semana\"\n option={lineOption({ categories: [\"L\", \"M\", \"X\", \"J\", \"V\"], series: [{ name: \"Llamadas\", data: [12, 18, 15, 24, 30] }] })}\n/>"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"title": "Gráfico principal (focus) con sus estados",
|
|
175
|
+
"code": "<ChartCard preset=\"focus\" title=\"Volumen de llamadas\" option={option} loading={isLoading} error={error} onRetry={refetch} />"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"title": "Sin datos",
|
|
179
|
+
"code": "<ChartCard preset=\"glance\" title=\"Tendencia\" option={option} empty />"
|
|
180
|
+
}
|
|
181
|
+
]
|
|
182
|
+
},
|
|
183
|
+
"chart": {
|
|
184
|
+
"import": "orbital-ds/ui/chart",
|
|
185
|
+
"group": "data",
|
|
186
|
+
"summary": "Contenedor de Recharts con la paleta del tema, tooltip y leyenda. SOLO por compatibilidad (sin funciones nuevas): para cualquier gráfico nuevo usa ChartCard o EChart.",
|
|
187
|
+
"see": [
|
|
188
|
+
{
|
|
189
|
+
"component": "chart-card",
|
|
190
|
+
"when": "gráfico nuevo en un panel: tarjeta con estados y descarga (ECharts)"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"component": "echart",
|
|
194
|
+
"when": "gráfico nuevo dentro de tu propia maqueta (ECharts, colores del tema)"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"component": "sparkline",
|
|
198
|
+
"when": "tendencia mínima junto a una cifra, sin librería de gráficos"
|
|
199
|
+
}
|
|
200
|
+
],
|
|
201
|
+
"exports": [
|
|
202
|
+
"ChartContainer",
|
|
203
|
+
"ChartLegend",
|
|
204
|
+
"ChartLegendContent",
|
|
205
|
+
"ChartStyle",
|
|
206
|
+
"ChartTooltip",
|
|
207
|
+
"ChartTooltipContent"
|
|
208
|
+
],
|
|
209
|
+
"slots": [
|
|
210
|
+
"chart",
|
|
211
|
+
"chart-legend",
|
|
212
|
+
"chart-legend-item",
|
|
213
|
+
"chart-tooltip",
|
|
214
|
+
"chart-tooltip-item"
|
|
215
|
+
],
|
|
216
|
+
"optionalPeers": [
|
|
217
|
+
"recharts"
|
|
218
|
+
],
|
|
219
|
+
"props": {
|
|
220
|
+
"ChartContainer": {
|
|
221
|
+
"config": {
|
|
222
|
+
"type": "ChartConfig",
|
|
223
|
+
"required": true
|
|
224
|
+
},
|
|
225
|
+
"initialDimension": {
|
|
226
|
+
"type": "{ width: number; height: number; }"
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
"ChartTooltipContent": {
|
|
230
|
+
"hideLabel": {
|
|
231
|
+
"type": "boolean"
|
|
232
|
+
},
|
|
233
|
+
"hideIndicator": {
|
|
234
|
+
"type": "boolean"
|
|
235
|
+
},
|
|
236
|
+
"indicator": {
|
|
237
|
+
"type": "\"line\" | \"dot\" | \"dashed\"",
|
|
238
|
+
"values": [
|
|
239
|
+
"line",
|
|
240
|
+
"dot",
|
|
241
|
+
"dashed"
|
|
242
|
+
]
|
|
243
|
+
},
|
|
244
|
+
"nameKey": {
|
|
245
|
+
"type": "string"
|
|
246
|
+
},
|
|
247
|
+
"labelKey": {
|
|
248
|
+
"type": "string"
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
"ChartLegendContent": {
|
|
252
|
+
"hideIcon": {
|
|
253
|
+
"type": "boolean"
|
|
254
|
+
},
|
|
255
|
+
"nameKey": {
|
|
256
|
+
"type": "string"
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
"ChartStyle": {
|
|
260
|
+
"id": {
|
|
261
|
+
"type": "string",
|
|
262
|
+
"required": true
|
|
263
|
+
},
|
|
264
|
+
"config": {
|
|
265
|
+
"type": "ChartConfig",
|
|
266
|
+
"required": true
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
"notes": [
|
|
271
|
+
"Solo compatibilidad con Recharts: no recibe funciones nuevas. En pantallas nuevas usa ChartCard (o EChart) con un option de orbital-ds/lib/echarts-presets.",
|
|
272
|
+
"Los colores de cada serie salen de las variables del tema (var(--chart-1) … var(--chart-5)) en el config; nunca un color escrito."
|
|
273
|
+
],
|
|
274
|
+
"examples": [
|
|
275
|
+
{
|
|
276
|
+
"title": "Código heredado con Recharts (series con variables del tema)",
|
|
277
|
+
"code": "<ChartContainer config={{ nuevos: { label: \"Nuevos clientes\", color: \"var(--chart-1)\" } }}>\n <BarChart accessibilityLayer data={data}>\n <XAxis dataKey=\"mes\" tickLine={false} axisLine={false} />\n <ChartTooltip content={<ChartTooltipContent />} />\n <ChartLegend content={<ChartLegendContent />} />\n <Bar dataKey=\"nuevos\" fill=\"var(--color-nuevos)\" />\n </BarChart>\n</ChartContainer>"
|
|
278
|
+
}
|
|
279
|
+
]
|
|
280
|
+
},
|
|
281
|
+
"data-table": {
|
|
282
|
+
"import": "orbital-ds/ui/data-table",
|
|
283
|
+
"group": "data",
|
|
284
|
+
"summary": "Tabla de trabajo para muchas filas: ordenar, buscar, filtrar, paginar, seleccionar y actuar (TanStack Table). Para una tabla estática usa Table; para pocas entidades, EntityList.",
|
|
285
|
+
"see": [
|
|
286
|
+
{
|
|
287
|
+
"component": "table",
|
|
288
|
+
"when": "tabla estática y corta, sin orden ni filtros (un resumen, un desglose)"
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"component": "entity-list",
|
|
292
|
+
"when": "lista de entidades (agentes, equipos, herramientas) como filas Item o tarjetas"
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"component": "filter-bar",
|
|
296
|
+
"when": "filtros de la vista entera por encima de la tabla"
|
|
297
|
+
}
|
|
298
|
+
],
|
|
299
|
+
"exports": [
|
|
300
|
+
"DATA_TABLE_PAGE_SIZES",
|
|
301
|
+
"DataTable",
|
|
302
|
+
"DataTableBarCell",
|
|
303
|
+
"DataTableNumber",
|
|
304
|
+
"createDataTableColumnHelper",
|
|
305
|
+
"dataTableFeatures",
|
|
306
|
+
"dataTableStateFromSearch",
|
|
307
|
+
"dataTableStateToSearch",
|
|
308
|
+
"validateDataTableSearch"
|
|
309
|
+
],
|
|
310
|
+
"slots": [
|
|
311
|
+
"data-table",
|
|
312
|
+
"data-table-actions",
|
|
313
|
+
"data-table-bar-cell",
|
|
314
|
+
"data-table-body",
|
|
315
|
+
"data-table-cell",
|
|
316
|
+
"data-table-columns",
|
|
317
|
+
"data-table-empty",
|
|
318
|
+
"data-table-empty-row",
|
|
319
|
+
"data-table-filter",
|
|
320
|
+
"data-table-footer",
|
|
321
|
+
"data-table-group",
|
|
322
|
+
"data-table-head",
|
|
323
|
+
"data-table-header",
|
|
324
|
+
"data-table-no-data",
|
|
325
|
+
"data-table-number",
|
|
326
|
+
"data-table-page",
|
|
327
|
+
"data-table-pagination",
|
|
328
|
+
"data-table-row",
|
|
329
|
+
"data-table-search",
|
|
330
|
+
"data-table-select",
|
|
331
|
+
"data-table-selected",
|
|
332
|
+
"data-table-skeleton-row",
|
|
333
|
+
"data-table-sort",
|
|
334
|
+
"data-table-toolbar"
|
|
335
|
+
],
|
|
336
|
+
"optionalPeers": [
|
|
337
|
+
"@tanstack/react-table"
|
|
338
|
+
],
|
|
339
|
+
"props": {
|
|
340
|
+
"DataTableNumber": {
|
|
341
|
+
"value": {
|
|
342
|
+
"type": "number",
|
|
343
|
+
"required": true
|
|
344
|
+
},
|
|
345
|
+
"format": {
|
|
346
|
+
"type": "Intl.NumberFormatOptions"
|
|
347
|
+
},
|
|
348
|
+
"className": {
|
|
349
|
+
"type": "string"
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
"DataTableBarCell": {
|
|
353
|
+
"value": {
|
|
354
|
+
"type": "number",
|
|
355
|
+
"required": true
|
|
356
|
+
},
|
|
357
|
+
"max": {
|
|
358
|
+
"type": "number",
|
|
359
|
+
"required": true
|
|
360
|
+
},
|
|
361
|
+
"format": {
|
|
362
|
+
"type": "Intl.NumberFormatOptions"
|
|
363
|
+
},
|
|
364
|
+
"tone": {
|
|
365
|
+
"type": "DsDataTone",
|
|
366
|
+
"values": [
|
|
367
|
+
"info",
|
|
368
|
+
"success",
|
|
369
|
+
"warning",
|
|
370
|
+
"danger",
|
|
371
|
+
"primary",
|
|
372
|
+
"neutral",
|
|
373
|
+
"chart-1",
|
|
374
|
+
"chart-2",
|
|
375
|
+
"chart-3",
|
|
376
|
+
"chart-4",
|
|
377
|
+
"chart-5"
|
|
378
|
+
]
|
|
379
|
+
},
|
|
380
|
+
"className": {
|
|
381
|
+
"type": "string"
|
|
382
|
+
}
|
|
383
|
+
},
|
|
384
|
+
"DataTable": {
|
|
385
|
+
"preset": {
|
|
386
|
+
"type": "DataTablePreset",
|
|
387
|
+
"values": [
|
|
388
|
+
"compact",
|
|
389
|
+
"tree",
|
|
390
|
+
"browse",
|
|
391
|
+
"manage",
|
|
392
|
+
"grouped"
|
|
393
|
+
],
|
|
394
|
+
"doc": "Intención: `browse` (consultar), `manage` (seleccionar y actuar), `compact` (denso), `grouped` (con `groupBy`) o `tree` (con `getSubRows`). Solo fija valores por defecto."
|
|
395
|
+
},
|
|
396
|
+
"columns": {
|
|
397
|
+
"type": "DataTableColumn<TData>[]",
|
|
398
|
+
"required": true
|
|
399
|
+
},
|
|
400
|
+
"data": {
|
|
401
|
+
"type": "TData[]",
|
|
402
|
+
"required": true
|
|
403
|
+
},
|
|
404
|
+
"getRowId": {
|
|
405
|
+
"type": "(row: TData, index: number) => string",
|
|
406
|
+
"doc": "Id estable de cada fila (selección que sobrevive a ordenar y filtrar). Por defecto, el índice."
|
|
407
|
+
},
|
|
408
|
+
"state": {
|
|
409
|
+
"type": "Partial<DataTableState>",
|
|
410
|
+
"doc": "Estado controlado (todo o parte)."
|
|
411
|
+
},
|
|
412
|
+
"onStateChange": {
|
|
413
|
+
"type": "(state: DataTableState) => void",
|
|
414
|
+
"doc": "Cada cambio de estado, completo. Buscar, ordenar o filtrar vuelve a la página 1."
|
|
415
|
+
},
|
|
416
|
+
"defaultState": {
|
|
417
|
+
"type": "Partial<DataTableState>",
|
|
418
|
+
"doc": "Estado inicial cuando no se controla."
|
|
419
|
+
},
|
|
420
|
+
"searchable": {
|
|
421
|
+
"type": "boolean",
|
|
422
|
+
"doc": "Buscador global (por defecto, sí)."
|
|
423
|
+
},
|
|
424
|
+
"selectable": {
|
|
425
|
+
"type": "boolean",
|
|
426
|
+
"doc": "Casillas de selección de filas."
|
|
427
|
+
},
|
|
428
|
+
"columnToggle": {
|
|
429
|
+
"type": "boolean",
|
|
430
|
+
"doc": "Menú de columnas visibles (por defecto, sí)."
|
|
431
|
+
},
|
|
432
|
+
"pageSizes": {
|
|
433
|
+
"type": "readonly number[]",
|
|
434
|
+
"doc": "Opciones de filas por página."
|
|
435
|
+
},
|
|
436
|
+
"loading": {
|
|
437
|
+
"type": "boolean",
|
|
438
|
+
"doc": "Mientras carga se pintan filas skeleton y la tabla queda aria-busy."
|
|
439
|
+
},
|
|
440
|
+
"empty": {
|
|
441
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
442
|
+
"doc": "Qué pintar si no hay filas (por defecto, Empty con «Sin resultados»)."
|
|
443
|
+
},
|
|
444
|
+
"onRowClick": {
|
|
445
|
+
"type": "(row: TData) => void",
|
|
446
|
+
"doc": "Fila pulsable (ratón, Enter o Espacio)."
|
|
447
|
+
},
|
|
448
|
+
"toolbar": {
|
|
449
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
450
|
+
"doc": "Hueco de la barra de herramientas para acciones de la pantalla."
|
|
451
|
+
},
|
|
452
|
+
"rowActions": {
|
|
453
|
+
"type": "(row: TData) => React.ReactNode",
|
|
454
|
+
"doc": "Acciones al final de cada fila (botón, menú…)."
|
|
455
|
+
},
|
|
456
|
+
"density": {
|
|
457
|
+
"type": "\"compact\" | \"comfortable\"",
|
|
458
|
+
"values": [
|
|
459
|
+
"compact",
|
|
460
|
+
"comfortable"
|
|
461
|
+
]
|
|
462
|
+
},
|
|
463
|
+
"groupBy": {
|
|
464
|
+
"type": "(row: TData) => string",
|
|
465
|
+
"doc": "Agrupa las filas de cada página por esta clave; cada grupo lleva una cabecera plegable con su recuento."
|
|
466
|
+
},
|
|
467
|
+
"groupLabel": {
|
|
468
|
+
"type": "(key: string, count: number) => React.ReactNode",
|
|
469
|
+
"doc": "Contenido de la cabecera de grupo (por defecto, la clave y el recuento)."
|
|
470
|
+
},
|
|
471
|
+
"defaultCollapsedGroups": {
|
|
472
|
+
"type": "readonly string[]",
|
|
473
|
+
"doc": "Claves de grupo plegadas al principio."
|
|
474
|
+
},
|
|
475
|
+
"getSubRows": {
|
|
476
|
+
"type": "(row: TData) => readonly TData[] | undefined",
|
|
477
|
+
"doc": "Hijos de una fila: activa la jerarquía (sangría y botón de expandir en la primera columna)."
|
|
478
|
+
},
|
|
479
|
+
"defaultExpandedRows": {
|
|
480
|
+
"type": "readonly string[]",
|
|
481
|
+
"doc": "Ids de fila expandidos al principio (con `getSubRows`)."
|
|
482
|
+
},
|
|
483
|
+
"aria-label": {
|
|
484
|
+
"type": "string",
|
|
485
|
+
"doc": "Nombre accesible de la tabla."
|
|
486
|
+
},
|
|
487
|
+
"className": {
|
|
488
|
+
"type": "string"
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
},
|
|
492
|
+
"presets": {
|
|
493
|
+
"values": [
|
|
494
|
+
"browse",
|
|
495
|
+
"manage",
|
|
496
|
+
"compact",
|
|
497
|
+
"grouped",
|
|
498
|
+
"tree"
|
|
499
|
+
],
|
|
500
|
+
"default": "browse",
|
|
501
|
+
"intent": {
|
|
502
|
+
"browse": "consultar datos: búsqueda y columnas visibles, filas cómodas, sin selección",
|
|
503
|
+
"manage": "gestionar registros: añade selección de filas para acciones en lote",
|
|
504
|
+
"compact": "tabla dentro de un panel o una tarjeta: filas densas, sin selector de columnas",
|
|
505
|
+
"grouped": "filas agrupadas bajo cabeceras plegables (`groupBy`): ordena antes por la clave del grupo",
|
|
506
|
+
"tree": "filas anidadas y expandibles (`getSubRows`): la búsqueda y el orden valen para toda la jerarquía"
|
|
507
|
+
}
|
|
508
|
+
},
|
|
509
|
+
"notes": [
|
|
510
|
+
"Presets: `browse` consulta, `manage` añade selección para actuar, `compact` es denso y sin menú de columnas; cualquier prop explícita los sobrescribe.",
|
|
511
|
+
"Para muchas filas, comparar y ordenar; para 3–5 elementos usa Item variant=\"card\". Estado en la URL con dataTableStateToSearch.",
|
|
512
|
+
"`grouped`: `groupBy` agrupa la página en cabeceras plegables (ordena antes por esa clave para que cada grupo no se parta entre páginas). `tree`: `getSubRows` da jerarquía; la búsqueda, el filtro y el orden valen para toda ella, la paginación cuenta las filas raíz.",
|
|
513
|
+
"Cifras con DataTableNumber (alineadas, tabular-nums); acciones por fila en un menú; sin resultados con Empty y «Limpiar filtros»."
|
|
514
|
+
],
|
|
515
|
+
"examples": [
|
|
516
|
+
{
|
|
517
|
+
"title": "Preset browse (consulta) con columnas",
|
|
518
|
+
"code": "<DataTable\n preset=\"browse\"\n aria-label=\"Colas de atención\"\n columns={[\n { accessorKey: \"name\", header: \"Cola\", meta: { filter: \"text\" } },\n { accessorKey: \"calls\", header: \"Llamadas\", meta: { numeric: true } },\n ]}\n data={queues}\n getRowId={(q) => q.id}\n/>"
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
"title": "Preset manage: selección, fila que abre y acciones por fila",
|
|
522
|
+
"code": "<DataTable\n preset=\"manage\"\n aria-label=\"Usuarios\"\n columns={columns}\n data={users}\n getRowId={(u) => u.id}\n onRowClick={(u) => openUser(u.id)}\n rowActions={(u) => (\n <Button variant=\"ghost\" size=\"icon-sm\" aria-label={t(\"users.actions\", { name: u.name })}>\n <MoreHorizontalIcon />\n </Button>\n )}\n/>"
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
"title": "Preset grouped: cabeceras plegables por una clave",
|
|
526
|
+
"code": "<DataTable preset=\"grouped\" aria-label=\"Colas por campaña\" columns={columns} data={queues} getRowId={(q) => q.id} groupBy={(q) => q.campaign} />"
|
|
527
|
+
}
|
|
528
|
+
]
|
|
529
|
+
},
|
|
530
|
+
"date-time": {
|
|
531
|
+
"import": "orbital-ds/ui/date-time",
|
|
532
|
+
"group": "data",
|
|
533
|
+
"summary": "Fecha u hora en el idioma activo dentro de <time>; RelativeTime para lo reciente («hace 5 minutos»), que se refresca solo. Nunca formatees una fecha a mano.",
|
|
534
|
+
"see": [
|
|
535
|
+
{
|
|
536
|
+
"component": "description-list",
|
|
537
|
+
"when": "pares término–valor donde suelen ir las fechas de una cuenta o un plan"
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
"component": "timeline",
|
|
541
|
+
"when": "historial de eventos, que ya trae su hora (TimelineTime)"
|
|
542
|
+
},
|
|
543
|
+
{
|
|
544
|
+
"component": "quantity",
|
|
545
|
+
"when": "valores con unidad (duraciones como «30 días» de un plan, bytes, %)"
|
|
546
|
+
}
|
|
547
|
+
],
|
|
548
|
+
"exports": [
|
|
549
|
+
"DateTime",
|
|
550
|
+
"RelativeTime"
|
|
551
|
+
],
|
|
552
|
+
"slots": [
|
|
553
|
+
"date-time",
|
|
554
|
+
"relative-time"
|
|
555
|
+
],
|
|
556
|
+
"optionalPeers": [],
|
|
557
|
+
"props": {
|
|
558
|
+
"DateTime": {
|
|
559
|
+
"value": {
|
|
560
|
+
"type": "string | number | Date",
|
|
561
|
+
"required": true,
|
|
562
|
+
"doc": "Date, ISO 8601 o milisegundos."
|
|
563
|
+
},
|
|
564
|
+
"format": {
|
|
565
|
+
"type": "Intl.DateTimeFormatOptions",
|
|
566
|
+
"doc": "Formato concreto (gana a `style`)."
|
|
567
|
+
},
|
|
568
|
+
"timeZone": {
|
|
569
|
+
"type": "string",
|
|
570
|
+
"doc": "Zona horaria IANA; por defecto la del navegador."
|
|
571
|
+
}
|
|
572
|
+
},
|
|
573
|
+
"RelativeTime": {
|
|
574
|
+
"value": {
|
|
575
|
+
"type": "string | number | Date",
|
|
576
|
+
"required": true,
|
|
577
|
+
"doc": "Date, ISO 8601 o milisegundos."
|
|
578
|
+
},
|
|
579
|
+
"numeric": {
|
|
580
|
+
"type": "\"auto\" | \"always\"",
|
|
581
|
+
"values": [
|
|
582
|
+
"auto",
|
|
583
|
+
"always"
|
|
584
|
+
],
|
|
585
|
+
"doc": "\"auto\" (por defecto: «ayer») o \"always\" («hace 1 día»)."
|
|
586
|
+
},
|
|
587
|
+
"length": {
|
|
588
|
+
"type": "\"long\" | \"short\" | \"narrow\"",
|
|
589
|
+
"values": [
|
|
590
|
+
"long",
|
|
591
|
+
"short",
|
|
592
|
+
"narrow"
|
|
593
|
+
],
|
|
594
|
+
"doc": "Longitud: long (por defecto) · short · narrow."
|
|
595
|
+
},
|
|
596
|
+
"now": {
|
|
597
|
+
"type": "string | number | Date",
|
|
598
|
+
"doc": "Instante de referencia fijo (pruebas, SSR). Con él no se refresca."
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
},
|
|
602
|
+
"notes": [
|
|
603
|
+
"Fechas absolutas (alta, renovación, fin de gracia) con DateTime; lo reciente (última conexión, última copia) con RelativeTime, que lleva la fecha exacta en el title.",
|
|
604
|
+
"Nunca new Date().toLocaleString() a mano: el idioma lo pone DsI18nProvider."
|
|
605
|
+
],
|
|
606
|
+
"examples": [
|
|
607
|
+
{
|
|
608
|
+
"title": "Fecha absoluta (alta, renovación)",
|
|
609
|
+
"code": "<DateTime value={account.createdAt} />\n<DateTime value={account.renewsAt} style=\"long\" />"
|
|
610
|
+
},
|
|
611
|
+
{
|
|
612
|
+
"title": "Lo reciente, con la fecha exacta en el title",
|
|
613
|
+
"code": "<RelativeTime value={device.lastSeenAt} />"
|
|
614
|
+
}
|
|
615
|
+
]
|
|
616
|
+
},
|
|
617
|
+
"description-list": {
|
|
618
|
+
"import": "orbital-ds/ui/description-list",
|
|
619
|
+
"group": "data",
|
|
620
|
+
"summary": "Pares término–valor en un <dl> (límites de un plan, atributos de un equipo, datos de una cuenta). No es una tabla: para filas comparables por columnas usa Table o DataTable.",
|
|
621
|
+
"see": [
|
|
622
|
+
{
|
|
623
|
+
"component": "table",
|
|
624
|
+
"when": "varias filas con las mismas columnas que se comparan entre sí"
|
|
625
|
+
},
|
|
626
|
+
{
|
|
627
|
+
"component": "stat-group",
|
|
628
|
+
"when": "pocas cifras clave destacadas en la cabecera de un panel"
|
|
629
|
+
},
|
|
630
|
+
{
|
|
631
|
+
"component": "usage-meter",
|
|
632
|
+
"when": "uso frente a lo contratado, con barra y aviso"
|
|
633
|
+
}
|
|
634
|
+
],
|
|
635
|
+
"exports": [
|
|
636
|
+
"DescriptionList",
|
|
637
|
+
"DescriptionListDetails",
|
|
638
|
+
"DescriptionListItem",
|
|
639
|
+
"DescriptionListTerm"
|
|
640
|
+
],
|
|
641
|
+
"slots": [
|
|
642
|
+
"description-list",
|
|
643
|
+
"description-list-description",
|
|
644
|
+
"description-list-details",
|
|
645
|
+
"description-list-item",
|
|
646
|
+
"description-list-term"
|
|
647
|
+
],
|
|
648
|
+
"optionalPeers": [],
|
|
649
|
+
"props": {
|
|
650
|
+
"DescriptionList": {
|
|
651
|
+
"layout": {
|
|
652
|
+
"type": "DescriptionListLayout",
|
|
653
|
+
"values": [
|
|
654
|
+
"grid",
|
|
655
|
+
"inline",
|
|
656
|
+
"stacked"
|
|
657
|
+
]
|
|
658
|
+
},
|
|
659
|
+
"divided": {
|
|
660
|
+
"type": "boolean"
|
|
661
|
+
},
|
|
662
|
+
"items": {
|
|
663
|
+
"type": "DescriptionListEntry[]",
|
|
664
|
+
"doc": "Atajo: la lista de pares. Los hijos se añaden después."
|
|
665
|
+
}
|
|
666
|
+
},
|
|
667
|
+
"DescriptionListDetails": {
|
|
668
|
+
"description": {
|
|
669
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…"
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
},
|
|
673
|
+
"notes": [
|
|
674
|
+
"Límites del plan, atributos de un equipo o datos de una cuenta: DescriptionList con `items`; los valores con unidad, con Quantity o DateTime dentro.",
|
|
675
|
+
"inline en paneles y tarjetas (término | valor), grid para muchos datos cortos, stacked para valores largos. No uses una tabla para pares clave‑valor."
|
|
676
|
+
],
|
|
677
|
+
"examples": [
|
|
678
|
+
{
|
|
679
|
+
"title": "Con items y valores con unidad",
|
|
680
|
+
"code": "<DescriptionList\n divided\n items={[\n { term: \"Almacenamiento\", value: <Quantity value={50} unit=\"GBy\" /> },\n { term: \"Dispositivos\", value: <Quantity value={5} unit=\"{device}\" />, description: \"Ordenadores, móviles y tabletas\" },\n { term: \"Alta\", value: <DateTime value={createdAt} /> },\n ]}\n/>"
|
|
681
|
+
},
|
|
682
|
+
{
|
|
683
|
+
"title": "Montado con piezas, en rejilla",
|
|
684
|
+
"code": "<DescriptionList layout=\"grid\">\n <DescriptionListItem>\n <DescriptionListTerm>Equipo</DescriptionListTerm>\n <DescriptionListDetails>Portátil de Ana</DescriptionListDetails>\n </DescriptionListItem>\n</DescriptionList>"
|
|
685
|
+
}
|
|
686
|
+
]
|
|
687
|
+
},
|
|
688
|
+
"echart": {
|
|
689
|
+
"import": "orbital-ds/ui/echart",
|
|
690
|
+
"group": "data",
|
|
691
|
+
"summary": "Lienzo de Apache ECharts que toma colores, fuentes y ritmo del tema activo y se repinta al cambiarlo. Para un gráfico dentro de tu propia maqueta; en un panel, mejor ChartCard.",
|
|
692
|
+
"see": [
|
|
693
|
+
{
|
|
694
|
+
"component": "chart-card",
|
|
695
|
+
"when": "gráfico en tarjeta con título, cargando, error, vacío y descarga"
|
|
696
|
+
},
|
|
697
|
+
{
|
|
698
|
+
"component": "sparkline",
|
|
699
|
+
"when": "tendencia mínima en línea, sin ejes, junto a una cifra"
|
|
700
|
+
},
|
|
701
|
+
{
|
|
702
|
+
"component": "heatmap-grid",
|
|
703
|
+
"when": "mapa de calor día × hora accesible como tabla navegable"
|
|
704
|
+
}
|
|
705
|
+
],
|
|
706
|
+
"exports": [
|
|
707
|
+
"EChart"
|
|
708
|
+
],
|
|
709
|
+
"slots": [
|
|
710
|
+
"echart",
|
|
711
|
+
"echart-actions",
|
|
712
|
+
"echart-canvas",
|
|
713
|
+
"echart-empty"
|
|
714
|
+
],
|
|
715
|
+
"optionalPeers": [],
|
|
716
|
+
"props": {
|
|
717
|
+
"EChart": {
|
|
718
|
+
"option": {
|
|
719
|
+
"type": "echarts.EChartsCoreOption",
|
|
720
|
+
"required": true
|
|
721
|
+
},
|
|
722
|
+
"height": {
|
|
723
|
+
"type": "string | number",
|
|
724
|
+
"doc": "Alto del gráfico (cualquier medida CSS). El ancho es el del contenedor."
|
|
725
|
+
},
|
|
726
|
+
"renderer": {
|
|
727
|
+
"type": "\"canvas\" | \"svg\"",
|
|
728
|
+
"values": [
|
|
729
|
+
"canvas",
|
|
730
|
+
"svg"
|
|
731
|
+
]
|
|
732
|
+
},
|
|
733
|
+
"notMerge": {
|
|
734
|
+
"type": "boolean",
|
|
735
|
+
"doc": "Reemplaza las series en vez de fusionarlas al cambiar `option`."
|
|
736
|
+
},
|
|
737
|
+
"exportable": {
|
|
738
|
+
"type": "boolean",
|
|
739
|
+
"doc": "Muestra los botones de descargar SVG y PNG."
|
|
740
|
+
},
|
|
741
|
+
"fileName": {
|
|
742
|
+
"type": "string"
|
|
743
|
+
},
|
|
744
|
+
"empty": {
|
|
745
|
+
"type": "boolean",
|
|
746
|
+
"doc": "Sin datos: muestra el texto «Sin datos» en lugar del gráfico."
|
|
747
|
+
},
|
|
748
|
+
"onEvents": {
|
|
749
|
+
"type": "Record<string, (params: unknown) => void>",
|
|
750
|
+
"doc": "Eventos de ECharts: { click: (p) => …, legendselectchanged: … }"
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
},
|
|
754
|
+
"notes": [
|
|
755
|
+
"Nunca pongas colores en el option: los da el tema (paleta --chart-1…5). Para informes en servidor: renderEChartToSvg."
|
|
756
|
+
],
|
|
757
|
+
"examples": [
|
|
758
|
+
{
|
|
759
|
+
"title": "Línea con un constructor de echarts-presets (sin colores)",
|
|
760
|
+
"code": "<EChart\n option={lineOption({ categories: [\"08:00\", \"09:00\", \"10:00\"], series: [{ name: \"Entrantes\", data: [120, 310, 420] }] })}\n height={280}\n/>"
|
|
761
|
+
},
|
|
762
|
+
{
|
|
763
|
+
"title": "Descargable en SVG/PNG",
|
|
764
|
+
"code": "<EChart option={option} height={280} exportable fileName=\"volumen-llamadas\" />"
|
|
765
|
+
}
|
|
766
|
+
]
|
|
767
|
+
},
|
|
768
|
+
"entity-list": {
|
|
769
|
+
"import": "orbital-ds/ui/entity-list",
|
|
770
|
+
"group": "data",
|
|
771
|
+
"summary": "Lista de entidades (agentes, herramientas, dispositivos) con cargando, error y vacío resueltos; cada fila es un Item variant=\"card\". Para comparar muchas filas por columnas, DataTable.",
|
|
772
|
+
"see": [
|
|
773
|
+
{
|
|
774
|
+
"component": "data-table",
|
|
775
|
+
"when": "muchas filas que se ordenan, filtran y comparan por columnas"
|
|
776
|
+
},
|
|
777
|
+
{
|
|
778
|
+
"component": "item",
|
|
779
|
+
"when": "una sola fila o tarjeta de entidad, sin estados de lista"
|
|
780
|
+
},
|
|
781
|
+
{
|
|
782
|
+
"component": "load-more",
|
|
783
|
+
"when": "pedir más elementos al final de una lista larga"
|
|
784
|
+
}
|
|
785
|
+
],
|
|
786
|
+
"exports": [
|
|
787
|
+
"EntityList",
|
|
788
|
+
"type EntityListPreset"
|
|
789
|
+
],
|
|
790
|
+
"slots": [
|
|
791
|
+
"entity-list",
|
|
792
|
+
"entity-list-bulk"
|
|
793
|
+
],
|
|
794
|
+
"optionalPeers": [],
|
|
795
|
+
"props": {
|
|
796
|
+
"EntityList": {
|
|
797
|
+
"items": {
|
|
798
|
+
"type": "readonly T[]",
|
|
799
|
+
"required": true
|
|
800
|
+
},
|
|
801
|
+
"getKey": {
|
|
802
|
+
"type": "(item: T) => string | number",
|
|
803
|
+
"required": true
|
|
804
|
+
},
|
|
805
|
+
"renderItem": {
|
|
806
|
+
"type": "(item: T) => React.ReactNode",
|
|
807
|
+
"required": true
|
|
808
|
+
},
|
|
809
|
+
"preset": {
|
|
810
|
+
"type": "EntityListPreset",
|
|
811
|
+
"values": [
|
|
812
|
+
"compact",
|
|
813
|
+
"grid",
|
|
814
|
+
"list"
|
|
815
|
+
]
|
|
816
|
+
},
|
|
817
|
+
"toolbar": {
|
|
818
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
819
|
+
"doc": "Barra superior (FilterBar, buscador…)."
|
|
820
|
+
},
|
|
821
|
+
"bulk": {
|
|
822
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
823
|
+
"doc": "Barra de acciones en lote (aparece cuando la app tiene filas seleccionadas); la app decide cuándo pasarla."
|
|
824
|
+
},
|
|
825
|
+
"loading": {
|
|
826
|
+
"type": "boolean"
|
|
827
|
+
},
|
|
828
|
+
"error": {
|
|
829
|
+
"type": "{}",
|
|
830
|
+
"doc": "Si hay error, se muestra en lugar de la lista."
|
|
831
|
+
},
|
|
832
|
+
"onRetry": {
|
|
833
|
+
"type": "() => void"
|
|
834
|
+
},
|
|
835
|
+
"filtered": {
|
|
836
|
+
"type": "boolean",
|
|
837
|
+
"doc": "Hay filtros o búsqueda activos (distingue «sin resultados» de «primer uso»)."
|
|
838
|
+
},
|
|
839
|
+
"emptyAction": {
|
|
840
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
841
|
+
"doc": "Acción del estado vacío (crear la primera, quitar filtros…)."
|
|
842
|
+
},
|
|
843
|
+
"skeletonCount": {
|
|
844
|
+
"type": "number"
|
|
845
|
+
},
|
|
846
|
+
"className": {
|
|
847
|
+
"type": "string"
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
},
|
|
851
|
+
"presets": {
|
|
852
|
+
"values": [
|
|
853
|
+
"list",
|
|
854
|
+
"grid",
|
|
855
|
+
"compact"
|
|
856
|
+
],
|
|
857
|
+
"default": "list",
|
|
858
|
+
"intent": {
|
|
859
|
+
"list": "una columna de filas-tarjeta",
|
|
860
|
+
"grid": "rejilla; las columnas siguen el ANCHO DEL CONTENEDOR (container query)",
|
|
861
|
+
"compact": "filas densas, para muchas entidades"
|
|
862
|
+
}
|
|
863
|
+
},
|
|
864
|
+
"notes": [
|
|
865
|
+
"Lista de entidades con cargando/error/vacío resueltos: pasa `items`, `renderItem` (un `Item variant=\"card\"`) y, si hay filtros, `toolbar` y `filtered`. `list` por defecto, `grid` para tarjetas, `compact` para muchas filas.",
|
|
866
|
+
"No compone Card + Item a mano: la fila es siempre un Item."
|
|
867
|
+
],
|
|
868
|
+
"examples": [
|
|
869
|
+
{
|
|
870
|
+
"title": "Preset list (por defecto)",
|
|
871
|
+
"code": "<EntityList\n items={agents}\n getKey={(a) => a.id}\n renderItem={(a) => (\n <Item variant=\"card\">\n <ItemContent>\n <ItemTitle>{a.name}</ItemTitle>\n <ItemDescription>{a.description}</ItemDescription>\n </ItemContent>\n </Item>\n )}\n/>"
|
|
872
|
+
},
|
|
873
|
+
{
|
|
874
|
+
"title": "Preset grid con estados y filtros",
|
|
875
|
+
"code": "<EntityList\n preset=\"grid\"\n items={agents}\n getKey={(a) => a.id}\n renderItem={renderAgent}\n loading={isLoading}\n error={error}\n onRetry={refetch}\n filtered={hasFilters}\n/>"
|
|
876
|
+
}
|
|
877
|
+
]
|
|
878
|
+
},
|
|
879
|
+
"error-state": {
|
|
880
|
+
"import": "orbital-ds/ui/error-state",
|
|
881
|
+
"group": "data",
|
|
882
|
+
"summary": "Bloque de error de carga de una lista, tarjeta o sección, con texto por defecto y botón de reintento. Para una página entera, ErrorPage; si simplemente no hay datos, EmptyState.",
|
|
883
|
+
"see": [
|
|
884
|
+
{
|
|
885
|
+
"component": "error-page",
|
|
886
|
+
"when": "error que ocupa toda la página (404, sin permiso, caída del servidor)"
|
|
887
|
+
},
|
|
888
|
+
{
|
|
889
|
+
"component": "empty-state",
|
|
890
|
+
"when": "no hay datos (o no hay resultados) y no ha fallado nada"
|
|
891
|
+
},
|
|
892
|
+
{
|
|
893
|
+
"component": "alert",
|
|
894
|
+
"when": "aviso persistente de una sección que no sustituye a su contenido"
|
|
895
|
+
}
|
|
896
|
+
],
|
|
897
|
+
"exports": [
|
|
898
|
+
"ErrorState"
|
|
899
|
+
],
|
|
900
|
+
"slots": [
|
|
901
|
+
"empty-state",
|
|
902
|
+
"error-state-retry"
|
|
903
|
+
],
|
|
904
|
+
"optionalPeers": [],
|
|
905
|
+
"props": {
|
|
906
|
+
"ErrorState": {
|
|
907
|
+
"title": {
|
|
908
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…"
|
|
909
|
+
},
|
|
910
|
+
"icon": {
|
|
911
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
912
|
+
"doc": "Sustituye el icono del preset."
|
|
913
|
+
},
|
|
914
|
+
"description": {
|
|
915
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…"
|
|
916
|
+
},
|
|
917
|
+
"action": {
|
|
918
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
919
|
+
"doc": "Acción principal (botón o enlace); la pone la app."
|
|
920
|
+
},
|
|
921
|
+
"backdrop": {
|
|
922
|
+
"type": "AuthBackdropVariant",
|
|
923
|
+
"values": [
|
|
924
|
+
"image",
|
|
925
|
+
"none",
|
|
926
|
+
"grid",
|
|
927
|
+
"dots",
|
|
928
|
+
"aurora",
|
|
929
|
+
"mesh",
|
|
930
|
+
"glow",
|
|
931
|
+
"rings",
|
|
932
|
+
"beams"
|
|
933
|
+
],
|
|
934
|
+
"doc": "Fondo decorativo detrás (ver AuthBackdrop): mesh, aurora, dots, image… Por defecto, ninguno."
|
|
935
|
+
},
|
|
936
|
+
"backdropMedia": {
|
|
937
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
938
|
+
"doc": "backdrop=\"image\": la foto o el vídeo (un <img>/<video> con alt=\"\"), teñido de marca."
|
|
939
|
+
},
|
|
940
|
+
"backdropGlass": {
|
|
941
|
+
"type": "boolean",
|
|
942
|
+
"doc": "Cristal esmerilado sobre el fondo («mesh + glass»)."
|
|
943
|
+
},
|
|
944
|
+
"animated": {
|
|
945
|
+
"type": "boolean",
|
|
946
|
+
"doc": "Entrada en cascada y el icono flotando con el ritmo del tema (quieto con movimiento reducido)."
|
|
947
|
+
},
|
|
948
|
+
"onRetry": {
|
|
949
|
+
"type": "() => void | Promise<void>",
|
|
950
|
+
"doc": "Reintenta la carga. Sin ella no se pinta el botón."
|
|
951
|
+
},
|
|
952
|
+
"retrying": {
|
|
953
|
+
"type": "boolean",
|
|
954
|
+
"doc": "Está reintentando: bloquea el botón."
|
|
955
|
+
},
|
|
956
|
+
"retryLabel": {
|
|
957
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…"
|
|
958
|
+
}
|
|
959
|
+
}
|
|
960
|
+
},
|
|
961
|
+
"notes": [
|
|
962
|
+
"Para el fallo de carga de una lista, tarjeta o sección: título y descripción por defecto y botón de reintento. `description` admite el mensaje del error si es seguro mostrarlo. Página completa → ErrorPage; sin datos y sin fallo → EmptyState."
|
|
963
|
+
],
|
|
964
|
+
"examples": [
|
|
965
|
+
{
|
|
966
|
+
"title": "Con reintento (textos por defecto)",
|
|
967
|
+
"code": "<ErrorState onRetry={refetch} retrying={isFetching} />"
|
|
968
|
+
},
|
|
969
|
+
{
|
|
970
|
+
"title": "Con título y descripción propios",
|
|
971
|
+
"code": "<ErrorState\n title=\"No se pudieron cargar los procesos\"\n description=\"El servidor no respondió. Inténtalo de nuevo.\"\n onRetry={refetch}\n/>"
|
|
972
|
+
}
|
|
973
|
+
]
|
|
974
|
+
},
|
|
975
|
+
"filter-bar": {
|
|
976
|
+
"import": "orbital-ds/ui/filter-bar",
|
|
977
|
+
"group": "data",
|
|
978
|
+
"summary": "Barra de filtros sobre una vista de datos: menús de opción única (FilterMenu), limpiar filtros y acciones de la vista (exportar, crear).",
|
|
979
|
+
"see": [
|
|
980
|
+
{
|
|
981
|
+
"component": "search-box",
|
|
982
|
+
"when": "buscar por texto en la vista"
|
|
983
|
+
},
|
|
984
|
+
{
|
|
985
|
+
"component": "data-table",
|
|
986
|
+
"when": "sus filtros por columna ya vienen dentro (meta.filter); FilterBar es para la vista entera"
|
|
987
|
+
},
|
|
988
|
+
{
|
|
989
|
+
"component": "toggle-group",
|
|
990
|
+
"when": "alternar entre pocas vistas o modos siempre visibles"
|
|
991
|
+
}
|
|
992
|
+
],
|
|
993
|
+
"exports": [
|
|
994
|
+
"FilterBar",
|
|
995
|
+
"FilterMenu",
|
|
996
|
+
"type FilterBarPreset",
|
|
997
|
+
"type FilterOption"
|
|
998
|
+
],
|
|
999
|
+
"slots": [
|
|
1000
|
+
"filter-bar",
|
|
1001
|
+
"filter-bar-actions",
|
|
1002
|
+
"filter-bar-clear",
|
|
1003
|
+
"filter-bar-filters",
|
|
1004
|
+
"filter-menu-content",
|
|
1005
|
+
"filter-menu-label",
|
|
1006
|
+
"filter-menu-trigger",
|
|
1007
|
+
"filter-menu-value"
|
|
1008
|
+
],
|
|
1009
|
+
"optionalPeers": [],
|
|
1010
|
+
"props": {
|
|
1011
|
+
"FilterBar": {
|
|
1012
|
+
"preset": {
|
|
1013
|
+
"type": "FilterBarPreset",
|
|
1014
|
+
"values": [
|
|
1015
|
+
"compact",
|
|
1016
|
+
"inline",
|
|
1017
|
+
"stacked"
|
|
1018
|
+
]
|
|
1019
|
+
},
|
|
1020
|
+
"actions": {
|
|
1021
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
1022
|
+
"doc": "Acciones de la vista (exportar, guardar vista…), al final de la fila."
|
|
1023
|
+
},
|
|
1024
|
+
"onClear": {
|
|
1025
|
+
"type": "() => void",
|
|
1026
|
+
"doc": "Si se pasa, muestra «Quitar filtros»."
|
|
1027
|
+
},
|
|
1028
|
+
"canClear": {
|
|
1029
|
+
"type": "boolean",
|
|
1030
|
+
"doc": "Hay algo que quitar: si es false, «Quitar filtros» se oculta."
|
|
1031
|
+
}
|
|
1032
|
+
},
|
|
1033
|
+
"FilterMenu": {
|
|
1034
|
+
"className": {
|
|
1035
|
+
"type": "string"
|
|
1036
|
+
},
|
|
1037
|
+
"label": {
|
|
1038
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
1039
|
+
"required": true,
|
|
1040
|
+
"doc": "Nombre del filtro («Campaña»): va siempre en el disparador."
|
|
1041
|
+
},
|
|
1042
|
+
"icon": {
|
|
1043
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…"
|
|
1044
|
+
},
|
|
1045
|
+
"value": {
|
|
1046
|
+
"type": "string",
|
|
1047
|
+
"doc": "Valor elegido; `null`/`undefined` = sin filtro («Todos»)."
|
|
1048
|
+
},
|
|
1049
|
+
"onValueChange": {
|
|
1050
|
+
"type": "(value: string | null) => void"
|
|
1051
|
+
},
|
|
1052
|
+
"options": {
|
|
1053
|
+
"type": "FilterOption[]",
|
|
1054
|
+
"required": true
|
|
1055
|
+
},
|
|
1056
|
+
"allOption": {
|
|
1057
|
+
"type": "string | boolean",
|
|
1058
|
+
"doc": "Añade la opción «Todos» (o con este texto) que quita el filtro."
|
|
1059
|
+
},
|
|
1060
|
+
"disabled": {
|
|
1061
|
+
"type": "boolean"
|
|
1062
|
+
},
|
|
1063
|
+
"disabledReason": {
|
|
1064
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
1065
|
+
"doc": "Desactiva el filtro y explica el motivo (Tooltip + texto accesible)."
|
|
1066
|
+
},
|
|
1067
|
+
"size": {
|
|
1068
|
+
"type": "\"default\" | \"sm\"",
|
|
1069
|
+
"values": [
|
|
1070
|
+
"default",
|
|
1071
|
+
"sm"
|
|
1072
|
+
]
|
|
1073
|
+
},
|
|
1074
|
+
"align": {
|
|
1075
|
+
"type": "\"center\" | \"start\" | \"end\"",
|
|
1076
|
+
"values": [
|
|
1077
|
+
"center",
|
|
1078
|
+
"start",
|
|
1079
|
+
"end"
|
|
1080
|
+
]
|
|
1081
|
+
},
|
|
1082
|
+
"id": {
|
|
1083
|
+
"type": "string"
|
|
1084
|
+
}
|
|
1085
|
+
}
|
|
1086
|
+
},
|
|
1087
|
+
"presets": {
|
|
1088
|
+
"values": [
|
|
1089
|
+
"inline",
|
|
1090
|
+
"compact",
|
|
1091
|
+
"stacked"
|
|
1092
|
+
],
|
|
1093
|
+
"default": "inline",
|
|
1094
|
+
"intent": {
|
|
1095
|
+
"inline": "una fila que envuelve; las acciones al final (encima de una tabla o un panel)",
|
|
1096
|
+
"compact": "igual, con separación menor (barra dentro de una tarjeta o de un panel estrecho)",
|
|
1097
|
+
"stacked": "filtros arriba y acciones debajo, en columna (lateral o contenedor estrecho)"
|
|
1098
|
+
}
|
|
1099
|
+
},
|
|
1100
|
+
"notes": [
|
|
1101
|
+
"Filtros sobre una vista de datos: `inline` por defecto, `compact` dentro de una tarjeta o panel, `stacked` en un lateral o contenedor estrecho. Un filtro que no se puede usar lleva `disabledReason`, no desaparece."
|
|
1102
|
+
],
|
|
1103
|
+
"examples": [
|
|
1104
|
+
{
|
|
1105
|
+
"title": "Preset inline con «Todos» y limpiar",
|
|
1106
|
+
"code": "<FilterBar canClear={!!team} onClear={() => setTeam(null)}>\n <FilterMenu\n label=\"Equipo\"\n value={team}\n onValueChange={setTeam}\n options={[{ value: \"norte\", label: \"Norte\" }, { value: \"sur\", label: \"Sur\" }]}\n allOption\n />\n</FilterBar>"
|
|
1107
|
+
},
|
|
1108
|
+
{
|
|
1109
|
+
"title": "Preset compact con un filtro no disponible (y su motivo)",
|
|
1110
|
+
"code": "<FilterBar preset=\"compact\">\n <FilterMenu label=\"Campaña\" options={campaigns} allOption />\n <FilterMenu label=\"Área\" options={[]} disabledReason=\"Elige antes una campaña\" />\n</FilterBar>"
|
|
1111
|
+
}
|
|
1112
|
+
]
|
|
1113
|
+
},
|
|
1114
|
+
"gauge": {
|
|
1115
|
+
"import": "orbital-ds/ui/gauge",
|
|
1116
|
+
"group": "data",
|
|
1117
|
+
"summary": "Un valor sobre un máximo en anillo o arco, con la cifra en el centro y etiqueta de estado (riesgo, puntuación, reparto en tramos). Para uso frente a lo contratado, UsageMeter.",
|
|
1118
|
+
"see": [
|
|
1119
|
+
{
|
|
1120
|
+
"component": "usage-meter",
|
|
1121
|
+
"when": "uso frente a un límite contratado (almacenamiento, puestos), con aviso al 80 %"
|
|
1122
|
+
},
|
|
1123
|
+
{
|
|
1124
|
+
"component": "level-meter",
|
|
1125
|
+
"when": "un nivel en porcentaje con su categoría y rango, sin anillo"
|
|
1126
|
+
},
|
|
1127
|
+
{
|
|
1128
|
+
"component": "proportion-bar",
|
|
1129
|
+
"when": "parte frente al total o reparto en una barra horizontal"
|
|
1130
|
+
}
|
|
1131
|
+
],
|
|
1132
|
+
"exports": [
|
|
1133
|
+
"Gauge",
|
|
1134
|
+
"GaugeCaption",
|
|
1135
|
+
"GaugeScale",
|
|
1136
|
+
"GaugeSuffix",
|
|
1137
|
+
"GaugeTag",
|
|
1138
|
+
"GaugeValue"
|
|
1139
|
+
],
|
|
1140
|
+
"slots": [
|
|
1141
|
+
"gauge",
|
|
1142
|
+
"gauge-caption",
|
|
1143
|
+
"gauge-center",
|
|
1144
|
+
"gauge-chart",
|
|
1145
|
+
"gauge-scale",
|
|
1146
|
+
"gauge-scale-max",
|
|
1147
|
+
"gauge-scale-min",
|
|
1148
|
+
"gauge-tag",
|
|
1149
|
+
"gauge-track",
|
|
1150
|
+
"gauge-value",
|
|
1151
|
+
"gauge-value-suffix"
|
|
1152
|
+
],
|
|
1153
|
+
"optionalPeers": [],
|
|
1154
|
+
"props": {
|
|
1155
|
+
"Gauge": {
|
|
1156
|
+
"value": {
|
|
1157
|
+
"type": "number",
|
|
1158
|
+
"doc": "Valor (0–max). Con `segments` se ignora. `null` = sin dato."
|
|
1159
|
+
},
|
|
1160
|
+
"max": {
|
|
1161
|
+
"type": "number"
|
|
1162
|
+
},
|
|
1163
|
+
"shape": {
|
|
1164
|
+
"type": "GaugeShape",
|
|
1165
|
+
"values": [
|
|
1166
|
+
"ring",
|
|
1167
|
+
"semi"
|
|
1168
|
+
]
|
|
1169
|
+
},
|
|
1170
|
+
"tone": {
|
|
1171
|
+
"type": "DsDataTone",
|
|
1172
|
+
"values": [
|
|
1173
|
+
"info",
|
|
1174
|
+
"success",
|
|
1175
|
+
"warning",
|
|
1176
|
+
"danger",
|
|
1177
|
+
"primary",
|
|
1178
|
+
"neutral",
|
|
1179
|
+
"chart-1",
|
|
1180
|
+
"chart-2",
|
|
1181
|
+
"chart-3",
|
|
1182
|
+
"chart-4",
|
|
1183
|
+
"chart-5"
|
|
1184
|
+
]
|
|
1185
|
+
},
|
|
1186
|
+
"segments": {
|
|
1187
|
+
"type": "GaugeSegment[]"
|
|
1188
|
+
},
|
|
1189
|
+
"label": {
|
|
1190
|
+
"type": "string",
|
|
1191
|
+
"doc": "Nombre accesible del indicador («Riesgo», «Puntuación»…)."
|
|
1192
|
+
},
|
|
1193
|
+
"valueText": {
|
|
1194
|
+
"type": "string",
|
|
1195
|
+
"doc": "Texto accesible del valor (por defecto, el porcentaje)."
|
|
1196
|
+
}
|
|
1197
|
+
},
|
|
1198
|
+
"GaugeTag": {
|
|
1199
|
+
"tone": {
|
|
1200
|
+
"type": "DsDataTone",
|
|
1201
|
+
"values": [
|
|
1202
|
+
"info",
|
|
1203
|
+
"success",
|
|
1204
|
+
"warning",
|
|
1205
|
+
"danger",
|
|
1206
|
+
"primary",
|
|
1207
|
+
"neutral",
|
|
1208
|
+
"chart-1",
|
|
1209
|
+
"chart-2",
|
|
1210
|
+
"chart-3",
|
|
1211
|
+
"chart-4",
|
|
1212
|
+
"chart-5"
|
|
1213
|
+
]
|
|
1214
|
+
}
|
|
1215
|
+
},
|
|
1216
|
+
"GaugeScale": {
|
|
1217
|
+
"min": {
|
|
1218
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
1219
|
+
"required": true
|
|
1220
|
+
},
|
|
1221
|
+
"max": {
|
|
1222
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
1223
|
+
"required": true
|
|
1224
|
+
},
|
|
1225
|
+
"minTone": {
|
|
1226
|
+
"type": "DsDataTone",
|
|
1227
|
+
"values": [
|
|
1228
|
+
"info",
|
|
1229
|
+
"success",
|
|
1230
|
+
"warning",
|
|
1231
|
+
"danger",
|
|
1232
|
+
"primary",
|
|
1233
|
+
"neutral",
|
|
1234
|
+
"chart-1",
|
|
1235
|
+
"chart-2",
|
|
1236
|
+
"chart-3",
|
|
1237
|
+
"chart-4",
|
|
1238
|
+
"chart-5"
|
|
1239
|
+
]
|
|
1240
|
+
},
|
|
1241
|
+
"maxTone": {
|
|
1242
|
+
"type": "DsDataTone",
|
|
1243
|
+
"values": [
|
|
1244
|
+
"info",
|
|
1245
|
+
"success",
|
|
1246
|
+
"warning",
|
|
1247
|
+
"danger",
|
|
1248
|
+
"primary",
|
|
1249
|
+
"neutral",
|
|
1250
|
+
"chart-1",
|
|
1251
|
+
"chart-2",
|
|
1252
|
+
"chart-3",
|
|
1253
|
+
"chart-4",
|
|
1254
|
+
"chart-5"
|
|
1255
|
+
]
|
|
1256
|
+
}
|
|
1257
|
+
}
|
|
1258
|
+
},
|
|
1259
|
+
"notes": [
|
|
1260
|
+
"Tono del vocabulario común (DsDataTone): la app traduce su dominio (riesgo bajo → success, medio → warning, alto → danger, analizando → neutral). Siempre con label."
|
|
1261
|
+
],
|
|
1262
|
+
"examples": [
|
|
1263
|
+
{
|
|
1264
|
+
"title": "Anillo con cifra y etiqueta de estado",
|
|
1265
|
+
"code": "<Gauge value={540} max={1000} tone=\"warning\" label=\"Riesgo\">\n <GaugeValue>\n 540<GaugeSuffix>/1.000</GaugeSuffix>\n </GaugeValue>\n <GaugeTag>Riesgo medio</GaugeTag>\n</Gauge>"
|
|
1266
|
+
},
|
|
1267
|
+
{
|
|
1268
|
+
"title": "Arco con escala",
|
|
1269
|
+
"code": "<Gauge shape=\"semi\" value={82} tone=\"success\" label=\"Puntuación\">\n <GaugeValue>82</GaugeValue>\n <GaugeTag>Bajo</GaugeTag>\n</Gauge>\n<GaugeScale min=\"Alto\" max=\"Bajo\" />"
|
|
1270
|
+
},
|
|
1271
|
+
{
|
|
1272
|
+
"title": "Tramos con leyenda",
|
|
1273
|
+
"code": "<Gauge label=\"Dispositivos\" max={10} segments={[{ value: 6, tone: \"success\", label: \"Protegidos\" }, { value: 4, tone: \"danger\", label: \"En peligro\" }]}>\n <GaugeValue>10</GaugeValue>\n <GaugeCaption>dispositivos</GaugeCaption>\n</Gauge>"
|
|
1274
|
+
}
|
|
1275
|
+
]
|
|
1276
|
+
},
|
|
1277
|
+
"heatmap-grid": {
|
|
1278
|
+
"import": "orbital-ds/ui/heatmap-grid",
|
|
1279
|
+
"group": "data",
|
|
1280
|
+
"summary": "Mapa de calor accesible como tabla (día × hora, fila × columna): celdas navegables con flechas, sin dato rayado y tarjeta flotante. Para un mapa de calor dentro de un gráfico, EChart.",
|
|
1281
|
+
"see": [
|
|
1282
|
+
{
|
|
1283
|
+
"component": "echart",
|
|
1284
|
+
"when": "mapa de calor como gráfico (heatmapOption de echarts-presets), sin navegación por celdas"
|
|
1285
|
+
},
|
|
1286
|
+
{
|
|
1287
|
+
"component": "data-table",
|
|
1288
|
+
"when": "valores exactos por filas y columnas que se ordenan o filtran"
|
|
1289
|
+
},
|
|
1290
|
+
{
|
|
1291
|
+
"component": "legend",
|
|
1292
|
+
"when": "explicar tonos o series fuera del gráfico"
|
|
1293
|
+
}
|
|
1294
|
+
],
|
|
1295
|
+
"exports": [
|
|
1296
|
+
"HeatmapGrid"
|
|
1297
|
+
],
|
|
1298
|
+
"slots": [
|
|
1299
|
+
"heatmap-grid",
|
|
1300
|
+
"heatmap-grid-caption",
|
|
1301
|
+
"heatmap-grid-card",
|
|
1302
|
+
"heatmap-grid-cell",
|
|
1303
|
+
"heatmap-grid-column-header",
|
|
1304
|
+
"heatmap-grid-row",
|
|
1305
|
+
"heatmap-grid-row-header",
|
|
1306
|
+
"heatmap-grid-scale",
|
|
1307
|
+
"heatmap-grid-scale-bar",
|
|
1308
|
+
"heatmap-grid-scale-empty",
|
|
1309
|
+
"heatmap-grid-scroll",
|
|
1310
|
+
"heatmap-grid-table"
|
|
1311
|
+
],
|
|
1312
|
+
"optionalPeers": [],
|
|
1313
|
+
"props": {
|
|
1314
|
+
"HeatmapGrid": {
|
|
1315
|
+
"rows": {
|
|
1316
|
+
"type": "string[]",
|
|
1317
|
+
"required": true,
|
|
1318
|
+
"doc": "Etiquetas de las filas (p. ej. días)."
|
|
1319
|
+
},
|
|
1320
|
+
"columns": {
|
|
1321
|
+
"type": "string[]",
|
|
1322
|
+
"required": true,
|
|
1323
|
+
"doc": "Etiquetas de las columnas (p. ej. horas)."
|
|
1324
|
+
},
|
|
1325
|
+
"values": {
|
|
1326
|
+
"type": "(number | null | undefined)[][]",
|
|
1327
|
+
"required": true,
|
|
1328
|
+
"doc": "Matriz [fila][columna]; `null` o ausente = sin dato."
|
|
1329
|
+
},
|
|
1330
|
+
"min": {
|
|
1331
|
+
"type": "number"
|
|
1332
|
+
},
|
|
1333
|
+
"max": {
|
|
1334
|
+
"type": "number"
|
|
1335
|
+
},
|
|
1336
|
+
"tone": {
|
|
1337
|
+
"type": "DsDataTone",
|
|
1338
|
+
"values": [
|
|
1339
|
+
"info",
|
|
1340
|
+
"success",
|
|
1341
|
+
"warning",
|
|
1342
|
+
"danger",
|
|
1343
|
+
"primary",
|
|
1344
|
+
"neutral",
|
|
1345
|
+
"chart-1",
|
|
1346
|
+
"chart-2",
|
|
1347
|
+
"chart-3",
|
|
1348
|
+
"chart-4",
|
|
1349
|
+
"chart-5"
|
|
1350
|
+
],
|
|
1351
|
+
"doc": "Tono del extremo alto en lugar de --ds-heatmap-high."
|
|
1352
|
+
},
|
|
1353
|
+
"caption": {
|
|
1354
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
1355
|
+
"doc": "Título de la tabla (visible). Si no, pasa `aria-label`."
|
|
1356
|
+
},
|
|
1357
|
+
"formatValue": {
|
|
1358
|
+
"type": "(value: number) => string"
|
|
1359
|
+
},
|
|
1360
|
+
"cellLabel": {
|
|
1361
|
+
"type": "(cell: HeatmapCell) => string",
|
|
1362
|
+
"doc": "Texto accesible propio de cada celda."
|
|
1363
|
+
},
|
|
1364
|
+
"renderColumnHeader": {
|
|
1365
|
+
"type": "(label: string, index: number) => React.ReactNode",
|
|
1366
|
+
"doc": "Contenido de la cabecera de columna (p. ej. mostrar solo cada 3 horas)."
|
|
1367
|
+
},
|
|
1368
|
+
"renderCard": {
|
|
1369
|
+
"type": "(cell: HeatmapCell) => React.ReactNode",
|
|
1370
|
+
"doc": "Tarjeta flotante de una celda (con ratón y foco)."
|
|
1371
|
+
},
|
|
1372
|
+
"onCellClick": {
|
|
1373
|
+
"type": "(cell: HeatmapCell) => void"
|
|
1374
|
+
},
|
|
1375
|
+
"onCellFocus": {
|
|
1376
|
+
"type": "(cell: HeatmapCell) => void"
|
|
1377
|
+
},
|
|
1378
|
+
"showScale": {
|
|
1379
|
+
"type": "boolean",
|
|
1380
|
+
"doc": "Escala bajo/alto bajo la tabla."
|
|
1381
|
+
}
|
|
1382
|
+
}
|
|
1383
|
+
},
|
|
1384
|
+
"notes": [
|
|
1385
|
+
"Un hueco es null (celda rayada, «sin dato»), nunca 0. Da siempre caption o aria-label y formatValue con la unidad: es lo que se lee en cada celda.",
|
|
1386
|
+
"tone es del vocabulario común (DsDataTone): un solo tono por mapa, de bajo a alto. Para elegir celdas, onCellClick (también con Intro)."
|
|
1387
|
+
],
|
|
1388
|
+
"examples": [
|
|
1389
|
+
{
|
|
1390
|
+
"title": "Día × hora con unidad en el valor",
|
|
1391
|
+
"code": "<HeatmapGrid\n caption=\"Llamadas por día y hora\"\n rows={[\"Lunes\", \"Martes\"]}\n columns={[\"09\", \"10\", \"11\"]}\n values={[[12, 30, null], [8, 22, 41]]}\n formatValue={(v) => `${v} llamadas`}\n/>"
|
|
1392
|
+
},
|
|
1393
|
+
{
|
|
1394
|
+
"title": "Celda pulsable para filtrar, con otro tono",
|
|
1395
|
+
"code": "<HeatmapGrid aria-label=\"Backlog por día y hora\" rows={days} columns={hours} values={backlog} tone=\"warning\" onCellClick={(c) => setCell(c)} />"
|
|
1396
|
+
}
|
|
1397
|
+
]
|
|
1398
|
+
},
|
|
1399
|
+
"legend": {
|
|
1400
|
+
"import": "orbital-ds/ui/legend",
|
|
1401
|
+
"group": "data",
|
|
1402
|
+
"summary": "Leyenda de series o de tonos (muestra + etiqueta + valor opcional), horizontal o vertical; con onToggle sirve para mostrar u ocultar series de un gráfico.",
|
|
1403
|
+
"see": [
|
|
1404
|
+
{
|
|
1405
|
+
"component": "proportion-bar",
|
|
1406
|
+
"when": "barra con segmentos (se acompaña de Legend con los mismos tonos)"
|
|
1407
|
+
},
|
|
1408
|
+
{
|
|
1409
|
+
"component": "status-badge",
|
|
1410
|
+
"when": "el estado de una cosa con su texto, no la clave de un gráfico"
|
|
1411
|
+
},
|
|
1412
|
+
{
|
|
1413
|
+
"component": "echart",
|
|
1414
|
+
"when": "los gráficos ECharts ya traen su leyenda dentro del option"
|
|
1415
|
+
}
|
|
1416
|
+
],
|
|
1417
|
+
"exports": [
|
|
1418
|
+
"Legend",
|
|
1419
|
+
"LegendItem",
|
|
1420
|
+
"LegendSwatch",
|
|
1421
|
+
"dataToneBg",
|
|
1422
|
+
"dataToneSoftVar",
|
|
1423
|
+
"dataToneVar"
|
|
1424
|
+
],
|
|
1425
|
+
"slots": [
|
|
1426
|
+
"legend",
|
|
1427
|
+
"legend-item",
|
|
1428
|
+
"legend-label",
|
|
1429
|
+
"legend-swatch",
|
|
1430
|
+
"legend-toggle",
|
|
1431
|
+
"legend-value"
|
|
1432
|
+
],
|
|
1433
|
+
"optionalPeers": [],
|
|
1434
|
+
"props": {
|
|
1435
|
+
"Legend": {
|
|
1436
|
+
"orientation": {
|
|
1437
|
+
"type": "\"horizontal\" | \"vertical\"",
|
|
1438
|
+
"values": [
|
|
1439
|
+
"horizontal",
|
|
1440
|
+
"vertical"
|
|
1441
|
+
]
|
|
1442
|
+
}
|
|
1443
|
+
},
|
|
1444
|
+
"LegendItem": {
|
|
1445
|
+
"tone": {
|
|
1446
|
+
"type": "DsDataTone",
|
|
1447
|
+
"values": [
|
|
1448
|
+
"info",
|
|
1449
|
+
"success",
|
|
1450
|
+
"warning",
|
|
1451
|
+
"danger",
|
|
1452
|
+
"primary",
|
|
1453
|
+
"neutral",
|
|
1454
|
+
"chart-1",
|
|
1455
|
+
"chart-2",
|
|
1456
|
+
"chart-3",
|
|
1457
|
+
"chart-4",
|
|
1458
|
+
"chart-5"
|
|
1459
|
+
]
|
|
1460
|
+
},
|
|
1461
|
+
"color": {
|
|
1462
|
+
"type": "string"
|
|
1463
|
+
},
|
|
1464
|
+
"shape": {
|
|
1465
|
+
"type": "\"circle\" | \"line\" | \"square\"",
|
|
1466
|
+
"values": [
|
|
1467
|
+
"circle",
|
|
1468
|
+
"line",
|
|
1469
|
+
"square"
|
|
1470
|
+
]
|
|
1471
|
+
},
|
|
1472
|
+
"active": {
|
|
1473
|
+
"type": "boolean",
|
|
1474
|
+
"doc": "Serie visible (en una leyenda interactiva)."
|
|
1475
|
+
},
|
|
1476
|
+
"onToggle": {
|
|
1477
|
+
"type": "(active: boolean) => void",
|
|
1478
|
+
"doc": "Hace el elemento interactivo: recibe el nuevo estado."
|
|
1479
|
+
}
|
|
1480
|
+
},
|
|
1481
|
+
"LegendSwatch": {
|
|
1482
|
+
"tone": {
|
|
1483
|
+
"type": "DsDataTone",
|
|
1484
|
+
"values": [
|
|
1485
|
+
"info",
|
|
1486
|
+
"success",
|
|
1487
|
+
"warning",
|
|
1488
|
+
"danger",
|
|
1489
|
+
"primary",
|
|
1490
|
+
"neutral",
|
|
1491
|
+
"chart-1",
|
|
1492
|
+
"chart-2",
|
|
1493
|
+
"chart-3",
|
|
1494
|
+
"chart-4",
|
|
1495
|
+
"chart-5"
|
|
1496
|
+
]
|
|
1497
|
+
},
|
|
1498
|
+
"shape": {
|
|
1499
|
+
"type": "\"circle\" | \"line\" | \"square\"",
|
|
1500
|
+
"values": [
|
|
1501
|
+
"circle",
|
|
1502
|
+
"line",
|
|
1503
|
+
"square"
|
|
1504
|
+
]
|
|
1505
|
+
}
|
|
1506
|
+
}
|
|
1507
|
+
},
|
|
1508
|
+
"notes": [
|
|
1509
|
+
"Usa tone (series chart-1…5 o tonos de estado del vocabulario común), no color: un color escrito se sale del tema.",
|
|
1510
|
+
"onToggle solo si de verdad muestra u oculta la serie; la etiqueta va siempre en texto (el color no basta)."
|
|
1511
|
+
],
|
|
1512
|
+
"examples": [
|
|
1513
|
+
{
|
|
1514
|
+
"title": "Tonos de estado",
|
|
1515
|
+
"code": "<Legend>\n <LegendItem tone=\"success\">Dentro de SLA</LegendItem>\n <LegendItem tone=\"danger\">Fuera de SLA</LegendItem>\n <LegendItem tone=\"neutral\" shape=\"line\">Objetivo</LegendItem>\n</Legend>"
|
|
1516
|
+
},
|
|
1517
|
+
{
|
|
1518
|
+
"title": "Vertical con valores",
|
|
1519
|
+
"code": "<Legend orientation=\"vertical\">\n <LegendItem tone=\"chart-1\" value={<Quantity value={3840} />}>Entrantes</LegendItem>\n <LegendItem tone=\"chart-2\" value={<Quantity value={3512} />}>Atendidas</LegendItem>\n</Legend>"
|
|
1520
|
+
},
|
|
1521
|
+
{
|
|
1522
|
+
"title": "Interactiva: muestra u oculta series",
|
|
1523
|
+
"code": "<Legend aria-label=\"Series del gráfico\">\n <LegendItem tone=\"chart-1\" active={visible.calls} onToggle={(on) => setVisible({ ...visible, calls: on })}>Llamadas</LegendItem>\n</Legend>"
|
|
1524
|
+
}
|
|
1525
|
+
]
|
|
1526
|
+
},
|
|
1527
|
+
"level-meter": {
|
|
1528
|
+
"import": "orbital-ds/ui/level-meter",
|
|
1529
|
+
"group": "data",
|
|
1530
|
+
"summary": "Medición de un nivel en porcentaje con su categoría (bajo, medio, alto) y su rango; la app decide el tono. Para una puntuación en anillo, Gauge; para uso frente a límite, UsageMeter.",
|
|
1531
|
+
"see": [
|
|
1532
|
+
{
|
|
1533
|
+
"component": "gauge",
|
|
1534
|
+
"when": "valor en anillo o arco con la cifra en el centro"
|
|
1535
|
+
},
|
|
1536
|
+
{
|
|
1537
|
+
"component": "usage-meter",
|
|
1538
|
+
"when": "uso frente a lo contratado, con aviso al 80 % y crítico al 100 %"
|
|
1539
|
+
},
|
|
1540
|
+
{
|
|
1541
|
+
"component": "proportion-bar",
|
|
1542
|
+
"when": "parte frente al total o reparto en segmentos"
|
|
1543
|
+
}
|
|
1544
|
+
],
|
|
1545
|
+
"exports": [
|
|
1546
|
+
"LevelMeter"
|
|
1547
|
+
],
|
|
1548
|
+
"slots": [
|
|
1549
|
+
"level-meter",
|
|
1550
|
+
"level-meter-header",
|
|
1551
|
+
"level-meter-range",
|
|
1552
|
+
"level-meter-tag",
|
|
1553
|
+
"level-meter-value"
|
|
1554
|
+
],
|
|
1555
|
+
"optionalPeers": [],
|
|
1556
|
+
"props": {
|
|
1557
|
+
"LevelMeter": {
|
|
1558
|
+
"value": {
|
|
1559
|
+
"type": "number",
|
|
1560
|
+
"required": true,
|
|
1561
|
+
"doc": "Porcentaje 0–100."
|
|
1562
|
+
},
|
|
1563
|
+
"tone": {
|
|
1564
|
+
"type": "DsDataTone",
|
|
1565
|
+
"values": [
|
|
1566
|
+
"info",
|
|
1567
|
+
"success",
|
|
1568
|
+
"warning",
|
|
1569
|
+
"danger",
|
|
1570
|
+
"primary",
|
|
1571
|
+
"neutral",
|
|
1572
|
+
"chart-1",
|
|
1573
|
+
"chart-2",
|
|
1574
|
+
"chart-3",
|
|
1575
|
+
"chart-4",
|
|
1576
|
+
"chart-5"
|
|
1577
|
+
]
|
|
1578
|
+
},
|
|
1579
|
+
"level": {
|
|
1580
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
1581
|
+
"doc": "Nombre del nivel («Bajo», «Medio», «Alto»)."
|
|
1582
|
+
},
|
|
1583
|
+
"range": {
|
|
1584
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
1585
|
+
"doc": "Rango del nivel («0–25 %»)."
|
|
1586
|
+
},
|
|
1587
|
+
"label": {
|
|
1588
|
+
"type": "string",
|
|
1589
|
+
"doc": "Nombre accesible de la medición."
|
|
1590
|
+
}
|
|
1591
|
+
}
|
|
1592
|
+
},
|
|
1593
|
+
"notes": [
|
|
1594
|
+
"value es un porcentaje 0–100 (se recorta); el tono lo traduce la app desde su dominio (bajo → success, medio → warning, alto → danger).",
|
|
1595
|
+
"Pasa siempre level con la categoría en texto: el tono refuerza, no es el único portador."
|
|
1596
|
+
],
|
|
1597
|
+
"examples": [
|
|
1598
|
+
{
|
|
1599
|
+
"title": "Nivel con su categoría y rango",
|
|
1600
|
+
"code": "<LevelMeter label=\"Exposición\" value={47.5} tone=\"warning\" level=\"Medio\" range=\"25–60 %\" />"
|
|
1601
|
+
}
|
|
1602
|
+
]
|
|
1603
|
+
},
|
|
1604
|
+
"load-more": {
|
|
1605
|
+
"import": "orbital-ds/ui/load-more",
|
|
1606
|
+
"group": "data",
|
|
1607
|
+
"summary": "Botón «Cargar más» al final de una lista que se pide por tramos, con restantes, anuncio para lectores y reintento; `auto` añade carga al llegar al final. Para saltar a una página, Pagination.",
|
|
1608
|
+
"see": [
|
|
1609
|
+
{
|
|
1610
|
+
"component": "pagination",
|
|
1611
|
+
"when": "saltar a una página concreta o datos de trabajo (tablas)"
|
|
1612
|
+
},
|
|
1613
|
+
{
|
|
1614
|
+
"component": "show-more",
|
|
1615
|
+
"when": "desplegar contenido que ya está cargado, sin pedir más"
|
|
1616
|
+
},
|
|
1617
|
+
{
|
|
1618
|
+
"component": "entity-list",
|
|
1619
|
+
"when": "la lista de entidades con sus estados, a la que suele acompañar"
|
|
1620
|
+
}
|
|
1621
|
+
],
|
|
1622
|
+
"exports": [
|
|
1623
|
+
"LoadMore"
|
|
1624
|
+
],
|
|
1625
|
+
"slots": [
|
|
1626
|
+
"load-more",
|
|
1627
|
+
"load-more-button",
|
|
1628
|
+
"load-more-status"
|
|
1629
|
+
],
|
|
1630
|
+
"optionalPeers": [],
|
|
1631
|
+
"props": {
|
|
1632
|
+
"LoadMore": {
|
|
1633
|
+
"hasMore": {
|
|
1634
|
+
"type": "boolean",
|
|
1635
|
+
"required": true
|
|
1636
|
+
},
|
|
1637
|
+
"loading": {
|
|
1638
|
+
"type": "boolean"
|
|
1639
|
+
},
|
|
1640
|
+
"error": {
|
|
1641
|
+
"type": "boolean"
|
|
1642
|
+
},
|
|
1643
|
+
"onLoadMore": {
|
|
1644
|
+
"type": "() => void | Promise<void>",
|
|
1645
|
+
"required": true
|
|
1646
|
+
},
|
|
1647
|
+
"remaining": {
|
|
1648
|
+
"type": "number",
|
|
1649
|
+
"doc": "Elementos que faltan: se pinta «Cargar más (24)»."
|
|
1650
|
+
},
|
|
1651
|
+
"loadedCount": {
|
|
1652
|
+
"type": "number",
|
|
1653
|
+
"doc": "Cuántos acaba de traer la última carga: se anuncia a los lectores."
|
|
1654
|
+
},
|
|
1655
|
+
"auto": {
|
|
1656
|
+
"type": "boolean"
|
|
1657
|
+
},
|
|
1658
|
+
"autoLimit": {
|
|
1659
|
+
"type": "number"
|
|
1660
|
+
},
|
|
1661
|
+
"rootMargin": {
|
|
1662
|
+
"type": "string"
|
|
1663
|
+
},
|
|
1664
|
+
"label": {
|
|
1665
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…"
|
|
1666
|
+
},
|
|
1667
|
+
"endLabel": {
|
|
1668
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…"
|
|
1669
|
+
}
|
|
1670
|
+
}
|
|
1671
|
+
},
|
|
1672
|
+
"notes": [
|
|
1673
|
+
"Para listas largas que se piden por tramos: el botón es lo principal y `auto` solo un extra (hasta `autoLimit` cargas). La lista debe conservar el foco y la posición; añade los elementos nuevos al final y pasa `loadedCount`. Para saltar a una página concreta o datos de trabajo (tablas), usa Pagination.",
|
|
1674
|
+
"Con error no reintenta solo: el botón pasa a «Reintentar»."
|
|
1675
|
+
],
|
|
1676
|
+
"examples": [
|
|
1677
|
+
{
|
|
1678
|
+
"title": "Al final de una lista",
|
|
1679
|
+
"code": "<LoadMore\n hasMore={items.length < total}\n loading={isFetching}\n error={isError}\n onLoadMore={fetchNextPage}\n remaining={total - items.length}\n loadedCount={lastPageSize}\n/>"
|
|
1680
|
+
}
|
|
1681
|
+
]
|
|
1682
|
+
},
|
|
1683
|
+
"loading-state": {
|
|
1684
|
+
"import": "orbital-ds/ui/loading-state",
|
|
1685
|
+
"group": "data",
|
|
1686
|
+
"summary": "Esqueleto con la forma de lo que se carga (lista, tarjeta, tabla o ficha) para una sección mientras llegan los datos. Para una página o ruta entera, PageLoader.",
|
|
1687
|
+
"see": [
|
|
1688
|
+
{
|
|
1689
|
+
"component": "page-loader",
|
|
1690
|
+
"when": "carga de toda la app, una ruta o una sección con superposición"
|
|
1691
|
+
},
|
|
1692
|
+
{
|
|
1693
|
+
"component": "skeleton",
|
|
1694
|
+
"when": "una pieza suelta de esqueleto para componer tu propia forma"
|
|
1695
|
+
},
|
|
1696
|
+
{
|
|
1697
|
+
"component": "spinner",
|
|
1698
|
+
"when": "espera breve dentro de un botón o un control"
|
|
1699
|
+
}
|
|
1700
|
+
],
|
|
1701
|
+
"exports": [
|
|
1702
|
+
"LoadingState",
|
|
1703
|
+
"type LoadingStatePreset"
|
|
1704
|
+
],
|
|
1705
|
+
"slots": [
|
|
1706
|
+
"loading-state",
|
|
1707
|
+
"loading-state-label"
|
|
1708
|
+
],
|
|
1709
|
+
"optionalPeers": [],
|
|
1710
|
+
"props": {
|
|
1711
|
+
"LoadingState": {
|
|
1712
|
+
"preset": {
|
|
1713
|
+
"type": "LoadingStatePreset",
|
|
1714
|
+
"values": [
|
|
1715
|
+
"table",
|
|
1716
|
+
"list",
|
|
1717
|
+
"card",
|
|
1718
|
+
"detail"
|
|
1719
|
+
]
|
|
1720
|
+
},
|
|
1721
|
+
"rows": {
|
|
1722
|
+
"type": "number"
|
|
1723
|
+
},
|
|
1724
|
+
"label": {
|
|
1725
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
1726
|
+
"doc": "Texto visible bajo la forma («Cargando vista de proceso…»); también es el nombre accesible si es texto."
|
|
1727
|
+
},
|
|
1728
|
+
"shimmer": {
|
|
1729
|
+
"type": "boolean",
|
|
1730
|
+
"doc": "Brillo en vez de latido en los bloques."
|
|
1731
|
+
},
|
|
1732
|
+
"className": {
|
|
1733
|
+
"type": "string"
|
|
1734
|
+
}
|
|
1735
|
+
}
|
|
1736
|
+
},
|
|
1737
|
+
"presets": {
|
|
1738
|
+
"values": [
|
|
1739
|
+
"list",
|
|
1740
|
+
"card",
|
|
1741
|
+
"table",
|
|
1742
|
+
"detail"
|
|
1743
|
+
],
|
|
1744
|
+
"default": "list",
|
|
1745
|
+
"intent": {
|
|
1746
|
+
"list": "filas con icono y dos líneas",
|
|
1747
|
+
"card": "una tarjeta con título y cuerpo",
|
|
1748
|
+
"table": "cabecera y filas",
|
|
1749
|
+
"detail": "título, subtítulo y bloques de texto"
|
|
1750
|
+
}
|
|
1751
|
+
},
|
|
1752
|
+
"notes": [
|
|
1753
|
+
"Mientras carga, pinta la forma de lo que vendrá: `list` para filas, `card` para una tarjeta, `table` para una tabla, `detail` para una ficha.",
|
|
1754
|
+
"`label` añade un texto visible bajo la forma (p. ej. el nombre de lo que se carga); `shimmer` cambia el latido por un brillo."
|
|
1755
|
+
],
|
|
1756
|
+
"examples": [
|
|
1757
|
+
{
|
|
1758
|
+
"title": "Preset list",
|
|
1759
|
+
"code": "<LoadingState preset=\"list\" rows={3} />"
|
|
1760
|
+
},
|
|
1761
|
+
{
|
|
1762
|
+
"title": "Tarjeta con texto visible y brillo",
|
|
1763
|
+
"code": "<LoadingState preset=\"card\" rows={3} shimmer label=\"Cargando vista de proceso…\" />"
|
|
1764
|
+
}
|
|
1765
|
+
]
|
|
1766
|
+
},
|
|
1767
|
+
"proportion-bar": {
|
|
1768
|
+
"import": "orbital-ds/ui/proportion-bar",
|
|
1769
|
+
"group": "data",
|
|
1770
|
+
"summary": "Barra de una parte frente al total o de un reparto en segmentos (ocupación, backlog por estado), accesible como meter. Para uso frente a lo contratado, UsageMeter; para el avance de una tarea, TaskProgress.",
|
|
1771
|
+
"see": [
|
|
1772
|
+
{
|
|
1773
|
+
"component": "usage-meter",
|
|
1774
|
+
"when": "uso frente a un límite contratado, con aviso al 80 %"
|
|
1775
|
+
},
|
|
1776
|
+
{
|
|
1777
|
+
"component": "task-progress",
|
|
1778
|
+
"when": "avance de una tarea con estado (en curso, completada, con error)"
|
|
1779
|
+
},
|
|
1780
|
+
{
|
|
1781
|
+
"component": "gauge",
|
|
1782
|
+
"when": "un valor en anillo o arco con la cifra en el centro"
|
|
1783
|
+
}
|
|
1784
|
+
],
|
|
1785
|
+
"exports": [
|
|
1786
|
+
"ProportionBar"
|
|
1787
|
+
],
|
|
1788
|
+
"slots": [
|
|
1789
|
+
"proportion-bar",
|
|
1790
|
+
"proportion-bar-header",
|
|
1791
|
+
"proportion-bar-indicator",
|
|
1792
|
+
"proportion-bar-label",
|
|
1793
|
+
"proportion-bar-segment",
|
|
1794
|
+
"proportion-bar-track",
|
|
1795
|
+
"proportion-bar-value"
|
|
1796
|
+
],
|
|
1797
|
+
"optionalPeers": [],
|
|
1798
|
+
"props": {
|
|
1799
|
+
"ProportionBar": {
|
|
1800
|
+
"value": {
|
|
1801
|
+
"type": "number",
|
|
1802
|
+
"doc": "Parte del total (sin `segments`). `null`/`undefined` sin segmentos = sin dato."
|
|
1803
|
+
},
|
|
1804
|
+
"max": {
|
|
1805
|
+
"type": "number",
|
|
1806
|
+
"doc": "Total (por defecto 100)."
|
|
1807
|
+
},
|
|
1808
|
+
"segments": {
|
|
1809
|
+
"type": "ProportionSegment[]"
|
|
1810
|
+
},
|
|
1811
|
+
"tone": {
|
|
1812
|
+
"type": "DsDataTone",
|
|
1813
|
+
"values": [
|
|
1814
|
+
"info",
|
|
1815
|
+
"success",
|
|
1816
|
+
"warning",
|
|
1817
|
+
"danger",
|
|
1818
|
+
"primary",
|
|
1819
|
+
"neutral",
|
|
1820
|
+
"chart-1",
|
|
1821
|
+
"chart-2",
|
|
1822
|
+
"chart-3",
|
|
1823
|
+
"chart-4",
|
|
1824
|
+
"chart-5"
|
|
1825
|
+
]
|
|
1826
|
+
},
|
|
1827
|
+
"label": {
|
|
1828
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
1829
|
+
"doc": "Etiqueta visible sobre la barra (y nombre accesible)."
|
|
1830
|
+
},
|
|
1831
|
+
"showValue": {
|
|
1832
|
+
"type": "boolean",
|
|
1833
|
+
"doc": "Muestra el valor formateado junto a la etiqueta."
|
|
1834
|
+
},
|
|
1835
|
+
"unknown": {
|
|
1836
|
+
"type": "boolean",
|
|
1837
|
+
"doc": "Sin dato: rayado neutro, nunca una barra a 0."
|
|
1838
|
+
},
|
|
1839
|
+
"formatValue": {
|
|
1840
|
+
"type": "(value: number, max: number) => string",
|
|
1841
|
+
"doc": "Formato del valor (por defecto, porcentaje en el idioma activo)."
|
|
1842
|
+
}
|
|
1843
|
+
}
|
|
1844
|
+
},
|
|
1845
|
+
"notes": [
|
|
1846
|
+
"Sin dato es unknown (barra rayada), nunca value={0}. Para un texto propio del valor, formatValue (p. ej. «38 de 42 agentes»).",
|
|
1847
|
+
"Con segments, acompáñala de Legend con los mismos tonos y valores."
|
|
1848
|
+
],
|
|
1849
|
+
"examples": [
|
|
1850
|
+
{
|
|
1851
|
+
"title": "Parte frente a total",
|
|
1852
|
+
"code": "<ProportionBar label=\"Facturación\" value={38} max={42} tone=\"danger\" showValue />"
|
|
1853
|
+
},
|
|
1854
|
+
{
|
|
1855
|
+
"title": "Reparto en segmentos",
|
|
1856
|
+
"code": "<ProportionBar\n label=\"Por estado\"\n max={1240}\n showValue\n segments={[\n { value: 520, tone: \"chart-1\", label: \"Nuevos\" },\n { value: 410, tone: \"chart-2\", label: \"En curso\" },\n { value: 310, tone: \"chart-3\", label: \"Escalados\" },\n ]}\n/>"
|
|
1857
|
+
},
|
|
1858
|
+
{
|
|
1859
|
+
"title": "Sin dato (rayada, nunca 0)",
|
|
1860
|
+
"code": "<ProportionBar label=\"Bajas\" max={18} unknown showValue />"
|
|
1861
|
+
}
|
|
1862
|
+
]
|
|
1863
|
+
},
|
|
1864
|
+
"quantity": {
|
|
1865
|
+
"import": "orbital-ds/ui/quantity",
|
|
1866
|
+
"group": "data",
|
|
1867
|
+
"summary": "Cifra con unidad UCUM (bytes, %, horas, días, recuentos) en el idioma activo; un nulo pinta «Sin dato». Para uso frente a un límite, UsageMeter; para una fecha, DateTime.",
|
|
1868
|
+
"see": [
|
|
1869
|
+
{
|
|
1870
|
+
"component": "usage-meter",
|
|
1871
|
+
"when": "uso frente a lo contratado, con barra y aviso"
|
|
1872
|
+
},
|
|
1873
|
+
{
|
|
1874
|
+
"component": "date-time",
|
|
1875
|
+
"when": "fechas y horas (absolutas o «hace 5 minutos»)"
|
|
1876
|
+
},
|
|
1877
|
+
{
|
|
1878
|
+
"component": "stat",
|
|
1879
|
+
"when": "cifra clave destacada con etiqueta y variación"
|
|
1880
|
+
}
|
|
1881
|
+
],
|
|
1882
|
+
"exports": [
|
|
1883
|
+
"Quantity"
|
|
1884
|
+
],
|
|
1885
|
+
"slots": [
|
|
1886
|
+
"quantity"
|
|
1887
|
+
],
|
|
1888
|
+
"optionalPeers": [],
|
|
1889
|
+
"props": {
|
|
1890
|
+
"Quantity": {
|
|
1891
|
+
"compact": {
|
|
1892
|
+
"type": "boolean",
|
|
1893
|
+
"doc": "Notación compacta para recuentos grandes (1,2 mil)."
|
|
1894
|
+
},
|
|
1895
|
+
"system": {
|
|
1896
|
+
"type": "\"si\" | \"binary\"",
|
|
1897
|
+
"values": [
|
|
1898
|
+
"si",
|
|
1899
|
+
"binary"
|
|
1900
|
+
],
|
|
1901
|
+
"doc": "\"si\" (1000, GB) por defecto; \"binary\" (1024, GiB) para memoria o cuando el contrato lo diga."
|
|
1902
|
+
},
|
|
1903
|
+
"unitDisplay": {
|
|
1904
|
+
"type": "DsUnitDisplay",
|
|
1905
|
+
"values": [
|
|
1906
|
+
"long",
|
|
1907
|
+
"short",
|
|
1908
|
+
"narrow"
|
|
1909
|
+
],
|
|
1910
|
+
"doc": "Forma de la unidad: \"short\" (12 GB), \"long\" (12 gigabytes), \"narrow\" (12GB)."
|
|
1911
|
+
},
|
|
1912
|
+
"maximumFractionDigits": {
|
|
1913
|
+
"type": "number",
|
|
1914
|
+
"doc": "Decimales máximos. Por defecto: 1 en bytes y tasas escaladas, 0 en el resto salvo que el valor los traiga."
|
|
1915
|
+
},
|
|
1916
|
+
"value": {
|
|
1917
|
+
"type": "number",
|
|
1918
|
+
"required": true
|
|
1919
|
+
},
|
|
1920
|
+
"unit": {
|
|
1921
|
+
"type": "string",
|
|
1922
|
+
"doc": "Unidad UCUM (`By`, `GBy`, `%`, `h`, `{device}`…). Sin ella, número sin unidad."
|
|
1923
|
+
}
|
|
1924
|
+
}
|
|
1925
|
+
},
|
|
1926
|
+
"notes": [
|
|
1927
|
+
"Cualquier cifra con unidad (bytes, %, horas, recuentos) pasa por Quantity o por formatQuantity: nunca formatees a mano ni dividas entre 1024 escribiendo «GB».",
|
|
1928
|
+
"Bytes en SI por defecto (1 GB = 1000 MB); system=\"binary\" (GiB) solo para memoria o si el contrato lo dice."
|
|
1929
|
+
],
|
|
1930
|
+
"examples": [
|
|
1931
|
+
{
|
|
1932
|
+
"title": "Bytes, duración y recuento",
|
|
1933
|
+
"code": "<Quantity value={12_345_678_901} unit=\"By\" />\n<Quantity value={30} unit=\"d\" unitDisplay=\"long\" />\n<Quantity value={3} unit=\"{device}\" />"
|
|
1934
|
+
},
|
|
1935
|
+
{
|
|
1936
|
+
"title": "Memoria en unidades binarias (GiB)",
|
|
1937
|
+
"code": "<Quantity value={17_179_869_184} unit=\"By\" system=\"binary\" />"
|
|
1938
|
+
}
|
|
1939
|
+
]
|
|
1940
|
+
},
|
|
1941
|
+
"shield": {
|
|
1942
|
+
"import": "orbital-ds/ui/shield",
|
|
1943
|
+
"group": "data",
|
|
1944
|
+
"summary": "Escudo que se rellena según el nivel de protección (0–1); ShieldRadar lo rodea de anillos que laten en protegido o alerta. Para un estado con texto, StatusBadge.",
|
|
1945
|
+
"see": [
|
|
1946
|
+
{
|
|
1947
|
+
"component": "status-badge",
|
|
1948
|
+
"when": "el estado con su texto (protegido, en riesgo), en listas y tablas"
|
|
1949
|
+
},
|
|
1950
|
+
{
|
|
1951
|
+
"component": "gauge",
|
|
1952
|
+
"when": "una puntuación con cifra y escala"
|
|
1953
|
+
},
|
|
1954
|
+
{
|
|
1955
|
+
"component": "status-hero",
|
|
1956
|
+
"when": "disco grande con el icono de la entidad y su estado, en la cabecera de una ficha"
|
|
1957
|
+
}
|
|
1958
|
+
],
|
|
1959
|
+
"exports": [
|
|
1960
|
+
"Shield",
|
|
1961
|
+
"ShieldRadar"
|
|
1962
|
+
],
|
|
1963
|
+
"slots": [
|
|
1964
|
+
"shield",
|
|
1965
|
+
"shield-badge",
|
|
1966
|
+
"shield-body",
|
|
1967
|
+
"shield-graphic",
|
|
1968
|
+
"shield-progress",
|
|
1969
|
+
"shield-progress-clip",
|
|
1970
|
+
"shield-radar",
|
|
1971
|
+
"shield-radar-circle",
|
|
1972
|
+
"shield-radar-content",
|
|
1973
|
+
"shield-ring",
|
|
1974
|
+
"shield-value"
|
|
1975
|
+
],
|
|
1976
|
+
"optionalPeers": [],
|
|
1977
|
+
"props": {
|
|
1978
|
+
"Shield": {
|
|
1979
|
+
"value": {
|
|
1980
|
+
"type": "number",
|
|
1981
|
+
"doc": "Protección de 0 a 1 (se recorta a ese rango). Sin valor, el escudo vacío."
|
|
1982
|
+
},
|
|
1983
|
+
"size": {
|
|
1984
|
+
"type": "ShieldSize",
|
|
1985
|
+
"values": [
|
|
1986
|
+
"sm",
|
|
1987
|
+
"md"
|
|
1988
|
+
]
|
|
1989
|
+
},
|
|
1990
|
+
"label": {
|
|
1991
|
+
"type": "string",
|
|
1992
|
+
"doc": "Texto accesible. Por defecto, «Nivel de protección: N %»."
|
|
1993
|
+
},
|
|
1994
|
+
"decorative": {
|
|
1995
|
+
"type": "boolean",
|
|
1996
|
+
"doc": "Solo decoración: se oculta a los lectores de pantalla."
|
|
1997
|
+
},
|
|
1998
|
+
"children": {
|
|
1999
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
2000
|
+
"doc": "Insignia en lugar del porcentaje (estrella, icono…)."
|
|
2001
|
+
}
|
|
2002
|
+
},
|
|
2003
|
+
"ShieldRadar": {
|
|
2004
|
+
"tone": {
|
|
2005
|
+
"type": "ShieldRadarTone",
|
|
2006
|
+
"values": [
|
|
2007
|
+
"info",
|
|
2008
|
+
"success",
|
|
2009
|
+
"warning",
|
|
2010
|
+
"danger",
|
|
2011
|
+
"primary",
|
|
2012
|
+
"neutral"
|
|
2013
|
+
]
|
|
2014
|
+
}
|
|
2015
|
+
}
|
|
2016
|
+
},
|
|
2017
|
+
"notes": [
|
|
2018
|
+
"Nivel de protección 0–1; con decorative si solo adorna. ShieldRadar para protegido/alerta con latido del tema."
|
|
2019
|
+
],
|
|
2020
|
+
"examples": [
|
|
2021
|
+
{
|
|
2022
|
+
"title": "Nivel de protección",
|
|
2023
|
+
"code": "<Shield value={0.8} label=\"Cuenta protegida al 80 %\" />"
|
|
2024
|
+
},
|
|
2025
|
+
{
|
|
2026
|
+
"title": "Con radar de alerta",
|
|
2027
|
+
"code": "<ShieldRadar tone=\"danger\">\n <Shield value={0.2} />\n</ShieldRadar>"
|
|
2028
|
+
}
|
|
2029
|
+
]
|
|
2030
|
+
},
|
|
2031
|
+
"sparkline": {
|
|
2032
|
+
"import": "orbital-ds/ui/sparkline",
|
|
2033
|
+
"group": "data",
|
|
2034
|
+
"summary": "Tendencia mínima en SVG (sin ejes ni librería) para acompañar una cifra; un nulo corta la línea. Dentro de un KPI va en StatChart; para un gráfico con ejes, ChartCard.",
|
|
2035
|
+
"see": [
|
|
2036
|
+
{
|
|
2037
|
+
"component": "stat",
|
|
2038
|
+
"when": "KPI con etiqueta, valor y variación (la sparkline va dentro, en StatChart)"
|
|
2039
|
+
},
|
|
2040
|
+
{
|
|
2041
|
+
"component": "chart-card",
|
|
2042
|
+
"when": "gráfico completo con ejes, tooltip y estados"
|
|
2043
|
+
},
|
|
2044
|
+
{
|
|
2045
|
+
"component": "echart",
|
|
2046
|
+
"when": "gráfico ECharts dentro de tu propia maqueta"
|
|
2047
|
+
}
|
|
2048
|
+
],
|
|
2049
|
+
"exports": [
|
|
2050
|
+
"Sparkline",
|
|
2051
|
+
"sparklineVariants"
|
|
2052
|
+
],
|
|
2053
|
+
"slots": [
|
|
2054
|
+
"sparkline",
|
|
2055
|
+
"sparkline-area",
|
|
2056
|
+
"sparkline-line"
|
|
2057
|
+
],
|
|
2058
|
+
"optionalPeers": [],
|
|
2059
|
+
"props": {
|
|
2060
|
+
"Sparkline": {
|
|
2061
|
+
"data": {
|
|
2062
|
+
"type": "readonly (number | null | undefined)[]",
|
|
2063
|
+
"required": true,
|
|
2064
|
+
"doc": "Serie de valores; `null` = sin dato (hueco), nunca cero."
|
|
2065
|
+
},
|
|
2066
|
+
"series": {
|
|
2067
|
+
"type": "SparklineSeries",
|
|
2068
|
+
"doc": "Color de serie del tema (--chart-1..5)."
|
|
2069
|
+
},
|
|
2070
|
+
"tone": {
|
|
2071
|
+
"type": "SparklineTone",
|
|
2072
|
+
"values": [
|
|
2073
|
+
"info",
|
|
2074
|
+
"success",
|
|
2075
|
+
"warning",
|
|
2076
|
+
"danger",
|
|
2077
|
+
"neutral"
|
|
2078
|
+
],
|
|
2079
|
+
"doc": "Color de un estado. Si no hay `series` ni `tone`, usa el color del texto."
|
|
2080
|
+
},
|
|
2081
|
+
"area": {
|
|
2082
|
+
"type": "boolean",
|
|
2083
|
+
"doc": "Rellena el área bajo la línea con el mismo color, atenuado."
|
|
2084
|
+
},
|
|
2085
|
+
"label": {
|
|
2086
|
+
"type": "string",
|
|
2087
|
+
"doc": "Descripción accesible. Sin ella la línea es decorativa (aria-hidden)."
|
|
2088
|
+
}
|
|
2089
|
+
}
|
|
2090
|
+
},
|
|
2091
|
+
"notes": [
|
|
2092
|
+
"Sin label es decorativa (aria-hidden): pon label con la lectura de la tendencia si no hay un texto cerca que la cuente.",
|
|
2093
|
+
"El color sale de series (1–5, la paleta del tema) o de tone (estado); sin ninguno, toma el color del texto. Nunca un color escrito."
|
|
2094
|
+
],
|
|
2095
|
+
"examples": [
|
|
2096
|
+
{
|
|
2097
|
+
"title": "Serie con área y lectura accesible",
|
|
2098
|
+
"code": "<Sparkline data={[312, 298, 341, 360, 389]} series={1} area label=\"Llamadas de los últimos 5 días, al alza\" />"
|
|
2099
|
+
},
|
|
2100
|
+
{
|
|
2101
|
+
"title": "Dentro de un KPI",
|
|
2102
|
+
"code": "<Stat>\n <StatLabel>Llamadas atendidas</StatLabel>\n <StatValue value={1284} />\n <StatChart>\n <Sparkline data={calls} series={1} area />\n </StatChart>\n</Stat>"
|
|
2103
|
+
}
|
|
2104
|
+
]
|
|
2105
|
+
},
|
|
2106
|
+
"stat-group": {
|
|
2107
|
+
"import": "orbital-ds/ui/stat-group",
|
|
2108
|
+
"group": "data",
|
|
2109
|
+
"summary": "Maqueta de varias cifras clave (Stat) en fila que sigue el ancho del contenedor: overview en tarjetas, compact, comparison o strip (una sola superficie). Una cifra sola es un Stat.",
|
|
2110
|
+
"see": [
|
|
2111
|
+
{
|
|
2112
|
+
"component": "stat",
|
|
2113
|
+
"when": "una sola cifra clave (KPI)"
|
|
2114
|
+
},
|
|
2115
|
+
{
|
|
2116
|
+
"component": "description-list",
|
|
2117
|
+
"when": "muchos datos término–valor sin destacar (límites, atributos)"
|
|
2118
|
+
},
|
|
2119
|
+
{
|
|
2120
|
+
"component": "mosaic",
|
|
2121
|
+
"when": "mezclar KPI, gráficos y tarjetas en una rejilla (bento)"
|
|
2122
|
+
}
|
|
2123
|
+
],
|
|
2124
|
+
"exports": [
|
|
2125
|
+
"StatGroup",
|
|
2126
|
+
"type StatGroupPreset"
|
|
2127
|
+
],
|
|
2128
|
+
"slots": [
|
|
2129
|
+
"stat-group"
|
|
2130
|
+
],
|
|
2131
|
+
"optionalPeers": [],
|
|
2132
|
+
"props": {
|
|
2133
|
+
"StatGroup": {
|
|
2134
|
+
"preset": {
|
|
2135
|
+
"type": "StatGroupPreset",
|
|
2136
|
+
"values": [
|
|
2137
|
+
"compact",
|
|
2138
|
+
"overview",
|
|
2139
|
+
"comparison",
|
|
2140
|
+
"strip"
|
|
2141
|
+
]
|
|
2142
|
+
}
|
|
2143
|
+
}
|
|
2144
|
+
},
|
|
2145
|
+
"presets": {
|
|
2146
|
+
"values": [
|
|
2147
|
+
"overview",
|
|
2148
|
+
"compact",
|
|
2149
|
+
"comparison",
|
|
2150
|
+
"strip"
|
|
2151
|
+
],
|
|
2152
|
+
"default": "overview",
|
|
2153
|
+
"intent": {
|
|
2154
|
+
"overview": "hasta 4 columnas: cabecera de un panel de datos",
|
|
2155
|
+
"compact": "2 columnas en estrecho y hasta 4 en ancho, con menos aire: paneles densos",
|
|
2156
|
+
"comparison": "hasta 2 columnas: cifras para comparar de dos en dos",
|
|
2157
|
+
"strip": "una sola superficie con las cifras separadas por filetes (Stat variant=\"plain\"):"
|
|
2158
|
+
}
|
|
2159
|
+
},
|
|
2160
|
+
"notes": [
|
|
2161
|
+
"Agrupa varios Stat en la cabecera de un panel; no pongas más de 4 por fila. Para series o tendencias usa Sparkline dentro de cada Stat.",
|
|
2162
|
+
"`strip` con Stat variant=\"plain\": un resumen en una sola tarjeta (hasta 5 cifras); para KPI que se pulsan o con tono propio, mejor `overview` con tarjetas."
|
|
2163
|
+
],
|
|
2164
|
+
"examples": [
|
|
2165
|
+
{
|
|
2166
|
+
"title": "Preset overview (tarjetas)",
|
|
2167
|
+
"code": "<StatGroup preset=\"overview\">\n <Stat>\n <StatLabel>Ingresos</StatLabel>\n <StatValue value={48200} format={{ style: \"currency\", currency: \"EUR\", maximumFractionDigits: 0 }} />\n </Stat>\n <Stat>\n <StatLabel>Pedidos</StatLabel>\n <StatValue value={1284} />\n </Stat>\n</StatGroup>"
|
|
2168
|
+
},
|
|
2169
|
+
{
|
|
2170
|
+
"title": "Preset strip con Stat variant=\"plain\"",
|
|
2171
|
+
"code": "<StatGroup preset=\"strip\">\n <Stat variant=\"plain\">\n <StatLabel>Pedidos</StatLabel>\n <StatValue value={1284} />\n <StatDelta value={-2.4} />\n </Stat>\n <Stat variant=\"plain\" tone=\"bad\">\n <StatLabel>Devoluciones</StatLabel>\n <StatValue value={87} />\n <StatDelta value={12} polarity=\"lower-is-better\" />\n </Stat>\n</StatGroup>"
|
|
2172
|
+
}
|
|
2173
|
+
]
|
|
2174
|
+
},
|
|
2175
|
+
"stat": {
|
|
2176
|
+
"import": "orbital-ds/ui/stat",
|
|
2177
|
+
"group": "data",
|
|
2178
|
+
"summary": "Cifra clave (KPI) con etiqueta, variación con polaridad, descripción, objetivo o sparkline; un nulo pinta «Sin dato». Varias juntas van en StatGroup.",
|
|
2179
|
+
"see": [
|
|
2180
|
+
{
|
|
2181
|
+
"component": "stat-group",
|
|
2182
|
+
"when": "varias cifras clave juntas en la cabecera de un panel"
|
|
2183
|
+
},
|
|
2184
|
+
{
|
|
2185
|
+
"component": "quantity",
|
|
2186
|
+
"when": "una cifra con unidad dentro de un texto, una tabla o una ficha, sin destacar"
|
|
2187
|
+
},
|
|
2188
|
+
{
|
|
2189
|
+
"component": "usage-meter",
|
|
2190
|
+
"when": "uso frente a lo contratado (StatProgress es para objetivos que se quieren alcanzar)"
|
|
2191
|
+
}
|
|
2192
|
+
],
|
|
2193
|
+
"exports": [
|
|
2194
|
+
"Stat",
|
|
2195
|
+
"StatChart",
|
|
2196
|
+
"StatDelta",
|
|
2197
|
+
"StatDescription",
|
|
2198
|
+
"StatHeader",
|
|
2199
|
+
"StatIcon",
|
|
2200
|
+
"StatLabel",
|
|
2201
|
+
"StatProgress",
|
|
2202
|
+
"StatSwatch",
|
|
2203
|
+
"StatValue",
|
|
2204
|
+
"statVariants"
|
|
2205
|
+
],
|
|
2206
|
+
"slots": [
|
|
2207
|
+
"stat",
|
|
2208
|
+
"stat-chart",
|
|
2209
|
+
"stat-delta",
|
|
2210
|
+
"stat-description",
|
|
2211
|
+
"stat-header",
|
|
2212
|
+
"stat-icon",
|
|
2213
|
+
"stat-label",
|
|
2214
|
+
"stat-progress",
|
|
2215
|
+
"stat-swatch",
|
|
2216
|
+
"stat-value",
|
|
2217
|
+
"stat-value-number",
|
|
2218
|
+
"stat-value-prefix",
|
|
2219
|
+
"stat-value-reason",
|
|
2220
|
+
"stat-value-unit"
|
|
2221
|
+
],
|
|
2222
|
+
"optionalPeers": [],
|
|
2223
|
+
"props": {
|
|
2224
|
+
"Stat": {
|
|
2225
|
+
"variant": {
|
|
2226
|
+
"type": "StatVariant",
|
|
2227
|
+
"values": [
|
|
2228
|
+
"inline",
|
|
2229
|
+
"plain",
|
|
2230
|
+
"card"
|
|
2231
|
+
]
|
|
2232
|
+
},
|
|
2233
|
+
"size": {
|
|
2234
|
+
"type": "StatSize",
|
|
2235
|
+
"values": [
|
|
2236
|
+
"sm",
|
|
2237
|
+
"lg",
|
|
2238
|
+
"md"
|
|
2239
|
+
],
|
|
2240
|
+
"doc": "Tamaño fijo de la cifra; sin él, se adapta al ancho del contenedor."
|
|
2241
|
+
},
|
|
2242
|
+
"tone": {
|
|
2243
|
+
"type": "StatTone",
|
|
2244
|
+
"values": [
|
|
2245
|
+
"neutral",
|
|
2246
|
+
"good",
|
|
2247
|
+
"bad",
|
|
2248
|
+
"warn"
|
|
2249
|
+
]
|
|
2250
|
+
},
|
|
2251
|
+
"render": {
|
|
2252
|
+
"type": "React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, {}>",
|
|
2253
|
+
"doc": "KPI PULSABLE (solo en tarjeta): render={<button type=\"button\" />} para que, p. ej., filtre la lista de debajo. Lleva hover, foco y, con `pressed`, el estado activo (aria-pressed + anillo, no solo color)."
|
|
2254
|
+
},
|
|
2255
|
+
"pressed": {
|
|
2256
|
+
"type": "boolean",
|
|
2257
|
+
"doc": "Activo (filtro aplicado): aria-pressed y anillo del primario. Úsalo con render={<button />}."
|
|
2258
|
+
}
|
|
2259
|
+
},
|
|
2260
|
+
"StatValue": {
|
|
2261
|
+
"value": {
|
|
2262
|
+
"type": "string | number",
|
|
2263
|
+
"required": true,
|
|
2264
|
+
"doc": "Número (se formatea con Intl en el idioma activo), texto ya formateado o null = sin dato."
|
|
2265
|
+
},
|
|
2266
|
+
"unit": {
|
|
2267
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
2268
|
+
"doc": "Unidad o sufijo pegado a la cifra («min», «%», «llamadas»)."
|
|
2269
|
+
},
|
|
2270
|
+
"format": {
|
|
2271
|
+
"type": "Intl.NumberFormatOptions",
|
|
2272
|
+
"doc": "Opciones de Intl.NumberFormat (moneda, compacto, porcentaje sobre 1…)."
|
|
2273
|
+
},
|
|
2274
|
+
"fractionDigits": {
|
|
2275
|
+
"type": "number",
|
|
2276
|
+
"doc": "Decimales fijos (atajo de minimum/maximumFractionDigits)."
|
|
2277
|
+
},
|
|
2278
|
+
"reason": {
|
|
2279
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
2280
|
+
"doc": "Motivo de que no haya dato; se muestra en un tooltip y se lee con «Sin dato»."
|
|
2281
|
+
},
|
|
2282
|
+
"loading": {
|
|
2283
|
+
"type": "boolean",
|
|
2284
|
+
"doc": "Cargando: esqueleto en lugar de la cifra."
|
|
2285
|
+
},
|
|
2286
|
+
"placeholder": {
|
|
2287
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
2288
|
+
"doc": "Signo que sustituye a la cifra cuando no hay dato."
|
|
2289
|
+
},
|
|
2290
|
+
"animate": {
|
|
2291
|
+
"type": "boolean",
|
|
2292
|
+
"doc": "La cifra cuenta desde 0 (o desde el valor anterior) con el ritmo del tema. Solo números."
|
|
2293
|
+
}
|
|
2294
|
+
},
|
|
2295
|
+
"StatDelta": {
|
|
2296
|
+
"value": {
|
|
2297
|
+
"type": "number",
|
|
2298
|
+
"required": true,
|
|
2299
|
+
"doc": "Variación en PUNTOS PORCENTUALES (4.2 = +4,2 %). null = sin dato (nunca 0)."
|
|
2300
|
+
},
|
|
2301
|
+
"polarity": {
|
|
2302
|
+
"type": "StatDeltaPolarity",
|
|
2303
|
+
"values": [
|
|
2304
|
+
"neutral",
|
|
2305
|
+
"higher-is-better",
|
|
2306
|
+
"lower-is-better"
|
|
2307
|
+
],
|
|
2308
|
+
"doc": "Qué dirección es buena: decide el tono (éxito, peligro o neutro)."
|
|
2309
|
+
},
|
|
2310
|
+
"fractionDigits": {
|
|
2311
|
+
"type": "number"
|
|
2312
|
+
},
|
|
2313
|
+
"children": {
|
|
2314
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
2315
|
+
"doc": "Texto propio en lugar de la cifra formateada (p. ej. «+12 llamadas»)."
|
|
2316
|
+
}
|
|
2317
|
+
},
|
|
2318
|
+
"StatSwatch": {
|
|
2319
|
+
"series": {
|
|
2320
|
+
"type": "1 | 2 | 4 | 3 | 5",
|
|
2321
|
+
"doc": "Color de serie del tema (--chart-1..5)."
|
|
2322
|
+
},
|
|
2323
|
+
"tone": {
|
|
2324
|
+
"type": "\"info\" | \"success\" | \"warning\" | \"danger\" | \"neutral\"",
|
|
2325
|
+
"values": [
|
|
2326
|
+
"info",
|
|
2327
|
+
"success",
|
|
2328
|
+
"warning",
|
|
2329
|
+
"danger",
|
|
2330
|
+
"neutral"
|
|
2331
|
+
],
|
|
2332
|
+
"doc": "O el color de un estado."
|
|
2333
|
+
}
|
|
2334
|
+
},
|
|
2335
|
+
"StatIcon": {
|
|
2336
|
+
"tone": {
|
|
2337
|
+
"type": "\"info\" | \"success\" | \"warning\" | \"danger\" | \"primary\" | \"neutral\" | \"accent\"",
|
|
2338
|
+
"values": [
|
|
2339
|
+
"info",
|
|
2340
|
+
"success",
|
|
2341
|
+
"warning",
|
|
2342
|
+
"danger",
|
|
2343
|
+
"primary",
|
|
2344
|
+
"neutral",
|
|
2345
|
+
"accent"
|
|
2346
|
+
]
|
|
2347
|
+
}
|
|
2348
|
+
},
|
|
2349
|
+
"StatProgress": {
|
|
2350
|
+
"value": {
|
|
2351
|
+
"type": "number",
|
|
2352
|
+
"required": true,
|
|
2353
|
+
"doc": "Valor actual (misma unidad que `target`)."
|
|
2354
|
+
},
|
|
2355
|
+
"target": {
|
|
2356
|
+
"type": "number",
|
|
2357
|
+
"required": true,
|
|
2358
|
+
"doc": "Objetivo o máximo."
|
|
2359
|
+
},
|
|
2360
|
+
"children": {
|
|
2361
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
2362
|
+
"doc": "Texto propio en lugar de «N % del objetivo»."
|
|
2363
|
+
}
|
|
2364
|
+
}
|
|
2365
|
+
},
|
|
2366
|
+
"notes": [
|
|
2367
|
+
"KPI que filtra: render={<button type=\"button\" />}, pressed cuando el filtro está aplicado y onClick para alternarlo; el texto de la tarjeta dice qué pasa al pulsar.",
|
|
2368
|
+
"Un dato nulo no es cero: value={null} pinta «—» con «Sin dato» (y reason en un tooltip).",
|
|
2369
|
+
"StatHeader + StatIcon para un KPI con identidad (icono con el color del tono); StatProgress cuando hay un objetivo (cuota, presupuesto, SLA): enseña el porcentaje en texto, no solo la barra.",
|
|
2370
|
+
"`animate` en StatValue solo para la cifra principal de un panel al cargar; nunca en tablas ni en valores que cambian cada segundo.",
|
|
2371
|
+
"variant=\"plain\" dentro de StatGroup preset=\"strip\": una franja de cifras en una sola superficie, separadas por filetes."
|
|
2372
|
+
],
|
|
2373
|
+
"examples": [
|
|
2374
|
+
{
|
|
2375
|
+
"title": "KPI con variación",
|
|
2376
|
+
"code": "<Stat>\n <StatLabel>Llamadas atendidas</StatLabel>\n <StatValue value={1284} />\n <StatDelta value={3.3} polarity=\"higher-is-better\" />\n <StatDescription>frente a la semana anterior</StatDescription>\n</Stat>"
|
|
2377
|
+
},
|
|
2378
|
+
{
|
|
2379
|
+
"title": "KPI pulsable que filtra la lista (render, nunca asChild)",
|
|
2380
|
+
"code": "<Stat tone=\"warn\" render={<button type=\"button\" />} pressed={filter === \"review\"} onClick={toggleReview}>\n <StatLabel>Necesitan revisión</StatLabel>\n <StatValue value={9} />\n <StatDescription>Pulsa para ver solo estos</StatDescription>\n</Stat>"
|
|
2381
|
+
},
|
|
2382
|
+
{
|
|
2383
|
+
"title": "Sin dato, con su motivo",
|
|
2384
|
+
"code": "<Stat>\n <StatLabel>Abandono</StatLabel>\n <StatValue value={null} reason=\"La centralita no envía datos desde las 14:05\" />\n</Stat>"
|
|
2385
|
+
}
|
|
2386
|
+
]
|
|
2387
|
+
},
|
|
2388
|
+
"status-badge": {
|
|
2389
|
+
"import": "orbital-ds/ui/status-badge",
|
|
2390
|
+
"group": "data",
|
|
2391
|
+
"summary": "Estado de algo con su texto y gravedad (operativo, degradado, caído, sin dato); StatusDot para el punto solo junto a un texto. Para etiquetar o clasificar sin gravedad, Badge.",
|
|
2392
|
+
"see": [
|
|
2393
|
+
{
|
|
2394
|
+
"component": "badge",
|
|
2395
|
+
"when": "etiqueta o categoría sin significado de estado (plan, rol, recuento)"
|
|
2396
|
+
},
|
|
2397
|
+
{
|
|
2398
|
+
"component": "status-hero",
|
|
2399
|
+
"when": "estado de una entidad en grande, en la cabecera de su ficha"
|
|
2400
|
+
},
|
|
2401
|
+
{
|
|
2402
|
+
"component": "legend",
|
|
2403
|
+
"when": "clave de los tonos o series de un gráfico"
|
|
2404
|
+
}
|
|
2405
|
+
],
|
|
2406
|
+
"exports": [
|
|
2407
|
+
"StatusBadge",
|
|
2408
|
+
"StatusDot",
|
|
2409
|
+
"StatusExplanation",
|
|
2410
|
+
"StatusExplanationDetail",
|
|
2411
|
+
"StatusExplanationTerm",
|
|
2412
|
+
"statusBadgeVariants",
|
|
2413
|
+
"statusDotVariants"
|
|
2414
|
+
],
|
|
2415
|
+
"slots": [
|
|
2416
|
+
"status-badge",
|
|
2417
|
+
"status-badge-explanation",
|
|
2418
|
+
"status-badge-info",
|
|
2419
|
+
"status-badge-label",
|
|
2420
|
+
"status-dot",
|
|
2421
|
+
"status-dot-pulse",
|
|
2422
|
+
"status-explanation",
|
|
2423
|
+
"status-explanation-detail",
|
|
2424
|
+
"status-explanation-term"
|
|
2425
|
+
],
|
|
2426
|
+
"optionalPeers": [],
|
|
2427
|
+
"props": {
|
|
2428
|
+
"StatusBadge": {
|
|
2429
|
+
"level": {
|
|
2430
|
+
"type": "StatusLevel",
|
|
2431
|
+
"values": [
|
|
2432
|
+
"none",
|
|
2433
|
+
"info",
|
|
2434
|
+
"warning",
|
|
2435
|
+
"neutral",
|
|
2436
|
+
"critical",
|
|
2437
|
+
"ok"
|
|
2438
|
+
]
|
|
2439
|
+
},
|
|
2440
|
+
"variant": {
|
|
2441
|
+
"type": "StatusBadgeVariant",
|
|
2442
|
+
"values": [
|
|
2443
|
+
"outline",
|
|
2444
|
+
"soft",
|
|
2445
|
+
"dot"
|
|
2446
|
+
]
|
|
2447
|
+
},
|
|
2448
|
+
"pulse": {
|
|
2449
|
+
"type": "boolean",
|
|
2450
|
+
"doc": "Latido del punto (para lo que está pasando ahora). Respeta el movimiento reducido."
|
|
2451
|
+
},
|
|
2452
|
+
"children": {
|
|
2453
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
2454
|
+
"doc": "Texto del estado. Obligatorio salvo en `level=\"none\"` (por defecto, «Sin dato»)."
|
|
2455
|
+
},
|
|
2456
|
+
"explanation": {
|
|
2457
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
2458
|
+
"doc": "Explicación en un popover al pulsar: usa StatusExplanation (qué significa / por qué / qué hacer)."
|
|
2459
|
+
}
|
|
2460
|
+
},
|
|
2461
|
+
"StatusDot": {
|
|
2462
|
+
"level": {
|
|
2463
|
+
"type": "StatusLevel",
|
|
2464
|
+
"values": [
|
|
2465
|
+
"none",
|
|
2466
|
+
"info",
|
|
2467
|
+
"warning",
|
|
2468
|
+
"neutral",
|
|
2469
|
+
"critical",
|
|
2470
|
+
"ok"
|
|
2471
|
+
]
|
|
2472
|
+
},
|
|
2473
|
+
"pulse": {
|
|
2474
|
+
"type": "boolean"
|
|
2475
|
+
},
|
|
2476
|
+
"size": {
|
|
2477
|
+
"type": "\"sm\" | \"lg\" | \"md\"",
|
|
2478
|
+
"values": [
|
|
2479
|
+
"sm",
|
|
2480
|
+
"lg",
|
|
2481
|
+
"md"
|
|
2482
|
+
],
|
|
2483
|
+
"doc": "Tamaño del punto suelto (sin él, el del punto en línea: --ds-status-dot)."
|
|
2484
|
+
},
|
|
2485
|
+
"label": {
|
|
2486
|
+
"type": "string",
|
|
2487
|
+
"doc": "Texto accesible. Sin él el punto es decorativo: acompáñalo de texto visible."
|
|
2488
|
+
}
|
|
2489
|
+
}
|
|
2490
|
+
},
|
|
2491
|
+
"notes": [
|
|
2492
|
+
"El estado SIEMPRE con texto: el color refuerza, nunca es el único portador; level=\"none\" es «sin dato», distinto de ok."
|
|
2493
|
+
],
|
|
2494
|
+
"examples": [
|
|
2495
|
+
{
|
|
2496
|
+
"title": "Niveles con texto",
|
|
2497
|
+
"code": "<StatusBadge level=\"ok\">Operativo</StatusBadge>\n<StatusBadge level=\"warning\" variant=\"dot\">Degradado</StatusBadge>\n<StatusBadge level=\"critical\" pulse>Incidencia en curso</StatusBadge>"
|
|
2498
|
+
},
|
|
2499
|
+
{
|
|
2500
|
+
"title": "Punto solo, con texto accesible",
|
|
2501
|
+
"code": "<StatusDot level=\"critical\" pulse label=\"Centralita caída\" />"
|
|
2502
|
+
},
|
|
2503
|
+
{
|
|
2504
|
+
"title": "Con explicación al pulsar",
|
|
2505
|
+
"code": "<StatusBadge\n level=\"warning\"\n explanation={\n <StatusExplanation>\n <StatusExplanationTerm>Qué significa</StatusExplanationTerm>\n <StatusExplanationDetail>El SLA de la última hora está por debajo del 85 %.</StatusExplanationDetail>\n </StatusExplanation>\n }\n>\n SLA en riesgo\n</StatusBadge>"
|
|
2506
|
+
}
|
|
2507
|
+
]
|
|
2508
|
+
},
|
|
2509
|
+
"status-hero": {
|
|
2510
|
+
"import": "orbital-ds/ui/status-hero",
|
|
2511
|
+
"group": "data",
|
|
2512
|
+
"summary": "Disco grande con el icono o la imagen de una entidad, halo del color de su estado e insignia: el estado en la cabecera de su ficha (dispositivo protegido, cuenta en riesgo).",
|
|
2513
|
+
"see": [
|
|
2514
|
+
{
|
|
2515
|
+
"component": "status-badge",
|
|
2516
|
+
"when": "el estado con texto en listas, tablas y filas"
|
|
2517
|
+
},
|
|
2518
|
+
{
|
|
2519
|
+
"component": "shield",
|
|
2520
|
+
"when": "nivel de protección 0–1 en forma de escudo"
|
|
2521
|
+
},
|
|
2522
|
+
{
|
|
2523
|
+
"component": "avatar",
|
|
2524
|
+
"when": "la imagen o iniciales de una persona, sin estado"
|
|
2525
|
+
}
|
|
2526
|
+
],
|
|
2527
|
+
"exports": [
|
|
2528
|
+
"StatusHero"
|
|
2529
|
+
],
|
|
2530
|
+
"slots": [
|
|
2531
|
+
"status-hero",
|
|
2532
|
+
"status-hero-badge",
|
|
2533
|
+
"status-hero-surface"
|
|
2534
|
+
],
|
|
2535
|
+
"optionalPeers": [],
|
|
2536
|
+
"props": {
|
|
2537
|
+
"StatusHero": {
|
|
2538
|
+
"tone": {
|
|
2539
|
+
"type": "StatusHeroTone",
|
|
2540
|
+
"values": [
|
|
2541
|
+
"info",
|
|
2542
|
+
"success",
|
|
2543
|
+
"warning",
|
|
2544
|
+
"danger",
|
|
2545
|
+
"neutral"
|
|
2546
|
+
]
|
|
2547
|
+
},
|
|
2548
|
+
"label": {
|
|
2549
|
+
"type": "string",
|
|
2550
|
+
"doc": "Texto accesible (qué y en qué estado)."
|
|
2551
|
+
},
|
|
2552
|
+
"badge": {
|
|
2553
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
2554
|
+
"doc": "Insignia a medida (icono). `null` la quita."
|
|
2555
|
+
}
|
|
2556
|
+
}
|
|
2557
|
+
},
|
|
2558
|
+
"notes": [
|
|
2559
|
+
"label con la entidad y su estado en texto (es role=img): sin él se lee solo el nombre del estado. El halo nunca es el único portador.",
|
|
2560
|
+
"Uno por vista, en la cabecera de un detalle; en listas y tablas usa StatusBadge o StatusDot."
|
|
2561
|
+
],
|
|
2562
|
+
"examples": [
|
|
2563
|
+
{
|
|
2564
|
+
"title": "Estado de un dispositivo",
|
|
2565
|
+
"code": "<StatusHero tone=\"success\" label=\"Portátil de Ana: protegido\">\n <LaptopIcon />\n</StatusHero>"
|
|
2566
|
+
},
|
|
2567
|
+
{
|
|
2568
|
+
"title": "Sin insignia",
|
|
2569
|
+
"code": "<StatusHero tone=\"info\" badge={null} label=\"Cuenta de Luis\">\n <UserIcon />\n</StatusHero>"
|
|
2570
|
+
}
|
|
2571
|
+
]
|
|
2572
|
+
},
|
|
2573
|
+
"table": {
|
|
2574
|
+
"import": "orbital-ds/ui/table",
|
|
2575
|
+
"group": "data",
|
|
2576
|
+
"summary": "Tabla HTML con el estilo del sistema (cabecera, filas, pie y leyenda) para datos estáticos y pocas filas. Si hay que ordenar, buscar, filtrar, paginar o seleccionar, DataTable.",
|
|
2577
|
+
"see": [
|
|
2578
|
+
{
|
|
2579
|
+
"component": "data-table",
|
|
2580
|
+
"when": "datos de trabajo: orden, búsqueda, filtros, paginación y selección"
|
|
2581
|
+
},
|
|
2582
|
+
{
|
|
2583
|
+
"component": "description-list",
|
|
2584
|
+
"when": "pares término–valor de una sola cosa"
|
|
2585
|
+
},
|
|
2586
|
+
{
|
|
2587
|
+
"component": "entity-list",
|
|
2588
|
+
"when": "lista de entidades como filas Item o tarjetas"
|
|
2589
|
+
}
|
|
2590
|
+
],
|
|
2591
|
+
"exports": [
|
|
2592
|
+
"Table",
|
|
2593
|
+
"TableBody",
|
|
2594
|
+
"TableCaption",
|
|
2595
|
+
"TableCell",
|
|
2596
|
+
"TableFooter",
|
|
2597
|
+
"TableHead",
|
|
2598
|
+
"TableHeader",
|
|
2599
|
+
"TableRow"
|
|
2600
|
+
],
|
|
2601
|
+
"slots": [
|
|
2602
|
+
"table",
|
|
2603
|
+
"table-body",
|
|
2604
|
+
"table-caption",
|
|
2605
|
+
"table-cell",
|
|
2606
|
+
"table-container",
|
|
2607
|
+
"table-footer",
|
|
2608
|
+
"table-head",
|
|
2609
|
+
"table-header",
|
|
2610
|
+
"table-row"
|
|
2611
|
+
],
|
|
2612
|
+
"optionalPeers": [],
|
|
2613
|
+
"notes": [
|
|
2614
|
+
"Solo para datos estáticos; si la persona necesita ordenar, filtrar, paginar o seleccionar, usa DataTable. Pares clave–valor → DescriptionList.",
|
|
2615
|
+
"Cifras con Quantity o con el formato del idioma (Intl), nunca a mano; fila seleccionada con data-state=\"selected\"."
|
|
2616
|
+
],
|
|
2617
|
+
"examples": [
|
|
2618
|
+
{
|
|
2619
|
+
"title": "Montaje mínimo",
|
|
2620
|
+
"code": "<Table>\n <TableCaption>Facturas emitidas en octubre.</TableCaption>\n <TableHeader>\n <TableRow>\n <TableHead>Factura</TableHead>\n <TableHead>Cliente</TableHead>\n </TableRow>\n </TableHeader>\n <TableBody>\n <TableRow>\n <TableCell>F-2024-118</TableCell>\n <TableCell>Acme S.L.</TableCell>\n </TableRow>\n </TableBody>\n</Table>"
|
|
2621
|
+
}
|
|
2622
|
+
]
|
|
2623
|
+
},
|
|
2624
|
+
"task-progress": {
|
|
2625
|
+
"import": "orbital-ds/ui/task-progress",
|
|
2626
|
+
"group": "data",
|
|
2627
|
+
"summary": "Avance de una tarea o proceso con su estado (sin empezar, en curso, completado, con error y su motivo visible). Para uso frente a lo contratado, UsageMeter; para pasos de un asistente, StepDots.",
|
|
2628
|
+
"see": [
|
|
2629
|
+
{
|
|
2630
|
+
"component": "progress",
|
|
2631
|
+
"when": "barra de progreso básica, sin estado ni texto propio"
|
|
2632
|
+
},
|
|
2633
|
+
{
|
|
2634
|
+
"component": "task-loader",
|
|
2635
|
+
"when": "espera de un proceso largo con sus pasos"
|
|
2636
|
+
},
|
|
2637
|
+
{
|
|
2638
|
+
"component": "usage-meter",
|
|
2639
|
+
"when": "uso frente a un límite contratado (no es un avance)"
|
|
2640
|
+
}
|
|
2641
|
+
],
|
|
2642
|
+
"exports": [
|
|
2643
|
+
"TaskProgress"
|
|
2644
|
+
],
|
|
2645
|
+
"slots": [
|
|
2646
|
+
"task-progress",
|
|
2647
|
+
"task-progress-counter",
|
|
2648
|
+
"task-progress-error",
|
|
2649
|
+
"task-progress-fill",
|
|
2650
|
+
"task-progress-fill-error",
|
|
2651
|
+
"task-progress-header",
|
|
2652
|
+
"task-progress-icon",
|
|
2653
|
+
"task-progress-label",
|
|
2654
|
+
"task-progress-row",
|
|
2655
|
+
"task-progress-track"
|
|
2656
|
+
],
|
|
2657
|
+
"optionalPeers": [],
|
|
2658
|
+
"props": {
|
|
2659
|
+
"TaskProgress": {
|
|
2660
|
+
"label": {
|
|
2661
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…"
|
|
2662
|
+
},
|
|
2663
|
+
"value": {
|
|
2664
|
+
"type": "number",
|
|
2665
|
+
"doc": "Porcentaje 0–100 (o usa current/total)."
|
|
2666
|
+
},
|
|
2667
|
+
"current": {
|
|
2668
|
+
"type": "number",
|
|
2669
|
+
"doc": "Paso actual y total: dan el porcentaje y el contador «3 de 5»."
|
|
2670
|
+
},
|
|
2671
|
+
"total": {
|
|
2672
|
+
"type": "number"
|
|
2673
|
+
},
|
|
2674
|
+
"state": {
|
|
2675
|
+
"type": "TaskState",
|
|
2676
|
+
"values": [
|
|
2677
|
+
"done",
|
|
2678
|
+
"idle",
|
|
2679
|
+
"error",
|
|
2680
|
+
"running"
|
|
2681
|
+
]
|
|
2682
|
+
},
|
|
2683
|
+
"error": {
|
|
2684
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
2685
|
+
"doc": "Motivo del fallo (estado error)."
|
|
2686
|
+
},
|
|
2687
|
+
"counter": {
|
|
2688
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
2689
|
+
"doc": "Contador a medida (por defecto «n de N» o el porcentaje)."
|
|
2690
|
+
}
|
|
2691
|
+
}
|
|
2692
|
+
},
|
|
2693
|
+
"notes": [
|
|
2694
|
+
"value es un porcentaje 0–100, o current/total para un recuento; sin state, el estado se deduce del valor (0 sin empezar, 100 completado).",
|
|
2695
|
+
"Un fallo va con state=\"error\" y error con el motivo en texto (se anuncia por aria-describedby), no solo en color."
|
|
2696
|
+
],
|
|
2697
|
+
"examples": [
|
|
2698
|
+
{
|
|
2699
|
+
"title": "Por recuento",
|
|
2700
|
+
"code": "<TaskProgress label=\"Análisis de dispositivos\" current={3} total={5} />"
|
|
2701
|
+
},
|
|
2702
|
+
{
|
|
2703
|
+
"title": "Con error y su motivo",
|
|
2704
|
+
"code": "<TaskProgress label=\"Sincronización\" value={70} state=\"error\" error=\"Sin conexión con el servidor\" />"
|
|
2705
|
+
}
|
|
2706
|
+
]
|
|
2707
|
+
},
|
|
2708
|
+
"timeline": {
|
|
2709
|
+
"import": "orbital-ds/ui/timeline",
|
|
2710
|
+
"group": "data",
|
|
2711
|
+
"summary": "Historial o actividad en una lista ordenada: eventos con punto o icono, título, hora (absoluta o relativa) y acciones. Para avisos con seguimiento, NotificationCenter (notifications).",
|
|
2712
|
+
"see": [
|
|
2713
|
+
{
|
|
2714
|
+
"component": "notifications",
|
|
2715
|
+
"when": "avisos con estado (nuevo, revisado, resuelto) en la campana"
|
|
2716
|
+
},
|
|
2717
|
+
{
|
|
2718
|
+
"component": "step-flow",
|
|
2719
|
+
"when": "pasos de un proceso que la persona recorre, no eventos pasados"
|
|
2720
|
+
},
|
|
2721
|
+
{
|
|
2722
|
+
"component": "entity-list",
|
|
2723
|
+
"when": "lista de entidades, no de sucesos en el tiempo"
|
|
2724
|
+
}
|
|
2725
|
+
],
|
|
2726
|
+
"exports": [
|
|
2727
|
+
"Timeline",
|
|
2728
|
+
"TimelineActions",
|
|
2729
|
+
"TimelineContent",
|
|
2730
|
+
"TimelineDescription",
|
|
2731
|
+
"TimelineIndicator",
|
|
2732
|
+
"TimelineItem",
|
|
2733
|
+
"TimelineTime",
|
|
2734
|
+
"TimelineTitle"
|
|
2735
|
+
],
|
|
2736
|
+
"slots": [
|
|
2737
|
+
"timeline",
|
|
2738
|
+
"timeline-actions",
|
|
2739
|
+
"timeline-connector",
|
|
2740
|
+
"timeline-content",
|
|
2741
|
+
"timeline-description",
|
|
2742
|
+
"timeline-dot",
|
|
2743
|
+
"timeline-icon",
|
|
2744
|
+
"timeline-indicator",
|
|
2745
|
+
"timeline-item",
|
|
2746
|
+
"timeline-time",
|
|
2747
|
+
"timeline-title"
|
|
2748
|
+
],
|
|
2749
|
+
"optionalPeers": [],
|
|
2750
|
+
"props": {
|
|
2751
|
+
"TimelineItem": {
|
|
2752
|
+
"tone": {
|
|
2753
|
+
"type": "TimelineTone",
|
|
2754
|
+
"values": [
|
|
2755
|
+
"info",
|
|
2756
|
+
"success",
|
|
2757
|
+
"warning",
|
|
2758
|
+
"danger",
|
|
2759
|
+
"primary",
|
|
2760
|
+
"neutral"
|
|
2761
|
+
]
|
|
2762
|
+
}
|
|
2763
|
+
},
|
|
2764
|
+
"TimelineTime": {
|
|
2765
|
+
"dateTime": {
|
|
2766
|
+
"type": "string | number | Date",
|
|
2767
|
+
"required": true,
|
|
2768
|
+
"doc": "Momento de la entrada (Date, ISO o milisegundos)."
|
|
2769
|
+
},
|
|
2770
|
+
"relative": {
|
|
2771
|
+
"type": "boolean",
|
|
2772
|
+
"doc": "Muestra «hace 5 minutos» (Intl.RelativeTimeFormat); la fecha completa queda en el título."
|
|
2773
|
+
},
|
|
2774
|
+
"now": {
|
|
2775
|
+
"type": "Date",
|
|
2776
|
+
"doc": "Referencia para el formato relativo (por defecto, ahora). Fíjala en SSR para no desajustar la hidratación."
|
|
2777
|
+
},
|
|
2778
|
+
"format": {
|
|
2779
|
+
"type": "Intl.DateTimeFormatOptions",
|
|
2780
|
+
"doc": "Formato absoluto (Intl.DateTimeFormat)."
|
|
2781
|
+
}
|
|
2782
|
+
}
|
|
2783
|
+
},
|
|
2784
|
+
"notes": [
|
|
2785
|
+
"Del más reciente al más antiguo; la hora siempre con TimelineTime (relative para lo reciente), nunca escrita a mano.",
|
|
2786
|
+
"tone del vocabulario común (info, success, warning, danger, primary, neutral) para el punto; el significado lo dice el título, no el color."
|
|
2787
|
+
],
|
|
2788
|
+
"examples": [
|
|
2789
|
+
{
|
|
2790
|
+
"title": "Evento con icono, hora relativa y acciones",
|
|
2791
|
+
"code": "<Timeline>\n <TimelineItem tone=\"danger\">\n <TimelineIndicator>\n <BellRingIcon />\n </TimelineIndicator>\n <TimelineContent>\n <TimelineTitle>SLA por debajo del 80 %</TimelineTitle>\n <TimelineTime dateTime={event.createdAt} relative />\n <TimelineDescription>Cola de soporte técnico, turno de tarde.</TimelineDescription>\n <TimelineActions>\n <Button size=\"sm\">Responder</Button>\n </TimelineActions>\n </TimelineContent>\n </TimelineItem>\n</Timeline>"
|
|
2792
|
+
}
|
|
2793
|
+
]
|
|
2794
|
+
},
|
|
2795
|
+
"usage-meter": {
|
|
2796
|
+
"import": "orbital-ds/ui/usage-meter",
|
|
2797
|
+
"group": "data",
|
|
2798
|
+
"summary": "Uso frente a lo contratado («12 GB de 50 GB»): avisa al 80 %, es crítico al 100 % e ilimitado va sin barra. Para un objetivo que se quiere alcanzar, StatProgress (en Stat).",
|
|
2799
|
+
"see": [
|
|
2800
|
+
{
|
|
2801
|
+
"component": "stat",
|
|
2802
|
+
"when": "KPI con StatProgress para objetivos (cuota, presupuesto, SLA)"
|
|
2803
|
+
},
|
|
2804
|
+
{
|
|
2805
|
+
"component": "proportion-bar",
|
|
2806
|
+
"when": "parte frente al total o reparto en segmentos, sin semántica de límite"
|
|
2807
|
+
},
|
|
2808
|
+
{
|
|
2809
|
+
"component": "gauge",
|
|
2810
|
+
"when": "un valor en anillo o arco con la cifra en el centro"
|
|
2811
|
+
}
|
|
2812
|
+
],
|
|
2813
|
+
"exports": [
|
|
2814
|
+
"UsageMeter"
|
|
2815
|
+
],
|
|
2816
|
+
"slots": [
|
|
2817
|
+
"usage-meter",
|
|
2818
|
+
"usage-meter-bar",
|
|
2819
|
+
"usage-meter-header",
|
|
2820
|
+
"usage-meter-indicator",
|
|
2821
|
+
"usage-meter-label",
|
|
2822
|
+
"usage-meter-remaining",
|
|
2823
|
+
"usage-meter-track",
|
|
2824
|
+
"usage-meter-value"
|
|
2825
|
+
],
|
|
2826
|
+
"optionalPeers": [],
|
|
2827
|
+
"props": {
|
|
2828
|
+
"UsageMeter": {
|
|
2829
|
+
"system": {
|
|
2830
|
+
"type": "\"si\" | \"binary\"",
|
|
2831
|
+
"values": [
|
|
2832
|
+
"si",
|
|
2833
|
+
"binary"
|
|
2834
|
+
],
|
|
2835
|
+
"doc": "\"si\" (1000, GB) por defecto; \"binary\" (1024, GiB) para memoria o cuando el contrato lo diga."
|
|
2836
|
+
},
|
|
2837
|
+
"maximumFractionDigits": {
|
|
2838
|
+
"type": "number",
|
|
2839
|
+
"doc": "Decimales máximos. Por defecto: 1 en bytes y tasas escaladas, 0 en el resto salvo que el valor los traiga."
|
|
2840
|
+
},
|
|
2841
|
+
"label": {
|
|
2842
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
2843
|
+
"doc": "Qué se mide («Almacenamiento»). Lo pone la app."
|
|
2844
|
+
},
|
|
2845
|
+
"value": {
|
|
2846
|
+
"type": "number",
|
|
2847
|
+
"required": true,
|
|
2848
|
+
"doc": "Uso actual. null = aún sin medir (no es cero)."
|
|
2849
|
+
},
|
|
2850
|
+
"limit": {
|
|
2851
|
+
"type": "number",
|
|
2852
|
+
"doc": "Límite contratado, en la misma unidad. null o undefined = ilimitado."
|
|
2853
|
+
},
|
|
2854
|
+
"unit": {
|
|
2855
|
+
"type": "string",
|
|
2856
|
+
"doc": "Unidad UCUM de value y limit (`GBy`, `By`, `{device}`, `h`…)."
|
|
2857
|
+
},
|
|
2858
|
+
"warnAt": {
|
|
2859
|
+
"type": "number",
|
|
2860
|
+
"doc": "Proporción desde la que avisa (0..1). 0.8 por defecto."
|
|
2861
|
+
},
|
|
2862
|
+
"dangerAt": {
|
|
2863
|
+
"type": "number",
|
|
2864
|
+
"doc": "Proporción desde la que es crítico (0..1). 1 por defecto."
|
|
2865
|
+
},
|
|
2866
|
+
"showRemaining": {
|
|
2867
|
+
"type": "boolean",
|
|
2868
|
+
"doc": "Añade «Quedan 38 GB» (o «8 GB por encima del límite»)."
|
|
2869
|
+
},
|
|
2870
|
+
"size": {
|
|
2871
|
+
"type": "\"default\" | \"compact\"",
|
|
2872
|
+
"values": [
|
|
2873
|
+
"default",
|
|
2874
|
+
"compact"
|
|
2875
|
+
],
|
|
2876
|
+
"doc": "default: etiqueta y cifra encima de la barra · compact: en una línea, para filas de lista."
|
|
2877
|
+
},
|
|
2878
|
+
"valueText": {
|
|
2879
|
+
"type": "string | number | bigint | boolean | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal |…",
|
|
2880
|
+
"doc": "Texto propio en lugar de «12 GB de 50 GB»."
|
|
2881
|
+
}
|
|
2882
|
+
}
|
|
2883
|
+
},
|
|
2884
|
+
"notes": [
|
|
2885
|
+
"Uso frente a lo contratado (almacenamiento, puestos, dispositivos, cupos): nunca un número suelto ni una barra a mano. Para un objetivo que se quiere alcanzar, StatProgress.",
|
|
2886
|
+
"limit null = ilimitado (sin barra); value null = aún sin medir (no es cero). size=\"compact\" dentro de filas de lista o de MemberList."
|
|
2887
|
+
],
|
|
2888
|
+
"examples": [
|
|
2889
|
+
{
|
|
2890
|
+
"title": "Con restante",
|
|
2891
|
+
"code": "<UsageMeter label=\"Almacenamiento\" value={12} limit={50} unit=\"GBy\" showRemaining />"
|
|
2892
|
+
},
|
|
2893
|
+
{
|
|
2894
|
+
"title": "Ilimitado y sin medir",
|
|
2895
|
+
"code": "<UsageMeter label=\"Copias este mes\" value={128} limit={null} />\n<UsageMeter label=\"Almacenamiento\" value={null} limit={50} unit=\"GBy\" />"
|
|
2896
|
+
},
|
|
2897
|
+
{
|
|
2898
|
+
"title": "Compacto en una fila de lista",
|
|
2899
|
+
"code": "<UsageMeter label=\"Ana\" value={3.2} limit={10} unit=\"GBy\" size=\"compact\" />"
|
|
2900
|
+
}
|
|
2901
|
+
]
|
|
2902
|
+
}
|
|
2903
|
+
}
|
|
2904
|
+
}
|