@sfperusacdev/sf-ui 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -82,7 +82,6 @@
82
82
 
83
83
  :root[data-density='compacta'] .sf-metric-row--tile .sf-metric-row__label {
84
84
  font-size: 0.8125rem;
85
- white-space: nowrap;
86
85
  }
87
86
 
88
87
  :root[data-density='compacta'] .sf-metric-row--tile .sf-metric-row__description {
@@ -155,6 +155,17 @@
155
155
  color: color-mix(in srgb, var(--sf-donut-label-color) 48%, #0b1f29);
156
156
  }
157
157
 
158
+ /* Íconos de baldosa (procesados, en espera, validadas…): el centrado se oscurece como el texto; en el «leading», el
159
+ círculo de color lleva el ícono en blanco, así que es el círculo el que se oscurece. */
160
+ :root[data-skin]:not([data-theme='dark']) .sf-metric-tile--centered .sf-metric-tile__icon {
161
+ color: color-mix(in srgb, var(--sf-metric-tile-color) 50%, #0b1f29);
162
+ }
163
+
164
+ :root[data-skin]:not([data-theme='dark']) .sf-metric-tile--leading .sf-metric-tile__icon {
165
+ background: color-mix(in srgb, var(--sf-metric-tile-color) 55%, #0b1f29);
166
+ color: #ffffff;
167
+ }
168
+
158
169
  :root[data-skin]:not([data-theme='dark']) .sf-metric-row__tile-icon {
159
170
  border-color: color-mix(in srgb, var(--sf-metric-color, var(--sf-accent)) 60%, #0b1f29);
160
171
  color: color-mix(in srgb, var(--sf-metric-color, var(--sf-accent)) 48%, #0b1f29);
@@ -192,6 +203,111 @@
192
203
  color: var(--sf-accent-text);
193
204
  }
194
205
 
206
+ /* Página activa del paginador en claro: en classic, soft y neon el número va en blanco sobre el acento, y el de ERP
207
+ (#ec7211) o Neón (#0d9488) no llega a 4,5:1. premium y matrix tienen sus propios colores y no se tocan. */
208
+ :root[data-skin='erp']:not([data-theme='dark']) .sf-pagination--classic .sf-pagination__page--active,
209
+ :root[data-skin='erp']:not([data-theme='dark']) .sf-pagination--classic .sf-pagination__page--active:hover,
210
+ :root[data-skin='erp']:not([data-theme='dark']) .sf-pagination--soft .sf-pagination__page--active,
211
+ :root[data-skin='erp']:not([data-theme='dark']) .sf-pagination--soft .sf-pagination__page--active:hover,
212
+ :root[data-skin='erp']:not([data-theme='dark']) .sf-pagination--neon .sf-pagination__page--active,
213
+ :root[data-skin='erp']:not([data-theme='dark']) .sf-pagination--neon .sf-pagination__page--active:hover {
214
+ background: #b35400;
215
+ border-color: #b35400;
216
+ }
217
+
218
+ :root[data-skin='neon']:not([data-theme='dark']) .sf-pagination--classic .sf-pagination__page--active,
219
+ :root[data-skin='neon']:not([data-theme='dark']) .sf-pagination--classic .sf-pagination__page--active:hover,
220
+ :root[data-skin='neon']:not([data-theme='dark']) .sf-pagination--soft .sf-pagination__page--active,
221
+ :root[data-skin='neon']:not([data-theme='dark']) .sf-pagination--soft .sf-pagination__page--active:hover,
222
+ :root[data-skin='neon']:not([data-theme='dark']) .sf-pagination--neon .sf-pagination__page--active,
223
+ :root[data-skin='neon']:not([data-theme='dark']) .sf-pagination--neon .sf-pagination__page--active:hover {
224
+ background: #0f766e;
225
+ border-color: #0f766e;
226
+ }
227
+
228
+ /* —— Detalles y capas (medido en el prototipo ADN con capas-temas, 6 temas) ——
229
+ Botones de estado: el texto no sale de --sf-btn-primary-text, que en los oscuros es casi negro. */
230
+ :root[data-skin] .sf-btn--success {
231
+ background: #15803d;
232
+ color: #ffffff;
233
+ }
234
+
235
+ :root[data-skin] .sf-btn--success:hover:not(:disabled) {
236
+ background: #166534;
237
+ }
238
+
239
+ :root[data-skin] .sf-btn--danger-solid {
240
+ background: #b91c1c;
241
+ color: #ffffff;
242
+ }
243
+
244
+ :root[data-skin] .sf-btn--danger-solid:hover:not(:disabled) {
245
+ background: #991b1b;
246
+ }
247
+
248
+ /* Claro: rojo, acentos de aviso, asterisco y cierre de los avisos a 4,5:1 sobre blanco o su tinte. */
249
+ :root[data-skin]:not([data-theme='dark']) {
250
+ --sf-alert-info-accent: #1d4ed8;
251
+ --sf-alert-success-accent: #15803d;
252
+ --sf-alert-warning-accent: #b45309;
253
+ --sf-alert-danger-accent: #b91c1c;
254
+ }
255
+
256
+ :root[data-skin]:not([data-theme='dark']) .sf-btn--danger {
257
+ background: #ffffff;
258
+ color: #b91c1c;
259
+ }
260
+
261
+ :root[data-skin]:not([data-theme='dark']) .sf-field-required {
262
+ color: #b91c1c;
263
+ }
264
+
265
+ :root[data-skin]:not([data-theme='dark']) .sf-table thead th:not([class*='sf-table__th--']) {
266
+ color: #475569;
267
+ }
268
+
269
+ :root[data-skin]:not([data-theme='dark']) .sf-toast__close {
270
+ color: #475569;
271
+ }
272
+
273
+ :root[data-skin]:not([data-theme='dark']) .sf-toast--warning .sf-toast__icon {
274
+ color: #b45309;
275
+ }
276
+
277
+ /* El encabezado sin variante no tiene fondo propio: el subtítulo va sobre el blanco del modal, no sobre el marino. */
278
+ :root[data-skin]:not([data-theme='dark']) .sf-modal-header:not(.sf-modal-header--dark):not(.sf-modal-header--brand) .sf-modal-header__subtitle {
279
+ color: var(--sf-text-muted);
280
+ }
281
+
282
+ /* Oscuro: los mismos elementos con los tonos claros de su color, sobre el fondo pizarra o negro. */
283
+ :root[data-skin][data-theme='dark'] {
284
+ --sf-alert-info-accent: #60a5fa;
285
+ --sf-alert-success-accent: #4ade80;
286
+ --sf-alert-warning-accent: #fbbf24;
287
+ --sf-alert-danger-accent: #f87171;
288
+ }
289
+
290
+ :root[data-skin][data-theme='dark'] .sf-btn--danger {
291
+ background: transparent;
292
+ color: #f87171;
293
+ }
294
+
295
+ :root[data-skin][data-theme='dark'] .sf-field-required {
296
+ color: #f87171;
297
+ }
298
+
299
+ :root[data-skin][data-theme='dark'] .sf-table thead th:not([class*='sf-table__th--']) {
300
+ color: var(--sf-text-muted);
301
+ }
302
+
303
+ :root[data-skin][data-theme='dark'] .sf-badge--info:not(.sf-badge--solid) {
304
+ color: #93c5fd;
305
+ }
306
+
307
+ :root[data-skin][data-theme='dark'] .sf-toast__close {
308
+ color: var(--sf-text-muted);
309
+ }
310
+
195
311
  /* Modo oscuro con cualquier tema: el texto pintado con un color de categoría se aclara para leerse sobre el fondo
196
312
  pizarra o negro; el amarillo de advertencia suave y los rellenos de barra también suben de luz. */
197
313
  :root[data-skin][data-theme='dark'] .sf-relation-graph--orbit .sf-relation-graph__relation {
@@ -1,5 +1,11 @@
1
1
  import { ExportTableColumn, ExportTableCsvOptions } from './exportTableCsv';
2
- export type ExportTableXlsxOptions<T> = ExportTableCsvOptions<T>;
2
+ export type ExportTableXlsxOptions<T> = ExportTableCsvOptions<T> & {
3
+ /**
4
+ * Líneas que van antes del encabezado, una por fila (alcance, filtros, fecha). Sin `notes` el archivo no cambia.
5
+ * Sirve para que el archivo diga qué conjunto exporta cuando la pantalla muestra solo una parte.
6
+ */
7
+ notes?: string[];
8
+ };
3
9
  /** Exporta filas a Excel (.xls SpreadsheetML) sin peer externo. */
4
10
  export declare const exportTableXlsx: <T>(rows: T[], options: ExportTableXlsxOptions<T>) => void;
5
11
  export type { ExportTableColumn };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sfperusacdev/sf-ui",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "SF UI — librería de componentes React (inputs, tablas, hooks) para aplicaciones SF Perú.",
5
5
  "type": "module",
6
6
  "main": "./dist/sf-ui.umd.cjs",