@kapiuara/ui 0.13.0 → 0.15.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.
- package/README.md +239 -1
- package/dist/components/chat/KapiChatDivider.d.ts +7 -3
- package/dist/components/chat/KapiChatDivider.js +6 -6
- package/dist/components/chat/KapiChatList.js +19 -19
- package/dist/components/chat/KapiChatThread.js +23 -23
- package/dist/components/chat/KapiComposer.js +19 -19
- package/dist/components/chat/KapiMessageBubble.js +4 -4
- package/dist/components/chat/KapiTypingIndicator.js +4 -4
- package/dist/components/chat/index.d.ts +1 -1
- package/dist/components/closeReason.d.ts +34 -0
- package/dist/components/data/KapiBarChart.js +1 -1
- package/dist/components/data/KapiDataTable.js +31 -31
- package/dist/components/data/KapiEventCalendar.js +78 -78
- package/dist/components/data/KapiHeatmap.js +23 -23
- package/dist/components/data/KapiLineChart.js +1 -1
- package/dist/components/data/KapiPagination.js +4 -4
- package/dist/components/data/KapiSparkline.js +1 -1
- package/dist/components/data/KapiTable.js +122 -122
- package/dist/components/data/KapiTableFilter.js +18 -18
- package/dist/components/data/KapiTableRow.js +24 -24
- package/dist/components/data/KapiTableToolbar.js +49 -49
- package/dist/components/data/chartFrame.js +21 -21
- package/dist/components/data/useColumnResize.js +8 -8
- package/dist/components/data/useTableSelection.js +8 -8
- package/dist/components/display/KapiAnnotation.js +55 -55
- package/dist/components/display/KapiComment.js +4 -4
- package/dist/components/display/KapiCommentComposer.js +16 -16
- package/dist/components/display/KapiFileItem.js +6 -6
- package/dist/components/display/KapiFileViewer.js +9 -9
- package/dist/components/display/KapiTruncate.js +7 -7
- package/dist/components/feedback/KapiAlert.d.ts +2 -1
- package/dist/components/feedback/KapiAlert.js +8 -8
- package/dist/components/feedback/KapiCountdown.js +8 -8
- package/dist/components/feedback/KapiFab.js +30 -30
- package/dist/components/feedback/KapiOfflineBanner.js +8 -8
- package/dist/components/feedback/KapiToastContainer.js +25 -25
- package/dist/components/feedback/KapiTour.d.ts +2 -1
- package/dist/components/feedback/KapiTour.js +35 -35
- package/dist/components/inputs/KapiAutocomplete.js +14 -14
- package/dist/components/inputs/KapiButton.d.ts +17 -1
- package/dist/components/inputs/KapiButton.js +41 -25
- package/dist/components/inputs/KapiCalendar.js +5 -5
- package/dist/components/inputs/KapiCalendarGrid.js +10 -10
- package/dist/components/inputs/KapiChecklist.js +71 -71
- package/dist/components/inputs/KapiDatePicker.js +124 -122
- package/dist/components/inputs/KapiDateRangePicker.js +138 -136
- package/dist/components/inputs/KapiFacetedSearch.js +29 -29
- package/dist/components/inputs/KapiField.js +14 -14
- package/dist/components/inputs/KapiFileUpload.js +27 -27
- package/dist/components/inputs/KapiIconButton.d.ts +9 -1
- package/dist/components/inputs/KapiIconButton.js +27 -10
- package/dist/components/inputs/KapiInput.js +21 -21
- package/dist/components/inputs/KapiInputGroup.js +8 -8
- package/dist/components/inputs/KapiMaskedInput.d.ts +8 -3
- package/dist/components/inputs/KapiMaskedInput.js +64 -51
- package/dist/components/inputs/KapiNumberStepper.js +29 -29
- package/dist/components/inputs/KapiRating.js +61 -59
- package/dist/components/inputs/KapiSearchChip.js +8 -8
- package/dist/components/inputs/KapiSegmented.js +74 -64
- package/dist/components/inputs/KapiSelect.js +232 -222
- package/dist/components/inputs/KapiSelectMenu.js +60 -60
- package/dist/components/inputs/KapiSlider.js +1 -1
- package/dist/components/inputs/KapiSwitch.js +6 -6
- package/dist/components/inputs/KapiTagInput.js +83 -81
- package/dist/components/inputs/KapiTextarea.js +8 -8
- package/dist/components/inputs/misuseWarnings.d.ts +37 -0
- package/dist/components/inputs/misuseWarnings.js +36 -0
- package/dist/components/inputs/numberStepLogic.d.ts +10 -0
- package/dist/components/inputs/numberStepLogic.js +16 -7
- package/dist/components/inputs/ownField.js +4 -4
- package/dist/components/layout/KapiAccountMenu.d.ts +2 -1
- package/dist/components/layout/KapiAccountMenu.js +53 -53
- package/dist/components/layout/KapiContextSlot.js +35 -35
- package/dist/components/layout/KapiMasonry.js +6 -6
- package/dist/components/layout/KapiNotificationBell.js +60 -60
- package/dist/components/layout/KapiPageHeader.js +19 -19
- package/dist/components/layout/KapiRail.js +60 -60
- package/dist/components/layout/KapiRailAccount.js +9 -9
- package/dist/components/layout/KapiRoot.js +21 -21
- package/dist/components/layout/KapiScrollArea.js +11 -11
- package/dist/components/layout/KapiShell.js +12 -12
- package/dist/components/locale/KapiLocaleProvider.js +13 -13
- package/dist/components/navigation/CtxSlidingList.js +4 -4
- package/dist/components/navigation/KapiAccordion.js +12 -12
- package/dist/components/navigation/KapiBreadcrumb.js +11 -11
- package/dist/components/navigation/KapiCollapsiblePanel.js +23 -23
- package/dist/components/navigation/KapiContextPanel.js +76 -76
- package/dist/components/navigation/KapiFilterChips.js +9 -9
- package/dist/components/navigation/KapiNavBadge.d.ts +4 -2
- package/dist/components/navigation/KapiNavBadge.js +11 -10
- package/dist/components/navigation/KapiPanelGroup.js +25 -25
- package/dist/components/navigation/KapiSteps.js +4 -4
- package/dist/components/navigation/KapiTabs.d.ts +4 -1
- package/dist/components/navigation/KapiTabs.js +63 -55
- package/dist/components/navigation/KapiTree.js +75 -75
- package/dist/components/navigation/KapiWizard.d.ts +2 -1
- package/dist/components/navigation/KapiWizard.js +30 -30
- package/dist/components/overlays/KapiCanvasForm.d.ts +6 -2
- package/dist/components/overlays/KapiCanvasForm.js +12 -12
- package/dist/components/overlays/KapiCommandPalette.d.ts +2 -1
- package/dist/components/overlays/KapiCommandPalette.js +23 -23
- package/dist/components/overlays/KapiConfirm.d.ts +2 -1
- package/dist/components/overlays/KapiConfirm.js +12 -12
- package/dist/components/overlays/KapiContextMenu.d.ts +2 -1
- package/dist/components/overlays/KapiContextMenu.js +18 -18
- package/dist/components/overlays/KapiDialogHost.js +22 -22
- package/dist/components/overlays/KapiLoading.js +16 -16
- package/dist/components/overlays/KapiMenuButton.js +15 -15
- package/dist/components/overlays/KapiModal.d.ts +2 -1
- package/dist/components/overlays/KapiModal.js +28 -28
- package/dist/components/overlays/KapiOffcanvas.d.ts +3 -2
- package/dist/components/overlays/KapiOffcanvas.js +63 -63
- package/dist/components/overlays/KapiOffcanvasStack.js +38 -38
- package/dist/components/overlays/KapiPhotoView.js +15 -15
- package/dist/components/overlays/KapiPopover.d.ts +2 -1
- package/dist/components/overlays/KapiPopover.js +10 -10
- package/dist/components/overlays/KapiShapeSheet.js +20 -20
- package/dist/components/overlays/KapiSplitModal.js +29 -29
- package/dist/components/overlays/KapiTooltip.js +21 -21
- package/dist/components/overlays/menuList.js +60 -60
- package/dist/components/renderSlot.d.ts +27 -0
- package/dist/components/renderSlot.js +23 -0
- package/dist/css/components/chat/chat.css +1 -1
- package/dist/hooks/portalRoot.js +6 -6
- package/dist/hooks/useControllableState.d.ts +6 -2
- package/dist/hooks/useControllableState.js +14 -11
- package/dist/hooks/useFormReset.d.ts +22 -0
- package/dist/hooks/useFormReset.js +17 -0
- package/dist/index.d.ts +2 -0
- package/dist/kapi.css +1 -1
- package/dist/kapi.layered.css +1 -1
- package/package.json +5 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "#kapi-css/components/chat/chat.css";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { joinClasses as e } from "../rootProps.js";
|
|
4
|
+
import { useLabels as t } from "../locale/KapiLocaleProvider.js";
|
|
5
5
|
import { typingText as n } from "./chatLogic.js";
|
|
6
6
|
/* empty css */
|
|
7
7
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
@@ -11,12 +11,12 @@ var a = {
|
|
|
11
11
|
many: "{count} personas están escribiendo…",
|
|
12
12
|
someone: "Alguien está escribiendo…"
|
|
13
13
|
}, o = ({ names: o, labels: s, ref: c, className: l, ...u }) => {
|
|
14
|
-
let d =
|
|
14
|
+
let d = t("typingIndicator", a, s), f = n(o, d);
|
|
15
15
|
return f === null ? null : /* @__PURE__ */ i("div", {
|
|
16
16
|
"aria-live": "polite",
|
|
17
17
|
...u,
|
|
18
18
|
ref: c,
|
|
19
|
-
className:
|
|
19
|
+
className: e("kapi-typing", l),
|
|
20
20
|
children: [/* @__PURE__ */ i("span", {
|
|
21
21
|
className: "kapi-typing__dots",
|
|
22
22
|
"aria-hidden": "true",
|
|
@@ -10,7 +10,7 @@ export { DEFAULT_CHAT_THREAD_LABELS, KapiChatThread } from "./KapiChatThread.js"
|
|
|
10
10
|
export { DEFAULT_MESSAGE_BUBBLE_LABELS, KapiMessageBubble } from "./KapiMessageBubble.js";
|
|
11
11
|
export { DEFAULT_TYPING_INDICATOR_LABELS, KapiTypingIndicator } from "./KapiTypingIndicator.js";
|
|
12
12
|
export type { KapiChatEntry, KapiChatGroupOptions, KapiChatGrouping, KapiChatMessage, KapiChatStatus } from "./chatLogic.js";
|
|
13
|
-
export type { KapiChatDividerProps, KapiChatDividerTone } from "./KapiChatDivider.js";
|
|
13
|
+
export type { KapiChatDividerProps, KapiChatDividerVariant, KapiChatDividerTone } from "./KapiChatDivider.js";
|
|
14
14
|
export type { KapiChatConversation, KapiChatListLabels, KapiChatListProps } from "./KapiChatList.js";
|
|
15
15
|
export type { KapiChatThreadLabels, KapiChatThreadProps } from "./KapiChatThread.js";
|
|
16
16
|
export type { KapiComposerLabels, KapiComposerProps } from "./KapiComposer.js";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Qué cerró un overlay.
|
|
3
|
+
*
|
|
4
|
+
* Por qué existe. Todo overlay descartable de la librería es CONTROLADO (`open` + `onClose`), así
|
|
5
|
+
* que la app ya podía vetar un cierre: le alcanza con no bajar `open`. Lo que no podía era saber
|
|
6
|
+
* POR QUÉ se cerró, y sin eso no se puede distinguir "el usuario apretó Cancelar" de "se le fue el
|
|
7
|
+
* dedo al fondo". El caso que lo motiva es el formulario sucio: preguntar "¿descartás los cambios?"
|
|
8
|
+
* sólo tiene sentido ante un descarte deliberado, no ante un Escape accidental.
|
|
9
|
+
*
|
|
10
|
+
* Es el mismo problema que el campo ya resolvió: MUI pasa `onClose(event, reason)`, Fluent lo tipa
|
|
11
|
+
* como unión discriminada y Base UI lo generaliza en `eventDetails.reason`. Acá alcanza con la
|
|
12
|
+
* razón, porque el veto ya lo da el modo controlado.
|
|
13
|
+
*
|
|
14
|
+
* `onClose` sigue pudiendo declararse sin parámetros: un `() => void` es asignable a
|
|
15
|
+
* `(reason: KapiCloseReason) => void`, así que nada de lo que ya estaba escrito cambia.
|
|
16
|
+
*/
|
|
17
|
+
export type KapiCloseReason =
|
|
18
|
+
/** Escape. */
|
|
19
|
+
"escape"
|
|
20
|
+
/** Clic afuera de un overlay sin fondo propio (popover, menú). */
|
|
21
|
+
| "outside"
|
|
22
|
+
/** Clic en el fondo oscurecido de un diálogo. */
|
|
23
|
+
| "backdrop"
|
|
24
|
+
/** La X del encabezado. */
|
|
25
|
+
| "close-button"
|
|
26
|
+
/** Un botón explícito de cancelar o descartar. */
|
|
27
|
+
| "cancel"
|
|
28
|
+
/** Se eligió un ítem y el overlay se cierra como consecuencia (menú, paleta). */
|
|
29
|
+
| "item-selected"
|
|
30
|
+
/**
|
|
31
|
+
* El overlay se cerró solo porque no tenía nada que mostrar; no hubo acción del usuario (p. ej.
|
|
32
|
+
* un `KapiTour` cuyos pasos apuntan a elementos que no existen en la página).
|
|
33
|
+
*/
|
|
34
|
+
| "unavailable";
|
|
@@ -6,8 +6,8 @@ import { KapiTooltip as n } from "../overlays/KapiTooltip.js";
|
|
|
6
6
|
import { KapiChartFrame as r, chartSummary as i, chartVars as a, useChartLabels as o, useChartTitleId as s, useChartView as c, withChartUnit as l } from "./chartFrame.js";
|
|
7
7
|
import { barCategoryOrder as u, barHeight as d, barScale as f, barStackTotals as p, barTickLabel as m, barValueLabelPredicate as h } from "./barChartLogic.js";
|
|
8
8
|
/* empty css */
|
|
9
|
-
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
10
9
|
import "react";
|
|
10
|
+
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
11
11
|
//#region src/components/data/KapiBarChart.tsx
|
|
12
12
|
var v = (e, t) => e.values[t] ?? 0;
|
|
13
13
|
function y({ categories: y, series: b, title: x, tickCount: S = 4, horizontal: C = !1, sort: w = "none", stacked: T = !1, values: E, unit: D, view: O, defaultView: k = "chart", onViewChange: A, labels: j, className: M, ref: N, ...P }) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "#kapi-css/components/data/KapiTable.css";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { joinClasses as e } from "../rootProps.js";
|
|
4
|
+
import { useKapiLocale as t, useLabels as n } from "../locale/KapiLocaleProvider.js";
|
|
5
5
|
import { useControllableState as r } from "../../hooks/useControllableState.js";
|
|
6
6
|
import { winOf as i } from "../../hooks/ownerDocument.js";
|
|
7
7
|
import { computeStickyOffsets as ee, computeStickyRightOffsets as te, effectiveColumnWidth as ne, firstRightStickyIndex as re, lastStickyIndex as ie, nextSortState as ae, sortRowsByColumn as oe, stickySideOf as a, tableWrapClass as o } from "./tableLogic.js";
|
|
@@ -12,20 +12,20 @@ import { actColClass as l, ariaSortOf as u, bodyCell as d, cellClass as f, colum
|
|
|
12
12
|
import { useRowKeyWarning as le } from "./useRowKeyWarning.js";
|
|
13
13
|
import { useTableEdges as ue } from "./useTableEdges.js";
|
|
14
14
|
import { isRowActivationKey as de, mergeRowProps as fe, shouldFireRowClick as pe } from "./rowClickLogic.js";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
15
|
+
import { useLayoutEffect as me, useMemo as _, useRef as v, useState as he } from "react";
|
|
16
|
+
import { jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
17
17
|
//#region src/components/data/KapiDataTable.tsx
|
|
18
18
|
var x = {};
|
|
19
19
|
function S({ columns: S, rows: C, keyField: w = "id", ref: T, maxHeight: E = "58vh", fill: D = !1, card: O = !1, density: k = "default", rowHover: A = !1, mobileCards: j = !1, labels: M, sort: N, defaultSort: P = null, onSortChange: F, manualSort: I = !1, loading: L = !1, loadingRows: R = 5, loadingMessage: z, emptyMessage: B, onCopy: ge, actions: V, onRowClick: H, getRowProps: _e, className: ve, style: ye, id: be }) {
|
|
20
|
-
let U =
|
|
20
|
+
let U = n("table", c, M);
|
|
21
21
|
le("KapiDataTable", C, w);
|
|
22
|
-
let W =
|
|
22
|
+
let W = t(), [G, xe] = r(N, P, F), Se = (e) => xe(ae(G, e)), K = _(() => I ? C : oe(C, S, G, W), [
|
|
23
23
|
I,
|
|
24
24
|
C,
|
|
25
25
|
S,
|
|
26
26
|
G,
|
|
27
27
|
W
|
|
28
|
-
]), q = !!V, J = S.some((e) => a(e.sticky) === "right"), Y =
|
|
28
|
+
]), q = !!V, J = S.some((e) => a(e.sticky) === "right"), Y = v(null), [X, Ce] = he(0);
|
|
29
29
|
me(() => {
|
|
30
30
|
let e = Y.current;
|
|
31
31
|
if (!e || !J) return;
|
|
@@ -37,7 +37,7 @@ function S({ columns: S, rows: C, keyField: w = "id", ref: T, maxHeight: E = "58
|
|
|
37
37
|
let n = new ResizeObserver(t);
|
|
38
38
|
return n.observe(e), () => n.disconnect();
|
|
39
39
|
}, [J, q]);
|
|
40
|
-
let Z =
|
|
40
|
+
let Z = _(() => {
|
|
41
41
|
let e = S.map((e) => ({
|
|
42
42
|
sticky: e.sticky,
|
|
43
43
|
width: ne(e, x)
|
|
@@ -52,7 +52,7 @@ function S({ columns: S, rows: C, keyField: w = "id", ref: T, maxHeight: E = "58
|
|
|
52
52
|
S,
|
|
53
53
|
q,
|
|
54
54
|
X
|
|
55
|
-
]), Q =
|
|
55
|
+
]), Q = v(null), { cortaDerecha: we, cortaIzquierda: Te, medirBordes: Ee } = ue(Q, S), $ = S.length + +!!q, De = B === void 0 ? U.empty : B, Oe = z === void 0 ? U.loading : z, ke = (e) => H ? {
|
|
56
56
|
className: "is-clickable",
|
|
57
57
|
tabIndex: 0,
|
|
58
58
|
onClick: (t) => {
|
|
@@ -69,10 +69,10 @@ function S({ columns: S, rows: C, keyField: w = "id", ref: T, maxHeight: E = "58
|
|
|
69
69
|
isComposing: t.nativeEvent.isComposing
|
|
70
70
|
}) && (t.preventDefault(), H(e, t));
|
|
71
71
|
}
|
|
72
|
-
} : {}, Ae = Array.from({ length: R }, (e, t) => /* @__PURE__ */
|
|
72
|
+
} : {}, Ae = Array.from({ length: R }, (e, t) => /* @__PURE__ */ b("tr", {
|
|
73
73
|
className: "kapi-table-skrow",
|
|
74
74
|
"aria-hidden": !0,
|
|
75
|
-
children: [S.map((e, n) => /* @__PURE__ */
|
|
75
|
+
children: [S.map((e, n) => /* @__PURE__ */ y("td", {
|
|
76
76
|
"data-col": e.key,
|
|
77
77
|
className: f(e, n, Z),
|
|
78
78
|
style: {
|
|
@@ -80,9 +80,9 @@ function S({ columns: S, rows: C, keyField: w = "id", ref: T, maxHeight: E = "58
|
|
|
80
80
|
...m(e, "td", x)
|
|
81
81
|
},
|
|
82
82
|
children: ce(e, n, t)
|
|
83
|
-
}, e.key)), q && /* @__PURE__ */
|
|
83
|
+
}, e.key)), q && /* @__PURE__ */ y("td", {
|
|
84
84
|
className: l(Z),
|
|
85
|
-
children: /* @__PURE__ */
|
|
85
|
+
children: /* @__PURE__ */ y(s, {
|
|
86
86
|
width: 28,
|
|
87
87
|
height: 14,
|
|
88
88
|
radius: 6,
|
|
@@ -90,12 +90,12 @@ function S({ columns: S, rows: C, keyField: w = "id", ref: T, maxHeight: E = "58
|
|
|
90
90
|
})
|
|
91
91
|
})]
|
|
92
92
|
}, `sk-${t}`));
|
|
93
|
-
return /* @__PURE__ */
|
|
93
|
+
return /* @__PURE__ */ y("div", {
|
|
94
94
|
ref: T,
|
|
95
95
|
id: be,
|
|
96
96
|
style: ye,
|
|
97
|
-
className:
|
|
98
|
-
children: /* @__PURE__ */
|
|
97
|
+
className: e("kapi-table-shell", O && "kapi-table-shell--card", D && "kapi-table-shell--fill", j && "kapi-table-shell--cards", ve),
|
|
98
|
+
children: /* @__PURE__ */ y("div", {
|
|
99
99
|
ref: Q,
|
|
100
100
|
className: o({
|
|
101
101
|
cortaDerecha: we,
|
|
@@ -105,30 +105,30 @@ function S({ columns: S, rows: C, keyField: w = "id", ref: T, maxHeight: E = "58
|
|
|
105
105
|
tabIndex: 0,
|
|
106
106
|
style: D ? void 0 : { maxHeight: E },
|
|
107
107
|
onScroll: (e) => Ee(e.currentTarget),
|
|
108
|
-
children: /* @__PURE__ */
|
|
109
|
-
className:
|
|
110
|
-
children: [/* @__PURE__ */
|
|
111
|
-
"data-col":
|
|
112
|
-
className:
|
|
113
|
-
"aria-sort": u(
|
|
108
|
+
children: /* @__PURE__ */ b("table", {
|
|
109
|
+
className: e("kapi-table2", k === "card" && "kapi-table2--card", A && "kapi-table2--hover"),
|
|
110
|
+
children: [/* @__PURE__ */ y("thead", { children: /* @__PURE__ */ b("tr", { children: [S.map((t, n) => /* @__PURE__ */ y("th", {
|
|
111
|
+
"data-col": t.key,
|
|
112
|
+
className: e(f(t, n, Z), t.sortable && "is-sortable"),
|
|
113
|
+
"aria-sort": u(t, G),
|
|
114
114
|
style: {
|
|
115
|
-
...g(
|
|
116
|
-
...m(
|
|
117
|
-
textAlign: p(
|
|
115
|
+
...g(n, Z),
|
|
116
|
+
...m(t, "th", x),
|
|
117
|
+
textAlign: p(t.align)
|
|
118
118
|
},
|
|
119
|
-
children: se(
|
|
120
|
-
},
|
|
119
|
+
children: se(t, G, Se, U)
|
|
120
|
+
}, t.key)), q && /* @__PURE__ */ y("th", {
|
|
121
121
|
ref: Y,
|
|
122
122
|
className: l(Z),
|
|
123
123
|
children: U.actions
|
|
124
|
-
})] }) }), /* @__PURE__ */
|
|
124
|
+
})] }) }), /* @__PURE__ */ b("tbody", { children: [
|
|
125
125
|
L && (R > 0 ? Ae : h($, Oe, !0)),
|
|
126
126
|
!L && K.length === 0 && h($, De),
|
|
127
|
-
!L && K.map((e, t) => /* @__PURE__ */
|
|
127
|
+
!L && K.map((e, t) => /* @__PURE__ */ b("tr", {
|
|
128
128
|
...fe(_e?.(e, t), ke(e)),
|
|
129
|
-
children: [S.map((t, n) => d(t, n, e, Z, x, U, ge)), q && /* @__PURE__ */
|
|
129
|
+
children: [S.map((t, n) => d(t, n, e, Z, x, U, ge)), q && /* @__PURE__ */ y("td", {
|
|
130
130
|
className: l(Z),
|
|
131
|
-
children: /* @__PURE__ */
|
|
131
|
+
children: /* @__PURE__ */ y("div", {
|
|
132
132
|
className: "kapi-actcol__in",
|
|
133
133
|
children: V?.(e)
|
|
134
134
|
})
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "#kapi-css/components/data/KapiEventCalendar.css";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { joinClasses as e } from "../rootProps.js";
|
|
4
|
+
import { useKapiLocale as t, useKapiWeekStart as n, useLabels as r } from "../locale/KapiLocaleProvider.js";
|
|
5
5
|
import { calendarNames as i, monthTitle as a, sameDay as o, weekdayOrder as s } from "../inputs/datePickerLogic.js";
|
|
6
6
|
import { KapiSegmented as c } from "../inputs/KapiSegmented.js";
|
|
7
7
|
import { KapiPopover as l } from "../overlays/KapiPopover.js";
|
|
8
8
|
import { aDia as u, correrMes as d, diasConEventos as f, duracionEnDias as p, eventosDelDia as m, eventosDelMes as h, semanasDelMes as g, visiblesYResto as _ } from "./eventCalendarLogic.js";
|
|
9
9
|
/* empty css */
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { useRef as v, useState as y } from "react";
|
|
11
|
+
import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
12
12
|
import { ChevronLeft as ee, ChevronRight as te } from "lucide-react";
|
|
13
13
|
//#region src/components/data/KapiEventCalendar.tsx
|
|
14
14
|
var C = {
|
|
@@ -24,11 +24,11 @@ var C = {
|
|
|
24
24
|
moreTitle: "Eventos del {date}",
|
|
25
25
|
range: "del {from} al {to}"
|
|
26
26
|
}, w = (e) => `${e.getDate()}/${e.getMonth() + 1}`, T = ({ events: T, month: E, onMonthChange: D, view: O, defaultView: ne = "month", onViewChange: re, maxPerDay: ie = 2, onEventClick: k, labels: A, weekStartsOn: j, className: M, ref: N, ...P }) => {
|
|
27
|
-
let F =
|
|
27
|
+
let F = r("eventCalendar", C, A), I = i(t()), L = n(j), R = s(I.weekdays, L), z = s(I.weekdayNames, L), [B, V] = y(() => E ?? /* @__PURE__ */ new Date()), H = E ?? B, U = (e) => {
|
|
28
28
|
E === void 0 && V(e), D?.(e);
|
|
29
|
-
}, [W, G] =
|
|
29
|
+
}, [W, G] = y(ne), K = O ?? W, q = (e) => {
|
|
30
30
|
O === void 0 && G(e), re?.(e);
|
|
31
|
-
}, [J, Y] =
|
|
31
|
+
}, [J, Y] = y(null), X = v(null), ae = /* @__PURE__ */ new Date(), oe = [
|
|
32
32
|
{
|
|
33
33
|
id: "month",
|
|
34
34
|
label: F.monthView
|
|
@@ -41,182 +41,182 @@ var C = {
|
|
|
41
41
|
id: "year",
|
|
42
42
|
label: F.yearView
|
|
43
43
|
}
|
|
44
|
-
], Z = (e) => ({ "--kapi-evcal-color": `var(--kapi-series-${e.slot ?? 1})` }), Q = ({ e, lista:
|
|
45
|
-
let i = p(
|
|
46
|
-
/* @__PURE__ */
|
|
44
|
+
], Z = (e) => ({ "--kapi-evcal-color": `var(--kapi-series-${e.slot ?? 1})` }), Q = ({ e: t, lista: n, sigue: r }) => {
|
|
45
|
+
let i = p(t), a = /* @__PURE__ */ S(b, { children: [
|
|
46
|
+
/* @__PURE__ */ x("span", {
|
|
47
47
|
className: "kapi-evcal__dot",
|
|
48
48
|
"aria-hidden": "true"
|
|
49
49
|
}),
|
|
50
|
-
/* @__PURE__ */
|
|
50
|
+
/* @__PURE__ */ x("span", {
|
|
51
51
|
className: "kapi-evcal__ev-title",
|
|
52
|
-
children:
|
|
52
|
+
children: t.title
|
|
53
53
|
}),
|
|
54
|
-
|
|
54
|
+
n && i > 1 && /* @__PURE__ */ x("span", {
|
|
55
55
|
className: "kapi-evcal__ev-range",
|
|
56
|
-
children: F.range.replace("{from}", w(
|
|
56
|
+
children: F.range.replace("{from}", w(t.start)).replace("{to}", w(t.end ?? t.start))
|
|
57
57
|
}),
|
|
58
|
-
|
|
58
|
+
n && t.detail && /* @__PURE__ */ x("span", {
|
|
59
59
|
className: "kapi-evcal__ev-detail",
|
|
60
|
-
children:
|
|
60
|
+
children: t.detail
|
|
61
61
|
})
|
|
62
62
|
] });
|
|
63
|
-
return k ? /* @__PURE__ */
|
|
63
|
+
return k ? /* @__PURE__ */ x("button", {
|
|
64
64
|
type: "button",
|
|
65
|
-
className:
|
|
66
|
-
style: Z(
|
|
67
|
-
onClick: () => k(
|
|
68
|
-
"aria-label":
|
|
65
|
+
className: e("kapi-evcal__ev", n && "kapi-evcal__ev--list", r && "kapi-evcal__ev--sigue"),
|
|
66
|
+
style: Z(t),
|
|
67
|
+
onClick: () => k(t),
|
|
68
|
+
"aria-label": r ? t.title : void 0,
|
|
69
69
|
children: a
|
|
70
|
-
}) : /* @__PURE__ */
|
|
71
|
-
className:
|
|
72
|
-
style: Z(
|
|
70
|
+
}) : /* @__PURE__ */ x("span", {
|
|
71
|
+
className: e("kapi-evcal__ev", n && "kapi-evcal__ev--list"),
|
|
72
|
+
style: Z(t),
|
|
73
73
|
children: a
|
|
74
74
|
});
|
|
75
75
|
}, $ = h(T, H), se = f(T, H.getFullYear());
|
|
76
|
-
return /* @__PURE__ */
|
|
76
|
+
return /* @__PURE__ */ S("div", {
|
|
77
77
|
...P,
|
|
78
78
|
ref: N,
|
|
79
|
-
className:
|
|
79
|
+
className: e("kapi-evcal", M),
|
|
80
80
|
children: [
|
|
81
|
-
/* @__PURE__ */
|
|
81
|
+
/* @__PURE__ */ S("div", {
|
|
82
82
|
className: "kapi-evcal__head",
|
|
83
|
-
children: [/* @__PURE__ */
|
|
83
|
+
children: [/* @__PURE__ */ S("div", {
|
|
84
84
|
className: "kapi-evcal__nav",
|
|
85
85
|
children: [
|
|
86
|
-
/* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ x("button", {
|
|
87
87
|
type: "button",
|
|
88
88
|
className: "kapi-btn kapi-btn--icon",
|
|
89
89
|
onClick: () => U(d(H, K === "year" ? -12 : -1)),
|
|
90
90
|
"aria-label": F.prev,
|
|
91
|
-
children: /* @__PURE__ */
|
|
91
|
+
children: /* @__PURE__ */ x(ee, {
|
|
92
92
|
className: "kapi-flip-rtl",
|
|
93
93
|
size: 16,
|
|
94
94
|
strokeWidth: 2,
|
|
95
95
|
"aria-hidden": "true"
|
|
96
96
|
})
|
|
97
97
|
}),
|
|
98
|
-
/* @__PURE__ */
|
|
98
|
+
/* @__PURE__ */ x("button", {
|
|
99
99
|
type: "button",
|
|
100
100
|
className: "kapi-btn kapi-btn--icon",
|
|
101
101
|
onClick: () => U(d(H, K === "year" ? 12 : 1)),
|
|
102
102
|
"aria-label": F.next,
|
|
103
|
-
children: /* @__PURE__ */
|
|
103
|
+
children: /* @__PURE__ */ x(te, {
|
|
104
104
|
className: "kapi-flip-rtl",
|
|
105
105
|
size: 16,
|
|
106
106
|
strokeWidth: 2,
|
|
107
107
|
"aria-hidden": "true"
|
|
108
108
|
})
|
|
109
109
|
}),
|
|
110
|
-
/* @__PURE__ */
|
|
110
|
+
/* @__PURE__ */ x("h3", {
|
|
111
111
|
className: "kapi-evcal__title",
|
|
112
112
|
"aria-live": "polite",
|
|
113
113
|
children: K === "year" ? String(H.getFullYear()) : a(H, I.months)
|
|
114
114
|
})
|
|
115
115
|
]
|
|
116
|
-
}), /* @__PURE__ */
|
|
116
|
+
}), /* @__PURE__ */ x(c, {
|
|
117
117
|
items: oe,
|
|
118
118
|
value: K,
|
|
119
119
|
onChange: q,
|
|
120
120
|
"aria-label": F.view
|
|
121
121
|
})]
|
|
122
122
|
}),
|
|
123
|
-
K === "month" ? /* @__PURE__ */
|
|
123
|
+
K === "month" ? /* @__PURE__ */ S("div", {
|
|
124
124
|
className: "kapi-evcal__grid",
|
|
125
125
|
role: "table",
|
|
126
126
|
"aria-label": a(H, I.months),
|
|
127
|
-
children: [/* @__PURE__ */
|
|
127
|
+
children: [/* @__PURE__ */ x("div", {
|
|
128
128
|
className: "kapi-evcal__row kapi-evcal__row--head",
|
|
129
129
|
role: "row",
|
|
130
|
-
children: R.map((e, t) => /* @__PURE__ */
|
|
130
|
+
children: R.map((e, t) => /* @__PURE__ */ x("div", {
|
|
131
131
|
className: "kapi-evcal__wd",
|
|
132
132
|
role: "columnheader",
|
|
133
|
-
children: /* @__PURE__ */
|
|
133
|
+
children: /* @__PURE__ */ x("abbr", {
|
|
134
134
|
title: z[t],
|
|
135
135
|
children: e
|
|
136
136
|
})
|
|
137
137
|
}, t))
|
|
138
|
-
}), g(H, L).map((
|
|
138
|
+
}), g(H, L).map((t) => /* @__PURE__ */ x("div", {
|
|
139
139
|
className: "kapi-evcal__row",
|
|
140
140
|
role: "row",
|
|
141
|
-
children:
|
|
142
|
-
let
|
|
143
|
-
return /* @__PURE__ */
|
|
141
|
+
children: t.map((t) => {
|
|
142
|
+
let n = m(T, t.date), { visibles: r, resto: i } = _(n, ie), a = t.date.toISOString();
|
|
143
|
+
return /* @__PURE__ */ S("div", {
|
|
144
144
|
role: "cell",
|
|
145
|
-
className:
|
|
145
|
+
className: e("kapi-evcal__day", t.out && "is-out", o(t.date, ae) && "is-today"),
|
|
146
146
|
children: [
|
|
147
|
-
/* @__PURE__ */
|
|
147
|
+
/* @__PURE__ */ x("span", {
|
|
148
148
|
className: "kapi-evcal__daynum",
|
|
149
|
-
children:
|
|
149
|
+
children: t.day
|
|
150
150
|
}),
|
|
151
|
-
|
|
152
|
-
e
|
|
153
|
-
sigue: u(
|
|
154
|
-
},
|
|
155
|
-
i > 0 && /* @__PURE__ */
|
|
151
|
+
r.map((e) => /* @__PURE__ */ x(Q, {
|
|
152
|
+
e,
|
|
153
|
+
sigue: u(e.start) < u(t.date) && t.date.getDay() !== L
|
|
154
|
+
}, e.id)),
|
|
155
|
+
i > 0 && /* @__PURE__ */ x("button", {
|
|
156
156
|
type: "button",
|
|
157
157
|
className: "kapi-evcal__more",
|
|
158
|
-
onClick: (
|
|
159
|
-
X.current =
|
|
158
|
+
onClick: (e) => {
|
|
159
|
+
X.current = e.currentTarget, Y(t.date);
|
|
160
160
|
},
|
|
161
161
|
children: F.more.replace("{n}", String(i))
|
|
162
162
|
})
|
|
163
163
|
]
|
|
164
164
|
}, a);
|
|
165
165
|
})
|
|
166
|
-
},
|
|
167
|
-
}) : K === "year" ? /* @__PURE__ */
|
|
166
|
+
}, t[0].date.toISOString()))]
|
|
167
|
+
}) : K === "year" ? /* @__PURE__ */ x("div", {
|
|
168
168
|
className: "kapi-evcal__year",
|
|
169
|
-
children: Array.from({ length: 12 }, (
|
|
170
|
-
let
|
|
171
|
-
return /* @__PURE__ */
|
|
169
|
+
children: Array.from({ length: 12 }, (t, n) => {
|
|
170
|
+
let r = new Date(H.getFullYear(), n, 1);
|
|
171
|
+
return /* @__PURE__ */ S("div", {
|
|
172
172
|
className: "kapi-evcal__mini",
|
|
173
|
-
children: [/* @__PURE__ */
|
|
173
|
+
children: [/* @__PURE__ */ x("button", {
|
|
174
174
|
type: "button",
|
|
175
175
|
className: "kapi-evcal__mini-title",
|
|
176
176
|
onClick: () => {
|
|
177
|
-
U(
|
|
177
|
+
U(r), q("month");
|
|
178
178
|
},
|
|
179
|
-
children: I.months[
|
|
180
|
-
}), /* @__PURE__ */
|
|
179
|
+
children: I.months[n]
|
|
180
|
+
}), /* @__PURE__ */ x("div", {
|
|
181
181
|
className: "kapi-evcal__mini-grid",
|
|
182
|
-
children: g(
|
|
183
|
-
let
|
|
184
|
-
return /* @__PURE__ */
|
|
185
|
-
className:
|
|
186
|
-
style:
|
|
187
|
-
children:
|
|
188
|
-
},
|
|
182
|
+
children: g(r, L).flat().map((t) => {
|
|
183
|
+
let n = t.out ? void 0 : se.get(u(t.date));
|
|
184
|
+
return /* @__PURE__ */ x("span", {
|
|
185
|
+
className: e("kapi-evcal__mini-day", t.out && "is-out", n && "has-events"),
|
|
186
|
+
style: n ? { "--kapi-evcal-color": `var(--kapi-series-${n.slot})` } : void 0,
|
|
187
|
+
children: t.out ? "" : t.day
|
|
188
|
+
}, t.date.toISOString());
|
|
189
189
|
})
|
|
190
190
|
})]
|
|
191
|
-
},
|
|
191
|
+
}, n);
|
|
192
192
|
})
|
|
193
|
-
}) : $.length === 0 ? /* @__PURE__ */
|
|
193
|
+
}) : $.length === 0 ? /* @__PURE__ */ x("p", {
|
|
194
194
|
className: "kapi-evcal__empty kapi-muted",
|
|
195
195
|
children: F.empty
|
|
196
|
-
}) : /* @__PURE__ */
|
|
196
|
+
}) : /* @__PURE__ */ x("ul", {
|
|
197
197
|
className: "kapi-evcal__list",
|
|
198
|
-
children: $.map((e) => /* @__PURE__ */
|
|
198
|
+
children: $.map((e) => /* @__PURE__ */ S("li", {
|
|
199
199
|
className: "kapi-evcal__li",
|
|
200
|
-
children: [/* @__PURE__ */
|
|
200
|
+
children: [/* @__PURE__ */ x("span", {
|
|
201
201
|
className: "kapi-evcal__li-date",
|
|
202
202
|
children: w(e.start)
|
|
203
|
-
}), /* @__PURE__ */
|
|
203
|
+
}), /* @__PURE__ */ x(Q, {
|
|
204
204
|
e,
|
|
205
205
|
lista: !0
|
|
206
206
|
})]
|
|
207
207
|
}, e.id))
|
|
208
208
|
}),
|
|
209
|
-
J && /* @__PURE__ */
|
|
209
|
+
J && /* @__PURE__ */ x(l, {
|
|
210
210
|
open: !0,
|
|
211
211
|
anchorRef: X,
|
|
212
212
|
onClose: () => Y(null),
|
|
213
213
|
"aria-label": F.moreTitle.replace("{date}", w(J)),
|
|
214
|
-
children: /* @__PURE__ */
|
|
214
|
+
children: /* @__PURE__ */ S("div", {
|
|
215
215
|
className: "kapi-evcal__pop",
|
|
216
|
-
children: [/* @__PURE__ */
|
|
216
|
+
children: [/* @__PURE__ */ x("p", {
|
|
217
217
|
className: "kapi-evcal__pop-title",
|
|
218
218
|
children: F.moreTitle.replace("{date}", w(J))
|
|
219
|
-
}), m(T, J).map((e) => /* @__PURE__ */
|
|
219
|
+
}), m(T, J).map((e) => /* @__PURE__ */ x(Q, {
|
|
220
220
|
e,
|
|
221
221
|
lista: !0
|
|
222
222
|
}, e.id))]
|
|
@@ -7,8 +7,8 @@ import { KapiSegmented as i } from "../inputs/KapiSegmented.js";
|
|
|
7
7
|
import { useChartTitleId as a, useChartView as o } from "./chartFrame.js";
|
|
8
8
|
import { heatLegendRanges as s, heatMax as c, heatStep as l } from "./heatmapLogic.js";
|
|
9
9
|
/* empty css */
|
|
10
|
-
import { Fragment as u
|
|
11
|
-
import { Fragment as p } from "react";
|
|
10
|
+
import { Fragment as u } from "react";
|
|
11
|
+
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
12
12
|
//#region src/components/data/KapiHeatmap.tsx
|
|
13
13
|
var m = {
|
|
14
14
|
chartView: "Mapa",
|
|
@@ -22,19 +22,19 @@ var m = {
|
|
|
22
22
|
}, h = (e) => ({ "--kapi-chart-slot": e > 0 ? `var(--kapi-seq-${e})` : "transparent" });
|
|
23
23
|
function g({ rows: g, columns: _, values: v, title: y, max: b, view: x, defaultView: S = "chart", onViewChange: C, labels: w, className: T, ref: E, ...D }) {
|
|
24
24
|
let O = e(), k = t("heatmap", m, w), A = a(), { current: j, setView: M } = o(x, S, C), N = b !== void 0 && b > 0 ? b : c(v), P = g.length === 0 || _.length === 0, F = (e, t) => v[e]?.[t], I = k.summary.replace("{rows}", String(g.length)).replace("{columns}", String(_.length));
|
|
25
|
-
return /* @__PURE__ */
|
|
25
|
+
return /* @__PURE__ */ p("div", {
|
|
26
26
|
...D,
|
|
27
27
|
ref: E,
|
|
28
28
|
className: ["kapi-heatmap", T].filter(Boolean).join(" "),
|
|
29
29
|
role: "group",
|
|
30
30
|
...y ? { "aria-labelledby": A } : {},
|
|
31
|
-
children: [/* @__PURE__ */
|
|
31
|
+
children: [/* @__PURE__ */ p("div", {
|
|
32
32
|
className: "kapi-heatmap__head",
|
|
33
|
-
children: [y ? /* @__PURE__ */
|
|
33
|
+
children: [y ? /* @__PURE__ */ f("div", {
|
|
34
34
|
className: "kapi-heatmap__title",
|
|
35
35
|
id: A,
|
|
36
36
|
children: y
|
|
37
|
-
}) : null, /* @__PURE__ */
|
|
37
|
+
}) : null, /* @__PURE__ */ f(i, {
|
|
38
38
|
"aria-label": k.view,
|
|
39
39
|
items: [{
|
|
40
40
|
id: "chart",
|
|
@@ -46,52 +46,52 @@ function g({ rows: g, columns: _, values: v, title: y, max: b, view: x, defaultV
|
|
|
46
46
|
value: j,
|
|
47
47
|
onChange: M
|
|
48
48
|
})]
|
|
49
|
-
}), P ? /* @__PURE__ */
|
|
49
|
+
}), P ? /* @__PURE__ */ f("p", {
|
|
50
50
|
className: "kapi-heatmap__empty kapi-muted",
|
|
51
51
|
children: k.empty
|
|
52
|
-
}) : j === "table" ? /* @__PURE__ */
|
|
52
|
+
}) : j === "table" ? /* @__PURE__ */ f("div", {
|
|
53
53
|
className: "kapi-heatmap__tablewrap",
|
|
54
|
-
children: /* @__PURE__ */
|
|
54
|
+
children: /* @__PURE__ */ p("table", {
|
|
55
55
|
className: "kapi-heatmap__table",
|
|
56
|
-
children: [/* @__PURE__ */
|
|
56
|
+
children: [/* @__PURE__ */ f("thead", { children: /* @__PURE__ */ p("tr", { children: [/* @__PURE__ */ f("th", {
|
|
57
57
|
scope: "col",
|
|
58
58
|
children: k.rowHeader
|
|
59
|
-
}), _.map((e, t) => /* @__PURE__ */
|
|
59
|
+
}), _.map((e, t) => /* @__PURE__ */ f("th", {
|
|
60
60
|
scope: "col",
|
|
61
61
|
children: e
|
|
62
|
-
}, `${e}-${t}`))] }) }), /* @__PURE__ */
|
|
62
|
+
}, `${e}-${t}`))] }) }), /* @__PURE__ */ f("tbody", { children: g.map((e, t) => /* @__PURE__ */ p("tr", { children: [/* @__PURE__ */ f("th", {
|
|
63
63
|
scope: "row",
|
|
64
64
|
children: e
|
|
65
65
|
}), _.map((e, r) => {
|
|
66
66
|
let i = F(t, r);
|
|
67
|
-
return /* @__PURE__ */
|
|
67
|
+
return /* @__PURE__ */ f("td", { children: i === void 0 || !Number.isFinite(i) ? /* @__PURE__ */ f("span", {
|
|
68
68
|
className: "kapi-muted",
|
|
69
69
|
children: k.noData
|
|
70
70
|
}) : n(i, O) }, `${e}-${r}`);
|
|
71
71
|
})] }, `${e}-${t}`)) })]
|
|
72
72
|
})
|
|
73
|
-
}) : /* @__PURE__ */
|
|
73
|
+
}) : /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("div", {
|
|
74
74
|
className: "kapi-heatmap__plot",
|
|
75
75
|
role: "img",
|
|
76
76
|
"aria-label": I,
|
|
77
|
-
children: /* @__PURE__ */
|
|
77
|
+
children: /* @__PURE__ */ p("div", {
|
|
78
78
|
className: "kapi-heatmap__grid",
|
|
79
79
|
style: { "--kapi-heatmap-cols": _.length },
|
|
80
80
|
children: [
|
|
81
|
-
/* @__PURE__ */
|
|
82
|
-
_.map((e, t) => /* @__PURE__ */
|
|
81
|
+
/* @__PURE__ */ f("span", { className: "kapi-heatmap__corner" }),
|
|
82
|
+
_.map((e, t) => /* @__PURE__ */ f("span", {
|
|
83
83
|
className: "kapi-heatmap__colhead",
|
|
84
84
|
children: e
|
|
85
85
|
}, `col-${e}-${t}`)),
|
|
86
|
-
g.map((e, t) => /* @__PURE__ */
|
|
86
|
+
g.map((e, t) => /* @__PURE__ */ p(u, { children: [/* @__PURE__ */ f("span", {
|
|
87
87
|
className: "kapi-heatmap__rowhead",
|
|
88
88
|
children: e
|
|
89
89
|
}), _.map((i, a) => {
|
|
90
90
|
let o = F(t, a), s = o === void 0 ? 0 : l(o, N), c = o === void 0 || !Number.isFinite(o) ? k.noData : n(o, O);
|
|
91
|
-
return /* @__PURE__ */
|
|
91
|
+
return /* @__PURE__ */ f(r, {
|
|
92
92
|
label: `${e} · ${i}: ${c}`,
|
|
93
93
|
className: "kapi-heatmap__cellwrap",
|
|
94
|
-
children: /* @__PURE__ */
|
|
94
|
+
children: /* @__PURE__ */ f("span", {
|
|
95
95
|
className: `kapi-heatmap__cell${s === 0 ? " kapi-heatmap__cell--empty" : ""}`,
|
|
96
96
|
style: h(s)
|
|
97
97
|
})
|
|
@@ -99,13 +99,13 @@ function g({ rows: g, columns: _, values: v, title: y, max: b, view: x, defaultV
|
|
|
99
99
|
})] }, `row-${e}-${t}`))
|
|
100
100
|
]
|
|
101
101
|
})
|
|
102
|
-
}), /* @__PURE__ */
|
|
102
|
+
}), /* @__PURE__ */ f("ul", {
|
|
103
103
|
className: "kapi-heatmap__legend",
|
|
104
104
|
"aria-label": k.legend,
|
|
105
|
-
children: s(N).map(([e, t], r) => /* @__PURE__ */
|
|
105
|
+
children: s(N).map(([e, t], r) => /* @__PURE__ */ p("li", {
|
|
106
106
|
className: "kapi-heatmap__legenditem",
|
|
107
107
|
children: [
|
|
108
|
-
/* @__PURE__ */
|
|
108
|
+
/* @__PURE__ */ f("span", {
|
|
109
109
|
className: "kapi-heatmap__swatch",
|
|
110
110
|
style: h(r + 1)
|
|
111
111
|
}),
|
|
@@ -7,8 +7,8 @@ import { KapiChartFrame as r, chartSummary as i, chartVars as a, useChartLabels
|
|
|
7
7
|
import { barHeight as u, barScale as d, barTickLabel as f } from "./barChartLogic.js";
|
|
8
8
|
import { areaPath as p, lineEndpoint as m, linePath as h, linePoints as g } from "./lineChartLogic.js";
|
|
9
9
|
/* empty css */
|
|
10
|
-
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
11
10
|
import "react";
|
|
11
|
+
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
12
12
|
//#region src/components/data/KapiLineChart.tsx
|
|
13
13
|
var y = 4;
|
|
14
14
|
function b({ categories: b, series: x, title: S, tickCount: C = 4, area: w = !1, unit: T, view: E, defaultView: D = "chart", onViewChange: O, labels: k, className: A, ref: j, ...M }) {
|