@alfadocs/ui-kit 0.88.1 → 0.93.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 (118) hide show
  1. package/dist/_chunks/{antenatal-schedule-timeline-BzJZqS-8.js → antenatal-schedule-timeline-BMMpi2lb.js} +17 -17
  2. package/dist/_chunks/{appointment-timeline-DQTG0btW.js → appointment-timeline-BB-c1LeR.js} +2 -2
  3. package/dist/_chunks/{ar-B1GhtlBP.js → ar-THMLfSoN.js} +22 -22
  4. package/dist/_chunks/{booking-BvCu2XWY.js → booking-BSpSMmJ2.js} +4 -4
  5. package/dist/_chunks/{cycle-calculator-OQp8Ik5U.js → cycle-calculator-DNvvr0bP.js} +3 -3
  6. package/dist/_chunks/date-picker-BP_W6VtE.js +265 -0
  7. package/dist/_chunks/{date-picker-variants-CYQAm1Gk.js → date-picker-variants-eL6HjWvw.js} +985 -847
  8. package/dist/_chunks/date-range-picker-Cc4DLAL2.js +824 -0
  9. package/dist/_chunks/{date-time-picker-B5IpU-nd.js → date-time-picker-695QvBGj.js} +2 -2
  10. package/dist/_chunks/{de-DETDHQ0o.js → de-DmZ-8rTN.js} +4 -4
  11. package/dist/_chunks/{due-date-calculator-DASNRgnH.js → due-date-calculator-BEcdoy_E.js} +3 -3
  12. package/dist/_chunks/{el-HV3jOI0z.js → el-Bela9mxs.js} +6 -6
  13. package/dist/_chunks/{es-Dpo7Olwo.js → es-BNncHKex.js} +10 -10
  14. package/dist/_chunks/{fr-CgD4Jvtq.js → fr-CH8ADfhN.js} +12 -12
  15. package/dist/_chunks/{gestational-age-calculator-BpYw-WF-.js → gestational-age-calculator-CuGkVqKp.js} +5 -5
  16. package/dist/_chunks/{hcg-doubling-Dqj-EqMT.js → hcg-doubling-fZ6qQN08.js} +2 -2
  17. package/dist/_chunks/{hi-Bf8CAP6b.js → hi-Bppfxp8l.js} +16 -16
  18. package/dist/_chunks/{isSameWeek-BYl5poz_.js → isSameWeek-CK4HS9lH.js} +2 -2
  19. package/dist/_chunks/{it-mt1V2DFS.js → it-B4ySaRyK.js} +24 -24
  20. package/dist/_chunks/{ja-CbOHn2TO.js → ja-CGF6Io9P.js} +12 -12
  21. package/dist/_chunks/{link-cell-renderer-BQGUs45d.js → link-cell-renderer-DQjZeoAr.js} +214 -197
  22. package/dist/_chunks/{nl-C6Y0QXnm.js → nl-DuShqwuV.js} +12 -12
  23. package/dist/_chunks/parse-DvA97ro9.js +1601 -0
  24. package/dist/_chunks/{patient-details-B9LCdyWW.js → patient-details-DrhlTrLf.js} +2 -2
  25. package/dist/_chunks/{patient-table-B6AKMTm3.js → patient-table-DU_zFZoq.js} +2 -2
  26. package/dist/_chunks/{pl-BdazJAOp.js → pl-CKQwX9Fk.js} +22 -22
  27. package/dist/_chunks/{pregnancy-dating-msMl_6wz.js → pregnancy-dating-BdFl-rB1.js} +5 -5
  28. package/dist/_chunks/{pt-B3UKvhHp.js → pt-_njpXyOZ.js} +16 -16
  29. package/dist/_chunks/{radiograph-panel.agent-M9XD4ze4.js → radiograph-panel.agent-rnrQZtK3.js} +3 -3
  30. package/dist/_chunks/{ro-DVTEQpPK.js → ro-3X6_4FcN.js} +14 -14
  31. package/dist/_chunks/{ru-C-Mp40SC.js → ru-bAcgmnS-.js} +20 -20
  32. package/dist/_chunks/{sq-DierVlw-.js → sq-jYFqr4Ga.js} +6 -6
  33. package/dist/_chunks/subDays-BcNi04uf.js +8 -0
  34. package/dist/_chunks/{sv-gQWo_19z.js → sv-BSGEJ-8B.js} +10 -10
  35. package/dist/_chunks/{tr-Btm6M3Km.js → tr-CTpgUtw6.js} +14 -14
  36. package/dist/_chunks/{zh-CN-DkVN4vsB.js → zh-CN-BgM0Io2O.js} +22 -22
  37. package/dist/agent-catalog.json +93 -2
  38. package/dist/agent-i18n/en.json +8 -2
  39. package/dist/components/_shared/calendar-class-names.d.ts +5 -0
  40. package/dist/components/_shared/date-picker-variants.d.ts +24 -1
  41. package/dist/components/_shared/index.d.ts +2 -2
  42. package/dist/components/appointment-timeline/index.js +1 -1
  43. package/dist/components/booking/index.js +1 -1
  44. package/dist/components/cycle-calculator/index.js +1 -1
  45. package/dist/components/data-table/filters/date-range-filter.d.ts +13 -0
  46. package/dist/components/data-table/index.js +1 -1
  47. package/dist/components/date-picker/index.js +1 -1
  48. package/dist/components/date-range-picker/date-range-picker.d.ts +89 -1
  49. package/dist/components/date-range-picker/index.d.ts +1 -1
  50. package/dist/components/date-range-picker/index.js +1 -1
  51. package/dist/components/date-time-picker/index.js +1 -1
  52. package/dist/components/due-date-calculator/index.js +2 -2
  53. package/dist/components/gestational-age-calculator/index.js +1 -1
  54. package/dist/components/hcg-doubling/index.js +1 -1
  55. package/dist/components/patient-details/index.js +1 -1
  56. package/dist/components/patient-table/index.js +1 -1
  57. package/dist/components/pregnancy-dating/index.js +1 -1
  58. package/dist/components/radiograph-panel/index.js +1 -1
  59. package/dist/i18n/locales/ar.d.ts +24 -0
  60. package/dist/i18n/locales/ar.js +24 -0
  61. package/dist/i18n/locales/de.d.ts +24 -0
  62. package/dist/i18n/locales/de.js +24 -0
  63. package/dist/i18n/locales/el.d.ts +24 -0
  64. package/dist/i18n/locales/el.js +24 -0
  65. package/dist/i18n/locales/en.d.ts +24 -0
  66. package/dist/i18n/locales/en.js +24 -0
  67. package/dist/i18n/locales/es.d.ts +24 -0
  68. package/dist/i18n/locales/es.js +24 -0
  69. package/dist/i18n/locales/fr.d.ts +24 -0
  70. package/dist/i18n/locales/fr.js +24 -0
  71. package/dist/i18n/locales/hi.d.ts +24 -0
  72. package/dist/i18n/locales/hi.js +24 -0
  73. package/dist/i18n/locales/it.d.ts +24 -0
  74. package/dist/i18n/locales/it.js +24 -0
  75. package/dist/i18n/locales/ja.d.ts +24 -0
  76. package/dist/i18n/locales/ja.js +24 -0
  77. package/dist/i18n/locales/nl.d.ts +24 -0
  78. package/dist/i18n/locales/nl.js +24 -0
  79. package/dist/i18n/locales/pl.d.ts +24 -0
  80. package/dist/i18n/locales/pl.js +24 -0
  81. package/dist/i18n/locales/pt.d.ts +24 -0
  82. package/dist/i18n/locales/pt.js +24 -0
  83. package/dist/i18n/locales/ro.d.ts +24 -0
  84. package/dist/i18n/locales/ro.js +24 -0
  85. package/dist/i18n/locales/ru.d.ts +24 -0
  86. package/dist/i18n/locales/ru.js +24 -0
  87. package/dist/i18n/locales/sq.d.ts +24 -0
  88. package/dist/i18n/locales/sq.js +24 -0
  89. package/dist/i18n/locales/sv.d.ts +24 -0
  90. package/dist/i18n/locales/sv.js +24 -0
  91. package/dist/i18n/locales/tr.d.ts +24 -0
  92. package/dist/i18n/locales/tr.js +24 -0
  93. package/dist/i18n/locales/zh.d.ts +24 -0
  94. package/dist/i18n/locales/zh.js +24 -0
  95. package/dist/index.js +15 -15
  96. package/dist/locales/ar.json +24 -0
  97. package/dist/locales/de.json +24 -0
  98. package/dist/locales/el.json +24 -0
  99. package/dist/locales/en.json +24 -0
  100. package/dist/locales/es.json +24 -0
  101. package/dist/locales/fr.json +24 -0
  102. package/dist/locales/hi.json +24 -0
  103. package/dist/locales/it.json +24 -0
  104. package/dist/locales/ja.json +24 -0
  105. package/dist/locales/nl.json +24 -0
  106. package/dist/locales/pl.json +24 -0
  107. package/dist/locales/pt.json +24 -0
  108. package/dist/locales/ro.json +24 -0
  109. package/dist/locales/ru.json +24 -0
  110. package/dist/locales/sq.json +24 -0
  111. package/dist/locales/sv.json +24 -0
  112. package/dist/locales/tr.json +24 -0
  113. package/dist/locales/zh.json +24 -0
  114. package/dist/tokens.css +1 -1
  115. package/package.json +1 -1
  116. package/dist/_chunks/date-picker-DzQS8mvt.js +0 -1845
  117. package/dist/_chunks/date-range-picker-Cbz1SKhm.js +0 -324
  118. package/dist/_chunks/subDays-DIKRViZm.js +0 -8
