@alfadocs/ui-kit 1.0.0 → 1.2.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/dist/_chunks/{actions-cell-renderer-DaL80uqL.js → actions-cell-renderer-ClGCSQnA.js} +600 -565
- package/dist/_chunks/{ai-consent-banner-BXD7W6FI.js → ai-consent-banner-DKgFfSzc.js} +2 -2
- package/dist/_chunks/{alert-Cxaqd-QO.js → alert-DS22ha1n.js} +103 -98
- package/dist/_chunks/{annotation-marker-qt5R9WZX.js → annotation-marker-CsUJGZjQ.js} +7 -5
- package/dist/_chunks/{audio-recorder-BjnB7V8n.js → audio-recorder-sRsGS-0V.js} +2 -2
- package/dist/_chunks/{booking-DSOK-bnR.js → booking-D8fCzcUd.js} +2 -2
- package/dist/_chunks/{care-plan-card-BrwhyIJI.js → care-plan-card-DjjVnBYz.js} +2 -2
- package/dist/_chunks/{care-plan-entry-card-DWEdCQM3.js → care-plan-entry-card-BVhpvd-P.js} +2 -2
- package/dist/_chunks/{collapsible-BrnRiCC6.js → collapsible-CGL9ontS.js} +65 -61
- package/dist/_chunks/{document-preview-DXsCEj4U.js → document-preview-DAczwybt.js} +2 -2
- package/dist/_chunks/{document-scanner-cS_ispQs.js → document-scanner-BRYIc3A-.js} +2 -2
- package/dist/_chunks/{entity-summary-BILN4wEG.js → entity-summary-BS6n7Iah.js} +2 -2
- package/dist/_chunks/{face-scheme-CjQAHvSP.js → face-scheme-Cou2efl7.js} +2 -2
- package/dist/_chunks/{file-manager-B9LZzT5E.js → file-manager-CNSLiuLo.js} +2 -2
- package/dist/_chunks/{freemium-paywall-Dr2342_S.js → freemium-paywall-DsT7MaLd.js} +2 -2
- package/dist/_chunks/link-cell-renderer-_DlEZHLI.js +772 -0
- package/dist/_chunks/{marketplace-app-shell-pCHBp8bo.js → marketplace-app-shell-DQC9Gpm0.js} +2 -2
- package/dist/_chunks/{muscle-scheme-kgCX5qfO.js → muscle-scheme-yfzP_xoJ.js} +2 -2
- package/dist/_chunks/notes-panel-CCz0J140.js +370 -0
- package/dist/_chunks/{patient-details-UmNcxL0c.js → patient-details-l7pnsUq9.js} +2 -2
- package/dist/_chunks/{patient-search-vtRTSdf6.js → patient-search-H54Utav2.js} +2 -2
- package/dist/_chunks/{patient-table-QEVsFvwq.js → patient-table-DXk0wW8Q.js} +243 -239
- package/dist/_chunks/payment-automation-upsell-C4LIw1iQ.js +305 -0
- package/dist/_chunks/{payment-form-BoGxEmGn.js → payment-form-CyKT20xZ.js} +2 -2
- package/dist/_chunks/{payment-request-card-CygO1anM.js → payment-request-card-CN30J6yM.js} +107 -138
- package/dist/_chunks/{pdf-viewer-CcOuR2wj.js → pdf-viewer-DHg8SfUI.js} +2 -2
- package/dist/_chunks/{practice-results-yKbwIxqa.js → practice-results-qvJRkvLn.js} +2 -2
- package/dist/_chunks/receipt-euro-C6k4Gzhr.js +36 -0
- package/dist/_chunks/{reviews-panel-DmOjvmyH.js → reviews-panel-BfUJhx3m.js} +2 -2
- package/dist/_chunks/{sign-document-cH9CboWB.js → sign-document-D70TEUw9.js} +2 -2
- package/dist/_chunks/{signature-request-BzXTV_RH.js → signature-request-BlNCXpRN.js} +2 -2
- package/dist/_chunks/sparkline-DJtZBe7O.js +501 -0
- package/dist/_chunks/{warning-stack-DKeAfj5M.js → warning-stack-IVf0oxh2.js} +2 -2
- package/dist/_chunks/{workflow-map-SIfAhmWz.js → workflow-map-ByyBYj6Y.js} +2 -2
- package/dist/agent-catalog.json +237 -7
- package/dist/agent-i18n/en.json +17 -5
- package/dist/components/ai-consent-banner/index.js +1 -1
- package/dist/components/alert/alert.d.ts +20 -0
- package/dist/components/alert/index.d.ts +1 -1
- package/dist/components/alert/index.js +1 -1
- package/dist/components/annotation-marker/index.js +1 -1
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-entry-card/index.js +1 -1
- package/dist/components/collapsible/index.js +1 -1
- package/dist/components/data-table/filters/select-filter.d.ts +6 -0
- package/dist/components/data-table/hooks/use-presentational-aria-fix.d.ts +19 -0
- package/dist/components/data-table/index.js +2 -2
- package/dist/components/document-preview/index.js +1 -1
- package/dist/components/document-scanner/index.js +1 -1
- package/dist/components/entity-summary/index.js +1 -1
- package/dist/components/face-scheme/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/muscle-scheme/index.js +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/notes-panel/notes-panel.d.ts +45 -2
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-search/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/payment-card/index.js +1 -1
- package/dist/components/payment-form/index.js +1 -1
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/reviews-panel/index.js +1 -1
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/skeleton-scheme/index.js +1 -1
- package/dist/components/sparkline/index.d.ts +1 -1
- package/dist/components/sparkline/index.js +1 -1
- package/dist/components/sparkline/sparkline.d.ts +60 -3
- package/dist/components/warning-stack/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/host-compat.css +13 -1
- package/dist/i18n/locales/ar.d.ts +3 -0
- package/dist/i18n/locales/ar.js +3 -0
- package/dist/i18n/locales/de.d.ts +3 -0
- package/dist/i18n/locales/de.js +3 -0
- package/dist/i18n/locales/el.d.ts +3 -0
- package/dist/i18n/locales/el.js +3 -0
- package/dist/i18n/locales/en.d.ts +3 -0
- package/dist/i18n/locales/en.js +3 -0
- package/dist/i18n/locales/es.d.ts +3 -0
- package/dist/i18n/locales/es.js +3 -0
- package/dist/i18n/locales/fr.d.ts +3 -0
- package/dist/i18n/locales/fr.js +3 -0
- package/dist/i18n/locales/hi.d.ts +3 -0
- package/dist/i18n/locales/hi.js +3 -0
- package/dist/i18n/locales/it.d.ts +3 -0
- package/dist/i18n/locales/it.js +3 -0
- package/dist/i18n/locales/ja.d.ts +3 -0
- package/dist/i18n/locales/ja.js +3 -0
- package/dist/i18n/locales/nl.d.ts +3 -0
- package/dist/i18n/locales/nl.js +3 -0
- package/dist/i18n/locales/pl.d.ts +3 -0
- package/dist/i18n/locales/pl.js +3 -0
- package/dist/i18n/locales/pt.d.ts +3 -0
- package/dist/i18n/locales/pt.js +3 -0
- package/dist/i18n/locales/ro.d.ts +3 -0
- package/dist/i18n/locales/ro.js +3 -0
- package/dist/i18n/locales/ru.d.ts +3 -0
- package/dist/i18n/locales/ru.js +3 -0
- package/dist/i18n/locales/sq.d.ts +3 -0
- package/dist/i18n/locales/sq.js +3 -0
- package/dist/i18n/locales/sv.d.ts +3 -0
- package/dist/i18n/locales/sv.js +3 -0
- package/dist/i18n/locales/tr.d.ts +3 -0
- package/dist/i18n/locales/tr.js +3 -0
- package/dist/i18n/locales/zh.d.ts +3 -0
- package/dist/i18n/locales/zh.js +3 -0
- package/dist/index.js +974 -1268
- package/dist/locales/ar.json +3 -0
- package/dist/locales/de.json +3 -0
- package/dist/locales/el.json +3 -0
- package/dist/locales/en.json +3 -0
- package/dist/locales/es.json +3 -0
- package/dist/locales/fr.json +3 -0
- package/dist/locales/hi.json +3 -0
- package/dist/locales/it.json +3 -0
- package/dist/locales/ja.json +3 -0
- package/dist/locales/nl.json +3 -0
- package/dist/locales/pl.json +3 -0
- package/dist/locales/pt.json +3 -0
- package/dist/locales/ro.json +3 -0
- package/dist/locales/ru.json +3 -0
- package/dist/locales/sq.json +3 -0
- package/dist/locales/sv.json +3 -0
- package/dist/locales/tr.json +3 -0
- package/dist/locales/zh.json +3 -0
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/payment-automation-upsell/index.js +5 -0
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +5 -1
- package/dist/_chunks/link-cell-renderer-Bt-mXeQY.js +0 -728
- package/dist/_chunks/notes-panel-CTcOLLVo.js +0 -324
- package/dist/_chunks/sparkline-DcXqRZoq.js +0 -283
|
@@ -0,0 +1,501 @@
|
|
|
1
|
+
import { jsx as d, jsxs as D } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as oe, useId as de, useMemo as A, useRef as S, useState as Z, useEffect as P, useImperativeHandle as ce } from "react";
|
|
3
|
+
import { c as E } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as le } from "react-i18next";
|
|
5
|
+
import ue from "react-apexcharts";
|
|
6
|
+
import U from "apexcharts";
|
|
7
|
+
import { g as J, u as pe } from "./apexcharts-theme-B_AxGC_h.js";
|
|
8
|
+
import { m as me } from "./annotation-marker-CsUJGZjQ.js";
|
|
9
|
+
import { u as he } from "./registry-DvAUVLHh.js";
|
|
10
|
+
function fe(n) {
|
|
11
|
+
if (n.length < 2)
|
|
12
|
+
return { slope: 0, direction: "steady" };
|
|
13
|
+
const r = n.length, c = (r - 1) / 2, s = n.reduce((a, i) => a + i, 0) / r;
|
|
14
|
+
let o = 0, h = 0;
|
|
15
|
+
for (let a = 0; a < r; a++) {
|
|
16
|
+
const i = a - c;
|
|
17
|
+
o += i * (n[a] - s), h += i * i;
|
|
18
|
+
}
|
|
19
|
+
const p = h === 0 ? 0 : o / h, y = 0.01 * (Math.max(...n) - Math.min(...n) || 1), m = Math.abs(p) < y ? "steady" : p > 0 ? "increasing" : "decreasing";
|
|
20
|
+
return { slope: p, direction: m };
|
|
21
|
+
}
|
|
22
|
+
const ge = {
|
|
23
|
+
id: "sparkline",
|
|
24
|
+
capabilities: [],
|
|
25
|
+
state: {},
|
|
26
|
+
actions: {
|
|
27
|
+
update_series: {
|
|
28
|
+
// Replacing the rendered series mutates what the chart displays — write,
|
|
29
|
+
// not read.
|
|
30
|
+
safety: "write",
|
|
31
|
+
argsType: "{ data: number[] }",
|
|
32
|
+
argsSchema: {
|
|
33
|
+
type: "object",
|
|
34
|
+
properties: {
|
|
35
|
+
data: {
|
|
36
|
+
type: "array",
|
|
37
|
+
items: { type: "number" },
|
|
38
|
+
description: "The new data points to render."
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
required: ["data"]
|
|
42
|
+
},
|
|
43
|
+
idempotent: !0,
|
|
44
|
+
descriptionKey: "ui.agent.sparkline.actions.updateSeries",
|
|
45
|
+
description: "Replace the sparkline data without remounting.",
|
|
46
|
+
invoke: (n, r) => {
|
|
47
|
+
n.updateSeries(r.data);
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
export_png: {
|
|
51
|
+
// Pure getter — returns an image of the current chart, no state change.
|
|
52
|
+
safety: "read",
|
|
53
|
+
returns: "string",
|
|
54
|
+
returnsSchema: {
|
|
55
|
+
type: "string",
|
|
56
|
+
description: "A PNG image of the sparkline encoded as a data URI."
|
|
57
|
+
},
|
|
58
|
+
descriptionKey: "ui.agent.sparkline.actions.exportPng",
|
|
59
|
+
description: "Return a PNG data URI of the sparkline.",
|
|
60
|
+
invoke: (n) => n.dataURI()
|
|
61
|
+
},
|
|
62
|
+
select_annotation: {
|
|
63
|
+
// Routes the host somewhere — the same thing a pointer press on the
|
|
64
|
+
// annotation's band does. Nothing in the chart changes, but the host's
|
|
65
|
+
// surface does, so it is not a read.
|
|
66
|
+
safety: "write",
|
|
67
|
+
argsType: "{ annotationId: string }",
|
|
68
|
+
argsSchema: {
|
|
69
|
+
type: "object",
|
|
70
|
+
properties: {
|
|
71
|
+
annotationId: {
|
|
72
|
+
type: "string",
|
|
73
|
+
description: "The annotation's id, as carried by data-annotation-hit-id on the pressable band. The decorative drawn marker carries the same value as data-annotation-id, but is not selectable."
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
required: ["annotationId"]
|
|
77
|
+
},
|
|
78
|
+
idempotent: !0,
|
|
79
|
+
descriptionKey: "ui.agent.sparkline.actions.selectAnnotation",
|
|
80
|
+
description: "Select a drawn annotation, as pressing its band would. No-op unless the host wired onAnnotationSelect and the id names an annotation that is currently drawn.",
|
|
81
|
+
invoke: (n, r) => {
|
|
82
|
+
n.selectAnnotation(r.annotationId);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
domHooks: {
|
|
87
|
+
root: { attr: "data-component", value: "sparkline" },
|
|
88
|
+
instanceId: {
|
|
89
|
+
attr: "data-component-id",
|
|
90
|
+
sourceProp: "id",
|
|
91
|
+
description: "Sourced from the id prop."
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}, Q = E("ds:relative ds:inline-block ds:w-full", {
|
|
95
|
+
variants: {
|
|
96
|
+
size: {
|
|
97
|
+
xs: "ds:h-6",
|
|
98
|
+
sm: "ds:h-8",
|
|
99
|
+
md: "ds:h-10",
|
|
100
|
+
// Applied when an explicit `height` prop is given: the wrapper
|
|
101
|
+
// grows with the svg instead of clipping at the size's fixed height.
|
|
102
|
+
auto: ""
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
defaultVariants: { size: "md" }
|
|
106
|
+
}), X = E("", {
|
|
107
|
+
variants: {
|
|
108
|
+
tone: {
|
|
109
|
+
neutral: "ds:[--annotation-color:var(--muted-foreground)]",
|
|
110
|
+
info: "ds:[--annotation-color:var(--info)]",
|
|
111
|
+
success: "ds:[--annotation-color:var(--success)]",
|
|
112
|
+
/* `--warning-readable`, not `--warning`: a 1.5px dashed line is a
|
|
113
|
+
* non-text graphic (WCAG 1.4.11, 3:1), and yellow-500 is ~1.6:1 on a
|
|
114
|
+
* light card. The token aliases back to `--warning` in dark. */
|
|
115
|
+
warning: "ds:[--annotation-color:var(--warning-readable)]",
|
|
116
|
+
error: "ds:[--annotation-color:var(--destructive)]",
|
|
117
|
+
accent: "ds:[--annotation-color:var(--accent)]"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
defaultVariants: { tone: "neutral" }
|
|
121
|
+
}), ve = E(
|
|
122
|
+
"ds:pointer-events-none ds:absolute ds:inset-x-[2px]",
|
|
123
|
+
{
|
|
124
|
+
variants: {
|
|
125
|
+
size: {
|
|
126
|
+
xs: "ds:inset-y-[-10px]",
|
|
127
|
+
sm: "ds:inset-y-[-6px]",
|
|
128
|
+
md: "ds:inset-y-[-2px]",
|
|
129
|
+
auto: "ds:inset-y-0"
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
defaultVariants: { size: "md" }
|
|
133
|
+
}
|
|
134
|
+
), ye = {
|
|
135
|
+
increasing: "↑",
|
|
136
|
+
decreasing: "↓",
|
|
137
|
+
steady: "→"
|
|
138
|
+
}, be = {
|
|
139
|
+
xs: 24,
|
|
140
|
+
sm: 32,
|
|
141
|
+
md: 40
|
|
142
|
+
}, k = 2, Y = 2.5, ke = 44;
|
|
143
|
+
function we(n, r) {
|
|
144
|
+
const c = n.map((s) => ({
|
|
145
|
+
annotation: s,
|
|
146
|
+
centre: ee(s.position) * r
|
|
147
|
+
})).sort((s, o) => s.centre - o.centre);
|
|
148
|
+
return c.map((s, o) => {
|
|
149
|
+
const h = c[o - 1], p = c[o + 1], w = h ? (h.centre + s.centre) / 2 : 0, y = p ? (s.centre + p.centre) / 2 : r, m = Math.max(0, w), a = Math.min(r, y), i = Math.min(ke, Math.max(0, a - m)), x = Math.min(
|
|
150
|
+
Math.max(s.centre - i / 2, m),
|
|
151
|
+
a - i
|
|
152
|
+
);
|
|
153
|
+
return { annotation: s.annotation, x, width: i };
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
function ee(n) {
|
|
157
|
+
return Number.isFinite(n) ? Math.min(1, Math.max(0, n)) : 0;
|
|
158
|
+
}
|
|
159
|
+
function xe(n) {
|
|
160
|
+
return n.filter((r) => r != null);
|
|
161
|
+
}
|
|
162
|
+
function Ie() {
|
|
163
|
+
return typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
164
|
+
}
|
|
165
|
+
const Ne = oe(
|
|
166
|
+
({
|
|
167
|
+
id: n,
|
|
168
|
+
data: r,
|
|
169
|
+
variant: c = "line",
|
|
170
|
+
size: s = "md",
|
|
171
|
+
label: o,
|
|
172
|
+
color: h,
|
|
173
|
+
showEndpoint: p = !1,
|
|
174
|
+
showTooltip: w = !1,
|
|
175
|
+
width: y,
|
|
176
|
+
height: m,
|
|
177
|
+
annotations: a,
|
|
178
|
+
onAnnotationSelect: i,
|
|
179
|
+
className: x,
|
|
180
|
+
...V
|
|
181
|
+
}, te) => {
|
|
182
|
+
var q;
|
|
183
|
+
const { t: f, i18n: $ } = le(), j = de(), b = A(
|
|
184
|
+
() => `sparkline-${j.replace(/[^a-zA-Z0-9-_]/g, "")}`,
|
|
185
|
+
[j]
|
|
186
|
+
), I = S(null), [O, ne] = Z(0), l = A(() => xe(r), [r]), { direction: C } = fe(l), B = A(() => {
|
|
187
|
+
const e = a && a.length > 0 ? f("sparkline.annotations", {
|
|
188
|
+
list: a.map((v) => v.label).join(", ")
|
|
189
|
+
}) : "", t = (v) => e ? `${v}. ${e}` : v;
|
|
190
|
+
if (l.length === 0)
|
|
191
|
+
return t(f("sparkline.noData", "No data"));
|
|
192
|
+
const u = (v) => new Intl.NumberFormat($.language).format(v), g = f(`sparkline.direction.${C}`), R = {
|
|
193
|
+
min: u(Math.min(...l)),
|
|
194
|
+
max: u(Math.max(...l)),
|
|
195
|
+
current: u(l[l.length - 1]),
|
|
196
|
+
direction: g
|
|
197
|
+
};
|
|
198
|
+
return t(o ? f("sparkline.summary", { label: o, ...R }) : f("sparkline.summaryNoLabel", R));
|
|
199
|
+
}, [l, a, o, C, $.language, f]), [N, ae] = Z(
|
|
200
|
+
() => {
|
|
201
|
+
try {
|
|
202
|
+
return J();
|
|
203
|
+
} catch {
|
|
204
|
+
return {};
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
);
|
|
208
|
+
P(() => {
|
|
209
|
+
let e;
|
|
210
|
+
const t = new MutationObserver(() => {
|
|
211
|
+
clearTimeout(e), e = setTimeout(() => {
|
|
212
|
+
try {
|
|
213
|
+
ae(J());
|
|
214
|
+
} catch {
|
|
215
|
+
}
|
|
216
|
+
}, 50);
|
|
217
|
+
});
|
|
218
|
+
return t.observe(document.documentElement, {
|
|
219
|
+
attributes: !0,
|
|
220
|
+
attributeFilter: ["class"]
|
|
221
|
+
}), () => {
|
|
222
|
+
clearTimeout(e), t.disconnect();
|
|
223
|
+
};
|
|
224
|
+
}, []), P(() => {
|
|
225
|
+
const e = I.current;
|
|
226
|
+
if (!e) return;
|
|
227
|
+
const t = new ResizeObserver((u) => {
|
|
228
|
+
const g = u[0];
|
|
229
|
+
g && ne(Math.floor(g.contentRect.width));
|
|
230
|
+
});
|
|
231
|
+
return t.observe(e), () => t.disconnect();
|
|
232
|
+
}, []), pe(I);
|
|
233
|
+
const M = S(i);
|
|
234
|
+
P(() => {
|
|
235
|
+
M.current = i;
|
|
236
|
+
}, [i]);
|
|
237
|
+
const F = S(a);
|
|
238
|
+
F.current = a;
|
|
239
|
+
const z = A(
|
|
240
|
+
() => ({
|
|
241
|
+
updateSeries(e) {
|
|
242
|
+
var t;
|
|
243
|
+
(t = U.getChartByID(b)) == null || t.updateSeries([{ data: e }]);
|
|
244
|
+
},
|
|
245
|
+
updateOptions(e) {
|
|
246
|
+
var t;
|
|
247
|
+
(t = U.getChartByID(b)) == null || t.updateOptions(e);
|
|
248
|
+
},
|
|
249
|
+
async dataURI() {
|
|
250
|
+
const e = U.getChartByID(b);
|
|
251
|
+
return e ? (await e.dataURI()).imgURI : "";
|
|
252
|
+
},
|
|
253
|
+
selectAnnotation(e) {
|
|
254
|
+
var u, g;
|
|
255
|
+
(u = F.current) != null && u.some((R) => R.id === e) && ((g = M.current) == null || g.call(M, e));
|
|
256
|
+
}
|
|
257
|
+
}),
|
|
258
|
+
[b]
|
|
259
|
+
);
|
|
260
|
+
ce(te, () => z, [z]), he(ge, z, n);
|
|
261
|
+
const _ = h ?? ((q = N.colors) == null ? void 0 : q[0]) ?? "currentColor";
|
|
262
|
+
if (l.length === 0)
|
|
263
|
+
return /* @__PURE__ */ d(
|
|
264
|
+
"div",
|
|
265
|
+
{
|
|
266
|
+
ref: I,
|
|
267
|
+
role: "img",
|
|
268
|
+
"aria-label": B,
|
|
269
|
+
dir: "ltr",
|
|
270
|
+
className: Q({
|
|
271
|
+
size: m !== void 0 ? "auto" : s,
|
|
272
|
+
className: x
|
|
273
|
+
}),
|
|
274
|
+
"data-component": "sparkline",
|
|
275
|
+
"data-component-id": n,
|
|
276
|
+
...V
|
|
277
|
+
}
|
|
278
|
+
);
|
|
279
|
+
const G = Ie(), H = r.length > l.length, L = H ? r.flatMap((e, t) => e == null ? [] : [{ x: t, y: e }]) : l, re = {
|
|
280
|
+
...N,
|
|
281
|
+
chart: {
|
|
282
|
+
...N.chart,
|
|
283
|
+
id: b,
|
|
284
|
+
type: c,
|
|
285
|
+
sparkline: { enabled: !0 },
|
|
286
|
+
toolbar: { show: !1 },
|
|
287
|
+
animations: {
|
|
288
|
+
enabled: !G,
|
|
289
|
+
// A gapped series is re-rendered as {x, y} pairs, and Apex's
|
|
290
|
+
// update tween interpolates between the old and new paths point by
|
|
291
|
+
// point. Across a width change the two have different lengths and
|
|
292
|
+
// the tween emits `d="… NaN …"` for a few frames. The finished
|
|
293
|
+
// render is correct either way; switching the tween off keeps the
|
|
294
|
+
// console clean.
|
|
295
|
+
dynamicAnimation: { enabled: !G && !H }
|
|
296
|
+
},
|
|
297
|
+
zoom: { enabled: !1 },
|
|
298
|
+
parentHeightOffset: 0
|
|
299
|
+
},
|
|
300
|
+
colors: [_],
|
|
301
|
+
stroke: {
|
|
302
|
+
curve: "smooth",
|
|
303
|
+
width: c === "bar" ? 0 : 2
|
|
304
|
+
},
|
|
305
|
+
fill: {
|
|
306
|
+
opacity: c === "area" ? 0.15 : 1
|
|
307
|
+
},
|
|
308
|
+
xaxis: {
|
|
309
|
+
crosshairs: { show: !1 },
|
|
310
|
+
// Pin the extent to the slot count so a gap at either end still holds
|
|
311
|
+
// its place — otherwise the plot would rescale to the measurements
|
|
312
|
+
// and the annotation fractions would no longer mean the same thing.
|
|
313
|
+
...H ? { type: "numeric", min: 0, max: r.length - 1 } : {}
|
|
314
|
+
},
|
|
315
|
+
tooltip: { enabled: w },
|
|
316
|
+
markers: p ? {
|
|
317
|
+
size: [0],
|
|
318
|
+
discrete: [
|
|
319
|
+
{
|
|
320
|
+
// An index into the SERIES, whose holes have already been
|
|
321
|
+
// removed — so this is the last MEASURED point, never a slot
|
|
322
|
+
// the parameter was not measured at.
|
|
323
|
+
seriesIndex: 0,
|
|
324
|
+
dataPointIndex: L.length - 1,
|
|
325
|
+
fillColor: _,
|
|
326
|
+
strokeColor: _,
|
|
327
|
+
size: 4
|
|
328
|
+
}
|
|
329
|
+
]
|
|
330
|
+
} : { size: 0 },
|
|
331
|
+
grid: {
|
|
332
|
+
...N.grid,
|
|
333
|
+
show: !1,
|
|
334
|
+
// ApexCharts grid.padding uses physical keys (not CSS logical properties).
|
|
335
|
+
// The chart wrapper enforces dir="ltr" so these always resolve correctly.
|
|
336
|
+
padding: {
|
|
337
|
+
top: k,
|
|
338
|
+
right: k,
|
|
339
|
+
bottom: k,
|
|
340
|
+
left: k
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
}, se = y ?? (O > 0 ? O : "100%"), ie = m ?? be[s ?? "md"], T = a != null && a.length ? a : void 0, W = O - k * 2, K = i && T && W > 0 ? we(T, W) : void 0;
|
|
344
|
+
return /* @__PURE__ */ D(
|
|
345
|
+
"div",
|
|
346
|
+
{
|
|
347
|
+
ref: I,
|
|
348
|
+
role: "img",
|
|
349
|
+
"aria-label": B,
|
|
350
|
+
dir: "ltr",
|
|
351
|
+
className: Q({
|
|
352
|
+
size: m !== void 0 ? "auto" : s,
|
|
353
|
+
className: x
|
|
354
|
+
}),
|
|
355
|
+
"data-component": "sparkline",
|
|
356
|
+
"data-component-id": n,
|
|
357
|
+
...V,
|
|
358
|
+
children: [
|
|
359
|
+
/* @__PURE__ */ d(
|
|
360
|
+
ue,
|
|
361
|
+
{
|
|
362
|
+
type: c,
|
|
363
|
+
series: [{ data: L }],
|
|
364
|
+
options: re,
|
|
365
|
+
width: se,
|
|
366
|
+
height: ie,
|
|
367
|
+
"aria-hidden": "true"
|
|
368
|
+
}
|
|
369
|
+
),
|
|
370
|
+
T && /* Drawn over the plot rather than through ApexCharts' own xaxis
|
|
371
|
+
annotations: a fraction of the measured extent is the one
|
|
372
|
+
positioning rule that survives series of different lengths, which
|
|
373
|
+
is what makes a column of sparklines share an x. */
|
|
374
|
+
/* The inset lives on a div: an <svg> is a replaced element, so
|
|
375
|
+
left+right do not size it and it would fall back to its intrinsic
|
|
376
|
+
300px. The div is the plot box; the svg fills it. The 2px MUST
|
|
377
|
+
equal PLOT_EDGE_PADDING — Tailwind needs a static literal, so the
|
|
378
|
+
two cannot share one source; change them together or the first and
|
|
379
|
+
last annotation drift off the first and last data point. */
|
|
380
|
+
/* @__PURE__ */ d("div", { className: "ds:pointer-events-none ds:absolute ds:inset-y-0 ds:inset-x-[2px]", children: /* @__PURE__ */ d(
|
|
381
|
+
"svg",
|
|
382
|
+
{
|
|
383
|
+
"aria-hidden": "true",
|
|
384
|
+
focusable: "false",
|
|
385
|
+
"data-testid": "sparkline-annotations",
|
|
386
|
+
className: "ds:size-full",
|
|
387
|
+
children: T.map((e) => {
|
|
388
|
+
const t = ee(e.position);
|
|
389
|
+
return (
|
|
390
|
+
/* A nested viewport placed at a percentage of the plot: the
|
|
391
|
+
one positioning rule that needs no measurement, so a column
|
|
392
|
+
of sparklines shares an x whatever their widths. */
|
|
393
|
+
/* @__PURE__ */ D(
|
|
394
|
+
"svg",
|
|
395
|
+
{
|
|
396
|
+
x: `${t * 100}%`,
|
|
397
|
+
y: "0",
|
|
398
|
+
width: "1",
|
|
399
|
+
height: "100%",
|
|
400
|
+
overflow: "visible",
|
|
401
|
+
"data-annotation-id": e.id,
|
|
402
|
+
"data-annotation-position": t,
|
|
403
|
+
className: X({ tone: e.tone }),
|
|
404
|
+
children: [
|
|
405
|
+
/* @__PURE__ */ d(
|
|
406
|
+
"line",
|
|
407
|
+
{
|
|
408
|
+
x1: 0,
|
|
409
|
+
x2: 0,
|
|
410
|
+
y1: 0,
|
|
411
|
+
y2: "100%",
|
|
412
|
+
className: "ds:[stroke:var(--annotation-color)] ds:[stroke-dasharray:2_3] ds:[stroke-width:1]"
|
|
413
|
+
}
|
|
414
|
+
),
|
|
415
|
+
/* @__PURE__ */ d(
|
|
416
|
+
"path",
|
|
417
|
+
{
|
|
418
|
+
d: me(
|
|
419
|
+
e.shape ?? "diamond",
|
|
420
|
+
0,
|
|
421
|
+
Y,
|
|
422
|
+
Y
|
|
423
|
+
),
|
|
424
|
+
className: "ds:[fill:var(--annotation-color)]"
|
|
425
|
+
}
|
|
426
|
+
)
|
|
427
|
+
]
|
|
428
|
+
},
|
|
429
|
+
e.id
|
|
430
|
+
)
|
|
431
|
+
);
|
|
432
|
+
})
|
|
433
|
+
}
|
|
434
|
+
) }),
|
|
435
|
+
K && i && /* Sized in px, not percentages: 44px is a measurement, not a
|
|
436
|
+
fraction of a box the reader can resize. `pointer-events-none`
|
|
437
|
+
holds all the way down to the bands, so the only live pixels are
|
|
438
|
+
the 44px each annotation owns. */
|
|
439
|
+
/* @__PURE__ */ d(
|
|
440
|
+
"div",
|
|
441
|
+
{
|
|
442
|
+
className: ve({
|
|
443
|
+
size: m !== void 0 ? "auto" : s
|
|
444
|
+
}),
|
|
445
|
+
children: /* @__PURE__ */ d(
|
|
446
|
+
"svg",
|
|
447
|
+
{
|
|
448
|
+
"aria-hidden": "true",
|
|
449
|
+
focusable: "false",
|
|
450
|
+
"data-testid": "sparkline-annotation-hits",
|
|
451
|
+
className: "ds:size-full",
|
|
452
|
+
children: K.map(({ annotation: e, x: t, width: u }) => /* @__PURE__ */ D(
|
|
453
|
+
"g",
|
|
454
|
+
{
|
|
455
|
+
"data-annotation-hit-id": e.id,
|
|
456
|
+
onClick: () => i(e.id),
|
|
457
|
+
className: `ds:group ds:pointer-events-auto ds:cursor-pointer ${X(
|
|
458
|
+
{ tone: e.tone }
|
|
459
|
+
)}`,
|
|
460
|
+
children: [
|
|
461
|
+
/* @__PURE__ */ d("title", { children: f("sparkline.annotationAction", {
|
|
462
|
+
label: e.label
|
|
463
|
+
}) }),
|
|
464
|
+
/* @__PURE__ */ d(
|
|
465
|
+
"rect",
|
|
466
|
+
{
|
|
467
|
+
x: t,
|
|
468
|
+
y: 0,
|
|
469
|
+
width: u,
|
|
470
|
+
height: "100%",
|
|
471
|
+
className: "ds:[fill:var(--annotation-color)] ds:opacity-0 ds:transition-opacity ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none ds:group-hover:opacity-20"
|
|
472
|
+
}
|
|
473
|
+
)
|
|
474
|
+
]
|
|
475
|
+
},
|
|
476
|
+
e.id
|
|
477
|
+
))
|
|
478
|
+
}
|
|
479
|
+
)
|
|
480
|
+
}
|
|
481
|
+
),
|
|
482
|
+
p && /* @__PURE__ */ d(
|
|
483
|
+
"span",
|
|
484
|
+
{
|
|
485
|
+
"aria-hidden": "true",
|
|
486
|
+
className: "ds:pointer-events-none ds:absolute ds:end-0 ds:top-0 ds:text-[length:var(--font-size-xs)] ds:leading-none",
|
|
487
|
+
children: ye[C]
|
|
488
|
+
}
|
|
489
|
+
)
|
|
490
|
+
]
|
|
491
|
+
}
|
|
492
|
+
);
|
|
493
|
+
}
|
|
494
|
+
);
|
|
495
|
+
Ne.displayName = "Sparkline";
|
|
496
|
+
export {
|
|
497
|
+
Ne as S,
|
|
498
|
+
ge as s,
|
|
499
|
+
fe as u
|
|
500
|
+
};
|
|
501
|
+
//# sourceMappingURL=sparkline-DJtZBe7O.js.map
|
|
@@ -3,7 +3,7 @@ import { forwardRef as cn, useId as P, useState as y, useEffect as f, useMemo as
|
|
|
3
3
|
import { c as dn } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as ln } from "react-i18next";
|
|
5
5
|
import { u as un } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
6
|
-
import { A as C } from "./alert-
|
|
6
|
+
import { A as C } from "./alert-DS22ha1n.js";
|
|
7
7
|
import { B as fn } from "./button-CPGiR_bH.js";
|
|
8
8
|
import { I as mn } from "./icon-button-C_kbcd7I.js";
|
|
9
9
|
import { X as gn } from "./x-B5YnXwCz.js";
|
|
@@ -265,4 +265,4 @@ Nn.displayName = "WarningStack";
|
|
|
265
265
|
export {
|
|
266
266
|
Nn as W
|
|
267
267
|
};
|
|
268
|
-
//# sourceMappingURL=warning-stack-
|
|
268
|
+
//# sourceMappingURL=warning-stack-IVf0oxh2.js.map
|
|
@@ -12,7 +12,7 @@ import { c as D } from "./createLucideIcon-DhHxpK9K.js";
|
|
|
12
12
|
import { T as ae } from "./trash-2-uumy3fy1.js";
|
|
13
13
|
import { C as Ne } from "./circle-j7oZoouK.js";
|
|
14
14
|
import { u as Ce } from "./registry-DvAUVLHh.js";
|
|
15
|
-
import { A as $ } from "./alert-
|
|
15
|
+
import { A as $ } from "./alert-DS22ha1n.js";
|
|
16
16
|
import { B as _e } from "./button-CPGiR_bH.js";
|
|
17
17
|
import { D as N } from "./dropdown-menu-DU-Hrf33.js";
|
|
18
18
|
import { E } from "./empty-state-CrLsi0XI.js";
|
|
@@ -1353,4 +1353,4 @@ export {
|
|
|
1353
1353
|
ee as r,
|
|
1354
1354
|
L as w
|
|
1355
1355
|
};
|
|
1356
|
-
//# sourceMappingURL=workflow-map-
|
|
1356
|
+
//# sourceMappingURL=workflow-map-ByyBYj6Y.js.map
|