orbital-ds 0.9.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/AGENTS.md +18 -1
  2. package/components.manifest.json +388 -1
  3. package/contract.json +5 -0
  4. package/dist/hooks/use-ds-messages.d.ts +59 -1
  5. package/dist/hooks/use-ds-messages.js +6 -0
  6. package/dist/lib/echarts-presets.d.ts +153 -0
  7. package/dist/lib/echarts-presets.js +311 -0
  8. package/dist/lib/echarts-server.d.ts +15 -0
  9. package/dist/lib/echarts-server.js +15 -0
  10. package/dist/lib/echarts-setup.d.ts +4 -0
  11. package/dist/lib/echarts-setup.js +60 -0
  12. package/dist/lib/echarts-theme.d.ts +36 -0
  13. package/dist/lib/echarts-theme.js +142 -0
  14. package/dist/lib/i18n.d.ts +57 -1
  15. package/dist/lib/i18n.js +169 -3
  16. package/dist/styles.css +43 -5
  17. package/dist/themes/friendly.css +3 -1
  18. package/dist/themes/friendly.scoped.css +3 -1
  19. package/dist/themes/friendly.tokens.json +45 -0
  20. package/dist/themes/qratia.tokens.json +49 -0
  21. package/dist/themes/tactile.css +3 -1
  22. package/dist/themes/tactile.scoped.css +3 -1
  23. package/dist/themes/tactile.tokens.json +42 -0
  24. package/dist/themes/twitter.css +3 -1
  25. package/dist/themes/twitter.scoped.css +3 -1
  26. package/dist/themes/twitter.tokens.json +45 -0
  27. package/dist/themes/zyro.css +3 -1
  28. package/dist/themes/zyro.scoped.css +3 -1
  29. package/dist/themes/zyro.tokens.json +46 -0
  30. package/dist/ui/calendar.js +4 -0
  31. package/dist/ui/code-block.d.ts +14 -0
  32. package/dist/ui/code-block.js +106 -0
  33. package/dist/ui/data-table.d.ts +185 -0
  34. package/dist/ui/data-table.js +714 -0
  35. package/dist/ui/date-picker.d.ts +65 -0
  36. package/dist/ui/date-picker.js +362 -0
  37. package/dist/ui/dropzone.d.ts +42 -0
  38. package/dist/ui/dropzone.js +220 -0
  39. package/dist/ui/echart.d.ts +31 -0
  40. package/dist/ui/echart.js +88 -0
  41. package/dist/ui/eyebrow.d.ts +7 -0
  42. package/dist/ui/eyebrow.js +16 -0
  43. package/dist/ui/filter-bar.d.ts +36 -0
  44. package/dist/ui/filter-bar.js +193 -0
  45. package/dist/ui/heatmap-grid.d.ts +39 -0
  46. package/dist/ui/heatmap-grid.js +195 -0
  47. package/dist/ui/i18n-provider.js +3 -3
  48. package/dist/ui/legend.d.ts +30 -0
  49. package/dist/ui/legend.js +124 -0
  50. package/dist/ui/notifications.d.ts +69 -0
  51. package/dist/ui/notifications.js +335 -0
  52. package/dist/ui/page-header.d.ts +19 -0
  53. package/dist/ui/page-header.js +132 -0
  54. package/dist/ui/panel.d.ts +12 -0
  55. package/dist/ui/panel.js +41 -0
  56. package/dist/ui/proportion-bar.d.ts +27 -0
  57. package/dist/ui/proportion-bar.js +92 -0
  58. package/dist/ui/sparkline.d.ts +26 -0
  59. package/dist/ui/sparkline.js +97 -0
  60. package/dist/ui/stat.d.ts +61 -0
  61. package/dist/ui/stat.js +238 -0
  62. package/dist/ui/status-badge.d.ts +38 -0
  63. package/dist/ui/status-badge.js +153 -0
  64. package/dist/ui/stepper.d.ts +20 -0
  65. package/dist/ui/stepper.js +152 -0
  66. package/dist/ui/timeline.d.ts +29 -0
  67. package/dist/ui/timeline.js +157 -0
  68. package/docs/GRAFICOS.md +125 -0
  69. package/docs/adr/0001-rtl-clases-logicas.md +78 -0
  70. package/package.json +171 -160
  71. package/scripts/doctor.mjs +0 -0
  72. package/scripts/i18n.mjs +0 -0
  73. package/scripts/init.mjs +1 -0
