@alfadocs/ui-kit 0.89.0 → 0.94.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 (126) hide show
  1. package/dist/_chunks/{antenatal-schedule-timeline-UiZQze4P.js → antenatal-schedule-timeline-BMMpi2lb.js} +17 -17
  2. package/dist/_chunks/apexcharts-theme-fAQXLIMW.js +67 -0
  3. package/dist/_chunks/{appointment-timeline-CwpbQGC1.js → appointment-timeline-BB-c1LeR.js} +2 -2
  4. package/dist/_chunks/{ar-C9FRRqJs.js → ar-THMLfSoN.js} +22 -22
  5. package/dist/_chunks/{booking-DEwmDprH.js → booking-BSpSMmJ2.js} +4 -4
  6. package/dist/_chunks/{chart-CNaLgvx4.js → chart-DqxVCm1I.js} +288 -257
  7. package/dist/_chunks/{cycle-calculator-DXSNIWFk.js → cycle-calculator-DNvvr0bP.js} +3 -3
  8. package/dist/_chunks/date-picker-BP_W6VtE.js +265 -0
  9. package/dist/_chunks/{date-picker-variants-D9B6hg15.js → date-picker-variants-eL6HjWvw.js} +966 -841
  10. package/dist/_chunks/date-range-picker-Cfv4Sr63.js +832 -0
  11. package/dist/_chunks/{date-time-picker-BU-j0qj4.js → date-time-picker-695QvBGj.js} +2 -2
  12. package/dist/_chunks/{de-C3_KZ6mR.js → de-DmZ-8rTN.js} +4 -4
  13. package/dist/_chunks/{due-date-calculator-BR_GuqHH.js → due-date-calculator-BEcdoy_E.js} +3 -3
  14. package/dist/_chunks/{el-v9xDKHgu.js → el-Bela9mxs.js} +6 -6
  15. package/dist/_chunks/{es-Lgmjq9Rp.js → es-BNncHKex.js} +10 -10
  16. package/dist/_chunks/{fr-INS1OD7m.js → fr-CH8ADfhN.js} +12 -12
  17. package/dist/_chunks/{gestational-age-calculator-DBIcxfjP.js → gestational-age-calculator-CuGkVqKp.js} +5 -5
  18. package/dist/_chunks/{hcg-doubling-BgCkds8R.js → hcg-doubling-fZ6qQN08.js} +2 -2
  19. package/dist/_chunks/{hi-BUYtlosF.js → hi-Bppfxp8l.js} +16 -16
  20. package/dist/_chunks/{isSameWeek-BUNsv4OO.js → isSameWeek-CK4HS9lH.js} +2 -2
  21. package/dist/_chunks/{it-VfsdUqeV.js → it-B4ySaRyK.js} +24 -24
  22. package/dist/_chunks/{ja-Dfk9qwzE.js → ja-CGF6Io9P.js} +12 -12
  23. package/dist/_chunks/{link-cell-renderer-BzITwSXq.js → link-cell-renderer-_LDZhY4r.js} +214 -197
  24. package/dist/_chunks/{nl-Crxwg0IZ.js → nl-DuShqwuV.js} +12 -12
  25. package/dist/_chunks/parse-DvA97ro9.js +1601 -0
  26. package/dist/_chunks/{patient-details-Dggsz-ki.js → patient-details-DrhlTrLf.js} +2 -2
  27. package/dist/_chunks/{patient-table-ps4byVwA.js → patient-table-CFM92QqU.js} +2 -2
  28. package/dist/_chunks/{pl-IdHtxWTl.js → pl-CKQwX9Fk.js} +22 -22
  29. package/dist/_chunks/{pregnancy-dating-CvIRwWaG.js → pregnancy-dating-BdFl-rB1.js} +5 -5
  30. package/dist/_chunks/{pt-CY2m2bBz.js → pt-_njpXyOZ.js} +16 -16
  31. package/dist/_chunks/{radiograph-panel.agent-C93AXgtV.js → radiograph-panel.agent-DDnDGVpN.js} +3 -3
  32. package/dist/_chunks/{ro-qoxLkXED.js → ro-3X6_4FcN.js} +14 -14
  33. package/dist/_chunks/{ru-BVZlxoKf.js → ru-bAcgmnS-.js} +20 -20
  34. package/dist/_chunks/{sparkline-iOXYgvJe.js → sparkline-o6JH4O66.js} +2 -2
  35. package/dist/_chunks/{sq--eT8hIiD.js → sq-jYFqr4Ga.js} +6 -6
  36. package/dist/_chunks/subDays-BcNi04uf.js +8 -0
  37. package/dist/_chunks/{sv-BGNQ5gX6.js → sv-BSGEJ-8B.js} +10 -10
  38. package/dist/_chunks/{tr-B2NEu6Gy.js → tr-CTpgUtw6.js} +14 -14
  39. package/dist/_chunks/{zh-CN-DClT1wDk.js → zh-CN-BgM0Io2O.js} +22 -22
  40. package/dist/agent-catalog.json +101 -2
  41. package/dist/agent-i18n/en.json +8 -2
  42. package/dist/components/_shared/calendar-class-names.d.ts +5 -0
  43. package/dist/components/_shared/date-picker-variants.d.ts +23 -1
  44. package/dist/components/_shared/index.d.ts +2 -2
  45. package/dist/components/appointment-timeline/index.js +1 -1
  46. package/dist/components/booking/index.js +1 -1
  47. package/dist/components/chart/chart.d.ts +20 -0
  48. package/dist/components/chart/index.js +1 -1
  49. package/dist/components/cycle-calculator/index.js +1 -1
  50. package/dist/components/data-table/filters/date-range-filter.d.ts +13 -0
  51. package/dist/components/data-table/index.js +1 -1
  52. package/dist/components/date-picker/index.js +1 -1
  53. package/dist/components/date-range-picker/date-range-picker.d.ts +91 -1
  54. package/dist/components/date-range-picker/index.d.ts +1 -1
  55. package/dist/components/date-range-picker/index.js +1 -1
  56. package/dist/components/date-time-picker/index.js +1 -1
  57. package/dist/components/due-date-calculator/index.js +2 -2
  58. package/dist/components/gestational-age-calculator/index.js +1 -1
  59. package/dist/components/hcg-doubling/index.js +1 -1
  60. package/dist/components/patient-details/index.js +1 -1
  61. package/dist/components/patient-table/index.js +1 -1
  62. package/dist/components/pregnancy-dating/index.js +1 -1
  63. package/dist/components/radiograph-panel/index.js +1 -1
  64. package/dist/components/sparkline/index.js +1 -1
  65. package/dist/i18n/locales/ar.d.ts +24 -0
  66. package/dist/i18n/locales/ar.js +24 -0
  67. package/dist/i18n/locales/de.d.ts +24 -0
  68. package/dist/i18n/locales/de.js +24 -0
  69. package/dist/i18n/locales/el.d.ts +24 -0
  70. package/dist/i18n/locales/el.js +24 -0
  71. package/dist/i18n/locales/en.d.ts +24 -0
  72. package/dist/i18n/locales/en.js +24 -0
  73. package/dist/i18n/locales/es.d.ts +24 -0
  74. package/dist/i18n/locales/es.js +24 -0
  75. package/dist/i18n/locales/fr.d.ts +24 -0
  76. package/dist/i18n/locales/fr.js +24 -0
  77. package/dist/i18n/locales/hi.d.ts +24 -0
  78. package/dist/i18n/locales/hi.js +24 -0
  79. package/dist/i18n/locales/it.d.ts +24 -0
  80. package/dist/i18n/locales/it.js +24 -0
  81. package/dist/i18n/locales/ja.d.ts +24 -0
  82. package/dist/i18n/locales/ja.js +24 -0
  83. package/dist/i18n/locales/nl.d.ts +24 -0
  84. package/dist/i18n/locales/nl.js +24 -0
  85. package/dist/i18n/locales/pl.d.ts +24 -0
  86. package/dist/i18n/locales/pl.js +24 -0
  87. package/dist/i18n/locales/pt.d.ts +24 -0
  88. package/dist/i18n/locales/pt.js +24 -0
  89. package/dist/i18n/locales/ro.d.ts +24 -0
  90. package/dist/i18n/locales/ro.js +24 -0
  91. package/dist/i18n/locales/ru.d.ts +24 -0
  92. package/dist/i18n/locales/ru.js +24 -0
  93. package/dist/i18n/locales/sq.d.ts +24 -0
  94. package/dist/i18n/locales/sq.js +24 -0
  95. package/dist/i18n/locales/sv.d.ts +24 -0
  96. package/dist/i18n/locales/sv.js +24 -0
  97. package/dist/i18n/locales/tr.d.ts +24 -0
  98. package/dist/i18n/locales/tr.js +24 -0
  99. package/dist/i18n/locales/zh.d.ts +24 -0
  100. package/dist/i18n/locales/zh.js +24 -0
  101. package/dist/index.js +17 -17
  102. package/dist/locales/ar.json +24 -0
  103. package/dist/locales/de.json +24 -0
  104. package/dist/locales/el.json +24 -0
  105. package/dist/locales/en.json +24 -0
  106. package/dist/locales/es.json +24 -0
  107. package/dist/locales/fr.json +24 -0
  108. package/dist/locales/hi.json +24 -0
  109. package/dist/locales/it.json +24 -0
  110. package/dist/locales/ja.json +24 -0
  111. package/dist/locales/nl.json +24 -0
  112. package/dist/locales/pl.json +24 -0
  113. package/dist/locales/pt.json +24 -0
  114. package/dist/locales/ro.json +24 -0
  115. package/dist/locales/ru.json +24 -0
  116. package/dist/locales/sq.json +24 -0
  117. package/dist/locales/sv.json +24 -0
  118. package/dist/locales/tr.json +24 -0
  119. package/dist/locales/zh.json +24 -0
  120. package/dist/tokens/apexcharts-theme.d.ts +36 -1
  121. package/dist/tokens.css +1 -1
  122. package/package.json +1 -1
  123. package/dist/_chunks/apexcharts-theme-BJigns_V.js +0 -53
  124. package/dist/_chunks/date-picker-ffmyjvlI.js +0 -1845
  125. package/dist/_chunks/date-range-picker-DSOH50-f.js +0 -325
  126. package/dist/_chunks/subDays-fEHRx4hg.js +0 -8
