@alfadocs/ui-kit 0.99.0 → 1.1.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 (140) hide show
  1. package/README.md +2 -1
  2. package/dist/_chunks/{actions-cell-renderer-DaL80uqL.js → actions-cell-renderer-ClGCSQnA.js} +600 -565
  3. package/dist/_chunks/{ai-consent-banner-BXD7W6FI.js → ai-consent-banner-DKgFfSzc.js} +2 -2
  4. package/dist/_chunks/{alert-Cxaqd-QO.js → alert-DS22ha1n.js} +103 -98
  5. package/dist/_chunks/{annotation-marker-qt5R9WZX.js → annotation-marker-CsUJGZjQ.js} +7 -5
  6. package/dist/_chunks/{audio-recorder-BjnB7V8n.js → audio-recorder-sRsGS-0V.js} +2 -2
  7. package/dist/_chunks/{booking-DSOK-bnR.js → booking-D8fCzcUd.js} +2 -2
  8. package/dist/_chunks/{care-plan-card-BrwhyIJI.js → care-plan-card-DjjVnBYz.js} +2 -2
  9. package/dist/_chunks/{care-plan-entry-card-DWEdCQM3.js → care-plan-entry-card-BVhpvd-P.js} +2 -2
  10. package/dist/_chunks/{clinical-note-card-C7F_24IC.js → clinical-note-card-D63x_AkK.js} +5 -2
  11. package/dist/_chunks/{collapsible-BrnRiCC6.js → collapsible-CGL9ontS.js} +65 -61
  12. package/dist/_chunks/{document-preview-DXsCEj4U.js → document-preview-DAczwybt.js} +2 -2
  13. package/dist/_chunks/{document-scanner-cS_ispQs.js → document-scanner-BRYIc3A-.js} +2 -2
  14. package/dist/_chunks/{entity-summary-BILN4wEG.js → entity-summary-BS6n7Iah.js} +2 -2
  15. package/dist/_chunks/{face-scheme-CjQAHvSP.js → face-scheme-Cou2efl7.js} +2 -2
  16. package/dist/_chunks/{file-manager-B9LZzT5E.js → file-manager-CNSLiuLo.js} +2 -2
  17. package/dist/_chunks/{freemium-paywall-Dr2342_S.js → freemium-paywall-DsT7MaLd.js} +2 -2
  18. package/dist/_chunks/link-cell-renderer-_DlEZHLI.js +772 -0
  19. package/dist/_chunks/{marketplace-app-shell-pCHBp8bo.js → marketplace-app-shell-DQC9Gpm0.js} +2 -2
  20. package/dist/_chunks/{muscle-scheme-kgCX5qfO.js → muscle-scheme-yfzP_xoJ.js} +2 -2
  21. package/dist/_chunks/{notes-panel-BKwd-bOV.js → notes-panel-CTcOLLVo.js} +3 -3
  22. package/dist/_chunks/{patient-details-UmNcxL0c.js → patient-details-l7pnsUq9.js} +2 -2
  23. package/dist/_chunks/{patient-search-vtRTSdf6.js → patient-search-H54Utav2.js} +2 -2
  24. package/dist/_chunks/{patient-table-QEVsFvwq.js → patient-table-DXk0wW8Q.js} +243 -239
  25. package/dist/_chunks/payment-automation-upsell-C4LIw1iQ.js +305 -0
  26. package/dist/_chunks/{payment-form-BoGxEmGn.js → payment-form-CyKT20xZ.js} +2 -2
  27. package/dist/_chunks/{payment-request-card-CygO1anM.js → payment-request-card-CN30J6yM.js} +107 -138
  28. package/dist/_chunks/{pdf-viewer-CcOuR2wj.js → pdf-viewer-DHg8SfUI.js} +2 -2
  29. package/dist/_chunks/{practice-results-yKbwIxqa.js → practice-results-qvJRkvLn.js} +2 -2
  30. package/dist/_chunks/receipt-euro-C6k4Gzhr.js +36 -0
  31. package/dist/_chunks/{reviews-panel-DmOjvmyH.js → reviews-panel-BfUJhx3m.js} +2 -2
  32. package/dist/_chunks/{rich-text-editor-DHpV2q6d.js → rich-text-editor-CfeXPPWs.js} +10 -2
  33. package/dist/_chunks/{sign-document-cH9CboWB.js → sign-document-D70TEUw9.js} +2 -2
  34. package/dist/_chunks/{signature-request-BzXTV_RH.js → signature-request-BlNCXpRN.js} +2 -2
  35. package/dist/_chunks/sparkline-DLq7xwic.js +394 -0
  36. package/dist/_chunks/{warning-stack-DKeAfj5M.js → warning-stack-IVf0oxh2.js} +2 -2
  37. package/dist/_chunks/{workflow-map-SIfAhmWz.js → workflow-map-ByyBYj6Y.js} +2 -2
  38. package/dist/agent-catalog.json +211 -7
  39. package/dist/agent-i18n/en.json +13 -3
  40. package/dist/components/ai-consent-banner/index.js +1 -1
  41. package/dist/components/alert/alert.d.ts +20 -0
  42. package/dist/components/alert/index.d.ts +1 -1
  43. package/dist/components/alert/index.js +1 -1
  44. package/dist/components/annotation-marker/index.js +1 -1
  45. package/dist/components/audio-recorder/index.js +1 -1
  46. package/dist/components/booking/index.js +1 -1
  47. package/dist/components/care-plan-card/index.js +1 -1
  48. package/dist/components/care-plan-entry-card/index.js +1 -1
  49. package/dist/components/clinical-note-card/index.js +1 -1
  50. package/dist/components/collapsible/index.js +1 -1
  51. package/dist/components/data-table/filters/select-filter.d.ts +6 -0
  52. package/dist/components/data-table/hooks/use-presentational-aria-fix.d.ts +19 -0
  53. package/dist/components/data-table/index.js +2 -2
  54. package/dist/components/document-preview/index.js +1 -1
  55. package/dist/components/document-scanner/index.js +1 -1
  56. package/dist/components/entity-summary/index.js +1 -1
  57. package/dist/components/face-scheme/index.js +1 -1
  58. package/dist/components/file-manager/index.js +1 -1
  59. package/dist/components/freemium-paywall/index.js +1 -1
  60. package/dist/components/muscle-scheme/index.js +1 -1
  61. package/dist/components/notes-panel/index.js +1 -1
  62. package/dist/components/patient-details/index.js +1 -1
  63. package/dist/components/patient-search/index.js +1 -1
  64. package/dist/components/patient-table/index.js +1 -1
  65. package/dist/components/payment-card/index.js +1 -1
  66. package/dist/components/payment-form/index.js +1 -1
  67. package/dist/components/pdf-viewer/index.js +1 -1
  68. package/dist/components/practice-results/index.js +1 -1
  69. package/dist/components/reviews-panel/index.js +1 -1
  70. package/dist/components/rich-text-editor/index.js +1 -1
  71. package/dist/components/sign-document/index.js +1 -1
  72. package/dist/components/skeleton-scheme/index.js +1 -1
  73. package/dist/components/sparkline/index.d.ts +1 -1
  74. package/dist/components/sparkline/index.js +1 -1
  75. package/dist/components/sparkline/sparkline.d.ts +36 -3
  76. package/dist/components/warning-stack/index.js +1 -1
  77. package/dist/components/workflow/index.js +1 -1
  78. package/dist/host-compat.css +10 -1
  79. package/dist/i18n/locales/ar.d.ts +1 -0
  80. package/dist/i18n/locales/ar.js +1 -0
  81. package/dist/i18n/locales/de.d.ts +1 -0
  82. package/dist/i18n/locales/de.js +1 -0
  83. package/dist/i18n/locales/el.d.ts +1 -0
  84. package/dist/i18n/locales/el.js +1 -0
  85. package/dist/i18n/locales/en.d.ts +1 -0
  86. package/dist/i18n/locales/en.js +1 -0
  87. package/dist/i18n/locales/es.d.ts +1 -0
  88. package/dist/i18n/locales/es.js +1 -0
  89. package/dist/i18n/locales/fr.d.ts +1 -0
  90. package/dist/i18n/locales/fr.js +1 -0
  91. package/dist/i18n/locales/hi.d.ts +1 -0
  92. package/dist/i18n/locales/hi.js +1 -0
  93. package/dist/i18n/locales/it.d.ts +1 -0
  94. package/dist/i18n/locales/it.js +1 -0
  95. package/dist/i18n/locales/ja.d.ts +1 -0
  96. package/dist/i18n/locales/ja.js +1 -0
  97. package/dist/i18n/locales/nl.d.ts +1 -0
  98. package/dist/i18n/locales/nl.js +1 -0
  99. package/dist/i18n/locales/pl.d.ts +1 -0
  100. package/dist/i18n/locales/pl.js +1 -0
  101. package/dist/i18n/locales/pt.d.ts +1 -0
  102. package/dist/i18n/locales/pt.js +1 -0
  103. package/dist/i18n/locales/ro.d.ts +1 -0
  104. package/dist/i18n/locales/ro.js +1 -0
  105. package/dist/i18n/locales/ru.d.ts +1 -0
  106. package/dist/i18n/locales/ru.js +1 -0
  107. package/dist/i18n/locales/sq.d.ts +1 -0
  108. package/dist/i18n/locales/sq.js +1 -0
  109. package/dist/i18n/locales/sv.d.ts +1 -0
  110. package/dist/i18n/locales/sv.js +1 -0
  111. package/dist/i18n/locales/tr.d.ts +1 -0
  112. package/dist/i18n/locales/tr.js +1 -0
  113. package/dist/i18n/locales/zh.d.ts +1 -0
  114. package/dist/i18n/locales/zh.js +1 -0
  115. package/dist/index.js +974 -1268
  116. package/dist/locales/ar.json +1 -0
  117. package/dist/locales/de.json +1 -0
  118. package/dist/locales/el.json +1 -0
  119. package/dist/locales/en.json +1 -0
  120. package/dist/locales/es.json +1 -0
  121. package/dist/locales/fr.json +1 -0
  122. package/dist/locales/hi.json +1 -0
  123. package/dist/locales/it.json +1 -0
  124. package/dist/locales/ja.json +1 -0
  125. package/dist/locales/nl.json +1 -0
  126. package/dist/locales/pl.json +1 -0
  127. package/dist/locales/pt.json +1 -0
  128. package/dist/locales/ro.json +1 -0
  129. package/dist/locales/ru.json +1 -0
  130. package/dist/locales/sq.json +1 -0
  131. package/dist/locales/sv.json +1 -0
  132. package/dist/locales/tr.json +1 -0
  133. package/dist/locales/zh.json +1 -0
  134. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  135. package/dist/patterns/payment-automation-upsell/index.js +5 -0
  136. package/dist/patterns/signature-request/index.js +1 -1
  137. package/dist/tokens.css +1 -1
  138. package/package.json +8 -2
  139. package/dist/_chunks/link-cell-renderer-Bt-mXeQY.js +0 -728
  140. package/dist/_chunks/sparkline-DcXqRZoq.js +0 -283