package/AGENTS.md CHANGED
@@ -54,6 +54,23 @@ adivinar. Lee antes: `README.md`, `docs/CONTRACT.md`, `contract.json` y
54
54
  ni capa se escribe a mano (el doctor lo comprueba también dentro de valores arbitrarios).
55
55
  - Otras librerías: `readDsTransition()` (`orbital-ds/lib/motion`) da duración y curva CSS.
56
56
 
57
+ ## Gráficos e informes (Apache ECharts)
58
+
59
+ - **Librería oficial: ECharts** (dependencia opcional). `chart.tsx` (Recharts) se mantiene por compatibilidad,
60
+ sin nuevas funciones.
61
+ - **El tema gobierna el gráfico**: `<EChart option={…} />` (`orbital-ds/ui/echart`) monta un tema de ECharts
62
+ desde las variables del tema activo y de la marca (paleta `--chart-1…5` + estados, textos, ejes, tooltip,
63
+ fuentes, ritmo) y se repinta al cambiar de tema o de piel. SVG por defecto; `exportable` descarga SVG/PNG.
64
+ Nunca pongas colores en el `option`: los da el tema (si una serie necesita un tono, usa la paleta del tema).
65
+ - **Opciones listas**: `orbital-ds/lib/echarts-presets` (línea/área, barras, combo, mapa de calor, sankey,
66
+ gauge, donut, líneas y áreas de referencia). Sirven igual en pantalla y en informes.
67
+ - **Informes automáticos (servidor / Workers, sin DOM)**: `renderEChartToSvg(option, { width, height, tokens })`
68
+ (`orbital-ds/lib/echarts-server`) con `tokens` = `orbital-ds/themes/<tema>.tokens.json` → `.light` o
69
+ `.dark` (colores ya resueltos; mezcla ahí los de la marca si la app tiene). Para PNG (plantillas de
70
+ documento), la app convierte el SVG (p. ej. resvg) con las fuentes del tema.
71
+ - Registro común de tipos y componentes: `orbital-ds/lib/echarts-setup`. Otro tipo → `echarts.use([...])` en la app.
72
+ - **Recetas completas** (pantalla, informe SVG→PNG, función de servidor de TanStack Start, endpoint en un Worker, marca en los informes): `docs/GRAFICOS.md`.
73
+
57
74
  ## Idioma (i18n)
58
75
 
59
76
  - Los textos PROPIOS de los componentes (cerrar, cargando, paginación, carrusel, lateral,
@@ -74,7 +91,7 @@ adivinar. Lee antes: `README.md`, `docs/CONTRACT.md`, `contract.json` y
74
91
  el inglés y LISTA las claves pendientes: tradúcelas en el JSON hasta que `--check` pase.
75
92
  - **RTL**: `dsDirection(idioma)` (`orbital-ds/lib/i18n`) da `ltr`/`rtl`; la app lo pone en `<html dir>` y
76
93
  `DsI18nProvider` lo pasa a Base UI. La conversión de los componentes a clases lógicas
77
- (`ms-`/`ps-`/`start-`/`text-start` en lugar de `ml-`/`pl-`/`left-`/`text-left`) es una fase pendiente.
94
+ (`ms-`/`ps-`/`start-`/`text-start` en lugar de `ml-`/`pl-`/`left-`/`text-left`) es una fase pendiente: decisión y plan en `docs/adr/0001-rtl-clases-logicas.md`.
78
95
 
79
96
  ## Instalar en una app
80
97
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "package": "orbital-ds",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "engine": "@base-ui/react",
5
5
  "docs": [
6
6
  "README.md",
@@ -321,6 +321,23 @@
321
321
  ],
322
322
  "optionalPeers": []
323
323
  },