@@ -3,12 +3,12 @@ import { forwardRef as A, useState as C, useMemo as N, useEffect as I } from "re
3
3
  import { c as S } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as k } from "react-i18next";
5
5
  import { F as L } from "./form-field-M5UpX65Z.js";
6
- import { D as z } from "./date-picker-ffmyjvlI.js";
6
+ import { D as z } from "./date-picker-BP_W6VtE.js";
7
7
  import { N as D } from "./number-input-DjWzmlEY.js";
8
8
  import { C as E } from "./card-DPmk26CL.js";
9
9
  import { B as P } from "./badge-DCOqV9mI.js";
10
10
  import { I as B } from "./insert-result-D074GtHX.js";
11
- import { a as i } from "./date-picker-variants-D9B6hg15.js";
11
+ import { a as i } from "./date-picker-variants-eL6HjWvw.js";
12
12
  import { C as G } from "./check-DrFSN__t.js";
13
13
  import { H as R } from "./heart--qCA4ffe.js";
14
14
  import { c as Y } from "./createLucideIcon-DhHxpK9K.js";
@@ -249,4 +249,4 @@ export {
249
249
  U as L,
250
250
  O as p
251
251
  };
252
- //# sourceMappingURL=cycle-calculator-DXSNIWFk.js.map
252
+ //# sourceMappingURL=cycle-calculator-DNvvr0bP.js.map
@@ -0,0 +1,265 @@
1
+ import { jsx as r, jsxs as v } from "react/jsx-runtime";
2
+ import { forwardRef as ae, useState as y, useRef as K, useEffect as re, useCallback as R, useMemo as ne, useImperativeHandle as se } from "react";
3
+ import { useTranslation as ie } from "react-i18next";
4
+ import * as k from "@radix-ui/react-popover";
5
+ import { u as oe } from "./use-controllable-state-BiY4xTzM.js";
6
+ import { u as de } from "./form-field-context-B3APVHKx.js";
7
+ import { u as ce } from "./registry-DvAUVLHh.js";
8
+ import { u as le, g as pe, f as T, b as ue, c as fe, i as me, t as he, d as ge, p as ve, D as ye, C as ke, e as be, h as Ce, j as De } from "./date-picker-variants-eL6HjWvw.js";
9
+ import { C as Pe } from "./calendar-days-BGWklvE-.js";
10
+ import { C as Se } from "./check-DrFSN__t.js";
11
+ import { p as xe } from "./parse-DvA97ro9.js";
12
+ import { i as we } from "./isSameDay-DUEiAT0G.js";
13
+ const Ie = {
14
+ id: "date-picker",
15
+ // Persisted single date (value state + set_date) → select_single + set_value,
16
+ // plus open/close of the calendar popover.
17
+ capabilities: ["select_single", "set_value", "open", "close"],
18
+ state: {
19
+ value: {
20
+ type: "iso-date",
21
+ descriptionKey: "ui.agent.datePicker.state.value",
22
+ description: "Currently-selected ISO date, or null.",
23
+ read: (a) => {
24
+ var c;
25
+ return ((c = a.getValue()) == null ? void 0 : c.toISOString()) ?? null;
26
+ }
27
+ },
28
+ isOpen: {
29
+ type: "boolean",
30
+ descriptionKey: "ui.agent.datePicker.state.isOpen",
31
+ description: "Whether the calendar popover is open.",
32
+ read: (a) => a.isOpen()
33
+ }
34
+ },
35
+ actions: {
36
+ set_date: {
37
+ safety: "write",
38
+ argsType: "{ date: string }",
39
+ argsSchema: {
40
+ type: "object",
41
+ properties: {
42
+ date: {
43
+ type: "string",
44
+ format: "date",
45
+ description: 'ISO date, e.g. "2026-06-23".'
46
+ }
47
+ },
48
+ required: ["date"]
49
+ },
50
+ idempotent: !0,
51
+ descriptionKey: "ui.agent.datePicker.actions.setDate",
52
+ description: "Select a specific date (ISO yyyy-mm-dd).",
53
+ examples: [{ args: { date: "2026-06-23" }, note: "Select 23 Jun 2026." }],
54
+ invoke: (a, c) => {
55
+ a.setValue(new Date(c.date));
56
+ }
57
+ },
58
+ clear: {
59
+ // Discards the selected date — loses the user's input.
60
+ safety: "destructive",
61
+ idempotent: !0,
62
+ descriptionKey: "ui.agent.datePicker.actions.clear",
63
+ description: "Clear the selected date.",
64
+ invoke: (a) => {
65
+ a.clear();
66
+ }
67
+ },
68
+ open: {
69
+ safety: "read",
70
+ idempotent: !0,
71
+ descriptionKey: "ui.agent.datePicker.actions.open",
72
+ description: "Open the calendar popover.",
73
+ invoke: (a) => {
74
+ a.open();
75
+ }
76
+ },
77
+ close: {
78
+ safety: "read",
79
+ idempotent: !0,
80
+ descriptionKey: "ui.agent.datePicker.actions.close",
81
+ description: "Close the calendar popover.",
82
+ invoke: (a) => {
83
+ a.close();
84
+ }
85
+ }
86
+ },
87
+ domHooks: {
88
+ root: {
89
+ attr: "data-component",
90
+ value: "date-picker",
91
+ description: "Marks the DatePicker wrapper."
92
+ },
93
+ instanceId: {
94
+ attr: "data-component-id",
95
+ sourceProp: "id",
96
+ description: "Sourced from the id prop."
97
+ }
98
+ }
99
+ }, Oe = ae(
100
+ ({
101
+ value: a,
102
+ defaultValue: c,
103
+ onChange: F,
104
+ minDate: m,
105
+ maxDate: h,
106
+ disabledDates: l,
107
+ weekStartsOn: M,
108
+ presets: b,
109
+ size: x = "md",
110
+ disabled: j,
111
+ placeholder: q,
112
+ className: B,
113
+ id: E
114
+ }, L) => {
115
+ const { t: w, i18n: I } = ie(), p = de(), C = E ?? p.id, O = p.disabled || j, _ = p.invalid ? "error" : "default", u = le(I.language), f = pe(I.language), H = q ?? w("inputs.datePicker.placeholder", "Select date"), [W, N] = oe({
116
+ value: a,
117
+ defaultValue: c,
118
+ onChange: F
119
+ }), n = W, [i, s] = y(!1), [J, D] = y(
120
+ n ? T(n, f, { locale: u }) : ""
121
+ ), [V, g] = y(!1), [z, P] = y(n ?? /* @__PURE__ */ new Date()), S = K(null);
122
+ re(() => {
123
+ n ? (D(T(n, f, { locale: u })), g(!1)) : D("");
124
+ }, [n, f, u]);
125
+ const G = ue(
126
+ m,
127
+ h,
128
+ l
129
+ ), Q = R(
130
+ (e) => m && fe(e, m) || h && me(e, h) ? !0 : Array.isArray(l) ? l.some(
131
+ (t) => t.toDateString() === e.toDateString()
132
+ ) : typeof l == "function" ? l(e) : !1,
133
+ [m, h, l]
134
+ ), o = R(
135
+ (e) => {
136
+ N(e);
137
+ },
138
+ [N]
139
+ ), U = (e) => {
140
+ const t = e.target.value;
141
+ if (D(t), t.length === 0) {
142
+ g(!1), o(void 0);
143
+ return;
144
+ }
145
+ const d = xe(t, f, /* @__PURE__ */ new Date(), { locale: u });
146
+ De(d) && !Q(d) ? (g(!1), o(d), P(d)) : t.length === f.length && g(!0);
147
+ }, X = (e) => {
148
+ e.key === "Enter" && i && (e.preventDefault(), s(!1)), e.key === "Escape" && i && (e.preventDefault(), s(!1)), e.key === "ArrowDown" && !i && (e.preventDefault(), s(!0));
149
+ }, Y = (e) => {
150
+ var t;
151
+ e && (o(e), s(!1), (t = S.current) == null || t.focus());
152
+ }, Z = (e) => {
153
+ var d;
154
+ const t = e.date();
155
+ o(t), P(t), s(!1), (d = S.current) == null || d.focus();
156
+ }, $ = (e) => n ? we(e.date(), n) : !1, ee = w("inputs.datePicker.gridLabel", "Calendar"), te = ne(
157
+ () => ({
158
+ getValue: () => n,
159
+ setValue: (e) => o(e),
160
+ clear: () => o(void 0),
161
+ isOpen: () => i,
162
+ open: () => s(!0),
163
+ close: () => s(!1)
164
+ }),
165
+ [n, o, i]
166
+ ), A = K(null);
167
+ return se(L, () => A.current, []), ce(Ie, te, C), /* @__PURE__ */ r(k.Root, { open: i, onOpenChange: s, children: /* @__PURE__ */ v(
168
+ "div",
169
+ {
170
+ ref: A,
171
+ className: B,
172
+ "data-component": "date-picker",
173
+ "data-component-id": C,
174
+ children: [
175
+ /* @__PURE__ */ v("div", { className: "ds:relative", children: [
176
+ /* @__PURE__ */ r(k.Trigger, { asChild: !0, disabled: O, children: /* @__PURE__ */ r(
177
+ "input",
178
+ {
179
+ ref: S,
180
+ id: C,
181
+ type: "text",
182
+ role: "combobox",
183
+ value: J,
184
+ placeholder: H,
185
+ disabled: O,
186
+ "aria-describedby": p.describedBy || void 0,
187
+ "aria-invalid": p.invalid || V || void 0,
188
+ "aria-required": p.required || void 0,
189
+ "aria-haspopup": "dialog",
190
+ "aria-expanded": i,
191
+ onChange: U,
192
+ onKeyDown: X,
193
+ onClick: () => !i && s(!0),
194
+ className: he({
195
+ size: x,
196
+ tone: V ? "error" : _
197
+ })
198
+ }
199
+ ) }),
200
+ /* @__PURE__ */ r("span", { "aria-hidden": "true", className: ge({ size: x }), children: /* @__PURE__ */ r(Pe, {}) })
201
+ ] }),
202
+ /* @__PURE__ */ r(k.Portal, { children: /* @__PURE__ */ r(
203
+ k.Content,
204
+ {
205
+ sideOffset: 4,
206
+ align: "start",
207
+ className: Ce(),
208
+ onOpenAutoFocus: (e) => {
209
+ e.preventDefault();
210
+ },
211
+ children: /* @__PURE__ */ v("div", { className: "ds:flex ds:gap-[var(--spacing-md)]", children: [
212
+ b && b.length > 0 ? /* @__PURE__ */ r("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:min-w-[8rem] ds:border-e ds:border-border ds:pe-[var(--spacing-md)]", children: b.map((e) => {
213
+ const t = $(e);
214
+ return /* @__PURE__ */ v(
215
+ "button",
216
+ {
217
+ type: "button",
218
+ "aria-pressed": t,
219
+ onClick: () => Z(e),
220
+ className: ve({ active: t }),
221
+ children: [
222
+ /* @__PURE__ */ r("span", { className: "ds:min-w-0 ds:truncate", children: e.label }),
223
+ t ? /* @__PURE__ */ r(
224
+ Se,
225
+ {
226
+ "aria-hidden": "true",
227
+ className: "ds:size-4 ds:shrink-0 ds:text-primary"
228
+ }
229
+ ) : null
230
+ ]
231
+ },
232
+ e.label
233
+ );
234
+ }) }) : null,
235
+ /* @__PURE__ */ r("div", { role: "region", "aria-label": ee, children: /* @__PURE__ */ r(
236
+ ye,
237
+ {
238
+ mode: "single",
239
+ selected: n,
240
+ onSelect: Y,
241
+ month: z,
242
+ onMonthChange: P,
243
+ disabled: G,
244
+ weekStartsOn: M,
245
+ locale: u,
246
+ showOutsideDays: !0,
247
+ fixedWeeks: !0,
248
+ classNames: be,
249
+ components: { Chevron: ke }
250
+ }
251
+ ) })
252
+ ] })
253
+ }
254
+ ) })
255
+ ]
256
+ }
257
+ ) });
258
+ }
259
+ );
260
+ Oe.displayName = "DatePicker";
261
+ export {
262
+ Oe as D,
263
+ Ie as d
264
+ };
265
+ //# sourceMappingURL=date-picker-BP_W6VtE.js.map