@@ -1,283 +0,0 @@
1
- import { jsx as w, jsxs as F } from "react/jsx-runtime";
2
- import { forwardRef as G, useId as L, useMemo as v, useRef as K, useState as A, useEffect as H, useImperativeHandle as V } from "react";
3
- import { c as Z } from "./index-D2ZczOXr.js";
4
- import { useTranslation as $ } from "react-i18next";
5
- import q from "react-apexcharts";
6
- import R from "apexcharts";
7
- import { g as U, u as J } from "./apexcharts-theme-B_AxGC_h.js";
8
- import { u as Q } from "./registry-DvAUVLHh.js";
9
- function X(n) {
10
- if (n.length < 2)
11
- return { slope: 0, direction: "steady" };
12
- const t = n.length, a = (t - 1) / 2, c = n.reduce((s, o) => s + o, 0) / t;
13
- let i = 0, l = 0;
14
- for (let s = 0; s < t; s++) {
15
- const o = s - a;
16
- i += o * (n[s] - c), l += o * o;
17
- }
18
- const d = l === 0 ? 0 : i / l, b = 0.01 * (Math.max(...n) - Math.min(...n) || 1), u = Math.abs(d) < b ? "steady" : d > 0 ? "increasing" : "decreasing";
19
- return { slope: d, direction: u };
20
- }
21
- const Y = {
22
- id: "sparkline",
23
- capabilities: [],
24
- state: {},
25
- actions: {
26
- update_series: {
27
- // Replacing the rendered series mutates what the chart displays — write,
28
- // not read.
29
- safety: "write",
30
- argsType: "{ data: number[] }",
31
- argsSchema: {
32
- type: "object",
33
- properties: {
34
- data: {
35
- type: "array",
36
- items: { type: "number" },
37
- description: "The new data points to render."
38
- }
39
- },
40
- required: ["data"]
41
- },
42
- idempotent: !0,
43
- descriptionKey: "ui.agent.sparkline.actions.updateSeries",
44
- description: "Replace the sparkline data without remounting.",
45
- invoke: (n, t) => {
46
- n.updateSeries(t.data);
47
- }
48
- },
49
- export_png: {
50
- // Pure getter — returns an image of the current chart, no state change.
51
- safety: "read",
52
- returns: "string",
53
- returnsSchema: {
54
- type: "string",
55
- description: "A PNG image of the sparkline encoded as a data URI."
56
- },
57
- descriptionKey: "ui.agent.sparkline.actions.exportPng",
58
- description: "Return a PNG data URI of the sparkline.",
59
- invoke: (n) => n.dataURI()
60
- }
61
- },
62
- domHooks: {
63
- root: { attr: "data-component", value: "sparkline" },
64
- instanceId: {
65
- attr: "data-component-id",
66
- sourceProp: "id",
67
- description: "Sourced from the id prop."
68
- }
69
- }
70
- }, D = Z("ds:relative ds:inline-block ds:w-full", {
71
- variants: {
72
- size: {
73
- xs: "ds:h-6",
74
- sm: "ds:h-8",
75
- md: "ds:h-10",
76
- // Applied when an explicit `height` prop is given: the wrapper
77
- // grows with the svg instead of clipping at the size's fixed height.
78
- auto: ""
79
- }
80
- },
81
- defaultVariants: { size: "md" }
82
- }), ee = {
83
- increasing: "↑",
84
- decreasing: "↓",
85
- steady: "→"
86
- }, te = {
87
- xs: 24,
88
- sm: 32,
89
- md: 40
90
- };
91
- function re() {
92
- return typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
93
- }
94
- const ne = G(
95
- ({
96
- id: n,
97
- data: t,
98
- variant: a = "line",
99
- size: c = "md",
100
- label: i,
101
- color: l,
102
- showEndpoint: d = !1,
103
- showTooltip: M = !1,
104
- width: b,
105
- height: u,
106
- className: s,
107
- ...o
108
- }, P) => {
109
- var z;
110
- const { t: p, i18n: C } = $(), S = L(), m = v(
111
- () => `sparkline-${S.replace(/[^a-zA-Z0-9-_]/g, "")}`,
112
- [S]
113
- ), h = K(null), [T, _] = A(0), { direction: k } = X(t), N = v(() => {
114
- if (t.length === 0)
115
- return p("sparkline.noData", "No data");
116
- const e = (y) => new Intl.NumberFormat(C.language).format(y), r = p(`sparkline.direction.${k}`), g = {
117
- min: e(Math.min(...t)),
118
- max: e(Math.max(...t)),
119
- current: e(t[t.length - 1]),
120
- direction: r
121
- };
122
- return i ? p("sparkline.summary", { label: i, ...g }) : p("sparkline.summaryNoLabel", g);
123
- }, [t, i, k, C.language, p]), [f, E] = A(
124
- () => {
125
- try {
126
- return U();
127
- } catch {
128
- return {};
129
- }
130
- }
131
- );
132
- H(() => {
133
- let e;
134
- const r = new MutationObserver(() => {
135
- clearTimeout(e), e = setTimeout(() => {
136
- try {
137
- E(U());
138
- } catch {
139
- }
140
- }, 50);
141
- });
142
- return r.observe(document.documentElement, {
143
- attributes: !0,
144
- attributeFilter: ["class"]
145
- }), () => {
146
- clearTimeout(e), r.disconnect();
147
- };
148
- }, []), H(() => {
149
- const e = h.current;
150
- if (!e) return;
151
- const r = new ResizeObserver((g) => {
152
- const y = g[0];
153
- y && _(Math.floor(y.contentRect.width));
154
- });
155
- return r.observe(e), () => r.disconnect();
156
- }, []), J(h);
157
- const x = v(
158
- () => ({
159
- updateSeries(e) {
160
- var r;
161
- (r = R.getChartByID(m)) == null || r.updateSeries([{ data: e }]);
162
- },
163
- updateOptions(e) {
164
- var r;
165
- (r = R.getChartByID(m)) == null || r.updateOptions(e);
166
- },
167
- async dataURI() {
168
- const e = R.getChartByID(m);
169
- return e ? (await e.dataURI()).imgURI : "";
170
- }
171
- }),
172
- [m]
173
- );
174
- V(P, () => x, [x]), Q(Y, x, n);
175
- const I = l ?? ((z = f.colors) == null ? void 0 : z[0]) ?? "currentColor";
176
- if (t.length === 0)
177
- return /* @__PURE__ */ w(
178
- "div",
179
- {
180
- ref: h,
181
- role: "img",
182
- "aria-label": N,
183
- dir: "ltr",
184
- className: D({
185
- size: u !== void 0 ? "auto" : c,
186
- className: s
187
- }),
188
- ...o
189
- }
190
- );
191
- const O = re(), W = {
192
- ...f,
193
- chart: {
194
- ...f.chart,
195
- id: m,
196
- type: a,
197
- sparkline: { enabled: !0 },
198
- toolbar: { show: !1 },
199
- animations: {
200
- enabled: !O,
201
- dynamicAnimation: { enabled: !O }
202
- },
203
- zoom: { enabled: !1 },
204
- parentHeightOffset: 0
205
- },
206
- colors: [I],
207
- stroke: {
208
- curve: "smooth",
209
- width: a === "bar" ? 0 : 2
210
- },
211
- fill: {
212
- opacity: a === "area" ? 0.15 : 1
213
- },
214
- xaxis: {
215
- crosshairs: { show: !1 }
216
- },
217
- tooltip: { enabled: M },
218
- markers: d ? {
219
- size: [0],
220
- discrete: [
221
- {
222
- seriesIndex: 0,
223
- dataPointIndex: t.length - 1,
224
- fillColor: I,
225
- strokeColor: I,
226
- size: 4
227
- }
228
- ]
229
- } : { size: 0 },
230
- grid: {
231
- ...f.grid,
232
- show: !1,
233
- // ApexCharts grid.padding uses physical keys (not CSS logical properties).
234
- // The chart wrapper enforces dir="ltr" so these always resolve correctly.
235
- padding: { top: 2, right: 2, bottom: 2, left: 2 }
236
- }
237
- }, j = b ?? (T > 0 ? T : "100%"), B = u ?? te[c ?? "md"];
238
- return /* @__PURE__ */ F(
239
- "div",
240
- {
241
- ref: h,
242
- role: "img",
243
- "aria-label": N,
244
- dir: "ltr",
245
- className: D({
246
- size: u !== void 0 ? "auto" : c,
247
- className: s
248
- }),
249
- "data-component": "sparkline",
250
- "data-component-id": n,
251
- ...o,
252
- children: [
253
- /* @__PURE__ */ w(
254
- q,
255
- {
256
- type: a,
257
- series: [{ data: t }],
258
- options: W,
259
- width: j,
260
- height: B,
261
- "aria-hidden": "true"
262
- }
263
- ),
264
- d && /* @__PURE__ */ w(
265
- "span",
266
- {
267
- "aria-hidden": "true",
268
- className: "ds:pointer-events-none ds:absolute ds:end-0 ds:top-0 ds:text-[length:var(--font-size-xs)] ds:leading-none",
269
- children: ee[k]
270
- }
271
- )
272
- ]
273
- }
274
- );
275
- }
276
- );
277
- ne.displayName = "Sparkline";
278
- export {
279
- ne as S,
280
- Y as s,
281
- X as u
282
- };
283
- //# sourceMappingURL=sparkline-DcXqRZoq.js.map