324
+ "code-block": {
325
+ "import": "orbital-ds/ui/code-block",
326
+ "exports": [
327
+ "Code",
328
+ "CodeBlock"
329
+ ],
330
+ "slots": [
331
+ "code",
332
+ "code-block",
333
+ "code-block-code",
334
+ "code-block-copy",
335
+ "code-block-header",
336
+ "code-block-line",
337
+ "code-block-pre"
338
+ ],
339
+ "optionalPeers": []
340
+ },
324
341
  "collapsible": {
325
342
  "import": "orbital-ds/ui/collapsible",
326
343
  "exports": [
@@ -441,6 +458,70 @@
441
458
  ],
442
459
  "optionalPeers": []
443
460
  },
461
+ "data-table": {
462
+ "import": "orbital-ds/ui/data-table",
463
+ "exports": [
464
+ "DATA_TABLE_PAGE_SIZES",
465
+ "DataTable",
466
+ "DataTableBarCell",
467
+ "DataTableNumber",
468
+ "createDataTableColumnHelper",
469
+ "dataTableFeatures",
470
+ "dataTableStateFromSearch",
471
+ "dataTableStateToSearch",
472
+ "validateDataTableSearch"
473
+ ],
474
+ "slots": [
475
+ "data-table",
476
+ "data-table-actions",
477
+ "data-table-bar-cell",
478
+ "data-table-body",
479
+ "data-table-cell",
480
+ "data-table-columns",
481
+ "data-table-empty",
482
+ "data-table-empty-row",
483
+ "data-table-filter",
484
+ "data-table-footer",
485
+ "data-table-head",
486
+ "data-table-header",
487
+ "data-table-no-data",
488
+ "data-table-number",
489
+ "data-table-page",
490
+ "data-table-pagination",
491
+ "data-table-row",
492
+ "data-table-search",
493
+ "data-table-select",
494
+ "data-table-selected",
495
+ "data-table-skeleton-row",
496
+ "data-table-sort",
497
+ "data-table-toolbar"
498
+ ],
499
+ "optionalPeers": [
500
+ "@tanstack/react-table"
501
+ ]
502
+ },
503
+ "date-picker": {
504
+ "import": "orbital-ds/ui/date-picker",
505
+ "exports": [
506
+ "DatePicker",
507
+ "DateRangePicker",
508
+ "defaultDatePresets",
509
+ "type DateRange",
510
+ "type DateRangePreset"
511
+ ],
512
+ "slots": [
513
+ "date-picker",
514
+ "date-picker-content",
515
+ "date-range-footer",
516
+ "date-range-hint",
517
+ "date-range-picker",
518
+ "date-range-picker-content",
519
+ "date-range-presets"
520
+ ],
521
+ "optionalPeers": [
522
+ "react-day-picker"
523
+ ]
524
+ },
444
525
  "dialog": {
445
526
  "import": "orbital-ds/ui/dialog",
446
527
  "exports": [
@@ -550,6 +631,39 @@
550
631
  ],
551
632
  "optionalPeers": []
552
633
  },