@@ -1,324 +0,0 @@
1
- import { jsx as n, jsxs as g } from "react/jsx-runtime";
2
- import { forwardRef as Q, useState as M, useRef as U, useCallback as X, useMemo as Z, useImperativeHandle as z } from "react";
3
- import { useTranslation as ee } from "react-i18next";
4
- import * as f from "@radix-ui/react-popover";
5
- import { u as te } from "./use-controllable-state-BiY4xTzM.js";
6
- import { u as ae } from "./form-field-context-B3APVHKx.js";
7
- import { u as ne } from "./registry-DvAUVLHh.js";
8
- import { b as re, u as se, g as oe, c as ie, e as T, s as W, d as de, f as ce, h as v, j as le, k as pe, t as me, p as ue, D as ge, C as fe, l as he, m as ye } from "./date-picker-variants-CYQAm1Gk.js";
9
- import { s as R } from "./subDays-DIKRViZm.js";
10
- import { C as ke } from "./calendar-days-BGWklvE-.js";
11
- function be(a, s, i) {
12
- return re(a, -1, i);
13
- }
14
- const ve = {
15
- id: "date-range-picker",
16
- capabilities: ["range_pick", "open", "close"],
17
- state: {
18
- range: {
19
- type: "{ from: iso-date | null, to: iso-date | null }",
20
- descriptionKey: "ui.agent.dateRangePicker.state.range",
21
- description: "Currently-selected ISO date range endpoints, each possibly null.",
22
- read: (a) => {
23
- var i, l;
24
- const s = a.getRange();
25
- return {
26
- from: ((i = s.from) == null ? void 0 : i.toISOString()) ?? null,
27
- to: ((l = s.to) == null ? void 0 : l.toISOString()) ?? null
28
- };
29
- }
30
- },
31
- isOpen: {
32
- type: "boolean",
33
- descriptionKey: "ui.agent.dateRangePicker.state.isOpen",
34
- description: "Whether the range calendar popover is open.",
35
- read: (a) => a.isOpen()
36
- }
37
- },
38
- actions: {
39
- set_range: {
40
- safety: "write",
41
- argsType: "{ from: string, to: string }",
42
- argsSchema: {
43
- type: "object",
44
- properties: {
45
- from: {
46
- type: "string",
47
- format: "date",
48
- description: "ISO start date (inclusive)."
49
- },
50
- to: {
51
- type: "string",
52
- format: "date",
53
- description: "ISO end date (inclusive)."
54
- }
55
- },
56
- required: ["from", "to"]
57
- },
58
- idempotent: !0,
59
- descriptionKey: "ui.agent.dateRangePicker.actions.setRange",
60
- description: "Replace the selected range with the given ISO endpoints.",
61
- examples: [
62
- {
63
- args: { from: "2026-06-01", to: "2026-06-30" },
64
- note: "Select all of June 2026."
65
- }
66
- ],
67
- invoke: (a, s) => {
68
- a.setRange({ from: new Date(s.from), to: new Date(s.to) });
69
- }
70
- },
71
- clear: {
72
- // Discards the selected range — loses the user's input.
73
- safety: "destructive",
74
- idempotent: !0,
75
- descriptionKey: "ui.agent.dateRangePicker.actions.clear",
76
- description: "Clear the selected range.",
77
- invoke: (a) => {
78
- a.clear();
79
- }
80
- },
81
- open: {
82
- safety: "read",
83
- idempotent: !0,
84
- descriptionKey: "ui.agent.dateRangePicker.actions.open",
85
- description: "Open the range calendar popover.",
86
- invoke: (a) => {
87
- a.open();
88
- }
89
- },
90
- close: {
91
- safety: "read",
92
- idempotent: !0,
93
- descriptionKey: "ui.agent.dateRangePicker.actions.close",
94
- description: "Close the range calendar popover.",
95
- invoke: (a) => {
96
- a.close();
97
- }
98
- }
99
- },
100
- domHooks: {
101
- root: {
102
- attr: "data-component",
103
- value: "date-range-picker",
104
- description: "Marks the DateRangePicker wrapper."
105
- },
106
- instanceId: {
107
- attr: "data-component-id",
108
- sourceProp: "id",
109
- description: "Sourced from the id prop."
110
- }
111
- }
112
- }, Re = Q(
113
- ({
114
- value: a,
115
- defaultValue: s,
116
- onChange: i,
117
- minDate: l,
118
- maxDate: V,
119
- presets: h,
120
- mergePresets: K = !1,
121
- size: D = "md",
122
- disabled: j,
123
- placeholder: F,
124
- className: L,
125
- id: A
126
- }, B) => {
127
- const { t: r, i18n: w } = ee(), c = ae(), y = A ?? c.id, P = c.disabled || j, H = c.invalid ? "error" : "default", o = se(w.language), k = oe(w.language), _ = F ?? r("inputs.dateRangePicker.placeholder", "Select date range"), [$, C] = te({
128
- value: a,
129
- defaultValue: s ?? {},
130
- onChange: i
131
- }), t = $ ?? {}, [p, m] = M(!1), [q, O] = M(t.from ?? /* @__PURE__ */ new Date()), J = U(null), d = X(
132
- (e) => {
133
- C(e);
134
- },
135
- [C]
136
- ), Y = ie(l, V), S = [
137
- {
138
- label: r("inputs.dateRangePicker.presets.today", "Today"),
139
- range: () => {
140
- const e = /* @__PURE__ */ new Date();
141
- return { from: e, to: e };
142
- }
143
- },
144
- {
145
- label: r("inputs.dateRangePicker.presets.yesterday", "Yesterday"),
146
- range: () => {
147
- const e = R(/* @__PURE__ */ new Date(), 1);
148
- return { from: e, to: e };
149
- }
150
- },
151
- {
152
- label: r("inputs.dateRangePicker.presets.last7", "Last 7 days"),
153
- range: () => ({
154
- from: R(/* @__PURE__ */ new Date(), 6),
155
- to: /* @__PURE__ */ new Date()
156
- })
157
- },
158
- {
159
- label: r("inputs.dateRangePicker.presets.thisWeek", "This week"),
160
- range: () => ({
161
- from: W(/* @__PURE__ */ new Date(), { locale: o }),
162
- to: T(/* @__PURE__ */ new Date(), { locale: o })
163
- })
164
- },
165
- {
166
- label: r("inputs.dateRangePicker.presets.lastWeek", "Last week"),
167
- range: () => {
168
- const e = be(/* @__PURE__ */ new Date());
169
- return {
170
- from: W(e, { locale: o }),
171
- to: T(e, { locale: o })
172
- };
173
- }
174
- },
175
- {
176
- label: r("inputs.dateRangePicker.presets.thisMonth", "This month"),
177
- range: () => ({
178
- from: ce(/* @__PURE__ */ new Date()),
179
- to: de(/* @__PURE__ */ new Date())
180
- })
181
- },
182
- {
183
- label: r("inputs.dateRangePicker.presets.last30", "Last 30 days"),
184
- range: () => ({
185
- from: R(/* @__PURE__ */ new Date(), 29),
186
- to: /* @__PURE__ */ new Date()
187
- })
188
- }
189
- ], x = h ? K ? [...S, ...h] : h : S, E = (e) => {
190
- d(e ? { from: e.from, to: e.to } : {});
191
- }, G = (e) => {
192
- const u = e.range();
193
- d(u), O(u.from), m(!1);
194
- }, N = (() => {
195
- if (t.from && t.to) {
196
- const e = v(t.from, k, { locale: o }), u = v(t.to, k, { locale: o });
197
- return `${e} – ${u}`;
198
- }
199
- return t.from ? v(t.from, k, { locale: o }) : "";
200
- })(), I = (() => {
201
- if (t.from && t.to) {
202
- const e = le(t.to, t.from) + 1;
203
- return r("inputs.dateRangePicker.days", "{{count}} days", {
204
- count: e
205
- });
206
- }
207
- return "";
208
- })(), b = Z(
209
- () => ({
210
- getRange: () => t,
211
- setRange: (e) => d(e),
212
- clear: () => d({}),
213
- isOpen: () => p,
214
- open: () => m(!0),
215
- close: () => m(!1)
216
- }),
217
- [t, d, p]
218
- );
219
- return z(B, () => b, [b]), ne(ve, b, y), /* @__PURE__ */ n(f.Root, { open: p, onOpenChange: m, children: /* @__PURE__ */ g(
220
- "div",
221
- {
222
- className: L,
223
- "data-component": "date-range-picker",
224
- "data-component-id": y,
225
- children: [
226
- /* @__PURE__ */ n(f.Trigger, { asChild: !0, disabled: P, children: /* @__PURE__ */ g(
227
- "button",
228
- {
229
- ref: J,
230
- id: y,
231
- type: "button",
232
- disabled: P,
233
- "aria-describedby": c.describedBy || void 0,
234
- "aria-invalid": c.invalid || void 0,
235
- "aria-haspopup": "dialog",
236
- "aria-expanded": p,
237
- className: me({ size: D, tone: H }),
238
- children: [
239
- /* @__PURE__ */ n(
240
- "span",
241
- {
242
- className: [
243
- // Truncate so a long value/placeholder ellipsises instead of
244
- // running under the absolutely-positioned calendar icon (the
245
- // trigger reserves the icon's space via `pe-10`). `min-w-0`
246
- // lets the flex child shrink below its content width so
247
- // `truncate` engages.
248
- "ds:min-w-0 ds:flex-1 ds:truncate ds:text-start",
249
- N ? "ds:text-foreground" : "ds:text-muted-foreground"
250
- ].join(" "),
251
- children: N || _
252
- }
253
- ),
254
- /* @__PURE__ */ n(
255
- "span",
256
- {
257
- "aria-hidden": "true",
258
- className: pe({ size: D }),
259
- children: /* @__PURE__ */ n(ke, {})
260
- }
261
- )
262
- ]
263
- }
264
- ) }),
265
- /* @__PURE__ */ n(f.Portal, { children: /* @__PURE__ */ n(
266
- f.Content,
267
- {
268
- sideOffset: 4,
269
- align: "start",
270
- className: ye(),
271
- children: /* @__PURE__ */ g("div", { className: "ds:flex ds:gap-[var(--spacing-md)]", children: [
272
- x.length > 0 ? /* @__PURE__ */ n("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: x.map((e) => /* @__PURE__ */ n(
273
- "button",
274
- {
275
- type: "button",
276
- onClick: () => G(e),
277
- className: ue(),
278
- children: e.label
279
- },
280
- e.label
281
- )) }) : null,
282
- /* @__PURE__ */ g("div", { children: [
283
- /* @__PURE__ */ n(
284
- ge,
285
- {
286
- mode: "range",
287
- selected: t.from ? { from: t.from, to: t.to } : void 0,
288
- onSelect: E,
289
- month: q,
290
- onMonthChange: O,
291
- numberOfMonths: 2,
292
- disabled: Y,
293
- locale: o,
294
- showOutsideDays: !0,
295
- fixedWeeks: !0,
296
- pagedNavigation: !0,
297
- classNames: he,
298
- components: { Chevron: fe }
299
- }
300
- ),
301
- I ? /* @__PURE__ */ n(
302
- "div",
303
- {
304
- role: "status",
305
- "aria-live": "polite",
306
- className: "type-body-sm ds:text-muted-foreground ds:mt-[var(--spacing-sm)] ds:text-center",
307
- children: I
308
- }
309
- ) : null
310
- ] })
311
- ] })
312
- }
313
- ) })
314
- ]
315
- }
316
- ) });
317
- }
318
- );
319
- Re.displayName = "DateRangePicker";
320
- export {
321
- Re as D,
322
- ve as d
323
- };
324
- //# sourceMappingURL=date-range-picker-Cbz1SKhm.js.map
@@ -1,8 +0,0 @@
1
- import { a as o } from "./date-picker-variants-CYQAm1Gk.js";
2
- function n(a, s, r) {
3
- return o(a, -s, r);
4
- }
5
- export {
6
- n as s
7
- };
8
- //# sourceMappingURL=subDays-DIKRViZm.js.map