634
+ "dropzone": {
635
+ "import": "orbital-ds/ui/dropzone",
636
+ "exports": [
637
+ "Dropzone",
638
+ "formatBytes",
639
+ "type DropzoneRejectReason",
640
+ "type DropzoneRejection",
641
+ "type DropzoneState"
642
+ ],
643
+ "slots": [
644
+ "dropzone",
645
+ "dropzone-area",
646
+ "dropzone-description",
647
+ "dropzone-errors",
648
+ "dropzone-hint",
649
+ "dropzone-icon",
650
+ "dropzone-title"
651
+ ],
652
+ "optionalPeers": []
653
+ },
654
+ "echart": {
655
+ "import": "orbital-ds/ui/echart",
656
+ "exports": [
657
+ "EChart"
658
+ ],
659
+ "slots": [
660
+ "echart",
661
+ "echart-actions",
662
+ "echart-canvas",
663
+ "echart-empty"
664
+ ],
665
+ "optionalPeers": []
666
+ },
553
667
  "empty": {
554
668
  "import": "orbital-ds/ui/empty",
555
669
  "exports": [
@@ -570,6 +684,15 @@
570
684
  ],
571
685
  "optionalPeers": []
572
686
  },
687
+ "eyebrow": {
688
+ "import": "orbital-ds/ui/eyebrow",
689
+ "exports": [
690
+ "Eyebrow",
691
+ "eyebrowClassName"
692
+ ],
693
+ "slots": [],
694
+ "optionalPeers": []
695
+ },
573
696
  "field": {
574
697
  "import": "orbital-ds/ui/field",
575
698
  "exports": [
@@ -598,6 +721,45 @@
598
721
  ],
599
722
  "optionalPeers": []
600
723
  },
724
+ "filter-bar": {
725
+ "import": "orbital-ds/ui/filter-bar",
726
+ "exports": [
727
+ "FilterBar",
728
+ "FilterMenu",
729
+ "type FilterOption"
730
+ ],
731
+ "slots": [
732
+ "filter-bar",
733
+ "filter-bar-actions",
734
+ "filter-bar-clear",
735
+ "filter-bar-filters",
736
+ "filter-menu-content",
737
+ "filter-menu-label",
738
+ "filter-menu-trigger",
739
+ "filter-menu-value"
740
+ ],
741
+ "optionalPeers": []
742
+ },
743
+ "heatmap-grid": {
744
+ "import": "orbital-ds/ui/heatmap-grid",
745
+ "exports": [
746
+ "HeatmapGrid"
747
+ ],
748
+ "slots": [
749
+ "heatmap-grid",
750
+ "heatmap-grid-caption",
751
+ "heatmap-grid-card",
752
+ "heatmap-grid-column-header",
753
+ "heatmap-grid-row",
754
+ "heatmap-grid-row-header",
755
+ "heatmap-grid-scale",
756
+ "heatmap-grid-scale-bar",
757
+ "heatmap-grid-scale-empty",
758
+ "heatmap-grid-scroll",
759
+ "heatmap-grid-table"
760
+ ],
761
+ "optionalPeers": []
762
+ },
601
763
  "hover-card": {
602
764
  "import": "orbital-ds/ui/hover-card",
603
765
  "exports": [
@@ -728,6 +890,25 @@
728
890
  ],
729
891
  "optionalPeers": []
730
892
  },
893
+ "legend": {
894
+ "import": "orbital-ds/ui/legend",
895
+ "exports": [
896
+ "Legend",
897
+ "LegendItem",
898
+ "LegendSwatch",
899
+ "dataToneBg",
900
+ "dataToneVar"
901
+ ],
902
+ "slots": [
903
+ "legend",
904
+ "legend-item",
905
+ "legend-label",
906
+ "legend-swatch",
907
+ "legend-toggle",
908
+ "legend-value"
909
+ ],
910
+ "optionalPeers": []
911
+ },
731
912
  "marker": {
732
913
  "import": "orbital-ds/ui/marker",
733
914
  "exports": [
@@ -880,6 +1061,74 @@
880
1061
  ],
881
1062
  "optionalPeers": []
882
1063
  },
1064
+ "notifications": {
1065
+ "import": "orbital-ds/ui/notifications",
1066
+ "exports": [
1067
+ "NotificationCenter",
1068
+ "NotificationEmpty",
1069
+ "NotificationItem",
1070
+ "NotificationList",
1071
+ "NotificationTabs",
1072
+ "NotificationTabsContent",
1073
+ "formatRelativeTime",
1074
+ "type NotificationState",
1075
+ "type NotificationTab",
1076
+ "type NotificationTone"
1077
+ ],
1078
+ "slots": [
1079
+ "notification-actions",
1080
+ "notification-center",
1081
+ "notification-count",
1082
+ "notification-dot",
1083
+ "notification-empty",
1084
+ "notification-header",
1085
+ "notification-icon",
1086
+ "notification-item",
1087
+ "notification-item-description",
1088
+ "notification-item-title",
1089
+ "notification-list",
1090
+ "notification-mark-all",
1091
+ "notification-meta",
1092
+ "notification-tab",
1093
+ "notification-tab-count",
1094
+ "notification-tabs",
1095
+ "notification-tabs-content",
1096
+ "notification-title",
1097
+ "notification-trigger",
1098
+ "notification-unread"
1099
+ ],
1100
+ "optionalPeers": []
1101
+ },
1102
+ "page-header": {
1103
+ "import": "orbital-ds/ui/page-header",
1104
+ "exports": [
1105
+ "PageHeader",
1106
+ "PageHeaderActions",
1107
+ "PageHeaderBreadcrumb",
1108
+ "PageHeaderDescription",
1109
+ "PageHeaderNotice",
1110
+ "PageHeaderTitle",
1111
+ "SectionHeader",
1112
+ "SectionHeaderActions",
1113
+ "SectionHeaderDescription",
1114
+ "SectionHeaderIcon",
1115
+ "SectionHeaderTitle"
1116
+ ],
1117
+ "slots": [
1118
+ "page-header",
1119
+ "page-header-actions",
1120
+ "page-header-breadcrumb",
1121
+ "page-header-description",
1122
+ "page-header-notice",
1123
+ "page-header-title",
1124
+ "section-header",
1125
+ "section-header-actions",
1126
+ "section-header-description",
1127
+ "section-header-icon",
1128
+ "section-header-title"
1129
+ ],
1130
+ "optionalPeers": []
1131
+ },
883
1132
  "pagination": {
884
1133
  "import": "orbital-ds/ui/pagination",
885
1134
  "exports": [
@@ -900,6 +1149,15 @@
900
1149
  ],
901
1150
  "optionalPeers": []
902
1151
  },
1152
+ "panel": {
1153
+ "import": "orbital-ds/ui/panel",
1154
+ "exports": [
1155
+ "Panel",
1156
+ "panelVariants"
1157
+ ],
1158
+ "slots": [],
1159
+ "optionalPeers": []
1160
+ },
903
1161
  "popover": {
904
1162
  "import": "orbital-ds/ui/popover",
905
1163
  "exports": [
@@ -934,6 +1192,22 @@
934
1192
  ],
935
1193
  "optionalPeers": []
936
1194
  },
1195
+ "proportion-bar": {
1196
+ "import": "orbital-ds/ui/proportion-bar",
1197
+ "exports": [
1198
+ "ProportionBar"
1199
+ ],
1200
+ "slots": [
1201
+ "proportion-bar",
1202
+ "proportion-bar-header",
1203
+ "proportion-bar-indicator",
1204
+ "proportion-bar-label",
1205
+ "proportion-bar-segment",
1206
+ "proportion-bar-track",
1207
+ "proportion-bar-value"
1208
+ ],
1209
+ "optionalPeers": []
1210
+ },
937
1211
  "questionnaire": {
938
1212
  "import": "orbital-ds/ui/questionnaire",
939
1213
  "exports": [
@@ -1178,6 +1452,19 @@
1178
1452
  "sonner"
1179
1453
  ]
1180
1454
  },
1455
+ "sparkline": {
1456
+ "import": "orbital-ds/ui/sparkline",
1457
+ "exports": [
1458
+ "Sparkline",
1459
+ "sparklineVariants"
1460
+ ],
1461
+ "slots": [
1462
+ "sparkline",
1463
+ "sparkline-area",
1464
+ "sparkline-line"
1465
+ ],
1466
+ "optionalPeers": []
1467
+ },
1181
1468
  "spinner": {
1182
1469
  "import": "orbital-ds/ui/spinner",
1183
1470
  "exports": [
@@ -1188,6 +1475,79 @@
1188
1475
  ],
1189
1476
  "optionalPeers": []
1190
1477
  },
1478
+ "stat": {
1479
+ "import": "orbital-ds/ui/stat",
1480
+ "exports": [
1481
+ "Stat",
1482
+ "StatChart",
1483
+ "StatDelta",
1484
+ "StatDescription",
1485
+ "StatLabel",
1486
+ "StatSwatch",
1487
+ "StatValue",
1488
+ "statVariants"
1489
+ ],
1490
+ "slots": [
1491
+ "stat-chart",
1492
+ "stat-delta",
1493
+ "stat-description",
1494
+ "stat-label",
1495
+ "stat-swatch",
1496
+ "stat-value",
1497
+ "stat-value-number",
1498
+ "stat-value-prefix",
1499
+ "stat-value-reason",
1500
+ "stat-value-unit"
1501
+ ],
1502
+ "optionalPeers": []
1503
+ },
1504
+ "status-badge": {
1505
+ "import": "orbital-ds/ui/status-badge",
1506
+ "exports": [
1507
+ "StatusBadge",
1508
+ "StatusDot",
1509
+ "StatusExplanation",
1510
+ "StatusExplanationDetail",
1511
+ "StatusExplanationTerm",
1512
+ "statusBadgeVariants",
1513
+ "statusDotVariants"
1514
+ ],
1515
+ "slots": [
1516
+ "status-badge-explanation",
1517
+ "status-badge-info",
1518
+ "status-badge-label",
1519
+ "status-dot",
1520
+ "status-dot-pulse",
1521
+ "status-explanation",
1522
+ "status-explanation-detail",
1523
+ "status-explanation-term"
1524
+ ],
1525
+ "optionalPeers": []
1526
+ },
1527
+ "stepper": {
1528
+ "import": "orbital-ds/ui/stepper",
1529
+ "exports": [
1530
+ "Stepper",
1531
+ "StepperContent",
1532
+ "StepperDescription",
1533
+ "StepperIndicator",
1534
+ "StepperItem",
1535
+ "StepperSeparator",
1536
+ "StepperTitle",
1537
+ "type StepStatus",
1538
+ "type StepperOrientation"
1539
+ ],
1540
+ "slots": [
1541
+ "stepper",
1542
+ "stepper-content",
1543
+ "stepper-description",
1544
+ "stepper-indicator",
1545
+ "stepper-item",
1546
+ "stepper-separator",
1547
+ "stepper-title"
1548
+ ],
1549
+ "optionalPeers": []
1550
+ },
1191
1551
  "switch": {
1192
1552
  "import": "orbital-ds/ui/switch",
1193
1553
  "exports": [
@@ -1251,6 +1611,33 @@
1251
1611
  ],
1252
1612
  "optionalPeers": []
1253
1613
  },
1614
+ "timeline": {
1615
+ "import": "orbital-ds/ui/timeline",
1616
+ "exports": [
1617
+ "Timeline",
1618
+ "TimelineActions",
1619
+ "TimelineContent",
1620
+ "TimelineDescription",
1621
+ "TimelineIndicator",
1622
+ "TimelineItem",
1623
+ "TimelineTime",
1624
+ "TimelineTitle"
1625
+ ],
1626
+ "slots": [
1627
+ "timeline",
1628
+ "timeline-actions",
1629
+ "timeline-connector",
1630
+ "timeline-content",
1631
+ "timeline-description",
1632
+ "timeline-dot",
1633
+ "timeline-icon",
1634
+ "timeline-indicator",
1635
+ "timeline-item",
1636
+ "timeline-time",
1637
+ "timeline-title"
1638
+ ],
1639
+ "optionalPeers": []
1640
+ },
1254
1641
  "toast": {
1255
1642
  "import": "orbital-ds/ui/toast",
1256
1643
  "exports": [
package/contract.json CHANGED
@@ -140,6 +140,11 @@
140
140
  "alert",
141
141
  "banner",
142
142
  "toast"
143
+ ],
144
+ "surface": [
145
+ "card",
146
+ "panel",
147
+ "stat"
143
148
  ]
144
149
  }
145
150
  },
@@ -29,8 +29,66 @@ declare const DsMessagesContext: React.Context<{
29
29
  questionnaireSkip: string;
30
30
  questionnaireNext: string;
31
31
  questionnaireSubmit: string;
32
+ codeCopy: string;
33
+ codeCopied: string;
34
+ notifications: string;
35
+ notificationsMarkAllRead: string;
36
+ notificationsEmpty: string;
37
+ notificationsUnread: string;
38
+ datePickerPlaceholder: string;
39
+ dateRangePlaceholder: string;
40
+ dropzoneTitle: string;
41
+ dropzoneHint: string;
42
+ dropzoneTooLarge: string;
43
+ dropzoneWrongType: string;
44
+ dataTableSearch: string;
45
+ dataTableColumns: string;
46
+ dataTableNoResults: string;
47
+ dataTableSelected: string;
48
+ dataTableRowsPerPage: string;
49
+ dataTablePage: string;
50
+ dataTableSortAsc: string;
51
+ dataTableSortDesc: string;
52
+ dataTableHideColumn: string;
53
+ chartExportSvg: string;
54
+ chartExportPng: string;
55
+ chartNoData: string;
56
+ stepperStep: string;
57
+ stepperCompleted: string;
58
+ stepperCurrent: string;
59
+ stepperError: string;
60
+ statIncrease: string;
61
+ statDecrease: string;
62
+ statNoChange: string;
63
+ notificationsForYou: string;
64
+ notificationsGeneral: string;
65
+ notificationsHistory: string;
66
+ datePresetToday: string;
67
+ datePresetYesterday: string;
68
+ datePresetLastDays: string;
69
+ dateApply: string;
70
+ dateClear: string;
71
+ dateMaxSpan: string;
72
+ filterAll: string;
73
+ filterClear: string;
74
+ statNoData: string;
75
+ heatmapLow: string;
76
+ heatmapHigh: string;
77
+ dataTableFilter: string;
78
+ dataTableLoading: string;
79
+ dropzoneTooMany: string;
80
+ calendarPrevious: string;
81
+ calendarNext: string;
82
+ notificationUnread: string;
83
+ statusMeaning: string;
84
+ statusCause: string;
85
+ statusAction: string;
32
86
  }>;
33
87
  /** Textos de los componentes en el idioma activo. */
34
88
  declare function useDsMessages(): DsMessages;
89
+ /** Idioma activo (etiqueta BCP 47 de la app, p. ej. "es-CO"): para formatear fechas y números con Intl. */
90
+ declare const DsLocaleContext: React.Context<string>;
91
+ /** Idioma activo para Intl (DateTimeFormat, NumberFormat…). */
92
+ declare function useDsLocale(): string;
35
93
 
36
- export { DsMessagesContext, useDsMessages };
94
+ export { DsLocaleContext, DsMessagesContext, useDsLocale, useDsMessages };
@@ -6,7 +6,13 @@ const DsMessagesContext = React.createContext(
6
6
  function useDsMessages() {
7
7
  return React.useContext(DsMessagesContext);
8
8
  }
9
+ const DsLocaleContext = React.createContext(DS_DEFAULT_LOCALE);
10
+ function useDsLocale() {
11
+ return React.useContext(DsLocaleContext);
12
+ }
9
13
  export {
14
+ DsLocaleContext,
10
15
  DsMessagesContext,
16
+ useDsLocale,
11
17
  useDsMessages
12
18
  };